All, I have been working with a rotary encoder that I am planning to use as a control for a piece of test=20 equipment at work. I have looked on the web for algorithms to decode the outputs of said encoder,=20 and have found several. Most of them work as advertised in my application, but I have come up with a=20 version that works very well in my opinion. I don't know whether it is new or novel, but all I have done is watch for the "A" output to go high. When it does, I then read the port that the encoder is attached to. I mask of the bits I am interested=20 in, and use this as an index into a table. If the value is "01" I add "1" to my variable. If the value=20 is "10", I subtract "1" by adding 255. Any other combination "00" or "11" adds a zero for no change. I have tried this out spinning the knob on the encoder as fast as I can, and I can't see any missed=20 counts. I am using a delay of 2.5 mS in my routine for debouncing. =20 If anyone is interested, I can post the code. But my guess is I have just on my own rediscovered an old=20 method of decoding rotary encoders. =20 Regards, Jim --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .