On Fri, 5 Nov 1999, Tracy Smith wrote: > In the simplest case, 'co-routines' may be thought of > multi-tasking with just two tasks: task_A & task_B. I commonly use this in PICs (and other micros) to operate the A/D. I set TMR0 to interrupt at 2x the sample rate, and in interrupt service either sampling to the track-and-hold is done (state 1) or the conversion is started (state 2). I pick up the conversion result at the beginning of the next sample service state. /**/