Rev.2.00 Oct 16, 2006 page 262 of 354
REJ09B0340-0200
M30245 Group
2. Key-Input Interrupt
Figure 2.14.1. Memory map of key-input interrupt-related registers
2.14 Key-Input Interrupt Usage
0041
16
03F6
16
03F9
16
03FE
16
Key input interrupt control register (KUPIC)
Port P10 direction register (PD10)
Key-input mode register (KUPM)
Pull-up control register 2 (PUR2)
2.14.1 Overview of the key-input interrupt usage
Key-input interrupt can be generated by a falling edge, rising edge or both edges input to any Port 10 pin.
It can also be used as a Key-on wake up function for canceling the wait mode or stop mode. It is possible
to select the edge of the Key input interrupt for P10 with bits 0 and 1 of key input mode register. This
register is also used to enable or disable Port 10 pins that are to be used for Key-input interrupts. Port 10
can be configured with pull-up resistors using the pull-up control resistor.
The following is an overview of the key-input interrupt usage:
(1) Enabling/disabling the key-input interrupt
The key-input interrupt can be enabled and disabled using the key-input mode register (03F9
16
) and
the key-input interrupt register (0041
16
). The key-input interrupt is affected by the interrupt priority
level (IPL) and the interrupt enable flag (I flag). A falling edge, rising edge or both edges input to any
Port 10 pin can be selected by P10 Key-input edge select bits (bit0 and bit1 of 03F9
16
).
(2) Occurrence timing of the key-input interrupt
With key-input interrupt acceptance enabled, pins P10
0
through P10
7
, which are set to input, become
_____
____
key-input interrupt pins (KI
0
through KI
7
). A Key-input interrupt occurs when the selected edge is input
to a Key-input interrupt pin. At this moment, the level of other key-input interrupt pins must be “H”. No
interrupt occurs when the level of other key-input interrupt pins is “L”.
(3) How to determine a key-input interrupt
A key-input interrupt occurs when the selected edge is input to one of eight pins, but each pin has the
same vector address. Therefore, read the input level of Port P10 in the key-input interrupt routine to
determine the interrupted pin.
(4) Registers related to the key-input interrupt
Figure 2.14.1 shows the memory map of key-input interrupt-related registers, and Figure 2.14.2 and
2.14.3 show key-input interrupt-related registers.
Содержание M16C FAMILY
Страница 12: ...Chapter 1 Hardware...
Страница 13: ...See M30245 group datasheet...
Страница 14: ...Chapter 2 Peripheral Functions Usage...
Страница 303: ...THIS PAGE IS BLANK FOR REASONS OF LAYOUT...
Страница 304: ...Chapter 3 Examples of Peripheral Functions Applications...
Страница 340: ...Chapter 4 External Buses...
Страница 361: ...THIS PAGE IS BLANK FOR REASONS OF LAYOUT...
Страница 362: ...Chapter 5 Standard Characteristics...
Страница 369: ...1753 Shimonumabe Nakahara ku Kawasaki shi Kanagawa 211 8668 Japan M30245 Group REJ09B0340 0200 User s Manual...