English
Language : 

UPD784938 Datasheet, PDF (56/733 Pages) NEC – 16-Bit Single-Chip Microcontrollers
CHAPTER 2 PIN FUNCTIONS
(3) P20 to P27 (Port 2) ... Input
Port 2 is an 8-bit input-only port. P22 to P27 incorporate a software programmable pull-up resistor. As well as operating
as an input port, port 2 pins also operate as control signal input pins, such as external interrupt signal pins (see Table
2-2). All 8 pins are Schmitt-triggered inputs to prevent misoperation due to noise.
Also, pin P25 can also be made to function as a serial clock output pin by selecting the external clock as “serial operation
enabled” with the clocked serial interface mode register 1 (CSIM1).
Table 2-2. Port 2 Operation Modes
Port
P20
P21
P22
P23
P24
P25
P26
P27
Function
Input port/NMI inputNote
Input port/INTP0 input/CR11 capture trigger input/
timer/event counter 1 count clock/real-time output port trigger signal
Input port/INTP1 input/CR22 capture trigger input
Input port/INTP2 input/CI input
Input port/INTP3 input/CR02 capture trigger input/
timer/event counter 0 count clock
Input port/INTP4 input/ASCK input/SCK1 input/output
Input port/INTP5 input/A/D converter external trigger input
Input port/SI0 input
Note NMI input is acknowledged regardless of whether interrupts are enabled or disabled.
(a) Function as port pins
The pin level can always be read or tested regardless of the alternate function pin operation.
(b) Functions as control signal input pins
(i) NMI (Non-maskable Interrupt)
The external non-maskable interrupt request input pin. Rising edge detection or falling edge
detection can be specified by setting the external interrupt mode register 0 (INTM0).
(ii) INTP0 to INTP5 (Interrupt from Peripherals)
External interrupt request input pins. When the valid edge specified by the external interrupt mode register 0,
1 (INTM0/INTM1) is detected by pins INTP0 to INTP5, an interrupt is generated (see CHAPTER 22 EDGE
DETECTION FUNCTION).
In addition, pins INTP0 to INTP3 and INTP5 are also used as external trigger input pins with the various functions
shown below.
• INTP0 ....... Timer/event counter 1 capture trigger input pin
Timer/event counter 1 external count clock input pin
Real-time output port trigger input pin
• INTP1 ....... Timer/event counter 2 capture trigger input pin to capture register (CR22)
• INTP2 ....... Timer/event counter 2 external count clock input pin
Capture trigger input pin to capture/compare register (CR21)
• INTP3 ....... Timer/event counter 0 capture trigger input pin
Timer/event counter 0 external count clock input pin
• INTP5 ....... A/D converter external trigger input pin
56
Preliminary User’s Manual U13987EJ1V0UM00