Decimal to binary

D

Data888

Guest
I have a circuit with a series of 8 decimal inputs. One line for each
possible input. I need to convert this to a binary number of 3 digits to
control the rest of the circuit. I can't seem to find an IC that does
this, they all go the other way. Any suggestions?
 
"Data888" <kcinSPAMBLOCK@bigfoot.com.au> wrote in message
news:40063B93.1040306@bigfoot.com.au...
I have a circuit with a series of 8 decimal inputs. One line for each
possible input. I need to convert this to a binary number of 3 digits to
control the rest of the circuit. I can't seem to find an IC that does
this, they all go the other way. Any suggestions?

Priority encoder. 74HC147


--
*
| __O Thomas C. Sefranek WA1RHP@ARRL.net
|_-\<,_ Amateur Radio Operator: WA1RHP
(*)/ (*) Bicycle mobile on 145.41, 448.625 MHz

http://hamradio.cmcorp.com/inventory/Inventory.html
http://www.harvardrepeater.org
 
I don't know if such a IC exist, ( I am not following ICs anymore ) but you
can build this with
exclusive Or gates.
b0 = c7 X c5 X c3 X c1
b1 = c7 X c2 X c3 X c6
b2 = c7 X c4 X c5 X c6

X stand for exclusive OR, b0,1,2 bits, c1-7 any of our 8 inputs (0 just set
all to zero)
Regards
"Data888" <kcinSPAMBLOCK@bigfoot.com.au> wrote in message
news:40063B93.1040306@bigfoot.com.au...
I have a circuit with a series of 8 decimal inputs. One line for each
possible input. I need to convert this to a binary number of 3 digits to
control the rest of the circuit. I can't seem to find an IC that does
this, they all go the other way. Any suggestions?
 
In article <05mdnSFJkbkE8pvdRVn-tw@comcast.com>,
Thomas C. Sefranek <WA1RHP@ARRL.NET> wrote:
-
-"Data888" <kcinSPAMBLOCK@bigfoot.com.au> wrote in message
-news:40063B93.1040306@bigfoot.com.au...
-> I have a circuit with a series of 8 decimal inputs. One line for each
-> possible input. I need to convert this to a binary number of 3 digits to
-> control the rest of the circuit. I can't seem to find an IC that does
-> this, they all go the other way. Any suggestions?
->
-Priority encoder. 74HC147

Just be aware that since it is a priority encoder that only the highest
priority input will be encoded. So if input 4 and input 6 are both active,
then the output will show 6.

BAJ
 
Data888 wrote:
I have a circuit with a series of 8 decimal inputs. One line for each
possible input. I need to convert this to a binary number of 3 digits to
control the rest of the circuit. I can't seem to find an IC that does
this, they all go the other way. Any suggestions?
---------------------------
Assuming your 8 outputs are logic-LO:

You route backward guard diodes from each of the 8 outputs to three
pullup resistors, so that they pull these outputs LO when they should
be LO: Cheap open-collector decoder. The earliest ROM was made that
very way.

Example, from 7 you route NO diodes, you want the outputs HI, "111",
but from 0 you route diodes to all three outputs you want to go LO,
from 5 you route only one diode to the 2's bit, to make "101", and
from 2 you route two diodes to the 4's and the 1's bit, etc.

If your outputs are open-collector-LO or active-LO,like a74LS138, then
the decoder for 8 values, 0 through 7, takes 3+2+2+1+2+1+1+0=12 diodes
and three 1K resistors.

-Steve
--
-Steve Walz rstevew@armory.com ftp://ftp.armory.com/pub/user/rstevew
Electronics Site!! 1000's of Files and Dirs!! With Schematics Galore!!
http://www.armory.com/~rstevew or http://www.armory.com/~rstevew/Public
 

Welcome to EDABoard.com

Sponsor

Back
Top