【正文】
本次畢業(yè)設(shè)計的開發(fā)與設(shè)計全部過程,對于我的重要意義在于能在進一步層次了解單片機的工作原理,內(nèi)部結(jié)構(gòu)和工作狀態(tài)。而T1的中斷正常與否,再由TO定時中斷子程序來監(jiān)視,以構(gòu)成了循環(huán),TO監(jiān)視T1,T1監(jiān)視主程序,主程序又來監(jiān)視TO,從而保證系統(tǒng)的穩(wěn)定運行。y)。 P20=1。 P21=0。當(dāng)達到高水位時,停止電動機,亮黃燈 SETB SETB CLR LJMP RESTART RET END(2)C語言程序設(shè)計 includedefine uchar unsigned chardefine uint unsigned intsbit P10=P1^0。主控程序的每次循環(huán)都將刷新T0的初值。所以在使用有看門狗的芯片時要注意清看門狗。只要在線圈兩端加上一定的電壓,線圈中就會流過一定的電流,從而產(chǎn)生電磁效應(yīng),銜鐵就會在電磁力吸引的作用下克服返回彈簧的拉力吸向鐵芯,從而帶動銜鐵的動觸點與靜觸點(常開觸點)吸合。(6)電源電路模塊電源電路雖然簡單,但需要功能可靠,所用采用兩個三端集成穩(wěn)壓器7807805,可以方便的實現(xiàn)此功能,電路如圖6所示圖6 電源電路(7)繼電器控制電路該電路由繼電器RL1和閉合開關(guān)、光電耦合器、水泵RRRR10以及DQ3等組成。5比轉(zhuǎn)數(shù)(ns)在前述水泵型號中,有些型號的組成部分有比轉(zhuǎn)數(shù)這個參數(shù)。損失揚程與管路上的水管和附件種類(低閥、閘閥、逆止閥、直管、彎管)、數(shù)量、水管內(nèi)徑、管長、水管內(nèi)壁粗糙程度以及水泵流量等都有密切關(guān)系,這一點在管路設(shè)計和選配水管和附件時也應(yīng)注意。1流量(Q) 泵的流量是指單位時間內(nèi)所排出的液體的數(shù)量。(4) 穩(wěn)壓電路 本電路的主要作用是使從傳感器輸出的電平能夠穩(wěn)定地輸入單片機中,主要由三極管的兩極放大穩(wěn)定電路組成,其工作過程是水位探測傳感器把探測到的電信號送給R12,如果送入的是高電平則R1QD由于PN結(jié)阻擋層的限制,在常態(tài)下,二者不能發(fā)生自然復(fù)合。本設(shè)計當(dāng)中我們采用的水位探測傳感器簡單易做,經(jīng)濟實惠。P2作輸入口使用時,因為有內(nèi)部的上拉電阻,那些被外部信號拉低的引腳會輸出一個電流(IIL)。在Flash編程時,P0端口接收指令字節(jié);而在校驗程序時,則輸出指令字節(jié)。因此,它可用作對外輸出的時鐘,或用于定時目的。當(dāng)采用外部振蕩器時,該引腳接收振蕩器的信號,即把此信號直接接到內(nèi)部時鐘發(fā)生器的輸入端。P1 口輸出驅(qū)動器能提供20mA 的灌電流驅(qū)動能力, 其鎖存器寫1 時可作為輸入口。二、 系統(tǒng)的硬件設(shè)計 硬件組成 水位控制系統(tǒng)的硬件主要包括單片機系統(tǒng)、水位探測傳感電路、光報警顯示電路、穩(wěn)壓電路、繼電器控制水泵加水電路、以及高塔模型組成。關(guān)鍵詞: 傳感器 單片機 程序設(shè)計 外圍硬件電路 Abstract: Many industrial production level is one of the important parameters in chemical industry, metallurgy, medicine, aviation, etc, the level measurement and control effect directly affect the quality of the products. This paper introduces a level controller based on microputer design method, the controller based on singlechip, through the peripheral hardware circuit to achieve the purpose of achieving control. Because of the single chip puter has small, less consumption, high control accuracy, reliable operation characteristics, so is widely used in production practice. This paper introduces the water level control system is the basic principle of work. This article expounds a kind of based on SCM general water level control system, and puts forward the basic position of this system modular hardware and software design method, this paper introduces a design for the core developed by AT89C2051 level control system, this system not only can level Tours of inspection, display and alarm, also can the level of intelligent control. Information age microcontroller technology is used for precision measurements of a kind of new technology.