rotary encoder

dc42:
Sure, you can use 2 interrupts to manage a rotary encoder, but it is a bit of a waste of interrupts. I poll rotary encoders every 1 to 2 milliseconds instead, which also allows me to multiplex them (I've just completed a design that uses 3 rotary encoders multiplexed on to 2 input pins). You can find the code I use at Five things I never use in Arduino projects | David Crocker's Solutions blog.

I have a circuit that uses a couple of flip-flops and a counter that keeps the rotary encoder count without any processor involvement and you can get back to it once a second or once a minute, whatever works for you, but it takes a bunch of extra chips. My first project I am going to do with a CPLD when I get that figured out is to put this circuit into my CPLD and hopefully give it multiple channels.