M37902FCCHP, M37902FGCHP, M37902FJCHP
50
MITSUBISHI MICROCOMPUTERS
SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER
Key Input Interrupt
The INT3 interrupt can function as the key input interrupt by setting
bits 1 to 3 of the external interrupt input control register (address
9416). The key input interrupt uses inputs KI0 to KI3. Figure 39 shows
the block diagram of the INT3/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 INT3 is connected to the
INT3 interrupt control circuit, and INT3 external interrupt is normally
performed. When bit 0 = “1”, signals from pins KI0 to KI3, which cor-
respond to ports P54 to P57 pins, are inverted, and then, the logical
sum of these signals is connected to the INT3 interrupt control regis-
ter. In this case, the external interrupt which uses pins KI0 to KI3 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 INT3 interrupt. Additionally, pullup resistors
(transistors) can be added to pins KI0 to KI4 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
P54/KI0
Port P56 direction register
Key input interrupt pin
pullup select bit
P56/KI2
KI2 enable signal (Note)
INT3 interrupt request
INT3 interrupt control register
0
1
Key input interrupt pin
pullup select bit
P57/KI3
Port P57 direction register
KI3 enable signal (Note)
P57/KI3
Interrupt control circuit
Note: KIi enable signal (i = 0 to 3) means a signal which becomes
“1” when the key input interrupt select bit = “1” and pin KIi is
selected by the key input interrupt pin select bits.
Port P5j direction register
: bit j (j = 4 to 7) at address D16
INT3 interrupt control register
: address 6E16
Key input interrupt select bit
: bit 0 at address 9416
Key input interrupt pin pullup select bit : bit 1 at address 9416
Pin INT3 select bit
: bit 5 at address 9416
0
1
P74/(INT3)
P80/INT3
Pin INT3
select bit
Key input interrupt
select bit
Port P55 direction register
Key input interrupt pin
pullup select bit
P55/KI1
KI1 enable signal (Note)
Port P54 direction register
Key input interrupt pin
pullup select bit
KI0 enable signal (Note)
Pullup
transistor
Fig. 39 Block diagram of INT3/key input interrupt input circuit