CHAPTER 22 LOW-VOLTAGE DETECTOR
Preliminary User’s Manual U16315EJ1V0UD
381
(2) When used as interrupt
Disable interrupts (DI) in the servicing routine of the LVI interrupt, and check to see if “supply voltage (V
DD
) >
detection voltage (V
LVI
)”, by using bit 0 (LVIF) of the low-voltage detection register (LVIM). Then enable interrupts
(EI).
In a system where the supply voltage fluctuation period is long in the vicinity of the LVI detection voltage, disable
interrupts (DI), wait for the supply voltage fluctuation period, check that “supply voltage (V
DD
) > detection voltage
(V
LVI
)” with the LVIF flag, and then enable interrupts (EI).
Figure 22-7. Example of Software Processing of LVI Interrupt
•
If supply voltage fluctuation is 50 ms or less in vicinity of LVI detection voltage
;
Check that supply voltage (V
DD
) > detection voltage (V
LVI
).
;
TMIFH1 = 1: Interrupt request is generated
;
Enable interrupts.
;
Disable interrupts.
Yes
No
LVIF1 of LVIM
register = 0?
Yes
No
50 ms has passed?
(TMIFH1 = 1?)
LVI
LVI interrupt
Start timer
(set to 50 ms)
EI
DI
LVI interrupt servicing