I have looked into enabling FVR for the 16F1829.
1. Within potentiometer properties make sure VRef option is set set to FVR (which you have)
2. Determine the correct value of FVRCON
For FVR the datasheet states
Code: Select all
01 = ADC Fixed Voltage Reference Peripheral output is 1x (1.024V)
10 = ADC Fixed Voltage Reference Peripheral output is 2x (2.048V
11 = ADC Fixed Voltage Reference Peripheral output is 4x (4.096V)Bit 7 needs to be a 1 as that is Fixed Voltage Reference Enable bit, therefore for decimal that is decimal 128 = hex 0x80
If you want FVR of 2.048 then you need
Code: Select all
128 + 2 = 82Code: Select all
0x80 + 2 = 0x82Code: Select all
FVRCON = 0x82;