English
Language : 

HD6433308 Datasheet, PDF (97/349 Pages) Hitachi Semiconductor – Hitachi Single-Chip MicroComputer
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 pull-ups.
Table 5-5 details the port 2 registers.
Table 5-5. Port 2 Registers
Name
Port 2 data direction
register
Port 2 data register
Abbreviation Read/Write
P2DDR
W
P2DR
R/W
Initial value
H’FF (mode 1)
H'00 (modes 2 and 3)
H’00
Address
H’FFB1
H’FFB3
Port 2 Data Direction Register (P2DDR)—H’FFB1
Bit
7
6
5
4
3
2
1
0
P27DDR P26DDR P25DDR P24DDR P23DDR P22DDR P21DDR P20DDR
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
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
Bit
Initial value
Read/Write
7
6
5
4
3
2
1
0
P27
P26
P25
P24
P23
P22
P21
P20
0
0
0
0
0
0
0
0
R/W R/W R/W R/W R/W R/W R/W R/W
P2DR is an 8-bit register containing the data for pins P27 to P20. 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.
82