
Port Definitions
PRELIMINARY V1.8
73
TABLE 45.
Definition of P0NOPN
14.7.
P2 (Port-2)
The Pins-2.0 to 2.7 have two functional modes, ADDR Mode (High Address Mode) and
Port Mode (Bi-directional Port Mode). Initial Status is ADDR Mode because PCR2
(Port Control Register Bit-2) is 0 (low). In Port Mode, the direction of Port-2 can be
decided bit-by-bit. The read policy in Port Mode follows that described before. Read-
Modify-Write instructions read the port latch than the pin.
To use Pin-2.0 to 2.7 as a normal input port, PCR2 should be high. If PCR2 is high, the
direction of each Port-2 pin is decided by each P2IO bit. If the P2IO bit-x is high, Port-
2.x is output mode. If low, Port-2.x is input mode. Initial status is input mode because
P2IO (Port-2 I/O Direction Register) is reset to 00000000B. In input mode, pull-up
resistor can be connected by P2RD (Port-2 Resistor Disable Register). If the P2RD bit-x
is high, Port-2.x pull-up resistor is disconnected. If low, Port-2.x pull-up resistor is
connected. Initial status of P2RD is 00000000B, thus pull-up resistor is connected. If
ZCR2 (High-Z Control Register Bit-2) is high, High-Z control is enabled. At this time,
if HIZ bit in the PSCR (Power Saving Control Register) becomes high, pull-up resistor
is disconnected and pin status becomes high impedance.
To use Pin-2.0 to 2.7 as a normal output port, PCR2 should be high. If the P2IO bit-x is
high, Port-2.x is output mode. In output mode, pull-up resistor is not automatically
disconnected regardless P2RD bit-x. If ZCR2 (High-Z Control Register Bit-2) is high,
High-Z control is enabled. At this time, if HIZ bit in the PSCR (Power Saving Control
Register) becomes high, pin status becomes high impedance.
To use Pin-2.0 to 2.7 as an ADDR output port, PCR2 should be low (reset value). If
PCR2 is low, the direction of each Port-2 pin is controlled by CPU. In output mode,
pull-up resistor is not automatically disconnected regardless P2RD bit-x. For the ADDR
Mode, the ZCR2 must be low (reset value) not to support Hi-Z state.
When P2NOPNx = 0, Port-2.x output buffer will be CMOS Push-Pull. But, P2NOPNx
= 1, Port-2.x output buffer will become N-channel Open Drain.
Read/Write
by Software
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
Write
by Hardware