//#include <main.h>
#include <16F628A.h>
#FUSES NOWDT //No Watch Dog Timer
#FUSES NOBROWNOUT //No brownout reset
#FUSES NOLVP //No low voltage prgming, B3(PIC16) or B5(PIC18) used for I/O
#use delay(internal=4000000)
void main()
{
set_tris_b(0x00);
set_tris_a(0x00);
int a = 0;
int rakamlarKatot[]={0x3F, 0x06, 0x5B, 0x4F, 0x66, 0x6D, 0x7D, 0x07, 0x7F, 0x6F, 0x77, 0x7C, 0x39, 0x5E, 0x79, 0x71}; // Ortak Katot
int rakamlarAnot[]={0b11000000,
0b11111001,
0b10100100,
0b10110000,
0b10011001,
0b10010010,
0b10000010,
0b11111000,
0b10000000,
0b10010000,
0b10001000,
0b10000011,
0b11000110,
0b10100001,
0b10000110,
0b10001110}; // Ortak Anot
while(TRUE)
{
output_b(rakamlarAnot[a]);
a++;
delay_ms(800);
if(a==16)
{
a=0;
}
}
}
No comments:
Post a Comment