English
Language : 

UPD78F9500MA-CAC-A Datasheet, PDF (58/342 Pages) Renesas Technology Corp – 8-Bit Single-Chip Microcontrollers
CHAPTER 4 PORT FUNCTIONS
4.2.1 Port 2
(1) μPD78F920x
Port 2 is a 4-bit I/O port with an output latch. Each bit of this port can be set to the input or output mode by using
port mode register 2 (PM2). When the P20 to P23 pins are used as an input port, an on-chip pull-up resistor can be
connected in 1-bit units by using pull-up resistor option register 2 (PU2).
This port can also be used for A/D converter analog input, timer I/O, and external interrupt request input.
The P22 and P23 pins are also used as the X2 and X1 pins of the system clock oscillator. The functions of the P22
and P23 pins differ, therefore, depending on the selected system clock oscillator. The following three system clock
oscillators can be used.
<1> High-speed internal oscillator
The P22 and P23 pins can be used as I/O port pins or analog input pins to the A/D converter.
<2> Crystal/ceramic oscillator
The P22 and P23 pins cannot be used as I/O port pins or analog input pins to the A/D converter because
they are used as the X2 and X1 pins.
<3> External clock input
The P22 pin can be used as an I/O port pin or an analog input pin to the A/D converter.
The P23 pin is used as the X1 pin to input an external clock, and therefore it cannot be used as an I/O port
pin or an analog input pin to the A/D converter.
The system clock oscillation is selected by the option byte. For details, refer to CHAPTER 15 OPTION BYTE.
Reset signal generation sets port 2 to the input mode.
Figures 4-2 and 4-4 show the block diagrams of port 2.
56
User’s Manual U18172EJ3V0UD