On Tue, 19 Oct 1999 11:18:44 -0400, you wrote: >If you switch the ground instead of the +5 to >the comparator, and you *also* have the ground >for the divider resistors connected to this same >"switched ground", then when the PIC output >pin is LOW all works as desired, and when the >PIC output pin is TRISTATED, then the comparator >is switched off, and current through the divider >resistors is reduced to almost nil. except the divider has to come from the battery supply, not 5v, so you can't just switch the Ov line - it will push current through the input diode to 5v. This can actually work with some voltage regulators, as current will flow in the divider _instead_ of the regulator, but it can get messy...! I used this to measure battery voltage using the PIc's ADC - you could obviously adapt it for non a/d parts, either with a comparator, or a voltage detector chip +9V | +--------------------[5V reg]--->PIC supply | | | R3 >| | C1 |-----+-R4---||---< output pin /| R1 | +---------+----->a/d input | | R2 [VOLT DET CHIP]--LOGIC O/P | | 0V 0V R1=R2=10K R3=R4=47K ( I used a digital transistor, so they are internal) C1 = 10n When the output pin goes low, the PNP transistor turns on for long enough to measure the voltage. C1 acts as a level-shifter. This output pin can often be shared with other functions. R1/R2 are low enough to avoid errors due to input leakage. You could even power a comparator like this, but watch out for settling time. For brownout, use a reset chip on the processor's supply - smaller cheaper & simpler than a micropower comparator - Motorola, uem, seiko and many others do cheap ones (<50c) that draw about a microamp. beware of using comparators for brownout protection - they can do odd things at very low voltages, so they don't always hold their outputs low all the way to 0V.