72
CHAPTER 3 PIN FUNCTIONS (
μ
PD78018F SUBSERIES)
3.2.3 P20-P27 (Port2)
These pins constitute an 8-bit I/O port, port 2. In addition, these pins are also used to input/output the data of
the serial interface, input/output a clock signal, input a busy signal used for automatic transmission/reception, and
output a strobe signal.
Port 2 can be specified in the following operation modes in 1-bit units.
(1) Port mode
In the port mode, P20 and P27 function as an 8-bit I/O port. Port 2 can be set in the input or output mode
in 1-bit units by using the port mode register 2 (PM2). When the port is used as an input port, an internal pull-
up resistor can be used if so specified by the pull-up resistor option register (PUO).
(2) Control mode
In this mode, P20 through P27 input/output the data of the serial interface, input/output a clock, input a busy
signal for automatic transmission/reception, and output a strobe signal.
(a) SI0, SI1, SO0, SO1
These are the serial data I/O pins of the serial interface.
(b) SCK0, SCK1
These are serial clock I/O pins of the serial interface.
(c) SB0, SB1
These are I/O pins of the NEC standard serial bus interface.
(d) BUSY
This pin inputs the busy signal for the automatic transmit/receive function of the serial interface.
(e) STB
This pin outputs a strobe signal for the automatic transmit/receive function of the serial interface.
Caution When using P20 through P27 as serial interface pins, the input/output mode and output
latch must be set according to the functions to be used. For the details of the setting,
refer to Figure 15-3. Format of Serial Operation Mode Register 0 and Figure 17-3. Format
of Serial Operation Mode Register 1.