Panasonic F77G, MN101C77C user manual Programmable Active Edge Interrupt, REDG4, IRQ4IE

Models: F77G MN101C77C

1 544
Download 544 pages 59.61 Kb
Page 141
Image 141

Chapter 3 Interrupts

3-3-4 Programmable Active Edge Interrupt

Programmable Active Edge Interrupts (External interrupts 0 to 4)

Through register settings, external interrupts 0 to 5 can generate interrupt at the selected edge either rising or falling edge.

Programmable Active Edge Interrupt Setup Example (External interrupt 0 to 4) External interrupt 4 (IRQ4) is generated at the rising edge of the input signal from P24. The table below provides a setup example for IRQ4.

 

Setup Procedure

 

 

 

Description

 

 

 

 

(1)

Specify the interrupt active edge.

(1)

Set the REDG4 flag of the external interrupt 4

 

IRQ4ICR (x'3FE6')

 

 

control register (IRQ4ICR) to "1" to specify the

 

bp5

: REDG4

= 1

 

rising edge as the active edge for interrupts.

(2)

Set the interrupt level.

 

(2)

Set the interrupt priority level in the IRQ4LV1-0

 

IRQ4ICR (x'3FE6')

 

 

flag of the IRQ4ICR register.

 

bp7-6

: IRQ4LV1-0= 10

 

 

 

 

 

 

 

 

If the interrupt request flag has been already

 

 

 

 

 

set, clear it.

 

 

 

 

 

[

Chapter 3. 3-1-4 Interrupt flag setup ]

(3)

Enable the interrupt.

 

(3)

Set the IRQ4IE flag of the IRQ4ICR register to

 

IRQ4ICR (x'3FE6')

 

 

"1" to enable the interrupt.

 

bp1

: IRQ4IE

= 1

 

 

 

 

 

 

 

 

 

 

External interrupt 4 is generated at the rising edge of the input signal from P24.

The Interrupt request flag can be set to "1" at switching the interrupt edge, so specify the interrupt active edge before the interrupt permission.

The external interrupt pin is recommended to be pull-up in advance.

When the programmable active edge interrupt is specified for external interrupt 0 to 4 (IRQ0 to IRQ4), set the EDGSELn flag of the both edge interrupt control register (EDGDT) to "0".

External Interrupts

III - 47

Page 141
Image 141
Panasonic F77G, MN101C77C Programmable Active Edge Interrupt, REDG4, Rising edge as the active edge for interrupts, IRQ4IE