
CHAPTER 13 A/D CONVERTER
Preliminary User’s Manual U16541EJ1V0UM
362
13.4.4 Power-fail compare mode
The A/D conversion end interrupt request signal (INTAD) can be controlled as follows by the ADA0PFM and
ADA0PFT registers.
When the ADA0PFE bit = 0, the INTAD signal is generated each time conversion has been completed (normal
use of the A/D converter).
When the ADA0PFE bit = 1 and when the ADA0PFC bit = 0, the value of the ADA0CRnH register is compared
with the value of the ADA0PFT register when conversion is completed, and the INTAD signal is generated only if
ADA0CR0H
≥ ADA0PFT.
When the ADA0PFE bit = 1 and when the ADA0PFC bit = 1, the value of the ADA0CRnH register is compared
with the value of the ADA0PFT register when conversion is completed, and the INTAD signal is generated only if
ADA0CR0H < ADA0PFT.
Remark
n = 0 to 11
In the power-fail compare mode, four modes are available as modes to set the ANI0 to ANI11 pins: continuous
select mode, continuous scan mode, one-shot select mode, and one-shot scan mode.
(1) Continuous select mode
In this mode, the voltage of one analog input pin selected by the ADA0S register is compared with the set
value of the ADA0PFT register. If the result of power-fail compare matches the condition set by the ADA0PFC
bit, the conversion result is stored in the ADA0CRn register, and the INTAD signal is generated. If it does not
match, the conversion result is stored in the ADA0CRn register, and the INTAD signal is not generated. After
completion of the first conversion, the next conversion is started, unless the ADA0CE bit of the ADA0M0
register is cleared to 0 (n = 0 to 11).
Figure 13-8. Timing Example of Continuous Select Mode Operation
(When Power-Fail Compare Is Made: ADA0S Register = 01H)
ANI1
A/D conversion
Data 1
(ANI1)
Data 2
(ANI1)
Data 3
(ANI1)
Data 4
(ANI1)
Data 5
(ANI1)
Data 6
(ANI1)
Data 7
(ANI1)
Data 1
Data 2
Data 3
Data 4
Data 5
Data 6
Data 7
Data 1
(ANI1)
Data 2
(ANI1)
Data 3
(ANI1)
Data 4
(ANI1)
Data 6
(ANI1)
ADA0CR1
INTAD
Conversion start
Set ADA0CE bit = 1
ADA0PFT
unmatch
ADA0PFT
unmatch
ADA0PFT
match
ADA0PFT
match
ADA0PFT
match
Conversion start
Set ADA0CE bit = 1