Both Edges Interrupt - Panasonic F77G User Manual

Microcomputer mn101c series
Table of Contents

Advertisement

Chapter 3 Interrupts
3-3-5

Both Edges Interrupt

Both Edges Interrupt (External interrupts 0 to 4)
Both edges interrupt can generate interrupt at both the falling edge and the rising edge by the input signal
from external input pins. CPU also can be returned from standby mode by both edges interrupt.
Both Edges Interrupt Setup Example (External interrupts 0 to 4)
External interrupt 2 (IRQ2) is generated at the both edges of the input signal from P22 pin.
An example setup procedure, with a description of each step is shown below.
Setup Procedure
(1) Select the both edges interrupt.
EDGDT (x'3F8F')
bp2
(2) Set the interrupt level.
IRQ2ICR (x'3FE4')
bp7-6
(3) Enable the interrupt.
IRQ2ICR (x'3FE4')
bp1
At the both edge of the input signal from P22 pin, an external interrupt 2 is generated .
When the both edge interrupt is selected, the interrupt request generates at the both edge,
regardless of the REDGn flag of the external interrupt control register (IRQnICR).
The interrupt request flag may be set to "1" at switching the interrupt edge. So, clear the
interrupt request flag before the interrupt enable. Also, select the both edge interrupt before
the interrupt enable.
The external interrupt pin is recommended to be pull-up, in advance.
III - 48
External Interrupts
: EDGSEL2 = 1
: IRQ2LV1- 0 = 10
: IRQ2IE
= 1
Description
(1) Set the EDGSEL2 flag of the both edges
interrupt control register (EDGDT) to "1" to
select the both edges interrupt.
(2) Set the interrupt level by the IRQ2LV1-0 flag of
the IRQ2ICR register.
The interrupt request flag of the IRQ2ICR
register may be set, so make sure to clear the
interrupt request flag (IRQ2IR).
[
Chapter 3 3-1-4 Interrupt flag setup ]
(3) Set the IRQ2IE flag of the IRQ2ICR register
to "1" to enable the interrupt.

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Panaxseries mn101c77cPanaxseries mn101f77g

Table of Contents