Seven Segment Display 0-9 Sayıcı


#include <p18f4550.h>
#include <delays.h>
//                                   hgfedcba     ortak cathod display için
#define SIFIR         0b00111111
#define BIR            0b00000110
#define IKI             0b01011011
#define UC             0b01001111
#define DORT        0b01100110
#define BES            0b01101101
#define ALTI           0b01111101
#define YEDI          0b00000111
#define SEKIZ        0b01111111
#define DOKUZ     0b01101111
void main(void){
char segment[]={SIFIR,BIR,IKI,UC,DORT,BES,ALTI,YEDI,SEKIZ,DOKUZ};
int i=0;
TRISD=0;
while(1)
{
PORTD=segment[i];
Delay10KTCYx(100);
i++;
if(i==10)
i=0;
}
}
Devre Şeması 
Ortak Katot Seven Segment Display Uygulaması



Yorumlar