Hitachi H8/329 Series Hardware Manual page 90

Single-chip microcomputer
Table of Contents

Advertisement

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
Port 2 data direction
register
Port 2 data register
Port 2 input pull-up
control register
Port 2 Data Direction Register (P2DDR)—H'FFB1
Bit
7
P2
DDR P2
7
Mode 1
Initial value
1
Read/Write
Modes 2 and 3
Initial value
0
Read/Write
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
7
P2
7
Initial value
0
Read/Write
R/W
P2DR is an 8-bit register containing the data for pins P2
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.
Abbreviation
Read/Write
P2DDR
W
P2DR
R/W
P2PCR
R/W
6
5
DDR P2
DDR P2
6
5
1
1
0
0
W
W
6
5
P2
P2
6
5
0
0
R/W
R/W
Initial value
H'FF (mode 1)
H'00 (modes 2 and 3)
H'00
H'00
4
3
2
DDR P2
DDR P2
DDR P2
4
3
2
1
1
1
0
0
0
W
W
W
4
3
2
P2
P2
P2
4
3
0
0
0
R/W
R/W
R/W
to P2
. When the CPU reads P2DR, for
7
0
81
Address
H'FFB1
H'FFB3
H'FFAD
1
0
DDR P2
DDR
1
0
1
1
0
0
W
W
1
0
P2
P2
2
1
0
0
0
R/W
R/W

Advertisement

Table of Contents
loading

Table of Contents