The technique used to create extra PWM channels depends on the frequency and accuracy required.
One of the best ways to generate accurate timing intervals is the Timer 0 interrupt.
Timer 0 continuously counts from 0 to 255 and can generate an interrupt when it overflows back from 255 to 0. The clock source for Timer 0 is controlled by a prescaler that can be programmed from the Flowcode interrupt component to divide the master clock frequency by a range of values.
A time interval can be set by preloading the Timer 0 count register with 255 - interval (based on the prescaled timer clock frequency).
The interrupt service macro must alternaly preload the appropriate MARK and SPACE values into the Timer 0 count register (SPACE = 255 - MARK), and control the logic level of the selected output.
Special precautions might be required if the MARK value is close to 0 or 255.