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

Require Interrupt function for INT0

Hi,

Can anybody give me a small code which can demonstrate to me the way to write interrupt functions.

I have tried but it din't worked.The code is below -

#include<AT89x52.h>
#include<stdio.h>

void int0(void) interrupt 1
{
P2^=0x01;
}

void main()
{
EA=1;
while(1)
{
}
}

0