Tuesday 24 November 2015

PROGRAM FOR SEVEN SEGMENT CATHODE DISPLAY INTERFACING WITH PIC16F877A 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,Vss) 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<pic.h>
void delay(unsigned int i);
void main()
{
TRISD=0x00;
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++)
{
PORTD=a[i];
delay(65000);
}
}
void delay(unsigned int i)
{
while(i--);

}

For more Embedded c progam, click below link...

Seven segment display(Common cathode)

No comments:

Post a Comment