AVR® Analog to Digital Convertor Operating Modes

The AVR® Analog to Digital Conversion (ADC) Peripheral Operation Modes are just some of the features this peripheral offers. Refer to the ADC section of the datasheet for the device you've selected for more detail.

Single Conversion Mode

A single conversion is started by writing a to the Power Reduction ADC bit in the Power Reduction Register PRR0.PRADC, and writing a 1 to the ADC Start Conversion bit in the ADC Control and Status Register A ADCSRA.ADSC. The ADCS bit will stay high as long as the conversion is in progress, and will be cleared by hardware when the conversion is completed. If a different data channel is selected while a conversion is in progress, the ADC will finish the current conversion before performing the channel change.


Auto Triggering Mode

A conversion can be triggered automatically by various sources. Auto Triggering is enabled by setting the ADC Auto Trigger Enable bit ADCSRA.ADATE.


The trigger source is selected by setting the ADC Trigger Select bits in the ADC Control and Status Register B ADCSRB.ADTS. See the description of the ADCSRB.ADTS for a list of available trigger sources.


When a positive edge occurs on the selected trigger signal, the ADC prescaler is reset and a conversion is started. This provides a method of starting conversions at fixed intervals. If the trigger signal is still set when the conversion completes, a new conversion will not be started. If another positive edge occurs on the trigger signal during conversion, the edge will be ignored.

Note: An interrupt flag will be set even if the specific interrupt is disabled or the Global Interrupt Enable bit in the AVR Status Register SREG.I is cleared. A conversion can thus be triggered without causing an interrupt. However, the Interrupt Flag must be cleared in order to trigger a new conversion at the next interrupt event.

Free Running Mode

When Free Running Mode is selected the ADC Interrupt Flag is used as a trigger source and makes the ADC start a new conversion as soon as the ongoing conversion has finished. This Free Running mode, constantly samples and updates the ADC Data Register. The first conversion must be started by writing a 1 to ADCSRA.ADSC. In this mode, the ADC will perform successive conversions independently of whether the ADC Interrupt Flag ADIF is cleared or not.


Additional Information

© 2018 Microchip Technology, Inc.
Notice: ARM and Cortex are the registered trademarks of ARM Limited in the EU and other countries.
Information contained on this site regarding device applications and the like is provided only for your convenience and may be superseded by updates. It is your responsibility to ensure that your application meets with your specifications. MICROCHIP MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND WHETHER EXPRESS OR IMPLIED, WRITTEN OR ORAL, STATUTORY OR OTHERWISE, RELATED TO THE INFORMATION, INCLUDING BUT NOT LIMITED TO ITS CONDITION, QUALITY, PERFORMANCE, MERCHANTABILITY OR FITNESS FOR PURPOSE. Microchip disclaims all liability arising from this information and its use. Use of Microchip devices in life support and/or safety applications is entirely at the buyer's risk, and the buyer agrees to defend, indemnify and hold harmless Microchip from any and all damages, claims, suits, or expenses resulting from such use. No licenses are conveyed, implicitly or otherwise, under any Microchip intellectual property rights.