【正文】
re, the allocation of new lowpower microsensors DHT11, using liquid crystal display LED1602 data collected, realizing the collection of temperature, humidity, two parameters, processing and display functions. Based on greenhouse environment as the research object, this paper introduces the temperature and humidity temperature and humidity measuring circuit, microcontroller peripheral circuit, software flow, assembly language source progra m design, the design process of the data acquisition system and the realization of the simulation method. The method can improve system development efficiency, shorten the cycle and reduce costs, provides a means for the development of singlechip microputer system. Results show that the design of environmental parameters, temperature control precision is stable in o. 1 ℃ , humidity of the error can be controlled within + / % RH. Key words: Protues, STC89C51, DHT11, LED1602, temperature and humidity 淮陰師范學(xué)院 畢業(yè)論文 3 目 錄 1 前言 ...................................................... 4 2 整體方案設(shè)計(jì) .............................................. 4 溫濕度測(cè)量測(cè)量系統(tǒng)的基本構(gòu)成 ............................. 4 溫濕度測(cè)量系統(tǒng)原理 ....................................... 5 系統(tǒng)框圖 ................................................ 5 3 硬件電路設(shè)計(jì) .............................................. 5 溫濕度傳感器模塊 ......................................... 5 DHT11 簡(jiǎn)介 ............................................. 6 傳感器性能說(shuō)明 ......................................... 6 接口說(shuō)明 .............................................. 7 電源引腳 .............................................. 7 串行接口 .............................................. 7 測(cè)量分辨率 ............................................ 9 LCD 顯示模塊 ............................................. 8 LCD1602 簡(jiǎn)介 ........................................... 8 LCD1602 接口電路 ...................................... 11 電源模塊 ............................................... 11 單片機(jī) STC89C51 模塊 ..................................... 12 4 系統(tǒng)軟件設(shè)計(jì) ............................................. 15 系統(tǒng)程序設(shè)計(jì)方案 ........................................ 15 系統(tǒng)流程圖 ............................................. 15 系統(tǒng)主要程序 ........................................... 15 5 系統(tǒng)仿真與調(diào)試 ........................................... 18 仿真結(jié)果 ............................................... 18 實(shí)驗(yàn)數(shù)據(jù)記錄 ........................................... 20 結(jié)論 ........................................................ 21 參考文獻(xiàn) .................................................... 22 致謝 ........................................................ 23 淮陰師范學(xué)院 畢業(yè)論文 4 1 前言 在單片機(jī)應(yīng)用系統(tǒng)的傳統(tǒng)開(kāi)發(fā)方式中,對(duì)系統(tǒng)的硬件電路進(jìn)行設(shè)計(jì)完成后,需要制作成實(shí)物的電路板,并結(jié)合單片機(jī)仿真器進(jìn)行軟硬件的聯(lián)合調(diào)試。 軟件是一款可以在單片機(jī)應(yīng)用系統(tǒng)仿真研發(fā)上應(yīng)用的 EDA軟件,是由英國(guó)的 Labcter Electronics公司推出的單片機(jī)集成開(kāi)發(fā)軟件,可通過(guò)此軟件搭建各種復(fù)雜的電路 ,并通過(guò)加載軟件程序?qū)崿F(xiàn)硬件仿糾亂本軟件能夠仿真 51系列、 AVR、 PIC、 ARM等主流單片機(jī),軟件集成了虛擬示波器、邏輯分析儀等從而建立起了完備的電子設(shè)計(jì)開(kāi)發(fā)環(huán)境,能夠?yàn)楫a(chǎn)品開(kāi)發(fā)節(jié)約大量的硬件成本和調(diào)試周期 [2]。本系統(tǒng)設(shè)計(jì)采用的 Keil5l高級(jí)語(yǔ)言集成開(kāi)發(fā)環(huán)境一 Keil uVision 3 IDE,是由美國(guó) Keil Software公司推出的一款主流單片機(jī)程序開(kāi)發(fā)軟件,它提供了包括 C編譯器、宏匯編、連接器、庫(kù)管理和一個(gè)功能強(qiáng)大的仿真調(diào)試器等在 內(nèi)的完整開(kāi)發(fā)方案,通過(guò)一個(gè)集成開(kāi)發(fā)環(huán)境 (uVision)將這些部分組合在一起。 在工業(yè)生產(chǎn)中,需要對(duì)多種環(huán)境指標(biāo)進(jìn)行監(jiān)控以確保工業(yè)生產(chǎn)安全、經(jīng)濟(jì)、有效的進(jìn)行。溫濕度測(cè)量系統(tǒng)就是針對(duì)這一現(xiàn)象而設(shè)計(jì)的、以單片機(jī)為核心的、對(duì)溫度、濕度同時(shí)進(jìn)行檢測(cè)的裝置 [6]。 % RH 以內(nèi) [7]。首先,以 STC89