M30240ECFP MITSUBISHI [Mitsubishi Electric Semiconductor], M30240ECFP Datasheet - Page 36

no-image

M30240ECFP

Manufacturer Part Number
M30240ECFP
Description
M30240 Group Specification
Manufacturer
MITSUBISHI [Mitsubishi Electric Semiconductor]
Datasheet
Specifications in this manual are tentative and subject to change
Key-Input Interrupt
2.14 Key-Input Interrupt
Figure 1.18: Block diagram of key input interrupt
2.14.1 Enabling/disabling the key-input interrupt
2.14.2 Occurrence timing of the key-input interrupt
2.14.3 How to determine a key-input interrupt
If the direction register of any of pin of Port0 or Port1 is set for input and a falling edge is input to that
port, a key-input interrupt is generated. A key-input interrupt can also be used as a key-on wakeup
function for cancelling the wait mode or stop mode. Figure 1.18 shows the block diagram of the key-
input interrupt.
The key-input interrupt can be enabled and disabled using the key-input interrupt register (004D
The key-input interrupt is affected by the interrupt priority level (IPL) and the interrupt enable flag (I
flag).
With key-input interrupt acceptance enabled, ports P0 and P1, which are set to input, become key-
input interrupt pins (KI0 through KI15). A key-input interrupt occurs when a falling edge is input to a
key-input interrupt pin. At this moment, the level of other key-input interrupt pins must be “H”. No in-
terrupt occurs when the level of any other key-input interrupt pins is “L”.
A key-input interrupt occurs when a falling edge is input to one of 16 pins, but each pin has the same
vector address.Therefore, read the input level of ports P0 and P1 in the key-input interrupt routine to
determine the interrupted pin.
P1
Pull-up
transistor
i
/KI
P0
j
Pull-up
transistor
i
/KI
j
i=0~7; j=8~15
i=0~7; j=0~7
Port PX
pull-up select bit
Port P1
direction register
Port P0
pull-up select bit
Port P0
direction register
i
i
i
i
1-36
SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER
KIO
KIO
0
1 5
Key input interrupt control register
Interrupt control circuit
Mitsubishi microcomputers
M30240 Group
(address 004D
Key input
interrupt request
16
)
16
).

Related parts for M30240ECFP