Seven segment display (CC) interfacing using 8051 Micro-Controller
SOFTWARE: KEIL MICRO VISION 4
SIMULATOR: PROTEUS 8.0
CIRCUIT DIAGRAM:
CIRCUIT WORKING:
I have used seven segment common cathode(CC) display.Display is connected to 8051 through port 1.Common segment of the display is connected to GND. It is common cathode (CC) display so in order to activate segment I have provided logic 1 to respective segment (as mentioned in the table).I have connected common segment of the dispaly to GND.
void delay(int t);
int a[10]={0xfc,0x60,0xda,0xf2,0x26,0xb6,0xbe,0xe0,0xff,0xf6};
/*7 segment CC data*/
int i;
void main()
{
while(1)
{
for(i=0;i<10;i++)
{
P1=a[i]; // provide data to display delay(5);
}
}
}
}
void delay(int t) // delay function
{
int i;
for(i=0;i<t*1275;i++);
}
Comments
Post a Comment