113
1.
The a 16-bit registers into hexadecimal FFFF. (1) all will be referred to as the CRC register.
2.
The first 8 bytes of a message with a 16-bit CRC register low byte exclusive or, result in CRC register.
3.
The CRC register moves to the right one to the LSB (direction), the MSB filling zero. Extraction and detection of LSB.
4. (
(if the LSB of 0) : repeat step 3 (another shift).
(if the LSB to 1) : the CRC register exclusive or polynomial value 0 xa001 (1010, 0000, 0000, 0001).
5.
Repeat steps 3 and 4 until complete displacement of
8 times. As after this action, will complete the full operation of eight
bytes.
6.
For the next byte of message repeat steps 2 to 5, this operation until all message being processed.
7. CRC
CRC register the final content for CRC value.
8.
When the CRC value is placed on a message, high and low byte must exchange.
Byte is sent first, and then the high byte
For example: from the site of 01 H drive reads two words (word), reading the starting address of
0200 H address. The last of the data from the Address to calculate the CRC register at the end of the content is
0704 H, is the instruction format as shown below, note that the front of the 04 H in H.
Address
01H
CMD
03H
Data source address
high bit
02H
low
00H
Data length (in terms of word)
00H
02H
CRC
low bit
04H
CRC
high bit
07H
CRC generation paradigm:
bit