Electronics and Electrical Engineering Design Forum

Where you can find electronics and electrical engineering forum questions & answers.
no image Thursday, January 18, 2018 by Ofer Sharabi

dual output - 3 input - without microcontroller

Hello ,

I am new here and I need a help to find a solution to a circuit that I need to design.

I want to solve this issue without a microcontroller.

I have 3 push buttons that need make the logic table (PB- push button):




















I Have find out that encoder 8 to3 will do the logic table  - but I need a solution to latch the input for the encoder.

Any other solution will help .

Thanks in advanced


  • by  Elizabeth Simon

    If I understand right, you want the outputs to change when the button is pressed and then stay the same until the next button press.

    So to latch the buttons, you could use a D flip-flop (D-FF) for each. Then the problem is how to generate a clock for the D-FFs. One way would be an OR gate with inputs to all the buttons and output to the clock pins on the D-FFs.

    This should work except that you may have problems with switch bounce (see this article)

    I hope my explanation is good enough. Unfortunately it's difficult without pictures.

  • by  Ofer Sharabi (edited)
    Thanks for your response.

    The project is simple:

    3 push - buttons that each press on one of them will change the output as in the table above.

    to solve the bounce is easy - there are ic's that solve this issue.

    and the use of D-FF is also good idea - to connect the push button after the bounce ic's to the clock of the D-FF.

    But - need to think how also to reset it before it will get the clock edge of the push button.

  • by  Aubrey Kagan (edited)

    It is not clear exactly what you are trying to do. Instead of latching the inputs, perhaps it is better to latch the encoded output. If you use something like the CD4532 it has an output signal GS that goes true whenever there is an active input. You could use it to clock a set of D type flip-flops to store the encoded output. 

    With switches there is also contact bounce- if this is of consequence, you can debounce by using the GS to clock a monostable with a period longer than the bounce time, and use the trailing edge to clock your output register. 

    If you have to latch the inputs then simply feed the input signal to the clock of a D type FF (with the D input tied high)- you then have to figure out how and when to clear it, but that is true for the suggestion I made above. 

    As an aside, and perhaps you already know this, all the unused inputs to the 4532 (and all CMOS devices) should be tied low, and the used inputs should have a pull up resistor if they go directly to the switch. Protection of the inputs is a whole different ball of wax, if this is going into production. 

    This design actually takes me back 42 years, so there may be more recent devices... 

  • by  Rick Curl

    Hi Ofer-

    You can do it with CMOS logic, among a zillion other ways to accomplish the same task. I sketched up a simple solution HERE

    Note that while it will do what you ask, it will power up in an uncertain state. Once you press a button it will go to a known state. This is simple to fix with a power-on reset circuit. 

    I hope I passed the test.


Add Comment

You must log-in to comment.