At 09:40 PM 7/28/2003 -0500, fred jones wrote: >Hi all, >I hope there is an anolog person out there that can point me in the right >direction. I have a circuit where it is powered by a Nimh 24V battery. The >+ rail is the ground reference and the - terminal is the -24V rail with >respect to ground. I use a DC/DC converter to generate the +5V rail. This >of course is what is powering the PIC, 16F877, and I would like to be able >to read the battery voltage to determine when its time to recharge. Its a >Nimh 24V pack, and at 20V I would like to display the need to recharge. Your voltage should be 1V/cell when you terminate for max lifetime. 0.9V is acceptable. You can use a zener, through an optocoupler, to give a pass/fail indication. Otherwise, you're into something with an op-amp to scale and invert. A zener is still useful to trim off the bottom 15V or so, and expand your measurement range. -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.