Jan-Erik: You are correct, it is a 10-bit converter, which would be range of 0,,1023.. However, it can be set up to return the result Right-justified or Left-justified - the 0..1023 is Right-justified. For a Left-justified return the result would be 0..16368. Assuming you want, as I do, to read a 12 volt battery voltage (among other things), a full scale reading output of 16368 is just fine, and eliminates any need for additional scaling of the A/D output. The proper scaling resistors on the A/D input will put the full-scale output at 16.384 volts into the divider. The alternative would be to add a more-or-less complete set of math routines to the code, and at this time I don't see the need for that. This is a two-resistor and 40-50 lines of code solution. I would be interested in a good math package which is properly documented as to requirements, operation and limitations. I have found several packages, including one on the Microchip web site, but the documentation is limited and I don't have a lot of time to spend (at the moment) tuning & tweaking the software. Later, maybe, when this is in production. Anyway - good question. Roy ----- Original Message ----- From: "Jan-Erik Soderholm XA (TN/PAC)" To: Sent: Sunday, January 04, 2004 4:30 PM Subject: Re: [PIC]: 18Fxxx 16-bit Binary to ASCII conversion > Roy J. Gromlich > > > I need to Read the 18Fxxx A/D and send the resulting 16-bit > > number to the UART for output, thus I need to convert 16-bit > > Binary to ASCII. > > The "18Fxxx A/D" will give you a 10-bit > binary number, right ? > > Note that the code to convert a 10-bit number > into "0000" - "1023" in ASCII probably can be made > a bit shorter/faster then a full 16-bit conversion > routine... > > Or where does your extra 6 bits come from ? > > Jan-Erik. > > -- > http://www.piclist.com hint: The PICList is archived three different > ways. See http://www.piclist.com/#archives for details. -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.