Convert binary to BCD code

Status
Not open for further replies.
Well i got a random sequence for certain numbers

0 1110
1 1101
2 1011
3 0111
4 0001
5 0010
6 0100
7 1000
9 0000
8 all the rest.

And i like to convert them to BCD 8421 code.
I made a karnaugh diagram a created a circuit for the four inputs and then fout outputs a circuit for each bit. But the circuit is like huge.
 
hi,

Have you considered using an EPROM ic, load the pattern you want out as the data and the 'odd bit' pattern as the address?

EDIT:
IF this is related to the 7seg Driver thread, the EPROM output data could be the 7seg driver data!
 
Last edited:
How to convert 4 digit BCD 7 segment LED to 16 binary code.

I am using PIC16F946 and like to write a code converting 4 digits BCD 7 segment LCD to 16 binary code. Example, the 4 digits BCD number 9998 would be 1001 1001 1001 1000. How to write c program to convert this ?

Anyone help.

Private email: rc.1010@yahoo.com
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…