Sign in

username:

password:



Not a member?

Search basicx



Search tips

Subscribe to basicx



basicx by Keywords

Accelerometer | ADC | ADXL | Adxl20 | AVR | BasicStamp | BX-35 | BX28 | BX35 | COM3 | Compiler | Downloader | EEPROM | Electromagnet | GetADC | GP2D1 | GPS | I2C | IDE | Keypad | LCD | LCD+ | MIDI | Motors | Multitasking | Netmedia | Networking | PCB | PID | PlaySound | PWM | Relays | RTC | Servo | ShiftOut | SitePlayer | SPI | Stack | Timer | USB

Ads

Discussion Groups

Discussion Groups | BasicX | Re: Mental block

Discussion forum for the BasicX family of microcontroller chips.

Re: Mental block - Neil Jepsen - Mar 5 17:33:00 2001

How do I do a bit shift eg bx0000_1000 => bx0001_0000.
Tony ? anyone?
neil





(You need to be a member of basicx -- send a blank email to basicx-subscribe@yahoogroups.com )


Re: Mental block - Tony Brenke - Mar 5 20:34:00 2001

times 2
will shift bits to the left

--- Neil Jepsen <> wrote:
> How do I do a bit shift eg bx0000_1000 => bx0001_0000.
> Tony ? anyone?
> neil >
>
>

=====
Tony Brenke
North Tacoma, WA

__________________________________________________





(You need to be a member of basicx -- send a blank email to basicx-subscribe@yahoogroups.com )

Re: Mental block - Neil Jepsen - Mar 5 21:06:00 2001

Further to mental block.
I'm trying(unsuccessfully I might add) to talk to a DS1302. In the good
book, under shiftin or shiftout, its says:

"Before using shiftin, the clock pin must first be set to the proper
level (either high or low)"

Does this mean that if i set the ck high befdore calling shiftout, a low
going edge will be used for the shifting the bits, and if i set a low ck
before calling shiftout, a high edge will be used for bit shifting ?
The BS2 had several modes available for the shiftout cmd, but these dont
seem to be possible with the BX24?

neil Tony Brenke wrote:

> times 2
> will shift bits to the left
>
> --- Neil Jepsen <> wrote:
> > How do I do a bit shift eg bx0000_1000 => bx0001_0000.
> > Tony ? anyone?
> > neil
> >
> >
> >
> >
> >
> >
> > =====
> Tony Brenke
> North Tacoma, WA
>
> __________________________________________________
>
> Yahoo! Groups Sponsor
[Choose 3 DVDs for $0.49 each!]
Click for Details > Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. [Non-text portions of this message have been removed]





(You need to be a member of basicx -- send a blank email to basicx-subscribe@yahoogroups.com )

Re: Mental block - Neil Jepsen - Mar 5 21:36:00 2001

In reply to my own question: I've just confirmed it with a scope...yes if
the ck is set high prior to calling shiftout, then the ck pulses are low
going during the command, and visa versa.
neil Neil Jepsen wrote:

> Further to mental block.
> I'm trying(unsuccessfully I might add) to talk to a DS1302. In the good
> book, under shiftin or shiftout, its says:
>
> "Before using shiftin, the clock pin must first be set to the proper
> level (either high or low)"
>
> Does this mean that if i set the ck high befdore calling shiftout, a low
> going edge will be used for the shifting the bits, and if i set a low ck
> before calling shiftout, a high edge will be used for bit shifting ?
> The BS2 had several modes available for the shiftout cmd, but these dont
> seem to be possible with the BX24?
>
> neil
>
> Tony Brenke wrote:
>
> > times 2
> > will shift bits to the left
> >
> > --- Neil Jepsen <> wrote:
> > > How do I do a bit shift eg bx0000_1000 => bx0001_0000.
> > > Tony ? anyone?
> > > neil
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> >
> >
> > =====
> > Tony Brenke
> > North Tacoma, WA
> >
> > __________________________________________________
> >
> > Yahoo! Groups Sponsor
> [Choose 3 DVDs for $0.49 each!]
> Click for Details
>
> >
> > Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
>
> [Non-text portions of this message have been removed]
>
> Yahoo! Groups Sponsor
> [Choose 3 DVDs for $0.49 each!]
> Click for Details > Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.




(You need to be a member of basicx -- send a blank email to basicx-subscribe@yahoogroups.com )

Re: Mental block - Tony Brenke - Mar 5 22:13:00 2001

I am not sure about that question.
your explanation sounds right to me.
give it a try on both ways.

my programming is on the bx-01.
I have never used the shif-in shift-out. --- Neil Jepsen <> wrote:
> Further to mental block.
> I'm trying(unsuccessfully I might add) to talk to a DS1302. In the
> good
> book, under shiftin or shiftout, its says:
>
> "Before using shiftin, the clock pin must first be set to the proper
> level (either high or low)"
>
> Does this mean that if i set the ck high befdore calling shiftout, a
> low
> going edge will be used for the shifting the bits, and if i set a low
> ck
> before calling shiftout, a high edge will be used for bit shifting ?
> The BS2 had several modes available for the shiftout cmd, but these
> dont
> seem to be possible with the BX24?
>
> neil > Tony Brenke wrote:
>
> > times 2
> > will shift bits to the left
> >
> > --- Neil Jepsen <> wrote:
> > > How do I do a bit shift eg bx0000_1000 => bx0001_0000.
> > > Tony ? anyone?
> > > neil
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> >
> >
> > =====
> > Tony Brenke
> > North Tacoma, WA
> >
> > __________________________________________________
> >
> > Yahoo! Groups Sponsor
> [Choose 3 DVDs for $0.49 each!]
> Click for Details
>
> >
> >

=====
Tony Brenke
North Tacoma, WA

__________________________________________________





(You need to be a member of basicx -- send a blank email to basicx-subscribe@yahoogroups.com )