|
M38203M4 Datasheet, PDF (115/344 Pages) Mitsubishi Electric Semiconductor – 8-BIT SINGLE-CHIP MICROCOMPUTER | |||
|
◁ |
APPLICATION
2.2 Interrupts
2.2.5 Key input interrupt
The Key input interrupt request occurs when an âLâ level voltage is applied to the pin set for the input mode
of the port P2.
For interrupt sources except the INT interrupts and the Key input interrupt, refer to âCHAPTER 1â.
(1) Connection example when the Key input interrupt is used
When using the Key input interrupt, after set ports P20 to P23 for the input mode, configure an âLâ level
valid key-matrix.
Figure 2.2.15 shows a connection example when the key input interrupt is used, and a port P2 block
diagram. In the connection example in Figure 2.2.15, an Key input interrupt request is caused by
pressing the key corresponding to one of ports P20 to P23.
Port PXx âLâ level output
PULL register A, b2 = â1â
V1
P27
output
V2
Port P27
latch
Port
P2 direction
register, b7 = â1â
V1
P26
output
V1
P25
output
V2
Port P26
latch
Port
P2 direction
register, b6 = â1â
V2
Port P25
latch
Port
P2 direction
register, b5 = â1â
V1
P24
output
V1
P23
input
V2
Port P24
latch`
Port
P2 direction
register, b4 = â1â
V2
Port P23
latch
Port
P2 direction
register, b3 = â0â
V1
P22
input
V2
Port P22
latch
Port
P2 direction
register, b2 = â0â
V1
P21
input
V2
Port P21
latch
Port
P2 direction
register, b1 = â0â
V1
P20
input
V2
Port P20
latch
Port
P2 direction
register, b0 = â0â
V1: P-channel transistor for pull-up
V2: CMOS output buffer
Port P2 input
reading circuit
Key input interrupt request
Fig. 2.2.15 Connection example when key input interrupt is used, and port P2 block diagram
3820 GROUP USERâS MANUAL
2â29
|
▷ |