Single-Pin MCU Gets Three Colors From Two-Color LED

July 7, 2003
There's a need in many applications to indicate more than two states from a single LED. One obvious solution is to employ an LED with more than two colors. But such LEDs require more than one control pin to produce these colors. The simple...

There's a need in many applications to indicate more than two states from a single LED. One obvious solution is to employ an LED with more than two colors. But such LEDs require more than one control pin to produce these colors.

The simple circuit shown in the figure can be used to obtain three colors from a dual color (red, green) LED. Moreover, it only uses a single pin from a microcontroller (MCU) or any other programmable device. The circuit's operation can be explained as follows: When the control pin goes High, the LED glows red. When the pin goes Low, the LED glows green. The trick to getting the third color is by programming the control pin to have a clock frequency of around 1 kHz. This causes the LED to alternately change its state from red to green, effectively producing an orange color.

Sponsored Recommendations

Comments

To join the conversation, and become an exclusive member of Electronic Design, create an account today!