English
Language : 

UPD784938 Datasheet, PDF (517/733 Pages) NEC – 16-Bit Single-Chip Microcontrollers
CHAPTER 22 EDGE DETECTION FUNCTION
P20 to P26 have an edge detection function that allows a rising edge/falling edge to be set programmable, and the
detected edge is sent to internal hardware. The relation between pins P20 to P26 and the use of the detected edge is shown
in Table 22-1.
Table 22-1. Pins P20 to P26 and Use of Detected Edge
Pin
Use
P20 NMI, standby circuit control
P21 INTP0, timer/event counter 1 capture signal
timer/event counter 1 count clock signal
Real-time output port trigger signal
P22 INTP1, timer/event counter 2 CR22 capture signal
P23 INTP2, CI (timer/event counter 2 count clock signal),
timer/event counter 2 CR21 capture signal
P24 INTP3, timer/event counter 0 capture signal
timer/event counter 0 count clock signal
P25 INTP4, standby circuit control
P26 INTP5, A/D converter conversion start signal, standby circuit control
Detected Edge Specification Register
INTM0
INTM1
The edge detection function operates at all times except in STOP mode and IDLE mode (although the edge detection
function for pins P20, P25, and P26 also operates in STOP mode and IDLE mode).
For the P21/INTP0 pin, the noise elimination time when edge detection is performed can be selected by software.
22.1 Edge Detection Function Control Registers
22.1.1 External interrupt mode registers (INTM0, INTM1)
The INTMn (n = 0, 1) specify the valid edge to be detected on pins P20 to P26. The INTM0 specifies the valid edge
for pins P20 to P23, and the INTM1 specifies the valid edge for pins P24 to P26.
The INTMn can be read or written to with an 8-bit manipulation instruction or bit manipulation instruction. The format
of INTM0 and INTM1 are shown in Figures 22-1 and 22-2 respectively.
RESET input clears these registers to 00H.
Preliminary User’s Manual U13987EJ1V0UM00
517