【文章內(nèi)容簡介】
測量值(cm)251279300330340350360388403426表 1 實際測試數(shù)據(jù)記錄5設(shè)計總結(jié)為了驗證系統(tǒng)的測量精度,在試驗室進行了實地測量。利用本系統(tǒng)在42~426cm范圍進行多次測量。經(jīng)測量最大誤差在1cm范圍內(nèi),穩(wěn)定性和重復行都比較好。系統(tǒng)結(jié)構(gòu)簡單、體積小、實時LED顯示和報警、抗干擾能力好等優(yōu)點。系統(tǒng)的誤差主要來自發(fā)射探頭的軸線而導致所反射回來的波可能是從不同點獲得,還有電子器件自身的時延、干擾等也造成一定影響??梢愿鶕?jù)具體場合,選擇合適功率的探頭,以及調(diào)整程序中脈沖的頻率、寬度和個數(shù)等提高精度或測量距離,擴大系統(tǒng)的應(yīng)用范圍。致謝在本次畢業(yè)設(shè)計中, 得到了我的指導教師朱老師的大力支持,在電路功能的實現(xiàn)中提出了許多相當寶貴的意見,畢業(yè)論文中也給予了悉心的指導,使我的畢業(yè)設(shè)計得以順利完成,對此我表示衷心的感謝,同時也感謝陳泉勇、楊朝陽同學在畢業(yè)設(shè)計當中給我的幫助。參考文獻 [1] :2003年6月[2] :1998年[3] . 廣東江門:2006年[4] :2000年12月[5] 龔運新 單片機C語言開發(fā)技術(shù) 清華大學出版社 2006年10月[6] 段晨東 單片機原理及接口技術(shù) 清華大學出版社 2008年8月[7] 戴佳 51單片機C語言應(yīng)用程序設(shè)計實例精講第二版 電子工業(yè)出版社 2009年11月[8] (第2版)北京:[9] 周良權(quán),傅恩錫,(第二版)北京:高等教育出版社 3[10] [11] 邱平. [12] :電力工業(yè)出版社,1980年[13] 李鳴華,. 電子技術(shù)應(yīng)用,1998年Based on SCM car anticollision system designThe College of Physics and Information Engineering07 class electronics information science and technology 070303049 gan jingchangFaculty adviser Zhu Chengquan lecturer【Abstract】This paper introduces the properties and the characteristics of AT89S51, designs a impactproof alarm with low cost, high precision, miniaturization, digital display taking it as the core . The impactproof alarm takes SCM’s realtime control and data processing functions bine with the Ultrasonic ranging technology,the sensor technologies. It is able to detecte the distance of rear obstacle and the automobile, through digital display device shows by sound circuit distance, and according to the distance situation warned. It has the vital significance to prevent automobile reverse accident.【 keywords 】 Microcontroller。 Ultrasonic。 Impactproof。 Alarm 附錄1電路原理圖附錄2 PCB圖 附錄3程序include sbit k1=P3^4。 sbit csbout=P1^0。 //超聲波發(fā)送 sbit csbint=P3^2。 //超聲波接收 sbit bg=P3^3。 define LED P0 sbit LED1=P2^4。 //LED控制 sbit LED2=P2^5。 //LED控制 sbit LED3=P2^6。 //LED控制 sbit bj=P2^0。//報警define csbc unsigned char cl,mqzd,csbs,csbds,buffer[3],xm1,xm2,xm0,jpjsunsigned char convert[10]={0x18,0x7b,0x2c,0x29,0x4b,0x89,0x88,0x3b,0x08,0x09}。unsigned int s,t,i,xx,j,sj1,sj2,sj3,mqs,sx1。 void csbcj()。 void delay(j)。 //延時函數(shù) void scanLED()。 //顯示函數(shù) void timeToBuffer()。 //顯示轉(zhuǎn)換函數(shù) void keyscan()。 void k1cl()。 void k2cl()。 void k3cl()。 void k4cl()。 void offmsd()。 void main() //主函數(shù) EA=1。 //開中斷 TMOD=0x11 //設(shè)定時器0為計數(shù),設(shè)定時器1定時 ET0=1。 //定時器0中斷允許 ET1=1。 //定時器1中斷允許 TH0=0x00。 TL0=0x00。 TH1=0x9