> > Sorry for the typing errors above, that's what you get for having the > > breadboard in front of the keyboard :) > > > > > > On 19 April 2013 16:41, Chris Roper wrote: > > > >> Roam Black came up with what looks like a god one too: > >> > >> http://www.romanblack.com/PICthread.htm >=20 > Thanks for posting that! Roman always comes up with very clever solutions= ! >=20 > Harold Just looked at Romans page, and he talks about priorities. I have mentioned= a priority system in the past that was used on a series of machines I had = dealings with, and seems to me could be implanted with very few instruction= s.=20 Each task has a priority level, the lower the number the higher the priorit= y. Each round robin of tasks the priority of a task was decremented by one,= and on reaching 0 the task was run. Its priority was then reset to the pri= ority assigned to that task. This meant that even the lowest priority task = eventually rises to the top and is run. If needed the default priority leve= l for a task can be fine-tuned while running, or changed according to a tas= k mix if desired. The machine I dealt with had task priorities from 1 to 99= , but it would obviously be sensible to use an 8 bit counter on the micros = we deal with. --=20 Scanned by iCritical. --=20 http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .