Instructions

280Libraries
© 2013 Conrad Electronic
The return value expresses how often a interrupt got triggered until the function Irq_GetCount() has been
called. A value greater 1 shows that the interrupts
are triggered more rapidly than the interrupt service routine is processed.
5.13.4 Irq_SetVect
Interrupt Functions Example
Syntax
void Irq_SetVect(byte irqnr, dword vect);
Sub Irq_SetVect(irqnr As Byte, vect As ULong)
Description
Defines an interrupt service routine for a specified interrupt. At the end of the interrupt service routine the
function Irq_GetCount() has to be called, otherwise the interrupt service routine gets called continuously. A
vect of value Null sets the interrupt inactive again.
Parameter
irqnr specifies the interrupt type (see table)
vect is the name of the interrupt function to be called
5.13.5 IRQ Example
Example: Usage of Interrupt Routines
// INT_100HZ (AVR32Bit) or Timer 2 (MEGA) are normally called all 10ms.
// In this example the variable cnt gets increased every 10ms by one.