
CHAPTER 4 PORT FUNCTIONS
User’s Manual U17854EJ9V0UD
109
4.2.4 Port 3
Port 3 is a 2-bit I/O port with an output latch. Port 3 can be set to the input mode or output mode in 1-bit units
using port mode register 3 (PM3). When the P30 and P31 pins are used as an input port, use of an on-chip pull-up
resistor can be specified in 1-bit units by pull-up resistor option register 3 (PU3).
This port can also be used for external interrupt request input, timer I/O, and real-time counter correction clock
output.
Reset signal generation sets port 3 to input mode.
Figure 4-13 shows block a diagram of port 3.
Cautions 1. To use P31/TI03/TO03/INTP4 as a general-purpose port, set bit 3 (TO03) of timer output
register 0 (TO0) and bit 3 (TOE03) of timer output enable register 0 (TOE0) to “0”, which is the
same as their default status setting.
2. To use P30/RTC1HZ/INTP3 as a general-purpose port, set bit 5 (RCLOE1) of Real-time counter
control register 0 (RTCC0) to “0”, which is the same as their default status setting.
Figure 4-13. Block Diagram of P30 and P31
P30/RTC1HZ/INTP3,
P31/TI03/TO03/INTP4
WRPU
RD
WRPORT
WRPM
PU30, PU31
PM30, PM31
EVDD
P-ch
PU3
PM3
P3
Alternate
function
Output latch
(P30, P31)
Selector
Internal
bus
Alternate
function
P3:
Port register 3
PU3:
Pull-up resistor option register 3
PM3:
Port mode register 3
RD:
Read signal
WR
××: Write signal