-
Notifications
You must be signed in to change notification settings - Fork 1
The the information in a "remote control" (RC) pwm signal is represented by the high time of the signal, not the duty cycle. typical ranges for the frequency range from 20Hz to 200Hz. With servos, the "middle" position is usually around 1.5ms of high time, and the max and min positions are usually around +/- 0.5ms of that base value
#PRU PWM program The PWM program currently inside of i2c_bitbang/pru_sw/example_apps/pwm currently will control two devices, though it can be extended to do many more channels. It's made to do RC type PWM, as described above, not your regular duty cycle type.
When you run the program, on the terminal, you can type two numbers to specify the high time of each channel.
So for example, if you typed "150 150" , then it would have both channels have a high time of 1.5ms. If you type "160 140" , then channel 0 has a high time of 1.6ms, while channel 1 has a high time of 1.4ms.
It should be noted that the accuracy is artificially reduced; It can actually be quite accurate, to about 0.0002ms, which depending on what range of high times a motor can support. This comes to somewhere betwen 3500 and 5000 steps between full throttle and cut throttle. Most r/c systems only have 1024 or 2048 positions, so this is pretty darn good.