N700E INSTRUCTION MANUAL
9-6
16bit CRC generation
The step of CRC generation is as follows:
1. All of 16-bit register is 1.0xffff
2. The exclusive OR of 16-bit register and 8-bit register.
3. Shift right side 1bit 16-bit register
4. If the result of step 3 is 1, exclusive OR 16-bit register and 0xa001.
5. Execute 8 times step 3 and step 4.
6. Execute step 2
∼
6 until data completion.
7. Exchange the step 6 result of higher 8bit and lower 8bit.
Ex)The case of D01 output frequency reading.
Byte 1
Byte 2
Byte 3
Byte 4
Byte 5
Byte 6
Communication
Number
Command
Parameter
Parameter number
0x01
0x03
0x01
0x01
0x00
0x01
The sequence of addition Byte(01x01)
16-BIT REGISTER
MSB
Flag
(Exclusive OR)
1111
1111
1111
1111
01
0000
0001
1111
1111
1111
1110
Shift 1
0111
1111
1111
1111
Shift 2
0011
1111
1111
1111
1
Polynomial
1010
0000
0000
0001
1001
1111
1111
1110
Shift 3
0100
1111
1111
1111
Shift 4
0010
0111
1111
1111
1
Polynomial
1010
0000
0000
0001
1000
0111
1111
1110
Shift 5
0100
0011
1111
1111
Shift 6
0010
0001
1111
1111
1
Polynomial
1010
0000
0000
0001
1000
0001
1111
1110
Shift 7
0100
0000
1111
1111
Shift 8
0010
0000
0111
1111
1
Polynomial
1010
0000
0000
0001
1000
0000
0111
1110
Byte 1~6
CRC of operation results
0x01
0x03
0x01
0x01
0x00
0x01
0x807e
0x3364
0x30e1
0x8831
0xd449
0x36d4
Change upper and lower 8 bit of result 0x36d4 : 0xd436
Byte7 : Upper 8 bit of CRC = 0xd4
Byte8 : Lower 8 bit of CRC = 0x36