Knowledge Base
...
Basics: Working With Hardware
LED - Light Emitting Diode

Dual Color LEDs

4min

Lead In

Multi-color LEDs look similar to the single-color type, apart from the 3 or more pins instead of the two. They are ideal for use as indicators if, for example, the system needs to indicate a change of state.

Changing the Color

The dual-color LED is illuminated in the same way as a regular LED. Power is applied to the anode with the anode connected to GND or 0Vdc. A current limiting resister would be required as described in Powering an LED๏ปฟ, with the exception that two resistors would be needed. one for each LED.

Dual Color LED
Dual Color LED
๏ปฟ

Code Sample

The following code sample illustrates how a dual-color LED can be implemented.

Device: PIC16F1827 | 1847

Development Board: Radix Nano 18

C
๏ปฟ

Other Options - RGB

The RGB LED can be used to produce different colors and is similar in principle to the LED screen. Depending on the intensity of the various base colors, different colors can be produced.

RGB LED
RGB LED
๏ปฟ

Lead Out

Multi-color LEDs are an interesting way to implement different colors using a few LEDs. With intuitive programming, they can be used effectively in a system application.