Professional Documents
Culture Documents
7 Segment Display
7 Segment Display
SEVEN-SEGMENT DISPLAY
Seven-segment
Used
Displays
0 thru 9
Each
a through g
Two
types
Common anode
Common cathode
SEVEN-SEGMENT DISPLAY
Common Anode
Common Anode
SEVEN-SEGMENT DISPLAY
Common Cathode
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];
}
}