Discussion forum for the BasicX family of microcontroller chips.
|
How do I do a bit shift eg bx0000_1000 => bx0001_0000. Tony ? anyone? neil |
|
|
|
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 __________________________________________________ |
|
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] |
|
|
|
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. |
|
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 __________________________________________________ |