![Cmsemicon BAT32G1 9 Series Скачать руководство пользователя страница 509](http://html1.mh-extra.com/html/cmsemicon/bat32g1-9-series/bat32g1-9-series_user-manual_2627609509.webp)
BAT32G1x9 user manual | Chapter 15 A/D converter
509 / 1149
Rev.1.02
15.4.2 Software-triggered mode (select 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
assigned to the analog input channel (ADS) The specified analog input performs 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)
。
④
After the A/D conversion is over, the ADCS bit automatically clears "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 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.
⑦
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 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-21 Example of Operation sequence of software trigger mode (select mode, single conversion mode).
set 1 to ADCE bit
set ADCS bit to 1
during conversion idle
state
Af ter the conversion is
completed, t he ADCS bit is
automatically cleared t o "0"
rewrit e ADCS bit
to 1 during A/ D
conversion
operat ion
modif y ADS (from ANI 0
to ANI1) during A/ D
conversion
clear ADCS bit to 0
during conversion
clear ADCE bit to 0
stop
converting
idle
conversion
conversion
idle
stop convert ing
auto restart
conversion when
conversion
completes
conversion
idle
auto restart
conversion when
conversion
completes
conversion
idle
conversion
idle
St op
conversion
A/D conversion
state