Binary > BCD encoder (In the works)

  • Synergy
    22nd Mar 2011 Member 0 Permalink
    9-bit Binary to BCD encoder

    eg. Converts 111000101 (453) to 0100 0101 0011 (453)

    This is useful for converting to seven segment.

    UPDATED 95% COMPLETE

    image

    image

    Amazingly difficult task. The amount of wires required would have been exponential, so wifi is used in bulk. By bulk I mean practically 95% of the available WIFI. So if you have a project that requires no wifi but needs binary > bcd or binary > bcd > 7 segment, then this is for you.

    The hardest part about making this is timing. Various and gates are used for the recognisation of values (these processes take place in the smaller chip. So I need bery precise timing for it to function properly, but I have found a method of allowing slight delays between signalls.

    But yeah overall I am about 70% finished, and it will be posted when I am done.
  • shroom207
    22nd Mar 2011 Member 0 Permalink
    Some noob blows it up.
  • Synergy
    22nd Mar 2011 Member 0 Permalink
    I think I would cry.
  • Uberness
    22nd Mar 2011 Member 0 Permalink
    Cool.
  • sparkjet
    22nd Mar 2011 Member 0 Permalink
    noobs only vote electronics up because they look cool, and they only use them to blow up with their stupid bombs
  • Synergy
    22nd Mar 2011 Member 0 Permalink
    Haha. I finished it last night, well it is 99% finished (and functions properly, which god I did not expect) I just have one more adjustement to make.
  • dnerd
    22nd Mar 2011 Member 0 Permalink
    @Synergy
    dude, you are amazing at this! i never thought this was doable!!!! how much of the screen does it take up?
  • Synergy
    22nd Mar 2011 Member 0 Permalink
    If you shoved it all nice and tightly right into the corner, probably 1/5 to 1/4 of the screen. Its only real drawback is that is uses practically -270 to 9300 in WIFI. I am incredibly lucky that I had enough available, because its almost impossible to use wires instead. I might find a more efficient way in the future that will shave off 40 WIFI or so.

    But yeah, I ran it through various tests and so far, every 9 bit binary number has converted to BCD successfully. The basic premise of operation is this.

    Inputs = (| | | |) (| | | |) (| | | |) (| | | | | | | | |)

    Also I skipped the first two shifts. They just arent nessasary because values cannot possibly be high enough to trigger 5 or more until the third shift. Therfore the 3 binary values furtherest to the left start in the 1's decade.

    The fist 4 are the hundreds decade, second 4 is tens, third 4 is ones and the last nine are the 9 bit binary inputs.
    Binary must be shifted left 9 times. At the end of the process all of the binary bits will have moved into the 1/10/100s decades.

    Before every shift the values within the 1's 10's and 100's decade must be checked. If the value returns 4 or lower, then nothing happens and the values are shifted left. If the value returns 5 or higher then +3 must be added to the value and then the new value is shifted.

    Timing was key, because checking values requires logic gates, specifically AND gates. If the sparks in different inputs were even two/three frames too fast or two slow, then the whole operation will pretty much go to hell. So I had to carefully measure alot of spark times and eventually set up a device which allowed sparks to catch up to each other and transmit to the value checkers simultaniously.

    I have one more issue, and that is activating the left shift on the binary bits that arent in any BCD decades. Currently I set it up so that if a bit in any of the decades returns any value (so pretty much if there is a spark in any BCD decades) then that will trigger the activation of the left shift for binary values. The only time binary values wont activate the shift is when there is no value in any of the BCD decades. Therfore it wont be triggered, however it should be really easy to fix.

    Another annoyance... I actually need 1 more level of value checking for the BCD > 7 segment display. So say BCD returns 0100 1000 1001 (489) I will need to check the value of all three of those BCD decades. That means determining wether it is 1,2,3,4,5,6,7,8 or 9. Then lighting up the display accordingly. To pull this off with WIFI I would need about 12 free. I don't, so I am going to have to strain my ass setting up wires to wire the final part.