PIC321 PIC32 Delay 함수 #define FALSE 0 #define TRUE !FALSE #define FCY 72000000L #define FPB 36000000L #define WIDTH 1; #define REFRESH 20; #pragma config FPLLMUL = MUL_20, FPLLIDIV = DIV_2, FPLLODIV = DIV_1, FWDTEN = OFF #pragma config POSCMOD = HS, FNOSC = PRIPLL, FPBDIV = DIV_1 #define SYS_FREQ (80000000L) void Delayus( unsigned t) { T1CON = 0x8000; // enable TMR1, Tpb, 1:1 while (t--) { TMR1 = 0; while (TMR1 < FPB.. 2011. 7. 11. 이전 1 다음