CHAPTER 4 PORT FUNCTIONS
95
User’s Manual U11302EJ4V0UM
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
Pin Name
Alternate Function
PMxx
Pxx
P00
INTP0
Input
1 (fixed)
None
P33, P34
TI1, TI2
Input
1
X
TI0
Input
1 (fixed)
None
P35
PCL
Output
0
0
P01, P02
INTP1, INTP2
Input
1
X
P36
BUZ
Output
0
0
P03
INTP3
Input
1
X
P100 to P107
FIP29 to FIP36
Output
0
0
Note 2
P04
Note 1
XT1
Input
1 (fixed)
None
P110 to P117
FIP37 to FIP44
Output
0
0
Note 2
P10 to P17
ANI0 to ANI7
Input
1
X
P120 to P127
FIP45 to FIP52
Output
0
0
Note 2
P30 to P32
TO0 to TO2
Output
0
0
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
Note 1
I/O
I/O
Function Name
Function Name