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 >>
| Similar Threads | Posted | | Proofs of Reinforcement Learning Algorithms | January 4, 2006, 9:56 pm |
| 3D Scan Repository for Benchmarking Robotic Algorithms | February 8, 2008, 9:01 am |
| CGAL 3.3 Released, Computational Geometry Algorithms Library | June 2, 2007, 9:15 am |
| CGAL 3.3.1 Released, Computational Geometry Algorithms Library | September 5, 2007, 5:19 am |
| Robot Planning algorithms - free on-line book | November 12, 2008, 1:34 am |
| CGAL 3.5 Released, Computational Geometry Algorithms Library | October 5, 2009, 10:05 am |
| ir detection | July 10, 2005, 2:59 am |
| Re: Simultaneous IR Object Detection and IR Control? | February 26, 2006, 10:05 am |
| Re: Simultaneous IR Object Detection and IR Control? | February 26, 2006, 2:53 pm |
| Re: Simultaneous IR Object Detection and IR Control? | March 6, 2006, 6:34 pm |
|
|
> 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