
CHAPTER 4 PORT FUNCTIONS
User’s Manual U19780EJ2V0UD
109
4.2.9 Port 12
78K0/KB2-A 78K0/KC2-A
P120/INTP0/EXLVI
P121/X1/OCD0A
P122/X2/OCD0B
−
P123/XT1
−
P124/XT2
Port 12 is an I/O port with an output latch. Port 12 can be set to the input mode or output mode in 1-bit units using
port mode register 12 (PM12). When used as an input port only for P120, use of an on-chip pull-up resistor can be
specified by pull-up resistor option register 12 (PU12).
This port can also be used as pins for external interrupt request input, potential input for external low-voltage
detection, connecting resonator for main system clock, connecting resonator for subsystem clock, and external clock
input for main system clock.
Reset signal generation sets port 12 to input mode.
Figures 4-22 to 4-24 show block diagrams of port 12.
Cautions 1. When using the P121 to P124 pins to connect a resonator for the main system clock (X1, X2)
or subsystem clock (XT1, XT2), or to input an external clock for the main system clock
(EXCLK), the X1 oscillation mode, XT1 oscillation mode, or external clock input mode must
be set by using the clock operation mode select register (OSCCTL) (for details, see 5.3 (1)
Clock operation mode select register (OSCCTL)). The reset value of OSCCTL is 00H (all of
the P121 to P124 pins are I/O port pins). At this time, setting of the PM121 to PM124 and P121
to P124 pins is not necessary.
2. Process the P121/X1/OCD0A pin as follows, when it is not used when it is connected to a
flash memory programmer or an on-chip debug emulator.
P121/X1/OCD0A
Flash memory programmer connection
During reset
Connect to V
SS
via a open or resistor.
On-chip debug
emulator connection
(when it is not used
as an on-chip debug
mode setting pin)
During reset released
Input:
Connect to V
DD
or V
SS
via a
resistor.
Output: Leave
open.
Remark
X1 and X2 can be used as on-chip debug mode setting pins (OCD0A, OCD0B) when the on-chip debug
function is used. For how to connect an on-chip debug emulator (QB-MINI2), see
CHAPTER 26 ON-
CHIP DEBUG FUNCTION.