Hi Trix, in order to decode a quadrature encoder, you can put the A channel on the interrupt line, when you you get an interrupt on asy the negative edge you can read the B input to see what the direction of the encoder was. Schematically: St 012345 A 011001 B 110011 When you go from state 2 to 3, A causes the interrupt, and B is 0, that's one direction. When on the other end you go the other way, say from state 1 to 0, A causes the interrupt, and B is 1.
Cheers, Rik Assen. rik AT embeddedsystemconsult DOT nl (change AT to @ and DOT to .)