I've got one I can answer right, finally. I've had the same problem on several battery-operated pieces. The answer is to do it in reverse. Instead of measuring the battery voltage against a known reference, measure a reference against the internal battery! The way I usually do it to use a 2.7V to 3.3V zener, LOW KNEE (100mw-150mw). The Anode (Neg) lead of the zener is driven to ground, while the cathode (BAR) is connected to the analog input and a pullup resistor. It will be a high current pulse (i.e. about 2-3ma) so only turn it on for a split second. The value you measure will then be a ratio (x/256) of the VCC battery voltage. You can grind out a calculation, if you need to... but I just build a table taken from actual battery tests. The accuracy will be the accuracy of the zener itself. Unfortunately, only a small difference exists between a LOW battery and a HI one, and that tolerance MIGHT not be enough. So I usually calibrate the offset at the battery midpoint voltage. Not too much production work for that... --Bobn At 05:58 PM 8/9/2003 -0400, you wrote: >Has anyone had any experience using a PIC's internal A/D to monitor its own >battery supply? > >My application will use one of the little PICs 12F675 or 16f676, but >information about others would be useful. > >The part I'm having a hard time wrapping my noodle around is, what do I use >for a reference voltage? > >This could be a high volume device, so cost is a concern. But I don't need a >high degree of precision, 4 or 5 bits would be fine. I just need an >approximation of battery health. > > Thanks > Denny > >-- >http://www.piclist.com hint: To leave the PICList >mailto:piclist-unsubscribe-request@mitvma.mit.edu --------------- NOTICE 1. This account can accept email & attachments up to 10M in size. 2. Federal Monitors: At request of client, some attachments are encrypted. Please DO NOT delay traffic; please reply with credentials for password. -------------- -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu