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

Generated arbitrary wave with PWM controller

Is there a way to generate a square wave like the one in the picture without using any kind of interruption to change settings middle-wave?



For example, the wave can be 50ms on, 25 ms off, 50ms on, 25ms off, 150ms on, and then the sequence is over

I'm reading the doc on the PWM controller, but I'm not sure how to do something like that. How can I set the different periods (the 50, 25, and 150 ms)?

The base requirement here is that I can just start the sequence and then just handle an event when it finishes, but I can't use the CPU to handle the level changes

Thank you so much!

Related