Port 12 - NEC 78K0S/KA1+ User Manual

8-bit single-chip microcontrollers
Hide thumbs Also See for 78K0S/KA1+:
Table of Contents

Advertisement

4.2.4

Port 12

Port 12 is a 3-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 12 (PM12). When the P123 pin is used as an input port, an on-chip pull-up resistor can be
connected by using pull-up resistor option register 12 (PU12).
The P121 and P122 pins are also used as the X1 and X2 pins of the system clock oscillator. The functions of the
P121 and P122 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 P121 and P122 pins can be used as I/O port pins.
(2) Crystal/ceramic oscillator
The P121 and P122 pins cannot be used as I/O port pins because they are used as the X1 and X2 pins.
(3) External clock input
The P121 pin is used as the X1 pin to input an external clock, and therefore it cannot be used as an I/O port pin.
The P122 pin can be used as an I/O port pin.
The system clock oscillation is selected by the option byte. For details, refer to CHAPTER 17 OPTION BYTE.
Reset signal generation sets port 12 to the input mode.
Figures 4-10 and 4-11 show the block diagrams of port 12.
RD
WR
PORT
WR
PM
P12:
Port register 12
PM12:
Port mode register 12
RD:
Read signal
WR××: Write signal
58
CHAPTER 4 PORT FUNCTIONS
Figure 4-10. Block Diagram of P121 and P122
P12
Output latch
(P121, P122)
PM12
PM121, PM122
User's Manual U16898EJ3V0UD
P121/X1,
P122/X2

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents