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.

binary to bcd converter

Status
Not open for further replies.

cucumber

New Member
binary to bcd converter

i have inputs in 4 bit binary ( from 0 to 15). i want to display my 4 bit binary inputs to 7 segment display which means i must have two 7 segment display. how can i convert my binary inputs to bcd in simplest way? can anyone give me explaination on how to make both of my 7 segment display the outputs of two digits ( from 00 to 15)?

-thank you
 
It depends on what you mean by "simple".
You could use a PIC to do this with very simple hardware and software.
You could use a 74185 if you can find one.
You could use a 74LS154 and a bunch of diodes.
You could use a bunch of logic gates instead of above.
You could use a EPROM chip.
 
Last edited:
is there any ic that can help me convert binary to decimal?
n could you help me with my second question which how can i display 4 bit binary inputs on two 7segment display output?
 
actually i cant figure out how to convert from binary to BCD, so i thought maybe i can convert my binary to decimal first n then from decimal to BCD. but then, i realized that BCD can only from 0 until 9 while i need my output to display 00 until 15.
 
cucumber said:
is there any ic that can help me convert binary to decimal?
Yes, I mentioned the 74185 above, but it'll be hard to find. Maybe there is an easier way to do this. Post your existing circuit here.
 
the convertion of binary to BCD is just part of my digital electronic project actually. the project is 4 bit positive subtract calculator which the output must be display with 7 segment display. i built the circuit but i get stuck when the part i have to make connection between the the 4 bit binary output from full adder(7483) and BCD to 7 segment decoder(7447).
 
Here's a method to convert serial binary to BCD. It uses an adder and a shift-register per digit. Perhaps you can adapt it to your needs. It's from an old Fairchild TTL Applications Book.
Serial Binary to Parallel BCD.jpg
 
Last edited:
Hi Cucumber,

If you like industrial archeology here's another one.
No idea how it works though. :D

on1aag.
 

Attachments

  • Binary to BCD.GIF
    Binary to BCD.GIF
    9.2 KB · Views: 32,044
take the advice and look at the 74185
elexp.com has the 74185 and I'm sure many other places do as well. Looking at the datasheet for it, it's very simple and can convert up to a 6-bit binary to BCD which you can feed into your 7447

Better still, perhaps look at the TDA4092 which is a binary to 7-segment decoder, skip the BCD step altogether, though this would only give you an output between 0 and 32
 
Last edited:
on1aag said:
If you like industrial archeology here's another one.
No idea how it works though.
I simulated the circuit and it seems to work. The "Co" line at top left is the left "Tens" digit. It's high for 10 through 15 input.

The "1", "2", "4", and "8" output at top is the right BCD digit for 0 through 9.

This scheme only works for 4 bits but I believe that's all you need.
 
on1aag said:
Hi Cucumber,
If you like industrial archeology here's another one.
No idea how it works though. :D
on1aag.

Interesting circuit.

It works by detecting any number greater than 9 ((8&4)|(8&2)) and using that as the 10s digit. It also feeds the 10s output into the 4 and 2 bits of the adder therefore adding 6 to any number greater than 9.

Mike.
 
about the circuit given by on1aag, i found difficulities when i want to try it. maybe i can get a little info on how i can use the circuit. from my observation, i only need to feed in 1 4bit binary number isnt it? sorry, but i'm not very clear with the circuit yet.

so far, i already manage to get my first 7 segment to display the left decimal output ( eg. '0' for '05' and '1' for '10') but i still cant figure out on how to make my second 7segment display the right decimal output.

I try to find as much altenative as i could. now, i'm still searching for the 74185 converter but at the same time, i tried some other ways. i tried to modify my friend's 4 bit adder design, but i couldnt find way either.
 
Hi Cucumber,

Connect the LSB to the "1" input at the bottom,
. . . and the MSB to the "8" input.
Connect the "1" output at the top to the A input
of the 7447, . . . and the "8" to the D input.

on1aag.
 
Connect the LSB to the "1" input at the bottom,
. . . and the MSB to the "8" input.
Connect the "1" output at the top to the A input
of the 7447, . . . and the "8" to the D input.

*if i have to substract two 4bit binary numbers such as :
*1000 - 0001 ( the ouput is 07)
*1110 - 0101 ( the ouput is 10)
 
finally~
i can understand the circuit given by on1aag.
fuh~
its working~
thanx alot~
i will try with all inputs that i have to confirm it~
 
Hi Cucumber,

From 0000 to 1001 the circuit only passes the data from the
inputs to the outputs. Disconnect the output from the third
nand from the full adder and ground the pins of the full adder
with value "2" and "4" and repeat the test from 0000 to 1001.
Then check the outputs of the first two nands, one output
should be zero at 101X, the other should be zero at 110X, in
both cases the output of the third nand should be logical 1.
At 111X both nands connected to the inputs should be logical
0 and the third should be logical 1.
There's nothing wrong with the circuit, the problem lies with
the cucumber who is trying to duplicate it !

on1aag.
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top