|
Re: Control Problems
Quote:
|
Originally Posted by Rick TYler
Just say "no" to PWMs 13-16. (Are you using open-loop driving?)
|
Yes, like Rick said PWMs 13-16 can be glitchy, especially in combination with interrupts.
See the Motors and the High Port Numbers post, but to summarize it in the words of M. McLeod:
Quote:
|
Originally Posted by Mark McLeod
For these pwms 13-16 alone, the software gets direct control to generate a timed pulse of between 1 and 2 ms duration, 1.5ms being neutral.
Any interrupts, interrupt the software timing these pulse widths, but the software doing the timing doesn't know this. Just like none of your other regular code is ever aware an interrupt has occurred. So the software happily generates what it thinks is a neutral pulse of 1.5ms, but any interrupt handler that pops in, suspends the execution of your code, does it's thing, and returns control will extend or stretch the time of your pwm pulse by the amount of time it took to service that interrupt.
So instead of a 1.5ms pulse, for example, you'll end up with a 1.8ms pulse.
|
Good luck to all,
Robinson
__________________
'... who are you, then?'
'I am part of that power which eternally
wills evil and eternally works good.' Goethe, Faust
Last edited by gnirts : 15-02-2006 at 02:11.
Reason: found the answer, saw the light
|