Connect with us

0-99 Binary to BCD converter

Discussion in 'Electronic Basics' started by [email protected], Apr 3, 2007.

Scroll to continue with content
  1. Guest

    My prof assigned me a bonus project to try out. We current built a
    basic Binary display using 4 switches and the 7447 convert to light up
    a seven segment display. The challenge is to build a counter that will
    take 7 input binary, for 0-99 and display it with two seven segment
    displays on a digital board. I need to figure out a way to build this
    using IC chips. Now I'm not looking for the answer in plain English
    hints would be nice. He suggest using a full adder but when looking at
    this I cannot seem to find a way to use it. I started to configure a
    set up but its starting to use way to many chips, and it seems like I
    am just making inputs for every number from 0-99.

    any assistance is greatly appreciated.

  2. DJ Delorie

    DJ Delorie Guest

    Well, you can do it in one chip if you're allowed to use a
    microcontroller ;-)
  3. Guest

    Less horsepower than that. (E)PROM look up table. Too bad this isn't
    allowed either.

  4. Gilles Kohl

    Gilles Kohl Guest

    Wouldn't you need a counter in addition to the (E)PROM? (Making it two

  5. jasen

    jasen Guest

    the lowest bit will be easy after that it gets interesting.

    one way would be a 128 byte rom :)

    I see two possible approaches,

    one is massed logic, just figure out how each output bit is determines by
    the input bits..

    the other is synchronised counters, drive two counters one that counts base 10
    and drives the display and another that counts in bibary and you compare
    with the input.

    or even better a presettable binary down counter, and a two-digit BCD up

    look up these (cmos 4000 family) part numbers. 4553 4516 4518 4029
    download the datasheets and see what you can do.
    eg type "4553 datasheet" in the google search box and see where
    it takes you.

  6. Bob Masta

    Bob Masta Guest

    Sound like your prof is playing a trick on you. (Did
    you get this assignment on April 1?)

    The conventional approach (way back when people
    actually did these things with discrete chips) is to use decade
    counters, such as the 7490, which can be cascaded
    to count as many digits as you like. Each 7490 sends
    its output to one 7447. No adders needed!

    Best regards,

    Bob Masta

    D A Q A R T A
    Data AcQuisition And Real-Time Analysis
    Scope, Spectrum, Spectrogram, Signal Generator
    Science with your sound card!
  7. John Fields

    John Fields Guest

    The brute force way is to load the seven bit binary number into a
    binary down-counter and at the same time to clear two BCD counters
    connected in cascade. Then clock them both with the same clock and
    stop counting when the binary counter gets to zero. The BCD
    counters will now have as outputs the BCD value of the binary number
    loaded into the down-counter.
  8. DJ Delorie

    DJ Delorie Guest

    Nope. seven address bits, eight data bits - the address is the "input
    value" and the resulting data is the pre-computed BCD-decoded value.

    You could even pre-compute the 7-segment decode, with seven address
    bits and 14 data bits.
  9. feebo

    feebo Guest


    really? Is this the way you'd do it?

    Why wouldn't you use a couple of 74LS185 to do direct conversion?
  10. feebo

    feebo Guest

    sorry - link...
  11. feebo

    feebo Guest

    lots of answers from other people here (mostly jokes, right?)... but..
    the best way to do it is with 2x 74LS185 - they are designed exactly
    for this job.

    Forget about counters and stuff, these two chips correctly arranged
    will provide the correct BCD outputs to feed into your 7447s - i.e
    exactly what you want.
  12. One thing is not clear to me: Do you have a 7-bits binary counter (so you
    need to convert from binary to BCD to 7-segment) or do you need a BCD
    counter that outputs directly in 7-segment? Or even some other scheme?

    As for using full adders for conversion, suppose "In" to be the binary input
    and "Out" to be the BCD output, you get:

    In<=9 Out=In+0
    10<=In<=19 Out=In+6
    20<=In<=29 Out=In+12
    30<=In<=39 Out=In+18
    90<=In<=99 Out=In+54

    Straight forward decoding this way requires ten full adders and ten
    comparators plus still two 7447, which makes a total of 42 ICs. Don't think
    this way of decoding will ever become popular. I've done similar decoding
    using an EPROM and two 7447. The "normal" old way was using BCD-counters and
    7447. No need to say all this stuff is packed in one micro this days.

    petrus bitbyter
  13. feebo

    feebo Guest

    oops... 3x 74ls185, not two - soz
  14. DJ Delorie

    DJ Delorie Guest

    The 74LS185 is a ROM chip, pre-programmed with the results. This is
    one of the "joke" solutions you refer to.
  15. You were correct the first time, it only takes 2x to do the numbers 0 - 99
    with a 7 bit binary input. Good luck finding a supplier, I could hardly
    find a datasheet. ;-)
  16. Guest

    thanks to everyones input, Eproms I don't know how to use and I'm
    almost certain 74Is185 have been discontinued.
  17. feebo

    feebo Guest

    blimey! you are right - rare as chicken thingies.
  18. feebo

    feebo Guest

    doing it with an eprom is quite easy and, Ithink, the best option.

    eproms work by you providing a binary address (i.e. what you are
    currently providing to you 7447 and giving out a piece of data (8 bits
    - just right to feed 2x 7447)

    you will need to make sure that whatever eprom you use, you ensure the
    CS is low and the output (OE or RD) on some is also enabled all the

    then you need to work out what combination of data patterns comes
    out... here is a list of the data for each address... assuming you are
    driving two 7447, the Left most digit driven from the least
    significant 4 bits (D0 - D3)

    all addresses and data are in HEX.

    connect your 7 bits of data to A0-A6 and connect all other address
    lines to 0V

    should have this up and running is 2 hours max - assuming you have
    access to an EPROM programmer

    here is a list of the data for each address... assuming you are
    driving two 7447, the Left most digit driven from the least
    significant 4 bits (D0 - D3)... Not really my habit to spoon feed, but
    trust me - this will lead to greater things once your creative juices
    start flowing.

    all addresses and data are in HEX.

    0000 00
    0001 01
    0002 02
    0003 03
    0004 04
    0005 05
    0006 06
    0007 07
    0008 08
    0009 09
    000A 10
    000B 11
    000C 12
    000D 13
    000E 14
    000F 15
    0010 16
    0011 17
    0012 18
    0013 19
    0014 20
    0015 21
    0016 22
    0017 23
    0018 24
    0019 25
    001A 26
    001B 27
    001C 28
    001D 29
    001E 30
    001F 31
    0020 32
    0021 33
    0022 34
    0023 35
    0024 36
    0025 37
    0026 38
    0027 39
    0028 40
    0029 41
    002A 42
    002B 43
    002C 44
    002D 45
    002E 46
    002F 47
    0030 48
    0031 49
    0032 50
    0033 51
    0034 52
    0035 53
    0036 54
    0037 55
    0038 56
    0039 57
    003A 58
    003B 59
    003C 60
    003D 61
    003E 62
    003F 63
    0040 64
    0041 65
    0042 66
    0043 67
    0044 68
    0045 69
    0046 70
    0047 71
    0048 72
    0049 73
    004A 74
    004B 75
    004C 76
    004D 77
    004E 78
    004F 79
    0050 80
    0051 81
    0052 82
    0053 83
    0054 84
    0055 85
    0056 86
    0057 87
    0058 88
    0059 89
    005A 90
    005B 91
    005C 92
    005D 93
    005E 94
    005F 95
    0060 96
    0061 97
    0062 98
    0063 99
    0064 FF
    0065 FF
    0066 FF
    0067 FF
    0068 FF
    0069 FF
    006A FF
    006B FF
    006C FF
    006D FF
    006E FF
    006F FF
    0070 FF
    0071 FF
    0072 FF
    0073 FF
    0074 FF
    0075 FF
    0076 FF
    0077 FF
    0078 FF
    0079 FF
    007A FF
    007B FF
    007C FF
    007D FF
    007E FF
    007F FF
  19. feebo

    feebo Guest

    instead of doubling up your eproms (or using a big beastie)
    why not just use A7 as a strobe and provide both seven seg data on the
    single data outputs.

    so use A7 to toggle between display segments
  20. feebo

    feebo Guest

    what? a two chip "discrete TTL" solution to do exactly what the OP
    wants - fail to see the joke. The internal construction of the chip
    has no bearing...
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day