Sensational!
Why have I focussed so much upon standard Timer component? Well it is a extremely useful component and is a great introduction for the PSoC 4 native TCPWM (Timer Counter PWM) mechanism.
Above are screenshots of the signal captures of an AMS TCS3200 colour sensor with various light sources.
The sensor is a 4 channel light intensity to frequency converter. The channels are Red, Blue, Intensity, Green.
The more intense the light, the higher the output frequency thus the shorter its pulse duration.
I have used the PSoC 4 to select the desired channel and record the pulse length.
I configured it to measure a half-period. To convert it back to a frequency the measured value needs to be doubled and then reciprocated.
For this demonstration I used the handy capture counter feature to skip the first two pulses and measure the third.
Doing this enables initial poorly formed pulses to be ignored.
I used the design for the Old timer article but added 3 Output pins for the colour sensor's 2 address inputs and output enable input.
If you look closely at the screen shots you will notice that my measurement of the green LED has a small red component.
Similarly for the (pale) blue LED where there is a tinge of green.
No such observation from the RED LED.



