Register Descriptions - Hitachi H8/3032 Series Hardware Manual

Table of Contents

Advertisement

Downloaded from
Elcodis.com
electronic components distributor

7.3.2 Register Descriptions

Table 7-3 summarizes the registers of port 2.
Table 7-3 Port 2 Registers
Address*
Name
H'FFC1
Port 2 data direction register
H'FFC3
Port 2 data register
H'FFD8
Port 2 input pull-up control register
Note: * Lower 16 bits of the address.
Port 2 Data Direction Register (P2DDR): P2DDR is an 8-bit write-only register that can select
input or output for each pin in port 2.
Bit
7
P2 DDR
P2 DDR
7
6
0
Initial value
W
Read/Write
Mode 1: A pin in port 2 becomes an address output pin if the corresponding P2DDR bit is set to 1,
and a generic input pin if this bit is cleared to 0.
Modes 2 and 3: Port 2 functions as an input/output port. A pin in port 2 becomes an output pin if
the corresponding P2DDR bit is set to 1, and an input pin if this bit is cleared to 0.
P2DDR is a write-only register. Its value cannot be read. All bits return 1 when read.
P2DDR is initialized to H'00 by a reset and in hardware standby mode. In software standby mode it
retains its previous setting. If a P2DDR bit is set to 1, the corresponding pin maintains its output
state in software standby mode.
Abbreviation
P2DDR
P2DR
P2PCR
6
5
4
3
P2 DDR
P2 DDR
P2 DDR
5
4
3
0
0
0
0
W
W
W
W
Port 2 data direction 7 to 0
These bits select input or
output for port 2 pins
127
R/W
Initial Value
W
H'00
R/W
H'00
R/W
H'00
2
1
0
P2 DDR
P2 DDR
P2 DDR
2
1
0
0
0
0
W
W
W

Advertisement

Table of Contents
loading

Table of Contents