Key-Input Interrupt Usage; Overview Of The Key-Input Interrupt Usage - Renesas M16C Series User Manual

16-bit single-chip microcomputer
Hide thumbs Also See for M16C Series:
Table of Contents

Advertisement

M30245 Group

2.14 Key-Input Interrupt Usage

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:
www.DataSheet4U.com
(1) Enabling/disabling 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
(2) Occurrence timing of the key-input interrupt
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".
(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.
Figure 2.14.1. Memory map of key-input interrupt-related registers
Rev.2.00 Oct 16, 2006
REJ09B0340-0200
_____
through KI
0
0041
16
Key input interrupt control register (KUPIC)
Port P10 direction register (PD10)
03F6
16
Key-input mode register (KUPM)
03F9
16
03FE
Pull-up control register 2 (PUR2)
16
page 262 of 354
). The key-input interrupt is affected by the interrupt priority
16
through P10
0
____
). A Key-input interrupt occurs when the selected edge is input
7
2. Key-Input Interrupt
16
).
16
, which are set to input, become
7
) and

Advertisement

Table of Contents
loading

Table of Contents