Simple Transistor Question

ledtransistors

This is a relatively simple, dumb transistor question, but for some reason I can't seem to figure out how I would go about this. I've been Googling transistor flip flops, but haven't quite gotten it the way I want it yet and would like to see what you all think.

I'm trying to save pins on an MCU and I need to alternate between two LEDs to indicate the status of the program. So I thought about doing it like this:

  • Each LED is hooked up to a transistor.
  • When the pin of the MCU outputs high, one of the LEDs will turn on, the other remain off.
  • When that pin of the MCU outputs low, the original LED will turn off, then the other LED turns on.

Essentially it's a flip flop circuit. I'm looking for it to be as simple as possible with the smallest component count\cost.

Thoughts? Thanks in advance!

Best Answer

This circuit will do what you want:

schematic

simulate this circuit – Schematic created using CircuitLab

If you drive the output high D4 will be on, drive the output low and D3 will be on.

If you need more current than the MCU output can deliver, add a single gate buffer, which can drive up into the tens of mA.