Background Theory
LED stands for "light emitting diode" a semiconductor device that converts electricity into light or it emits visible light when electric current is passes over it. A LED can be constructed using a PN junction diode where a P type semiconductor material is sandwitched with a N type semiconductor material which will emit light when energy is applied on it. This phenomenon is generally called electroluminance, which can be defined as the emission of light from a semi conductor under the influence of an electric field.
The charge carriers recombine in a forward P-N junction as the
electrons cross from the N-region and recombine with the holes existing
in the P-region. Free electrons are in the conduction band of energy levels, while holes are in the valence energy band.
Thus the energy level of the holes will be lesser than the energy
levels of the electrons. Some part of the energy must be dissipated in
order to recombine the electrons and the holes. This energy is emitted
in the form of heat and light.
Interfacing With AT89C51/C52/S51/S52
#include<AT89x51.h>
#define LED P1_1
void milli_delay(unsigned int t);
void main( )
{
LED=1;
milli_delay(100);
LED=0;
milli_delay(100);
}
void milli_delay(unsigned int t)
{
int x,y;
for(x=t;x>0;x--)
for(y=1275;y>0;y--);
}
No comments:
Post a Comment