There is more than one way to to this. All you need is fixed reference voltage.
Eg 0,6V from diode(if you can tolerate drift about 2mV/degC), some pic have built in diode for temp. monitoring, or pic fixed reference(FVR), or voltage from some blinking LED(Do battery check when LED is on).
So you can feed fixed voltage on ADC pin, and use Vdd as reference for ADC. If Vdd is lower than ADC result are higher and reverse.
Some pic have FVR on ADC multiplexer(or internal diode), so there is convenient way to do that, without loosing io pins.
If you are using external fixed reference, you can use IO pin to turn on/off reference to minimize current draw.




Bookmarks