I am using a PIC16F18854 with a stable VDD of 5.0V. Tried multiple chips. Code has been primarily generated using MCC and verified with the datasheet.

Applicable registers:
FVRCON: ADFVR = 4x, FVREN = enabled

  • The ADC range appears to be VSS->VDD; changing VDD affects the ADC output
  • The ADC acts as if it is being referenced to VDD (between 4.75V-6V)
  • Changing just one bit of FVRCON to select to 2x or 1x works as expected - a reference 2.048V/1.024V and the ADC performs conversions. The output is stable when varying the supply voltage.

Could anything be leading to such an issue? Or a silicon/datasheet error?

  • 1
    \$\begingroup\$ I have fixed the formatting on your question but am unable to fix the question itself. Please re-read it from the point of view of someone who has no idea what you have done. Describe the problem (clearly) and the steps you have taken. \$\endgroup\$
    – Transistor
    Nov 12, 2017 at 11:55
  • \$\begingroup\$ Are all of your supply pins properly decoupled? What is the source impedance of your input signal and how are you driving the ADC input? \$\endgroup\$
    – brhans
    Nov 12, 2017 at 14:14
  • \$\begingroup\$ I'm driving by a variable power supply directly through a 1k resistor (less than the 10k max source impedance as directed by the datasheet). It's puzzling as it all works perfectly on a 2x FVR reference, simply changing to 4x causes this issue. It is repeatable across chips. \$\endgroup\$
    – CJ9
    Nov 12, 2017 at 14:20

1 Answer 1


I have found a solution to the above.

In my code, I had selected the channel, waited for the acquisition time (from the datasheet), then started the conversion using the function named "ADCC_StartConversion" generated by MPCC, which accepts the argument for a channel.

This function then re-selected the ADC channel and flags the ADC to begin "ADGO".

Despite the datasheet stating the requirement for an acquisition time, Microchip have implemented by MPCC, a function that will never work as designed.

Really, there should be an "ADC_SelectChannel" function and then an "ADC_StartConversion" so that the user can generate their own delay, or for the function to include the stated delay.

  • 1
    \$\begingroup\$ You can accept this as the correct answer to show that the problem is solved. \$\endgroup\$
    – Transistor
    Nov 12, 2017 at 21:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.