hello Nuno (or Nu–o ?), Thanks for your answer :-) My first analysis leads to roughly the same approach. But I still have some inquiries : > All timers are maintained by an Interrupt timer. > Do you mean you must wait for a timer induced interruption to increment your several auxilliary timers ? Remember I must use a 12C509 without an interrupt :-( Somebody told me I could use a watchdog wakeup ? (but the timing would be : 1st not accurate, 2nd too long) -> any other idea ? > Resources are managed through semaphores (which are also used to signal > end of > delays.). > By "semaphore", I think you mean 1-bit-"flag" at H or L level ? > Since, memory is short, all variables are global. > That was also my way of thinking : no need to use stacks ! > Typical cycles are not closed, but can be. It all depends on the timing > constraints (maximum atomic execution time for each task.). > What do you mean by "cycles are not closed" ? Thanks for any additional idea ;-) Jean-Yves