M30245_06 RENESAS [Renesas Technology Corp], M30245_06 Datasheet - Page 271

no-image

M30245_06

Manufacturer Part Number
M30245_06
Description
RENESAS 16-BIT SINGLE-CHIP MICROCOMPUTER M16C FAMILY / M16C/20 SERIES
Manufacturer
RENESAS [Renesas Technology Corp]
Datasheet
M30245 Group
Rev.2.00 Oct 16, 2006
REJ09B0340-0200
2.14 Key-Input Interrupt Usage
Figure 2.14.1. Memory map of key-input interrupt-related registers
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
(2) Occurrence timing of the key-input interrupt
(3) How to determine a key-input interrupt
(4) Registers related to the key-input interrupt
The key-input interrupt can be enabled and disabled using the key-input mode register (03F9
the key-input interrupt register (0041
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
With key-input interrupt acceptance enabled, pins P10
key-input interrupt pins (KI
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”.
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.
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.
03FE
0041
03F6
03F9
16
16
16
16
page 262 of 354
Key input interrupt control register (KUPIC)
Port P10 direction register (PD10)
Key-input mode register (KUPM)
Pull-up control register 2 (PUR2)
_____
0
through KI
____
16
7
). A Key-input interrupt occurs when the selected edge is input
). The key-input interrupt is affected by the interrupt priority
0
through P10
7
, which are set to input, become
2. Key-Input Interrupt
16
).
16
) and

Related parts for M30245_06