16.11.3 Crc Operation Circuit Operation; Figure 16.46 Lsb-First Data Transmission; Figure 16.47 Msb-First Data Transmission - Renesas H8S/2158 User Manual

16-bit single-chip microcomputer h8s family/h8s/2100 series
Table of Contents

Advertisement

16.11.3 CRC Operation Circuit Operation

The CRC operation circuit generates a CRC code for LSB-first/MSB-first communications. An
example in which a CRC code for hexadecimal data H'F0 is generated using the X
1 polynomial with the G1 and G0 bits in CRCCR set to B'11 is shown below.
1. Write H'83 to CRCCR
7
CRCCR
1
0
7
0
0
CRCDORH
CRCDORL
0
0
3. Read from CRCDOR
CRC code = H'F78F
4. Serial transmission (LSB first)
7
1
1
1
1
0
F
1. Write H'87 to CRCCR
7
CRCCR
1
0
7
0
0
CRCDORH
CRCDORL
0
0
3. Read from CRCDOR
CRC code = H'EF1F
4. Serial transmission (MSB first)
7
Output
1
Section 16 Serial Communication Interface (SCI, IrDA, and CRC)
0
0
0
0
0
1
1
CRCDOR clearing
0
0
0
0
0
0
0
0
0
0
0
0
0
CRC code
0
7
1
1
1
1
0
0
7
8

Figure 16.46 LSB-First Data Transmission

0
0
0
0
1
1
1
CRCDOR clearing
0
0
0
0
0
0
0
0
0
0
0
0
0
Data
0
0
0
1
1
1
0
0
F
0

Figure 16.47 MSB-First Data Transmission

2. Write H'F0 to CRCDIR
7
CRCDIR
1
7
1
CRCDORH
CRCDORL
1
0
7
0
1
1
1
1
1
1
F
2. Write H'F0 to CRCDIR
7
CRCDIR
1
7
1
CRCDORH
CRCDORL
0
7
1
1
1
0
1
1
E
F
Rev. 3.00 Jan 25, 2006 page 469 of 872
16
+ X
0
1
1
1
0
0
0
0
CRC code generation
0
1
1
1
0
1
1
1
0
0
0
1
1
1
1
Data
0
1
1
0
0
0
0
F
0
1
1
1
0
0
0
CRC code generation
1
1
0
1
1
1
0
0
1
1
1
1
CRC code
0
7
1
0
0
0
1
1
1
1
REJ09B0286-0300
12
5
+ X
+
Output
0
0
0
1
1
0
1
1
1
F

Advertisement

Table of Contents
loading

Table of Contents