User`s manual

63
Example of analysis for packet received
Data received (hexadecimal)
10H 02h
00h 13h 00h 00h 31h 32h 33h 34h 35h 36h 37h 38h 0Dh C4h 18h 10h 03h
(1) Compare data lengths.
Data length received in packet: 0013h = 19 bytes
Data received in packet: 19 bytes
(2) Compare CRCs.
1) Initialize CRC to 0.
2) Retrieve the first data byte (00h).
3) Shift the current CRC value one bit to the left. If the shift produces overflow, XOR the result with 1021h.
4) Shift the data byte one bit to the left. If the shift produces overflow, XOR the current CRC value with 0001h.
5) Repeat steps 3) and 4) a total of 8 times.
6) Retrieve the second data byte (13h).
7) Repeat steps 3) and 4) a total of 8 times.
8) Repeat this calculation through to the final byte.
9) Finally repeat the calculation for the two bytes (C4h 18h) in the CRC storage area, but reverse them first
because the 16-bit CRC is stored in little-endian order.
Data CRC
-- 0000h
00h 0000h
13h 1300h
00h 0013h
00h 221Ah
31h 8EF9h
32h 58C0h
33h F554h
34h 2054h
35h 2181h
36h A3A0h
37h 92A9h
38h 0059h
0Dh C244h
18h 1CE2h
C4h 0000h
(3) A result of 0000h indicates a successful transfer; a nonzero one, an error.
Transfer data Spare
Number of
data bytes
CRC Header Terminator
Container
numbe
r