WAP Program to blink an LED


Program to blink an LED

Description:    (LED) Light Emitting diode is an important output device for visual indication in any embedded system.

LED can be used as an indicator for the stages of various signals or situations.
LED is a p-n junction diode and it contains an anode and a cathode. For proper functioning of the LED  the anode should be connected to the positive terminal and cathode to the negative terminal of supply voltage.


Current flowing through the LED must be limited to a value below the maximum current that it can conduct, a resistor is used for this purpose.

The circuit consists of 8 LEDs connected to Port 1 of the AT89551.

The Algorithm is as follows
1.    Set Port 1 to ON all led’s.
2.    Delay(50).
3.    Set Port 1 to OFF of all led’s.
4.    Delay(50);
5.    Repeat Step 1.
During the execution the LED’s are supposed to blink ON and OFF alternatively.




Comments