ppt on interfacing led and 7 segmentwith 8951

25

Upload: pooja-jaiswal

Post on 02-Jul-2015

260 views

Category:

Engineering


4 download

DESCRIPTION

electronics and communication

TRANSCRIPT

Page 1: Ppt on interfacing led  and 7 segmentwith 8951
Page 2: Ppt on interfacing led  and 7 segmentwith 8951

LED:- An LED or Light Emitting Diode, is a solid state optical PN-junction diode which emits light energy in the form of “photons” when it is forward biased by a voltage allowing current to flow across its junction, and in Electronics we call this process electroluminescence.

Page 3: Ppt on interfacing led  and 7 segmentwith 8951

A light emitting diode (LED) is essentially a PN junction opto-semiconductor that emits a monochromatic (single color) lightwhen operated in a forward biased direction.

LEDs convert electrical energy into light energy. They arefrequently used as "pilot" lights in electronic appliances toindicate whether the circuit is closed or not

The most important part of a light emitting diode (LED) isthe semi-conductor chip located in the center of the bulb as shownat the right. The chip has two regions separated by a junction. Thep region is dominated by positive electric charges, and the nregion is dominated by negative electric charges. The junctionacts as a barrier to the flow of electrons between the p and the nregions. Only when sufficient voltage is applied to the semi-conductor chip, can the current flow, and the electrons cross thejunction into the p region.

Page 4: Ppt on interfacing led  and 7 segmentwith 8951

When sufficient voltage is applied to the chip across the leads ofthe LED, electrons can move easily in only one direction acrossthe junction between the p and n regions.

In the p region there are many more positive thannegative charges.

When a voltage is applied and the current starts to flow,electrons in the n region have sufficient energy to move acrossthe junction into the p region.

Each time an electron recombines with apositive charge, electric potential energy isconverted into electromagnetic energy.

For each recombination of a negativeand a positive charge, a quantum ofelectromagnetic energy is emitted in the formof a photon of light with a frequencycharacteristic of the semi-conductor material(usually a combination of the chemicalelements gallium, arsenic and phosphorus)..

Page 5: Ppt on interfacing led  and 7 segmentwith 8951

Testing LEDs:-

Never connect an LED directly to abattery or power supply! It will bedestroyed almost instantly because toomuch current will pass through andburn it out.

LEDs must have aresistor in series to limit the current to asafe value, for quick testing purposes a1k resistor is suitable for most LEDs ifyour supply voltage is 12V or less.

Page 6: Ppt on interfacing led  and 7 segmentwith 8951

Applications:-

• Sensor Applications

• Mobile Applications

• Sign Applications

• Automative Uses

• LED Signals

• Illuminations

• Indicators

Page 7: Ppt on interfacing led  and 7 segmentwith 8951
Page 8: Ppt on interfacing led  and 7 segmentwith 8951

The circuit mainly consists of AT89C51 microcontroller. AT89C51 belongs to the family of 8051 microcontroller. It is an 8-bit microcontroller. This microcontroller has 4KB of Flash Programmable and Erasable Read Only Memory and 128 bytes of RAM. This can be programmed and erased

maximum 1000times. It has two

16 bit timers/counters. It supports USART communication protocol. It has 40 pins. There are four ports are designated as P0, P1, P2, P3, P4.

Page 9: Ppt on interfacing led  and 7 segmentwith 8951

The Anode is connected through a resistor to GND & the Cathode is connected to the Microcontroller pin. So when the Port Pin is HIGH the LED is OFF & when the Port Pin is LOW the LED is turned ON.

Page 10: Ppt on interfacing led  and 7 segmentwith 8951

In this circuit, LEDs are connected to the port P0. Port P0 will not have internal pull- ups, while the other ports have internal pull-ups. The controller is connected with external crystal oscillator to pin 18 and 19 pins. Crystal pins are connected to the ground through capacitors of 33pf.using an LED you must use a resistor to limit the current flow. If you just connect an LED directly to a pin of the micro controller you run the risk of damaging the micro controller by allowing too much current flow into or out of the pin.

Page 11: Ppt on interfacing led  and 7 segmentwith 8951

Thus, LED is directly connected to the AT89C51 microcontroller. The negative terminal of the LED is connected to the ground through a resistor. Value of this resistor is calculated using the following formula.

, where V is the input voltage.Generally, microcontrollers output a maximum voltage of 5V. Thus the value of resistor calculated for this is 330 Ohms. Thus this can be connected either to the cathode or anode of the LED.

R= (V-1.7)/10mA

Page 12: Ppt on interfacing led  and 7 segmentwith 8951
Page 13: Ppt on interfacing led  and 7 segmentwith 8951
Page 14: Ppt on interfacing led  and 7 segmentwith 8951

Program for 7 Led gloworg 00hclr amov p2,astart: mov a,#0ffhmov p2,amov p2,#01hcall delaymov p2,02hcall delaymov p2,#04hcall delaymov p2,08hcall delaymov p2,#10hcall delaymov p2,#20hcall delaymov p2,#40hcall delay

