Call me back | My basket | Checkout | Add to email list

     You are here: Website » Knowledge base

« back to website
  1. Ordered list

CANInterface / ByteOrdering

Byte Ordering

There are six options available for the ordering of the bytes. These different methods will be demonstrated with an example of a 12 bit channel in a 32 bit (4 byte) message.

Bit ordering within the message

There are two methods of bit numbering in common usage, sequential and sawtooth. For a two byte method, saw tooth numbering would be as follows:

Byte 1 Byte 2
7 6 5 4 3 2 1 0 15 14 13 12 11 10 9 8
 
Sequential numbering would be:
Byte 1 Byte 2
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15


Intel Standard:

7 6 5 4 3 2 1 0  
                0
<... .... .... lsb         1
msb .... .... .... .... .... .... .... 2
                3

Start position of the signal (lsb, sawtooth): 12


Intel Sequential:

0 1 2 3 4 5 6 7  
                0
<... .... .... lsb         1
msb .... .... .... .... .... .... .... 2
                3

Start position of the signal (lsb, sequential): 11


Motorola forward LSB:

7 6 5 4 3 2 1 0  
                0
        msb .... .... .... 1
<... .... .... .... .... .... .... lsb 2
                3

Start position of the signal (lsb, sawtooth): 16


Motorola forward MSB:

7 6 5 4 3 2 1 0  
                0
        msb .... .... .... 1
<... .... .... .... .... .... .... lsb 2
                3

Start position of the signal (msb, sawtooth): 11


Motorola sequential:

0 1 2 3 4 5 6 7  
                0
        msb .... .... .... 1
<... .... .... .... .... .... .... lsb 2
                3

Start position of the signal (lsb, Sequential): 12


Motorola backward:

7 6 5 4 3 2 1 0  
                0
        msb .... .... .... 1
<... .... .... .... .... .... .... lsb 2
                3

Start position of the signal specified from the end of the message (msb, sawtooth): 8

Page last modified on May 13, 2011, at 08:59 AM