Announcements
IMPORTANT: Cypress Developer Community is transitioning on October 20th. To learn more and be prepared for this change, check out our latest announcement.
cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC 5, 3 & 1 MCU

cadi_1014291
Valued Contributor

Hi all,

   

I have a simple project were i count the number of PWM pulses with a Counter, when the period counter counts down to 0 it trigger an interrupt where i turn off the PWM and the Counter instances, here i start a Timer, after 'x' time the Timer interrupt is triggered, here i stop the timer and start both PWM and Counter instances again, and the process is repeated.

   

So i would like to know if i can make this project the 'PSoC way', i mean using just hardware connections, i haven't try nothing yet, nothing comes to my mind when i think how to solve it 😕 , so i come here asking for suggestions, for both Software (maybe my aproach can get better) and Hardware (if there is one), i'm not looking for you solve my problem, just a storm of ideas 😄

   

 

   

Thanks in advance, find the project attached.

   

Carlos

0 Likes
1 Reply
HeLi_263931
Honored Contributor II

Without looking at the code: this looks like statemachine. For that, use a lookup-table. PWM, counter and timer have start/stop signals that can react to signal flanks (and if not, you can create a pulse from a signal easily).

0 Likes