Led part-2
-
Upload
techvilla -
Category
Engineering
-
view
223 -
download
1
Transcript of Led part-2
1
TECHVILLA
www.techvilla.org.in
OUTPUT DEVICES INTERFACING Hardware information. Different compiler information. PRACTICAL1 : LED interfacing. PRACTICAL2: SSD interfacing. PROJECT: microcontroller based led pattern generation
www.techvilla.org.in
HARDWARE INFORMATION
LEDs Seven segment displays.
www.techvilla.org.in
LIGHT EMITTING DIODE
www.techvilla.org.in
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
www.techvilla.org.in
WORKING PRINCIPLE
www.techvilla.org.in
LED CHARACTERISTICS
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
www.techvilla.org.in
SEVEN SEGMENT DISPLAYS
www.techvilla.org.in
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)
www.techvilla.org.in
TYPES OF SSD
www.techvilla.org.in
SEVEN SEGMENT DISPLAY CODES
www.techvilla.org.in
SEVEN SEGMENT DISPLAY CODES
www.techvilla.org.in
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.
www.techvilla.org.in
ATMEGA16 INTERFACING WITH LEDS
www.techvilla.org.in
C PROGRAMMING#include <avr/io.h>#include <util/delay.h>Int main(){ DDRX = 0xFF; // x – can be PORTA/B/C/D while(1) { PORTX = 0xff; } return 0;}
www.techvilla.org.in
SSD INTERFACING WITH AVR
www.techvilla.org.in
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
www.techvilla.org.in
PORTA = 0b01011011; // display number 2_delay_ms(1000);PORTA = 0b01001111; // display number 3_delay_ms(1000); PORTA = 0b01100110; // display number 4_delay_ms(1000);
www.techvilla.org.in
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);
www.techvilla.org.in