【文章內(nèi)容簡介】
0]]。//查找定義好的數(shù)碼管段值與P0口輸出 delay()。 //加入短暫延時 P0=0XFF。 //清除數(shù)碼管顯示,因是共陽型,所以不是0 SMG_q=1。 //關(guān)閉千位數(shù)碼管 SMG_b=0。 //選擇百位數(shù)碼管 P0=discode[disbuff[1]]。 //查找定義好的數(shù)碼管段值與P0口輸出, delay()。 //加入短暫延時 P0=0XFF。 //清除數(shù)碼管顯示,因是共陽型,所以不是0 SMG_b=1。 //關(guān)閉百位數(shù)碼管 SMG_s=0。 //選擇十位數(shù)碼管 P0=discode[disbuff[2]]。//查找定義好的數(shù)碼管段值與P0口輸出 delay()。 //加入短暫延時 P0=0XFF。 //清除數(shù)碼管顯示,因是共陽型,所以不是0 SMG_s=1。 //關(guān)閉十位數(shù)碼管 SMG_g=0。 //選擇個位數(shù)碼管 P0=discode[disbuff[3]]。//查找定義好的數(shù)碼管段值與P0口輸出 delay()。 //加入短暫延時 P0=0XFF。 //清除數(shù)碼管顯示,因是共陽型,所以不是0 SMG_g=1。 //關(guān)閉個位數(shù)碼管}} 中斷程序本設(shè)計中需注意當距離過遠或者沒有返回信號時候,定時器T1的溢出必須處理。/*******************定時器1溢出**********************/ void timer1(void)interrupt 2 using 1 {TR1=0。}/********************************************************/ void zd3() interrupt 3 //T1中斷用來掃描數(shù)碼管和計800MS啟動模塊 { TH1=0xf8。 TL1=0x30。 display()。 timer++。 if(timer=400) { timer=0。 TX=1。 //800MS 啟動一次模塊 _nop_()。 _nop_()。 _nop_()。 _nop_()。 _nop_()。 _nop_()。 _nop_()。 _nop_()。 _nop_()。 _nop_()。 _nop_()。 _nop_()。 _nop_()。 _nop_()。 _nop_()。 _nop_()。 _nop_()。 _nop_()。 _nop_()。 _nop_()。 _nop_()。 TX=0。 } }5 調(diào)試與下載調(diào)試與仿真作為硬件與軟件結(jié)合的重要部分,產(chǎn)品的制作首先要在相關(guān)軟件中完成模擬運行,檢驗設(shè)計的可行性,然后再在現(xiàn)實中得到實現(xiàn)。本設(shè)計通過利用Protel仿真,將編寫的程序用Keil軟件編譯。 硬件調(diào)試硬件調(diào)試主要是排除電路中的明顯錯誤,將所畫的電路圖制作成PCB板之后將所需元件按電路圖連接,檢查是否正確后對硬件個部分進行檢測與調(diào)試,分析各端口是否可靠,尤其是可使用萬用表等器件對電路進行檢查——著重查看電路的開路短路,底線是否可靠。 軟件調(diào)試系統(tǒng)軟件程序在編寫好之后,可通過編譯軟件對程序進行編譯,變成可執(zhí)行的目標文件。軟件的調(diào)試順序是子程序——中斷程序——算法模塊——主程序。所有子程序和中斷程序調(diào)試完成后,應(yīng)把主程序與它們連接在一起進行整體調(diào)試,檢查各模塊間的相互影響,是否會出現(xiàn)交叉錯誤。錯誤出現(xiàn)時及時調(diào)整程序,在調(diào)試過程中采用逐次擴大的方法,每次增加一個模塊進行測試,這樣更利于檢查問題的所在,節(jié)省時間,提高效率。 系統(tǒng)調(diào)試經(jīng)過軟件調(diào)試,程序無誤后。第一步:將單片機開發(fā)板與電腦連接,連接電源給系統(tǒng)供電,關(guān)閉電源開關(guān),系統(tǒng)斷電。第二步:打開STC_ISP軟件,并根據(jù)自己情況選擇相應(yīng)端口和波特率以及系統(tǒng)單片機型號(本系統(tǒng)采用STC89C52RC)。第三步:點擊openfile找到并打開hex代碼文件。第四步:點擊download/下載。第五步:給單片機系統(tǒng)上電。第六步:斷電后連上測距模塊,接通電源測試結(jié)果是否符合設(shè)計要求。 調(diào)試中遇到的問題解決辦法:選擇Keil中的Project選項,選擇“’Option for target’target 1’”點擊Output Keil設(shè)置圖選中“Creat HEX Fi”點擊確定。, Keil設(shè)置圖,并顯示“請給MCU上電”遇到這種情況先檢查是否打開了電源開關(guān),若開關(guān)打開人不能寫入程序,一般是系統(tǒng)不兼容該型號的USB轉(zhuǎn)RS232驅(qū)動,建議選擇合適的轉(zhuǎn)換接口線設(shè)計總結(jié)在本次設(shè)計中,我們廣泛借鑒了各種設(shè)計的優(yōu)點,充分考慮了整個設(shè)計中的各個環(huán)節(jié)。但由于條件和技術(shù)所限,對于很多以上所分析的在發(fā)射和接收過程中所產(chǎn)生的誤差沒有得到有效的校正。比如未消除溫度、氣壓造成的誤差、硬件電路誤差等。在我們?yōu)槠谝粋€學(xué)期的設(shè)計中,我們用到了以前學(xué)到的很多知識,比如電工、單片機、和C語言等。這使我們意識到,任何一件產(chǎn)品的產(chǎn)生,都不是單一知識所能實現(xiàn)的。而且在電路的設(shè)計和程序的編制過程中,出現(xiàn)了很多意想不到的錯誤,讓我們措手不及,有些甚至是一些非常低級的錯誤,但是這些錯誤也同樣讓我們獲益非淺,它使我們意識到,研究是一個非常嚴肅的過程,來不得半點馬虎。必須有一個嚴謹?shù)膽B(tài)度,加上100%的努力才有可能獲得成功的喜悅。總之,雖然在本課題的設(shè)計過程中遇到了一些問題,但是經(jīng)過老師的指點和自己的思考都一一克服,并且學(xué)到了不少知識,從中受益匪淺。了解了超聲波傳感器的原理,學(xué)會了各種放大電路的分析、設(shè)計,也掌握了單片機的開發(fā)過程中所用到的開發(fā)方法和工具。動手能力與自學(xué)能力得到了鍛煉與提高,對待事物的態(tài)度也發(fā)生了變化。理論總是離不開實踐的,設(shè)計制作過程中,盲目地追尋理論知識不足以解決所有問題,只有研究好課本,并把理論應(yīng)用于實踐才能做到學(xué)以致用,才能把知識轉(zhuǎn)化為生產(chǎn)力。在以后的工作和學(xué)習(xí)中我將在不斷學(xué)習(xí)理論知識的同時,加強自己的實踐能力,以更好地掌握所學(xué)知識。致 謝經(jīng)過兩個多月的忙碌和工作,本次畢業(yè)設(shè)計已經(jīng)接近尾聲,作為一個本科生的畢業(yè)設(shè)計,由于經(jīng)驗的匱乏,難免有許多考慮不周全的地方,如果沒有導(dǎo)師的督促指導(dǎo),以及同學(xué)們的支持,想要完成這個設(shè)計是非常困難的。本設(shè)計從選題的確定、說明書的寫作、修改到最后定稿得到了我的導(dǎo)師老師的悉心指導(dǎo)。特別是他每周都會詢問我的寫作進程,檢查我所查找的資料,并對這些資料進行評價,有不足之處他會不厭其煩的為我指出來,并為我指點迷津,幫助我開拓思路,精心點撥,熱忱鼓勵。他嚴肅的教學(xué)態(tài)度,嚴謹?shù)闹螌W(xué)精神,精益求精的工作作風(fēng)深深地感染和激勵著我。在此,謹向隋濤老師致以誠摯的感謝和崇高的敬意。時光匆匆如流水,轉(zhuǎn)眼便是大學(xué)畢業(yè)時節(jié)。隨著離校日期已日趨臨近,畢業(yè)設(shè)計的的完成也隨之進入了尾聲。在這里向熱情幫助我的老師、同學(xué)和朋友表示誠摯的謝意!參考文獻[1] 蘇 琳. 基于HC [2] . [3] 何希才,[4] ,[5] 吳斌方,劉民,[6] 蘇煒,龔壁建,[J].[7] [J].,6[8] 郭天祥. ,2009.[9] 肖婧. 單片機系統(tǒng)設(shè)計與仿真,北京航空航天大學(xué)出版社,.[10] 鄭鋒,王巧芝,2011. [11] ,2008.[12] 何希才,[M].北京:機械工業(yè)出版社,2007[13] 張富貴等.果樹外形的檢測方法[J].農(nóng)機化研究,[14] QiangLi Zhang,. Flatness Considerations on the UltraWideband LowNoise Amplifier Design[J].IEEE Trans,2005,4.[15] 王洪青等.并行超聲波測距系統(tǒng)在移動機器人上的應(yīng)用[J].傳感器與微系統(tǒng),2008,9.[16] 仇成群,胡天云.基于超聲波的汽車防撞報警系統(tǒng)的設(shè)計[J].傳感技術(shù)學(xué)報,2009,4.[17] 金元郁,張海鷹.超聲波自主探路車探測方法的改進[J].傳感器與儀器儀表,2009,1.附錄A 英文原文—From Min Zhou Luo, Yang, Tao Mei robot gripper technology Research and Development Robot gripper Status and ProgressWith the deepening of robotics research and all aspects of the tremendous growth in demand for robot applications continues to expand, the concept is continually expanding, no longer limited to handling, welding and highvolume operations of industrial robots, humans have developed or being developed for use in hazardous work environments, marine resources exploration, nuclear energy, space exploration in military reconnaissance and special robots. Robot has moved from fiction and science fiction movies material widely used in various fields for the development of intelligent putercontrolled electromechanical device system. Tremendous development in robotics, while one of the key ponents of the robot gripper also has been considerable progress. As the robot interaction with the environment and the implementation of parts of the last session, the robot gripper is both an active work environment perception sensor information, but also is the final actuators, is a highly integrated, with a variety of mechanical and electrical sensing function and intelligent system, involving institutions, bionics, automatic control, sensor technology, puter technology, artificial intelligence, munications technology, microelectronics, materials science and other areas of research and interdisciplinary. Robot gripper is developed from simple to plex, from clumsy developed to dexterity, which humanoid robot hand has been developed to be parable with the manpower, it can hold a flower, holding an egg, grab any one thing , but also to carry out some simple operations. As the importance of the robot gripper, the United States, Germany, Japan, Russia and other powers robotics research successfully developed a variety of general and special robot gripper, gripper flexibility and reliability has been greatly improved, coupled with advanced perceptual system, have a certain autonomy, flexible robot crawls and operating laid a solid foundation. Our robot research began in the 1970s, started late, gripper study is relatively backward. From the 1980s to the present, the National 863 Program and the National Natural Science Foundation support, the robot was incl