HD643303x Hitachi, HD643303x Datasheet - Page 142

no-image

HD643303x

Manufacturer Part Number
HD643303x
Description
Hitachi Microcomputer
Manufacturer
Hitachi
Datasheet
7.3.2 Register Descriptions
Table 7-3 summarizes the registers of port 2.
Table 7-3 Port 2 Registers
Address*
H'FFC1
H'FFC3
H'FFD8
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.
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.
Bit
Initial value
Read/Write
Name
Port 2 data direction register
Port 2 data register
Port 2 input pull-up control register
P2 DDR
7
W
7
0
P2 DDR
6
W
6
0
P2 DDR
5
W
5
0
Port 2 data direction 7 to 0
These bits select input or
output for port 2 pins
P2 DDR
127
4
W
4
0
Abbreviation
P2DDR
P2DR
P2PCR
P2 DDR
3
W
3
0
P2 DDR
2
W
2
0
R/W
W
R/W
R/W
P2 DDR
1
W
1
0
Initial Value
H'00
H'00
H'00
P2 DDR
0
W
0
0

Related parts for HD643303x