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

Circuit transmits ARINC 429 data
ATMEL 89 Series Flash Microcontroller
Motorcycle 13.6V 3A charger
Simple Spectrum Analyzer Adaptor For Scopes Circuit
random generator
Dynamic Mic Preamplifier Circuit
Long Delay Timer Circuit
On-off Infrared Remote Control
technical information for leds
100W + 100W power amplifier



Top