Port 4 Data Direction Register (P4DDR)—H'FFB5
P4DDR is an 8-bit register that selects the direction of each pin in port 4. A pin functions as an
output pin if the corresponding bit in P4DDR is set to “1,” and as in input pin if the bit is cleared to
“0.”
Port 4 Data Register (P4DR)—H'FFB7
Note: * Determined by the level at pin P4
6
.
P4DR is an 8-bit register containing the data for pins P4
7
to P4
0
. When the CPU reads P4DR, for
output pins (P4DDR = “1”) it reads the value in the P4DR latch, but for input pins (P4DDR = “0”),
it obtains the logic level directly from the pin, bypassing the P4DR latch. This also applies to pins
used for interrupt input, A/D trigger input, clock output, and control signal input or output.
Pins P4
0
, P4
1
, and P4
2
: Can be used for general-purpose input or output, interrupt request input,
or A/D trigger input. See table 5-11. If a pin is used for interrupt or A/D trigger input, its data
direction bit should be cleared to “0,” so that the output from P4DR will not generate an interrupt
request or A/D trigger signal.
Pins P4
3
, P4
4
and P4
5
: In modes 1 and 2 (the expanded modes), these pins are used for output of
the RD, WR, and AS bus control signals. They are unaffected by the values in P4DDR and P4DR.
Bit
7
6
5
4
3
2
1
0
P4
7
DDR P4
6
DDR P4
5
DDR P4
4
DDR P4
3
DDR P4
2
DDR P4
1
DDR P4
0
DDR
Modes 1 and 2
Initial value
0
1
0
0
0
0
0
0
Read/Write
W
—
W
W
W
W
W
W
Mode 3
Initial value
0
0
0
0
0
0
0
0
Read/Write
W
W
W
W
W
W
W
W
Bit
7
6
5
4
3
2
1
0
P4
7
P4
6
P4
5
P4
4
P4
3
P4
2
P4
1
P4
0
Initial value
0
*
0
0
0
0
0
0
Read/Write
R/W
R
R/W
R/W
R/W
R/W
R/W
R/W
89
Summary of Contents for H8/326 Series
Page 67: ...58 ...
Page 121: ...112 ...
Page 274: ... 3 Clock Settling Timing Ø VCC RES STBY tOSC1 tOSC1 Figure 14 8 Clock Setting Timing 265 ...
Page 279: ...270 ...