This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

external interrupt problem

Hi,

I am trying simulate external interrupt with LPC2104 using keil. But it doesn't work. I pasted my c code below and i didn't make any change in startup.s code.

I'm trying to turn off led at p0.0 and turn on led at p0.1 when external interrupt signal comes.

#include <LPC21xx.H>



void EXTINTVectoredIRQ(void)__irq;



int main(void)
{
        IODIR0 = 0x00000003;
        IOSET0 = 0x00000001;
        PINSEL0 = 0x20000000;

        VICVectCntl0 = 0x0000002F;
        VICVectAddr0 = (unsigned)EXTINTVectoredIRQ;
        VICIntEnable = 0x00008000;

        while(1)
        ;
}


void EXTINTVectoredIRQ(void)__irq
{
IOSET0 = 0x00000002;
        IOCLR0 = 0x00000001;
        EXTINT = 0x00000002;
        VICVectAddr = 0x00000000;
}


Circuit scheme is below:

img696.imageshack.us/.../irqled.png

I don't know where is the mistake.