mov p2,#80hcall delayjmp startdelay: mov r0,#255h1: mov r1,#255h2: djnz r1,h2djnz r0,h1retend

Page 15: Ppt on interfacing led  and 7 segmentwith 8951

LED Interfacing with 8051 Circuit Applications:

LEDs are widely used in many applications like in seven segments.

They are used in dot matrix displays.

They can be used for street lights.

They are used as indicators.

They can be used in traffic lights.

They are used in emergency lights

They can used to make electronic designs.

Page 16: Ppt on interfacing led  and 7 segmentwith 8951
Page 17: Ppt on interfacing led  and 7 segmentwith 8951

7 segment display :- 7 segment display is a 10 pin

electronic component with eight led’s embedded inside it to displays number from 0 to 9 even we can display few characters like A, b, C, H, E, e, F, etc. . It is available in two

configurations: common cathode and common anode.

A seven segment display consists of seven LEDs arranged in the form of a “squarish eight” slightly inclined to the right and a single LED as the dot character. Different characters can be displayed by selectively glowing the required LED segments.

Page 18: Ppt on interfacing led  and 7 segmentwith 8951

Seven segment displays are of two types:-1. Common anode

2. Common Cathode

In Common Anode configuration the pin 3 and 8 are shorted together with Anode of all 8 LED segments and this common pin is connected to positive voltage (VCC).Hence to light up any given segment the corresponding Cathode pin should be connected to ground or reference ,which completes the circuit and LED will be in forward bias.

Page 19: Ppt on interfacing led  and 7 segmentwith 8951

In Common Cathode configuration the pin 3 and 8 are shorted together with Cathode of all 8 LED segments and this common pin is connected to Ground or reference point. Here if you give positive voltage to corresponding LED Anode pin the circuit will be completed and the particular LED will be light up since it will be in forward bias.

Digit Dp g f e d c b a

Hex

valu

e

0 0 0 1 1 1 1 1 1 0x3f

1 0 0 0 0 0 1 1 0 0x06

2 0 1 0 1 1 0 1 1 0x5b

3 0 1 0 0 1 1 1 1 0x4f

4 0 1 1 0 0 1 1 0 0x66

5 0 1 1 0 1 1 0 1 0x6d

6 0 1 1 1 1 1 0 1 0x7d

7 0 0 0 0 0 1 1 1 0x07

8 0 1 1 1 1 1 1 1 0x7f

9 0 1 1 0 0 1 1 1 0x67

Page 20: Ppt on interfacing led  and 7 segmentwith 8951

Interfacing 7 Segment Display to 8051 Circuit

Principle:

Seven segment displays internally consist of 8 LEDs. In these LEDs, 7 LEDs are used to indicate the digits 0 to 9 and single LED is used for indicating decimal point. Generally seven segments are two types, one is common cathode and the other is common anode.

In common cathode, all the cathodes of LEDs are tied together and labeled as com. and the anode are left alone. In common anode, seven segment display all the anodes are tied together and cathodes are left freely. Below figure shows the internal connections of seven segment Display.

Page 21: Ppt on interfacing led  and 7 segmentwith 8951

Interfacing 7 Segment Display to 8051 Circuit Diagram:

Page 22: Ppt on interfacing led  and 7 segmentwith 8951

org 00hclr amov p2,astart: mov p2,#0c0hcall delaymov p2,#0f9hcall delaymov p2,#0a4hcall delaymov p2,0b0hcall delaymov p2,#99hcall delaymov p2,#92hcall delaymov p2,#82hcall delay

mov p2,#0f8hcall delaymovp2,#80hcall delaymovp2,#98hcall delayjmp startdelay: mov r0,#255h1: mov r1,#255h2:mov r3,#255h3:djnz r3,h3djnz r2,h2djnz r1,h1retend

Program for 7 Segment for displayingNumber (0 to 9):-

Page 23: Ppt on interfacing led  and 7 segmentwith 8951

Interfacing 7 Segment Display to 8051 Circuit Design:

Here, common cathode seven segment is used to display the digits. In this circuit, pins a to h of the 7 segment are connected to the PORT 2 of the microcontroller and com pin is connected to the ground through the 330 ohm resistor. This resistor is used to drop the voltage. Since we are using common cathode seven segment we need to send LOGIC 1 to the segments to glow.Figure shows structure of common cathode seven segments. Here dot is used for indicating the decimal point. Here all the cathodes of LED’s are connected to the Gnd pin. The operating voltage of this LED’s is 2 to 3V but from controller we will get 5V so to drop the remaining voltage we have to connect a to g pins to the controller through the resistor.

Page 24: Ppt on interfacing led  and 7 segmentwith 8951

Interfacing 7 Segment Display to 8051 Circuit Applications:

Seven segments are widely used in digital clocks to display the time.

These are used in electronic meters for displaying the numerical information.

Used in Instrument panels

Used in digital readout displays.

Page 25: Ppt on interfacing led  and 7 segmentwith 8951