Hot Search : Source embeded web remote control p2p game More...
Location : Home Search - crc 16 visual c
Search - crc 16 visual c - List
CRC-16是检测数据在发送过程中发生错误的常用校验方法,本文通过从工程应用的角度,讲述如何实现CRC-16的程序开发,并给出了Visual Basic和Visual C++程序代码,给从事工业控制的人员在写通信程序的时候提供一些有价值的参考。-1、 Load a 16-bit register with FFFF hex. Call this the CRC register. 2、 Exclusive OR the first 8-bit byte of the message with the low-order byte of the 16-bit CRC, putting the result in the CRC register. 3、 Shift the CRC register one bit to the right (toward the LSB), zero-filling the MSB. Extract and Examine. 4、 If the LSB was 1: Exclusive OR the CRC register with polynomial value A001 hex. If the LSB was 0: Repeat step 3 (another shift). 5、 Repeat step 3 and 4 until 8 shifts have been performed. When this is done, a complete 8-bit byte will have been processed. 6、 Repeat step 2 through 5 for the next 8-bit byte of them message. 7、 The final content of the CRC register is the CRC value.
Date : 2026-01-21 Size : 1kb User : why
CodeBus is one of the largest source code repositories on the Internet!
Contact us :
1999-2046 CodeBus All Rights Reserved.