Endianness bit visualiser
A small CAN Bus signal-layout widget copied from my MicroCAN web app, useful for checking DBC-style start bit, bit length and endianness behaviour.
This is a standalone version of the bit endianness visualiser from my MicroCAN-FD web app that is currently under construction.
I thought this widget was so useful, I decided to put it here before releasing the full-blown web app that I have planned. Defining CAN signals can be challenging because DBC-style bit numbering is easy to get wrong, especially when switching between Intel/Little Endian and Motorola/Big Endian signals. The widget below has the important controls that matter here: start bit, bit length, endianness and bus type (to control overall frame size).
You can play with the fields and see how the bits move and span across the bytes depending on endianness and start bit. Optionally, you can enter a value to see how it will appear as hex bytes in the CAN frame.
Endianness bit visualiser
00 00 00 00 00 00 00 00 Remember:
DBC uses absolute bit numbering. Byte 0 contains bits 0-7, Byte 1 contains bits 8-15, and so on. Bytes are shown left to right, starting from Byte 0. Within each byte, bit 7 is shown on the left and bit 0 on the right, because that is usually how CAN payload bytes are written visually.
Intel/Little Endian: Start bit is LSB, bits walk upward: For Intel/Little Endian signals, the start bit is the least significant bit of the signal. A 16-bit signal starting at bit 0 occupies bits 0 through 15, and a raw value such as 0x1234 appears in the frame as 34 12.
Motorola/Big Endian: Start bit is MSB, bits walk downward with wrap: For Motorola/Big Endian signals, the start bit is the most significant bit of the signal. The walk moves downward inside the current byte, then wraps to bit 7 of the next byte. A 16-bit signal starting at bit 7 occupies Byte 0 and Byte 1 in the familiar big-endian order, so 0x1234 appears as 12 34.