77
CHAPTER 4 PORT FUNCTIONS
Preliminary User’s Manual U16035EJ1V0UM
4.2.3 Port 2
Port 2 is a 6-bit I/O port with output latch. P20 to P25 pins can specify the input mode/output mode in 1-bit units
with the port mode register 2 (PM2). An on-chip pull-up resistor of P20 to P25 pins can be used for them in 1-bit
units with a pull-up resistor option register 2 (PU2).
This port has also alternate functions as serial interface data I/O and clock I/O.
RESET input sets port 2 to input mode.
Figures 4-4 and 4-5 show block diagrams of port 2.
Figure 4-4. Block Diagram of P20, P22, P23, and P25
Internal bus
V
DD0
P-ch
P20/SI30,
P22/SCK30,
P23/RxD0,
P25/ASCK0
WR
PU
RD
WR
PORT
WR
PM
PU20, PU22,
PU23, PU25
Alternate
function
Output latch
(P20, P22, P23, P25)
PM20, PM22,
PM23, PM25
Selector
PU:
Pull-up resistor option register
PM: Port mode register
RD: Port 2 read signal
WR: Port 2 write signal