Tuesday 24 November 2015

HOW TO INTERFACE 7-SEG COMMON ANODE USING 8051 MICROCONTROLLER


The seven segment display(anode) is simply contains a grouping of LED. That all LED anodes are connected and it contains totally 9-pins (a,b,c,d,e,f,g,h,Vdd) that 8-pins for micro controller and 9th Pin for +5v supply) . if we interfacing seven segment anode, we should provide the input as "LOW" to 8-pins(a,b,c,d,e,f,g,h) from micro controller.

Circuit connection





Program coding

#include<reg51.h>
void delay(unsigned int i);
void main()
{
unsigned char a[16]={0xc0,0xf9,0xa4,0xb0,0x99,0x92,0x82,0xf8,0x80,0x90,0x88,0x83,0xc6,0xa1,0x86,0x8e};
unsigned int i;
for(i=0;i<16;i++)
{
P0=a[i];
delay(65000);
}
}
void delay(unsigned int i)
{
while(i--);
}

To get seven segment using project, click below link...

Seven segment display(Common anode)



No comments:

Post a Comment