Datasheet

Section 9 I/O Ports
Rev. 4.00 Mar. 15, 2006 Page 117 of 556
REJ09B0026-0400
9.2.1 Port Control Register 2 (PCR2)
PCR2 selects inputs/outputs in bit units for pins to be used as general I/O ports of port 2.
Bit Bit Name
Initial
Value R/W Description
7 to 5 Reserved
4
3
2
1
0
PCR24
PCR23
PCR22
PCR21
PCR20
0
0
0
0
0
W
W
W
W
W
When each of the port 2 pins P24 to P20 functions as a
general I/O port, setting a PCR2 bit to 1 makes the
corresponding pin an output port, while clearing the bit to
0 makes the pin an input port.
9.2.2 Port Data Register 2 (PDR2)
PDR2 is a general I/O port data register of port 2.
Bit Bit Name
Initial
Value
R/W Description
7 to 5 All 1 Reserved
These bits are always read as 1.
4
3
2
1
0
P24
P23
P22
P21
P20
0
0
0
0
0
R/W
R/W
R/W
R/W
R/W
PDR2 stores output data for port 2 pins.
If PDR2 is read while PCR2 bits are set to 1, the value
stored in PDR2 is read. If PDR2 is read while PCR2 bits
are cleared to 0, the pin states are read regardless of the
value stored in PDR2.