Searching \ for ' Looking for an efficient CRC' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/method/errors.htm?key=crc
Search entire site for: 'Looking for an efficient CRC'.

No exact or substring matches. trying for part
PICList Thread
'[PICLIST] Looking for an efficient CRC'
2002\05\12@020549 by Tal Dayan

flavicon
face
Hello,

We need to implement a CRC like error detection for a proprietary protocol.
The sending unit need to be an extremely cheap chip that consumes very low
power so we plan to use something like 12C508 running at 50-100Khz, 3V.

Is there a good CRC or error detection mechanism that can be consume only
few instructions for each byte of data ?  Somebody mention to us that we can
speed up algorithms such as CRC16 using lookup tables but I don't think the
12c508 can hold tables of decent size.


In the prototype we use the simple algorithm below but have no clue how good
it is in detecting errors:


       byte checksum;
       byte data;

       ...

       checksum = rotateLeft(checksum) xor (data).


Any help will be greatly appreciated.

Tal

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2002\05\12@025929 by Ashley Roll

flavicon
face
Hi Tal,

> Is there a good CRC or error detection mechanism that can be
> consume only
> few instructions for each byte of data ?  Somebody mention to
> us that we can
> speed up algorithms such as CRC16 using lookup tables but I
> don't think the
> 12c508 can hold tables of decent size.

I was probably the one you were thinking of. I suggested that one could
implement a table based CRC16 using tables less then 256 items in a
discussion about a week ago.

For instance you could build a CRC16 that updates 4 bits per time using two
16 element tables. This is 32 instructions for data plus a few extra
instructions to do the jump into the table. This should easily fit on the
first code page in a 12C805 if you haven't got any other tables you should
be fine.

I've not actually tried to implement this technique yet, but it should work.
From a quick "Guess-timate" of the algorithm it will probably be somewhere
in the order of 50-70 instruction cycles per byte to update the CRC..

Is that going to be fast enough?

Maybe its time I actually tried to implement this..

Cheers,
Ash.

---
Ashley Roll
Digital Nemesis Pty Ltd
http://www.digitalnemesis.com
Mobile: +61 (0)417 705 718

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2002\05\15@020556 by Tal Dayan

flavicon
face
Hi Ashley,

I looked at your code and it looks great. I think this will work for us. We
can either CRC the entire message before we start sending it. This will
delay the message a little bit but I think it will be OK.

Great contribution to the list!

Tal

> {Original Message removed}

More... (looser matching)
- Last day of these posts
- In 2002 , 2003 only
- Today
- New search...