Cypress Perform

Home > Design Support > Cypress Developer CommunityTM > Cypress Forums > PSoC® 1 > Sine wave lookup to PWM8 output with no latency?

Bookmark and Share
Cypress Developer CommunityTM
Forums | Videos | Blogs | Training | Rewards Program | Community Components



Sine wave lookup to PWM8 output with no latency?
Moderator:
ARVI

Post Reply
Follow this topic



Sine wave lookup to PWM8 output with no latency?

dmeeks posted on 13 Nov 2010 6:29 PM PST
Member
2 Forum Posts

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!

Dan




Re: Sine wave lookup to PWM8 output with no latency?

nguyennghianh posted on 15 Mar 2011 03:42 AM PST

1 Forum Post

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






ALL CONTENT AND MATERIALS ON THIS SITE ARE PROVIDED "AS IS". CYPRESS SEMICONDUCTOR AND ITS RESPECTIVE SUPPLIERS MAKE NO REPRESENTATIONS ABOUT THE SUITABILITY OF THESE MATERIALS FOR ANY PURPOSE AND DISCLAIM ALL WARRANTIES AND CONDITIONS WITH REGARD TO THESE MATERIALS, INCLUDING BUT NOT LIMITED TO, ALL IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT OF ANY THIRD PARTY INTELLECTUAL PROPERTY RIGHT. NO LICENSE, EITHER EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, IS GRANTED BY CYPRESS SEMICONDUCTOR. USE OF THE INFORMATION ON THIS SITE MAY REQUIRE A LICENSE FROM A THIRD PARTY, OR A LICENSE FROM CYPRESS SEMICONDUCTOR.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms and Conditions of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms and Conditions of this site. Cypress Semiconductor and its suppliers reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.

Spec No: None; Sunset Owner: KXP; Secondary Owner: VWA; Sunset Date: 01/01/20