megaAVR® Devices

The Analog-to-Digital Converter (ADC) of the megaAVR devices has different register sets and limited features compared to the AVR Dx devices. Due to those differences, the migrated software must be fully tested and validated to ensure similar functionality on both families.

For the megaAVR devices, the ADC has a 10-bit resolution and a sample rate of up to 15 ksps. The ADC is connected to an 8-channel Analog Multiplexer, which allows eight single-ended voltage inputs constructed using the pins of Port A. The device also supports 16 differential voltage input combinations, two of them being equipped with a programmable gain stage. The input configuration is selected using the Analog Channel and Gain Selection bit field in the ADC Multiplexer Selection (ADMUX) register.

The ADC has the option for internal or external references, selectable using the Reference Selection (REFS) bit field in the ADMUX register. The internal voltage reference can be selected between on-chip 2.56V fixed voltage or the AVCC pin and is available on the AREF pin for decoupling when used. Therefore, the internal voltage reference cannot be used if an external reference voltage is being applied to the AREF pin.
Figure 1. megaAVR® - ADC Block Diagram