Datasheet
Section 9 I/O Ports
Rev.6.00 Mar. 18, 2009 Page 337 of 980
REJ09B0050-0600
9.2 Port 2
Port 2 is an 8-bit I/O port that also has other functions. The port 2 has the following registers.
• Port 2 data direction register (P2DDR)
• Port 2 data register (P2DR)
• Port 2 register (PORT2)
9.2.1 Port 2 Data Direction Register (P2DDR)
The individual bits of P2DDR specify input or output for the pins of port 2.
P2DDR cannot be read; if it is, an undefined value will be read.
Bit Bit Name Initial Value R/W Description
7 P27DDR 0 W
6 P26DDR 0 W
5 P25DDR 0 W
4 P24DDR 0 W
When a pin function is specified to a general
purpose I/O, setting this bit to 1 makes the
corresponding port 1 pin an output pin, while
clearing this bit to 0 makes the pin an input pin.
3 P23DDR 0 W
2 P22DDR 0 W
1 P21DDR 0 W
0 P20DDR 0 W