Datasheet

Section 9 I/O Ports
Rev. 1.50 Sep. 18, 2007 Page 152 of 584
REJ09B0240-0150
9.8.1 Port Control Register D (PCRD)
PCRD selects inputs/outputs in bit units for pins to be used as general I/O ports of port D.
Bit Bit Name
Initial
Value R/W Description
7
6
5
4
3
2
1
0
PCRD7
PCRD6
PCRD5
PCRD4
PCRD3
PCRD2
PCRD1
PCRD0
0
0
0
0
0
0
0
0
W
W
W
W
W
W
W
W
When each of the port D pins functions as a general
I/O port, setting a PCRD bit to 1 makes the
corresponding pin an output port, while clearing the bit
to 0 makes the pin an input port.
9.8.2 Port Data Register D (PDRD)
PDRD is a general I/O port data register of port D.
Bit Bit Name
Initial
Value R/W Description
7
6
5
4
3
2
1
0
PD7
PD6
PD5
PD4
PD3
PD2
PD1
PD0
0
0
0
0
0
0
0
0
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
PDRD stores output data for port D pins.
If PDRD is read while PCRD bits are set to 1, the
values stored in PDRD are read. If PDRD is read while
PCRD bits are cleared to 0, the pin states are read
regardless of the value stored in PDRD.