Showing results for 
Search instead for 
Did you mean: 

PSoC™ 5, 3 & 1

Not applicable

Hello all -


I am a newbie, using a PSoC 1, and I need to generate a PWM output that is a sine wave (after filtering). The sine wave values will be from a lookup table (similar to the example program using a sine wave lookup to drive a DAC).


My question has to do with updating the PWM with each new lookup value. I cannot stop the PWM, or delay it, while loading the next sine wave value. If that happens, then the frequency of the sine wave output will be off.


So what I need to do is to load the next PWM pulse width value (the period is always 255) without adding any extra delay to the PWM output.


I have also been wondering if something like a counter or a one-shot would also work for this, and if one of those may make the solution easier?


Thanks in advance for your help!



1 Reply
Not applicable

you can use PWM_WriteCompareValue to change PWM value. It's all right.