Binary to decimal: how to send 8 bits to 2 displays or ...?


I'm working on a project that requires to display binary words (8 bits) on a 7-segment display. It is the purpose to show those words decimally. Anyone knows of a device that can convert an 8 bit word into the correspondent decimal numbers (0, 1, 2, ..., 9, 10, ..., 64 (that's where I have to set a reset))? I was thinking of using 2 displays, but I don't know how to deal with it. Or does there exists a 7-segment-display that exists of 2 parts, so that you automatically can show numbers like 20 etc. ?

I hope some one can help me. Thanks in advance!

Greetings Tari

Reply to
Loading thread data ...

Tari It might be easiest to represent the 8 bit word as a 2 digit Hexadecimal number. If you *must* represent it as a decimal, it will take three digits (000-255) and some significant logic to convert from binary to decimal. The simplest way I can think of to do this would be to use a microcontroller which could also drive the display. Is this a possibility?


Reply to
Richard Hosking

Quick and dirty method for a one-off:

State table in 16-bit EPROM, or two 8-bit EPROMS. Drive the address lines with the input byte and use the data lines (buffered) to drive two

7-segment displays.

Breadboard it in an hour. Write the state table in ten minutes.

Use those 4716s you never could bring yourself to throw away :-)

Otherwise you could use a couple of 74*185 binary to BCD converters, then two 74*49 BDC to 7-segment decoder/drivers driving two 7-segment displays.

There's lots of other ways of doing it, but since it looks like a school project, I'll leave you to find those out yourself.

Then there's duct tape ... 
              (Garrison Keillor)
 Click to see the full signature
Reply to
Fred Abse

Think Bitmap. Make a table like this: {0,0x3f}, {1,0x06}, {2,0x5b}, {3,0x4f}, {4,0x66}, {5,0x6d}, {6,0x7c}, {7,0x07}, {8,0x7f}, {9,0x67}, {10,0x77}, {11,0x7C}, {12,0x58}, {13,0x5E}, {14,0x79}, {15,0x71}};

Wherethe HEX values represent the segment leds. THis table is for 0-F on a seven seg display. It depends on how you have the digits hooked up, ie what bit is tied to what segment. And if the Digit is Common Anode or Cathode. Just index into the table for the correct bitmap. And as someone pointed out you can use an EPROM to be a character generator.

Good luck

Reply to
Martin Riddle

Set a reset? Sounds like you might be coming from a counter. If so don't use a binary counter, use a 2-digit BCD counter. Each digit then goes directly to a BCD-7segment display/driver.

If it has to be a binary input then the old microprocesser logic would be..... Split the binary D7-D0 into two nibbles, D7-D4 is hi-nib and D3-D0 is lo-nib. Look at lo-nib.

If lo-nib is less than 9, then the two BCD output digits are simply hi-nib and lo-nib. If lo-nib is greater than 9, then the two BCD output digits are (hi-nib + 1) and (lo-nib + 6). This could be done in hardware (1x 4-bit magnitude comparator, and 2x 4-bit adders), or in software in a microprocessor. A little 18-pin PIC has just about enough i/o to do it.

Tony Williams.
Reply to
Tony Williams

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.