49
CHAPTER 2 PIN FUNCTIONS
2.2 Description of Pin Functions
(1) P00 through P03 (Port 0) ... 3-state I/O
Port 0 is a 4-bit I/O port with an output latch. This port can be set in the input or output mode in 1-bit units by using
port 0 mode register (PM0). Each pin of this port is provided with a software programmable pull-up resistor.
In addition to the I/O port function, port 0 also functions as a 4-bit real-time output port and can output the contents
of port 0 buffer register (P0L) at any interval time. Whether port 0 is used as a normal output port or real-time output
port is specified by real-time output port control register (RTPC).
When RESET is input, this port is set in the input mode (output high-impedance status), and the contents of the
output latch are undefined.
Table 2-1. Operation Mode of Port 0
Pin Name
Port Mode
Real-Time Output Port Mode
Manipulation to Use Port 0 as Real-Time Output Port
P00-P03
I/O port
RTP0-RTP3
Setting of P0ML bit of RTPC to 1
Remark
For details, refer to
CHAPTER 6 REAL-TIME OUTPUT FUNCTION
.
(2) P10 through P13 (Port 1) ... 3-state I/O
Port 1 is a 4-bit I/O port with an output latch. This port can be set in the input or output mode in 1-bit units by using
port 1 mode register (PM1).
In addition to the I/O port function, port 1 also functions as the timer output pins of timers/counters 2 and 3. The
operation mode of this port is specified in 1-bit units by using port 1 mode control register (PMC1), as shown in
Table 2-2. The level of each pin can be read or tested regardless of the multiplexed function.
When RESET is input, this port is set in the input mode (output high-impedance status), and the contents of the
output latch are undefined.
Table 2-2. Operation Mode of Port 1
Pin Name
Port Mode
Control Signal Output Mode
Manipulation to Use Port 1 as Control Pins
P10
I/O port
TO20 output
Setting of PMC10 bit of PMC1 to 1
P11
TO21 output
Setting of PMC11 bit of PMC1 to 1
P12
TO30 output
Setting of PMC12 bit of PMC1 to 1
P13
TO31 output
Setting of PMC13 bit of PMC1 to 1
(a) Port mode
Each pin of port 1 set in the port mode by the port 1 mode control register (PMC1) can be set in the input or
output mode in 1-bit units by using the port 1 mode register (PM1).
(b) Control signal output mode
The pins of port 1 can be used as control pins in 1-bit units if so specified by the port 1 mode control register
(PMC1).
(i) TO20, TO21
These pins are timer output pins of timer/counter 2.
(ii) TO30, TO31
These pins are timer output pins of timer/counter 3.