Hello, I have found this post, because I want to do the same. I have 16F690 battery powered system and I want to detect low battery caase. I have Implemented the code like described here, but it somehow doesn't work:

'read baterry
VRCON.4 = 1 ; Turn 0.6V reference ON
PAUSEUS 200 ; Allow VP6 to settle
ADCIN 13, temp_word ; get VP6 analog reading (10-bit)
VRCON.4 = 0 ; Turn 0.6V reference OFF
VDD = 6138 / temp_word ; convert to voltage ve vdd je 25 = 2,5 V
temp_data[9] = (VDD DIG 1) + $30
temp_data[10] = "."
temp_data[11] = (VDD DIG 0) + $30
temp_data[12] = 13
temp_data[13] = 10

But it somehow doesn't work. If powerred with 3.3 V I have in VDD 42, if powerred from exhausted bateries with total voltage 2.4 V I have there 4 and if powered from new bateries with 3.1 V I have there 4. Do you have any idea, why it is doesn't work?
Bob