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

正文內(nèi)容

電阻爐設(shè)計方案-資料下載頁

2025-04-25 13:55本頁面
  

【正文】 al ,37(5):365371.附 錄includedefine uchar unsigned chardefine uint unsigned intsbit oe=P3^0。 //ADC0808管腳定義sbit eoc=P3^1。sbit st=P3^2。sbit clk=P3^3。sbit E=P3^6。sbit RS=P3^7。sbit beep=P3^4。sbit led=P3^5。sbit s1=P2^0。 // 注水(繼電器)開關(guān)sbit s2=P2^1。 //s1s5鍵為溫度調(diào)節(jié)按鍵sbit s3=P2^2。sbit s4=P2^3。sbit s5=P2^4。sbit jiare=P2^5。uchar bai,shi,ge,flag,numkey,numkey1,numkey2,numkey3,numkey4,m1。uint num1,num,t1,t2。uchar table[]= liuwenlong work... 。uchar table1[]=temperature:。uchar table2[]= liuwenlong set.... 。void delay(uint z) //延時函數(shù){ uint x,y。 for(x=z。x0。x) for(y=110。y0。y)。}void write_(uchar a) //LCD1602的寫命令函數(shù) { E=0。 RS=0。 P0=a。 delay(3)。 E=1。 delay(3)。 E=0。 } void write_dat(uchar b) //對LCD1602寫數(shù)據(jù)函數(shù) { RS=1。 P0=b。 delay(3)。 E=1。 delay(3)。 E=0。 }void init_1602() //對LCD1602進行初始化{ E=0。 write_(0x38)。 write_(0x0c)。 write_(0x06)。 write_(0x80)。 }void disply(uchar add,date) //1602的顯示函數(shù)的計數(shù)顯示{ bai=date/100%10。 shi=date/10%10。 ge=date%10。 write_(0x80+add)。 write_dat(0x30+bai)。 write_dat(0x30+shi)。 write_dat(0x30+ge)。 }void disply1() //溫度設(shè)置界面的顯示{ uchar i。 write_(0x80)。 for(i=0。i21。i++) //LCD1602輸出“set....” { write_dat(table2[i])。 }}void init_time()//定時器初始化{ TMOD=0x21。 //定義定時器的工作方式 TH1=240。 //分別對兩個定時器的高低位進行賦初值 TL1=240。 TH0=(6553610000)/256。 TL0=(6553610000)%256。 EA=1。 //打開總中斷 ET0=1。 //打開定時器0中斷 TR0=1。 ET1=1。 //打開定時器1中斷 TR1=1。 t1=280。 t2=300。 }void panduan() //判斷函數(shù){ if(num1t1) jiare=0。 if(num1=t2) { jiare=1。 beep=~beep。 led=0。 } else { beep=1。 led=1。 }}void main(){ uchar i,m。 init_1602()。 init_time()。 while(1) { panduan()。 st=0。 //ADC0808的轉(zhuǎn)換 st=1。 st=0。 while(!eoc)。 //等待轉(zhuǎn)換結(jié)果 oe=1。 //允許輸出 num=P1。 //顯示A/D轉(zhuǎn)換結(jié)果 oe=0。 //關(guān)閉輸出 num1=num**5*200。 if(flag==0) { disply(0x40+12,num1)。 write_dat(0xdf)。 write_dat(0x43)。 write_dat(0x80)。 write_dat(0x80)。 write_dat(0x80)。 write_(0x80)。 for(i=0。i21。i++) { write_dat(table[i])。 delay(1)。 } write_(0x80+0x40)。 for(m=0。m12。m++) { write_dat(table1[m])。 delay(1)。 } disply(0x40+12,num1)。 } if(flag==1) //判斷標志位是否為1,如果是,則顯示設(shè)置界面 { disply1()。 //調(diào)用顯示函數(shù) disply(0x40,t1)。 write_dat(0xdf)。 write_dat(0x43)。 write_dat(0x80)。 write_dat(0x80)。 write_dat(0x80)。 write_dat(0x80)。 write_dat(0x80)。 write_dat(0x80)。 write_dat(0x80)。 write_dat(0x80)。 write_dat(0x80)。 write_dat(0x80)。 disply(0x40+15,t2)。 //如果s1第一次按下時顯示 write_dat(0xdf)。 write_dat(0x43)。 } } }void time1() interrupt 3 //為ADC0808提供工作時鐘函數(shù){ clk=~clk。 //為ADC0808提供工作時鐘}void timer0() interrupt 1//定時器中斷按鍵{ TH0=(6553610000)/256。 //進入中斷函數(shù),賦值后為下一次中斷做準備 TL0=(6553610000)%256。 switch(numkey) //按鍵函數(shù)檢測numkey是否為0,若是則numkey++。下次中斷來臨時在檢測numkey是否為1,若是numkey++,下次中端來臨時檢測numkey是否為 { case 0: //2,若是,判斷s是否為1(即是否松手),若是則表示鍵按下,以下函數(shù)原理雷同 if(s1==0) { numkey++。 } break。 case 1: if(s1==0) { numkey++。 } else numkey=0。 break。 case 2: if(s1) { numkey=0。 m1++。 flag=1。 //flag是設(shè)置溫度界面的標志位 if(m1==2) { flag=0。 m1=0。 } } break。 } switch(numkey1) //按鍵s2用于增加下限溫度 { case 0: if(s2==0) { numkey1++。 } break。 case 1: if(s2==0) { numkey1++。 } else numkey1=0。 break。 case 2: if(s2) { numkey1=0。 if(t1==999) { 。 } else t1++。 } break。 } switch(numkey2) //按鍵s3用于減小下限溫度 { case 0: if(s3==0) { numkey2++。 } break。 case 1: if(s3==0) { numkey2++。 } else numkey2=0。 break。 case 2: if(s3) { numkey2=0。 if(t1==0) { 。 } else t1。 } break。 } switch(numkey3) //按鍵s4用于增加上限溫度 { case 0: if(s4==0) { numkey3++。 } break。 case 1: if(s4==0) { numkey3++。 } else numkey3=0。 break。 case 2: if(s4) { numkey3=0。 if(t2==999) { 。 } else t2++。 } break。 } switch(numkey4) //按鍵s5用于減小上限溫度 { case 0: if(s5==0) { numkey4++。 } break。 case 1: if(s5==0) { numkey4++。 } else numkey4=0。 break。 case 2: if(s5) { numkey4=0。 if(t2==0) { 。 } else t2。 } break。 } }
點擊復制文檔內(nèi)容
公司管理相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1