avr-libc-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avr-libc-dev] [RFC] xmodem-crc


From: Theodore A. Roth
Subject: [avr-libc-dev] [RFC] xmodem-crc
Date: Fri, 7 Nov 2003 18:53:44 -0800 (PST)

Hi,

I was in need of a crc function for an xmodem implementation and ended
up writing the attached. I'd like to add this to the lib as an addition
to Marek's crc16.h header (plus documentation, of course).

I spent way too much time reading the datasheet that Marek references in
the header and finally figured out what is going on. I have an
open-office spreadsheet for the shift register with feedback model if
anyone is interested (also has models for the crc16 and crc-ccitt shift
registers).

I'd also like to know if anyone can tighten up the function more. It's
25 single cycle insns to get the crc for a single byte and uses one more
register than Marek's 23 cycle crc16 function.

BTW: Another great reference for crc info is Jack Crenshaw's
"Implementing CRCs" article from the Jan 1992 issue of "Embedded Systems
Programming." My boss happened to have a copy of it and it things much
clearer.

Enjoy.

Ted Roth

Attachment: crc.c
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]