CHAPTER 4 PORT FUNCTIONS
User’s Manual U16896EJ2V0UD
85
4.3.3 Port 4
Port 4 is a 3-bit I/O port for which I/O settings can be controlled in 1-bit units.
Port 4 includes the following alternate functions.
Table 4-6. Alternate-Function Pins of Port 4
Pin No.
Pin Name
Alternate Function
I/O
PULL
Note
Remark Block
Type
19 P40
SI00
Input
–
D1-SUL
20 P41
SO00
Output
D0-UF
21 P42
SCK00
I/O
Yes
N-ch open-drain output can
be selected.
D2-SUFL
Note
Software pull-up function
Caution P40 and P42 have hysteresis characteristics when the alternate function is input, but not in the
port mode.
(1) Port 4 register (P4)
0
0 is output
1 is output
P4n
0
1
Control of output data (in output mode) (n = 0 to 2)
P4
0
0
0
0
P42
P41
P40
After reset: 00H (output latch) R/W Address: FFFFF408H
(2) Port 4 mode register (PM4)
1
Output mode
Input mode
PM4n
0
1
Control of I/O mode (n = 0 to 2)
PM4
1
1
1
1
PM42
PM41
PM40
After reset: FFH R/W Address: FFFFF428H