Keypad ile sevensegmen kullanimi ccs compiler,
#include<16f877a.h> #fuses hs #use delay(clock=20m) #use rs232(baud=9600,parity=N,xmit=PIN_A1,rcv=PIN_A2,bits=8,stop=1) #include<KBD.c> int display[16]={63,6,91,79,102,109,125,7,127,111,119,56,57,94,121,113}; char c; void main() { kbd_init(); set_tris_b(0x00); output_b(0x00); //lcd_init(); printf("Sayilar:"); delay_ms(50); while (true) { c = kbd_getc(); delay_ms(1); if(c != 0) { printf("\f%c --- %X",c,c); output_b(display[c-48]); delay_ms(100); } } }
Hiç yorum yok:
Yorum Gönder
Her yorum bilgidir. Araştırmaya devam...