- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am using the "Frequency Measurement" example for the PSoC3 and would like to modify the overall output to be the number of pulse counts (when voltage crosses a threshold) over a specific period of time (e.g. 1 sec). Finally I would like to progress to outputting the total time of these pulses (integrate time when pulse is high) for a defined period of time (e.g. 1 sec). I have attached the file I am working from currently. The value displayed on the LCD readout of "pulse count/sec" is not providing an accurate reading - based on wave generator/Oscope results.
Solved! Go to Solution.
- Labels:
-
PSoC 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I don't have the lightest clue. Does the LED - output show any signal?
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
When uploading a Creator-project here you should:
1st. Build->Clean Project (That minimizes the number of files)
2nd. File->Create workspace bundle(minimal,zip)
3rd. Upload here.
I cannot open your project and the supplied PDF is a cypress-datasheet.
When a counter doesn't count there are some reasons I can think of:
Poor signal quality. Can be improved with some conditioning within the PSoC device
Frequency out of limit
Sync with wrong frequency
wrong gating / enabling of counter
Intervention / disturbing the counter due to read-out from program
As you can see from this, we need a bit more information to help you.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
As I said before, the first zip didn't contain what you (and me) expected, have a look by yourself.
The second ZIP was O.K!
I took the freedom to change (and comment) a lot. take care not to overwrite your original project after downloading. Had no time and equipment to test, that is up to you. When you really want to use interrupts (I took them out) contact me for some hints.
Happy coding
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for taking a look. I built and programmed the files you sent and cannot figure out why the comparator output is not triggering when sine wave voltage is above Vdda/2 (it works correctly in the file I originally sent). Please advise, thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I don't have the lightest clue. Does the LED - output show any signal?
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Nope. I have it monitored on an Oscope and it is a flatline. When re-programed with original code - it works OK.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re-build that part of the schematic until that works again, then connect it to the rest of the circuit. There was a small piece of an analog wire which removed. I didn't change the comparator at all.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Here is a list of the items which I am trying to execute.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What was your end code. I am interigating a RH sensor with a frequency over time. The RH is basicaly a variable capacator.
I was looking at using a comparator. Then use a counter. I saw a zip file on your post. I just copied it and I will take a look at your code tonight. Any help?
Thanks
Philip Nielsen