20
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
3827 Group
MITSUBISHI MICROCOMPUTERS
Key Input Interrupt (Key-on wake-up)
A Key-on wake up interrupt request is generated by applying “L”
level to any pin of port P2 that have been set to input mode. In
other words, it is generated when AND of input level goes from “1”
to “0”. An example of using a key input interrupt is shown in Figure
16, where an interrupt request is generated by pressing one of the
keys consisted as an active-low key matrix which inputs to ports
P2
0
–P2
3
.
Fig. 16 Connection example when using key input interrupt and port P2 block diagram
8
88
8
88
8
88
8
88
8
88
8
88
8
88
8
88
Port P2
0
latch
Port P2
0
direction register = “0”
Port P2
1
latch
Port P2
1
direction register = “0”
Port P2
2
latch
Port P2
2
direction register = “0”
Port P2
3
latch
Port P2
3
direction register = “0”
Port P2
4
latch
Port P2
4
direction register = “1”
Port P2
5
latch
Port P2
direction register = “1”
Port P2
6
latch
Port P2
7
latch
Port P2
7
direction register = “1”
Port P2
0
input
Port P2
1
input
Port P2
2
input
Port P2
3
input
Port P2
4
output
Port P2
5
output
Port P2
6
output
Port P2
7
output
PULLA register
Bit 2 = “1”
Port P2 input
reading circuit
Key input interrupt request
Port PXx
“L” level output
8
88
CMOS output buffer
P-channel transistor for pull-up
Key input control register = “1”
Key input control register = “1”
Key input control register = “1”
Key input control register = “1”
Key input control register = “1”
Key input control register = “1”
Key input control register = “1”
Port P2
6
direction register = “1”
Key input control register = “1”