BAT32G1x9 user manual | Chapter 15 A/D converter
514 / 1149
Rev.1.02
15.4.7 Hardware-triggered no-wait mode (scan mode, continuous transition 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"
and enters the hardware-triggered standby state (this stage does not start the transition). When the
hardware triggers standby, the A/D conversion does not start even if the ADCS position "1" is
placed.
③
If the input hardware is triggered in the ADCS bit "1", scan 0 to 4 of scan 3 specifi ed by the analog
input channel specified register (ADS). A/D conversion of analog input channels. A/D conversion is
performed sequentially from the analog input channel specified by scan 0.
④
A/D conversion of 4 analog input channels is performed continuous ly. Whenever 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). The next A/D conversion
automatically starts from the set channel immediately after the end of the 4-channel A/D conversion.
⑤
If the input hardware is triggered during the conversion, the current A/D conversion is immediately
aborted and the conversion is restarted from the original channel.
⑥
If the ADS registers are overwritten or rewritten during the conversion process, the current A/D
conversion is immediately aborted and then A/D is performed from the channel reassigned by the
ADS registers.
⑦
If you rewrite "1" for the ADCS bit during the conversion process, the c urrent A/D conversion is
immediately aborted and the conversion starts again from the original channel.
⑧
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. However, in this state the A/D converter does not
enter the stopped 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.
Figure15-26 Example of a Operation sequence in which hardware triggers no wait mode (scan mode, continuous
transition mode).
set 1 to ADCE bit
generate hardware trigger
hardware trigger
set 1 to ADCS bit
do not accept trigger
trigger idle
generate hardware
trigger during A/D
conversion operation
clear ADCE bit to 0
clear ADCS bit to 0 during
conversion
do not accept trigger
rewrit e ADCS bit t o 1 during A/
D conversion operat ion
modify ADS (from ANI0 to
ANI1) during A/D conversion
start next cnversion
when A/D conversion
completes
auto restart
conversion when
conversion
completes
auto restart
conversion when
conversion
completes
auto restart
conversion when
conversion
completes
A/D conversion state
stop
converting
idle
conversion
idle
conversion
stop
converting
4 interrupts generated in 1
complete scan
4 interrupts generated in 1
complete scan
4 interrupts generated in 1
complete scan
4 interrupts generated in 1
complete scan