Quote:
Originally Posted by Noah Kleinberg
Is there any reason that you couldn't use "int"s to store your motor speeds and have a greater range of values with the higher precision obtained by using the CCP (that is, instead of using the gain and center #defines)? I looked through the code and don't see why this wouldn't work, what i mean is something like this as a change to the PWM() function...
|
Yes, certainly! I didn't do it that way because I wanted backward compatibility with Generate_Pwms(). You could have any units you want, even degrees. Cool, eh?
Quote:
Originally Posted by Noah Kleinberg
Also, could CCPR1L and CCPR1H (or 2-5) each be 255? I ask this because with the default GAIN and CENTER values, the maximum I believe is 21400 (that is for the two combined as one word), as opposed to 65535.
|
Sure, but having pulses as long as 6.5535 ms doesn't do you much good when controlling servos and victors, which want to see inputs ranging from about 1ms to 2ms.
-Kevin