Electrical Engineering Stack Exchange is a question and answer site for electronics and electrical engineering professionals, students, and enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Generally and briefly, are there any direct application of gray code in electronics? If so, what are they?

share|improve this question
    
Gray codes can be used for logic minimization (karnaugh map) – efox29 Jan 9 '15 at 20:52
    
It can be used for coding states in state machines. – Lord_Volt Jan 9 '15 at 20:53

It is also used in digital modulation schemes like, for instance, in this 8-PSK modulation here: enter image description here

Because of the noise, sometimes the receiver might incorrectly detect an adjacent symbol instead of the correct one. If gray encoding is used, the adjacent symbol will only be 1 bit apart. The received binary stream will therefore be closer to the correct one, and might be eventually corrected if an error correction mecanism is in place.

More about constellations here: http://en.wikipedia.org/wiki/Constellation_diagram

share|improve this answer

Absolute optical encoders are an obvious and common example. Since only one bit changes at a time minor misalignment between bits in the pickup does not matter.

share|improve this answer
    
+1 for pointing out the big advantage of a grey code for encoders... – copper.hat Jan 10 '15 at 4:33

Grey code is used in rotary encoders.

enter image description here enter image description here

share|improve this answer

We used grey code for a non-ferrous optical encoder to track joint position in MRI kinematic studies. Due to the high level of RF noise from the MRI transceiver, and the high magnetic field, errors might occur sending an incorrect position of (knee, elbow, etc) joing in the positioning system.

share|improve this answer

In the 1980's one of the defense industries proposed developing a guided hypervelocity missile (Mach 5) for air-to-ground attacks. The missile was to be guided by a rear-facing optical sensor which would be illuminated by a pulsed laser in the launcher. The output of the laser would produce a modulated pattern in the far field which was specified to be gray-scale encoded. That is, it would provide a "checkerboard" pattern with each successive pulse producing a different pattern, and the result of a series of pulses would be a gray code representation of the location of the particular spot with respect to the aiming axis of the launcher. This would allow the missile to know where it was with respect to the desired line of flight without the need for the launcher to track it and issue guidance commands, as the missile itself would figure out its error and correct its flight path.

I suppose that's only barely real-world, since the system was never funded, but I know they did preliminary work on it and were fairly certain it would work.

share|improve this answer

A gray code can be used to minimize transition power, when a counter value goes on a bus with a large enough capacitance to warrant the overhead of encoding (if any).

A gray code is also often used in read&write pointers in asynchronous dual-port FIFOs to prevent wrong transitions being detected by the two asynchronous clock domains.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.