Home/Support/Support Forum/setcounter() function problem
Welcome to Digi Forum, where you can ask questions and receive answers from other members of the community.

setcounter() function problem

0 votes

i am facing a problem with the setcounter and getcounter functions,
i have setup the counter to count up at rising edges;
whenever a rising edge is detected i am getting sometimes 2 and sometimes 3 increments instead of 1 which is a bit weird.

appreciate any help.
asked Jun 26, 2019 in Rabbit Software by Patchemaly New to the Community (0 points)

Please log in or register to answer this question.

1 Answer

0 votes
What is connected to the input pin?

Is it a button that could be generating multiple edges when you press it, due to debounce?

If you put a logic probe or scope on the input pin, what do you see/capture when you're reading 2 or 3 increments? There might actually be 2 or 3 edges in there if you don't have any hardware to debounce the button.
answered Jun 28, 2019 by TomCollins Veteran of the Digi Community (1,681 points)