Hitachi H8/3062 Hardware Manual page 187

Single-chip microcomputer
Hide thumbs Also See for H8/3062:
Table of Contents

Advertisement

Port 1 Data Direction Register (P1DDR): P1DDR is an 8-bit write-only register that can select
input or output for each pin in port 1.
Bit
P1 DDR
Initial value
Modes
1 to 4
Read/Write
Initial value
Modes
5 to 7
Read/Write
• Modes 1 to 4 (Expanded Modes with On-Chip ROM Disabled)
P1DDR values are fixed at 1. Port 1 functions as an address bus.
• Mode 5 (Expanded Modes with On-Chip ROM Enabled)
After a reset, port 1 functions as an input port. A pin in port 1 becomes an address output pin if
the corresponding P1DDR bit is set to 1, and a generic input pin if this bit is cleared to 0.
• Modes 6 and 7 (Single-Chip Mode)
Port 1 functions as an input/output port. A pin in port 1 becomes an output port if the
corresponding P1DDR bit is set to 1, and an input port if this bit is cleared to 0.
In modes 1 to 4, P1DDR bits are always read as 1, and cannot be modified.
In modes 5 to 7, P1DDR is a write-only register. Its value cannot be read. All bits return 1 when
read.
P1DDR is initialized to H'FF in modes 1 to 4, and to H'00 in modes 5 to 7, by a reset and in
hardware standby mode. In sofware standby mode it retains its previous setting. Therefore, if a
transition is made to software standby mode while port 1 is functioning as an input/output port and
a P1DDR bit is set to 1, the corresponding pin maintains its output state.
166
7
6
P1 DDR
P1 DDR
7
6
1
1
0
0
W
W
5
4
P1 DDR
P1 DDR
5
4
1
1
0
0
W
W
Port 1 data direction 7 to 0
These bits select input or
output for port 1 pins
3
2
P1 DDR
P1 DDR
3
2
1
1
0
0
W
W
1
0
P1 DDR
1
0
1
1
0
0
W
W

Advertisement

Table of Contents
loading

Table of Contents