MITSUBISHI MICROCOMPUTERS
3822 Group
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
“1” to “0”. An example of using a key input interrupt is shown in
Figure 20, where an interrupt request is generated by pressing
one of the keys consisted as an active-low key matrix which inputs
to ports P20–P23.
Key Input Interrupt (Key-on wake-up)
A Key-on wake-up interrupt request is generated by applying a
falling edge 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
Port PX
X
“L” level output
PULL register A bit 2 = “1”
Port P2
direction register = “1”
7
Key input interrupt request
ꢀ
ꢀꢀ
ꢀꢀ
ꢀꢀ
ꢀꢀ
Port P2
latch
7
P2
7
output
output
Port P2
6
direction register = “1”
ꢀ
Port P2
latch
6
P2
6
Port P2
5
direction register = “1”
ꢀ
ꢀ
Port P2
latch
5
P2
5
output
output
Port P2
4
direction register = “1”
Port P2
latch
4
P2
4
Port P2
direction register = “0”
3
Port P2
ꢀ
ꢀ
ꢀꢀ
ꢀꢀ
Input reading circuit
Port P2
latch
3
P2
P2
3
input
Port P2
direction register = “0”
2
Port P2
latch
2
2
input
input
Port P2
direction register = “0”
1
ꢀ
ꢀꢀ
Port P2
latch
1
P2
1
Port P2
0
direction register = “0”
ꢀ
ꢀ
Port P2
latch
0
P2
0
input
ꢀ P-channel transistor for pull-up
ꢀ
ꢀꢀ CMOS output buffer
Fig. 20 Connection example when using key input interrupt and port P2 block diagram
24