BAT32G1x9 user manual | Chapter 15 A/D converter
511 / 1149
Rev.1.02
15.4.4 Software trigger mode (scan mode, single-shot 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 "1" is
switched on by the analog input The four analog input channels spec ified by the Channel Specified
Register (ADS) scan 0 to scan 3 perform A/D conversion. A/D conversion is performed sequentially
from the simulated input channel specified by scan 0.
③
A/D conversion of 4 analog input channels is performed continuously. When ever the A/D conversion
ends, the conversion result is saved to the A/D conversion result register (ADCR, ADCRH) and an
A/D is generated Conversion End Interrupt Request Signal (INTAD).
④
After the A/D conversion of 4 channels is completed, the ADCS bit is automatically cleared "0" and
enters the A/D conversion standby state.
⑤
If you rewrite "1" for the ADCS bit during the conversion process, the current A/D conversion is
immediately aborted and the conversion restarts.
⑥
If the ADS register is overwritten or rewritten during the conversion process, the current A/D
conversion is immediately aborted and the A/D conversion is performed from the initial channel re -
specified by the ADS register.
⑦
If the ADCS position is "0" during the conversion, the current A/D c onversion 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 converter 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. The input hardware trigger does not start even in the A/D conversion standby state.
Figure15-23 Operation sequence of software trigger mode (scan mode, single-shot conversion mode).
Af ter the
conversion is
completed, t he
ADCS bit is
automatically
cleared t o "0"
set ADCS bit to 1 during
conversion idle state
set 1 to ADCE bit
rewrit e ADCS bit t o 1 during
A/ D conversion operation
modify ADS (from ANI0 to ANI4)
during A/D conversion
clear ADCS bit to 0
during conversion
clear ADCE bit to 0
conversion completes
auto restart conversion
when conversion
completes
auto restart conversion
when conversion
completes
A/D conversion state
stop
converting
idle
conversion
idle
conversion
idle
conversion
idle
conversion
stop
converting
4 interrupts generated in 1 complete scan
4 interrupts generated in 1 complete scan