EasyManuals Logo
Home>Renesas>Computer Hardware>M16C Series

Renesas M16C Series User Manual

Renesas M16C Series
380 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #53 background imageLoading...
Page #53 background image
Key input interrupt
M30240 Group
Rev.1.00 Sep 24, 2003 Page 35 of 360
1.2.14 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.
Figure 1.18: Block diagram of key input interrupt
1.2.14.1 Enable/Disable
The key-input interrupt can be enabled and disabled using the key-input interrupt register (004D
16
).
The key-input interrupt is affected by the interrupt priority level (IPL) and the interrupt enable flag (I
flag).
1.2.14.2 Occurrence timing of the key-input interrupt
With key-input interrupt acceptance enabled, ports P0 and P1, which are set to input, become key-
input interrupt pins (KI
0
through KI
15
). 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”.
1.2.14.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 ports P0 and P1 in the key-input interrupt routine to
determine the interrupted pin.
1.2.14.4 Related registers
Figure 1.19 shows the memory map of key-input interrupt-related registers
Figure 1.19: Memory Map of key input interrupt related registers
pull-up select bit
Port P1i
direction register
Port P1i/KIj
(Pull-up transistor)
i=0~7; j=8~15
Port PXi
Port P0i
pull-up select bit
Por t P0i
direction register
Port P0i/KIj
(Pull-up transistor)
i=0; j=0~7
KI15
KI0
Interrupt control circuit
Key input interrupt control circuit
Key input
interrupt request
(address 004D
16
)
Address
Register name Acronym
004E
16
004D
16
Key input interrupt register KUPIC
03E0
16
03E1
16
03E2
16
03E3
16
03E4
16
Port 0 P0
Port 1 P1
03FA
16
03FB
16
03FC
16
03FD
16
03FE
16
Pull-up control register 1 PUR1
03FF
16
Port 0 direction register
Port 1 direction register
PD0
PD1
Pull-up control register 0 PUR0
~
~
~
~
~
~
~
~

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Renesas M16C Series and is the answer not in the manual?

Renesas M16C Series Specifications

General IconGeneral
BrandRenesas
ModelM16C Series
CategoryComputer Hardware
LanguageEnglish

Related product manuals