【正文】
步進電機脈沖信號 發(fā)射超聲波信號 延時 讀定時器 T0值,計算障礙物距離,并記錄到 a[i]中 i++ i=48 i=0 比較 a[i],取得最小值以及對應(yīng) i值(記為 j) mina[]i =dis 障礙物超過設(shè)定的距離, 兩輪全速行駛 0=j=24 (左半邊) 左燈亮,左輪加速,右輪減速 右燈亮,右輪減速,左輪加速 Y N Y N N Y Y 24=j=48 (右半邊) 12 主程序流程圖 開始 LCD160中斷、定時器以及 I/O 口初始化 步進電機帶動探頭旋轉(zhuǎn)測距壁障 keyA、 keyB、 keyC、keyD 是否有按下 是否到定時、定路程點 小車停止、步進電機停止 是否到啟動時間 是否定時啟動 keyB=1 是否啟動定時、定路程停止 keyA=1 Num++ Num=2 Num=5 步進電機停止、小車停止、計時停止 Num=0 Num=0 Num=1。 Num1=2,fen2。 遙控模塊直接采用 TDL9915*RF和 TDL9915*TF,遙控發(fā)射模塊 TDL9915*RF按鍵后,接收模塊 TDL9915*TF 對應(yīng)輸出高電平,沒按鍵時輸出低電平。 七、設(shè)計實物圖 14 八、參考文獻 郭天祥 .《新概念 51 單片機 C 語 言教程》 .電子工業(yè)出版社 . 嚴(yán)桂蘭 .《 C 語言程序設(shè)計與應(yīng)用教程》 .廈門大學(xué)出版社 . 陸應(yīng)華 .《電子系統(tǒng)設(shè)計教程》 .國防工業(yè)出版社 . 李剛、林凌、姜葦《單片機系統(tǒng)設(shè)計與應(yīng)用技巧》 .北京航空航天大學(xué)出版社 . 15 附錄: include include define uchar unsigned char define ulong unsigned long define uint unsigned int int zkb1=2,zkb2=2。 sbit BELL=P1^5。 ulong DATA,cc,bb。 uchar code table4[]=OFF ON 。 TR0=1。_nop_()。_nop_()。 CSOut=0。_nop_()。_nop_()。//3 _nop_()。_nop_()。_nop_()。_nop_()。_nop_()。_nop_()。a++) for(b=0。 EN=0。 write(0x38)。 acd_dis[4]=b%10+0x30。 ccd_dis[2]=0x00。 TL0=0。 EX1=1。 } void t1() interrupt 3 { TR1=0。 TL1=0XF6。 fen++。 } void motor_ffw() { for (d=0。 CCOut()。 a[m]=DATA。 write(0x80)。 write(0xc0)。 } if(num=2){P2=0XD2。break。 switch(num) { case 1:if(kk==0){LEDL=1。beled1()。 22 case 3:YY1=1。} if(num1==3){if(miao2==59)miao2=0。 } } if(keyD==1) { if(keyD==1) { beled()。if(zkb2=40){zkb2=40。break。else fen2。 } while(keyD==1)。 }。 }。 case 2: write(0x80)。 write(0xc0)。 write(0xc8)。 for(j=0。 for(j=0。i++) { writedata(table5[i])。i++) { writedata(table6[i])。 break。 LCD_DISP(ccd_dis)。amp。 write(0x81)。 if(an==0) { P2=0XD2。amp。 } } } } } if(K==2) { j=0。 LEDR=1。 LEDL=0。 } } write(0x88)。 ACD(aa)。 CCD(fen)。i16。i16。 LEDR=1。 28 } } ag an employment tribunal clai Emloyment tribunals sort out disagreements between employers and employees. You may need to make a claim to an employment tribunal if: you don39。s 21 win. Michel Platini, president of European football39。 The end of our life, and can meet many things really do? 而窮盡我們的一生,又能遇到多少事 情是真正地非做不可? During my childhood, think lucky money and new clothes are necessary for New Year, but as the advance of the age, will be more and more found that those things are optional。既然如此,何不嘗試打開心門,擁抱生活中的各種可能,讓世界感化我們呢? Whenever we start to let our fears and seriousness get the best of us, we should take a step back and reevaluate our behavior. The items listed below are six ways you can open your heart more fully and ,我們應(yīng)該退后一步,重新反思自己的言行。 Whenever a painful situation arises in your life, try to embrace it instead of running away or trying to mask the hurt. When the sadness strikes, take a deep breath and lean into it. When we run away from sadness that’s unfolding in our lives, it gets stronger and more real. We take an emotion that’s fleeting and make it a solid event, instead of something that passes through 現(xiàn)痛苦的事情時,別再逃跑或隱藏痛苦,試著擁抱它吧;當(dāng)悲傷來襲時,試著深呼吸,然后直面它。t really grow up, it seems is not so important。s actions. CSKA said they were surprised and disappointed by Toure39。t appealed against the disciplinary action your employer has taken against you. However, if you win your case, the tribunal may reduce any pensation awarded to you as a result of your failure to appeal. Remember that in most cases you must make an application to an employment tribunal within three months of the date when the event you are plaining about happened. If your application is received after this time limit, the tribunal will not usually accept i. If you are worried about how the time limits apply to you If you are being represented by a solicitor at the tribunal, they may ask you to sign an agreement where you pay their fee out of your pensation if you win the case. This is known as a damagesbased agreement. In England and Wales, your solicitor can39。 P2=0XF3。 for(j=0。 for(j=0。 write(0xcb)。 27 if(all=aa)an=allaa。 LCD_DISP(bcd_dis)。 } if((j24)amp。 LEDL=1。i48。amp。 YY2=0。 LCD_DISP(acd_dis)。 YY1=1。 CCD(miao)。amp。j50。j50。j++)。j++)。 LCD_DISP(acd_dis)。i15。i16。 CCD(zkb1)。 for(i=0。 for(i=0。else miao2。miao=fen=0。} else zkb2+=10。LEDR=1。} break。 if(num1==0){if(fen1==59)fen1=0