| ??? 10/01/02 11:03 Read: times |
#29937 - Bit Ordering when clocking in data |
I am reading an SPI port via bit banging, the device I am reading allows partial register reads. I have no problem reading n Bits of information into a byte, the problem I have is how they are aligned in the byte(s).
For instance: If I read in 10 bits of data (for arguments sake lets they are all 1's) and I read in MSBit first then I would get 2 bytes like this: 11111111 00000011 As I bit shift from right to left, is this the normal way to represent the 10Bits of data? or should it be: 11111111 11000000 this also raises the question as to how I present the data for clocking out, (I have presented it left aligned as in the second example) Any ideas appreciated Regards Marshall Brown |
| Topic | Author | Date |
| Bit Ordering when clocking in data | 01/01/70 00:00 | |
RE: Bit Ordering when clocking in data | 01/01/70 00:00 |



