Port 2; Functions Of Port 2 - NEC PD78212 User Manual

8-bit single-chip microcomputer sub-series
Table of Contents

Advertisement

5.3 PORT 2

Port 2 is an 8-bit input-only port. P22 through P27 have a software-programmable built-in pull-up resistor. In
addition to functioning as an input port, port 2 functions as a control signal input pin such as for external interrupts
(see Table 5-3). All the 8 input pins of port 2 are configured as Schmitt trigger circuits in order to prevent
malfunction due to noise.
Port
P20
P21
P22
P23
P24
P25
P26
P27
Note NMI inputs are accepted regardless of whether interrupts are enabled.
(a) Function as a port pin
Although the pins of port 0 are shared by more than one function, the level of each pin can be read and tested.
(b) Function as a control signal input pin
(i) NMI (nonmaskable interrupt)
The NMI pin receives a nonmaskable interrupt request from the outside. The external interrupt mode
register (INTM0) specifies which edge, rising or falling, is valid as an interrupt request signal.
(ii) INTP0 through INTP5 (interrupt from peripherals)
The INTP0 through INTP5 pins receive interrupt requests from the outside. An interrupt occurs when one
of these pin receives an edge specified as valid by the external interrupt mode register (INTM0 and
INTM1). (See Chapter 11.)
The INTP0 through INTP3 and INTP5 pins are also used to receive external triggers, as listed below:
• INTP0: 8-bit timer/counter 1 capture trigger input and real-time output port trigger signal
• INTP1: 8-bit timer/counter 2 capture trigger input
• INTP2: 8-bit timer/counter 2 external count clock input
• INTP3: 16-bit timer/counter 2 capture trigger input
• INTP5: A/D converter external trigger input
(iii) CI (clock input)
The CI pin receives external clock inputs for 8-bit timer/counter 2.
(iv) ASCK (asynchronous serial clock)
The ASCK pin receives a baud rate clock from the outside.
(v) SI (serial input)
The SI pin receives serial data (during three-wire serial I/O mode).
Table 5-3 Functions of Port 2
Note
Input port/NMI input
Input port/INTP0 input/CR11 capture trigger input/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
Input port/INTP4 input/ASCK input
Input port/INTP5 input/A/D controller external trigger input
Input port/SI input
Chapter 5 Port Functions
Function
5
63

Advertisement

Table of Contents
loading

Table of Contents