how to handle external interrupt

Status
Not open for further replies.

anch

New Member
I am using atmel 89c51 micro controller and i am handling external interrupts
in Keil but it doesn't getting well. some one please provide me the Keil code for handling external interrupts. the code i am trying is:



void isr0 () interrupt 0
{
// some code here


}


void main()
{
EA = 1;
EX0 =1;

while(1)
{

}

}
 
Is your problem in the compilation or the execution? The listing you gave us doesn't do anything. You also did not select edge or level and there is no obvious interrupt condition so how can we tell if anything is happening or not. If you have a correct compilation then could you post the assembly listing?
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…