|
Re: Need help with PWM 1-2ms pulse control
If you're driving a victor from this, I don't think you need to worry about deadband. The victor has quite abit of deadband around the 127 region.
As for a servo.. well it may jitter around (not so sure).
You may want to print out the values to screen to see how much its jittering at. Maybe add a small (0.1uf? 1nF?) capacitor from signal to ground for the analog input. That usually helps when my analog cable is non-shielded and very long...
Edit:
apologies for using bit shifting, so I shall add a bit to explain what it is
>> is essentially known as 'bit shifting'.
Skipping the complicated details, it is simply:
a >> 1 same as a / 2
a >> 2 same as a / 4
a >> 3 same as a / 8
a >> 4 same as a / 16
The difference is that a bit shift operation takes significantly lesser processing time compared to a divide (unless compiler optimized).
Similarly, a << 1 same as a * 2
a << 2 same as a * 4
and so on.
Last edited by yongkimleng : 02-05-2008 at 00:25.
|