Hitachi H8/329 Series Hardware Manual page 87

Single-chip microcomputer
Table of Contents

Advertisement

P1DDR is an 8-bit register that selects the direction of each pin in port 1. A pin functions as an
output pin if the corresponding bit in P1DDR is set to "1," and as an input pin if the bit is cleared to
"0."
Port 1 Data Register (P1DR)—H'FFB2
Bit
7
P1
7
Initial value
0
Read/Write
R/W
P1DR is an 8-bit register containing the data for pins P1
output pins it reads the value in the P1DR latch, but for input pins, it obtains the logic level directly
from the pin, bypassing the P1DR latch.
Port 1 Input Pull-Up Control Register (P1PCR)—H'FFAC
Bit
7
P1
PCR P1
7
Initial value
0
Read/Write
R/W
P1PCR is an 8-bit readable/writable register that controls the input pull-up transistors in port 1. If a
bit in P1DDR is cleared to "0" (designating input) and the corresponding bit in P1PCR is set to "1,"
the input pull-up transistor for that bit is turned on.
Mode 1: In mode 1 (expanded mode without on-chip ROM), port 1 is automatically used for
address output. The port 1 data direction register is unwritable. All bits in P1DDR are
automatically set to "1" and cannot be cleared to "0."
Mode 2: In mode 2 (expanded mode with on-chip ROM), the usage of port 1 can be selected on a
pin-by-pin basis. A pin is used for general-purpose input if its data direction bit is cleared to "0,"
or for address output if its data direction bit is set to "1."
Mode 3: In the single-chip mode port 1 is a general-purpose input/output port.
6
5
4
P1
P1
P1
6
5
0
0
0
R/W
R/W
R/W
6
5
4
PCR P1
PCR P1
PCR P1
6
5
4
0
0
0
R/W
R/W
R/W
78
3
2
P1
P1
4
3
2
0
0
R/W
R/W
to P1
. When the CPU reads P1DR, for
7
0
3
2
PCR P1
PCR P1
3
2
0
0
R/W
R/W
1
0
P1
P1
1
0
0
0
R/W
R/W
1
0
PCR P1
PCR
1
0
0
0
R/W
R/W

Advertisement

Table of Contents
loading

Table of Contents