84
CHAPTER 4 I/O PORTS
4.3 Port 3

Port 3 is a general-purpose I/O port and may also serve as input pins for external

interrupts as well as input and output pins for peripherals.

This section mainly explains the general-purpose I/O function of the port.

This section also describes port 3 concerning to the structure, pins, a block diagram of

pins, and associated registers.

Structure of Port 3
Port 3 comprises the following four elements:
General-purpose I/O pins, external interrupt 1 input pins, and input/output pins for peripherals (P30/
UCK/SCK to P37/BZ/PPG)
Port 3 data register (PDR3)
Port 3 data direction register (DDR3)
Port 3 pull-up setting register (PUL3)
Pins of Port 3
Port 3 has eight CMOS I/O pins. These pins can be used as both input pins and external interrupt input pins
at the same time. These pins cannot be used as a general-purpose I/O port when being used for peripherals.
Table 4.3-1 lists the pins of port 3.
For circuit type, see "1.7 Pin Functions Description ".
Table 4.3-1 Pins of Port 3
Port
name Pin name Function Peripherals for which the pin may serve Input and output form Circuit
type
Input Output
Port 3
P30/UCK/SCK P30 general-purpose
I/O UCK
SCK UART clock I/O
8-bit serial I/O clock I/O CMOS
hysteresis
CMOS
B
P31/UO/SO P31 general-purpose
I/O UO
SO UART data output
8-bit serial I/O data output CMOS E
P32/UI/SI P32 general-purpose
I/O UI
SI UART data input
8-bit serial I/O data input CMOS
hysteresis
B
P33/EC P33 general-purpose
I/O EC 8/16-bit timer and counter clock inputs
CMOS
hysteresis
P34/TO/INT10 P34 general-purpose
I/O TO
INT10 8/16-bit timer and counter timer outputs
External interrupt input 10
P35/INT11 P35 general-purpose
I/O INT11 External interrupt input 11
P36/INT12 P36 general-purpose
I/O INT12 External interrupt input 12
P37/BZ/PPG P37 general-purpose
I/O BZ
PPG Buzzer output
12-bit PPG output CMOS E