Hitachi H8/3937 Series Hardware Manual page 167

Table of Contents

Advertisement

1. Port data register 4 (PDR4)
Bit
7
Initial value
1
Read/Write
PDR4 is an 8-bit register that stores data for port 4 pins P4
bits are set to 1, the values stored in PDR4 are read, regardless of the actual pin states. If port 4 is
read while PCR4 bits are cleared to 0, the pin states are read.
Upon reset, PDR4 is initialized to H'F8.
2. Port control register 4 (PCR4)
Bit
7
Initial value
1
Read/Write
PCR4 is an 8-bit register for controlling whether each of port 4 pins P4
input pin or output pin. Setting a PCR4 bit to 1 makes the corresponding pin an output pin, while
clearing the bit to 0 makes the pin an input pin. PCR4 and PDR4 settings are valid when the
corresponding pins are designated for general-purpose input/output by SCR3-2.
Upon reset, PCR4 is initialized to H'F8.
PCR4 is a write-only register, which always reads all 1s.
6
5
4
1
1
1
6
5
4
1
1
1
3
2
P4
P4
P4
3
2
1
0
R
R/W
R/W
to P4
. If port 4 is read while PCR4
2
0
3
2
PCR4
PCR4
2
1
0
W
to P4
functions as an
2
0
1
0
P4
1
0
0
0
R/W
1
0
PCR4
1
0
0
0
W
W
155

Advertisement

Table of Contents
loading

Table of Contents