R01UH0092EJ0110 Rev.1.10
Page 655 of 807
Jul 31, 2012
M16C/64C Group
29. CRC Calculator
Figure 29.2
CRC Calculation When Using CRC-CCITT
Figure 29.3
CRC Calculation When Using CRC-16
0000h
When using CRC-CCITT with LSB first:
Generator polynomial: X
16
+ X
12
+ X
5
+ 1 (1 0001 0000 0010 0001b)
CRCD register
(1) Write 0000h (initial value) to the CRCD register.
01h
CRCIN register
(2) Write 01h to the CRCIN register.
After two cycles, the result is stored
in the CRCD register.
(3) Write 23h to the CRCIN register.
CRCD register
CRCIN register
After two cycles, the result is stored
in the CRCD register.
CRCD register
1189h
23h
0A41h
b15
b0
b0
b0
b0
b0
b15
b15
b7
b7
Setting procedures
0000h
When using CRC-16 with MSB first
Generator polynomial: X
16
+ X
15
+X
2
+ 1 (1 1000 0000 0000 0101b)
CRCD register
(1) Write 0000h (initial value) to the CRCD register.
80h
CRCIN register
(2) Write 80h to the CRCIN register.
After two cycles, the result is stored
in the CRCD register.
(3) Write C4h to the CRCIN register.
CRCD register
CRCIN register
After two cycles, the result is stored
in the CRCD register.
CRCD register
8303h
C4h
0292h
b15
b0
b0
b0
b0
b0
b15
b15
b7
b7
Setting procedures
Содержание M16C Series
Страница 846: ...M16C 64C Group R01UH0092EJ0110...