You may also be interested in http://www.piclist.com/../idea/ebb aka http://www.piclist.com/techref/default.asp?url=idea/ebb --- James Newton (PICList Admin #3) mailto:jamesnewton@piclist.com 1-619-652-0593 PIC/PICList FAQ: http://www.piclist.com or .org -----Original Message----- From: pic microcontroller discussion list [mailto:PICLIST@MITVMA.MIT.EDU]On Behalf Of Ole Petter Rxnningen Sent: Saturday, August 26, 2000 14:59 To: PICLIST@MITVMA.MIT.EDU Subject: [PIC:] Floatingpoint multiplication, conversion etc.. (Reposting, forgot the brackets. Sorry.) Hi all. I am about to embark on my first project, so please be patient.. (BTW, I've read the FAQ, but didn't really find the answers I was hoping for) I am planning to make a two-channel powersupply (0-25VDC), with a voltmeter/amperemeter (one for each channel) on a 16x2 LCD display. I havent chosen wich chip to use yet, BTW, I was hoping to get some clues here.. 1. From what I have gathered, all I need to do to use a 16xxx to measure voltage is to reduce input voltage with a couple of resistors (anyone have a comment/good design?) on an ADC to 0-5VDC, and read off the byte from the register. Measuring current should be similar, except a different 'reducer' would be needed(? hints anyone?) Here is my first question: I would like to keep the ground on each of the channels separate. As far as I have understood, I should be able to use RA3 as ground on the circuit beeing measured, and measure voltage on another pin. If I am right, all is well. But since I have 2 channels, are there any chips I can use so that I can have two different "grounds" on two different AD's? (Well, 4 different ADC's in two pairs, I guess; one pair for Volt/Amp on one circuit, and one for the other. Unless I am mistaking..?) Are there any chips that can do this? (using two separate pins as ground for two*two other ADC's) 2. After I have sucessfully read a byte from ADC, I need to multiply that with 25/256 to find the voltage (or xx/256 to find the amp). I'd like to display the resulting number (16bit FP?) on the display, and so I need to convert it to an ascii string.. (Preferably in the format of xx.xx.) What would be the best way to do this? I have considered simply using two tables of strings, and use the byte read from the volt-ADC/amp-ADC as indexes. The tables would be about 1500 bytes each.. 3. Okay, one more: The design I was planning to use for the powersupply (http://home.maine.rr.com/randylinscott/apr20.htm) seems very simple. (I would use two identical, separate circuits) It uses a 5K potmeter to adjust voltage. What sort of component could I use in place of the potmeter, so that I could control it from the PIC? Thank you! Ole Petter -- http://www.piclist.com hint: The list server can filter out subtopics (like ads or off topics) for you. See http://www.piclist.com/#topics -- http://www.piclist.com hint: PICList Posts must start with ONE topic: "[PIC]:" PIC only "[EE]:" engineering "[OT]:" off topic "[AD]:" ad's