Both Edges Triggered Interrupt - Panasonic MN101L Series User Manual

Lsi
Table of Contents

Advertisement

Chapter 3
Interrupts
3.3.3

Both edges triggered Interrupt

Both edges (rising edge and falling edge) interrupt can be specified with the EDGDT.
Setting example of both edges interrupt
The following example shows how to select the both edges triggered IRQ0 at P10.
Step
Set P10 as IRQ0 pin
1
2
Select the both edges triggered IRQ0
Set the Interrupt level of IRQ0
3
4
Enable IRQ0
Interrupt edge (rising edge, falling edge or both edges (rising edge and falling edge)) of IRQn
must be changed when IRQnICR.IE is "0". After the interrupt edge is changed, IRQnICR.IR
must be cleared before setting IRQnICR.IE is "1".
..
..
III - 46
External Interrupts
Settings
Register
IRQIEN
Set IRQIEN.IRQ0EN to "1".
IRQISEL0
Set IRQISEL0.IRQ0SEL to "0".
* Set P10 as the IRQ0 pin.
EDGDT
Set EDGDT.EDGDT0 to "1".
IRQ0ICR
Set IRQ0ICR.LV1-0 as you like.
* IRQ0ICR.IR should be set to "0".
IRQ0ICR
Set the IRQ0ICR.IE to "1".
Description

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mn101lr05dMn101lr04dMn101lr03dMn101lr02d

Table of Contents