Datasheet
Section 8 I/O Ports
Rev. 3.00 Sep. 28, 2009 Page 128 of 710
REJ09B0384-0300
8.1 Port 1
Port 1 is an 8-bit I/O port. Port 1 has the following registers.
• Port 1 data direction register (P1DDR)
• Port 1 data register (P1DR)
• Port 1 pull-up MOS control register (P1PCR)
8.1.1 Port 1 Data Direction Register (P1DDR)
The individual bits of P1DDR specify input or output for the pins of port 1.
Bit Bit Name Initial Value R/W Description
7 P17DDR 0 W
6 P16DDR 0 W
5 P15DDR 0 W
4 P14DDR 0 W
3 P13DDR 0 W
2 P12DDR 0 W
1 P11DDR 0 W
The corresponding port 1 pins function as address
output port when the P1DDR bits are set to 1, and as
input port when cleared to 0.
0 P10DDR 0 W
8.1.2 Port 1 Data Register (P1DR)
P1DR stores output data for the port 1 pins.
Bit Bit Name Initial Value R/W Description
7 P17DR 0 R/W
6 P16DR 0 R/W
5 P15DR 0 R/W
4 P14DR 0 R/W
3 P13DR 0 R/W
2 P12DR 0 R/W
1 P11DR 0 R/W
P1DR stores output data for the port 1 pins that are
used as the general output port.
If a port 1 read is performed while the P1DDR bits are
set to 1, the P1DR values are read. If a port 1 read is
performed while the P1DDR bits are cleared to 0, the
pin states are read.
0 P10DR 0 R/W