Microchip® Advanced Software Framework

 All Files Functions Typedefs Enumerations Enumerator Macros Groups
ADC example 3 for the ATmega48A Documentation

Introduction

This example calculates the AVCC voltage by measuring the internal bandgap voltage.

Files:

Brief description

This application will measure the internal bandgap voltage using AVCC as the reference and then calculate AVCC based on the measurement. Add the supply_voltage variable to your watch window to observe the calculated value. To save size and speed the calculation is done with integer math and not floating point. The resulting value is in millivolts.

Compilation Info

This software was written for the GNU GCC for AVR, and IAR Embedded Workbench.
Other compilers may or may not work.

Contact Information

For further information, visit Microchip.
Support and FAQ: https://www.microchip.com/support/