Go Back   Home > Forums > >
Home Forums Rules Articles diyAudio Store Blogs Gallery Wiki Register Donations FAQ Calendar Search Today's Posts Mark Forums Read

Solid State Talk all about solid state amplification.

gray code to binary
gray code to binary
Please consider donating to help us continue to serve you.

Ads on/off / Custom Title / More PMs / More album space / Advanced printing & mass image saving
Thread Tools Search this Thread
Old 2nd October 2001, 05:50 PM   #1
Freddie is offline Freddie  Sweden
diyAudio Member
Join Date: Oct 2000
Location: Sweden
What is the easiest way to convert the gray-code output from a Bourns optical encoder to binary (parallell)?
I don't want to use a microcontroller. Perhaps there is a IC that converts from gray code to binary that I can use?

  Reply With Quote
Old 2nd October 2001, 09:30 PM   #2
Jason Hubbard is offline Jason Hubbard  United Kingdom
diyAudio Member
Jason Hubbard's Avatar
Join Date: Apr 2001
Location: Poole, England
Lightbulb Translating to Binary

Perhaps using a simple prom/eprom device would suffice - feed the gray code output of the optical encoder (buffered to correct voltage if not 5v) onto the address pins of the prom, take the translated binary value (upto 8 bits) from the data pins.
  Reply With Quote
Old 3rd October 2001, 10:12 AM   #3
AuroraB is offline AuroraB  Norway
diyAudio Member
AuroraB's Avatar
Join Date: May 2001
Location: Norway, -north of the moral circle..
Default Gray to Binary

The classical way to convert Gray to Binary is as follows:

Feed the Gray MSB directly through to be your Binary MSB.
Then make an XOR of the the Gray MSB and 2.MSB. Output will be your Binay 2.MSB.
Then XOR this output with your Gray 3rd. MSB.
Output is now your 3. MSB Binary.
Proceed with XORing each output with your next following unused Gray bit until your all done.
That's all there is to it.
On the other hand, - generating a LUT in a PROM might do it in one chip, as 8 bits will need two XOR DIPs.
One DIP will suffice up to 7 Gray bits...........
  Reply With Quote
Old 3rd October 2001, 04:18 PM   #4
Freddie is offline Freddie  Sweden
diyAudio Member
Join Date: Oct 2000
Location: Sweden
Default thanks


This was just what I was looking for. XOR ICs to convert from gray to binary, nice.

Thanks for the reply.

  Reply With Quote


gray code to binaryHide this!Advertise here!
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Tango series II binary PCB file help needed! Suoliang Everything Else 2 4th November 2008 03:51 AM
Problem witht [code]blah[/code] ? elseif Forum Problems 1 17th August 2008 12:30 AM
beautiful galaxy gray heatsinks kderedwolf Swap Meet 0 25th April 2005 02:36 AM
How to dye gray foam surrounds black? dhenryp Multi-Way 8 13th January 2005 08:55 PM

New To Site? Need Help?

All times are GMT. The time now is 08:16 AM.

Search Engine Optimisation provided by DragonByte SEO (Pro) - vBulletin Mods & Addons Copyright © 2018 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 16.67%
vBulletin Optimisation provided by vB Optimise (Pro) - vBulletin Mods & Addons Copyright © 2018 DragonByte Technologies Ltd.
Copyright ©1999-2018 diyAudio