isrtreads 9600bps/19200bps
Kiwi
Posts: 85
HEllo,
I have 2 testprograms converted to be used with ISRtreads.
The one with the 9600bps is working fine. Typing and receiving works perfect.
The one with the 19200bps is not working fine. Some times it return a bad byte.
does somebody can take a look into it.
Kurt
I have 2 testprograms converted to be used with ISRtreads.
The one with the 9600bps is working fine. Typing and receiving works perfect.
The one with the 19200bps is not working fine. Some times it return a bad byte.
does somebody can take a look into it.
Kurt
Comments
In each of your examples (9600 and 19200) you have two working programs that you have tried to make them VP's in the ISR. One prog. to send and rec'v, the other to blink an led. Both programs would work correctly with the variables set for one "thread".
The problem is you've tried to integrate the 2 VP's with this code at the beginning of the ISR.
and then tweaking the timing with corrections to your rx_divide variable for the start delay ( your comments reflect this--"48 if only one thread"). Refer to some of the examples
www.parallax.com/sx/downloads.asp on using two VP's. There are a few examples of 2 VP's running simultaneously.
Then check out Peter's RTOS example at www.parallax.com/sx/contest/contest_rtos.asp. I think this would be a good solution to your problem of integrating two working programs into one ISR.
edit: I forgot to mention sxlist as a resource on VP's here>>> http://www.sxlist.com/images/sxlist/Virtual Peripheral User's Manual.pdf
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Bad spellers of the world untie!
Post Edited (mojorizing) : 1/11/2006 5:29:07 PM GMT
thanks