Computer Interfacing
Discussions about interfacing and electronics
 

CRC calculation page rewritten

Page should have faster response now


 

       Computer Interfacing Forum Index -> Error detection and correction
Author Message
lammert
Site Admin



Joined: 13 Mar 2007
Posts: 145
Location: Netherlands and Kazakhstan

Dec 01, 2009 12:09 am

I have rewritten the CRC calculation page at www.lammertbies.nl/comm/info/crc-calculation.html. Response should be faster because only the table with CRC values is reloaded with each calculation. If you encounter any problems, please post it in this thread and I will try to solve it.
thedoc
New User



Joined: 19 Feb 2010
Posts: 3


Feb 19, 2010 11:57 pm

I have made great use of your code, many thanks.

I now have a problem, a fixed length block of binary data which has the CRC32 value inside instead of at the end. I have the parameters, the block checks out correctly, but if I make a change the CRC correction must be applied at a fixed location inside the block.

The block is 913 bytes in length, and the 4 byte crc is located at bytes 81 to 84.

Many thanks
mrevalla
New User



Joined: 16 Feb 2010
Posts: 3


Feb 20, 2010 3:53 pm

Hi,

In this calculation, I entered string "01 06 1C 2C 00 01" and choose input type "Hex". The output for CRC XModem is 0x3F36 (hex).

But I could not get the algorithm for this. Can you suggest me how its works. I tried with different alogorithms. But I could not get the result.

Thanks in advance.
Guest
Guest







Mar 23, 2010 5:20 pm

Hello,

I used your online crc calculator and it exactly generates the CRC-CCITT (XModem)..eg - I'm getting 7B90 as crc for hex 004D00 . I need to know how this is generated.

Please someone help me.
Marko
Guest







May 08, 2010 9:45 pm

Could some one help me
i'm tring to compile CRC-CCITT (0x0000) for pic16f876
idont have enough ram to make the table
how can i genrate my code
ie 28 00 fe result is 21b6 correct
we7u
Guest







Aug 29, 2010 7:11 am

I plug in values to your modbus calculator and it gives values different from another online site and from algorithms I've tried locally. Can you check the modbus algorithm for proper operation against known standards? 16 bits, polynomial 0xa001, initial 0xffff should give 0x771c for "Hello World" but yours gives 0xdaed.

The CRC-16 and CRC-CCITT numbers I get on your site match up fine for me. Thanks for making the site available!
we7u
Guest







Aug 30, 2010 2:05 am

Replying to my own post... Looks like _you_ got it right and some of the others got it wrong. Sorry about that!

Mostly it has to do with use of signed variables in languages other than C, where you need to AND with 0x07FFF right after the right shift (or divide by 2) operation in order to knock off that bit 15. With C you don't have to do that 'cuz you can use unsigned variables so that two's complement arithmetic doesn't get in your way.
IPS
Guest







Mar 21, 2011 6:57 pm

Hi,
Is there anyway to get the calculator to expand the number of hex input digits? I have an algorithm in VHDL to calculate a CRC32 using byte inputs (hex, not string inputs). I also wrote an excel vba macro to read in hex data and calculate the CRC32. I have successfully verified my excel algoithm against your online calculator up to the input character limitation on your calculator. Now I need an independent source to verify my two algorithms. My largest file is 16384 bytes. Do you know of a calculator somewhere that can process a large number of hex data in CRC32? Thanks
Guest








Apr 23, 2012 1:21 pm

Pleas help me
I want to illustrate a Hamming coding in two dimension array

       Computer Interfacing Forum Index -> Error detection and correction
Page 1 of 1



Running on php BB © 2001, 2009 php BB Group
   Lammert Bies     Interfacing     Sitemap     Forum