Datasheet
Section 9 I/O Ports
Rev.4.00 Nov. 02, 2005 Page 101 of 304
REJ09B0143-0400
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
6
5
4
3
1
1
1
1
1
Reserved
These bits are always read as 1.
2
1
0
P22
P21
P20
0
0
0
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.
9.2.3 Pin Functions
The correspondence between the register specification and the port functions is shown below.
P22/TXD pin
Register PMR1 PCR2
Bit Name TXD PCR22 Pin Function
Setting Value 0 0 P22 input pin
1 P22 output pin
1 X TXD output pin
Legend: X: Don't care.
P21/RXD pin
Register SCR3 PCR2
Bit Name RE PCR21 Pin Function
Setting Value 0 0 P21 input pin
1 P21 output pin
1 X RXD input pin
Legend: X: Don't care.