Tuesday 24 November 2015

PROGRAM FOR SEVEN SEGMENT ANODE DISPLAY INTERFACING WITH PIC16F877A MICROCONTROLLER

Seven segment display(anode)

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 diagram





Program coding

#include<pic.h>
void delay(unsigned int i);
void main()
{
TRISD=0x00;
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++)
{
PORTD=a[i];
delay(65000);
}
}
void delay(unsigned int i)
{
while(i--);
}

For more program, click below link...

Seven segment display(anode)


No comments:

Post a Comment