1. Port 1 Data Direction Register (P1DDR)—H'FE80
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.
P1DDR can be written but not read. An attempt to read this register does not cause an error, but
all bits are read as 1, regardless of their true values.
A reset initializes P1DDR to H'03, so that pins P1
1
and P1
0
carry clock outputs and the other pins
are set for input. In the hardware standby mode, P1DDR is cleared to H'00, stopping the clock
outputs. P1DDR is not initialized in the software standby mode, so if a P1DDR bit is set to 1
when the chip enters the software standby mode, the corresponding pin continues to output the
value in the port 1 data register (or the or E clock).
2. Port 1 Data Register (P1DR)—H'FE82
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 pin status
directly.
Note that when pins P1
1
and P1
0
are used for output, they output the clock signals ( and E), not
the contents of P1DR. If the CPU reads Pl
1
and Pl
0
(when Pl
1
DDR = Pl
0
DDR = 1), it obtains the
clock values at the current instant.
3. System Control Register 1 (SYSCR1)—H'FEFC
Bit
7
6
5
4
3
2
1
0
P1
7
DDR P1
6
DDR P1
5
DDR P1
4
DDR P1
3
DDR P1
2
DDR P1
1
DDR P1
0
DDR
Initial value
0
0
0
0
0
0
1
1
Read/Write
W
W
W
W
W
W
W
W
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
—
—
Read/Write
R/W
R/W
R/W
R/W
R/W
R/W
R
R
Bit
7
6
5
4
3
2
1
0
—
IRQ
1
E
IRQ
0
E
NMIEG
BRLE
—
—
—
Initial value
1
0
0
0
0
1
1
1
Read/Write
—
R/W
R/W
R/W
R/W
—
—
—
145