Uygulamaya ait kodları indirmek için tıklayınız...
// 0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9
char rakam[10] = {0x3F, 0x06, 0x5B, 0x4F, 0x66, 0x6D, 0x7D, 0x07, 0x7F, 0x6F};
#include "mcc_generated_files/mcc.h" #include "DISPLAY.h" char sayac; int sayi; /* Main application */ void main(void) { // Initialize the device SYSTEM_Initialize(); // If using interrupts in PIC18 High/Low Priority Mode you need to enable the Global High and Low Interrupts // If using interrupts in PIC Mid-Range Compatibility Mode you need to enable the Global and Peripheral Interrupts // Use the following macros to: // Enable the Global Interrupts //INTERRUPT_GlobalInterruptEnable(); // Disable the Global Interrupts //INTERRUPT_GlobalInterruptDisable(); // Enable the Peripheral Interrupts //INTERRUPT_PeripheralInterruptEnable(); // Disable the Peripheral Interrupts //INTERRUPT_PeripheralInterruptDisable(); sayac = 0; sayi = 0; while (1) { // Add your application code // if (BUTON1_GetValue() == 0) { // sayac++; // // if (sayac > 9) { // sayac = 0; // } // while(BUTON1_GetValue() == 0); //Butona bas?l? ise bekle // } // // grupDISPLAY_digitGoster(4,sayac); grupDISPLAY_ekrani(sayi); sayi++; if (sayi > 9999) { sayi = 0; } DELAY_milliseconds(10); } } /** End of File */