Key-Input Interrupt; Overview; Related Registers - Renesas M16C Series User Manual

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

Advertisement

M30240 Group

2.11 Key-Input Interrupt

2.11.1 Overview

A Key-input interrupt occurs when a falling edge is input to any pin of Ports P0 or P1. The following is
an overview of the key-input interrupt:
2.11.1.1 Enable/Disable
The key-input interrupt can be enabled and disabled using the key-input interrupt register. The key-input
interrupt is affected by the interrupt priority level (IPL) and the interrupt enable flag (I flag).
2.11.1.2 Occurrence timing
With key-input interrupt 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 interrupt occurs when the
level of other key-input interrupt pins is "L".
2.11.1.3 How to determine a key-input interrupt
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 the pins on Ports P0 and P1 in the key-input interrupt routine to
determine the interrupted pin.

2.11.1.4 Related registers

Figure 2.119 shows the memory map of key-input interrupt-related registers, and Figure 2.120 shows
key-input interrupt-related registers.
Figure 2.119: Memory map of key-input interrupt-related registers
Rev.1.00 Sep 24, 2003 Page 271 of 360
004D
Key-input interrupt control register
16
03E0
Port 0
16
03E1
Port 1
16
03E2
Port 0 direction register
16
03E3
Port 1 direction register
16
03FC
Pull-up control register 0
16
Key-Input Interrupt
KUPIC
P0
P1
PD0
PD1
PUR0

Advertisement

Table of Contents
loading

Table of Contents