![]() |
![]() |
#33 |
Nhập môn đệ tử
Tham gia ngày: Sep 2011
Bài gửi: 10
: |
cảm ơn các anh đã giải thích! nguyên code là như sau:
#include <16F877A.h> #include <DEFS_16F877A.h> #device 16F877*=16 ADC=10 #FUSES NOWDT, HS, NOPUT, NOPROTECT, NODEBUG, NOBROWNOUT, NOLVP, NOCPD, NOWRT #use delay(clock=4000000) #use fast_io(b) #use fast_io(c) #use fast_io(d) #int_timer0 void interrupt_timer0(){ int1 a; int16 count; set_timer0(56); ++count; if(count == 500) { count=0; a=~a; RB0=a; } } void main() { set_tris_b(0); setup_timer_0(RTCC_INTERNAL|RTCC_DIV_2); enable_interrupts(int_timer0); enable_interrupts(global); set_timer0(56); while(true) { } } em chỉ copy ở page 1 thôi thắc ở cái đoạn đó mong các anh giải thích giúp em!! thanks all |
![]() |
![]() |
|
|