I wrote the program using external inturrupt0(p0.16). The program is executed but iam doing in the debug session it not going to IRQ_Handler.Tell me where iam doing the mistake. my program is
#include <LPC214X.H> #include <stdio.h>
void init_Eint1(void); __irq void IRQ_Handler(void); int main(void) { PINSEL0=0X00000000; IODIR0=0X00000001; init_Eint1();
}
__irq void IRQ_Handler(void) //irq subroutine {
EXTINT=0X00000001; //initialize the EINT0 if(EXTINT==0) { IOSET0=0X00000001; } else { IOCLR0=0X00000001; } VICVectAddr=0x00000000; }
void init_Eint1(void) {
EXTINT=0X00000001; PINSEL1=0X00000001; IOCLR0=0X00000001; EXTMODE=0X00000010; //edge sensitive mode EXTPOLAR=0X0000000; //falling edge VICIntEnable=0x00004000; VICVectAddr0=(unsigned long) IRQ_Handler; VICVectCntl0=0x0000002E; }
1) You failed to read the instructions on how to post source code. 2) You failed to stay inside main() 3) You clear the interrupt flag before you look at it. ...