CRC16 check method

The check principle of CRC16:

1. First set the CRC register to FFFF;

2. XOR the first 8-bit data (the upper eight bits with 0) and the CRC register, and store the result in the CRC register.

3. If the LSB is 0 at this time, shift to the right by one. If the LSB bit is 1 at this time, after shifting one bit to the right, it must be XORed with A001. By analogy, by judging whether the LSB bit is 1, it is judged whether it is XORed with A001, until it is shifted to the right eight times, and all eight bits of data are processed.

4 Repeat the third step until the data is processed. The content of the final CRC register is the CRC value.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324801845&siteId=291194637