158
CHAPTER 13 A/D CONVERTER
13.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 gener-
ated on completion of the first conversion after ADCS1 has been set to 1. INTAD is valid
from completion of the second conversion.
Summary of Contents for mPD780973 Series
Page 2: ...2 MEMO ...
Page 66: ...66 MEMO ...
Page 98: ...98 MEMO ...
Page 138: ...138 MEMO ...
Page 164: ...164 MEMO ...
Page 182: ...182 MEMO ...
Page 204: ...204 MEMO ...
Page 244: ...244 MEMO ...
Page 262: ...262 MEMO ...
Page 278: ...278 MEMO ...
Page 290: ...290 MEMO ...