EmbeddedRelated.com
Forums
The 2024 Embedded Online Conference

lpc2104 external interrupt problem

Started by "ene...@ymail.com" January 24, 2012
Hi,

I am trying simulate external interrupt of LPC2104 using keil in proteus. 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

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:

http://img696.imageshack.us/img696/3778/irqled.png

I don't know where the mistake is.

Any help appreciated.

An Engineer's Guide to the LPC2100 Series

--- In l..., "enesalbay@..." wrote:
>
> Hi,
>
> I am trying simulate external interrupt of LPC2104 using keil in proteus. 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.
Hi. Check this out: http://tech.groups.yahoo.com/group/lpc2000/message/56142

Thanks for reply.

I have seen before this message and i tried it. Unfortunately it failed.

On Tue, Jan 24, 2012 at 8:30 PM, Cristi Neagu wrote:

> **
>
> --- In l..., "enesalbay@..." wrote:
> >
> > Hi,
> >
> > I am trying simulate external interrupt of LPC2104 using keil in
> proteus. 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.
>
> Hi. Check this out:
> http://tech.groups.yahoo.com/group/lpc2000/message/56142
>
>
>

--
Enes Albay



The 2024 Embedded Online Conference