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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
06/28/99 22:01
Read: times


 
#538 - RE: Stack and interrupts
Yes u are right maybe i confuse some here (sorry) but the whole idea was about stack and in general ie (i wrote this demonstration code that was relavant with serial ie)
I agree with u that polling
""""""
jnb ri,$
mov p1,sbuf ;or somewhere else
clr ri
"""""""
is good solution but not always sometimes u waist time to check RI and 2nd u must pay attention to "hangs"

If ur hardware works correctly u will receive data at a point. But if not the code will hang.

In order to avoid that problem I think there are few solutions.

1.
Enable timer IE
start timer
jnb ri,$
stop timer
disable ie

_________________________
2. setb tr0
wait: jnb ri,delay
clr tr0
......


delay: jnb tf0,wait
clr tf0
clr tr0
.....


or something worst
______________________
3.

enable watchdog timer
jnb ri,$
disable watchdog

Anyway thank u for help Peter and Franc

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