Single-port pin drives dual LED

Posted on Jan 28, 2013    7902

Figure 1 illustrates one possible approach that uses external inverter IC1 to drive D1, a red/green bidirectional LED. A logic-high output on the port pin forces current through the green (upper) LED and pulls the inverter`s input high, which drives the inverter`s output low and sinks current from the green LED. A logic-low output on the port pin raises the inverter`s output high, delivering current to the red (lower) LED; the microcontroller`s output sinks current from the red LED. To turn off both LEDs, you reconfigure the microcontroller`s port pin from output to input or switch the pin to tristate mode, either of which prevents the microcontroller`s port pin from sourcing or sinking current.

Leave Comment

characters left:

New Circuits