Hi Ron,

Well there are still several questions to be able to figure out what's wrong. Such as ... what is the voltage of the charging power source? What are the voltage divider resistor values. Where is the reading being taken, before or after the 10 ohm resistor. and probably a few others.

However, there are a few things going on in the program that are suspect, but may not really be the problem.

You seem to be trying to use both the built-in PBP ADCIN command, and manually manipulating the A/D registers. You should pick one method or the other, not both.

In this line...
Code:
ANSEL = %01100001 ' Set GSIO 0 TO ANALOG A/D IN W/Frc
                  ' OTHER PINS TO DIGITAL
It sets the A/D oscillator to FOSC/64, which is listed as "outside of recommended range" in the datasheet.

It then starts a conversion, waits for it to finish, then discards the result. That is followed by an ADCIN statement that changes the oscillator to FRC, (since that was specified in the ADC_CLOCK define), and takes another reading.

Again, this won't cause the problem you're seeing, but it's still not right.

So maybe it's something with the questions in the first paragraph. ??
<br>