Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Categories > Micro Controllers


Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc.

Reply
 
Tools
Old 2nd June 2006, 09:07 AM   #1
Default how to handle external interrupt

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)
{

}

}
anch is offline  
Old 3rd June 2006, 03:21 AM   #2
Default

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?
Papabravo is offline  
Reply

Tags
external, handle, interrupt

Thread Tools
Display Modes




All times are GMT. The time now is 12:25 AM.


Electronic Circuits  |  Learning Electronics
eXTReMe Tracker