Designing a logic circuit. Please help..

Discussion in 'Homework Help' started by Bhavzp16, Feb 1, 2015.

  1. Bhavzp16

    Thread Starter New Member

    Feb 1, 2015
    4
    0
    Design a circuit that will light the same number of LEDs as there are active switches. You will utilize three switches as input. The LEDs should be lit as a bar-magnitude display. The output pattern should look as follows: Active Input switch count LED bar-magnitude display (vertical) no switches active 0 - 0 - 0 any 1 switch active 1 - 0 - 0 any 2 switches active 1 - 1 - 0 all 3 switches active 1 - 1 – 1

    upload_2015-2-1_17-51-59.png

    I am not really sure about the circuit.
     
  2. WBahn

    Moderator

    Mar 31, 2012
    17,757
    4,800
    Your ...-59.png image doesn't display. The ...-4.png is just an OR gate.

    You need to show YOUR best attempt to answer YOUR homework.

    How about making a truth table of what you want? You have three switches and three LEDs. So you have eight possible input conditions. Which LEDs should be ON and OFF for each combination?
     
  3. Bhavzp16

    Thread Starter New Member

    Feb 1, 2015
    4
    0
    Hey WBahn,

    Thanks for replying.
    Any 1 switch is active one LED should turn on thats what I was thinking that its going to be an OR gate. Because the truth table gives when one 1 one LED is on and when two switches are active two LEDs are on so when all the three switches are active all three LED should come on. Truth table gives an OR gate combinations but doesnt work exactly like the question when you desing it.
    Any suggestion, would be really appreciated.

    Bhavin
     
  4. absf

    Senior Member

    Dec 29, 2010
    1,493
    372
    Dont you know how to make a truth table for your problem like this?

    T1.PNG

    Allen
     
  5. Bhavzp16

    Thread Starter New Member

    Feb 1, 2015
    4
    0
    Yes I know how to make that and I knw when one switch is on LED1 will come on, LED will only come on when two switches are on and LED will come on only when all the three switches are on.
    Bu still I am unsure about the circuit.
     
  6. ScottWang

    Moderator

    Aug 23, 2012
    4,855
    767
    I simplify your circuit, that was the same with yours, when you completed the truth table then go back to check the circuit.

    Designing a logic circuit_Bhavzp16-01.gif
     
    absf likes this.
  7. Bhavzp16

    Thread Starter New Member

    Feb 1, 2015
    4
    0
    Hey ScottWang,
    Thank you so much buddy I really appreciate your kind help.

    Bhavin
     
  8. WBahn

    Moderator

    Mar 31, 2012
    17,757
    4,800
    I already gave you a suggestion. Put together a truth table that has three inputs (the three switches) and that has three outputs (for the three LEDs). For each row, indicate which LEDs should be ON or OFF. I'm not going to do it for you.

    You want to learn to take a systematic approach to logic design. The method you are trying to use is to hope for "a happening" -- namely you throw together something based on some thoughts and guess and hope that it "happens" to do what you want.
     
  9. WBahn

    Moderator

    Mar 31, 2012
    17,757
    4,800
    If you know how to make that, then make that.

    Don't just announce that you know how to do it and then ask for people to show you what to do. Demonstrate that you can get that much correctly and then, after verifying that you actually have gotten that far correctly, we have a basis from which to go further.
     
  10. WBahn

    Moderator

    Mar 31, 2012
    17,757
    4,800
    So what is this circuit supposed to do? Two switches will short the power supply and the other switch will ground one of the signals that otherwise would be floating.
     
  11. ScottWang

    Moderator

    Aug 23, 2012
    4,855
    767
    You should ask the TS, not me.
     
  12. WBahn

    Moderator

    Mar 31, 2012
    17,757
    4,800
    Ah, okay. I thought that was your circuit (the original post wouldn't display his embedded image at first).
     
  13. ScottWang

    Moderator

    Aug 23, 2012
    4,855
    767
    I saw you said that you can't see the image, but when I get into this thread, everything seems normal, and I didn't see the TS reedit, and I also mentioned that my circuit is the same with TS, because I saw the wiring of circuit were mixed too much and it's hard to see, so I just rewiring the wires.
     
  14. MrChips

    Moderator

    Oct 2, 2009
    12,447
    3,362
    Note that switch S1 is wired incorrectly. If the row of switches are SPST then closing a switch will create a short between Vcc and GND.
    SPST switches used as logic inputs are commonly wired by shorting digital inputs to ground. Inputs would normally be logic-high with 1k-3.3kΩ pullup resistors to Vcc when the switch is in the open position.
     
  15. WBahn

    Moderator

    Mar 31, 2012
    17,757
    4,800
    I was confused by what you meant since I didn't have sufficient context (and had forgotten that there was an image in the first post that I hadn't been able to see). All it well.
     
Loading...