Hi Sott Clifford,
Can you tell us which device do you use?
At the same time, you need to offer us which signal you want to test.
Principially the problem can be broken down to measuring the time which can be easily done with PSoC4 downto a precision of 100µs.
There are timer components for that job, you just need to configure them accordingly.
Either measure the times between edges of the waveform, or measure "counts" based on if the waveform is "on" or "off" to get the duty cycle. As user_1377889 mentioned, it is quite simple using the timers to accomplish it. There are multiple ways to do so as well.
I am using currently using a CY8CKIT-043
I was hoping there was a way to use PSoC Creator components to do it. Is this possible?
I am new to using timers ... i will read up on them so i can ask at least some intelligent questions on what you have suggest.
There is no off-the-shelf component to calculate the duty cycle but implementation with TCPWM timers is not complicated.
Start calculating high-time. When that runs, use another timer and calculate low time. To do both with a single timer is possible but tricky.
e.pratt was not trying to be evasive when he answered your question... he was just expressing the fundamental truth that one of the reasons that PSoC is beautiful is that it gives you many many many ways of solving problems... and a question like yours could literally be solved a dozen different ways.
The TCPWMs are able to do this.
You could use UDB implementations
You could write software and interrupts
It all depends on the accuracy and timescale of your duty cycle measurement that is required for your system.
You will need to use some CPU code to at least read the values from the timers, but you might be able to implement a hysteresis trigger from the waveform to trigger the timer to capture/reset to start counting the new duty-cycle. This would reduce your code to be only grabbing the timed positive voltage and compare with the maximum timed positive voltage for the % duty cycle.
As AlanH_86 (Alan) mentioned, without having more specifics on what requirements you have, there are quite a few methods that will work "well enough" to achieve your goal with varying degrees of simplicity, efficiency, and accuracy.
A good thread to read and check into is this one: http://origin-www.cypress.com/forum/psoc-5-device-programming/pulse-width-meassurement
Someone else had the same question/intent for a 250 Hz signal, but there are multiple ways to approach the issue as well.