CHAPTER 2 PIN FUNCTION
17
2.2.3 P20 to P27 (Port 2)
These are 8-bit input/output ports. Besides serving as input/output ports, they function as data input/output to/
from the serial interface, clock input/output, automatic transmit/receive busy input, and strobe output functions.
The following operating modes can be specified bit-wise.
(1) Port mode
These ports function as 8-bit input/output ports. They can be specified bit-wise as input or output ports with a
port mode register 2 (PM2). When they are used as input ports, a pull-up resistor can be used to them with an
on-chip pull-up resistor option register (PUO).
(2) Control mode
These ports function as serial interface data input/output, clock input/output, automatic transmit/receive busy
input, and strobe output functions.
(a) SI0, SI1, SO0, SO1
Serial interface serial data input/output pins
(b) SCK0 and SCK1
Serial interface serial clock input/output pins
(c) SB0 and SB1
NEC standard serial bus interface input/output pins
(d) BUSY
Serial interface automatic transmit/receive busy input pins
(e) STB
Serial interface automatic transmit/receive strobe output pins
Caution
If port 2 is used as a serial interface, the I/O and output latches must be set according
to its functions. For the setting method, refer to Figure 14-3, "Serial Operating Mode
Register 0 Format", and Figure 15-3, "Serial Operating Mode Register 1 Format".
2.2.4 P30 to P37 (Port 3)
These are 8-bit input/output ports. Beside serving as input/output ports, they function as timer input/output, clock
output and buzzer output.
Mask ROM version can contain pull-down resistors with the mask option.
Port 3 can drive LEDs directly.
The following operating modes can be specified bit-wise.
(1) Port mode
These ports function as 8-bit input/output ports. They can be specified bit-wise as input or output ports with port
mode register 3 (PM3). When they are used as input ports, a pull-up resistor can be used with an on-chip pull-
up resistor option register (PUO).