English
Language : 

M16C65 Datasheet, PDF (728/829 Pages) Renesas Technology Corp – RENESAS MCU M16C FAMILY / M16C/60
Under development
M16C/65 Group
Preliminary Specification
This is a preliminary specification and is subject to change.
29. CRC Calculator
CRC calculation and setting procedure to generate CRC, 80C4h
with CRC-16 (MSB first selected)
• CRC operation specification
CRC: remainder of a division,
the CRCIN register
generator polynomial
Generator polynomial: X16 + X15 +X2 + 1(1 1000 0000 0000 0101b)
• Setting procedures
(1) Write 0000h (initial value) to the CRCD register
b15
b0
CRCD register
0000h
(2) Write 80h to the CRCIN register
CRCIN register
b15
CRCD register
b7
b0
80h
8303h
After two cycles, "8303h" (CRC for 80h) is
stored into the CRCD register.
b0
(3) Write C4h to the CRCIN register
CRCIN register
b15
CRCD register
b7
b0
C4h
0292h
After two cycles, "0292h" (CRC for
80C4h) is stored into the CRCD register.
b0
• Details on CRC calculation
As shown in (2) above, add 1000 0000 0000 0000 0000 0000b, as 80h (1000 0000b) written in the CRCIN register plus
16 digits, to 0000 0000 0000 0000 0000 0000b, as 0000 0000 0000 0000b plus 8 digits as the default value of the
CRCD register. Perform the modulo-2 division on the result. The remainder, 1000 0011 0000 0011b (8303h) can be
read from the CRCD register.
When going on to (3) above, add 1100 0100 0000 0000 0000 0000b, as C4h (1100 0100b) written in the CRCIN register
plus 16 digits, to 1000 0011 0000 0011 0000 0000b, as 8303h (1000 0011 0000 0011b) plus 8 digits as a remainder of
(2) left in the CRCD register to perform the modulo-2 division.
The remainder, 0000 0010 1001 0010b (0292h) can be read from the CRCD register.
Figure 29.3 CRC Operation (CRC-16)
REJ09B0484-0030 Rev.0.30 Sep 09, 2008
Page 693 of 791