> Here you go. Sorry for the pseudo-"C", but you can covert > the algorithm easily to ASM: > ......... > Good luck, Bob, thanks. "luck" = "quite some time in a quiet room" Olin, I'll be looking at your system in the New Year. This is the last major project for the year and coding will be substantially done by Xmas, so I'll finish it off as I started. The maths routines I have already should suffice. As you said, 10-bit A2D, in this application anyway, does not require extreme precision. Most users will not be expecting 3 decimal place accuracy from a general purpose sensor, eg if the system reacts at 12.01V instead of 12V, BFD -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist