![](http://datasheet.mmic.net.cn/380000/-PD78F9801_datasheet_16745018/-PD78F9801_33.png)
CHAPTER 2 PIN FUNCTIONS
33
2.2 Description of Pin Functions
2.2.1 P00 to P07 (Port 0)
These pins constitute an 8-bit I/O port and can be set in the input or output port mode in 1-bit units by using port
mode register 0 (PM0). When these pins are used as an input port, an on-chip pull-up resistor can be used in pull-
up resistor option register 0 (PU0). When these pins are used as an output port, CMOS output or N-ch open-drain
output is specifiable in port output mode register 0 (POM0).
2.2.2 P10 to P17 (Port 1)
These pins constitute an 8-bit I/O port. Port 1 can be set in the input or output mode in 1-bit units by using port
mode register 1 (PM1). When the port is used as an input port, an on-chip pull-up resistor can be used in pull-up
resistor option register 0 (PU0). When these pins are used as an output port, CMOS output or N-ch open-drain
output is specifiable in port output mode register 0 (POM0).
2.2.3 P20 to P26 (Port 2)
These pins constitute a 7-bit I/O port. In addition, these pins enables data input/output, and clock input/output to
and from the serial interface, external interrupt input, and timer input/output.
Port 2 can be specified in the following operation modes in 1-bit units.
(1)
Port mode
In the port mode, P20 through P26 function as a 7-bit I/O port. Port 2 can be set in the input or output mode
in 1-bit units by using port mode register 2 (PM2). When the port is used as an input port, an on-chip pull-
up resistor can be used in pull-up resistor option register 0 (PU0). When P25 or P26 is used as an output
port, CMOS output or N-ch open-drain output is specifiable in port output mode register 1 (POM1).
(2)
Control mode
In this mode, P20 through P26 function as the data input/output and the clock input/output to and from the
serial interface.
(a)
SI10, SO10
These are the serial data I/O pins of the serial interface.
(b)
SCK10
This is the serial clock I/O pin of the serial interface.
(c)
TI01
This is an external clock input pin for the 8-bit timer/event counter.
(d)
TO01
This is the output pin of the 8-bit timer.