Hi everybody! Thanks for the good advises to solve my problem with the quadrature decoding. I'll try some of the routines I got from Walter Banks and Alvaro and see how they work... The solution that I had some thoughts about before I sent this message to the list was that this problem could be solved by having one of the channels(A) connected to the Capture input and the other one to an "ordinary" input. The Capture module is initialized to interrupt on rising edge. When I get an0interrupt I put the processor in "state 1" if the B-channel is 1 or in "state 0" if the B-channel is 0 and when changes the CCP module to interrupt on falling edge. When I get the next interrupt I read the B channel and detects the direction.20If the previous state was 0 I should now get a 1 on the B-channel or if the previous state was 0 I should now get a 0. If I get two 0 states (or two 1 states) I ignore0it (this could accure if I get noise on the A channel or if the direction has changed on the encoder. Does anyone have an argument why this should'nt work or should I put some effort to try this solution too. Patric AnvegŒrd