16-bit Binary to Decimal

Thread Starter

hondabones

Joined Sep 29, 2009
123
Hello Everyone,

I have finally built a circuit with some old left over parts that I have. The circuit counts down from 16 binary and then starts over. The display is currently 4 LEDs showing the binary values. I was wondering how to drive a dual 7-segment display to count down from 16. Any suggestions would be great.

Jim
 

SgtWookie

Joined Jul 17, 2007
22,230
See if you can find a datasheet for a 74185. Then see if you can find a 74185.

The easy way is to just replace your hex counters with BCD counters.
 

Thread Starter

hondabones

Joined Sep 29, 2009
123
Thanks for the reply Sgt. Wookie.

I found the datasheet for the 74185 but unfortunately I don't understand the rest of your post. lol

I am a 4th quarter electronics major and I am way ahead of the class right now. I am basically just trying to teach myself at this point. i love building the circuits. (currently trying to draw the circuit so I can post it) I read the E-book on here and I noticed the 4511 will drive one 7-segment display. Is there a way to use this? I also have a 4093 coming in the mail.

Thanks,

Jim
 

Thread Starter

hondabones

Joined Sep 29, 2009
123
What are you using for your HEX counters?
I don't know. I guess I don't understand. I am not using HEX it counts binary. (or maybe I'm clueless).

Here's the circuit:



U1 NE555P
U2 SN7493AN

555 is a square wave 50% duty cylce. Nice and slow pulses to see the count on the leds (about 1.5 sec, just guessing)

I also have a 1 μF cap across the battery. It helps take the "glitchiness" out of the circuit. I don't know why I didn't draw it in the schematic.

Thanks for the reply retched.
 
Last edited:

Thread Starter

hondabones

Joined Sep 29, 2009
123
Take a look here for a great tutorial on switching your circuit over:
http://www.kpsec.freeuk.com/counting.htm
Thanks for the link! Very useful.

However, I really don't want to convert my circuit. That would defeat the purpose of experimenting with my old parts. I would like to add to it to display the count in decimal on a dual 7-segment display.

(also a correction on my original post) I believe this is a 4-bit binary, NOT 16-bit and it counts down 15 -0, 16 decimal decimal numbers, then starts over.
 

retched

Joined Dec 5, 2009
5,207
Ok, you will need two 7493's and 2 7474's.

Running from pin 11 from the first 7493 to pin 14 on the second. That will make the second 7493 in a tens mode, Only displaying the 10's digit.

You can wire everything up as in the datasheet for 1 7seg then add the 2nd 7474 (going from pin 11 from the first to 14 on the second)
That will display your counted digits.
 

retched

Joined Dec 5, 2009
5,207
Here is a diagram on wiring the 7447 to the 7493



Common cathode 7-segs. R1-R7 around 330ohm

If you want, you could for starters, use a single 7seg and light the decimal point to represent the 10's digit.
 

Attachments

Thread Starter

hondabones

Joined Sep 29, 2009
123
Yes, I see what your saying.

Or I could have b and c of one display light up 1 for the tens count and then the other display should count the ones places.
 

retched

Joined Dec 5, 2009
5,207
Yes. yes you can. That would be the standard way. If you set up two circuits above and connect the second to the first, and set the first as DECADE counter, It will show a 1 to show how many tens there are, so it will happen automatically with the setup above.
 

lightingman

Joined Apr 19, 2007
374
Hi,

I did this a while back. It is on the forum somewhere. Basicaly it was done with an EPROM.
If you need the details and can not find them here, let me know. I can program you an EPROM any time.

Daniel.
 

SgtWookie

Joined Jul 17, 2007
22,230
If you are using 74 series TTL devices, they require a Vcc that is nominally 5v, with a range of 4.5v to 5.5v. Some 74C devices have a wider range, but for the original 74 series, the 4.5-5.5v range still applies. You will likely burn them up quickly running them on 12v.

I was tired when I was writing last night. The 7493 is indeed a 4-bit binary counter, which looking at it another way is a single digit hex counter.

A single 74185 will convert 5 bits of binary data to seven bits BCD (binary coded decimal). It performs the function of the EPROM that Lightningman is talking about. Lightningman basically used an EPROM as a look-up table to convert the binary address to a decimal number.

The trouble is, I think the 74185 has been out of production for a while, and may be hard to find.

A 7447 is a BCD to 7-segment decoder. Look up a datasheet to see what all is in it. For your project, you would only need one.

Oh, a standard BJT 555 will not be able to operate correctly to produce a clock at 5v. You would need to have a separate supply of around 6.3v for the 555 timer.

You could get around that by using 4000 series CMOS IC's for everything, but that means buying new ICs.
 

Thread Starter

hondabones

Joined Sep 29, 2009
123
You will likely burn them up quickly running them on 12v.
I am using a 6 V battery. Another error in my drawing.

sgtwookie said:
The trouble is, I think the 74185 has been out of production for a while, and may be hard to find.
I haven't tried to see if I can buy one yet, or even a substitution. I did, however look up the datasheet. It is a 5-bit binary to BCD converter, right? I also don't understand the difference between binary and BCD. I thought that was the same thing.

sgtwookie said:
A 7447 is a BCD to 7-segment decoder. Look up a datasheet to see what all is in it. For your project, you would only need one.
This is probably the route I will take for now. Although In would like to mess with a 74185


sgtwookie said:
Oh, a standard BJT 555 will not be able to operate correctly to produce a clock at 5v. You would need to have a separate supply of around 6.3v for the 555 timer.
I could try separating the supply but it seems to be working so far.

sgtwookie said:
You could get around that by using 4000 series CMOS IC's for everything, but that means buying new ICs.
Nope. I would just like to mess with what I have just to learn and experiment.

I had this 7493 from out of a TV I had. I learned you could display 4 LEDs to show the 4-bit binary count. I failed at every attempt for like a month. Until last night, I got it counting. Learned how to build a better square wave and it is a complete success, so far.

I know I said I was confused but let me see if I get the basic idea:

[square wave (555)] --> [4-bit binary counter (7493)] --> [binary to BCD (74185)] --> [BCD to Decimal (7474)] --> [Dual 7- Seg display]

That's it.
 

Thread Starter

hondabones

Joined Sep 29, 2009
123
Hi,

I did this a while back. It is on the forum somewhere. Basicaly it was done with an EPROM.
If you need the details and can not find them here, let me know. I can program you an EPROM any time.

Daniel.
This is a type of chip that I would program, right?
 
Top