1
\$\begingroup\$

Imagine we have one green LED, one blue LED, power supply and resistors and grounds. We also have a switch.

Can we toggle between the two different LEDs when the switch is pushed? If the blue LED is ON and we push the switch, the green LED is ON and blue is now OFF.

The same situation when the green LED is ON, if we push the switch, the green turns OFF and the blue turns ON.

Is it possible?

\$\endgroup\$
2
  • 1
    \$\begingroup\$ Did you try connecting them to each of the outputs? \$\endgroup\$ Oct 23, 2014 at 16:16
  • 1
    \$\begingroup\$ Usually, any flip-flop has two outputs. Q and Q-NOT. They are already inverted (one is on, one is off, based on the state of the FF). However if you don't have that at hand, just invert the output with a NOT gate \$\endgroup\$
    – Alzurana
    Oct 23, 2014 at 16:25

2 Answers 2

4
\$\begingroup\$

You can do something like this assuming your flip-flop can source and sink the currents required by the LEDs and VCC is the same than the flip-flop.

You may also have to adjust the resistor values.

schematic

simulate this circuit – Schematic created using CircuitLab

This way whenever the flip-flop output goes high, the green LED turns on leaving the blue LED cathode at roughly the same potential than its anode and when the output goes low the situation is reversed.

\$\endgroup\$
1
\$\begingroup\$

Here are two options.

Option 1 uses both outputs (Q and Not Q) to drive N-channel FETs. The FETs, of course, must be logic level.

Option 2 works if you only want to use one of the two outputs. For this option to work, the flip-flop must be powered by the same voltage as the LEDs so that the P-channel FET can be properly turned on and off.

schematic

simulate this circuit – Schematic created using CircuitLab

Edit: If the flip-flop chip can source and sink the necessary current for the LEDs, Bruno Ferreira's answer is simpler. You would use these options if you need more current.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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