
141
Chapter 4
Port Functions
User’s Manual U16702EE3V2UD00
4.3.8 Port
7
Port 7 is a 16-bit port for which I/O settings can be controlled in 1-bit units.
(1)
Port 7 functions
•
16-bit I/O port
•
Port input/output specifiable in 1-bit units by port mode register 7 (PM7)
See
Table 4-8, “Port Type,” on page 170
for alternate functions.
(2)
Registers
(a) Port register 7H, port register 7L (P7H, P7L)
Port register 7H and port register 7L (P7H, P7L) are 8-bit registers used to control pin level read
and output level write. These registers can be read and written in 8-bit or 1-bit units.
16-bit access is not possible.
Figure 4-40:
Port Register 7H, Port Register 7L (P7H, P7L)Format
Caution:
Do not read the P7H and P7L registers during A/D conversion.
Remarks: 1.
Input mode:
When port 7H (P7H) and port 7L (P7L) are read, the pin levels at this
are read. During write, the data written to P7H and P7L are written.
This does not affect the input pins.
Output mode:
When port 7H (P7H) and port 7L (P7L) are read, the values of P7H and
P7L are read. During write, the values are written to P7H and P7L and
the written values are immediately output.
2.
An undefined value (pin input level) is read for the value after reset when P7H and P7L
are read in the input mode. When P7H and P7L are read in the output mode, 00H
(output latch value) is output.
Symbol
7
6
5
4
3
2
1
0
Address
After reset
P7H
P715
P714
P713
P712
P711
P710
P79
P78
FFFFF40FH undefined
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
Symbol
7
6
5
4
3
2
1
0
Address
After reset
P7L
P77
P76
P75
P74
P73
P72
P71
P70
FFFFF40EH undefined
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
P7n
Output data control (in output mode) (n = 0 to 15)
0
Outputs 0
1
Outputs 1
electronic components distributor