at89c8051 interrupt1 8051 모든 인터럽트 #include #define LEDs P0 unsigned char receivedChar=0; unsigned char count=0; unsigned char ti_flag=0; void ext_int_0() interrupt 0 { count++; } void ext_int_1() interrupt 2 { count--; } void timer0_isr() interrupt 1 { TH0 = 0X4B; // ReLoad the timer value for 50ms TL0 = 0XFD; if(timerCount >= 20) // count for 1sec delay(50msx20 = 1000ms = 1sec) { timerCount = 0; LEDs =!LEDs; // Toggle the LEDs .. 공학속으로/마이컴 2020. 3. 4. 이전 1 다음 💲 추천 글