Scott Dattalo wrote: > > You'll need to be pretty tricky to do the CRC in realtime along > > with banging the bus at 4 (or 8) MHz. > > If you tell me the polynomial and provide a few examples of CRC'd > data, then I'll take a whack at an efficient implementation. An > 8-bit polynomial should take no more than about 20 instruction > cycles. If there's symmetry that can be exploited, then it may take > fewer. ... And if you're bit-banging a serial interface so you already have access to your data one bit at a time, you can do it in 4 cycles per bit (RLF CRC / MOVLW poly / SKPNC / XORWF CRC) -- or maybe 3 cycles per bit if you can avoid having to reload W for every bit. It's slower than doing it a whole byte at a time, but it takes less code space and might make the timing a lot easier. -Andrew === Andrew Warren - fastfwd@ix.netcom.com -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist