【正文】
ide for A/D conversion to the characteristics of the measurement system that there are much more analog quantities,ADC0809 is used as A/D conversion chip,using LCD1602 as a display device,can collect realtime display of temperature,pressure,flow and liquid the same time,the system also designed the circuit for parameter setting and sound and light alarming function. This paper is divided into three part introduces multifunctional parameter detection system based on single chip first part,mainly introduced the system design,the functional requirements of system,the system block diagram is given,and the selection of some ponents,hardware and software development environments are introduced。The third part,the design idea of the software part is presented,and various functions such as data acquisition,display and buttons processing are discusses. Key words: Single chip microputer。 A/D conversion。Sound and light alarm III 目 錄 緒 論 .......................................................................................................................................... 1 1 方案設(shè)計(jì) .............................................................................................................................. 2 總體框架的設(shè)計(jì) ........................................................................................................ 2 單片機(jī)開發(fā)環(huán)境的選擇 ............................................................................................ 3 電路圖繪制軟件 .............................................................................................. 3 Keil_C軟件 ...................................................................................................... 4 2 硬件電路設(shè)計(jì) ...................................................................................................................... 6 傳感器的選型 ............................................................................................................ 6 單片機(jī)最小系統(tǒng)設(shè)計(jì) ................................................................................................ 6 單片機(jī)的選型 .................................................................................................. 6 時(shí)鐘電路與復(fù)位電路 ...................................................................................... 8 單片機(jī)使用注意事項(xiàng) .................................................................................... 10 電流電壓轉(zhuǎn)換電路設(shè)計(jì) .......................................................................................... 11 模擬量采集電路設(shè)計(jì) .............................................................................................. 13 ADC0809概述 ............................................................................................... 13 ADC0809與單片機(jī)接口電路 ....................................................................... 15 顯示電路設(shè)計(jì) .......................................................................................................... 16 LCD1602引腳結(jié)構(gòu) ....................................................................................... 16 LCD1602主要技術(shù)參數(shù)及特性 ................................................................... 16 LCD1602與單片機(jī)的接口電路 ................................................................... 17 按鍵接口電路設(shè)計(jì) .................................................................................................. 17 報(bào)警電路設(shè)計(jì) .......................................................................................................... 18 串行口功能設(shè)計(jì) ...................................................................................................... 19 RS232串行接口 ........................................................................................... 19 MAX232簡介 ................................................................................................ 20 3 軟件部分設(shè)計(jì) .................................................................................................................... 22 主程序工作流程 ...................................................................................................... 22 A/D轉(zhuǎn)換子程序 ...................................................................................................... 23 數(shù)字濾波及標(biāo)度變換程序設(shè)計(jì) .............................................................................. 24 IV 顯示程序設(shè)計(jì) .......................................................................................................... 25 按鍵處理程序設(shè)計(jì) .................................................................................................. 27 報(bào)警程序設(shè)計(jì) .......................................................................................................... 28 結(jié) 論 ........................................................................................................................................ 29 致 謝 ........................................................................................................................................ 30 參考文獻(xiàn) .................................................................................................................................. 31 附錄 A 硬件原理圖 ............................................................................................................... 32 附錄 B 程序代碼 ................................................................................................................... 33 附錄 C 實(shí)物圖 ....................................................................................................................... 46 1 緒 論 隨著計(jì)算機(jī)技術(shù)的發(fā)展,數(shù)據(jù)采集系統(tǒng)的應(yīng)用也日益廣泛 [1]。同時(shí),還要對(duì)某個(gè)檢測點(diǎn)的任意參數(shù)進(jìn)行隨機(jī)查詢,將所得到的檢測結(jié)果提取出來以便進(jìn)行比較做出決策,調(diào)整控制方案。數(shù)據(jù)采集系統(tǒng)直接影響控制系統(tǒng)的決策。 在過去的幾十年里,隨著信息領(lǐng)域技術(shù)的發(fā)展,數(shù)據(jù)采集方面的技術(shù)也取得了很大的進(jìn)步,采集數(shù)據(jù)的信息化是目前社會(huì)的發(fā)展主流方向。 單片機(jī)系統(tǒng)在開發(fā)過程中,程序設(shè)計(jì)語言的選擇尤為重要。它是一種編譯型程序設(shè)計(jì)語言,兼顧了多種高級(jí)語言 的特點(diǎn),并具備匯編語言的功能。 C51是一種結(jié)構(gòu)化程序設(shè)計(jì)語言,它支持當(dāng)前程序設(shè)計(jì)中廣泛采用的自頂向下結(jié)構(gòu)化程序設(shè)計(jì)技術(shù)。因此,使用 C51進(jìn)行程序設(shè)計(jì)已成為軟件開發(fā)的一個(gè)主流 [3]。 盡管現(xiàn)在 以微機(jī)為核心的可編程數(shù)據(jù)采集與處理采集技術(shù)的發(fā)展方向得到了迅速的發(fā)展,而且組成一個(gè)數(shù)據(jù)采集系統(tǒng)只需要一塊數(shù)據(jù)采集卡,把