Hi all
I have a CR123A 3 V battery. I am trying to monitor the condition of this using a PIC 18F45k20 A/D.
This is my approach.
1. Use the Vdd and Vss of the battery as my PIC reference. This will be used to measure off load battery levels.
2. I then intend to use a voltage divider 30K top resistor and 10K bottom resistor. The centre pin to the A/D of the PIC.
This will measure the on load level.
3. Then i subtract the off load and on load levels to give me a threshold.
My question is when i use the voltage divider can i TRIState the PIC I/O line connected to the. 30K resistor so the circuit draws no current? If so is this the same as making this pin an input??? Or is there a special command for tristate?
Also how often should i check this snd how do i set an interrupt to check the A/D every so often say once every hour. I will be running at 4MHz clock frequency.
Thanks in advance.
I have a CR123A 3 V battery. I am trying to monitor the condition of this using a PIC 18F45k20 A/D.
This is my approach.
1. Use the Vdd and Vss of the battery as my PIC reference. This will be used to measure off load battery levels.
2. I then intend to use a voltage divider 30K top resistor and 10K bottom resistor. The centre pin to the A/D of the PIC.
This will measure the on load level.
3. Then i subtract the off load and on load levels to give me a threshold.
My question is when i use the voltage divider can i TRIState the PIC I/O line connected to the. 30K resistor so the circuit draws no current? If so is this the same as making this pin an input??? Or is there a special command for tristate?
Also how often should i check this snd how do i set an interrupt to check the A/D every so often say once every hour. I will be running at 4MHz clock frequency.
Thanks in advance.