Connect with us

9 bit converter in cupl

Discussion in 'Microcontrollers, Programming and IoT' started by RedDragon, Mar 17, 2012.

  1. RedDragon

    RedDragon

    15
    0
    Mar 17, 2012
    I got a gal22v10 and I'm programming it with wincupl. I need a Program that will convert 9 bit to 3 BCD or 3 7 segment displays. I know that i will need more then one chip.
     
  2. gorgon

    gorgon

    603
    23
    Jun 6, 2011
    I'm mot sure you can do this in an easy way, since each output only has 7 or 8 product terms. Is there a special reason you need to do this big task on a tiny chip?

    If I should do this with 'logic', I would use a couple of old eproms, like 27c16, and just program them with the correct pattern. You could even use 3 eproms and get ready 7-segment outputs directly to the LEDs.

    TOK ;)
     
  3. RedDragon

    RedDragon

    15
    0
    Mar 17, 2012
    well I'm making a relay computer and I want to take the 9Bit output and display it on 3 7-segment displays.
     
  4. gorgon

    gorgon

    603
    23
    Jun 6, 2011
    If you only need to look at the 9bit binary value, use 3 normal 7segment decoder chips. Or you can of course use 3 of the GALs for this, but a 3bit to 7segment decoder is a bit overkill if you don't have them around. You should be aware of the the GAL chips normally use a lot of current, if you don't have some of the old very lowpower variants.
    Since you said BCD in the first post, I read it like you wanted a 9bit to 3 digit BCD decimal display.

    TOK ;)
     
  5. RedDragon

    RedDragon

    15
    0
    Mar 17, 2012
    but that won't work. the output is 9bit in binary not in BCD so if i were to use a bcd decoder it won't putout the right number so i need a binary to bcd converter first.
     
  6. gorgon

    gorgon

    603
    23
    Jun 6, 2011
    Ok, so we're down to what you want displayed. If you want to display the 9bit BINARY value into a DECIMAL presentation, like 000 to 511, you need to convert the value to a 3 digit BCD.
    If you on the other hand can cope with the 9bit BINARY to a 3 digit OCTAL presentation, like 000 to 777, you only need 3 ordinary BCD to 7segment drivers, with a 0 to 7 displayed in each digit.
    You can also use 3(2.5) x 4bit to 7segment hex drivers to display a hexadecimal value from 000 to 1FF.
    For the 2 driver type solutions, you can program a number of 22v10 chips to do the 3/4bit to 7 segment conversion.
    For the binary to decimal solution you also need a 9bit binary to 3 digit BCD converter in addition to the 7 segment drivers.
    Depending on the type of assignment this is, you have several possibilities.

    TOK ;)
     
  7. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    25,178
    2,690
    Jan 21, 2010
    I think you mean 3 BCD digits (or similar) since BCD is, by definition, 4 bits.

    This may be useful.
     
  8. RedDragon

    RedDragon

    15
    0
    Mar 17, 2012
    Yes I want to convert binary to decimal and I want to know if I should use the GAL22v10 or use eprom chips. and If i do use the GAL22v10 I need a program to do the conversion.
     
  9. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    25,178
    2,690
    Jan 21, 2010
    You did read the information in the link I posted, right?
     
  10. RedDragon

    RedDragon

    15
    0
    Mar 17, 2012
    yes but i do need some help making the program
     
  11. gorgon

    gorgon

    603
    23
    Jun 6, 2011
    Is this an actual assignment or just your own idea?

    The 22v10 has not enough basic capacity to do this this task. It has only 10 macrocells, each with 7 or 8 product terms. If you put a number of GALs together you may manage it, eventually. But I'm far from certain you will succeed.

    If it's just for fun, I would have used some eproms to do it, but that's me. As long as you don't want to use a microprocessor/ controller, it will take some elbow grease to do it, however you do it.

    TOK ;)
     
  12. RedDragon

    RedDragon

    15
    0
    Mar 17, 2012
    Well that was what i was asking if i should use the GAL or EPROM chips so I will use some eprom chips that i have
     
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

-