CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

checksu7ms

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
MAUREEN
Guest







checksu7ms
PostPosted: Thu Sep 02, 2004 7:25 am     Reply with quote

How do I generate a checksum (16 or 32 bits). What's the
difference between checksum & crc?
StuH_CC



Joined: 07 May 2004
Posts: 16
Location: Shropshire, UK

View user's profile Send private message

PostPosted: Thu Sep 02, 2004 9:11 am     Reply with quote

CCS have provided a driver to generate 8,16 and 32 bit CRCs - it's in the "Drivers" directory of your compiler installation, called CRC.C. There's also an example called EX_CRC.C in the "Examples" directory. Hope this helps.

Stuart.
dyeatman



Joined: 06 Sep 2003
Posts: 1933
Location: Norman, OK

View user's profile Send private message

CRC vs Checksum
PostPosted: Thu Sep 02, 2004 9:24 am     Reply with quote

A Cyclic Redundancy Check (CRC) is a mathematical algorithm to determine if an error exists. A checksum is exactly that, just a sum of the data being transmitted.

An 8 bit checksum is where the individual bytes are simply added together modulo 256.

Hope this helps!
SherpaDoug



Joined: 07 Sep 2003
Posts: 1640
Location: Cape Cod Mass USA

View user's profile Send private message

PostPosted: Thu Sep 02, 2004 2:44 pm     Reply with quote

A checksum is very easy to impliment and fast to execute but may miss more errors than a CRC. Longer checksums or CRCs catch more errors than shorter ones but take more resources.
_________________
The search for better is endless. Instead simply find very good and get the job done.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group