Maker Pro
Maker Pro

iButton CRC

B

Billy

Jan 1, 1970
0
Hi All
I'm working with iButtons using the CCS C Compiler, I was wondering if
anyone had written a C routine for the CRC checking? I've written my own but
it is terribly ineffieient with regards to code space.
Thanks
Billy
 
J

James Beck

Jan 1, 1970
0
Hi All
I'm working with iButtons using the CCS C Compiler, I was wondering if
anyone had written a C routine for the CRC checking? I've written my own but
it is terribly ineffieient with regards to code space.
Thanks
Billy
I have the 'C' code for several 8,16, and 32 bit CRC routines.
The main choice is between a lookup table driven which is fast, but
needs the space for the lookup table, or the 'ol XOR and shift that
takes more time but is space efficient.

The routines are NOT written using CCS's strange variable length changes
(i.e. 8 bit int, 16 bit long) but they are easily modified to match.
When I typed them in I didn't think to do the int8, int16, int32 thing,
DUH.
UNFORTUNATELY, you didn't provide a read email address, or I would have
sent them to you back channel.

Jim
 
Top