English
Language : 

UPD780204 Datasheet, PDF (95/418 Pages) NEC – 8-Bit Single-Chip Microcontrollers
CHAPTER 4 PORT FUNCTIONS
4.3 Port Function Control Registers
The following two types of registers control the ports.
• Port mode registers (PM0, PM1, PM2, PM3, PM7, PM10, PM11, PM12)
• Pull-up resistor option register (PUO)
(1) Port mode registers (PM0, PM1, PM2, PM3, PM7, PM10, PM11, PM12)
These registers are used to set port input/output in 1-bit units.
PM0, PM1, PM2, PM3, PM7, PM10, PM11, and PM12 are independently set with a 1-bit or 8-bit memory
manipulation instruction.
RESET input sets PM0 and PM7 to 1FH, and the other registers to FFH.
When a port pin is used as an alternate-function pin, set the port mode register and the output latch according
to Table 4-3.
Cautions 1. Pins P00 and P04 are input-only pins.
2. Pins P80 to P87 and P90 to P97 are output-only pins.
3. As port 0 has an alternate function as external interrupt request input, when the port
function output mode is specified and the output level is changed, the interrupt request flag
is set. When the output mode is used, therefore, the interrupt mask flag should be set to
1 beforehand.
Table 4-3. Port Mode Register and Output Latch Setting When Alternate Function Is Used
Pin Name
Alternate Function
PMxx Pxx
Function Name I/O
P00
INTP0
Input 1 (fixed) None
TI0
Input 1 (fixed) None
P01, P02
INTP1, INTP2 Input
1
X
P03
INTP3
P04Note 1
XT1
Note 1
P10 to P17
ANI0 to ANI7
P30 to P32 TO0 to TO2
Input
1
X
Input 1 (fixed) None
Input
1
X
Output 0
0
Pin Name
Alternate Function
Function Name I/O
P33, P34
TI1, TI2
Input
P35
PCL
Output
P36
BUZ
Output
P100 to P107 FIP29 to FIP36 Output
P110 to P117 FIP37 to FIP44 Output
P120 to P127 FIP45 to FIP52 Output
PMxx
1
0
0
0
0
0
Pxx
X
0
0
0Note 2
0Note 2
0Note 2
Notes 1. If a read instruction is executed to these ports in the alternate-function mode, the read data will be
undefined.
2. Key scan data can be set while the VFD controller/driver is operating.
Caution When port 2 is used as serial interface pins, I/O and the output latch should be set according
to the function. For the settings, refer to Figure 13-3 Format of Serial Operating Mode Register
0 and Figure 14-3 Format of Serial Operating Mode Register 1.
Remark X: don’t care
PMxx: Port mode register
Pxx: Port output latch
User’s Manual U11302EJ4V0UM
95