|
Re: FYI about using PWM 13-16 with interrupts
PWMs 13-16 appear to be bit-banged. We had trouble with them last year. If an interrupt occurs while the generate_pwms function is running, the pulse width will be lengthend (or shortened, depending on the part of the cycle you're in) by the amount of time that the uC takes to handle the interrupt. We moved the generate_pwms call to the very last thing that happened each loop - this solved the problem.
__________________
-
An ounce of perception is worth a pound of obscure.
|