Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

8bit Binary number to multiple 7Seg Displays

Status
Not open for further replies.

Mike0rr

New Member
I'm working on a little project calculator and I'm right at the tail end but I'm stuck on this one last issue. I have an 8bit number coming out of my circuit that I need fed to a few 7 segment displays; (Example: Decimal 52, is Binary 00110100). I would assume I need to break this down to BCD but I can not seem to find a way to do so and I don't want to assume that is the correct way to go about this since I can't find much information on the subject. This is all being done on IC's.

Long story short; How would I go about taking my 8bit number and displaying it on one-three 7Seg Displays? Only using IC's, (no micro controller). It doesn't really matter how large the circuit is as I fully understand it may take quite a few chips and possibly need more than one conversion here.
 
Those chips should work for you but they are obsolete and hard to find.
Here's a thread on the subject of binary to BCD conversion.
 
Yeah, I seem to have found that out with most of the optional chips sitting around 10 bucks >.<
I'm going over those posts now. I just hope this isn't to hard for me to quickly understand. I want to get some more solder onto my PCB and all this reading and no action is killing me :p But learning is the whole point of this venture so it's just another part of the learning experience here. The devil is always in the details. Thanks Crutschow, I appreciate it.
 
It's all good. I think I will end up using them still if I can re-find some of 2$ or less priced Binary to BCD IC's. They may be outdated technology, but I am building an outdated device. Maybe I will even build them from their basic logic gates if I feel up to it. Until you popped up that link for me, I wasn't sure they really existed : )
 
Funny thing is.... We could make you the device out of a small micro!!! As far as you would see it, it would simulate the device in it's entirety!! Power pins excluded that is!!
I must be dense.
Why are the power pins excluded? :confused:
 
...............Maybe I will even build them from their basic logic gates if I feel up to it. Until you popped up that link for me, I wasn't sure they really existed : )
The logic is quite complex to do that conversion with just standard logic gates.
I believe those chips have some sort look-up-table (ROM) for doing the conversion to minimize the amount of logic.
 
Last edited:
I thought you said in your other thred that you already had the output part working. One suggestion is to have two counters. One binary and one BCD. Load the binary counter with the binary value and then clock it down to zero. The same number of clock pulses would clock the BCD counter up from zero.

Les.
 
Following on from crutschow's comment above, would it be an option to program a look-up table into an eprom (or bank of)?
 
Following on from crutschow's comment above, would it be an option to program a look-up table into an eprom (or bank of)?
Trouble is here... 8 bit BCD will only be enough two digits.. It would have been the best plan otherwise..
 
Trouble is here... 8 bit BCD will only be enough two digits.. It would have been the best plan otherwise..
You would need an EPROM with a minimum 12-bit output to convert an 8-bit binary number to 3 digit BCD number.

The would require an EPROM of at least 4K in size. A 4k (256 x 16) should work.
 
How about using an EPROM or EEPROM to drive all of the segments on a multiplexed three digit display? Perhaps use a 555 for a clock and a counter or a 4017 to drive three of the EEPROM address lines as well as the digit driver transistors?
 
You would need an EPROM with a minimum 12-bit output to convert an 8-bit binary number to 3 digit BCD number.
The would require an EPROM of at least 4K in size. A 4k (256 x 16) should work.
Actually, with a couple of external gates, you would only need a 128 byte ROM.

BinToBCDr1.png
 
Last edited:
Most pocket calculators do all the calculations in BCD.

Intel x86 architecture does it in 18-digit (ten-byte) BCD format , Big Endian style, with floating point operations.

Why are you doing it in binary?
 
Last edited:
Last edited:
I figured you'd ask.
Code:
       D Out
AIn  76543210
---  --------
  0  00000000
  1  00000001
  2  00000010
  3  00000011
  4  00000100
  5  00001000
  6  00001001
  7  00001010
  8  00001011
  9  00001100
10  00010000
11  00010001
12  00010010
13  00010011
14  00010100
15  00011000
16  00011001
17  00011010
18  00011011
19  00011100
20  00100000
21  00100001
22  00100010
23  00100011
24  00100100
25  00101000
26  00101001
27  00101010
28  00101011
29  00101100
30  00110000
31  00110001
32  00110010
33  00110011
34  00110100
35  00111000
36  00111001
37  00111010
38  00111011
39  00111100
40  01000000
41  01000001
42  01000010
43  01000011
44  01000100
45  01001000
46  01001001
47  01001010
48  01001011
49  01001100
50  10000000
51  10000001
52  10000010
53  10000011
54  10000100
55  10001000
56  10001001
57  10001010
58  10001011
59  10001100
60  10010000
61  10010001
62  10010010
63  10010011
64  10010100
65  10011000
66  10011001
67  10011010
68  10011011
69  10011100
70  10100000
71  10100001
72  10100010
73  10100011
74  10100100
75  10101000
76  10101001
77  10101010
78  10101011
79  10101100
80  10110000
81  10110001
82  10110010
83  10110011
84  10110100
85  10111000
86  10111001
87  10111010
88  10111011
89  10111100
90  11000000
91  11000001
92  11000010
93  11000011
94  11000100
95  11001000
96  11001001
97  11001010
98  11001011
99  11001100
100  00000000
101  00000001
102  00000010
103  00000011
104  00000100
105  00001000
106  00001001
107  00001010
108  00001011
109  00001100
110  00010000
111  00010001
112  00010010
113  00010011
114  00010100
115  00011000
116  00011001
117  00011010
118  00011011
119  00011100
120  00100000
121  00100001
122  00100010
123  00100011
124  00100100
125  00101000
126  00101001
127  00101010
 
Last edited:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top