Glen Wiley wrote... >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) That's not correct for the circuit as you've drawn it. The voltage divider's output voltage will be Vout = Vin * R2 / (R1 + R2) If you're operating off a regulated 5V supply, you can just set up the A/D converter to use Vcc/Gnd as its reference and make R1 = R2 = 10K ohms. That way, the A/D result will represent 10 volts full scale, or 0.01 volt per count (within a few percent). Nice, convenient scaling. >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 -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu