【正文】
參考文獻(xiàn)[1][M].北京:機(jī)械工業(yè)出版社,.[2][M].北京:北京航空航天大學(xué),.[3][M].大連:大連理工大學(xué)出版社,.[4][M].北京:化學(xué)工業(yè)出版社,.[5]李永生,[J].. 13.[6]李忠國(guó),[M].北京:人民郵電出版社,.[7][J]..(3):12[8]宋浩,[M].北京:清華大學(xué)出版社,.[9]張保衛(wèi),尚家封,[J].山東消防,[10]羅翼,[M].北京:中國(guó)電力出版社,.[13]堂賢遠(yuǎn),[M].西安:電子科技大學(xué)出版社,.附錄Ⅰ可燃?xì)怏w探測(cè)報(bào)警器程序清單:附錄Ⅱ:外文原文1: With the puter in the social sphere in recent years, the penetration and the development of large scale integrated circuits, microcontroller applications are continually deepening, because of its powerful function, small size, low power consumption, cheap, reliable, easy to use, etc. therefore particularly suitable for systems with control of more and more widely used in automatic control, intelligent instruments, meters, data acquisition, military products and home appliances fields, SCM is often used as a core ponent in according to the specific hardware architecture, and applicationspecific features of the software objects are bined to make perfect. Structure and function of the MCS51 series onechip puter MCS51 is a name of a piece of onechip puter series which Intel Company produces. This pany introduced 8 topgrade onechip puters of MCS51 series in 1980 after introducing 8 onechip puters of MCS48 series in 1976. It belong to a lot of kinds this line of onechip puter the chips have,such as 8051, 8031, 8751, 80C51BH, 80C31BH,etc., their basic position, basic performance and instruction system are all the same. 8051 daily representatives 51 serial onechip puters . An onechip puter system is made up of several following parts: ( 1) One microprocessor of 8 (CPU). ( 2) At slice data memory RAM (128B/256B),it use not depositting not can reading /data that write, such as result not middle of operation, final result and data wanted to show, etc. ( 3) Procedure memory ROM/EPROM (4KB/8KB ), is used to preserve the procedure , some initial data and form in slice. But does not take ROM/EPROM within some onechip puters, such as 8031 , 8032, 80C ,etc.. ( 4) Four 8 run side by side I/O interface P0 four P3, each mouth can use as introduction , may use as exporting too. ( 5) Two timer / counter, each timer / counter may set up and count in the way, used to count to the external incident, can set up into a timing way too, and can according to count or result of timing realize the control of the puter. ( 6) Five cut off cutting off the control system of the source . ( 7) One all duplexing serial I/O mouth of UART (universal asynchronous receiver/transmitter (UART) ), is it realize onechip puter or onechip puter and serial munication of puter to use for. ( 8) Stretch oscillator and clock produce circuit, quartz crystal finely tune electric capacity need outer. Allow oscillation frequency as 12 megahertas now at most. Every the abovementioned part was joined through the inside data bus .Among them, CPU is a core of the onechip puter, it is the control of the puter and mand centre, made up of such parts as arithmetic unit and controller , etc.. The arithmetic unit can carry on 8 persons of arithmetic operation and unit ALU of logic operation while including one, the 1 storing device temporarilies of 8, storing device 2 temporarily, 839。通過(guò)這次設(shè)計(jì),我明顯感覺(jué)到“書(shū)到用時(shí)方恨少”。通過(guò)對(duì)可燃?xì)怏w探測(cè)報(bào)警器的設(shè)計(jì),將我學(xué)過(guò)的理論知識(shí)運(yùn)用到了實(shí)踐中,同時(shí)對(duì)所學(xué)過(guò)的知識(shí)有了更深層次的理解與掌握,將從前那些模糊的知識(shí)逐漸理解與加深了印象,這次的課程設(shè)計(jì)對(duì)我們以后從事的工作有著很大的幫助,學(xué)會(huì)了運(yùn)用各種畫(huà)圖軟件,同時(shí),也鍛煉了我的獨(dú)立思考及解決問(wèn)題的能力,通過(guò)和同組同學(xué)的交流,學(xué)到了許多知識(shí),如何處理設(shè)計(jì)過(guò)程中遇到的各種問(wèn)題,鍛煉了我們解決問(wèn)題的能力。另外,他在學(xué)術(shù)上的嚴(yán)謹(jǐn)精神也是我永遠(yuǎn)學(xué)習(xí)的榜樣,并將對(duì)我今后的學(xué)習(xí)和工作產(chǎn)生積極的影響。首先,我要感謝的是我的指導(dǎo)老師杜先君老師,杜先君老師平日里工作繁忙,但為了我們能順利的畢業(yè),在撰寫(xiě)畢業(yè)論文的每個(gè)階段,都給予了我們細(xì)心的指導(dǎo)和無(wú)微不至的幫助。 74LS373N為地址鎖存器,2764為8K8內(nèi)存擴(kuò)展. 74LS74N為D觸發(fā)器,產(chǎn)生脈沖,同時(shí)進(jìn)行2分頻。 8255為接口擴(kuò)展電路,主要進(jìn)行鍵盤(pán)控制。 鑒于單片機(jī)AT89C51具有高集成度等優(yōu)點(diǎn),設(shè)計(jì)了一種基于AT89C51的可燃?xì)怏w探測(cè)報(bào)警器,為了提高系統(tǒng)的靈敏度和準(zhǔn)確性,采用了一種十分穩(wěn)定的傳感器NGC0001,傳感器對(duì)一氧化碳?xì)怏w進(jìn)行采集,將采集到的信號(hào)經(jīng)過(guò)AD623放大,傳送給模數(shù)轉(zhuǎn)換器ADC0809。當(dāng)超過(guò)報(bào)警值時(shí),啟動(dòng)報(bào)警器報(bào)警. 鍵盤(pán)掃描子程序?qū)τ讵?dú)立式鍵盤(pán)的掃描處理程序,程序編寫(xiě)的結(jié)構(gòu)流程是:當(dāng)處理器處理完初始化程序后,進(jìn)行鍵盤(pán)掃描,當(dāng)判斷有鍵按下時(shí),首先進(jìn)行延時(shí)、消抖處理,然后再判斷是否是干擾,如果不是干擾,則記錄下現(xiàn)在鍵盤(pán)接口的狀態(tài),同時(shí)等待按鍵釋放,待按鍵釋放后,再進(jìn)行延時(shí)、去抖處理,此時(shí),已經(jīng)沒(méi)有按鍵按下了。 報(bào)警電路控制程序設(shè)計(jì)流程圖。 報(bào)警子程序的設(shè)計(jì) 報(bào)警電路控制流程。因此,, 用它的輸出去驅(qū)動(dòng)數(shù)碼管顯示當(dāng)前的氣體濃度。因此可以用查詢(xún)方式,測(cè)試EOC的狀態(tài),即可確認(rèn)轉(zhuǎn)換是否完成,并接著進(jìn)行數(shù)據(jù)傳送把表明轉(zhuǎn)換完成的狀態(tài)信號(hào)(EOC)作為中斷請(qǐng)求信號(hào),以中斷方式進(jìn)行數(shù)據(jù)傳送,不管使用上述那種方式,只要一旦確定轉(zhuǎn)換完成,即可通過(guò)指令進(jìn)行數(shù)據(jù)傳送,首先送出口地址并以信號(hào)有效時(shí),OE信號(hào)即有效,把轉(zhuǎn)換數(shù)據(jù)送上數(shù)據(jù)總線(xiàn),供單片機(jī)接受。 A/D轉(zhuǎn)換控制程序設(shè)計(jì)流程圖A/在硬件電路中START,ALE這兩個(gè)信號(hào)端連接在一起,這時(shí)通過(guò)軟件輸入一個(gè)正脈沖信號(hào),便立即啟動(dòng)模/數(shù)轉(zhuǎn)換。傳感器通過(guò)通道IN0將信號(hào)傳送給ADC0809。同時(shí)送入數(shù)碼管顯示氣體濃度值,電路的整體設(shè)計(jì)到報(bào)警提示及處理的措施,:開(kāi)始 系統(tǒng)初始化 設(shè)定濃度? 啟動(dòng)換氣扇 YN 采集濃度 查詢(xún)濃度 調(diào)A/D轉(zhuǎn)換子程序 調(diào)顯示子程序 與設(shè)定值比較 是否大于上限值? NY 報(bào)警器報(bào)警 啟動(dòng)換氣扇 主程序設(shè)計(jì)流程圖 A/D轉(zhuǎn)換子程序設(shè)計(jì) A/D轉(zhuǎn)換控制流程圖 A/D轉(zhuǎn)換控制流程圖A/D轉(zhuǎn)換控制流程圖如圖3所示。在上一章中已經(jīng)將整個(gè)系統(tǒng)的硬件部分作了介紹,在這一章中將就系統(tǒng)的軟件部分加以分析說(shuō)明。程序編程可以采用C語(yǔ)言也可采用匯編語(yǔ)言,本次設(shè)計(jì)中采用匯編語(yǔ)言編程,匯編語(yǔ)言(AssemblyLanguage)是面向機(jī)器的程序設(shè)計(jì)語(yǔ)言,在匯編語(yǔ)言中,用助記符(Memoni)代替操作碼,用地址符號(hào)(Symbol)或標(biāo)號(hào)(Label)代替地址碼,這樣用符號(hào)代替機(jī)器語(yǔ)言的二進(jìn)制碼,就把機(jī)器語(yǔ)言變成了匯編語(yǔ)言,于是匯編語(yǔ)言亦稱(chēng)為符號(hào)語(yǔ)言。 當(dāng)A0=1,A1=0時(shí),PC口被選擇。 A0,A1:地址選擇線(xiàn),用來(lái)選擇8255的PA口,PB口,PC口和控制寄存器. 當(dāng)A0=0,A1=0時(shí),PA口被選擇。 PC0~PC7:端口C輸入輸出線(xiàn),一個(gè)8位的數(shù)據(jù)輸出鎖存器/緩沖器, 一個(gè)8位的數(shù)據(jù)輸入緩沖器。 PA0~PA7:端口A輸入輸出線(xiàn),一個(gè)8位的數(shù)據(jù)輸出鎖存器/緩沖器, 一個(gè)8位的數(shù)據(jù)輸入鎖存器。 WR:寫(xiě)入信號(hào),當(dāng)這個(gè)輸入引腳為低電平時(shí),即/WR=0且/CS=0時(shí),允許CPU將數(shù)據(jù)或控制字寫(xiě)入8255。 CS:芯片選擇信號(hào)線(xiàn),當(dāng)這個(gè)輸入引腳為低電平時(shí),即/CS=0時(shí),表示芯片被選中,允許8255與CPU進(jìn)行通訊。特性(1)一個(gè)并行輸入/輸出的LSI芯片,多功能的I/O器件,可作為CPU總線(xiàn)與外圍的接口. (2)具有24個(gè)可編程設(shè)置的I/O口,即3組8位的I/O口為PA口,A組包括A口及C口(高4位,PC4~PC7),B組包括B口及C口(低4位,PC0~PC3