Page 1 of 1
Low Battery Indication
Posted: Sat Apr 26, 2008 7:04 am
by mel
I want to be able to monitor & turn on an LED when my circuit supply line drops from about 9.8Volt (New Battery) to about 7Volts( Low Battery). I would anticipate setting the battery reference voltage in the circuit,with a potentiometer to about 7 Volts & when the battery drops lower than this ,then the pic turns on the LED.Can someone tell me how I can do this using Flowcode please. Using a Pic type 12F629.
Re: Low Battery Indication
Posted: Mon Apr 28, 2008 9:20 am
by Steve
That chip has a comparator module with a selectable internal voltage reference. I'd suggest using this feature, with an external potential divider that divides the battery voltage down suitably - perhaps halving it will be ok.
You will need to resort to some C code for this, but it is fairly minimal - you'll just need to set up the CMCON and VRCON registers appropriately and periodically check the status of CMCON:COUT.