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

PC Printer Port Controls I-V Curve Tracer
Nicad/NiMH Charger
12v to +5V, -12V, +12V, +24V adaptor
Rf-power-switch
MAKING YOUR OWN REGULATED POWER SUPPLY
inverter circuit diagram
voltmeter ammeter pic
FET Preamplifier
Power Design
Thyristor AC automatic voltage regulator circuit diagram



Top