Flip flop question

Discussion in 'General Electronics Chat' started by jaygatsby, Jan 3, 2012.

  1. jaygatsby

    Thread Starter New Member

    Nov 23, 2011
    185
    23
    I want a flip flop to trigger between 1 and 0 each time it receives a 5V pulse (from a button pushed on a keypad.) Otherwise I want it to stay in its current state, even when the keypad is disconnected and the input floats. I was thinking of using a flipflop, with the input tied via a pull up/down (depending on state) resistor to its output. What sort of flip flop is best for this application?

    Thank you
     
  2. w2aew

    Member

    Jan 3, 2012
    219
    64
    A JK Flip Flop will work, with both the J and K inputs tied high. The output will toggle on the rising clock edge.
     
    jaygatsby likes this.
  3. praondevou

    AAC Fanatic!

    Jul 9, 2011
    2,936
    488
    The 4013 will do it too. Connect /Q to the data input, SET and RESET to GND and the CLOCK input to your input signal.
    Also put a pull-down resistor to the Clock input to be able to disconnect the input.
     
  4. crutschow

    Expert

    Mar 14, 2008
    13,023
    3,236
    As noted by praondevou, a D-FF will also work if you tie the D input to the /Q output. Make sure all the unused inputs are tied to Vcc or gnd as appropriate.

    You will need to add a debounce circuit to the button output (if it doesn't already have one) to avoid multiple triggers.
     
  5. sheldons

    Active Member

    Oct 26, 2011
    616
    101
    heres some info-look at the way the gates are wired in this circuit here,
     
    jaygatsby likes this.
  6. sheldons

    Active Member

    Oct 26, 2011
    616
    101
    additional info........
     
  7. Wendy

    Moderator

    Mar 24, 2008
    20,766
    2,536
    The key is the difference between nonvolatile and volatile memory. The vast majority of flip flops are volatile, disconnect power and reconnect they have lost the information. This true of computers too.

    SD cards, hard drives, and thumb drives are nonvolatile. They do not require power to hang on to their information. They are also not flip flops either.

    What you probably want is a battery backup, just like the one for an alarm clock, to keep the state active when the power supply is off. Since a CMOS gate (like the 4013) draws nanoamps a simple battery arrangement could last for years.
     
  8. jaygatsby

    Thread Starter New Member

    Nov 23, 2011
    185
    23
    Power will be applied to the device -- just the keypad unit will be unplugged from the main unit. So I want the information the keypad has told the main unit to remain 'in memory', and I think I can do this using the techniques above.

    Thanks
     
Loading...