1st : thanks for all answers ... - Kim for the Microchip AN585 reference but, as far as I have read, it dealt with interrupts ! ... - Anyway, let's precise my aim for Barry King who asked me : >Are you looking for a commercially built kernal? Or are you looking >for ideas on how to structure code to multi-task? > >If you are asking for ideas, we need to know more about what the tasks >will do. To multi-task without interrupts, you will end up with a >main loop which calls the tasks, or portions of them. The taks must >be structured to run for some time, then let another task run. And >there will usually be some other code to coordinate any shared >variables or communication between the tasks. > >Two important things are to know how the tasks must communicate, and >whether there is hardware that they must share. Also, it is >important to know what latency is acceptable, that is, how long can >one of the tasks be stopped before it fails? I'm looking for ideas for a specific project : I have to check for serial inputs while out-puting one or more PWM depending on the input(s). In fact, my first application should be an attempt to read 1 RC pulsed command, ie : 1) Measure the "n"st positive pulse among 7 overall pulses ; synchro being made by a 1st larger pulse and length of the usefull pulse varying between 1 and 2 ms ; overall time = 10 to 20 ms 2) While outputing a PWM at 10 to 100 Hz, from #0 to #100% duty cycle 3) That's all ! 4) I've thought of an absolute timing that each individual task could check and determine if their allowed time have passed. That shouldn't be very accurate but enough for me ? Thanks for any other comment !