【正文】
兩個(gè) 16 位定時(shí)器 /計(jì)數(shù)器 片內(nèi)振蕩器和時(shí)鐘電路 AT89C51 的引腳排列如 上 圖圖 31 所示 . 單片機(jī)控制電路 單片機(jī)模塊即主控模塊,完成功能是與各個(gè)功能模塊連接,并通過(guò)軟件編程控制各個(gè)模塊功能,完成煤氣、天然氣檢測(cè)報(bào)警及溫度顯示功能。 傳感元件:又稱轉(zhuǎn)換器,一般情況下,不直接感受被測(cè)量,而是將敏感元件的輸出量轉(zhuǎn)化為電量輸出的元件。 MQ7 型氣敏元件的結(jié)構(gòu)和外形及其引腳結(jié)構(gòu)電路連接如圖所示。對(duì)一氧化碳具有很高的靈敏度和良好的選擇性,具有長(zhǎng)期的使用壽命和可靠的穩(wěn)定性,應(yīng)用于家庭、環(huán)境的一氧化碳探測(cè)裝置。 MQ7 型氣敏元件的敏感是用非常穩(wěn)定的二氧化錫制成的,因此,它具有優(yōu)秀的長(zhǎng)期穩(wěn)定性,在正常使用條件下,其使用壽命可達(dá) 5 年。 靈敏度的調(diào)整程序: (1)將傳感器連接在應(yīng)用回路中; (2)接通電源,通電老化 48h 以上; (3)調(diào)整負(fù)載電阻 RL至獲得對(duì)應(yīng)于某一個(gè)一氧化碳濃度時(shí)所需要的信號(hào)值。 圖 37 聲光報(bào)警原理圖 溫 度檢測(cè)模塊 溫度傳感器 DS18B20 接收到溫度轉(zhuǎn)換命令后,開(kāi)始啟動(dòng)轉(zhuǎn)換。 bit7 bit0 LS Byte bit15 bit8 MS Byte 圖 38 溫度寄存器格式 這是 16 位轉(zhuǎn)換后得到的 16 位數(shù)據(jù),存儲(chǔ)在 18B20 的兩個(gè) 8 比特的 RAM 中,二進(jìn)制中的前五位是符號(hào)位,如果測(cè)得的溫度值大于 0,這五位為 0,只要將測(cè)到的數(shù)據(jù)乘以 即可得到實(shí)際的 溫度;如果溫度小于 0,這五位為 1,測(cè)到的溫度值需取反加 1 再乘以 即可得到實(shí)際溫度。使用 DS18B20 時(shí),首先需將其復(fù)位,然后才能執(zhí)行其他命令。然后根據(jù)寫“ 0 或?qū)憽?1”來(lái)使數(shù)據(jù)線變高或繼續(xù)為低。當(dāng)主機(jī)從 DS18B20 讀數(shù)據(jù)時(shí),主機(jī)先向數(shù)據(jù)線激發(fā)出低電平,然后釋放,以使數(shù)據(jù)線再升為高電平。 DS18B20 可以把溫度直接轉(zhuǎn)化為串行數(shù)字信號(hào),使用中不需要附加電路,但與主機(jī)通信有嚴(yán)格的時(shí)序要求。 限流電阻阻值計(jì)算,由于七段數(shù)碼管工作電壓為 2V,而 74LS245 輸出高電平,因此限流電阻兩端電壓為 。 74LS245 用來(lái)驅(qū)動(dòng) LED 或者其他的設(shè)備,它是 8 路同相三態(tài)雙向總線收發(fā)器,可雙向傳輸數(shù)據(jù), 74LS245 引腳圖如 313 所示。 畢業(yè)設(shè)計(jì)用紙 第 16頁(yè) 共 30 頁(yè) 圖 313 74LS245 引腳圖 ( 5)由于 P2口始終輸出地址的高 8 位,接口時(shí) 74LS245 的三態(tài)控制端 /1G 和 /2G接地, P2 口與驅(qū)動(dòng)器輸入線對(duì)應(yīng)相連。七段數(shù)碼管段選位通過(guò)限流電阻接到 74LS245的 A總線,74LS245 的 B 總線接單片機(jī)的 P2 口。數(shù)碼管的 4 位位選位接晶體管集電極, 4 個(gè)晶體管的基集 B1B4分別接單片機(jī)的 口。 匯編語(yǔ)言 子 程序源代碼(見(jiàn)附錄 C) Y N 顯示負(fù)號(hào),延時(shí) 顯示十位,延時(shí) 顯示個(gè)位,延時(shí) 顯示小數(shù)位,延時(shí) 返回 圖 42 顯示子程序 溫度為負(fù) 取溫度 顯示百位,延時(shí) 畢業(yè)設(shè)計(jì)用紙 第 20頁(yè) 共 30 頁(yè) 第 五 章 系統(tǒng)仿真調(diào)試 氣體檢測(cè)模塊仿真 由于 Proteus 軟件元件庫(kù)中沒(méi)有 MQ7 氣體傳感器,由于 MQ7 氣體傳感器兩信號(hào)輸出端為電阻信號(hào),由附錄 A 中 MQ7 靈敏度特性可得 RS 阻值范圍為 2~ 20KΩ,所以仿真時(shí) MQ7 氣體傳感器由 20KΩ的滑動(dòng)變阻器代替。蜂鳴器與 LED 串聯(lián),負(fù)端接至 口,正端接 5V電源。 ( 3)同時(shí),測(cè)量信號(hào)也受實(shí)驗(yàn)器材、環(huán)境等諸多因素的影響。 圖 52 溫度部分仿真效果 溫度顯示部分調(diào)試 由于 DS18B20 輸出為 16 位二進(jìn)制數(shù),實(shí)驗(yàn)中無(wú)法測(cè)得此信號(hào),因此僅對(duì)溫度顯示部分進(jìn)行調(diào)試。此時(shí) DS18B20 設(shè)定溫度為 ℃,經(jīng) 4 位七段數(shù)碼管顯示為 ℃,溫度顯示結(jié)果同樣正確。該傳感器是對(duì)烷類氣體為主的多種氣體有良好敏感特性的廣譜型半導(dǎo)體敏感器件。 氣體報(bào)警器能 實(shí)時(shí)范圍檢測(cè)工作,當(dāng)煙霧的濃度達(dá)到設(shè)定的濃度 的 時(shí) 候 ,發(fā)出聲光報(bào)警。 ,當(dāng)報(bào)警器報(bào)警時(shí),管理中心 或控制中心同時(shí)收到常開(kāi)常閉( NO、NC)信號(hào)。機(jī)械工業(yè)出版社, 2020 [2]景曉松 , 單片機(jī)電路設(shè)計(jì)實(shí)例 [D], 呼和浩特 :內(nèi)蒙古大學(xué) ,2020 [3]周潤(rùn)景 ,徐宏偉 ,丁莉 , 單片機(jī)電路設(shè)計(jì)、分析與制作 . [4]陶紅艷 ,余成波傳感器與現(xiàn)代檢測(cè)技術(shù) [M], 北京 :清華大學(xué)出版社 。 1second TH( L) 加熱時(shí)間(低) 90177。 VH(低 ): 177。轉(zhuǎn)換數(shù)據(jù)低位字節(jié) INTEG EQU 32H 。百位存儲(chǔ) SEG_S EQU 36H 。生成顯示碼 LCALL DISPLAY 。個(gè)位數(shù)段碼 MOV A,DECIM MOV B,10 MUL AB MOV B,16 DIV AB MOVC A,A+DPTR 。顯示十位 MOV P2,SEG_S LCALL DELAY CLR SETB 。首次接觸如此系統(tǒng)的設(shè)計(jì),開(kāi)始無(wú)論是選題還是整體設(shè)計(jì)框架及格式的排版等都一無(wú)所知無(wú)從入手,是 何成平指導(dǎo) 老師的精心指導(dǎo)才給我指明了方向。再次真誠(chéng)感謝所有幫助過(guò)我的老師同學(xué)。s time for the wild fruits to ripe. The picturesque Arxan in Autumn is indeed a fairyland only exists in a dream that satisfies all your fantasies. If it rains heavily on Saturday night, some elderly Chinese will say it is because Zhinu, or the Weaving Maid, is crying on the day she met her husband Niulang, or the Cowherd, on the Milky Way. Most Chinese remember being told this romantic tragedy when they were children on Qixi, or the Seventh Night Festival, which falls on the seventh day of the seventh lunar month, which is usually in early August. This year it falls on Saturday, August 2. Folklore Story As the story goes, once there was a cowherd, Niulang, who lived with his elder brother and sisterinlaw. But she disliked and abused him, and the boy was。 ll wait in the line for one hour to get a ticket, and another two hours at the site, to only see a tiny bit of the place due to the crowds. Last year, 428 million tourists traveled in China over the weeklong holiday in October. Traveling during this period is a matter that needs thorough preparation. If you are short on time to plan the uping Golden Week it may not be a bad idea to avoid some of the most crowded places for now. There is always a place so fascinating that everyone yearns for. Arxan is a place like this. The beauty of Arxan is everlasting regardless of the changing of four seasons. Bestowed by nature, its spectacular seasonal landscape and mountains are just beyond word. Arxan is a crucial destination for the remended travelling route, China Inner Mongolia Arxan — Hailar — Manzhouli. It is also the joint of the four prairies across the SinoMongolian border, where people gravitate towards the exotic atmosphere mixed with Chinese, Russian, and Mongolia elements. As a historic site for the Yitian Battle, Arxan still embodies the spirit of Genghis Khan. Walking into Arxan, you will be amazed by a kaleidoscope of geous colors all the year round the Spring azaleas blooming red in the snow, the Summer sea wavering blue in the breeze, the Autumn leaves painted in yellow covering volcanic traces, and the Winter woods shining white on the vast alpine snowscape. Hinggan League Arxan city is situated in the far eastern area of Inner Mongolia Autonomous Region. Its full name Haren Arxan means hot holy water in the Mongolian language. Arxan is a tourism city in the northern frontier with a blend of large forest, grand prairies, vast snowfield, heaven lake cluster, thermium, as well as volcanic cluster. It is a