![]() |
||
![]() |
||
"Gray code"
New Here? Please read this important info!!!
Email this topic to a friend Printer-friendly version of this topic |
Locked thread - Read only
Previous Topic | Next Topic | ||
Home
Conferences
Questions/Answers--Early 2001 (Public)
| |||
|---|---|---|---|
| Original message | |||
goody ![]()
- (52 posts) ![]() |
Jun-25-01, 04:35 PM (EST) |
| "Gray code" | |
What is gray code. I do not need to use it (I dont think) but I have heard the term mentioned in conection with PLC's and I did not have a clue what was being discussed. Its only for my own information to fill a few more bytes of brain space. | |
| Top | |
| Table of contents |
RE: Gray code,
Steve Bailey, Jun-25-01, (1)
RE: Gray code,
gbradley, Jun-25-01, (2)
RE: Gray code,
Jim Dungar, Jun-25-01, (3)
RE: Gray code,
Bernie Carlton, Jun-26-01, (4)
RE: Gray code,
Jeff C, Jun-26-01, (5) |
| Lobby | Topics | Previous Topic | Next Topic |
| Messages in this topic |
Steve Bailey
- (749 posts) ![]() |
Jun-25-01, 05:15 PM (EST) |
| 1. "RE: Gray code" | |
I don't remember (if I ever knew) all the details, but its a method of coding numbers such that only one bit changes as you move from one number to the next. I think there has been some discussion of it on this forum. Try checking through the archives. | |
| Top | |
gbradley ![]()
- (132 posts) ![]() |
Jun-25-01, 05:27 PM (EST) |
| 2. "RE: Gray code" | |
Exactly as Steve says only one bit changes at a time. | |
| Top | |
Jim Dungar
- (158 posts) ![]() |
Jun-25-01, 05:37 PM (EST) |
| 3. "RE: Gray code" | |
Grey (Gray) code is a specific Binary Coded Decimal (BCD), in which only one bit changes at a time. This operation allows for a very smooth transition between numbers so it is used often in absolute encoders in postioning applications. | |
| Top | |
Bernie Carlton
- (36 posts) ![]() |
Jun-26-01, 10:16 AM (EST) |
| 4. "RE: Gray code" | |
The gray code is most helpful when information is transmitted in parallel. As noted, this is usually with absolute encoders, though I have seen some with a serial output. Given the uncertainties of capacitance, inductance, resistance and individual receiver sensitivity, when a parallel transmitted word is received, it may be that not all changing lines will change at the same time thus making, for a brief interval, an incorrect number. With normal coding this may yield a wildly wrong number for that small time period. Since, with gray code, only one bit changes when going from one number to the next, the biggest error would be that the number hadn't changed yet. Another item is an easy error detection. If your receiving system is fast enough to catch every number, then seeing two bits change at the same time indicates a failure. Because of the nature of gray code, it is most often used to transmit a number which is a power of two. If some other number, like 360 for example, is tranmitted, it is sent as the center numbers of the next higher power of two (512). The end two numbers (0 and 359) will be one bit transition apart. When receiving this type you must remember to subtract out the necessary offset (76 in this case). | |
| Top | |
Jeff C
- (2 posts) ![]() |
Jun-26-01, 08:49 PM (EST) |
| 5. "RE: Gray code" | |
Every one has hit the nail on the head, but maybe this comparision of Decimal, straight Binary and Gray Code will help. | |
| Top | |
|
Unlock | Archive | Remove |
Lobby | Topics | Previous Topic | Next Topic |
| Rate this topic (1=skip it, 10=must read)? [ 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 ] | |
| Your Personal PLC Tutor Site Learn Now!!. |