CRC

General discussion on mikroC.
Post Reply
Author
Message
HyperUniverse
Posts: 282
Joined: 17 Jun 2009 10:42

CRC

#1 Post by HyperUniverse » 24 Nov 2009 11:37

Hi,

Can anybody explain me how to implement a CRC in my project?
Basically I need to Tx a string, and then I need to Rx it.

I tried without a CRC and is not working.
Now, please do not give me a lot of theory, how it suppose to work.
If anybody is willing to help me, then give me an example, please.
(I learn better from analising a working example, rather than reading the theory).

Lets say I have this string to send:
Preamble: 0x55
Data: 0xF10010650101108E42E9000800C4000000
End: 0xAA

Please give me an example of how to do a CRC on this string on the Tx side, and then how to manipulate it after I Rx it.

Preamble and End will always be the same, of course.
Data will always be different (same length).

Thank you.

Bigpit
Posts: 11
Joined: 25 Nov 2009 17:25

#2 Post by Bigpit » 25 Nov 2009 17:27

Hi,

Before you implement the CRC procedure, maybe you should try to make your Tx-Rx connection to work; then add the CRC result to the data you‘d like to send. :wink:

About the CRC calculation itself, you can find what you’re looking for on this site : http://www.lammertbies.nl/comm/info/crc ... ation.html

Regards
Bigpit

kang99
Posts: 46
Joined: 25 Mar 2011 15:52

Re: CRC

#3 Post by kang99 » 12 Nov 2011 14:44

Hi, any library for calculate ?

bye

User avatar
filip
mikroElektronika team
Posts: 11874
Joined: 25 Jan 2008 09:56

Re: CRC

#4 Post by filip » 14 Nov 2011 10:36

Hi,

Currently, there is no CRC library in the compiler.

Regards,
Filip.

sasa72
Posts: 89
Joined: 21 Apr 2011 05:21

Re: CRC

#5 Post by sasa72 » 18 Nov 2011 00:31

kang99,

Actually, you do not need a library at all. All CRC functions are trivial to make.

Post Reply

Return to “mikroC General”