
MULTI GAUGE CONTROLLER
COMMUNICATION
. . .
CRC CHECKSUM
The CRC checksum is a test of data correctness, and its length equals to bytes ( bites). After con-
structing a message (data ield) the transmitting device calculates the CRC checksum and attaches
it to the end of the message. The slave device calculates the CRC checksum out of the received
message, and after that it check the correctness with the one received in the frame.
If the CRC checksum differs from the one sent in the frame, this means that a communication error
occurred.
If the MG detects an error in the message, it ignores such frame (leaves without a response).
The CRC checksum is generated in the following steps:
. Enter value xFFFF to -bit CRC register.
. Execute XOR operation of the irst byte of the message with the oldest byte (MSB) of the CRC
register. Save the result in the CRC register.
. Shift the CRC register right by one bit.
. If an over low bit or lag equals to , execute the XOR operation of the CRC register with value
xA
and enter the result in the CRC register.
. If an over low bit or lag equals to , repeat step .
. Repeat steps and , until the overall number of shifts is .
. Execute XOR operation of the next byte of the message with the oldest byte (MSB) of the CRC
register. Save the result in the CRC register.
. Repeat steps to until all the message bytes will be XOR with the CRC register and shifted
times.
. In the CRC register there are two bytes of the checksum, which are added to the message
where the most signi icant bit is added irst.
User manual rev.
Page