Section 8 I/O Ports
Rev. 7.00 Mar 10, 2005 page 210 of 652
REJ09B0042-0700
Port Control Register 4 (PCR4)
Bit
Initial value
Read/Write
7

1

6

1

5

1

4

1

3

1

0
PCR4
0
W
2
PCR4
0
W
1
PCR4
0
W
210
PCR4 is an 8-bit register for controlling whether each of port 4 pins P4
2
to P4
0
functions as an
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.
Upon reset, PCR4 is initialized to H'F8.
PCR4 is a write-only register, which is always read as all 1s.
Port Mode Register 2 (PMR2)
Bit
Initial value
Read/Write
7

1

6

1

5
POF1
0
R/W
4

1

3

1

0
IRQ
0
0
R/W
2
WDCKS
0
R/W
1
NCS
0
R/W
PMR2 is an 8-bit read/write register. It controls whether the PMOS transistor internal to P3
5
is on
or off, the selection of the watchdog timer clock, the selection of TMIG noise cancellation, and
switching of the P4
3
/
IRQ
0
pin functions.
Upon reset, PMR2 is initialized to H'D8.
This section only deals with the bit that controls switching of the P4
3
/
IRQ
0
pin functions. For the
functions of the other bits, see the descriptions of port 1 (WDCKS and NCS) and port 3 (POF1).
Bit 0—P4
3
/
IRQ
0
Pin Function Switch (IRQ
0
)
This bit selects whether pin P4
3
/
IRQ
0
is used as P4
3
or as
IRQ
0
.
Bit 0
IRQ
0
Description
0 Functions as P4
3
input pin (initial value)
1 Functions as
IRQ
0
input pin