After some reading, I have just learned how a voltage divider works and I would appreciate feedback on this if I have it wrong: Vout = Vin * (R1 / R1 + R2) Where Vout is max 5V (connected to AN0) Vin is the battery voltage bat+ ---| | < R1 > < | |---- AN0 | < R2 > < | bat- ---| If Vin is 7.2V and R1=10K then R2=4.4K I must be dense - but I do not quite understand your "other idea". Vdd is regulated through an LM2936 at appx. 5V - I need to get a rough idea of the voltage "outside" the regulator. On Wed, Mar 27, 2002 at 04:04:23PM -0600, Dale Botkin wrote: > On Wed, 27 Mar 2002, Douglas Butler wrote: > > > Use a 2 resistor divider, no op amp needed. Try a 22K from the battery > > to the A/D, and a 47K from the A/D to GND. > > I'd recommend 10K max to Vss and Vdd, or a 20K pot. MC recommends 10K max > input impedance to the ADC. With a pot you can set the input at full > battery charge to your Vref, as pointed out by anothr poster. > > Another idea: pot from Vdd to an otherwise unused I/O pin, wiper to the > ADC input. Now you drive the pin low to read the supply voltage, and set > it as an input to avoid the current drain thru the resistors the rest of > the time. Yeah, your ADC reading is relative, but you said that's OK. > > Dale > > -- > http://www.piclist.com hint: To leave the PICList > mailto:piclist-unsubscribe-request@mitvma.mit.edu > -- Glen Wiley Application Technology, Core Processes IT Capital One Financial Services Everything should be made as simple as possible, but not simpler. -- Albert Einstein -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu