【正文】
北京:高等教育出版社,1998【7】 朱兆優(yōu) 主編《單片微機原理與應(yīng)用》。本論文是在我的指導(dǎo)老師饒利民密切關(guān)心和悉心指導(dǎo)下完成的。可以進一步優(yōu)化相關(guān)軟件程序。對一個學(xué)期的畢業(yè)論文工作進行總結(jié),得到如下幾個結(jié)論: ,設(shè)計了基于51單片機以及DS18B20溫度傳感器問主要器件的新型溫度采集控制設(shè)計方案,該設(shè)計方案的鮮明特點是系統(tǒng)的實用性強、系統(tǒng)實現(xiàn)數(shù)字化、結(jié)構(gòu)化、處理速度快,能實時顯示數(shù)據(jù)。本系統(tǒng)聯(lián)機調(diào)試的步驟如下:第一步 將整個硬件系統(tǒng)連接起來,再現(xiàn)場進行連機調(diào)試,先將源程序分成對應(yīng)于各功能模塊,再分別與硬件結(jié)合,測試其性能狀況,先進行溫度測量顯示部分的調(diào)試,打開硬件電路電源,運行程序,查看測量顯示的溫度值是否正確。在這方面我吸取了教訓(xùn)問題也得到了解決。經(jīng)查,在單片機開發(fā)板上溫度測量系統(tǒng)工作正常,排除了溫度傳感器損壞的原因 。調(diào)試的目的是排除硬件和軟件的故障,使研制的樣機符合預(yù)定設(shè)計目標,下面就調(diào)試過程中遇到的問題及其解決方法作以下敘述。該仿真系統(tǒng)可以進行對程序的輸入與修改,運行、調(diào)試、排錯等功能,而且具有較全的開發(fā)軟件,支持單片機C語言和匯編語言進行軟件開發(fā)。} if(temp0) {HLight=0。圖32 讀溫度流程圖3.3 按鍵與溫度處理3.3.1 按鍵處理子程序按鍵處理子程序主要是負責(zé)參數(shù)的設(shè)置,首先是對系統(tǒng)的初始化操作。在讀取溫度過程中跳過讀取溫度傳感器序列號。用的是循環(huán)查詢方式,來顯示和控制溫度,主程序調(diào)用各個子程序?qū)S18B20所采集的數(shù)據(jù)進行實時顯示讀出與處理,其程序流程如圖31系統(tǒng)程序流程圖。其接口原理圖如下圖6所示: 圖211 輸出顯示電路 2.4.9 設(shè)計總電路電路中溫度數(shù)據(jù)采集用DS18B20,當采集溫度實時變化,單片機發(fā)出相關(guān)指令,外圍電路執(zhí)行相應(yīng)操作。電路圖如圖210所示: 圖210 輸出狀態(tài)顯示電路 2.4.8數(shù)碼管顯示電路LED是發(fā)光二極管的英文縮寫。由此看出,三極管的作用相當于一個開關(guān)。DS18B20傳感器與單片機的連接采用外部供電的方式,其電路如圖27所示:圖27 溫度傳感器接口2.4.5 系統(tǒng)電源電路的設(shè)計本系統(tǒng)采用LM2596電源穩(wěn)壓芯片,LM2596是降壓型的電源管理集成電路輸出+5V電壓,具有良好負載調(diào)節(jié)特性,同時具有優(yōu)良的線性。2.4.4 溫度傳感器電路采用數(shù)字溫度傳感器DS18B20來作為此次畢業(yè)設(shè)計的溫度傳感器。本課題所用4個按鍵來設(shè)置溫度方式,所以用的就是獨立式鍵盤,所以以下就只介紹幾種獨立式鍵盤的接口,行列式鍵盤接口將不做介紹。那么如何消除抖動呢?軟件消抖是最常采用的方法。單片機對外設(shè)發(fā)出指令,單片機發(fā)出啟動相應(yīng)電路的命令,外設(shè)執(zhí)行相應(yīng)動作。第一種是空閑模式,RAM、定時計數(shù)器、串口和中斷可以正常工作,但是CPU停止工作。杜宇報警限定值的設(shè)置也更方便。該方案有隔離、A/D轉(zhuǎn)換、測量和控制等部分。也使我對單片機實現(xiàn)微機測控有了一定的了解,也學(xué)習(xí)到了對于單片機編程的一些方法和心得體會。為提升社會效益、經(jīng)濟效益提高生產(chǎn)效率節(jié)能環(huán)保起到了重要的保障。隨著大規(guī)模及超大規(guī)模集成電路的問世,計算機發(fā)展朝著更加智能、更加快速和小型化的方向前進。關(guān)鍵詞:STC89C52單片機; DS18B20; 顯示電路Abstract Along with the puter measurement and control technology of the rapid development and wide application, based on singlechip temperature gathering and control system development and application greatly improve the production of temperature in life level of control. This design STC89C52 describes a kind of mainly by MCU control unit, for temperature sensor DS18B20 temperature control system. The control system can realtime storage temperature data and record related to the current time. System design related hardware circuit and related applications. STC89C52 microcontroller hardware circuit include temperature detection circuit smallest system, and key processing circuit, digital tube display circuit and state display circuit etc. System programming mainly include main program, read temperature subroutine, the calculation of temperature subroutines, key processing procedures, Segment display procedures and data storage procedures, etc. STC89C52RC singlechip microputer can be realized in a wide range of performance requirements under the highly integrated, low cost solution. And the system could be used by the user through the keyboard to set the required temperature, and the digital tube display circuit realtime display was charged with temperature and set temperature, make system more convenient and intuitive.Key words: STC89C52 singlechip microputer。 學(xué)位論文指導(dǎo)教師簽名: 年 月 日基于單片機的智能溫度報警系統(tǒng)張靖Based on single chip microputer intelligent temperature alarm systemZhang, Jing2013年6月5日 摘 要本論文介紹了一種以STC