I am building a handheld device with a PIC16F876A. I have got really far in this project, and i am almost finnished.
The circuit is using a 9V battery. I want to be able to check the battery voltage with my pic to warn for low batt. Is there possible to get an 0-9 volts on the A/D inputs? How do i solve this problem?
I have thougt about meassure the voltage after the 5V REG. But will the A/D work correctly when the VDD is below 5V?
I guess it compares the VDD and the A/D port, and if both VDD and the A/D input is the same voltage, that wouldn't work, right?
Measuring on the 5V side of the REG would not be really good anyway if it works, because the circuit stops working when the voltage is below 4V or something. So the resolution would be bad.
The circuit is using a 9V battery. I want to be able to check the battery voltage with my pic to warn for low batt. Is there possible to get an 0-9 volts on the A/D inputs? How do i solve this problem?
I have thougt about meassure the voltage after the 5V REG. But will the A/D work correctly when the VDD is below 5V?
I guess it compares the VDD and the A/D port, and if both VDD and the A/D input is the same voltage, that wouldn't work, right?
Measuring on the 5V side of the REG would not be really good anyway if it works, because the circuit stops working when the voltage is below 4V or something. So the resolution would be bad.