How to implement CRC using C language

14,143

Try Reading this article(It Contains C Codes and Diagrams Which you need) :

http://www.barrgroup.com/Embedded-Systems/How-To/CRC-Calculation-C-Code

CRCs are among the best checksums available to detect and/or correct errors in communications transmissions. Unfortunately, the modulo-2 arithmetic used to compute CRCs doesn't map easily into software. This article shows how to implement an efficient CRC in C.

Share:
14,143
Arun Nr
Author by

Arun Nr

Updated on June 04, 2022

Comments

  • Arun Nr
    Arun Nr almost 2 years

    I am bit new to programming and i want to send a float data to eeprom from a controller and i want to implement crc for the error detection of the data when ever i tries to read or write. This is my intention.But i found many algorithms for implementing crc and its been quite confusing for me to follow which one. The compiler provides 4 bytes of space for all data and its function sends each byte one at a time.So i trust i would be required to do the crc of each 8bit data or can implement it as a whole. And i am using C language.

    In brief: i just need to do a 1.Crc implementation. 2.Common Data size =32 bits 3.Compiler function sends one byte at a time. 4.And how do we fix which algorithm to go for.

    Thank you very much