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. I'm not sure how to do a level shift to where I can read the voltage into the A/D. I was thinking about an opto isolator, I'm using a CNY17 in my circuit and could use another if it would do the job. Any other solution is certainly welcome. Thanks for any help. Thanks, FJ _________________________________________________________________ STOP MORE SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.