??? 01/15/09 14:12 Read: times |
#161530 - interrupts forever Responding to: ???'s previous message |
Charles Townsend said:
The interrupt happens and TI is ignored(or the program would not work in my case). Immediately (the first instruction) upon exiting the ISR, the TI bit is cleared in the OutChar routine. Indeed. This would save the day for this particular implementation. However, if later you would like to do anything useful while waiting for the character to be transmitted (and not just burn cycles idling in jnb $), you would run into troubles. So why not making it properly right now? Charles Townsend said:
You mean to say that if TI bit is ignored in the ISR routine that the interrupt would happen continuously, forever? No. Read what I have written above on this issue: I said:
There is always exactly one instruction executed of "main" between consecutive interrupts. Ergo, your "main" will run incredibly slow. This is "biblical" stuff. There are instructions - and reti is among them - after which one instruction is guaranteed to execute before being interrupted again. I don't have time to deal in detail with Jon's example right now; please go through http://www.8052.com/forumchat/thread/105089/page/1 . JW |
Topic | Author | Date |
serial interrupt? | 01/01/70 00:00 | |
Your Problem | 01/01/70 00:00 | |
still not working | 01/01/70 00:00 | |
you need to flag somehow the end of transmission | 01/01/70 00:00 | |
reply to Jan | 01/01/70 00:00 | |
Several | 01/01/70 00:00 | |
To Hans | 01/01/70 00:00 | |
And my reply to Charles | 01/01/70 00:00 | |
no interrupts works | 01/01/70 00:00 | |
the solution | 01/01/70 00:00 | |
Isn't that what Hans said? | 01/01/70 00:00 | |
Perfectly????? Prolly should look again. | 01/01/70 00:00 | |
Got to look ahead... | 01/01/70 00:00 | |
Another thing to consider | 01/01/70 00:00 | |
reply to Andy Neil | 01/01/70 00:00 | |
reply to Michael Karas | 01/01/70 00:00 | |
why is this a bad idea | 01/01/70 00:00 | |
Exactly why not perfect !!! | 01/01/70 00:00 | |
response to Jan Waclawek | 01/01/70 00:00 | |
interrupts forever | 01/01/70 00:00 | |
nope | 01/01/70 00:00 | |
Re: Erik![]() | 01/01/70 00:00 | |
if you HAVE to mix ... | 01/01/70 00:00 |