BAT32G1x9 user manual | Chapter 15 A/D converter
508 / 1149
Rev.1.02
15.4
The operating mode of the A/D converter
The operation of each mode of the A/D converter is as follows. For the setup steps for each mode, refer to
15.4.1 Software-triggered mode (selection mode, continuous conversion mode)
①
In the stopped state, enter the ADCE position "1" of the A/D converter's mode register 0 (ADM0) into
the A/D transition standby state.
②
After counting the settling wait time (1us) by software, the ADCS position of the ADM0 register is "1"
to the register specified by the analog input channel (ADS The specified analog input performs an
A/D conversion.
③
If the A/D conversion is complete, the conversion result is saved to the A/D conversion result
register (ADCR, ADCRH) and an A/D transition end interrupt request signal is generated (INTAD)
。
Start the next A/D conversion immediately after the A/D conversion is complete.
④
If you rewrite "1" for the ADCS bit during the conversion process, the current A/D conversion is
immediately aborted and the conversion is restarted.
⑤
If the ADS registers are overwritten or rewritten during the conversion process, the current A/D
conversion is immediately aborted and the analog inputs reassigned by the ADS registers are A/D
converted.
⑥
The A/D conversion does not start even if the input hardware triggers during t he conversion process.
⑦
If the ADCS position is "0" during the conversion, the current A/D conversion is immediately aborted
and then enters the A/D conversion standby state.
⑧
If the ADCE position is "0" in the A/D conversion standby state, the A/D convert er enters the stopped
state. When the ADCE bit is "0", even the ADCS position "1" is ignored and the A/D conversion is
not started.
Figure15-20 Operation sequence of software trigger modes (select mode, continuous transition mode).
set 1 to ADCE bit
set ADCS bit to 1 during
conversion idle state
start next cnversion when A/
D conversion completes
auto restart
conversion when
conversion
completes
auto restart
conversion when
conversion
completes
conversion
stops
rewrite ADCS bit to 1 during
A/D conversion operation
generate hardware t rigger
(be ignored) during A/D
conversion operat ion
clear ADCS bit
to 0 during
conversion
modif y ADS (from ANI 0 t o
ANI1) during A/ D conversion
clear ADCS bit to 0
A/D conversion
state
stop
converting
idle
conversion
stop
converting
idle
conversion