Breaking News
Design How-To

Gray Code Fundamentals – Part 4

6/29/2011 05:26 PM EDT
7 comments
NO RATINGS
More Related Links
View Comments: Newest First | Oldest First | Threaded View
Hillbilly Jimmy
User Rank
Rookie
re: Gray Code Fundamentals – Part 4
Hillbilly Jimmy   7/6/2011 5:53:53 PM
NO RATINGS
oh. ok. I read srini's paper and clicked on the "this is how it works" link on xess' page. Nice algorithm. There is an algorithm than can handle even or odd (only the odd is not circular). sorry for ridin' the comment fence...

devbisme
User Rank
Rookie
re: Gray Code Fundamentals – Part 4
devbisme   7/6/2011 5:43:27 PM
NO RATINGS
Good to hear from you again, Hillbilly Jimmy. We both commented on this back in 2009 and referred to the original work in 2007. During that exchange, Srini had the same problem you did because he didn't check the packed flag.

Hillbilly Jimmy
User Rank
Rookie
re: Gray Code Fundamentals – Part 4
Hillbilly Jimmy   7/6/2011 5:34:43 PM
NO RATINGS
correction - dangit! I did not check "packed". Doing this ensures 0-n-1. I have no idea how he did it. (Not the way I do it!) very cool. nice work. (you should have "packed" checked as the default, methinks...) btw, 2007 folks!

devbisme
User Rank
Rookie
re: Gray Code Fundamentals – Part 4
devbisme   7/6/2011 5:25:54 PM
NO RATINGS
Jimmy, did you check the "Packed" option? That makes it generate a packed gray code using only 0..n-1. Otherwise, you get the standard gray code you saw.

Hillbilly Jimmy
User Rank
Rookie
re: Gray Code Fundamentals – Part 4
Hillbilly Jimmy   7/6/2011 5:21:34 PM
NO RATINGS
Thanks for leaving th xess.com site address. I had lost it. Very cool site. I checked the generated codes for (6) and it turns out to be (8) minus the middle two Gray codes. So you see a value of 111 for (6) codes. While it is cool to see the site after all these years, it does not handle the "use only binary from 0 to n-1" requirement. So it's *still* an exercise for the reader! (wink wink)

bsnguy
User Rank
Rookie
re: Gray Code Fundamentals – Part 4
bsnguy   7/1/2011 3:10:30 PM
NO RATINGS
This is true but the link for the gray code generator is missing ".php?. This is the complete one: http://www.xess.com/misc/graycode.php

devbisme
User Rank
Rookie
re: Gray Code Fundamentals – Part 4
devbisme   6/29/2011 11:09:16 PM
NO RATINGS
The algorithm for generation of non-2^n Gray code sequences was talked about here back in 2009: http://www.eetimes.com/design/programmable-logic/4015234/A-systematic-method-to-generate-Gray-code-sequences/ You can go to this page to generate such a sequence and get a VHDL implementation: http://www.xess.com/misc/graycode.

Flash Poll
Radio
LATEST ARCHIVED BROADCAST
EE Times editor Junko Yoshida grills two executives --Rick Walker, senior product marketing manager for IoT and home automation for CSR, and Jim Reich, CTO and co-founder at Palatehome.
Like Us on Facebook

Datasheets.com Parts Search

185 million searchable parts
(please enter a part number or hit search to begin)
EE Times on Twitter
EE Times Twitter Feed
Top Comments of the Week