CHAPTER 14 PORT FUNCTION
User’s Manual U13850EJ4V0UM
394
(1) Functions of P4 and P5 pins
Ports 4 and 5 are 8-bit I/O ports for which I/O settings can be controlled in 1-bit units. I/O settings are controlled
via the port 4 mode register (PM4) the and port 5 mode register (PM5).
In output mode, the values set to each bit are output to the port 4 and 5 registers (P4 and P5).
When using these ports in input mode, the pin statuses can be read by reading the P4 and P5 registers. Also,
the P4 and P5 register (output latch) values can be read by reading the P4 and P5 registers while in output
mode.
A software pull-up function is not implemented.
When using the alternate function as AD0 to AD15, set the pin functions via the memory expansion register
(MM). This does not affect the PM4 and PM5 registers.
When a reset is input, the settings are initialized to input mode.
(2) Control register
(a) Port 4 mode register and port 5 mode register (PM4 and PM5)
PM4 and PM5 can be read/written in 1-bit or 8-bit units.
Figure 14-26. Port 4 Mode Register, Port 5 Mode Register (PM4, PM5)
After reset: FF
H
R/W
Address: FFFFF028H, FFFFF02AH
7
6
5
4
3
2
1
0
PMn
PMn7
PMn6
PMn5
PMn4
PMn3
PMn2
PMn1
PMn0
(n = 4, 5)
PMnx
Control of I/O mode (n = 4, 5, x = 0 to 7)
0
Output mode
1
Input mode
Содержание MPD703030A
Страница 2: ...User s Manual U13850EJ4V0UM 2 MEMO ...
Страница 514: ...User s Manual U13850EJ4V0UM 514 MEMO ...