Datasheet
Section 10 I/O Ports
R01UH0310EJ0500 Rev. 5.00 Page 547 of 1384
Sep 25, 2012
H8S/2426, H8S/2426R, H8S/2424 Group
10.2 Port 2
Port 2 is an 8-bit I/O port that also has other functions. Port 2 has the following registers. For the
port function control registers, refer to section 10.18, Port Function Control Registers.
• Port 2 data direction register (P2DDR)
• Port 2 data register (P2DR)
• Port 2 register (PORT2)
• Port 2 open drain control register (P2ODR)
• Port function control register 3 (PFCR3)
10.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
3 P23DDR 0 W
2 P22DDR 0 W
1 P21DDR 0 W
0 P20DDR 0 W
When a pin function is specified as a general
purpose I/O, setting this bit to 1 makes the
corresponding pin an output port, while clearing this
bit to 0 makes the corresponding pin an input port.