Unde
deeopmen
Preliminary Specifications REV.E
Specifications in this manual are tentative and subject to change.
Key Input Interrupt
Mitsubishi microcomputers
M30220 Group
SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER
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 input edge select bits occurs on one of input ports P1
0
to P1
7
, P2
0
to P2
7
, or P3
0
to P3
3
whose
direction register is set for input and which has been enabled for key input by the key input enable bit. For
P3
0
to P3
3
, 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 X
CIN
—X
COUT
and the corresponding port has been set
to have a pullup, if the P1, P2 key input select bits (bits 0, 2 at address 0126
16
) are set for “Two edges” and
the P1, P2 key input enable bits (bits 1, 3 at address 0126
16
) are “Enabled”, pullups on P1
0
to P1
7
and P2
0
to P2
7
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. For settings by a program, set up the
P1, P2 key input select bits and pullup control register 0 (address 03FC
16
) and then set the P1, P2 key input
enable bit to “1”.
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 f
C32
is affected by a clock prescaler reset flag.
Note : X
CIN
= 32.768kH
Z
(Address 004D
16
)
P1
0
/KI
0
P1
7
/KI
7
P2
0
/KI
8
P2
7
/KI
15
Port P10
0
-P10
3
pull-up select bit
Port P1
0
direction register
Pull-up
transistor
Pull-up
transistor
Pull-up
transistor
P3
0
/KI
16
P3
3
/KI
19
Pull-up
transistor
Pull-up
transistor
Port P3
0
direction register
Port P3
3
direction register
Two edge detect
P1 key input select bit P1 key input enable bit
"1"
P1 key input enable bit
P1 key input select bit
Port P3
0
direction registe
Port P3 pull-up select bit
1/8
f
C32
D
CK
Q
Port P1, P2 pull-up select bit
"0"
"1"
"0"
D
CK
Q
Two edge detect
"0"
"1"
"1"
"0"
Pull-up
transistor
D
CK
Q
Two edge detect
"0"
"1"
"1"
"0"
D
CK
Q
Two edge detect
"0"
"1"
"1"
"0"
P2 key input enable bit
P1 key input enable bit
Port P1
0
direction register
Port P1
7
direction register
Port P2
0
direction register
Port P2
7
direction register
P3 key input enable bit
Interrupt control circuit
Key input interrupt control register
Key input interrupt
request
One-shot
generating circuit