You are on page 1of 15

7-SEGMENT LED DISPLAY

An LED or Light Emitting Diode, is a solid state


optical PN-junction diode which emits light energy in the
form of photons

At forward bias condition, voltage flowing across its


junction is called electroluminescence.

SEVEN-SEGMENT DISPLAY
Seven-segment
Used

Displays

to display BCD digits

0 thru 9

group of 7 LEDs physically


mounted in the shape of the
number eight

Plus a decimal point

Each

LED is called a segment

a through g

Two

types

Common anode
Common cathode

SEVEN-SEGMENT DISPLAY

Common Anode

All anodes are connected together to a power supply


Cathodes are connected to data lines

Logic 0 turns on a segment


Example: To display the digit 1

All segments except b and c should be of


11111001 = F9H

Common Anode

SEVEN-SEGMENT DISPLAY

Common Cathode

All cathodes are connected together to ground


Anodes are connected to data lines

Logic 1 turns on a segment


Example: To display digit 1

All segments except b and c should be of


00000110 = 06H

INTERFACING 7-SEGMENT LED


DISPLAY

INTERFACING HEX - CODES


0XC0
0XCF
0XA4
0XB0
0X9B
0X92
0X82
0XF8
0X80
0X90

PROGRAM : 1
7- SEGMENT INTERFACING (0 - 9)
#include<pic.h>
main()
{
int i;
char
a[]={0XC0,0XCF,0XA4,0XB0,0X9B,0X92,0X82,0XF8,0X80,0X90};
TRISB=0X00;
for(i=0;i<10;i++)
{
PORTB=a[i];
}
}

INTERFACING 7- SEGMENT LED: PROTEUS (0


9)

INTERFACING 7- SEGMENT LED: PROTEUS


( 0 99)

You might also like