- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hello, I am working on a system that is working with a capacitive encoder I having trouble with the reading speed in pps.
the shaft speed is a little less than 10 rev per sec, if I setup the encoder counts to 100 ppr I would have a signal of nearly 1kHz of frequency
if the Counter UDB on the PSOC4 works at 12MHz then I should be able to increase the resolution to 1000 ppr, but when I do that the program doesnt even read the pulses, I switched the input threshold to LVTTL and with that I managed to have a good result at 100ppr, I cant seem to find out why is this happening, I need to increase the resolution.
The encoder datasheet says it is able to work at speeds of 7500rpm that means 125rps
the program triggers a relay when the counter exceeds the compare value, the switching is fast enough, but I need to increase the counter resolution
I appreciate your help
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I cannot see any quad decoder in your Topdesign, sorry.
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
You do not reload the counter, a Start() does not reload.
AVOID DELAYS IN INTERRUPT HANDLERS!
The period is set to 200 which is a period value of 199. The compare value might not get reached when reloaded at tc. So better hang the ist to terminal count (tc).
Are you trying to measure the speed? Then you might use a timer gating your counter with enable.
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
You can easily count signals with a PSoC up in the MHz. Can you scope your signal coming in in respect to the counter clock. Will show if there is some refreshing needed. Also: remove the synchronization from the input pin, that will delay counting.
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
What is the "input treshold"? You have a TTL signal afaik.
Bob