This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

PWM Step Down

I am currently working on a project in which I will need to increment the pwm up to full cycle in 'x' number of steps and then be able to step down 'y' number of steps when an event triggers. Creating the function to allow stepping up is no issue and was figured out using demo 2 from the pwm_driver example in the SDK. I see there is a center aligned pwm duty cycle option but each direction needs to be able to have it's own independent step count. Is there a way to maintain the same duty cycle and then decrease 'y' steps or increase 'x' steps? 

Parents
  • Hi,

    I will need to increment the pwm up to full cycle in 'x' number of steps and then be able to step down 'y' number of steps when an event triggers

    Do you mean increase/decrease the pwm duty cycle? If I understood your question correctly you want to have different sequences for stepping up and down with different number of steps.

    If so, you can create a similar sequence for stepping down as the one used for stepping up, but adapt to the desire number of steps.

Reply
  • Hi,

    I will need to increment the pwm up to full cycle in 'x' number of steps and then be able to step down 'y' number of steps when an event triggers

    Do you mean increase/decrease the pwm duty cycle? If I understood your question correctly you want to have different sequences for stepping up and down with different number of steps.

    If so, you can create a similar sequence for stepping down as the one used for stepping up, but adapt to the desire number of steps.

Children
No Data
Related