KEY INPUT INTERRUPT
7902 Group User’s Manual
8-4
0
1
2
3
4
5
6
7
8.2.1 External interrupt input control register
Figure 8.2.2 shows the structure of the external interrupt input control register.
8.2 Block description
(1) Key input interrupt select bit (bit 0)
The interrupt vector addresses and interrupt control register are common to the key input interrupt and
the INT3 interrupt. When setting this bit to “1,” the key input interrupt is selected. When the key input
interrupt is selected, the INT3 interrupt cannot be used.
(2) Key input interrupt pin pullup select bit (bit 1)
When setting this bit to “1,” the KIi pin programmed as a key input interrupt pin is pulled up. When
composing a key matrix, it is unnecessary to connect the KIi pin with an external pullup transistor.
Also, when the KIi pin serves as a programmable I/O port pin, this pin is not pulled up regardless of
this bit’s contents.
(3) Key input interrupt pin select bit (bit 2, 3)
These bits are used to select pins to be used as key input interrupt pins. (These pins are selected
from the KI0 to KI3 pins.) Some pins not to be used as key input interrupt pins can serve as programmable
I/O port pins.
The signal input to the KIi pin requires the low-level pulse width of 250 ns or more, regardless of f(XIN).
Fig. 8.2.2 Structure of external interrupt input control register
Notes 1: When using pin KIi, do not select timer A’s output pins and pulse output pins which are multiplexed with pin KIi. Refer to
“CHAPTER 9. TIMER A” and “CHAPTER 11. REAL-TIME OUTPUT.”
2: When allocating pin INT2 to P77, do not use pin AN7/ADTRG. Additionally, clear the D-A1 output enable bit (bit 1 at address
9616) to “0” (output disabled).
3: When allocating pin INT3 to P80, clear the D-A2 output enable bit (bit 2 at address 9616) to “0” (output disabled).
When allocating pin INT3 to P74, do not use pin AN4.
4: When allocating pin INT4 to P75, do not use pin AN5.
0
RW
External interrupt input control register (Address 9416)
b7 b6 b5 b4 b3 b2 b1 b0
Bit name
Bit
Function
At reset
R/W
Key input interrupt select bit
Key input interrupt pin pullup
select bit
Key input interrupt pin select bits
Pin INT2 select bit
Pin INT3 select bit
Pin INT4 select bit
Fix this bit to “0.”
0 : Allocate pin INT2 to P64.
1 : Allocate pin INT2 to P77.
(Note 2)
0 0 : Pins KI0 to KI3
0 1 : Pins KI0 to KI2
1 0 : Pins KI0 and KI1
1 1 : Pin KI0
(Note 1)
0
0 : INT3 interrupt
1 : Key input interrupt
0 : Pins KI0 to KI3 are not pulled up.
1 : Pins KI0 to KI3 are pulled up.
b3 b2
0 : Allocate pin INT3 to P80.
(Note 3)
1 : Allocate pin INT3 to P74.
0 : Allocate pin INT4 to P84.
(Note 4)
1 : Allocate pin INT4 to P75.