Page 1 of 1

Bit numbering

PostPosted: Tue Feb 19, 2019 4:44 pm
by gtihk
I use Can Capture to read and analyse OE CAN messages.The Byte and Bit numbering seems to be different from what M1 uses. I am working on a BMW which uses Little Endian.
If I want to assign the left 2 bytes for a channel, what start bit should I use please?
These two bytes might be called Byte 7 and 6 in Little Endian.
Any help will be appreciated.

Re: Bit numbering

PostPosted: Tue Feb 19, 2019 8:17 pm
by rntechnologies
Hi Githk,
Your question is a little vague.
Firstly, the M1 is quite capable of handling either type of CAN messaging (RX and TX), just by setting the endianness flag in the CAN message.
Have a look at the below image to assist with Byte numbering within a CAN message:
Endianness.jpg
Endianness.jpg (33.39 KiB) Viewed 8765 times


Hopefully this helps understand how the numbering works.

Re: Bit numbering

PostPosted: Wed Feb 20, 2019 7:05 pm
by gtihk
I am a little confused.
I was given this by MoTec.
endian.png
endian.png (64.92 KiB) Viewed 8752 times

Re: Bit numbering

PostPosted: Thu Feb 21, 2019 1:33 pm
by rntechnologies
Hi githk,
These images show the exact same thing :)

Re: Bit numbering

PostPosted: Thu Feb 21, 2019 2:04 pm
by SDean
Hi Ryan,

They are different... :D

Re: Bit numbering

PostPosted: Thu Feb 21, 2019 6:34 pm
by rntechnologies
My apologies!
I didn't read that very well! :o

Re: Bit numbering

PostPosted: Fri Feb 22, 2019 1:31 pm
by gtihk
If I want to assign Byte7 and Byte 6 as a received channel,what Start bit should I use please? Would it be 0 or 7?

Re: Bit numbering

PostPosted: Sat Feb 23, 2019 2:41 am
by David Ferguson
You can try 0, but I think that byte6/7 whould start at bit 48 with length 16.

Re: Bit numbering

PostPosted: Sat Feb 23, 2019 2:39 pm
by gtihk
I think for big endian, Byte 6/7 should start with bit 48.
I was not sure about little endian. This was why I was asking.