i m using EINT 2 on port P0.a5 on LPC 2148
here is my code ..can anyone guide me pls..
PINSEL0 = 0x80000000; //Select P0.7 for EINT2 VICIntSelect = 0x00; VICVectCntl1 = 0x20 | 0x10; //EINT 2 is selected VICVectAddr1 = (unsigned long) intr2_srv; VICIntEnable = 1<<0x10; EXTMODE = 0x04; EXTPOLAR = 0x04; // HIGH Level
this is the interrupt routine...
void intr2_srv (void) __irq { manual(); T0IR = 0x01; EXTINT |=0x04; //clear interrupt VICVectAddr = 0; // Acknowledge Interrupt } void manual() // For blinking LEDs after 1sec delay. { IOSET0 =0x00000001; timer0(2000); IOCLR0 =0x00000001; timer0(2000); }