MULTI GAUGE CONTROLLER COMMUNICATION
6.4.3.3 CRC CHECKSUM
The CRC checksum is a test of data correctness, and its length equals to 2 bytes (16 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 MG15 detects an error in the message, it ignores such frame (leaves without a response).
The CRC checksum is generated in the following steps:
1. Enter value 0xFFFF to 16-bit CRC register.
2. 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.
3. Shift the CRC register right by one bit.
4. If an overlow bit or lag equals to 1, execute the XOR operation of the CRC register with value
0xA001 and enter the result in the CRC register.
5. If an overlow bit or lag equals to 0, repeat step 3.
6. Repeat steps 3 and 4, until the overall number of shifts is 8.
7. 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.
8. Repeat steps 3 to 7 until all the message bytes will be XOR with the CRC register and shifted
8 times.
9. In the CRC register there are two bytes of the checksum, which are added to the message
where the most signiicant bit is added irst.
User manual rev. 03 Page 91