> A PIC is connected to several analogue sensors. These sensors > have FSDs of 5V or 12V scaled down to 5V. A user inputs an > ASCII string so that the PIC will alert them when the sensor > meets the requirements of the string What's your user entry method like? 12-key pad? PC keyboard? IIRC, in a later message you say "no PC involved"... If it's a stand alone device, and your user punches in on a keypad, why not remove the decimal? Last night I deposited a $30.00 check in an ATM. I punched in "3", the machine displayed "$0.03", then I followed with three zeroes, which offset the "3" to the proper value. The machine just slid numbers to the left as I put in new digits. It displayed the decimal point, but I didn't put it in, and for all I know, the machine ignored it in all of its math. Of course, this only works if you control the entry of the ASCII data. I was also thinking that it might help if you can "re-scale" the inputs, such that a 4.092V reference could be used. That'd make it a little easier to compare voltages in assembly, by going from ASCII->BCD->binary. ASCII->BCD is easy, just a matter of the proper offset value, and BCD->binary (and back) has well-established methodologies. I suppose you could also try running your PIC at 5.120V, and then not need to rescale the inputs. I may be missing the problem all together, but I've already had a long day. Mike H. -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist