I have some quadrature encoders I'm working to interface with. The issue is that they have detents that are aligned with the "open" state on both lines (so you can idle them with zero current draw).
During a single "click", both channels will experience a full pulse, with one channel leading the other to indicate direction. I'm curious what is considered the best way to handle this. Do I need to use timer capture and figure out which pulse was first, or is there something simpler I can do with just standard interrupts? I did try it out with just interrupts, but when I put a breakpoint in the isr, both flags were always set, like it wasn't catching one hitting before the other.
Any ideas?
During a single "click", both channels will experience a full pulse, with one channel leading the other to indicate direction. I'm curious what is considered the best way to handle this. Do I need to use timer capture and figure out which pulse was first, or is there something simpler I can do with just standard interrupts? I did try it out with just interrupts, but when I put a breakpoint in the isr, both flags were always set, like it wasn't catching one hitting before the other.
Any ideas?