On Wed, May 5, 2010 at 12:53 AM, Philippe Habib <phabib@well.com> wrote: > > > I am using 0 as the initial value. > That will miss inserted leading zeros. Using 0xFFFF will not have that problem. Also if you store the ones compliment of the CRC, low byte first, at the end of your data, when you CRC that as part of your data you will end up with a "Magic Number", that will always be the same if the CRC is good. 0xF0B8 is common for 0x1021 polynomial. It could also be 0x1D0F in reverse bit order. Take a look at the CRC section in http://www.boost.org for a good write up on CRCs. [Non-text portions of this message have been removed]
Message
Re: [AVR-Chat] CRC using IAR compiler
2010-05-06 by Bob Paddock