Mike said:hjames,
So you're shifting that '1' bit after each servo 'on-time' then delaying 20-msecs minus the cumulative on-times before starting over?
Yeah, that sounds about right - except there isn't really any need to calculate that last 20msec - (sum of all pulse times). Just have another timer running at 50Hz (i.e. every 20msec) that actually starts the whole sequence - less math, and no jitter there either.
Mike said:What happens if Servo 03 on-time changes? Wouldn't that affect time between pulses for Servo 04 through 08 during one sequencial cycle?
Mike
The ISR should be doing relative scheduling - set the new deadline for the next pulse relative to the old one. The ISR should only be looking at the pulse width of the servo it's currently pulsing, there's no need to go through all the other pulse times.
James