3
\$\begingroup\$

I have a signal that goes high at random intervals, and I would like to have each rising edge toggle an output. Something like this:

I've looked into flip-flops, but they all seem more complicated than what I'm looking for (I don't understand why most of them need a clock). Is a flip-flop the appropriate component to achieve these results? If so, which one?

\$\endgroup\$
  • 1
    \$\begingroup\$ hackaweek.com/hacks/?p=344 \$\endgroup\$ – skyler Sep 5 '13 at 3:02
  • \$\begingroup\$ Interesting. I'm hoping to have this toggle millions of times a second–I wonder if having a capacitor charge will slow it down. \$\endgroup\$ – rob Sep 5 '13 at 3:09
  • 1
    \$\begingroup\$ I think the capacitor on the circuit makes it slow down (to accommodate for the bouncing of the switch) so maybe if you remove/lower the value it would work \$\endgroup\$ – skyler Sep 5 '13 at 3:13
  • 1
    \$\begingroup\$ Absolutely, a flip-flop is the thing to use (though as what you need doesn't have to be clocked, some would call it a latch instead of a flip-flop). As to which, D (for Delay), T (for toggle), JK, all will do the job. I don't think you could accomplish the job more simply than with a T latch. \$\endgroup\$ – Scott Seidman Sep 5 '13 at 12:11
4
\$\begingroup\$

A D flip-flop is the (or at least a) solution for this. You would connect your input signal to the flip-flop's clock input, and the ~Q output of the flip-flop back to the D input. There are also T flip-flops that effectively have the ~Q to D connection internally.

If the flip-flop you choose has Set and Clear (or Reset) inputs, they should be connected to whatever level will allow the flip-flop to operate (usually High, I think).

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.