Analog/digital converter (ADC) RM0016
418/449 Doc ID 14587 Rev 8
24.5.7 Conversion on external trigger
Conversion can be triggered by an rising edge event on the ADC_ETR pin or a TRGO event
from a timer. Refer to the datasheet for details on the timer trigger, as this is product depend-
ent). If the EXTTRIG control bit is set then either of the external events can be used to trigger
a conversion. The EXTSEL[1:0] bits are used to select the two possible sources of events
that can trigger conversion.
To use external trigger mode:
1. The ADC is in off state (ADON=0) and EOC bit is cleared.
2. Select trigger source (EXTSEL [1:0]).
3. Set external trigger mode EXTTRIG=1 using a BSET instruction in order not to change
other bits in the register.
4. If the trigger source is in high state, this switches on the ADC. For this reason, test if
ADC is switched off (ADON=0), then switch on ADC (ADON=1).
5. Wait for the stabilization time (t
STAB
). If an external trigger occurs before t
STAB
elapses,
the result will not be accurate.
6. Conversion starts when an external trigger event occurs.
Note: 1 If timer trigger mode is selected (timer event as trigger source, not external pin) it is
recommended to start the timer only when the ADC is completely set - and stop the timer
before the ADC is switched off.
2 External trigger mode must be disabled (EXTTRIG=0) before executing a HALT instruction.
24.5.8 Analog zooming
Analog zooming is supported in devices with external reference voltage pins (V
REF+
and
V
REF-
). In analog zooming, the reference voltage is chosen to allow increased resolution in a
reduced voltage range. Refer to the datasheet for details on the allowed reference voltage
range.
24.5.9 Timing diagram
As shown in Figure 161, after ADC power on, the ADC needs a stabilization time t
STAB
(equivalent to one conversion time t
CONV
) before it starts converting accurately. For
subsequent conversions there is no stabilization delay and ADON needs to be set only
once. The ADC conversion time takes 14 clock cycles. After conversion the EOC flag is set
and the 10-bit ADC Data register contains the result of the conversion.