- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I'm making a color sensor (TCS3200), and i have a issue trying to make a function that works the same way as pulsin() from arduino.
In a code i take my output value like this on arduino: PulsIn() function definition from arduino
// Reading the output frequency
greenFrequency = pulseIn(sensorOut, LOW);
and i have to do somthing like that on PSoC creator.
Right now i only get 0 and 1 as output (the value of what i set my pins to).
in the attached code you can see what im trying to do.
Thanks
Solved! Go to Solution.
- Labels:
-
PSoC 5 Device Programming
-
PSoC 5LP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
The PulsIn() seems to be a frequency counter.
The following document seems to be very helpful.
http://www.cypress.com/file/144696/download
I also tried this with PSoC 5LP board, as I don't have the sensor
I fed the pulse from my funcgen program with another MCU
via Pin P6[6] as SensorOut.
It is measuring frequency (Hz), so probably you need to adjust counter parameters.
Attached is my test project based on your project.
I hope this can be a little help.
moto