Port 2; Port 2 Data Direction Register (P2Ddr); Port 2 Data Register (P2Dr) - Hitachi H8S/2378, H8S/2378R Series Hardware Manual

16 bit single-chip microcomputer
Table of Contents

Advertisement

10.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)
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
7
P27DDR
6
P26DDR
5
P25DDR
4
P24DDR
3
P23DDR
2
P22DDR
1
P21DDR
0
P20DDR
10.2.2
Port 2 Data Register (P2DR)
P2DR stores output data for the port 2 pins.
Bit
Bit Name
7
P27DR
6
P26DR
5
P25DR
4
P24DR
3
P23DR
2
P22DR
1
P21DR
0
P20DR
Initial Value
R/W
0
W
0
W
0
W
0
W
0
W
0
W
0
W
0
W
Initial Value
R/W
0
R/W
0
R/W
0
R/W
0
R/W
0
R/W
0
R/W
0
R/W
0
R/W
Description
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.
Description
Output data for a pin is stored when the pin function
is specified to a general purpose I/O.
Rev. 1.0, 09/01, page 419 of 904

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents