??? 06/13/06 10:20 Read: times |
#118210 - interrupt is really an interrupt |
Hello everybody!
Berore i ask my question can any one among the readers tell me where to the bible of uC. I need it. Hardcopy or softcopy. Or atleast the link. Ok now the question............... I was using interrupt in 89ls8252( same as 8051 family). I used Int0 i.e port pin p3.2. The normal interrupt concept is that whenever an interupt occurs the uC executes the current on-going instruction, saves the contents of PROGRAM COUNTER(PC; which is the address of next instruction where the uC has to return after executing the ISR)onto the stack and then jumps to the vector address. ok thats all good! But in my case it is not happening like this. I simulation it works but on board it is not working. While debugging I found that my program goes to the vector address, executes the codes BUT DOES not return from the interrupt.I HAVE GIVEN RETURN FROM INTERRUPT(RETI)AT THE END OF INTERRUPT ROUTINE. BUT it works well when I use the instruction as---- (assembly coding) MOV A,#32H ------ ---- SOME INSTRUCTIONS ----- ------ LOOP1: (INTERRUPT COMES HERE) JB P3.2,LOOP1 (IF NO INTRRUPT0 LINE WILL REMAIN HIGH) LOOP2: JNB P3.2,LOOP2 (UNTIL THE INTERRUPT LINE IS LOW IT REMAINS HERE) --------- ------ SOME INSTRUCTIONS --------------- END WHY IT DOES NOT WORKS WITHOUT THE INSTRUCTION JB P3.2,$ AND JNB P3.2,$. PLS CLEAR IT OUT. |
Topic | Author | Date |
interrupt is really an interrupt | 01/01/70 00:00 | |
post your code | 01/01/70 00:00 | |
How to post code | 01/01/70 00:00 | |
forgot edge triggering? | 01/01/70 00:00 | |
Level & Edge interrupts? | 01/01/70 00:00 | |
Clarification | 01/01/70 00:00 | |
It is an INSULT to those that may be wil | 01/01/70 00:00 | |
Why it does not work![]() | 01/01/70 00:00 |