LIGHT EMITTING DIODE Interfacing tutorial

Posted by Unknown on Monday, August 26, 2013 with No comments


        Light Emitting Diodes (LED) is the most commonly used electronic components, generally for display digital states. Typical uses of LED's include alarm devices, timers and confirmation of user input such as a mouse click or keystroke, events etc. LED's are very cheap and easily available in a variety of shape, size and colors.

        89C51, which belongs to the family of 8051 series of micro-controllers  is very commonly used by a large community of hobbyist and engineers. Its simplicity and ease of programming with inbuilt features easily makes its position in the top preferred list of micro-controller for both beginners and advanced user.
To connect a led refer the methods of connection here

        You can use 10-15 mA as a safe LED current which will provide decent light intensity and conserve battery power. Determine the Series resistor using Ohms law with an excess voltage value and current value for LED. Red LED's generally need 1.5V to 1.9V to light any extra voltage must be dropped with a series resistor else the LED will draw extra current in an attempt to lower the supply voltage down to the 1.5V level. The typical supply voltage source for micro-controller is 5V.

Then, 5 - 1.7 = 3.3V of excess voltage.
Let’s design the LED to use 10mA
Ohms law Resistance R = V / I
3.3 / 10mA = 330 Ohms, Place a 330 ohm resistor in series with the LED.

Circuit Diagram




Software Tools

1.      RIDE Compiler                (Evaluation version)
2.      WINISP Downloader      (Free version )

Program

//http://embedmastery.blogspot.in/

#include

sbit led=P1^1; //declaration

void delay();

void main()
{
   led=0;         //led connected in the port P1.1 made to off
   delay();
   led=1;         //led connected in the port P1.1 made to on
   delay();
}

void delay()
{
   int i=0;
   for(i=0;i<50000;i++);
}


wait for next post...

Mob    :       +91-9790766717
                   +91-9500087478
Web    :       www.masterychip.com
Mail     :       projects@masterychip.com