Forum Discussion
Altera_Forum
Honored Contributor
15 years agoThe up1 and dw1 signals are used to store the previous values of the up and down input signals. Using the current and previous values, you can detect a status change, in order to count up and down only once when the button is pressed. If you just act on the current value of 'up' and 'down', then you will count on each clock cycle during which the button is pressed.