> I refuse to give up so easily :-) > > Admittedly, the term "Gray code" has come to be applied fairly widely to all > "single distance codes". Whether or not this is correct or incorrect > is not really the question. The question that will arise in the > future is what happens when I buy a rotary encoder which claims to be > Gray code, what I get may or may not be The particular Gray code I am > expecting. ....the result is that for all practical purposes the term > Gray code ceases to have any value for determining how the system > software handles the encoder input. As does the phrase .."here is a neat > algorithm for converting Gray codes to binary"....to which we will all > answer, "and what particular single distance code might that be?" I think the problem is that 90% of the things that use _ANY_ gray code happen to use the gray code I call the "recursive reversal" one [since the N-bit graycode sequence contains two copies of the N-1-bit graycode, one of which is reversed]; because so many things use this particular gray code, people often just shorten the name to "gray code". This problem is hardly unique to microcontrollers, and can frequently occur when people from different disciplines are exchanging information. For example, someone not familiar with dietary measures might assume that a Life Savers(r) candy with 10 calories would have approximately enough energy to heat one gram of water ten degrees C; in fact, the candy has 1,000 times that much energy because the real dietary unit is the "kilocalorie" except that people shorten it to "calorie".