----- Original Message ----- From: "Olin Lathrop" To: "Microcontroller discussion list - Public." Sent: Wednesday, November 30, 2005 8:30 AM Subject: Re: [PIC] Convert ASCII string to variable for comparison > Jinx wrote: >> What I really want to do is make a universal system so that any >> ASCII string can be compared to any sensor voltage, so that the >> user receives not only the alert but also a message in appropriate >> terms and units > > Since you're dealing with verbose ASCII strings over a serial port, I'll > assume that compute cycles aren't critical. If so, this sounds like a > natural application for floating point. I strongly disagree here. A 32-bit or even 24-bit integer should be more than enough precision to store a value scaled to two decimal places since 9999 (the maximum value) would be stored as 999900. Bob Ammerman -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist