I have been studying the quadrature encoder code, and it looks like to get full resolution, you actually need to hook interrupts to both the A and B inputs. Can anyone verify this?
I need to read two quadrature encoders (high tic counts) and the code I've seen "out there" hooks the two Uno interrupts to pin A of each encoder (since there are only two user interrupts). This means you only get half the resolution.
So it's pretty much necessary to XOR the A and B of each interrupt and use that to trigger the Arduino interrupt pin?
Yup looks like the PinChangeInt library is the way to go.
I definitely need the full resolution because my existing encoders are only 1000 PPR, and it's cheaper to go with software than buy better encoders. :~
Ok so I got the latest version of the PinChangeInt library, there were a couple places I had to change stuff to get it to compile (am using Arduino 1.0).
Ok now for the problem. I have Encoder1 on Pins 0 and 1, and Encoder2 on Pins 2 and 3 (on an Uno R3).
now my problem is that Encoder1 is running away (i.e. it is receiving tons of interrupts, whether real or not I don't know). I've enabled pullup/pulldown on the 4 pins as well (was getting spurious counts from both encoders without that).
Is there something special about Pins 0 and 1 that I have to avoid them? I'd hate having to rewire my proto shield...