View Full Version : dumbing down pwm with counter

03-27-2012, 04:45 PM
is there a breakdown of code and how the counter executes its function for pwm for a complete dummy to understand. ive spent many hours spinning my wheels and would like to get past this hump. ive read about the counters from the prop manual and an exercise in prop pe kit. is there a place to talk to someone in real time to get answers? is there a "tudor" or someone on this forum i could call on the phone periodically for help? -mike

03-27-2012, 04:57 PM
The great thing about the forums is that others can answer you -- at no fee to you -- on their own schedule. Keep in mind that time = $ for many forum participants.

And I would suggest that you not want to "dumb down" anything; just learn it. The counters can be tricky, but with a bit of persistence you'll get there (I'm an actor; if I can do it you certainly can). The real trick is how you define PWM. If you (like me) are wanting fixed-frequency, variable-duty-cycle PWM then it takes a little code to do that. You can use the counter to create the "on" portion of the signal while a synchronized timing loop handles the desired frequency of your signal. Many of us use this strategy for motor control (I'm updating a Propeller-based motor controller today).

The attached code is commented and may help you find your way.

Graham Stabler
03-27-2012, 05:21 PM
You are on the propeller forum, you are therefore not a dummy.

03-27-2012, 06:57 PM
thank you for that -mike