
CHAPTER 23 LOW-VOLTAGE DETECTOR
User’s Manual U19780EJ2V0UD
572
(3) Port mode register 12 (PM12)
When using the P120/EXLVI/INTP0 pin for external low-voltage detection potential input, set PM120 to 1. At this
time, the output latch of P120 may be 0 or 1.
PM12 can be set by a 1-bit or 8-bit memory manipulation instruction.
Reset signal generation sets PM12 to FFH.
Figure 23-4. Format of Port Mode Register 12 (PM12)
0
PM120
1
PM121
2
PM122
3
PM123
Note
4
PM124
Note
5
1
6
1
7
1
Symbol
PM12
Address: FF2CH After reset: FFH R/W
PM12n
P12n pin I/O mode selection (n = 0 to 4)
0
Output mode (output buffer on)
1
Input mode (output buffer off)
Note
For the 78K0/KB2-A, be sure to set bit 3 and 4 of PM12 to “1”.
23.4 Operation of Low-Voltage Detector
The low-voltage detector can be used in the following two modes.
(1) Used as reset (LVIMD = 1)
•
If LVISEL = 0, compares the supply voltage (V
DD
) and detection voltage (V
LVI
), generates an internal reset
signal when V
DD
< V
LVI
, and releases internal reset when V
DD
≥
V
LVI
.
•
If LVISEL = 1, compares the input voltage from external input pin (EXLVI) and detection voltage (V
EXLVI
= 1.21
V
(TYP.)), generates an internal reset signal when EXLVI < V
EXLVI
, and releases internal reset when EXLVI
≥
V
EXLVI
.
(2) Used as interrupt (LVIMD = 0)
•
If LVISEL = 0, compares the supply voltage (V
DD
) and detection voltage (V
LVI
). When V
DD
drops lower than
V
LVI
(V
DD
< V
LVI
) or when V
DD
becomes V
LVI
or higher (V
DD
≥
V
LVI
), generates an interrupt signal (INTLVI).
•
If LVISEL = 1, compares the input voltage from external input pin (EXLVI) and detection voltage (V
EXLVI
= 1.21
V (TYP.)). When EXLVI drops lower than V
EXLVI
(EXLVI < V
EXLVI
) or when EXLVI becomes V
EXLVI
or higher
(EXLVI
≥
V
EXLVI
), generates an interrupt signal (INTLVI).
While the low-voltage detector is operating, whether the supply voltage or the input voltage from an external input
pin is more than or less than the detection level can be checked by reading the low-voltage detection flag (LVIF: bit 0
of LVIM).
Remark
LVIMD: Bit 1 of low-voltage detection register (LVIM)
LVISEL: Bit 2 of LVIM