Brent Brown wrote: > The one thing that pushed me over the top was adding CRC > checking for my 1 wire temperature sensors - needed it > because I'm getting the occasional erroneous result. > This adds about 300 program words. Huh!? CRC is a really simple algorithm that shouldn't take more than a few instructions. For each bit you shift it in one end. If the bit that shifted out the other end is 0 you're done. If it is 1, you XOR the accumulated checksum with a fixed value. That's it. There are some variations about which end to shift into, whether you do the XOR on a 0 or 1, what the accumulator is initialized to, etc. However, none of these should change the basic algorithm or the number of instructions required. I just checked some recent code I wrote that computed a 16 bit CRC on bits in a buffer. It takes 29 instructions, which includes the initialization, checking for end condition, advancing to the next bit, etc. The actual CRC update calculation is only 8 instructions once the bit is in STATUS,C. ****************************************************************** Embed Inc, Littleton Massachusetts, (978) 742-9014. #1 PIC consultant in 2004 program year. http://www.embedinc.com/products -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist