Hitachi H8/3937 Series Hardware Manual page 156

Table of Contents

Advertisement

1. Port data register 2 (PDR2)
Bit
7
Initial value
0
Read/Write
PDR2 is an 8-bit register that stores data for port 2 pins P2
bits are set to 1, the values stored in PDR2 are read directly. Do not read port 2 while PCR2 bits
are cleared to 0.
Upon reset, PDR2 is initialized to H'00.
2. Port control register 2 (PCR2)
Bit
7
Initial value
1
Read/Write
PCR2 is an 8-bit register for controlling whether each of port 2 pins P2
input pin or output pin. Setting a PCR2 bit to 1 makes the corresponding pin an output pin, while
clearing the bit to 0 makes the pin an input pin. The settings in PCR2 and PDR2 are valid only
when the corresponding pin is designated in PMR2 as a general I/O pin.
Upon reset, PCR2 is initialized to H'00.
PCR2 is a write-only register, which is always read as all 1s.
3. Port mode register 2 (PMR2)
Bit
7
Initial value
1
Read/Write
PMR2 is an 8-bit read/write register that controls the selection of pin functions for port 2 pins P2
P2
, and P2
, and the PMOS on/off state for the P2
1
2
Bit 5, the P2
/SO
pin PMOS control bit (POF1), should be cleared to 0.
1
2
Upon reset, PMR2 is initialized to H'D8.
144
6
5
4
P2
0
0
0
R/W
6
5
4
PCR2
1
1
0
W
6
5
4
POF1
1
0
1
R/W
/SO
2
3
2
P2
P2
4
3
2
0
0
R/W
R/W
to P2
. If port 2 is read while PCR2
4
0
3
2
PCR2
PCR2
4
3
0
0
W
W
to P2
4
3
2
SO1
1
0
R/W
pin.
1
1
0
P2
P2
1
0
0
0
R/W
R/W
1
0
PCR2
PCR2
2
1
0
0
0
W
W
functions as an
0
1
0
SI1
SCK1
0
0
R/W
R/W
,
0

Advertisement

Table of Contents
loading

Table of Contents