163
CHAPTER 12 A/D CONVERTER
Preliminary User’s Manual U14581EJ3V0UM00
12.4.3 A/D converter operation mode
The operation mode of the A/D converter is the select mode. One analog input channel is selected from among
ANI0 to ANI4 with the analog input channel specification register (ADS1) and A/D conversion is performed.
The following two types of functions can be selected by setting the PFEN flag of the PFM register.
(1) Normal 8-bit A/D converter (PFEN = 0)
(2) Power-fail detection function (PFEN = 1)
(1) A/D conversion (when PFEN = 0)
When bit 7 (ADCS1) of the A/D converter mode register (ADM1) is set to 1 and bit 7 of the power-fail compare
mode register (PFM) is set to 0, A/D conversion of the voltage applied to the analog input pin specified with the
analog input channel specification register (ADS1) starts.
Upon the end of the A/D conversion, the conversion result is stored in the A/D conversion result register (ADCR1),
and the interrupt request signal (INTAD) is generated. After one A/D conversion operation is started and ended,
the next conversion operation is immediately started. A/D conversion operations are repeated until new data
is written to ADS1.
If ADS1 is rewritten during A/D conversion operation, the A/D conversion operation under execution is stopped,
and A/D conversion of a newly selected analog input channel is started.
If data with ADCS1 set to 0 is written to ADM1 during A/D conversion operation, the A/D conversion operation
stops immediately.
(2) Power-fail detection function (when PFEN = 1)
When bit 7 (ADCS1) of the A/D converter mode register (ADM1) and bit 7 (PFEN) of the power-fail compare mode
register (PFM) are set to 1, A/D conversion of the voltage applied to the analog input pin specified with the analog
input channel specification register (ADS1) starts.
Upon the end of the A/D conversion, the conversion result is stored in the A/D conversion result register (ADCR1),
compared with the value of the power-fail compare threshold value register (PFT), and INTAD is generated under
the condition specified by the PFCM flag of the PFM register.
Caution
When executing power-fail comparison, the interrupt request signal (INTAD) is not generated
on completion of the first conversion after ADCS1 has been set to 1. INTAD is valid from
completion of the second conversion.
Содержание mPD780851
Страница 2: ...2 Preliminary User s Manual U14581EJ3V0UM00 MEMO ...
Страница 8: ...8 Preliminary User s Manual U14581EJ3V0UM00 MEMO ...
Страница 12: ...12 Preliminary User s Manual U14581EJ3V0UM00 MEMO ...
Страница 26: ...26 Preliminary User s Manual U14581EJ3V0UM00 MEMO ...
Страница 46: ...46 Preliminary User s Manual U14581EJ3V0UM00 MEMO ...
Страница 74: ...74 Preliminary User s Manual U14581EJ3V0UM00 MEMO ...
Страница 90: ...90 Preliminary User s Manual U14581EJ3V0UM00 MEMO ...
Страница 100: ...100 Preliminary User s Manual U14581EJ3V0UM00 MEMO ...
Страница 136: ...136 Preliminary User s Manual U14581EJ3V0UM00 MEMO ...
Страница 142: ...142 Preliminary User s Manual U14581EJ3V0UM00 MEMO ...
Страница 186: ...186 Preliminary User s Manual U14581EJ3V0UM00 MEMO ...
Страница 222: ...222 Preliminary User s Manual U14581EJ3V0UM00 MEMO ...
Страница 230: ...230 Preliminary User s Manual U14581EJ3V0UM00 MEMO ...
Страница 240: ...240 Preliminary User s Manual U14581EJ3V0UM00 MEMO ...
Страница 262: ...262 Preliminary User s Manual U14581EJ3V0UM00 MEMO ...
Страница 296: ...296 Preliminary User s Manual U14581EJ3V0UM00 MEMO ...
Страница 304: ...304 Preliminary User s Manual U14581EJ3V0UM00 MEMO ...
Страница 314: ...314 Preliminary User s Manual U14581EJ3V0UM00 MEMO ...