139
CHAPTER 10 A/D CONVERTER
User’s Manual U15104EJ2V0UD
10.4.3 A/D converter operating mode
The A/D converter has the following two modes:
• A/D conversion operation mode: In this mode, the voltage applied to the analog input pin selected from ANI0
to ANI5 is converted into a digital signal. The result of the A/D conversion
is stored in A/D conversion result register 3 (ADCR3), and at the same time,
an interrupt request signal (INTAD3) is generated.
• Power-fail comparison mode:
The digital value resulting from A/D conversion is compared with the value
assigned to power-fail comparison threshold value register 3 (PFT3) is
compared. If the result of the comparison matches the condition set by bit
6 (PFCM3) of power-fail comparison mode register 3 (PFM3), an interrupt
request signal (INTAD3) is generated.
(1) A/D conversion operation mode
When bit 7 (ADCS3) of A/D converter mode register 3 (ADM3) is set to 1, the A/D conversion starts on the
voltage applied to the analog input pins specified with bits 0 to 3 (ADS30 to ADS33) of ADS3.
Upon termination of the A/D conversion, the conversion result is stored in A/D conversion result register 3
(ADCR3) and the interrupt request signal (INTAD3) is generated. After one A/D conversion operation is started
and terminated, the next A/D conversion operation starts immediately. The A/D conversion operation
continues repeatedly until new data is written to ADM3.
If data is written to ADCS3 again during A/D conversion, the converter suspends its A/D conversion operation
and starts A/D conversion on the newly written data.
If data with ADCS3 set to 0 is written to ADM3 during A/D conversion, the A/D conversion operation stops
immediately.