# Need help. 8 bit binary to bcd conversion

#### royashley99

Joined Nov 20, 2021
39
What would be a good 5v eprom I could use

#### royashley99

Joined Nov 20, 2021
39
Hi 99,
If you are planning to use an EPROM on an actual project, you need a EPROM programmer.

Do you have a programmer unit.?

E
Not yet

#### Ian0

Joined Aug 7, 2020
4,877
How would I connect the EPROM like this with the 8 bit input
Connect the 8-bit input to A0 to A7 (see post #5) LSB to A0, MSB to A7

#### Ian0

Joined Aug 7, 2020
4,877
Do you have an ultra-violet light EPROM eraser? I presume you don't! Then avoid the 27xx
IF you don't need to go beyond 99, or you're happy with a 2-chip solution, then AT2816, because it can be erased by your programmer.
If you want a single chip solution then you'll need something with 16-bit wide outputs such as the M27C4002 as @dl324 suggested.

#### dl324

Joined Mar 30, 2015
14,325
What would be a good 5v eprom I could use
Wiring would be simplified if you used an EPROM like M27C4002. The output is 16 bits, so you don't need to split the table across 2 8 bit EPROMs.

I posted some no frills code in another thread on this topic.

#### MrChips

Joined Oct 2, 2009
25,930
Whichever way you look at it, the MCU solution is still the simplest.
Furthermore, the 8 bit adder can be implemented in the MCU.

#### royashley99

Joined Nov 20, 2021
39
I'm going to be using two 74HC258's to make a 8 bit adder and I want to make a circuit that I can connect to it to display the binary output on a 3 digit 7 segment display

#### Ian0

Joined Aug 7, 2020
4,877
I thought you would ask that (see post #5)!
With a 2816, you can go straight from 8-bit binary to 7-segment display.
Use A0-A7 to input your binary number.
Connect a 4017 to O1 to A8 and O2 to A9, connected so it counts to 3 - this is your digit multiplex counter. The 4017 outputs also drive the anodes of your 7-segment (common anode displays) O0 to units, O1 to tens and O2 to hundreds. Connect a clock to the 4017 of at least 200Hz.
In addresses 0-255 program the 7-segment outputs of the units digit .
In addresses 256-511 program the 7-segment outputs of the tens digit
In addresses 512-767 program the 7-segment outputs of the hundreds digit.
Buffer D0 to D7 with a 74HC541, because the EPROM probably doesn't have enough output current to drive the display, and connect it to the segment (a,b,c,d,e,f,g) connections of the 7-segment display.

#### LesJones

Joined Jan 8, 2017
3,701
If you are planing on using a multiplexed display a variation on the EPROM idea would be to connect the 8 input bits to address lines 0 to 7 and a multiplexing counter (which counted to 3 or 4 for the multiplexing.) connected to address lines 8 and 9. You would only use 4 data output bits from the EPROM and connect these to the inputs of a 7 segment decoder.
So each multiplexing time slot only needs to output one digit. So each of the three areas of the EPROM (Selected by A8 and A9) would only contain the information for one digit. (Units, tens, hundreds.). You could even dispense with with the 7 segment decoder if you used 7 output bits from the EPROM and programmed the EPROM with the 7 segment patterns rather than the decimal digits.

Les.

#### Ian0

Joined Aug 7, 2020
4,877
If you are planing on using a multiplexed display a variation on the EPROM idea would be to connect the 8 input bits to address lines 0 to 7 and a multiplexing counter (which counted to 3 or 4 for the multiplexing.) connected to address lines 8 and 9. You would only use 4 data output bits from the EPROM and connect these to the inputs of a 7 segment decoder.
So each multiplexing time slot only needs to output one digit. So each of the three areas of the EPROM (Selected by A8 and A9) would only contain the information for one digit. (Units, tens, hundreds.). You could even dispense with with the 7 segment decoder if you used 7 output bits from the EPROM and programmed the EPROM with the 7 segment patterns rather than the decimal digits.

Les.
Great minds think alike!

#### Ian Rogers

Joined Dec 12, 2012
988
I have been told that the 74ls185 was just that internally.... Eprom programed to output on the count on the input..

#### BobTPH

Joined Jun 5, 2013
4,772
Just use 8 LEDs. Real engineers read binary.

Bob

#### LesJones

Joined Jan 8, 2017
3,701

#### dl324

Joined Mar 30, 2015
14,325
I have been told that the 74ls185 was just that internally.... Eprom programed to output on the count on the input..
AFAIK, no one ever made an LS part. 74184 and 74185 were derived from 7488 PROM. National Semiconductor and TI stated this in their datasheets.

#### Ian Rogers

Joined Dec 12, 2012
988
Cheers for that.... I thought I heard it somewhere..

Funny though.. A quick google lists 74LS185...

#### dl324

Joined Mar 30, 2015
14,325
Cheers for that.... I thought I heard it somewhere..

Funny though.. A quick google lists 74LS185...
I started using 32x8 PROMs in the mid 70's and there were no LS parts. When I searched, I only saw one URL to it and you had to join to download the datasheet. I passed...

#### royashley99

Joined Nov 20, 2021
39

#### Ian Rogers

Joined Dec 12, 2012
988
Its unobtainium now... You can get them on aliexpress for £11 but what you get will be pic n mix....

#### dl324

Joined Mar 30, 2015
14,325
Where would you purchase the 74LS185's
You can make your own using 8x32 PROMs; 8 bits would require 3 of them. If you were tempted to go that route, you should just program an EPROM with a 16 bit output. In the thread I referenced earlier, I programmed one to do 4 BCD digits.