【正文】
distemp(9,temp)。 j3=0。 //關(guān)出水閥 } if(temp(deTemp+2)*10) { KeChu=1。 //進(jìn)水閥打開 j2=0。 } } void distemp(uchar add,uint temp) { uchar bai,shi,ge。 write_(0x06)。 lcden=1 。}void delay10ms(void) { unsigned char i,j。 //下限限位開關(guān)sbit key1=P3^4。北京。特別是在畢業(yè)設(shè)計(jì)整個(gè)過程中,高老師對(duì)我進(jìn)行了盡心盡力地指導(dǎo),他認(rèn)真負(fù)責(zé)的工作態(tài)度,嚴(yán)謹(jǐn)?shù)闹螌W(xué)精神和深厚的專業(yè)知識(shí)令我受益匪淺,終身難忘。 第三部分是供電。⑵數(shù)字式接口液晶顯示器都是數(shù)字式的,和單片機(jī)系統(tǒng)的接口更加簡單可靠,操作更加方便。本次畢業(yè)設(shè)計(jì)我們選用的是液晶顯示器。C (–67176。本設(shè)計(jì)的時(shí)鐘電路如圖24所示: 圖24 時(shí)鐘電路復(fù)位是單片機(jī)的初始化操作,其重要功能是把PC初始化為0000H,是單片機(jī)從0000H單元開始執(zhí)行程序。手動(dòng)電平方式和脈沖方式是常見的兩種按鍵手動(dòng)復(fù)位方式,而電平復(fù)位是由RST兩端將電阻與電源VCC接通,從而實(shí)現(xiàn)此功能的。第四,提高并行口驅(qū)動(dòng)能力,以減少外圍驅(qū)動(dòng)芯片,增加外圍I/O口邏輯功能和控制的靈活性。目前,單片機(jī)在工業(yè)控制系統(tǒng)等諸多領(lǐng)域得到了極為廣泛的應(yīng)用。s pursuit of material life, people on the level of automation is more and more high. The control system of the design is the use of automatic control technology to realize its function, which not only greatly improves the production efficiency, but also reduces the danger coefficient, protect the personal safety. This design uses STC89C52 microcontroller as the data processing and control unit, data processing, control the temperature sensor and the liquid level sensor, and pass the signal of temperature and liquid level signal to the microcontroller. After the singlechip microputer for data processing, sends a control signal to control the execution module state, and the temperature and liquid level height is sent to the LCD display. Acquisition and display this design can not only realize the temperature and liquid level signal, and can use the buttons to set the temperature and liquid level limit value, through the operation to the data processing, sends a control signal to control the liquid level of the objective. This system uses STC89C52 as the core, using the temperature sensor DS18B20 to collect temperature signal, at the same time with the ball float type liquid level sensor to measure liquid level, maximum and minimum value and through the keyboard to set the level, so as to achieve the purpose of automatic control.Keywords: single chip microputer。 temperature sensor。本設(shè)計(jì)也是采用單片機(jī)作為系統(tǒng)的控制核心,根據(jù)系統(tǒng)設(shè)計(jì)的要求與要實(shí)現(xiàn)的功能,本次畢業(yè)設(shè)計(jì)采用STC89C52RC單片機(jī)為控制核心,通過DS18B20采集溫度,然后通過模數(shù)轉(zhuǎn)換,與單片機(jī)連接,并通過LED1602顯示出來,同時(shí)把采集到的溫度信號(hào)與給定值比較,如果溫度高于給定值的最高值或低于給定值的最低值時(shí),系統(tǒng)就會(huì)自動(dòng)的進(jìn)行的停止加水和開始加水,從而實(shí)現(xiàn)熱水鍋爐溫度檢測(cè)系統(tǒng)的設(shè)計(jì),本設(shè)計(jì)還采用浮球式液位傳感器檢測(cè)鍋爐內(nèi)的水位,并利用單片機(jī)來控制水泵,從而達(dá)到控制液位的目的。第五,以串行方式為主的外圍擴(kuò)展。單片機(jī)的時(shí)鐘電路由通常由兩個(gè)電容和一個(gè)晶振而組成,本設(shè)計(jì)的單片機(jī)復(fù)位電路如下圖22所示,單片機(jī)最小系統(tǒng)如圖23所示:圖22 單片機(jī)復(fù)位電路圖23 單片機(jī)最小系統(tǒng)STC89C52是一款低功耗,高性能的CMOS8位微控制器。出了進(jìn)入系統(tǒng)的正常初始化之外,當(dāng)由于程序運(yùn)行出錯(cuò)或操作錯(cuò)誤使系統(tǒng)處于死鎖狀態(tài)時(shí),也需要復(fù)位鍵重新啟動(dòng)。F ~+257176。(1)液晶顯示原理 液晶顯示的原理是液晶是一種呈液體狀的化學(xué)物質(zhì),和磁場(chǎng)中的金屬有同樣的特點(diǎn),當(dāng)受到外界電場(chǎng)影響時(shí),其分子會(huì)產(chǎn)生精確的有序排列。體積小、重量輕,液晶顯示器通過顯示屏上的電極控制液晶分子狀態(tài)來達(dá)到顯示的目的,在重量上比相同顯示面積的傳統(tǒng)顯示器要輕得多。15腳GND、16腳VCC(+5v)。無論在理論上還是在實(shí)踐中,他都給予了我極大的幫助,這期間學(xué)到的知識(shí),對(duì)我將來的工作和學(xué)習(xí)都起到了很大的幫助,感謝他細(xì)心而又耐心的指導(dǎo)。中國電力出版社,2003,6[15][J].2008,10[16]黃金波,[J].遼寧工程技術(shù)大學(xué)學(xué)報(bào),2002,6[17]Application of Fuzzy logic in boiler control. Vjekoslav Galzina。 //出水sbit key2=P3^2。 for(i=5。 delay(5)。 write_(0x01)。 bai=temp/100。 //出水閥關(guān)閉 j3=0。 j3=0。 shi=deTemp/10。 //EA=1。 temp=tmp()。 j2=0。 //加熱 j2=0。up==1) { j1=1。 delay(5)。 write_(0x0c)。 delay(5)。 i++)。 //上限限位開關(guān)sbit down=P0^5。北京工業(yè)大學(xué)碩士學(xué)位論文,2009,9 [14]林文孚,[M].。謝 辭在本次畢業(yè)設(shè)計(jì)中,我學(xué)到了很多平時(shí)學(xué)不到的東西,雖然在設(shè)計(jì)期間,我也遇到了不少的問題,但通過去圖書管查閱資料和請(qǐng)教老師,把問題基本都解決了,獲得了不少的專業(yè)知識(shí)。 TTL/CMOS數(shù)據(jù)從T1IN、T2IN輸入轉(zhuǎn)換成RS232數(shù)據(jù)從T1OUT、T2OUT送到電腦DB9插頭;DB9插頭的RS232數(shù)據(jù)從R1IN、R2IN輸入轉(zhuǎn)換成TTL/CMOS數(shù)據(jù)后從R1OUT、R2OUT輸出。因此,液晶顯示器畫質(zhì)高且不會(huì)閃爍。在單片機(jī)的人機(jī)交流界面中,一般的輸出方式有以下幾種:發(fā)光管、LED數(shù)碼管、液晶顯示器。C ~+125176。根據(jù)所實(shí)際選用的電容的大小值,從而達(dá)到對(duì)頻率的微調(diào)作用。除了上面所說的上電自動(dòng)復(fù)位方式之外,有時(shí)按鍵手動(dòng)復(fù)位也會(huì)用到。第三,增大存儲(chǔ)容量,片內(nèi)EPROM的E2PROM化,程序的保密化。尤其是在單片機(jī)技術(shù)出現(xiàn)之后,由于它具有極好的穩(wěn)定性,更快和更準(zhǔn)確的運(yùn)算精度,它給現(xiàn)代工業(yè)控制測(cè)控領(lǐng)域帶來了極大的方便。關(guān)鍵詞: 單片機(jī); 溫度傳感器;液位傳感器;驅(qū)動(dòng)電路Design of boiler automatic watersupply systemAbstract:In many fields of modern science and technology, with the development of science and technology, automatic