# Seven Segment display output problem

I am trying to come up with a circuit using logic gates to drive a seven segment display.

I have a circuit with a BCD output (A, B, C, D) and need to convert this so that when any one of nine buttons are pushed, they produce a number.

The circuit needs to display a 0 when nothing is pressed. However, when buttons 1 - 9 are presesed it needs to display 7, 4, 8, 0, 5, 6, 8, 8, 9, respectively.

I have produced truth tables and k-maps, which all seem to be correct. But, it does not seem to be working at all. I get random numbers and a couple of odd displays of random elements on the display (not numbers or letters).

If anyone can point me in the right direction, or give me some advice, I would be eternally grateful!

• I've made the circuit easier to read. If I've screwed up then sorry. Commented Feb 15, 2018 at 12:51

It's not clear why you're going via BCD. Just create the combinational logic directly.

simulate this circuit – Schematic created using CircuitLab

Figure 1. Pressing a switch turns on the segments connected by small signal diodes.

• I am converting from BCD... Commented Feb 15, 2018 at 12:58
• @NickH yes your circuit shows this but why bother - interface directly with the buttons and cut-out the clutter. Commented Feb 15, 2018 at 13:01

To be honest: I can't take the time debugging your circuit. I just wanted to point out that I would have approached the functionality different.

Use a 7447 decoder and re-arrange the button order so button 1 is connected to input 7, button 2 to 4 etc. For number 8 put two button in parallel.

• Yeah, I have initially used a 7447N, and this worked perfectly for what I initially needed, now I want to remove the 7447N and use just logic gates to produce the desired result to depen my understanding. Thank you for the input though. Commented Feb 15, 2018 at 12:55

Most likely the issue would be caused if aren't accounting for the fact that the buttons and LEDs are inverted.

When the button is pressed, the input value will be a 0.

When the output is a 1, the LED segment will be off.

• That was something that occured to me after quite some time... I have accounted for that, and changed the circuit accordingly. Accounting for it, allowed me to get close to acheiving what I want, but still "no cigar". Commented Feb 15, 2018 at 12:58