error detection algorithms

General Robotics Forum - All aspects of robots and their applications. 

Page 1 of 2       1 2 > last >> Bookmark this page:  YahooMyWeb Yahoo!  Google Google  Windows Live Favorites Windows Live  del.icio.us del.icio.us  digg digg  Add to Netscape Netscape
Subject Author Date
error detection algorithms belion@gmail.com 11-30-2005
If you were  Registered and logged in, you could reply and use other advanced thread options
Posted by belion@gmail.com on November 30, 2005, 5:49 am
Hi,

I am designing and developing a simple communication protocol to
communicate a PC with an ATMEL128 microcontroller (the MAVRIC-IIB
board) using the RS485. The last block of every message will be the
output code of an error detection algorithm, and I am deciding which
algorithm would perform the best.
At first, I implemented both CRC-CCITT and CRC-16, but I do not know if
these algorithms are too hard to calculate for the micro.
Which algorithms would you recommend, having in consideration
performance/computing requirements?

Thanks


Posted by Padu on November 30, 2005, 12:08 pm
> Hi,
> I am designing and developing a simple communication protocol to
> communicate a PC with an ATMEL128 microcontroller (the MAVRIC-IIB
> board) using the RS485. The last block of every message will be the
> output code of an error detection algorithm, and I am deciding which
> algorithm would perform the best.
> At first, I implemented both CRC-CCITT and CRC-16, but I do not know if
> these algorithms are too hard to calculate for the micro.
> Which algorithms would you recommend, having in consideration
> performance/computing requirements?
> Thanks

I'm doing the exact same thing, and here's an exerpt from the document I'm
writing (the project is my graduation thesis, so I HAVE TO write all this
stuff)


"Error detection will be accomplished by using a two bytes CRC code
contained in each data packet. The algorithm for CRC generation and
validation is the 8-bit Fletcher algorithm, used as a TCP standard (RFC
1145/1146).

The Fletcher algorithm is defined below for a given buffer buffer[N] with N
bytes to be checked. Each one of the CRC bytes should be an 8-bit unsigned
integer.

crc_a = 0, crc_b = 0

for i=0 to N-1

crc_a = crc_a + buffer[i]

crc_b = crc_b + crc_a



Cheers



Padu



Posted by Clifford Heath on November 30, 2005, 11:11 pm
Padu wrote:
> the project is my graduation thesis, so I HAVE TO write all this
> stuff)
> "... The algorithm for CRC generation and
> validation is the 8-bit Fletcher algorithm...

I hope someone teaches you what a CRC is before they let you
graduate. The Fletcher checksum is nice, but it's not a CRC.

Posted by Padu on December 1, 2005, 1:18 pm

"Clifford Heath"
>> the project is my graduation thesis, so I HAVE TO write all this stuff)
>> "... The algorithm for CRC generation and
>> validation is the 8-bit Fletcher algorithm...
> I hope someone teaches you what a CRC is before they let you
> graduate. The Fletcher checksum is nice, but it's not a CRC.

Although technically checksum is not CRC (yes, I know what CRC is), the term
CRC is often used in lieu of. Many authors use the term alternatedly. But
you right, I probably shouldn't repeat the same error.

Padu



Posted by D. Jay Newman on November 30, 2005, 11:24 pm
belion@gmail.com wrote:
> Hi,
>
> I am designing and developing a simple communication protocol to
> communicate a PC with an ATMEL128 microcontroller (the MAVRIC-IIB
> board) using the RS485. The last block of every message will be the
> output code of an error detection algorithm, and I am deciding which
> algorithm would perform the best.

Brian Dean has some code for MAVRIC-IIB for some communication
protocols.

http://wwww.bdmicro.com/code/

I use Mojobus in my book, but there is another one that has
a checksum.
--
D. Jay Newman

Page 1 of 2       1 2 > last >>

The site map in XML format XML site map
other useful resources:
Official Robosapien Website
Lego Mindstorms Website

Contact Us | Privacy Policy