Omron D6F-PH User Manual page 17

Mems differential pressure sensor
Table of Contents

Advertisement

Bit unit CRC-8 calculation method
1. The data bit sequence will be aligned in a line.
2. The polynomial bit string will be aligned under the line of the data bit sequence.
3. If the data bit above the leftmost the polynomial bit sequence is 0, the polynomial bit
sequence is shifted one bit to the right. If the data bit above the leftmost polynomial bit
sequence is 1, the data bit and the polynomial bit are calculated by XOR. Then the
polynomial bit sequence are shifted one bit to the right.
4. 1-3steps are repeated until the polynomial bit sequence reaches the right end of the data bit
sequence.
The following example shows how to calculate the CRC byte based on XOR calculation.
1st Byte of data
2nd Byte of data
Polynomial (x^8+ x^5+ x^4+ 1) 131h
CRC-byte checksum
1st Byte of data
0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0
Polynomial bit sequence
P l
i l bit
D6F-PH MEMS Differential pressure Sensor User's Manual (A288)
hex
04h
02h
225h
2nd Byte of data
1 0 0 1 1 0 0 0 1
0 0 0 1 1 0 0 0 1 1 0 0
1 0 0 1 1 0 0 0 1
0 1 0 1 1 1 1 0 1 0
1 0 0 1 1 0 0 0 1
0 0 1 0 0 1 0 1 1 0 0
1 0 0 1 1 0 0 0 1
0 0 0 0 1 1 1 0 1 0 0 0 0
Fig.9 XOR operation example of CRC-8
bin
00000100
00000010
100110001
11100001
1 0 0 1 1 0 0 0 1
0 1 1 1 0 0 0 0 1
Data bit sequence
16

Advertisement

Table of Contents
loading

Table of Contents