Tuesday 24 November 2015

HOW TO INTERFACE 7-SEG COMMON CATHODE USING 8051 MICROCONTROLLER


The seven segment display(anode) is simply contains a grouping of LED. That all LED cathode 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 "HIGH" 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]={0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f,0x77,0x7C,0x39,0x5e,0x79,0x71};
      unsigned int i;
      for(i=0;i<16;i++)
      {
      P2=a[i];
     delay(65000);
      }
      }
      void delay(unsigned int i)
     {
     while(i--);
}

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

Seven segment display(Common cathode)

No comments:

Post a Comment