5. WHAT IS AN LED?
• An led is a pn junction opto-semiconductor that emits a monochromatic(single color)
light when operated in a forward biased junction.
• Instead of a filament they use a semiconductor diode which emits narrow-spectrum light.
• Depending on the composition & condition of the semiconducting material used
(Silicone, germanium), they come in either Infrared for sensing heat, Visible for every
day use, or Near-Ultraviolet for spotting stains at a crime-scene.
• An LED consists of a chip of semiconducting material that has been “doped” with
impurities in order to create a p-n junction.
• A p-n junction is basically a junction between an anode and a cathode.
• Current flows easily from the p-side to the n-side, but never in the reverse order.
• The wavelength and color of the LED depends on the band-gap energy of the materials
forming the p-n junction
8. LED CHARACTERISTICS
• Forward bias of approximately 1 volt is needed to give significant forward
current.
• The commercially used LED’s have a typical voltage drop between 1.5 Volt
to 2.5 Volt or current between 10 to 50 milliamperes.
• Series resistance is determined by the following equation.
• Rseries = (Vsupply – V)/I
• Vsupply – Supply Voltage
• V – LED forward bias voltage
10. WHAT IS A SEVEN SEGMENT DISPLAY?
• A Seven-Segment Display (SSD) is simply a figure eight grouping of
LEDs [some include a decimal point (DP)].
• Each Segment is labeled (a) through (g).
• SSDs are available in two configurations
• Common Cathode (all LED cathodes are connected)
• Common Anode (all LED anodes are connected)
14. LED INTERFACING WITH AVR
• Leds require around 50mA,so we usually require a current-limiting
resistor.
• The resistance of the resistor is calculated using the well known
formula V=IR.
18. C PROGRAM
#include <avr/io.h>
#include <util/delay.h>
Int main()
{
DDRX = 0xFF ; // x can be A,B,C or D
while(1) {
PORTA = 0b00110000; // display number 1
_delay_ms(1000); // delay 1 sec
19. PORTA = 0b01011011; // display number 2
_delay_ms(1000);
PORTA = 0b01001111; // display number 3
_delay_ms(1000);
PORTA = 0b01100110; // display number 4
_delay_ms(1000);
20. PORTA = 0b01110111; // Display letter A
_delay_ms(1000);
PORTA = 0b00111001; // display letter C
_delay_ms(1000);
PORTA = 0b01111001; // display letter E
_delay_ms(1000);
PORTA = 0b01110001; // display letter F
_delay_ms(1000);