【正文】
本科生畢業(yè)設(shè)計(論文) 題 目: 基 于單片機(jī)的數(shù)字溫度計 的設(shè)計 學(xué)生姓名: 系 別 : 機(jī)械與 電氣 工程系 專業(yè) 年級: 指導(dǎo)教師: 20xx 年 6 月 20 日中國石油大學(xué)勝利學(xué)院本科畢業(yè)設(shè)計 (論文 ) 摘要 本文主要介紹了一個基 于 AT89C51 單片機(jī)的測溫系統(tǒng),詳細(xì)描述了利用數(shù)字溫度傳感器 DS18B20 開發(fā)測溫系統(tǒng)的過程,重點對傳感器在單片機(jī)下 的硬件連接,軟件編程以及各模塊系統(tǒng)流程 進(jìn)行了詳盡分析,對各部分的電路進(jìn)行 了 介紹,該系統(tǒng)可以方便的 實現(xiàn)溫度采集和顯示,并可以根據(jù)需要 , 任意設(shè)定上下限報警溫 度,它 適合我們?nèi)粘I詈凸まr(nóng)業(yè)生產(chǎn)中的溫度測量,也可以當(dāng)做溫度處理模塊嵌入其他系統(tǒng)中,作為其他主系統(tǒng)的輔助擴(kuò)展。 DS18B20 和 AT89C51 結(jié)合實現(xiàn)最簡溫度檢測系統(tǒng) 。 本溫度計屬于多功能溫度計,可以設(shè)置上下 限 報警溫度,當(dāng)溫度不在設(shè)置范圍內(nèi)時,可以報警。 關(guān)鍵詞: 單片機(jī); 數(shù)字控制;溫度計; DS18B20; AT89C51 中國石油大學(xué)勝利學(xué)院本科畢業(yè)設(shè)計 (論文 ) ABSTRACT This paper introduces a temperature measurement system based on AT89C51 microcontroller, a detailed description of the process of using digital temperature sensor DS18B20 temperature measurement system development, focusing on the sensor under the SCM hardware connection, software programming and system flow of each mod ule were analyzed in detail on the part of the circuit, the system can realize temperature acquisition convenient and display, and can according to need, set the alarm temperature, it is suitable for our daily life and industrial and agricultural production in the temperature measurement, it can also be used as a temperature processing module embedded in other systems, as other auxiliary system. DS18B20 and AT89C51 bine to achieve the most simple temperature detection system. The multipurpose thermometer, you can set the alarm temperature, when the temperature is not in the set range,it can alarm. Keywords: single chip microputer。 digital control。 thermometer。 DS18B20。 AT89C51 中國石油大學(xué)勝利學(xué)院本科畢業(yè)設(shè)計 (論文 ) 目錄 前 言 ...................................................................................................................................... 6 第一章 硬件設(shè)計 .................................................................................................................. 7 AT89C51 芯片功能簡介 ........................................................................................................................................... 7 AT89C51 芯片簡介 ........................................................................................................................................... 7 引腳功能 ............................................................................................................................................................ 7 數(shù)字溫度傳感器 模塊 ............................................................................................................................................... 8 DS18B20 性能 .................................................................................................................................................... 8 DS18B20 引腳說明 ........................................................................................................................................... 9 DS18B20 測溫原理 ........................................................................................................................................... 9 DS18B20 的工作時 序 .................................................................................................................................... 10 測溫電路設(shè)計 ........................................................................................................................................................... 11 按鍵模塊設(shè)計 .......................................................................................................................................................... 12 報警電路設(shè)計 .......................................................................................................................................................... 12 顯示電路設(shè)計 .......................................................................................................................................................... 13 串口電路設(shè)計 .......................................................................................................................................................... 13 第二章 系統(tǒng)軟件設(shè)計 .......................................................................................................... 14 各模塊的程序設(shè)計 ................................................................................................................................................. 14 主程序流程圖 ................................................................................................................................................... 14 讀出溫度子程序 ............................................................................................................................................. 14 溫度轉(zhuǎn)換命令子程序 .................................................................................................................................... 15 計算溫度子程 序 ............................................................................................................................................. 16 顯示數(shù) 據(jù)刷新子程序 .................................................................................................................................... 17 報警 子程序 ...................................................................................................................................................... 17