114
CHAPTER 5 PORT FUNCTIONS
User’s Manual U12697EJ3V0UM
5.2.3 Port 2
Port 2 is an 8-bit I/O port with output latch. P20 to P27 pins can specify the input mode/output mode in 1-bit units
with the port 2 mode register. A pull-up resistor can be connected via pull-up resistor option register 2, regardless
of whether the input mode or output mode is specified.
The P25 and P27 pins can be specified as N-ch open-drain with a port function control register (only the
µ
PD784225Y Subseries).
Port 2 supports serial interface data input/output, clock input/output, clock output, and buzzer output as alternate
functions.
RESET input sets port 2 to the input mode.
Figures 5-4 to 5-7 show a block diagram of port 2.
Figure 5-4. Block Diagram of P20 and P22
P-ch
WR
PM
WR
PORT
RD
WR
PU
V
DD
Selector
PU20, PU22
Output latch
(P20, P22)
PM20, PM22
Internal bus
P20/SI1/RxD1,
P22/SCK1/ASCK1
Alternate
function
PU: Pull-up resistor option register
PM: Port mode register
RD: Port 2 read signal
WR: Port 2 write signal