CHAPTER 4 PORT FUNCTIONS
User’s Manual U16898EJ3V0UD
61
Figure 4-13. Format of Port Mode Register
Address: FF22H After reset: FFH R/W
Symbol
7 6 5 4 3 2 1 0
PM2
1 1 1 1
PM23
PM22
PM21
PM20
Address: FF23H After reset: FFH R/W
Symbol
7 6 5 4 3 2 1 0
PM3
1 1 1 1 1 1
PM31
PM30
Address: FF24H After reset: FFH R/W
Symbol
7 6 5 4 3 2 1 0
PM4 1
1 PM45 PM44 PM43 PM42 PM41 PM40
Address: FF2CH After reset: FFH R/W
Symbol
7 6 5 4 3 2 1 0
PM12
1 1 1 1
PM123
PM122
PM121
1
PMmn
Selection of I/O mode of Pmn pin (m = 2, 3, 4, or 12; n = 0 to 5)
0
Output mode (output buffer ON)
1
Input mode (output buffer OFF)
(2) Port registers (P2, P3, P4, P12, P13)
These registers are used to write data to be output from the corresponding port pin to an external device
connected to the chip.
When a port register is read, the pin level is read in the input mode, and the value of the output latch of the
port is read in the output mode.
P20 to P23, P30, P31, P34, P40 to P45, P121 to P123, and P130 are set by using a 1-bit or 8-bit memory
manipulation instruction.
Reset signal generation sets these registers to 00H.