Quote:
Originally Posted by Michael Hill
I'd disagree that 8 bits is enough...
|
8 bits is more than enough for FRC, especially considering the PWM signal is actually a 1 bit signal.
You can get more resolution than 8 bits if you modulate the PWM command properly. For example, if you want 9 bit resolution you can alternately add and subtract a half bit from every output. For example, let's say you really want an output of 132.5. In that case, send 133 one sample and 132 the next sample (over and over again) and the electronics and mechanics of the system will act just as if you're sending 132.5. Of course, this depends on the system "time constant" being much slower than the rate you are outputting PWM commands (which it usually is for an FRC robot). If you want more resolution than that, you can create a fancy algorithm with a counter and a threshold, which is how PWM is actually implemented in many cases.