Single-port pin drives dual LED

Posted on Jan 28, 2013

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



Popular Circuits

7400 Siren
Heater temperature controller
Digital Miscellaneous Temperature Gauge
Scientific Society
USB to serial converter circuit
Temperature Controller with 555 Circuit
Resurrecting Tennis for Two a video game from 1958
Yaesu G-400 Antenna Rotator Controller
Full-band phase locked loop circuit diagram fast