>I've done it in the past, with a 9V battery supply, by switching the >battery supply with a transistor into a 2:1 divider (10K+10K). >The neat trick is to use a capacitor to level-shift the switching >signal. You only need to check bat level occasionally, so drain is >minimal, accuracy is good as you can use a lower resistance divider, >and it takes no power when not active. You can often also dual-use a >pin for the switch signal. > >PNP transistor - E to +9V, C to divider (10K/10K with centre to ADC >input). >100K from E to B, 100K + 10n cap in series with B to I/O pin. Take I/O >pin low to enable voltage for a few mS - long enough for ADC >conversion. Now that is a sneaky way of doing it. I like it. -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads