Datasheet
Section 10 I/O Ports
R01UH0309EJ0500 Rev. 5.00 Page 549 of 1408
Sep 24, 2012
H8S/2456, H8S/2456R, H8S/2454 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
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.
4 ⎯ 0 ⎯
3 ⎯ 0 ⎯
2 ⎯ 0 ⎯
1 ⎯ 0 ⎯
Bits 4 to 0 are reserved.
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.