lpcware

Interrupt

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by pinkesh on Thu Jul 24 06:00:30 MST 2014
Hello ,

This is Pinkesh .I am novice to LPC family. Currently I am using LPC2129 and I have written the following interrupt based  program .Please let me know what is wrong with it.

#include <LPC21xx.H>

void extinterrupt(void)__irq ;
void delay(unsigned int no);

int main()
{
IO1DIR |= (1<<16);
PINSEL0  |= 0x000000C0;
VICVectCntl0 = 0x0000002F;
VICVectAddr0 = (unsigned) extinterrupt;
VICIntEnable = 0x00008000;
while(1)
{
}
}

void extinterrupt(void) __irq
{
IO1SET |= 0x00010000;
delay(1000);
IO1CLR  |= 0x00010000;
EXTINT = 0x00000002;
}

Original Attachment has been moved to: Interrupt.c.zip

Outcomes