The FIXED VOLTAGE REFERENCE (FVR) is a stable voltage reference internal to many PIC® MCU devices. It has a set voltage independent of VDD and offers selectable output levels of 1.024 V, 2.048 V or 4.096 V. The output of the FVR can be configured to supply a reference voltage to the Analog to Digital Converter (ADC). On some devices a second FVR reference can be sent to an internal Comparator, Digital to Analog Converter (DAC) or Capacitive Sensing Module.
A simplified block diagram is shown below.
Fixed Voltage Reference (FVR) Setup
The FVR can have two separate output voltages, both based on the same 1.024 V base. Both are enabled or disabled by setting or clearing the Fixed Voltage Reference bit (FVREN) in the Fixed Voltage Reference Control Register (FVRCON).
ADC Fixed Reference Voltage
The output of the FVR, when supplied to the Analog to Digital Converter (ADC), is routed through an independent programmable gain amplifier. The amplifier can be configured to amplify the reference voltage by a multiplier of 1x, 2x or 4x to produce the three possible voltage levels.
To select the voltage level, the ADC Fixed Reference Selection bits (ADFVR<1:0>) of the Fixed Voltage Reference Control Register (FVRCON) are used to enable and configure the gain amplifier settings for the reference supplied to the ADC module. To minimize current consumption when the FVR is disabled, the FVR buffers should be turned off by clearing the ADFVR<1:0> bits.
Comparator, DAC, Capsense Fixed Reference Voltage
The output of the FVR, when supplied to the comparator or the Digital to Analog Converter (DAC), is routed through an independent programmable gain amplifier. The amplifier can be configured to amplify the reference voltage by a multiplier of 1x, 2x or 4x to produce the three possible voltage levels.
To select the voltage level, the Comparater and DAC Fixed Reference Selection bits (CDAFVR<1:0>) of the Fixed Voltage Reference Control Register (FVRCON) are used to enable and configure the gain amplifier settings for the reference supplied to the Comparator, DAC and Capsense module. To minimize current consumption when the FVR is disabled, the FVR buffers should be turned off by clearing the CDAFVR<1:0> bits.
FVRCON: FIXED VOLTAGE REFERENCE CONTROL REGISTER
FVR Stabilization Period
When the Fixed Voltage Reference module is enabled, it requires time for the reference and amplifier circuits to stabilize. Once the circuits stabilize and are ready for use, the FVRRDY bit of the FVRCON register will be set.