Just Hardware viable?

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
lock attach
Attachments are accessible only for community members.
cadi_1014291
Level 6
Level 6
25 likes received 10 likes received 10 likes given

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
Level 8
Level 8
100 solutions authored 50 solutions authored 25 solutions authored

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