- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hey All
How is everyone doing? Hope all of you are enjoying the start of the year 2016 and getting more and more fascinated with PSoC like me.
Today I have taken a task to Generate a 38kHz square wave with PSoC4 using a SysTick Timer. I have even designed a project related to that. My design, theoretically, will give square wave of around 38.4 kHz due to clock resolution limitation of PSoC4 that is 24 MHz. I was checking the wave on CRO. (please find attached the CRO result image.) As it gave me some triangular wave, I decreased the frequency to 100 Hz and checked again with CRO. This time I got the perfect square wave.
I kindly request you to please find attached my project designed for 38.4 kHz and give me a solution to get a perfect square wave. In addition, if anyone of you can give me a solution to get a perfect 38 kHz square wave than the current design of 38.4 kHz, I will be very much thankful.
Thanks and Regards
Shaunak
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Shaunak: P1.7 is a voltage reference pin for the chip and has a 1.0uf cap on it that is why you where getting a triangular wave form. You need to move it to another pin. If you are looking for the led pin it is on P1.6. Also your clocks where not setup correctly in the clocks .crdwr the WDT2 was not enabled. Also the components where out of date. Please update to Psoc Creator 3.3.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Shaunak,
There is one approach producing high-resolution PWM using dithering technique:
http://www.cypress.com/blog/psoc-hacker-blog/high-resolution-high-frequency-pwm-psoc4-ble
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@bobgoar: I just checked my Cypress Update Manager, but there isn't any new update available for Creator. And I am not able to understand the project shared by you as I can see there is a user defined component "PWM_3CMP_v1_00" in that, the source of which is not available so the project building generates an error. Please find attached the snapshot of my Creator.
@odissey1: The link is good, but my current problem is that I can not use a Creator component for PWM due to memory constraints.
Thank you very much guys for responding.
Regards
Shaunak
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Shaunak: I found that your output pin was set for digital input and output I set it for output only. Can I ask you what is not working with this program? The program compiled fine with no errors.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content