Knowledge Base
...
Applied PIC Micro Development
Basics: Working With Hardware

LED - Light Emitting Diode

5min

Lead In

The LED or Light Emitting Diode is a device that performs two functions. The first is that it acts as a 1-way electronic "valve" in the sense that power can only flow in one direction and it will inhibit the flow in the opposite direction. In the course of doing this, the LED will emit light.

LEDs are low-power devices, however, and don't work well as rectifier diodes. They are however excellent devices for display purposes, and building different types of displays. These types of displays range in complexity from a single LED used as an indicator and build out into 7 Segment displays, scrolling displays, and so on.

LED Basics

Identifying the Component

The standard LED is available in a plastic 2-PIN package, 3mm, 5mm, or 7mm. The device is polarised so one side is positive and the other negative. These ends are known as the anode and the cathode. When used in-circuit, the anode would be connected to the positive or V+ and the -Ve to ground or 0 volts.

Dimensions and Engineering Considerations

An example of a 3MM is shown below with its relevant dimensional information. These details are useful during project planning if for example you have to install an array of LEDs or are designing a PCB where a collection of LEDs is in place.

Document image
๏ปฟ

Integrating the Microcontroller

Integrating the Microcontroller is a simple connection between the positive and the ground, and once that connection is made, the software can be used to power the LED. To do that the output is driven, and that provides the LED with the power it requires.

The output of a microcontroller can only supply a maximum of 20mA, so the 10mA that has been supplied is sufficient to illuminate the LED.

Lead Out

The next step is the code, and once flashed to the device you have a functioning "Hello World" project.

For details on the Hello World project, see the following: "Hello World"๏ปฟ๏ปฟ