freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內容

基于單片機的機械通風控制系統(tǒng)的設計與仿真-閱讀頁

2024-12-19 10:21本頁面
  

【正文】 信號; ( d)巷道內溫度變化; ( e)通過 AD轉換巷道內溫度為數(shù)字信號; ( f)引起觸發(fā)單片機工作讀取數(shù)據; ( g)單片機讀取數(shù)據控制液晶顯示,同時進行與設定的數(shù)值進行比較: ( 1)實際值在正常值范圍內; ( 2)實際值大于警戒值小于危險值; ( 3)實際值大于危險值。 主要代碼分析 include include include 以上三個為頭文件,本系統(tǒng)算法主要分為三個部分,液晶顯示工作部分、溫度模數(shù)轉換部分、主函數(shù)部分。 sbit jingbao=P2^7。 以上兩段代碼,主要用于定義蜂鳴器報警引腳和對各種模式數(shù)值進行初始化。 IT0=1。 } 以上代碼為初始化,開總中斷,開外部中斷,開定時器中斷,用于觸發(fā)中斷信號 。 unsigned char nongdu。 LCD_Init()。 LCD_Disp_String(0,0,NongDu。 Write_PCF8591(1,0)。 第五章 系統(tǒng)算法軟件測試 軟件調試 所謂軟件調試,是將編制的程序投入實際運行前,用手工或編譯程序等方法進行測試,修正語法錯誤和邏輯錯誤的過程。編完單片機程序,必須送入單片機中測試。 第一步,使用 Keil uVision4軟件調試程序。 第二步,聯(lián)系程序的實際運行情況調試程序。我們將編輯好的 C語言程序編譯連接并生成 hex文件,并將 hex文件下載到單片機中。 proteus 簡介 Proteus是世界上著名的 EDA工具 (仿真軟件 ),從原理圖布圖、代碼調試到 單片機與外圍電路協(xié)同仿真,一鍵切換到 PCB設計,真正實現(xiàn)了從概念到產品的完整設計。在編譯方面,它也支持 IAR、 Keil和 MPLAB等多種 編譯器 。 15 當巷道內溫度處于正常值時,主風機以低速緩慢向巷道內輸送新鮮空氣。 當巷道內的溫度達到警戒值時,此時主風機加快運轉以中速運轉,此時副風機開始中速正向輸送新鮮空氣。 當溫度低于危險值又大于警戒值時,此時主風機和副風機都減速以中速正向運轉向巷道內輸送新鮮空氣。 當溫度處于正常值時,主風機減速為低速運行向巷道內輸送新鮮控制,和副風機則緩慢減速直至停止。實現(xiàn)了軟件測試,分析了詳細的實驗結果,從而驗證了該基于單片機的機械通風控制系統(tǒng)的可行性。當溫度處于正常工作范圍時,綠燈亮,紅燈此時不工作;當溫度大于上限范圍值時,此時紅燈閃爍。如此 反復循環(huán),不斷監(jiān)控溫度。并控制通風機和蜂鳴器工作。 本章小結 本章詳細介紹了該機械通風控制系統(tǒng)研究的實驗結果,詳細進行了該機械通風系統(tǒng)算法的系統(tǒng)測試,得出了實驗測試的結果,說明了可行性操作。設計過程中考慮到了硬件與軟件的相互補充,系統(tǒng)運行穩(wěn)定,結構小巧美觀。在畢業(yè)設計期間,老師傳授了許多的實際經驗和方法,給予了大量的富于啟發(fā)性與建設性的建議。在此,謹向劉曉燕老師致以最誠摯的謝意。/ sbit d1=P1^0。/ sbit d3=P1^2。 sbit ji1=P3^3。 sbit rs=P2^0。 sbit en=P2^2。 bit flag_f。 uchar code table1[]= NOW IS: C。 char hf=39。,hs=4,hg=0,hd=0,lf=39。,ls=1,lg=5,ld=0。 } void delayms(uint ms) { uint x,y。x0。y110。 } void lcd_write_(uchar ) 18 { delayms(5)。 rw=0。 // delayms(1)。 P0=。 } void lcd_write_date(uchar date) { delayms(5)。 rw=0。 // delayms(1)。 P0=date。 rs=0。 delayms(15)。 delayms(5)。 19 delayms(5)。 delayms(1)。 delayms(1)。 delayms(1)。 delayms(1)。 delayms(1)。i14。 delayms(1)。 for(i=0。i++) { lcd_write_date(table2[i])。 } } void ds18b20_init() { uchar x。 DQ=1。 20 DQ=0。 DQ=1。 x=DQ。 // TR0=1。TR0=0。i8。 DQ=dateamp。 delayus(5)。 date=1。 delayus(5)。 TR0=0。i8。 date=1。 if(DQ) 21 date|=0x80。 }TR0=1。 } void ds18b20_start() { ds18b20_init()。 ds18b20_write_date(0x44)。 } uint ds18b20_temperature(void) { uchar a。 ds18b20_init()。 ds18b20_write_date(0x44)。 ds18b20_init()。 ds18b20_write_date(0xbe)。 b=ds18b20_read_date()。 t=a+b。 } sbit k1=P3^0。 sbit k3=P3^2。 void key_scan() { if(k1==0) { delayms(10)。 delayms(10)。 if(k==9)k=0。 lcd_write_(0x0c)。 }break。d1=1。d3=1。 lcd_write_(0x0f)。 }break。 }break。 }break。 }break。 }break。 }break。 }break。 }break。 if(k2==0) { while(!k2)。 if(k==1) { if(hf==39。)hf=39。 else hf=39。 lcd_write_date(hf)。 } if(k==2) { hs++。 lcd_write_date(hs+0x30)。 } if(k==3) { hg++。 lcd_write_date(hg+0x30)。 } if(k==4) { hd++。 lcd_write_date(hd+0x30)。 } if(k==5) { if(lf==39。)lf=39。 else lf=39。 lcd_write_date(lf)。 } if(k==6) { ls++。 lcd_write_date(ls+0x30)。 } if(k==7) { lg++。 lcd_write_date(lg+0x30)。 } if(k==8) { ld++。 26 lcd_write_date(ld+0x30)。 } } } if(k3==0) { delayms(10)。 delayms(10)。+39。39。+39。 lcd_write_(0x80+0x40+2)。 if(hs0)hs=9。 lcd_write_(0x80+0x40+3)。if(hg0)hg=9。 lcd_write_(0x80+0x40+4)。if(hd0)hd=9。 lcd_write_(0x80+0x40+6)。+39。39。+39。 lcd_write_(0x80+0x40+10)。 if(ls0)ls=9。 lcd_write_(0x80+0x40+11)。if(lg0)lg=9。 lcd_write_(0x80+0x40+12)。if(ld0)ld=9。 lcd_write_(0x80+0x40+14)。 int lin1,lin2。 ji2=1。 ds18b20_start()。 while(1) { key_scan()。 if(iamp。 i=i+1。 } else flag_f=0。 templ=iamp。 templ=(uchar)(templ*)。 if(flag_f) lcd_write_date(39。)。+39。 lcd_write_date(temph/10+0x30)。 lcd_write_date(39。)。 delayms(10)。+39。 else lin1=((hs*10+hg)*16+hd)*(1)。+39。 else lin2=((ls*10+lg)*16+ld)*(1)。d1=1。ji1=1。feng=~feng。d2=1。ji1=0。feng=1。amp。d2=1。ji1=0。feng
點擊復制文檔內容
公司管理相關推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1