# Driving 7 segment displays for a 16bit breadboard computer

Electronics noobie here trying to work on some projects to learn something. I'm currently working on a 16bit breadboard computer, and I'm trying to figure out how to display the 16bit binary number as a decimal number on some seven segment displays.

I originally thought I could make a 32M EEPROM out of 64K EEPROMs, which is incredibly stupid of me.

What's the best way to do this? I don't really want to use a microcontroller, as to me that's kind of 'cheating' in the nature of this project, but if that's the best option I'll go with it.

• You’re trying to make 32 Megabits out of 64 Kilobit devices? You realize that you’ll need 512 of them?! Jul 21, 2018 at 0:47
• Ok so I think this falls under the "sorry for being dumb" part of my post. This is what I get for not paying too much attention in the last chapter of my digital logic design course... Jul 21, 2018 at 0:48
• Why bother with decimal at all? Use hex. Decimal is just a big distraction. Jul 21, 2018 at 1:00
• Hex means you can use 4 identical decoder/drivers. Jul 21, 2018 at 1:06
• Decimal output would typically be generated by software on the system itself. For hardware-only debugging output (some kind of halted CPU register display?), hex is preferred. The usual decoders give odd patterns above nine, but you can make a custom one from a small ROM. Jul 21, 2018 at 4:22

Decimal display is tricky. A decimal display will involve repeatedly dividing your number by 10 and extracting the remainder. Division by anything that isn't a power of two is non-trivial, and usually isn't implemented in designs for simple computers (and therefore probably isn't reasonably achievable with the one you're currently working on). You could do it as a program, but the program would be pretty large, and again the kind of computer you're talking about often doesn't have much space for interesting programs (what size memory do you have? 256 bytes? if so, division would probably use up most of that).

Much more achievable is either hexadecimal (base 16) or octal (base 8) display. These only require division by powers of 2, which (like division of decimal numbers by powers of 10) is much easier to implement: you can just take a bunch of bits and decode them: for hexadecimal take chunks of 4 bits starting from the least significant bit of your number, while for octal you'd take chunks of 3 bits.

You could then use an off-the-shelf chip to decode those bits to the correct signals to get the digit to show on a 7 segment display. For octal output, the 74LS47 (or 74LS247) is a reasonable choice, but it doesn't handle hexadecimal output. For hexadecimal, an ICM7212 is one way forwards, although it's a bit harder to interface as it's designed to drive a multi-digit display but only has a single digit input at a time. They're also not exactly cheap. You could also build a decoder from an EPROM, which may be easier and cheaper, if you know how to do that.

• Yes, I'm planning on programming an EEPROM to display hexadecimal digits and I've already made some progress. Thanks for the help! Jul 23, 2018 at 11:22

I'm working on a similar project, and the closest thing I can get to a decimal display is using a 1 Megabit EPROM instead of an EEPROM because for some reason EPROMs tend to have more memory. (Here's a chip that I found https://www.jameco.com/z/M27C1001-10F1-STMicroelectronics-IC-27C1001-10-EPROM-1M-Bit-100ns-UV-EPROM-and-OTP-EPROM_697944.html)

If you really, really want to tackle this your self. An excellent method to master for reuse, especially for similarly complex problems.Is by using an EEPROM as a logic element. Use the addresses that correlate to the 16 bit signal, and program data entries there that drive your segments. Said another way, use an EEPROM as a type of glue logic to convert address inputs to data outputs. Rather than as a program memory, a custom logic decoder/encoder.

Pros, reusable, extensible easily modifiable. Cons, tedious and time consuming.