On Mon, 2006-08-28 at 21:00 +1200, Brent Brown wrote: >> You COULD switch to assembler, of course... > > COULD but WONT! :-) Hmm? > 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. 300 words is very excessive for a CRC routine. My one-wire CRC routines takes only 19 instructions and no table: http://www.dattalo.com/technical/software/pic/crc_8.asm Since you're religiously opposed to assembly, this C source will save your soul: http://www.dattalo.com/technical/software/pic/crc_8bit.c A good C-compiler should turn the crc_bits() function into about 19 instructions. Scott -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist