>In FreeRTOS, a lower priority task only runs if all >the higher priority tasks are sleeping. One scheme I have seen used in a co-operative OS is each task is assigned a priority number, the larger the number the lower priority of the task. Then as the task scheduler checks each task, it decrements the priority number , and when it reaches 0, that task is run. This means that even the lowest priority task will eventually reach a point where it will get an opportunity to run, even with a large number of high priority tasks. When the task has had an opportunity to run, and goes back to sleep, the OS reloads the priority number with the original value, ready for the next round of decrementing. -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist