On Sun, Sep 6, 2009 at 3:39 AM, Marcel Birthelmer wrote: > I've worked with an encoder that had 4 counts per detent. Basically I > loaded a register with b'00011000 and on each pulse, i left- or > right-shifted appropriately. If LSB or MSB are set, treat it as a > count in either direction and reset the register to b'00011000. Thanks for all the advice everyone. The above method is the one I've started using for now. I'll probably beef it up a bit eventually to account for missed counts (encoder moving too fast) and glitches. I've also added a routine in my heartbeat (a periodic interrupt) that resets the registers to b'00011000' just in case a count is lost for some reason. It isn't super necessary but so far it seems to be working nicely. Thanks! Josh -- A common mistake that people make when trying to design something completely foolproof is to underestimate the ingenuity of complete fools. -Douglas Adams -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist