![](http://datasheet.mmic.net.cn/90000/M44C090-XXX-FL16_datasheet_2360652/M44C090-XXX-FL16_200.png)
200
Atmel ATmega16/32/64/M1/C1 [DATASHEET]
7647K–AVR–12/13
Using the ADC interrupt flag as a trigger source makes the ADC start a new conversion as soon as the ongoing conversion has
finished. The ADC then operates in free running mode, constantly sampling and updating the ADC data register. The first
conversion must be started by writing a logical one to the ADSC bit in ADCSRA. In this mode the ADC will perform successive
conversions independently of whether the ADC Interrupt Flag, ADIF is cleared or not. The free running mode is not allowed on
the amplified channels.
If auto triggering is enabled, single conversions can be started by writing ADSC in ADCSRA to one. ADSC can also be used to
determine if a conversion is in progress. The ADSC bit will be read as one during a conversion, independently of how the
conversion was started.
18.4
Prescaling and Conversion Timing
Figure 18-3. ADC Prescaler
By default, the successive approximation circuitry requires an input clock frequency between 50kHz and 2MHz to get maximum
resolution. If a lower resolution than 10 bits is needed, the input clock frequency to the ADC can be higher than 2MHz to get a
higher sample rate.
The ADC module contains a prescaler, which generates an acceptable ADC clock frequency from any CPU frequency above
100kHz. The prescaling is set by the ADPS bits in ADCSRA. The prescaler starts counting from the moment the ADC is
switched on by setting the ADEN bit in ADCSRA. The prescaler keeps running for as long as the ADEN bit is set, and is
continuously reset when ADEN is low.
When initiating a single ended conversion by setting the ADSC bit in ADCSRA, the conversion starts at the following rising edge
conversion timing.
A normal conversion takes 15.5 ADC clock cycles. The first conversion after the ADC is switched on (ADEN in ADCSRA is set)
takes 25 ADC clock cycles in order to initialize the analog circuitry.
The actual sample-and-hold takes place 3.5 ADC clock cycles after the start of a normal conversion and 13.5 ADC clock cycles
after the start of an first conversion. When a conversion is complete, the result is written to the ADC data registers, and ADIF is
set. In single conversion mode, ADSC is cleared simultaneously. The software may then set ADSC again, and a new
conversion will be initiated on the first rising ADC clock edge.
When auto triggering is used, the prescaler is reset when the trigger event occurs. This assures a fixed delay from the trigger
event to the start of conversion. In this mode, the sample-and-hold takes place two ADC clock cycles after the rising edge on
the trigger source signal. Three additional CPU clock cycles are used for synchronization logic.
In free running mode, a new conversion will be started immediately after the conversion completes, while ADSC remains high.
7-Bit ADC Prescaler
ADC Clock Source
ADEN
START
CK
ADPS0
ADPS1
ADPS2
Reset
CK/2
CK/4
CK/8
CK/16
CK/32
CK/64
CK/128