![]() |
![]() |
#1 |
Đệ tử 1 túi
Tham gia ngày: Sep 2010
Bài gửi: 11
: |
![]() em co doan code sau nhugn no kg chay,Mong anh em giup do.SR vi may o tiem kg co unikey ma dow thi lau wa hix
Code:
#include<16f877a.h> #fuses HS,NOWDT,NOPROTECT,NOLVP #use delay(clock=20000000) #use fast_io(A) #use fast_io(B) #use fast_io(c) #use fast_io(D) #define forward input(pin_B2) const unsigned char bien[] = {0x0e,0x0d,0x0b,0x07}; //------------------------- void dc_thuan(){ int8 i=0,j=0; while(forward){ delay_us(100); output_D(bien[i--]); if(i<0){ i=3; } } i++; } main(){ while(true) { if (forward==0) { delay_us(100); dc_thuan(); } } } thay đổi nội dung bởi: phamminhtuan, 26-11-2010 lúc 03:40 PM. Lý do: thiếu thẻ [code]...[/code] |
![]() |
![]() |
![]() |
#2 |
Đệ tử 1 túi
Tham gia ngày: Sep 2010
Bài gửi: 11
: |
Huhu kg ai help em a
|
![]() |
![]() |
![]() |
#3 |
Đệ tử 4 túi
|
thay while(forward) bang while(forward== 1)// thu xem sao
|
![]() |
![]() |
![]() |
|
|