3
\$\begingroup\$

I am new in this domain and I want to design a 7-segment display from 0 to 9 and then from A to F.

I made the truth table composed of 4 inputs and 8 outputs each output for the corresponding pin of the segment, then designed the k-maps and lastly I wrote the Boolean equation of each output.

The problem is that I don't know how to link each equation with each other.

enter image description here

So I asked this question like 2 days ago and arrived to a conclusion which ended pretty much what I want to do but there is still one small problem which is I don't know what to put as inputs like in the image below.
enter image description here
I tried to put inputs like the ones in the image, some of the logical circuits like "c" and "d" lighted up when the input is 1 and turned off when it is 0.
So if someone could tell me what is my mistake knowing that each logical circuit from a to g are all correct.

\$\endgroup\$
11
  • \$\begingroup\$ What do you mean by "link" or "associate"? Each equation defines the logic required for each output; there is no requirement to combine them in any way. So what are you actually trying to do? \$\endgroup\$ Mar 19, 2020 at 11:31
  • \$\begingroup\$ What do you mean? Aren't they "linked" by the fact that they all use the same four inputs? \$\endgroup\$
    – Dave Tweed
    Mar 19, 2020 at 11:31
  • \$\begingroup\$ maybe he means minimize implementation gates with consideration to all eight outputs by reusing common terms across equations? \$\endgroup\$
    – vicatcu
    Mar 19, 2020 at 11:56
  • 1
    \$\begingroup\$ @PeterMurr do you mean how to make a circuit/program a microcontroller/which IC to use to implement your table into a usable...thing? \$\endgroup\$
    – zakkos
    Mar 19, 2020 at 12:44
  • 2
    \$\begingroup\$ You don't need to link them. They are 7 separate equations. One for each segment. \$\endgroup\$
    – user253751
    Mar 19, 2020 at 13:08

3 Answers 3

6
\$\begingroup\$

The main link for the logic for the individual segments is that they must share the same inputs. Optionally, they can share computation of a given expression: for example, inverted values of all the inputs occur more than once, so you can share the output of the invertors (/A, /B, /C, /D). Also, A./B occurs twice and could be done with a single AND.

If you're implementing in gates, you can pretty much directly convert to logic as shown in the circuit below. You may well find that some terms can be optimised because they are shared between segments: for example, I've shared /A, /B etc, but you can find shared terms after the AND gates. (NB: following is for common cathode seven-segment display, common anode would be similar but with some logic reversal, as you generate /outa etc, not outa.) I don't know what gates you consider acceptable, I'm using maximum of 3-input ANDs and ORs just because the schematic capture of stackexchange has those. You might well want 7- and 6-input OR gates, depending on what you're implementing in.

If you actually build it, you can really see the value of programmable logic arrays, printed circuit boards, and MSI. Or of course microcontrollers, where the whole thing is just something like portb = segmentmap[x & 0xf];.

schematic

simulate this circuit – Schematic created using CircuitLab

You might be interested that the datasheets for 74LS47 seven-segment decoders give the following (though note they don't give hex output for 10-15): enter image description here
From Texas Instruments 7447 Datasheet


Second Half of Question

Since you updated with your separate logic blocks, you need to join all the a, b, c, d inputs to each block together, so that each block calculates the its segment value for the same inputs.

I'm not sure what simulator package you're using, but you'll want something like the following, which should display a 9 if the logic is correct.

enter image description here

\$\endgroup\$
4
  • \$\begingroup\$ So if I want the number 0 to be displayed I should put "0000" instead of "1001" ? \$\endgroup\$
    – P_M
    Mar 23, 2020 at 12:44
  • \$\begingroup\$ @PeterMurr exactly right \$\endgroup\$
    – jonathanjo
    Mar 23, 2020 at 13:41
  • 2
    \$\begingroup\$ Sometimes it helps to break down the problem into sub-problems to help understand it better. A 7seg display is really just 7 LEDs (or LED bars) in its simplest form. For each LED you are asking "If I have 4 wires as input, For what patterns of 0s and 1s do I want this LED to turn on?" Each of the boxes connected to a segment is a circuit which "answers" this question for a particular segment. In your first circuit diagram, most of the boxes have all of the inputs connected together so a box cannot "see" all patterns. @jonathanjo has fixed that in his diagram. \$\endgroup\$ Mar 23, 2020 at 14:00
  • 1
    \$\begingroup\$ As an example, the top-left segment would be ON for 0, 4, 5, 6, 8, 9, A, b, C, E, and F, and off otherwise. The bottom segment would be ON for 0, 2, 3, 5, 6, 8, b, C, d, E, and F, and off otherwise. Each "led driver" circuit is independent of the rest, but all of the "led driver" circuits must be connected to all four input wires. Some of those connections might be don't care in a given implementation, but conceptually there is still a connection and the circuit is what decides "I don't care". \$\endgroup\$ Mar 23, 2020 at 14:06
4
\$\begingroup\$

This is the truth table from the DM9368 data sheet, which should confirm the correct decoding.

enter image description here

\$\endgroup\$
5
  • \$\begingroup\$ Well I don't know what all these mean if you could help me a little bit. \$\endgroup\$
    – P_M
    Mar 19, 2020 at 12:15
  • \$\begingroup\$ It shows which segments are switched on for a character. e.g. 1: segment b and c are switched on. \$\endgroup\$
    – Mike
    Mar 19, 2020 at 12:17
  • \$\begingroup\$ Oh okay, I didn't noticed that L means low and H means high. I know these I made the truth table and used 1's and 0's and got my equations but how do I implement them. \$\endgroup\$
    – P_M
    Mar 19, 2020 at 12:35
  • \$\begingroup\$ @PeterMurr your question is unclear about what you want to implement them in. You could use anything from individual gates, programmable array logic, a microcontroller or many other things. \$\endgroup\$
    – jonathanjo
    Mar 19, 2020 at 12:56
  • 1
    \$\begingroup\$ Of course, you could just use a DM9368! \$\endgroup\$
    – user131342
    Mar 19, 2020 at 13:00
2
\$\begingroup\$

Your inputs are as follows:

A B D C are A3 A2 A1 A0
0000 will show 0
0001 will show 1
1001 will show 9

See the second half of the answer by @jonatanjo

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.