Crc Operation - Holtek HT67F2350 Manual

Advanced a/d flash mcu with lcd & eeprom
Table of Contents

Advertisement

HT67F2350/HT67F2360
HT67F2370/HT67F2390
Advanced A/D Flash MCU with LCD & EEPROM
CRCDH Register
Bit
7
Name
D7
R/W
R/W
POR
0
Bit 7~0
D7~D0: 16-bit CRC checksum high byte data register
CRCCR Register
Bit
7
Name
R/W
POR
Bit 7~1
Unimplemented, read as "0"
Bit 0
POLY: 16-bit CRC generating polynomial selection
0: CRC-CCITT: X
1: CRC-16: X

CRC Operation

The CRC generator provides the 16-bit CRC result calculation based on the CRC16 and CCITT CRC16
polynomials. In this CRC generator, there are only these two polynomials available for the numeric
values calculation. It can not support the 16-bit CRC calculations based on any other polynomials.
The following two expressions can be used for the CRC generating polynomial which is determined
using the POLY bit in the CRC control register, CRCCR. The CRC calculation result is called as the
CRC checksum, CRCSUM, and stored in the CRC checksum register pair, CRCDH and CRCDL.
• CRC-CCITT: X
• CRC-16: X
+ X
16
CRC Computation
Each write operation to the CRCIN register creates a combination of the previous CRC value stored in
the CRCDH and CRCDL registers and the new data input. The CRC unit calculates the CRC data register
value is based on byte by byte. It will take one MCU instruction cycle to calculate the CRC checksum.
• CRC Calculation Procedures:
• Clear the checksum register pair, CRCDH and CRCDL.
• Execute an "Exclusive OR" operation with the 8-bit input data byte and the 16-bit CRCSUM
high byte. The result is called the temporary CRCSUM.
• Shift the temporary CRCSUM value left by one bit and move a "0" into the LSB.
• Check the shifted temporary CRCSUM value after procedure 3.
If the MSB is 0, then this shifted temporary CRCSUM will be considered as a new temporary
CRCSUM.
Otherwise, execute an "Exclusive OR" operation with the shifted temporary CRCSUM in
procedure 3 and a data "8005H". Then the operation result will be regarded as the new temporary
CRCSUM.
Note that the data to be perform an "Exclusive OR" operation is "8005H" for the CRC-16
polynomial while for the CRC-CCITT polynomial the data is "1021H".
• Repeat the procedure 3 ~ procedure 4 until all bits of the input data byte are completely
calculated.
• Repeat the procedure 2~ procedure 5 until all of the input data bytes are completely calculated.
Then, the latest calculated result is the final CRC checksum, CRCSUM.
Rev. 1.60
6
5
4
D6
D5
D4
R/W
R/W
R/W
0
0
0
6
5
4
+ X
+ X
+ 1
16
12
5
+ X
+ X
+ 1
16
15
2
+ X
+ X
+ 1.
16
12
5
+ X
+ 1.
15
2
243
3
2
1
D3
D2
D1
R/W
R/W
R/W
0
0
0
3
2
1
May 16, 2019
0
D0
R/W
0
0
POLY
R/W
0

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the HT67F2350 and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

This manual is also suitable for:

Ht67f2360Ht67f2370Ht67f2390

Table of Contents