Maker Pro
Maker Pro

Decimal to binary

D

Data888

Jan 1, 1970
0
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?
 
T

Thomas C. Sefranek

Jan 1, 1970
0
Data888 said:
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 [email protected]
|_-\<,_ Amateur Radio Operator: WA1RHP
(*)/ (*) Bicycle mobile on 145.41, 448.625 MHz

http://hamradio.cmcorp.com/inventory/Inventory.html
http://www.harvardrepeater.org
 
A

ANdre H

Jan 1, 1970
0
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
 
B

Byron A Jeff

Jan 1, 1970
0
-
--> 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
 
R

R. Steve Walz

Jan 1, 1970
0
Data888 said:
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
 
Top