- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm at my wit's end. I'm trying to debug some equipment and want to simulate the problem with a PSoC5 dev board. I want to be able to send Quadrature Encoder signals. More specifically, I only want so many edges. So, I put 20 into a counter, and I get 20 edges, and then it stops. Seems simple. I've tried using the counter as a Fixed-Function down counter, UDB counter, etc, etc.. The problem is I never get the TC pulse. Unfortunately, every single example I've seen either runs in Continuous mode or uses Interrupts.
The clock, the QUADGEN_CLK is always running and never turned off, so SYNC RESET, or ASYNC RESET, shouldn't matter.
This should be a simple -- count down and set a flag.
I added a SR Flip-flop to hold the TC high, should it ever happen (which does not seem to be the case).
Solved! Go to Solution.
- Labels:
-
PSoC 5LP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello KeDa_1385231 ,
For a UDB counter in Down Counter or Up Counter clock mode the edge detect logic detects the rising edge of the count input synchronous to the clock input. Depending on whether the Counter is configured as an up counter or down counter, the edge detect event on the count input increments or decrements the Counter, respectively
The terminal count condition is met in case of down counter when counter value is equal to zero.
Thus you need should not provide logic high to the count input of the counter
Use the following method to provide input to the count terminal:
I am attaching a project with one shot counter implementation as mentioned by you, please try it on the development board.
You will notice LED blink when the terminal count is reached.
Regards
Ekta