Shop OBEX P1 Docs P2 Docs Learn Events
PWM Duty Adjustment - on the fly — Parallax Forums

PWM Duty Adjustment - on the fly

PhilldapillPhilldapill Posts: 1,283
edited 2009-05-10 06:02 in Propeller 1
Currently, I'm using the standard PASM PWM object in the obex. I can change the duty cycle as normal, but I'd like to be able to change the duty VERY quickly. My frequency would be ~20kHz, and my duty cycle changing frequency would be anywhere from 0 to 10kHz. How would I do this? Completely Re-write the driver?

I'm using this to generate a sinusoidally varying current through an H-bridge.·This is for a home-made motor controller for a PM sync motor.

Comments

  • T ChapT Chap Posts: 4,223
    edited 2009-05-10 06:02
    Not sure what you are really asking but I use pwmasm driven by a PID loop that calculates the error and resulting PWM val, and sends updateduty every iteration to the pwmasm object.
Sign In or Register to comment.