Saravanakumar.S@... wrote:
>Hi ,
>
>I am having problem with the EINT0 interrupt in LPC2106 .I have searched the posts,and i tried all the procedures in the User manual.Still the interrupt is not rised in the IRQ mode.I used the Keil IDE for my application.
>
>Code:
>int main(void)
>{
> PINSEL1=0X00000001;
> VICIntSelect &= ~0x4000;
> VICVectAddr0 = (unsigned int)int0ISR;
> VICVectCntl0 = 0x2E;
> VICIntEnable = 0x4000;
> while (1)
> {
> ;
> }
>}
>ISR ROUTINE:
>static void int0ISR(void)
>{
> IODIR=0X01;
> IOSET=0X01;
> delay();
> IOCLR=0X01;
> EXINT=0X01;
> VICVectAddr = 0;
>}
>I dont know why this simple program is not working.Can you tell me your valuable suggestions.
>
>
>
Well, there is a lot wrong here. Too much to say that any one line is
at fault. There are some basic understandings you have to get down. For
example, if you want to wiggle the pin to see if the int0ISR is working,
don't use a delay. Toggle the pin on each entry into the ISR, an easy
way would have been:
static void int0ISR(void)
{
static pinState = False;
if (pinState) IOSET1 = 1;
else IOCLR = 1;
pinState = !pinState;
}
Another is that you did not turn on the interrupt of the system???
There are at least four examples of LED blinkers in the files section of
the Yahoo group. Get one and study it.
Regards,
TomW
--
Tom Walsh - WN3L - Embedded Systems Consultant
http://openhardware.net, http://cyberiansoftware.com
"Windows? No thanks, I have work to do..."
----------------------------------------------------Message
Re: [lpc2000] Query in External interrupt of LPC2106
2006-01-10 by Tom Walsh
Attachments
- No local attachments were found for this message.