
449
42073A-MCU Wireless-02/13
ATmega2564/1284/644RFR2
Figure 27-7. ADC Timing Diagram, Auto Triggered Conversion
A D C C lo c k
A D E N
T rig g e r S o u rc e
A D IF
A D C H
A D C L
M U X a n d R E F S U p d a te
1 1 T ADC_CLK
tTRC K
T ra c kin g
C o n ve rsio n
tS CS MP
S ig n a n d M S B o f R e su lt
L S B o f R e s u lt
M U X a n d R E F S U p d a te
C o n ve rs io n
C o m p le te
tSCSMP
C o n v e rs io n
P re s ca le r R e s e t
a n d
S a m p le & H o ld
A D A T E
P re s ca le r
R e se t
a n d
S a m p le
& H o ld
Figure 27-8. ADC Timing Diagram, Free Running Conversion
A D C C lo c k
A D T S [2 :0 ]
A D S C
A D IF
A D C H
A D C L
1 1 T A DC_CLK
tT RC K
T ra c k in g
C o n v e rs io n
S ig n a n d M S B o f R e s u lt
L S B o f R e s u lt
M U X a n d R E F S U p d a te
C o n v e rs io n
C o m p le te
S a m p le & H o ld
C o n v e rs io n
0
1 1 T A D C_C LK
27.6 Changing Channel or Reference Selection
The MUXn and REFSn bits in the ADMUX and ADCSRB Register are single buffered
through a temporary register to which the CPU has random access. This ensures that
the channels and reference selection only takes place at a safe point during the
conversion. The channel and reference selection is continuously updated either during
the AVDD power-up phase or until a conversion is started by setting ADSC. After this
the channel and reference selection is locked to ensure a sufficient initialization and
sampling time for the ADC. Continuous updating of the channel selection resumes after
the conversion has completed (ADIF in ADCSRA is set).
If Auto Triggering is used, the exact time of the triggering event can be undetermined.
Special care must be taken when updating the ADMUX Register, in order to control
which conversion will be affected by the new settings.
If both ADATE and ADEN in the ADSCRA Register are written to one, an interrupt
event can occur at any time. If the ADMUX Register is changed in this period, the user
cannot tell if the next conversion is based on the old or the new settings. ADMUX can
be safely updated in the following ways:
1. When ADATE or ADEN is cleared.
2. During a conversion
3. After a conversion, before the Interrupt Flag used as trigger source is cleared.
When updating ADMUX in one of these conditions, the new settings will affect the next
A/D conversion.