【正文】
單片機(jī)原理及系統(tǒng)課程設(shè)計(jì) 專 業(yè): 電氣工程及其自動(dòng)化 班 級: 電氣 1001 班 姓 名: 學(xué) 號: 指導(dǎo)教師: 蘭州交通大學(xué)自動(dòng)化與電氣工程學(xué)院 2021 年 3 月 7 日 評語: 考勤( 10) 守紀(jì)( 10) 過程( 40) 設(shè)計(jì)報(bào)告( 30) 答辯( 10) 總成績( 100) 單片機(jī)原理及系統(tǒng)課程設(shè)計(jì)報(bào)告 1 摘 要 本文將介紹一種基于單片機(jī)控制的數(shù)字溫度計(jì)。在硬件方面介紹單片機(jī)溫度控制系統(tǒng)的設(shè)計(jì) , 對硬件原理圖做簡潔的描述。系統(tǒng)程序主要包括主程序、讀出溫度子程序、溫度轉(zhuǎn)換命令子程序、計(jì)算溫度子程序、顯示數(shù)據(jù)刷新子程序。軟硬件分別調(diào)試完成以后,將程序下載入單片機(jī)中,電路板接上電源,電源指示燈亮,按下開關(guān)按鈕,數(shù)碼管顯示當(dāng)前溫度。由于采用了智能溫度傳感器 DS18B20,所以本文所介紹的數(shù)字溫度計(jì)與傳統(tǒng)的溫度計(jì)相比它的轉(zhuǎn)換速率極快,進(jìn)行讀、寫操作非常簡便。它具有數(shù)字化輸出,可測量遠(yuǎn)距離的點(diǎn)溫度。系統(tǒng)具有微型化、微功耗、測量精度高、功能強(qiáng)大等特點(diǎn),加之 DS18B20 內(nèi)部的差錯(cuò)檢驗(yàn),所以它的抗干擾能力強(qiáng),性能可 靠,結(jié)構(gòu)簡單。 關(guān)鍵詞:單片機(jī),數(shù)字控制,溫度計(jì), DS18B20 Abstract This article introduces a microputerbased control of digital thermometers from the hardware description Temperature Control system design, hardware schematics and concise description. System program includes the main program, subroutine read temperature, the temperature conversion mand subroutine, subroutines calculate the temperature, display data refresh routines. Debugging of hardware and software were pleted, the program downloaded into the MCU, the circuit board connected to the power supply, power indicator light, press the switch button, digital display the current temperature. As a result of smart temperature sensor DS18B20, therefore, this article describes the traditional thermometer digital thermometer and the conversion rate pared to its fast, read, write with ease. It has a digital output, measurable distance of the point temperature. System has a micro, micropower, high precision, powerful characteristics, bined with the internal error DS18B20 test, its antiinterference ability, reliable, simple in structure. Key words: Singlechip