In SX Microcontrollers, SX/B Compiler and SX-Key Tool, Peter Van der Zee wrote: Hi Bean; Please, my testing on this for possible SX/B implementation is still in the early stages, and won't likely proceed if there is not sufficient interest...... I still see a fair bit of work ahead. As you know, I have developed a full multi-threaded pre-emptive RTOS for the SX28, as well as a more simple minded non-pre-emptive co-operative RTOS (more like a scheduler really) that consumes less resources. Both of these are written in assembler, and I expect the pre-emptive unit is likely not compatible with SX/B; too many conflicts. It is the simpler co-operative RTOS that has a chance. Please correct me if I'm wrong, but my understanding is that SX/B stalls in a delay loop whenever a timing event takes place, such as serial communications. the processor hangs until the loop is completed, and no useful work can be done during this period. In fact, no other tasks can run simultaneous with these delay loops, and that is why SX/B serial communications cannot transmit and eceive at the same time. What I'm proposing (and this is a feature of both my RTOS schemes) is that timing is effected by scheduling things to occur, not by waiting for a certain number ol wait loops. What would need to happen is that SX/B be modified to eliminate its delay loops in favor of using a scheduling approach. In such a case, when a timing function (delay) is required, the calling program initiates a timer, and then immediately releases the processor to carry on with the next thread, and the timing function (delay) is performed in the background. When the timer has expired, it picks up the thread that called it at the point where the call was made. There will undoubtedly be some restrictions and compromises making this approach not possible for all SX/B applications, but I believe it has a good shot at being reasonable for most. Cheers, Peter (pjv) ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=157842#m157947 Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2006 (http://www.dotNetBB.com)