
CHAPTER 5 PORT FUNCTIONS
User’s Manual U17260EJ6V0UD
125
5.2.9 Port 12
Port 12 is a 5-bit 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, external clock input
for main system clock, and external clock input for subsystem clock.
Reset signal generation sets port 12 to input mode.
Figures 5-22 and 5-23 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) or subsystem clock (EXCLKS), 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 6.3 (1) Clock operation mode select register (OSCCTL) and (3)
Setting of operation mode for subsystem clock pin). 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. For products without an on-chip debug function and with the flash memory of 48 KB or more
(
PD78F0534, 78F0535, 78F0536, and 78F0537) and having a product rank of “I”, “K”, or “E”,
and for the product with an on-chip debug function (
PD78F0537D), connect P121/X1/
OCD0A
Note as follows when writing the flash memory with a flash programmer.
P121/X1/OCD0ANote: When using this pin as a port, connect it to VSS via a resistor (10 k:
recommended) (in the input mode) or leave it open (in the output mode).
The above connection is not necessary when writing the flash memory by means of self
programming.
Note OCD0A is provided to the
PD78F0537D only.
Remarks 1. For the product ranks, consult an NEC Electronics sales representative.
2. Only for the
PD78F0537D, 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 in-circuit emulator
supporting on-chip debugging (QB-78K0MINI or QB-MINI2), see CHAPTER 27 ON-CHIP DEBUG
FUNCTION (
PD78F0537D ONLY).
<R>