
First, let’s assume that if we use any pin of pic microcontroller as a digital output pin, it can provide +5 volts at the output.
FREE MPLAB XC8 VERIFY CODE INTERNET CONNECTION HOW TO
Last but not the least, this section lists all details on how to interface an LED with a pic microcontroller. But you should select the device according to your brightness requirement. But, there are a small size (1MM) LEDs also available in the market that can operate even at 1mA. The typical forward current is about 10mA. Therefore, we can conclude from the above table that the average forward voltage drop is about 2V. This table shows the forward voltage drop of different color LEDs according to color and size. The forward voltage depends on the color and size of an LED. Note: millicandela is a light intensity unit that is used to measure light brightness. It cannot withstand the current and voltage greater than the peak value.įor example, if we use a RED_LED that has a brightness of 5MCD, it will operate at 10mA current. But every device has a peak forward current and voltage. Greater the forward, the higher will be light intensity.

The intensity of lights that emits from it depends on the forward current. Secondly, we can identify cathode from the flat surface and another one will anode legīefore interfacing LED with Pic microcontroller, we should find its forward current and forward voltage.The longer lead always an anode terminal and shorter one is a cathode.While using an actual LED, we can find cathode and anode terminal in two ways.

Similarly, we connect the negative terminal with the cathode. An anode is a positive terminal and we connect positive terminal of power supply to this terminal. As you can depict from the diagram that it consists of two-terminal such as anode and cathode. This picture shows an electronic symbol and a physical diagram of light-emitting diodes. Traffic lights and Many others LED Terminals.For example, it is used to indicate either power is applied to the circuit or not. We usually use it as an indication signal in embedded systems projects. As its name suggests, it is a light source that emits light when we apply a voltage across its terminal. It consists of two terminals namely anode (+) and a cathode (-). How much does it require to turn it on? What is the forward voltage rating of an LED?

LED Interfacing with PIC Microcontrollerīefore we see how to interface an LED with pic microcontroller, we need to understand some basics of a light-emitting diode such as its current and voltage requirements. Similarly, when we want to sense an external signal such as push-button, switch, digital signals with pic microcontroller, the GPIO pins will be used as a digital output pin. For example when we use keypad interfacing with a microcontroller or we use a switch with a microcontroller we use pins as input.
