PDA

View Full Version : Shiftout "The bits that are shifted out are always the low order bits regardless...



enauman
- 21st April 2013, 21:10
In the PBP3 manual description of the shiftout command, it says "The bits shifted out are always the low order bits, regardless of the mode used, LSB or MSB". What does this mean?
If I do not use the /XX option for bits and therefore shift out 8 bits (default) selecting MSB first, are my bits shifted out MSB first? Or the lowest order bits shifted out forst (LSB)?

Darrel Taylor
- 22nd April 2013, 05:54
The bits are always shifted out according to the MODE (MSBFIRST or LSBFIRST).

What that statement is saying, is that when using the \Bits modifier ... only the low order bits are sent.
If you have 8-bits in a BYTE and use \5, only bits 0-4 are sent.
Those 5 bits can go out MSBFIRST or LSBFIRST according to the mode.

Some people would think that if using MSBFIRST ... bits 3-7 would be sent since they are the MSb's ... but that is not the case.

enauman
- 23rd April 2013, 16:34
Thanks. That makes perfect sense when phrased that way.