- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I have used the Quadrature Decoder (TCPWM) in PSOC 4 with no problems, but I seem to be running into trouble with PSOC 3. It is a different component, and seemingly simpler, but I cannot get it to count at all one way or the other. Can someone please look over the attached project and point out any software errors you see? I want to try to eliminate software before looking into less obvious hardware issues. I have already tested that the pins are correct, the encoder is outputting constantly, etc.
Thank you,
Tom
Solved! Go to Solution.
- Labels:
-
PSoC 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, as I thought. in the PSoC4 project the inputs are pulluped and in the other project they aren't.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
It looks alright. I suggest you connect known clocks to PHA and PHB to check QuadDec component working. Also, I see that isr is not being used. Is it required in your design ?
- 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
Hi,
Thank you for the support. I tried the test program, and the PWM worked correctly. I changed it and hooked the encoder back up and it still did not work. I swapped phases, and tried it on the analog pins as well to no effect. I know the encoder is outputting correctly (it works on a TCPWM Quad Dec on PSOC 4). Any other ideas? Does anyone have an example of a Quadrature Decoder component working on a PSOC 3 or 5?
Thank you,
Tom
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Are your signals coming from a mechanical or a digital signal source. What are the connections look like? do you need pullups or something similar? What is your encoder (Link to datasheet)?
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
They are coming from a 400ppr optical rotary encoder. No datasheet - see here:
Like I said, it works fine with the Quadrature Decoder TCPWM component for PSOC 4.
Thank you,
Tom
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Can you post the PSoC4 project?
As an additional try: Switch on the glitch filtering.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Just checked the link to the encoder. The outputs are Open Collector, so you should define your pins as pull-ups
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
Yes, as I thought. in the PSoC4 project the inputs are pulluped and in the other project they aren't.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Bingo. Wow, all that for a foolish mistake. Thank you so much for your support! I thought I was carefull comparing the two, but apparently not.
Regards,
Tom
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You are always welcome!
Bob