Hitachi H8S/2199 Hardware Manual page 213

Single-chip microcomputer
Table of Contents

Advertisement

Port Control Register 2 (PCR2)
Bit :
PCR27
Initial value :
R/W :
Port control register 2 (PCR2) controls the I/Os of pins P27 to P20 of port 2 in a unit of bit.
When PCR2 is set to 1, the corresponding P27 to P20 pins become output pins, and when it is set
to 0, they become input pins. When the relevant pin is set to a general I/O, settings of PCR2 and
PDR2 are valid.
PCR2 is an 8-bit write-only register. When PCR2 is read, 1 is read. When reset, PCR2 is
initialized to H'00.
Bits 7 to 0    P27 to P20 Pin Switching (PCR27 to PCR20)
Bit n
PCR2n
Description
0
The P2n pin functions as an input pin
1
The P2n pin functions as an output pin
Port Data Register 2 (PDR2)
Bit :
PDR27
Initial value :
R/W :
R/W
Port data register 2 (PDR2) stores the data for the pins P27 to P20 of port 2. When PCR2 is 1
(output), the PDR2 values are directly read if port 2 is read. Accordingly, the pin states are not
affected. When PCR2 is 0 (input), the pin states are read if port 2 is read.
PDR2 is an 8-bit read/write enable register. When reset, PDR2 is initialized to H'00.
7
6
PCR26
PCR25
0
0
W
W
7
6
PDR26
PDR25
0
0
R/W
R/W
5
4
PCR24
PCR23
0
0
W
W
5
4
PDR24
PDR23
0
0
R/W
R/W
3
2
PCR22
PCR21
0
0
W
W
3
2
PDR22
PDR21
0
0
R/W
R/W
Rev. 1.0, 02/00, page 199 of 1141
1
0
PCR20
0
0
W
W
(Initial value)
(n = 7 to 0)
1
0
PDR20
0
0
R/W

Advertisement

Table of Contents
loading

Table of Contents