4.3 VDDIOx Voltage Measurement using the Analog-to-Digital Converter

The VDDIOx supply voltage on PIC and AVR devices with MVIO can be measured using the on-chip ADC module. The VDDIOx supply voltage is always divided by a factor of ten, and then provided as an internal input channel to the ADC. Since the MVIO voltage domains are meant to operate independently of VDD and one another, there are instances where it is possible the VDDIOx voltage may be higher than any of the available ADC positive reference voltages. The MVIO supply voltages are divided down to ensure that they are always within the measurable range of the ADC.

The MVIO supply voltage can only be measured using the dedicated ADC channel when the respective VDDIOx voltage domain has met the minimum voltage requirements for operation, and is ready to use as indicated by the associated interrupt flag or status bit. Refer to VDDIOx Ready Voltage Monitor for more information. To measure the MVIO supply voltages using the ADC on PIC devices, "VDDIOx/10" must be selected as the internal ADC channel by writing the appropriate value to the ADC Positive Channel Selection (ADPCH) register. On AVR devices with MVIO, this is done by writing the specified value to the MUX Selection for Positive ADC Input (MUXPOS) register to select the "VDDIO2DIV10" option.

Figure 4-3 shows an example comparing the VDDIOx voltage level that is measured and calculated using the dedicated ADC input channel, versus the actual voltage being supplied to the corresponding VDDIOx power pin. In this example, the voltage provided to the VDDIO2supply pin was gradually ramped up from 0V to 5V, and the ADC was used to measure the corresponding voltage as it ramped up over time. This data was captured on the PIC18-Q24 device family, however the same principal applies to all devices with MVIO.
Figure 4-3. VDDIOx Calculated Voltage Using ADC vs. Actual VDDIOx Supply Voltage