INPUT/OUTPUT PINS
5.2 Programmable I/O ports
5.2.1 Direction register
This register determines the I/O direction of programmable I/O ports. One bit of this register corresponds
to one pin of the microcomputer, and this is the one-to-one relationship.
Figure 5.2.2 shows the structure of port Pi (i = 1, 2, 5 to 7) direction register.
Port Pi direction register (i = 1, 2, 5 to 7)
(Addresses 5
16
, 8
16
, D
16
, 10
16
, 11
16
)
Bit
0
1
2
3
4
5
6
7
Bit name
Port Pi
0
direction bit
Port Pi
1
direction bit
Port Pi
2
direction bit
Port Pi
3
direction bit
Port Pi
4
direction bit
Port Pi
5
direction bit
Port Pi
6
direction bit
Port Pi
7
direction bit
0 : Input mode
(The port functions as an input port.)
1 : Output mode
(The port functions as an output port.)
Function
b7 b6 b5 b4 b3 b2 b1 b0
At reset
0
0
0
0
0
0
0
0
R/W
RW
RW
RW
RW
RW
RW
RW
RW
Notes 1:
Nothing is assigned for bits 0 to 4 of the port P5 direction register. These bits are undefined at reading.
2:
Nothing is assigned for bits 6 and 7 of the port P6 direction register. These bits are undefined at reading.
3:
Nothing is assigned for bits 5 to 7 of the port P7 direction register. These bits are undefined at reading.
4:
Any of bits 0 to 5 of the port P6 direction register becomes “0” by input of a falling edge to pin P6OUT
CUT
/INT
4
. (Refer to
section
“5.2.3 Pin P6OUT
CUT
/INT
4
.”)
Fig. 5.2.2 Structure of port Pi (i = 1, 2, 5 to 7) direction register
7906 Group User’s Manual Rev.2.0
5-3