" I am tracking the encoder position by interrupting on both rising and falling edges of the XOR of A and B. In my interrupt routine, I compare the current A and B to the previous A and B to determine which has experienced a change and whether it is rising or falling. Based on this as well as whether the other (unchanged) channel is high or low, I either increment or decrement the count. I also take the gear ratio into account and compute the correct motor shaft position." The only thing I see you did not mention is you shifting the data over before you xor. This is the top end of my interrupt routine ENCODER_INT_HANDLER CLRWDT ; HIT THE DOG MOVF PORTB, W ; GET THE NEW ENCODER DATA MOVWF NEW_ENCDR ; SAVE IT RRNCF OLD_ENCDR ; ROTATE OLD DATA INTO POSITION XORWF OLD_ENCDR, F ; XOR TO GET DIRECTION BTFSC OLD_ENCDR,4 ; WHICH DIRECTION DID IT GO IN? BRA CLOCKWISE ; CLOCKWISE COUNTERCLOCKWISE ; COUNTER CLOCKWISE Have you looked at the signal on a scope? Tim -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads -- http://www.piclist.com hint: The list server can filter out subtopics (like ads or off topics) for you. See http://www.piclist.com/#topics