3.1.4.2 Measuring Supply Voltage
VDD and VDDIO2 are available internal input channels to the AVR128DB48‘s
ADC. The voltage is divided by ten. To measure VDD or VDDIO2, follow these steps:
- Configure the voltage reference for the ADC.
- Select VDD or VDDIO2 as the positive input to the ADC.
- Run a single-ended ADC conversion.
- Calculate the voltage using the
following equation: