![](http://datasheet.mmic.net.cn/280000/M37902F8CHP_datasheet_16084061/M37902F8CHP_50.png)
M37902FCCHP, M37902FGCHP, M37902FJCHP
50
MITSUBISHI MICROCOMPUTERS
SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER
Key Input Interrupt
The INT
3
interrupt can function as the key input interrupt by setting
bits 1 to 3 of the external interrupt input control register (address
94
16
). The key input interrupt uses inputs KI
0
to KI
3
. Figure 39 shows
the block diagram of the INT
3
/key input interrupt input circuit, and
Figure 40 shows the bit configuration of the external interrupt input
control register.
When bit 0 of the external interrupt input control register (key input
interrupt select bit)=
“
0
”
, a signal from pin INT
3
is connected to the
INT
3
interrupt control circuit, and INT
3
external interrupt is normally
performed. When bit 0 =
“
1
”
, signals from pins KI
0
to KI
3
, which cor-
respond to ports P5
4
to P5
7
pins, are inverted, and then, the logical
sum of these signals is connected to the INT
3
interrupt control regis-
ter. In this case, the external interrupt which uses pins KI
0
to KI
3
is
performed.
Bits 2 and 3 of the external interrupt input control register are the key
input interrupt pin select bits. By setting these bits, the combination
of key input interrupt pins can be selected. The interrupt vector ad-
dresses and interrupt control register of the key input interrupt are
common to those of the INT
3
interrupt. Additionally, pullup resistors
(transistors) can be added to pins KI
0
to KI
4
by setting as follows:
Set bit 1 of the external interrupt input control register to
“
1
”
.
Next, select the key input interrupt pins by bits 2 and 3 of the exter-
nal interrupt input control register.
Then, clear the contents of the port direction register which corre-
sponds to the selected pins to
“
0
”
.
Pullup
transistor
Pullup
transistor
Pullup
transistor
P5
4
/KI
0
Port P5
6
direction register
Key input interrupt pin
pullup select bit
KI
2
enable signal
(Note)
P5
6
/KI
2
INT
3
interrupt request
INT
3
interrupt control register
0
1
Key input interrupt pin
pullup select bit
KI
3
enable signal
(Note)
P5
7
/KI
3
Port P5
7
direction register
Interrupt control circuit
Note:
KI
i
enable signal (i = 0 to 3) means a signal which becomes
“
1
”
when the key input interrupt select bit =
“
1
”
and pin KI
i
is
selected by the key input interrupt pin select bits.
Port P5j direction register
INT
3
interrupt control register
Key input interrupt select bit
Key input interrupt pin pullup select bit
: bit 1 at address 94
16
Pin INT
3
select bit
: bit j (j = 4 to 7) at address D
16
: address 6E
16
: bit 0 at address 94
16
: bit 5 at address 94
16
0
1
P7
4
/(INT
3
)
P8
0
/INT
3
Pin INT
3
select bit
Key input interrupt
select bit
Port P5
5
direction register
Key input interrupt pin
pullup select bit
KI
1
enable signal
(Note)
P5
5
/KI
1
Port P5
4
direction register
Key input interrupt pin
pullup select bit
KI
0
enable signal
(Note)
Pullup
transistor
Fig. 39 Block diagram of INT
3
/key input interrupt input circuit