CHAPTER 11 POWER-ON-CLEAR CIRCUITS
User’s Manual U14826EJ5V0UD
130
11.4.2 Operation of low-voltage detection (LVI) circuit
The LVI circuit compares the detection voltage (V
LVI
) with the power supply voltage (V
DD
) and generates an
interrupt request signal (INTLVI1) if V
DD
< V
LVI
(LVI circuit operating).
As shown in
Figure 11-2 Block Diagram of Low-Voltage Detection Circuit,
the
divided resistors and
comparators of the LVI circuit turn OFF when the reset signal is generated or in STOP mode. After reset is released,
LVI operation starts when LVION1 (bit 7 of low-voltage detection register 1 (LVIF1)) is set. At this time, approximately
2 ms are required until the LVI circuit operation is stabilized.
Once the LVI operation is started, divided resistors and comparators cannot be OFF unless the STOP instruction
or reset signal is generated, even LVION1 is cleared. Low-voltage detection is enabled immediately after LVION1 is
set again.
Caution The divider resistor and comparator of the LVI circuit are turned ON after reset is released.
Use one of the following methods to constantly monitor low voltage.
<1> Low-voltage monitoring by LVFI0 (bit 0 of low-voltage detection register 1 (LVIF1)) without using LVI
detection interrupt.
<2> Low-voltage monitoring using LVI detection interrupt. In this case, disable the LVI operation once, and then
enable it (LVION1 = 0
→
1) before enabling interrupts (LVIMK1 = 0).
An example of a program in which low voltage is constantly monitored using the LVI detection interrupt is shown
below.
(a) Processing when reset mode is released
DI
MOV
LVIS1, #xxH;
Setting LVI detection voltage
SET1
LVIMK1;
LVI interrupt disabled
SET1
LVION1;
LVI operation enabled
CALL
!WAIT_2ms;
2 ms wait
CLR1 LVIIF1;
CLR1
LVION1;
LVI operation disabled
SET1
LVION1;
LVI operation enabled
CLR1
LVIMK1;
LVI interrupt enabled
EI
(b) Processing when STOP mode is released
SET1
LVIMK1;
LVI interrupt disabled
STOP
CALL
!WAIT;
Total 2 ms wait, combined with oscillation stabilization time
CLR1
LVIIF1
CLR1
LVION1;
LVI operation disabled
SET1
LVION1;
LVI operation enabled
CLR1
LVIMK1;
LVI interrupt enabled
EI
Содержание PD789860
Страница 2: ...User s Manual U14826EJ5V0UD 2 MEMO ...