How to create this output?

Discussion in 'Digital Circuit Design' started by rocafellachild, Sep 2, 2016.

  1. rocafellachild

    Thread Starter New Member

    Sep 2, 2016
    2
    0
    Hello

    I have a basic knowledge of gates and flipflops and have come across this problem.
    I have Input 1 and Input 2 going into a circuit made up of simple logic parts(gates, transistors, flip flops) but no microcontrollers. I have one output. (see picture)
    upload_2016-9-2_14-35-6.png
    I want the output to be high when (Input1=1 and the rising edge of Input2). I want the output to be low when (Input2=0 and the falling edge of Input1).

    I've been trying to figure out a combination of logic to see if I can get this output but I think I'm stuck. Can someone suggest an approach on how to solve a problem like this?
     
  2. AlbertHall

    Well-Known Member

    Jun 4, 2014
    1,896
    375
    For the particular inputs you show this circuit will do the job. Is IN2 being high guaranteed to be only while IN1 is high?
    upload_2016-9-2_23-15-12.png
     
  3. dannyf

    Well-Known Member

    Sep 13, 2015
    1,775
    360
    IN2 sets the output and IN1 resets the output.
     
  4. rocafellachild

    Thread Starter New Member

    Sep 2, 2016
    2
    0
    I don't think a simple S-R flip flop will work because:
    1. I have a case where both the S and R are high at the same time
    2. I need the reset to occur on the falling edge.
     
  5. k7elp60

    Senior Member

    Nov 4, 2008
    478
    69
    Use two 2 input nand gates
     
  6. AnalogKid

    Distinguished Member

    Aug 1, 2013
    4,518
    1,247
    For a NOR gate S-R flipflop, a positive level changes state. Use an extra NOR gate as an inverter for IN1 before the ff. Take the output from the ff with inverted IN1 as its input.

    ak
     
  7. ScottWang

    Moderator

    Aug 23, 2012
    4,853
    767
    You didn't mention the frequency of inputs signals and the working voltage, the output load V/I?

    Vin2TrigOuputVin1ResetOuput_ScottWang.gif
     
  8. AnalogKid

    Distinguished Member

    Aug 1, 2013
    4,518
    1,247
    Scott, there is no need for C2 or R5. Q1 collector can tie directly to the reset input. According to post #1, it is ok for the circuit to be sitting in Reset between events. Also no need for R2 because the input is driven in both directions.

    ak
     
  9. ScottWang

    Moderator

    Aug 23, 2012
    4,853
    767
    Thanks Ak.
    I have had thought about that, but I'm not sure, because I just want to avoid the S/R have any chance to conflict, and I just found that I missed the waveform for /Vin1, when I redraw the waveform then it's quite clear, S/R have no chance to conflict.

    I have had also thought about that, but I will keep it until the condition more clear.

    Vin2TrigOuputVin1ResetOuput-02_ScottWang.gif
     
  10. AlbertHall

    Well-Known Member

    Jun 4, 2014
    1,896
    375
    This gives the wrong output for the given waveforms when IN1 has gone low but IN2 is still high. The output for will be a copy of IN1.
     
  11. AnalogKid

    Distinguished Member

    Aug 1, 2013
    4,518
    1,247
    According to post #1, that condition cannot occur.

    ak
     
  12. AnalogKid

    Distinguished Member

    Aug 1, 2013
    4,518
    1,247
    What you end up with is an inverter in front of a positive-logic S-R ff, just like post #6.

    ak
     
  13. AlbertHall

    Well-Known Member

    Jun 4, 2014
    1,896
    375
    Correction:
    I wrote IN1 and IN2 the wrong way round - but the two nand gate circuit still doesn't work.
    This gives the wrong output for the given waveforms when IN2 has gone low but IN1 is still high. The output for will be a copy of IN2.
     
  14. AnalogKid

    Distinguished Member

    Aug 1, 2013
    4,518
    1,247
    Yes, post #5 clearly is wrong. There is no linear gating solution.

    ak
     
  15. hp1729

    Well-Known Member

    Nov 23, 2015
    1,946
    219
    View attachment 111494
     
  16. eetech00

    Active Member

    Jun 8, 2013
    648
    110
    Hi

    I think this will work.
    Voltages used in the simulation are 1,0v logic levels but should work for other levels.
     
  17. AlbertHall

    Well-Known Member

    Jun 4, 2014
    1,896
    375
    But it is way more complicated than is necessary. The version in post #2 works, except that I got IN1 and IN2 swapped :oops:
     
Loading...