Pins of port 2 can drive a single TTL load and a 90pF capacitive load when they are used as output
pins. They can also drive light-emitting diodes and a Darlington pair. When they are used as input
pins, they have programmable MOS transistor pull-ups.
Table 5-6 details the port 2 registers.
Table 5-6. Port 2 Registers
Name
Abbreviation
Read/Write
Initial value
Address
Port 2 data direction
P2DDR
W
H'FF (mode 1)
H'FFB1
register
H'00 (modes 2 and 3)
Port 2 data register
P2DR
R/W
H'00
H'FFB3
Port 2 input pull-up
P2PCR
R/W
H'00
H'FFAD
control register
Port 2 Data Direction Register (P2DDR)—H'FFB1
P2DDR is an 8-bit register that selects the direction of each pin in port 2. A pin functions as an
output pin if the corresponding bit in P2DDR is set to “1,” and as an input pin if the bit is cleared to
“0.”
Port 2 Data Register (P2DR)—H'FFB3
P2DR is an 8-bit register containing the data for pins P2
7
to P2
0
. When the CPU reads P2DR, for
output pins it reads the value in the P2DR latch, but for input pins, it obtains the logic level directly
from the pin, bypassing the P2DR latch.
Bit
7
6
5
4
3
2
1
0
P2
7
DDR P2
6
DDR P2
5
DDR P2
4
DDR P2
3
DDR P2
2
DDR P2
1
DDR P2
0
DDR
Mode 1
Initial value
1
1
1
1
1
1
1
1
Read/Write
—
—
—
—
—
—
—
—
Modes 2 and 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
P2
7
P2
6
P2
5
P2
4
P2
3
P2
2
P2
1
P2
0
Initial value
0
0
0
0
0
0
0
0
Read/Write
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
81
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 ...