This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

SN74LVC1G74 positive edge triggering problem

Other Parts Discussed in Thread: SN74LVC1G74

I'm trying to use the SN74LVC1G74 to toggle a signal on/off by pushing a button. The button is connected to the CLK input. CLK in normally pulled low (100k) and is pulled high by the button. The nQ output is backlooped through a 10k resistor to the D input. My intention is to be able to toggle the flip-flop on only the positive flank from the button. My problem is that the flip-flop toggles on both positive and megative flank (both when button is pressed and released). I want only one toggle every time the button is pressed.

/Per-Ola

  • Please, any advice in this matter is welcome. According to the datasheet the SN74LVC1G74 is only clocked on positive edge. It seems like my setup is triggering both on positive and negative edge. I interprete the datasheet like a positive edge means change from 0.3xVcc to 0.7xVcc? (Vcc=5V)

    Any ideas of why I have this behaviour?

    /Per-Ola

  • This is usually caused by a slow or noisy edge. The max edge rate at 5V is 5ns per volt. The switching point is usually about 50% VCC, if there is any noise in this regoin then this could also cause a switch.

  • Per-Ola,

    You've probably figured this out by now, but just in case you have not, maybe this will help.

    I think you are fighting switch contact bounce.  Mechanical switches are notorious for this!  When the switch closes, the contacts hit, bounce apart, hit again, bounce apart again, ...  This can happen many times per switch closure.  Similarly, when the switch opens, just prior to opening the mechanical contacts are sliding across each other with very little pressure.  They bounce along just like a tin can tied behind a newlyweds' car.  :-)  The flipflop is fast enough to see all these bounces and dutifully triggers on each one.

    If you can use an SPDT (single pole double throw) switch I have found it works well to eliminate the effects of contact bounce.  Connect the NC terminal low, the NO terminal high, and the armature to the clock input.  Don't put a pull up or pull down on the armature.  Now when the switch is pushed and the armature makes contact with the high terminal the clock input will be pulled high.  When the siwtch bounces open there is nothing to pull the pin low (except leakage current) so the pin stays high until the bouncing is finished.  When the button is released nothign happens until the armature hits the NC terminal, at wich point it gets pulled low.  Again, it stays low because there is nothing to pull the clock pin high.  This works because the contacts of an SPDT switch still bounce, but they do not bounce far enough to be bouncing between the NC and NO terminals.  They bounce between one of those terminals and open.

    Regards,

    Steve