Forum Discussion
Altera_Forum
Honored Contributor
13 years agoRather than using
if rising_edge(sig) I'd follow Tricky's advice and make everything synchronous to clk. Then, sample sig at regular intervals, store in a register and wait for a low to high transition in order to increment counter. This would also allow you some filtering to avoid fake counts, which is a common problem with single phase encoders, especially if the rotating wheel is supposed to start and stop.