PSOC3 counter difficulty

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

Hello,

   

I use a "Up and Down" counter ( 32 bits ) configured as follows :

   

-period : 4294967295 (2^32  - 1)

   

-clock mode : count input and direction

   

-run mode : continuous

   

-reload counter on "reset" and on "tc"

   

Besides my input pin is configured in "resistive pull down" as drive mode, my goal is to count rising edge of a rotary encoder (in order to know the position of a robot), however my problem is when I turn my encoder the counter increment too fast whereas I turn a little bit the encoder. What's the problem ?

   

Thanks.

   

PS : I'm French what explain the quality of my English, I joined the project with the post, the name of the counter is "Counter_debug" in the PSOC Creator project!

0 Likes
3 Replies
Anonymous
Not applicable

A rotary encoder will likely have glitches on the output as it is being turned which could be seen as a rising edge. Are you doing glitch detection / filtering?

0 Likes
Anonymous
Not applicable

No, I didn't. But I generated a PWM signal with a period of 1 second (with the PSOC itself) and I connected this signal at the input of the counter.And it increment too fast in this case too ( about 1 000 000 steps on a rising edge of the signal).

0 Likes
Anonymous
Not applicable

CHRISTOPHE,

   

 

   

Which version of the Counter component are you using?

   

Is it version 1.2 or version 1.5?

   

 

   

Regards,

   

dasg

0 Likes