Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
06/29/99 06:17
Read: times


 
#539 - RE: Stack and interrupts
Hi Vasilis,

your 2. solution is the better way.

Often it was done in the main loop.
But the main loop can also check and serve a lot of other conditions.
And then the main loop can need more time than for
receiving only 1 byte.
Also the timeout should be longer than 65536 cycle.
In these cases the receive interrupt can write many bytes to a buffer
and set a receive bit (e.g. in the bit space at 20h...2Fh).
And the timer interrupt can be expanded by DJNZ instructions to
set a bit only at roll over, not on every interrupt.
But the way to check, serve and clear these bits is still the same.

In general every interrupt should return to resume the interrupted task.
Since on bigger programs you can no longer say, which task
was interrupted. And then jumping out can cause a lot of
unexpected effects.
In my 10 years practice I never want to do so.


Peter


List of 5 messages in thread
TopicAuthorDate
Stack and interrupts            01/01/70 00:00      
RE: Stack and interrupts            01/01/70 00:00      
RE: Stack and interrupts            01/01/70 00:00      
RE: Stack and interrupts            01/01/70 00:00      
RE: Stack and interrupts            01/01/70 00:00      

Back to Subject List