At 01:39 PM 7/22/01 -0400, you wrote: >(BTW, there was a suggestion on the [EE] thread to ignore the 1->0 >transition on the A channel. Be aware that doing so will reduce your >resolution by half. Since you are ignoring B channel transitions and using >it as only a direction bit, you have already reduced your available >resolution by half. Depending on your application, this may or may not be a >problem.) I don't think there is much percentage in double-counting between detents! What I usually do is set up a state machine which ignores repeated transitions on either input. You have to sample relatively fast, because the motion is not smooth, it "jumps" between detents, and if you look at the specs for the phase difference on a typical encoder it is not guaranteed to be very large... Best regards, =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Spehro Pefhany --"it's the network..." "The Journey is the reward" speff@interlog.com Info for manufacturers: http://www.trexon.com Embedded software/hardware/analog Info for designers: http://www.speff.com Contributions invited->The AVR-gcc FAQ is at: http://www.bluecollarlinux.com =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -- 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