Cypress Perform

Home > Design Support > Cypress Developer CommunityTM > Cypress Forums > PSoC® 5 > Need help on a 3Hz PWM

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



Need help on a 3Hz PWM

Summary: 7189 Views, 2 Replies, Latest reply by douglaslps on 20 Sep 2010 07:01 AM PST

Verified Answers: 0

Post Reply


douglaslps posted on 16 Sep 2010 11:06 AM PST
Member
2 Forum Posts

Hi guys,

this is my first post in this forum.

I have some C language experience and I'm facing some problems to configure a CY8C29666 chip to generate a 3Hz PWM pulse. The minimum frequency I was able to generate was 360Hz.

Can anyone walk me through that?

Thanks,

Douglas



 

Terrence posted on 17 Sep 2010 11:15 AM PST
Top Contributor
43 Forum Posts

Hi Douglas,

The CY8c29666 device is a PSoC 1 device, so your post belongs in the PSoC 1 forum.

On to your problem...

Assuming a sysclock of 24Mhz, and a wanted PWM of 3Hz, would require a divisor of 24Mhz/3Hz = 8Mhz.

VC1 and VC2 can divide by 16 each, and VC3 by 256. So, 16x16x256 = 65536. (Hold that thought)

8Mhz/65536 = 122.0703125

So, using an 8bit PWM, with a period of 122 will give you the requested 3Hz output.

In Summary:

VC1 /16

VC2/16

VC3 source = VC2

VC3/256

----------------

PWM:

Clock = VC3

Period = 122

---------------

Hope this helps.


douglaslps posted on 20 Sep 2010 07:01 AM PST
Member
2 Forum Posts

Hi Terrence,

"The CY8c29666 device is a PSoC 1 device, so your post belongs in the PSoC 1 forum."

Thanks for the heads up.

Also thanks for your help on 3Hz PWM. Another solution would be to use internal 32kHz as clock and use period as clock (32k) divided by 3, which results a period equals to 10666.

Thanks for your help.

Regards,

Douglas




 

Post Reply






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: 06/15/20