Electronic Design

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

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.

Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish