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
P1DR is an 8-bit register containing the data for pins P1
7
to P1
0
. When the CPU reads P1DR, for
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
6
5
4
3
2
1
0
P1
7
PCR P1
6
PCR P1
5
PCR P1
4
PCR P1
3
PCR P1
2
PCR P1
1
PCR P1
0
PCR
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
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.
Bit
7
6
5
4
3
2
1
0
P1
7
P1
6
P1
5
P1
4
P1
3
P1
2
P1
1
P1
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
78
Содержание H8/326 Series
Страница 67: ...58 ...
Страница 121: ...112 ...
Страница 274: ... 3 Clock Settling Timing Ø VCC RES STBY tOSC1 tOSC1 Figure 14 8 Clock Setting Timing 265 ...
Страница 279: ...270 ...