【正文】
運(yùn)行起來就會(huì)出錯(cuò),很可能是編程時(shí)管腳或時(shí)序編輯得不對(duì)。在編譯之后,將程序?qū)雙roteus中,在事先畫好的電路圖中進(jìn)行仿真。軟件調(diào)試完成之后,并不代表硬件就能成功,由于仿真軟件中元件時(shí)序與實(shí)物并不是完全相符的,它們之間存在的時(shí)序的差異,因此,軟件調(diào)試只是可以作為判斷程序邏輯正確性的一個(gè)參考,具體時(shí)序上的問題 ,還得在硬件調(diào)試中進(jìn)一步修改。硬件的調(diào)試主要是按照電路圖,檢查硬件的焊接是否虛焊,漏焊,錯(cuò)焊等不良。造成焊接質(zhì)量不高的常見原因是:①虛焊:造成虛焊的原因主要是烙鐵溫度過低或加熱時(shí)間不足,焊錫未完全熔化、浸潤②漏焊:電路引腳忘記焊接,導(dǎo)致的通信不良,不能夠?qū)崿F(xiàn)電路的正常功能。③錯(cuò)焊:電路焊接錯(cuò)誤,導(dǎo)致的電路不能夠正常工作。單片機(jī)最小系統(tǒng)的工作的基本條件是:電源;復(fù)位電路,晶振。因此,首先應(yīng)該確認(rèn)電源電壓是否正常。當(dāng)硬件電路焊接好以后,就要進(jìn)行功能調(diào)試,步驟如下:(1)為超聲波檢測系統(tǒng)和單片機(jī)控制系統(tǒng)電源供電后,先按開機(jī)鍵,在按復(fù)位鍵,超聲波掃描的結(jié)果將顯示在LCD顯示屏上,: LCD顯示(2)為SIM 900A系統(tǒng)供電后,先按開機(jī)鍵,再按掃描鍵,系統(tǒng)將自動(dòng)在短時(shí)間內(nèi)搜索信號(hào),SIM 900A : SIM 900A 檢測信號(hào)(3)若超聲波檢測到水位超出額定值,單片機(jī)將會(huì)控制LCD顯示所測距離,并控制發(fā)送信息給SIM 900A 模塊,SIM 900A模塊將以短信的形式將報(bào)警信息發(fā)給接收手機(jī),: 手機(jī)短信接收報(bào)警信號(hào):本設(shè)計(jì)中采用的是c語言編程程序,單片機(jī)采用的是STC89C52,支持串口下載,調(diào)試方便;編譯軟件采用的德國Keil Software公司出品的Keil uVision4,它是51系列兼容單片機(jī)C語言軟件開發(fā)系統(tǒng),使用接近于傳統(tǒng)c語言的語法來開發(fā),界面美觀,功能強(qiáng)大[13]。首先,根據(jù)電路圖和元器件的參數(shù),編寫單片機(jī)程序,仔細(xì)檢查有沒有語法的錯(cuò)誤,編譯通過后,通過串口把程序下載到單片機(jī)中,采用LCD指示燈方式,判斷程序的運(yùn)行狀態(tài),反復(fù)檢查編寫的程序,反復(fù)修改和調(diào)試,堅(jiān)持一個(gè)模塊一個(gè)模塊地的調(diào)試原則。把整個(gè)電路的各個(gè)模塊調(diào)試好。 整個(gè)軟件調(diào)試過程如下圖:(1) 在桌面創(chuàng)建新工程文件夾命名為My Test,打開Keil軟件,新建工程并選擇項(xiàng)目芯片STC 89C52,:(2) 新建工程后將編好的C文件寫進(jìn)去,保存到指定文件夾My Test中,: 運(yùn)行并編譯(3) 編譯好后,再運(yùn)行一次,: 總 結(jié)本次畢業(yè)設(shè)計(jì)主要完成的內(nèi)容包括:采用超聲波非接觸式監(jiān)測,利用從超聲波發(fā)射到接收所經(jīng)歷的時(shí)間,單片機(jī)可以通過A/D轉(zhuǎn)換計(jì)算出超聲波傳感器到河道水位的距離,最終算出河道水位的高度。將單片機(jī)計(jì)算處理過的河道水位數(shù)據(jù)經(jīng)端口送給顯示模塊,通過LCD可以直接的顯示出河道水位的高度,同時(shí)單片機(jī)將處理后的數(shù)據(jù)送到到報(bào)警模塊,以決定是否報(bào)警。單片機(jī)處理過的數(shù)據(jù)通過GSM無線通信模塊送給手機(jī),從而實(shí)現(xiàn)對(duì)水位的實(shí)時(shí)監(jiān)測。由于城市河道水位測量的環(huán)境是在室外,周圍環(huán)境指標(biāo)變化略大。而測量部分的超聲波傳播速度是受外界環(huán)境影響的,因此在實(shí)際操作實(shí)施當(dāng)中,所測得的數(shù)據(jù)肯定會(huì)有一定的誤差。該系統(tǒng)的數(shù)據(jù)采集系統(tǒng)不是非常的可靠。由于該系統(tǒng)的硬件測量部分長期處于外界環(huán)境當(dāng)中,即使外界環(huán)境中的部分干擾源不至于使該系統(tǒng)的硬件受到部分損傷,但也有可能導(dǎo)致該系統(tǒng)的部分硬件功能不無法正常工作,所以,提高該系統(tǒng)的抗干擾性能還是非常有必要的。綜上所述,我所設(shè)計(jì)的系統(tǒng)還存在一部分問題,然而我在畢業(yè)設(shè)計(jì)的這兩三個(gè)月的親手實(shí)踐當(dāng)中,不僅對(duì)學(xué)過的知識(shí)進(jìn)行了鞏固,同時(shí)也學(xué)到了很多的新知識(shí),受益匪淺。本文從緒論、方案選擇、硬件設(shè)計(jì)、軟件設(shè)計(jì)、系統(tǒng)調(diào)試等幾個(gè)方面詳細(xì)介紹了整體設(shè)計(jì)的原理及過程,以及硬件制作過程中的一些注意事項(xiàng)。綜合利用了單片機(jī)、超聲波收發(fā)模塊、GSM模塊等方面技術(shù),設(shè)計(jì)精巧,成本低,可以廣泛應(yīng)用到實(shí)際的生產(chǎn)生活等實(shí)踐中去,具有很廣的應(yīng)用價(jià)值。致謝在做畢業(yè)設(shè)計(jì)整個(gè)過程當(dāng)中,我最感謝的就是我的指導(dǎo)老師鄭老師。他在指導(dǎo)我們做畢業(yè)設(shè)計(jì)的同時(shí),培養(yǎng)了我們獨(dú)立思考的能力,并且端正了我們對(duì)待畢業(yè)設(shè)計(jì)的態(tài)度。我清楚地記得每當(dāng)我的畢業(yè)設(shè)計(jì)上遇到困難去請教鄭老師時(shí),他都會(huì)非常耐心的來對(duì)問題進(jìn)行剖析,最終清楚明白的對(duì)我的問題作出回答。另外,在整個(gè)畢業(yè)設(shè)計(jì)中,我的同學(xué)也給予了我非常大的幫助。在遇到難以解決的問題時(shí),大家坐在一起討論學(xué)習(xí),在這期間不僅增長了我的專業(yè)知識(shí),而且增進(jìn)了我們同學(xué)間的友誼。最后再次感謝在畢業(yè)設(shè)計(jì)中給予我大量幫助的鄭老師以及同學(xué)們,在以后的生活中,我會(huì)保持這種狀態(tài),會(huì)更加的努力。 致謝人:馬柱柱 日期;2015年6月8日參考文獻(xiàn)[1] 陳杰,黃鴻. 傳感器與檢測技術(shù)[M] .高等教育出版社. 2002[2] 胡偉,季曉衡. 單片機(jī)C程序設(shè)計(jì)及應(yīng)用實(shí)例[M] .人民郵電出版社. 2003[3] 呂俊芳. 傳感器接口與檢測儀器電路[M] .北京航空航天大學(xué)出版,1994[4] 梅麗鳳,王艷秋,張軍. 單片機(jī)原理及接口技術(shù)[M] .北京交通大學(xué)出版社,2006[5] 溫義德. 鍋爐水池水位自控裝置的制作及鍋爐水位檢測裝置的應(yīng)用[J] .科技創(chuàng)業(yè)家,2011,(2):25[6] 張盛,姜振兵. 基于AT89C51單片機(jī)的水箱水位檢測控制系統(tǒng)設(shè)計(jì)[J]. 科技廣場,2010,(9):122124[7] 朱高中. 基于單片機(jī)遠(yuǎn)程水位檢測系統(tǒng)的研究[J] .光電子技術(shù),2012,(4): 246250[8] 姜兵. 基于圖像識(shí)別的遠(yuǎn)程水位監(jiān)測系統(tǒng)研究[J] .西安電子科技大學(xué)學(xué)報(bào),2011,(13):1216[9] 張忠遠(yuǎn). 智能水位監(jiān)測儀的研究[J] .南京理工大學(xué)學(xué)報(bào),2012,(26):134145[10] 劉亮,鄧世建,張建,胡媛媛. 給排水系統(tǒng)中水位檢測技術(shù)的研究[J] .工礦自動(dòng)化期刊,2011,(12):2124[11] 秦建軍. 山西省文峪河水庫水位測報(bào)系統(tǒng)的設(shè)計(jì)與研究[J] .太原理工大學(xué),2002,(32):5668[12] WangDandan,YuanXiping,GanShu Study on land cover remote sensing monitoring and LUCC analysis in frontier small river basin, Geoscience and Remote Sensing Symposium, 2007,IGARSS 2007,IEEE International [13] Heitsenrether, . New realtime storm surge monitoring network in Mobile Bay, Ocean, 2012, Digital Object Identifier: 附錄A 英文文獻(xiàn)原文Analysis of a Traffic Model for GSM/GPRS[Abstract] A traffic model for GSM/GPRS, the hybrid radio resource allocation (HRRA) algorithm is evaluated. A dedicated number of GPRS channels plus idle periods between voice calls are used for GPRS data packet transfers. A simulator was developed in order to evaluate the HRRA algorithm, which provides a reasonable forecast on the voice blocking probability and on packet delay for a single cell system. Since the major issue is the correct resource allocation, results are shown for the influence of some choices and assumptions on the overall system performance. Asexpected, blocking probability can reach very high values if the number of dedicated channels increases too much. For the specific case of 4 carriers and traffic of 20 Erl, 4 channels dedicated to GPRS still enable an affordable blocking probability, leading to a mean packet delay of 15 s. The results can be used to illustrate the fundamental options that need to be taken by an operator, when implementing GPRS.I. INTRODUCTION In today’s mobile munications world, the 2nd generation Global System for Mobile Communications (GSM) is clearly a winning system, used by millions around the globe. Due to its limited ability to grow and satisfy packet data munication needs, its future as a munications system is shadowed by the uping 3 rd generation one, the Universal Mobile Telemunications System (UMTS). That is mainly due to the fact that GSM creators thought of it as primarily a voice system, hence, lacking the ability to deal with large amounts of data, the kind of data that is overwhelmingly taking over all munication networks. It is widely foreseen that in the near future mobile data traffic will overtake voice as the primary service provided by mobile operators. Hence, operators need to evolve from current GSM networks, so that they can provide the necessary packet switched multiservice munications. In order to achieve that, General Packet Radio Service (GPRS) is the solution that is being implemented. The main reason for the limitation in dealing with large amounts of data is the circuit switched based transmissionused in GSM. Due to the bursty nature of packet data, and to the scarcity of available resources, a packet switched transmission is be better suited. The GPRS concept was developed from the need to evolve GSM, in order toacplish an efficient way of delivering data packets, including the ones from other networks, with the minimum disturbance in the existing network. With the implementation of GPRS in GSM networks, and the fore