Josh, On Mon, 5 Dec 2005 17:18:01 -0500, Josh Koffman wrote: >... > In any case, I have to make some choices. Chief among them seems to be > whether I want Binary or Grey Code output. It seems like there is more > example code to get me with Binary stuff. I worked with a team on a > product that had one of these cheaper style encoders in it, outputting > Binary, and I remember there were a number of skips that sometimes > happened throwing off the result. Sometimes you'd be turning one way a > single detent at a time and the output would just jump the other way. > Very annoying. Would going with a Grey Code encoder and decoding > routine eliminate this? What happens with no detents, is it possible > to stop in between two positions? I'm not sure what you mean by "binary" - the main difference between encoders is that they are either incremental and positional - the former says "I moved one step (anti-) clockwise", the latter "I am in position 4". Grey coding is used for positional coding, quadrature encoding for incremental (two signals whose transitions indicate the and occurrance and direction of a step). If you need positional encoding you *can't* use binary coding because of the glitches associated with the transitions. Detents don't affect it, except to keep the shaft in particular places - moving from one detent to the next will still give transitional errors if you don't use Grey coding. By using Grey coding you always know that the shaft is in a given position, and since only 1 bit changes at a time the transitions are "clean". If you use incremental encoders, you need to know where you started, and keep count from there. What exactly are you using the encoders for? Cheers, Howard Winter St.Albans, England -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist