Aaron Hickman wrote: > What I am looking for is a method of converting a 16 bit ADC value > into an appropriate voltage value (ie. 20 V * (ADC value/65535). I > feel certain that I need to use floating point methods, but have > little experience in using them. Can anyone help? Aaron: You neither need nor want floating-point math for this. As I recall from your previous message, you want to send an ASCII reprsentation of the voltage (in the range [-10 to +10] to a display. Is that correct? And if so, how many digits do you want to display? If you just want to display one digit to the right of the decimal point, it's real easy: 1. Find the absolute value of your 16-bit number: If the hi-bit of the number is set, simply clear that bit; if the hi-bit is clear, subtract the 16-bit number from 0x7FFF. This will leave you with a number in the range [0-32767]. Remember whether your original number was positive (hi-bit set) or negative (hi-bit clear). To convert from [0-32767] to [0-10], you COULD divide by 3276.7 (a floating-point number), which would almost certainly give you a non-integer result. We don't need a lot of precision, though, so we could just divide by 3277; it's close enough for our purposes. However, that would still give us a non-integer result, and we don't want that. So... We'll do an integer divide by 328, which will give us an integer in the range [0-100] (or [0-99], if we don't round our result to the nearest integer), and we'll just place the decimal point between the two least-significant digits of that result to get a FINAL result in the range [0.0 - 10.0] (or [0.0 - 9.9]). Make sense? Ok... We'll just make one more optimization: Instead of dividing by 328 (which is inconvenient, since it's too large to fit in 8 bits), we'll divide our dividend by 2 (so it'll be in the range [0-16383] instead of [0-32767]), then we'll divide it by 164 instead of 328. 2. Divide the result of Step 1 by 2 (by shifting it right one position). This is so we can use a 16/8 division routine in the next step. 3. Take the result from Step 2 and divide it by 164, using the simplest 16-bit / 8-bit integer division routine you can find. The result will be the absolute value of the voltage * 10. 4. Display that number, putting a decimal point between the least-significant two digits and the appropriate sign in front of the number. The whole thing should take WAY less than a page of code. -Andy === Andrew Warren - fastfwd@ix.netcom.com === Fast Forward Engineering - Vista, California === http://www.geocities.com/SiliconValley/2499