
Mitsubishi microcomputers
M30220 Group
SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER
Key Input Interrupt
47
Figure 1.10.13. Block diagram of key input interrupt
Key Input Interrupt
A key input interrupt request is generated when an active edge selected by the key input mode register’s
P1, P2 key input select bits occurs on one of input ports P10 to P17, P20 to P27, or P30 to P33 whose
direction register is set for input and which has been enabled for key input by the key input enable bit. For
P30 to P33, key input interrupt requests are always generated by a falling edge.
A key input interrupt can also be used as a key-on wakeup function for cancelling the wait mode or stop
mode. When using an oscillator connected between XCIN—XCOUT and the corresponding port has been set
to have a pullup, if the P1, P2 key input select bits (bits 0, 2 at address 012616) are set for “Two edges” and
the P1, P2 key input enable bits (bits 1, 3 at address 012616) are “Enabled”, pullups on P10 to P17 and P20
to P27 are automatically turned on and the port is pulled “H” for only a period of about 244 us (Note) at
intervals of approximately 7.8 ms (Note), as shown in Figure 1.10.15. And if the key input enable bit (bit 1,
3 and 4 at the address 012616) is set to “enable”, sometimes the interrupt request bit may be set to “1”,
therefore set the interrupt request bit to “0” with a program.
Figure 1.10.13 shows a block diagram for key input interrupts. Note that when a “L” signal is applied to any
pin which has had its key input enable bit set to “0” and is not processed for input inhibition, input to other
pins are not detected as an interrupt. The fC32 is affected by a clock prescaler reset flag.
Note : XCIN = 32.768kHZ
(Address 004D16)
P10/KI0
P17/KI7
P20/KI8
P27/KI15
Port P10-P13 pull-up select bit
Port P10 direction register
Pull-up
transistor
Pull-up
transistor
Pull-up
transistor
P30/KI16
P33/KI19
Pull-up
transistor
Pull-up
transistor
Port P30 direction register
Port P33 direction register
Two edge detect
P1 key input select bit P1 key input enable bit
P1 key input select bit
Port P30 direction register
Port P3 pull-up select bit
1/8
fC32
D
CK Q
Port P1, P2 pull-up select bit
"0"
"1"
"0"
D
CK Q
Two edge detect
"0"
"1"
"0"
Pull-up
transistor
D
CK Q
Two edge detect
"0"
"1"
"0"
D
CK Q
Two edge detect
"0"
"1"
"0"
P1 key input enable bit
P2 key input enable bit
P1 key input enable bit
Port P10 direction register
Port P17 direction register
Port P20 direction register
Port P27 direction register
P3 key input enable bit
Interrupt control circuit
Key input interrupt control register
Key input interrupt
request
One-shot
generating circuit