- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Labels:
-
PSoC 5LP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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).