
256
8210C–AVR–09/11
Atmel AVR XMEGA D
In order to achieve
n
bits of accuracy, the source output resistance, R
source
, must be less than
the ADC input resistance on a pin:
where the ADC sample time, T
S
is one-half the ADC clock cycle given by:
For details on R
channel
, R
switch
, and C
sample
, refer to the ADC electrical characteristic in the device
datasheet.
21.11 Interrupts and Events
The ADC can generate interrupt requests and events. Each ADC channel has individual inter-
rupt settings and interrupt vectors. Interrupt requests and events can be generated when an
ADC conversion is complete or when an ADC measurement is above or below the ADC com-
pare register value.
21.12 Calibration
The ADC has built-in linearity calibration. The value from the production test calibration must be
loaded from the signature row and into the ADC calibration register from software to achieve
specified accuracy. User calibration of the linearity is not needed, hence not possible. Offset and
gain calibration must be done in software.
21.13 Synchronous Sampling
Starting an ADC conversion can cause an unknown delay between the start trigger or event and
the actual conversion since the peripheral clock is faster than the ADC clock. To start an ADC
conversion immediately on an incoming event, it is possible to flush the ADC of all measure-
ments, reset the ADC clock, and start the conversion at the next peripheral clock cycle (which
then will also be the next ADC clock cycle). If this is done, the ongoing conversions in the ADC
will be lost.
The ADC can be flushed from software, or an incoming event can do this automatically. When
this function is used, the time between each conversion start trigger must be longer than the
ADC propagation delay to ensure that one conversion is finished before the ADC is flushed and
the next conversion is started.
It is also important to clear pending events or start ADC conversion commands before doing a
flush. If not, pending conversions will start immediately after the flush.
In devices with two ADC peripherals, it is possible to start two ADC samples synchronously in
the two ADCs by using the same event channel to trigger both ADC.
R
source
T
s
C
sample
2
n
1
+
(
)
ln
⋅
-----------------------------------------------
R
channel
–
R
switch
–
≤
T
s
1
2
f
⋅
ADC
-------------------
≤