When Used As Interrupt - NEC 78K0R/KE3 User Manual

16-bit single-chip microcontrollers
Table of Contents

Advertisement

20.4.2 When used as interrupt

(1) When detecting level of supply voltage (V
(a) When LVI Default Start Function Stopped Is Set (Option Byte: LVIOFF = 1)
• When starting operation
<1>
Mask the LVI interrupt (LVIMK = 1).
<2>
Clear bit 2 (LVISEL) of the low-voltage detection register (LVIM) to 0 (detects level of supply voltage
(V
)) (default value).
DD
Clear bit 1 (LVIMD) of LVIM to 0 (generates interrupt signal when the level is detected) (default value).
<3>
Set the detection voltage using bits 3 to 0 (LVIS3 to LVIS0) of the low-voltage detection level
selection register (LVIS).
<4>
Set bit 7 (LVION) of LVIM to 1 (enables LVI operation).
<5>
Use software to wait for the following periods of time (Total 410
• Operation stabilization time (10
• Minimum pulse width (200
• Detection delay time (200
<6>
Confirm that "supply voltage (V
or "supply voltage (V
(LVIF) of LVIM.
<7>
Clear the interrupt request flag of LVI (LVIIF) to 0.
<8>
Release the interrupt mask flag of LVI (LVIMK).
<9>
Execute the EI instruction (when vector interrupts are used).
Figure 20-8 shows the timing of the interrupt signal generated by the low-voltage detector. The numbers in
this timing chart correspond to <1> to <8> above.
• When stopping operation
Either of the following procedures must be executed.
When using 8-bit memory manipulation instruction:
Write 00H to LVIM.
When using 1-bit memory manipulation instruction:
Clear LVION to 0.
CHAPTER 20 LOW-VOLTAGE DETECTOR
)
DD
μ
s (MAX.))
μ
s (MIN.))
μ
s (MAX.))
) ≥ detection voltage (V
DD
) < detection voltage (V
DD
User's Manual U17854EJ9V0UD
μ
s).
)" when detecting the falling edge of V
LVI
)" when detecting the rising edge of V
LVI
,
DD
, at bit 0
DD
643

Advertisement

Table of Contents
loading

Table of Contents