Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

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.

Latest threads

New Articles From Microcontroller Tips

Back
Top