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

正文內(nèi)容

倉(cāng)庫(kù)溫濕度檢測(cè)系統(tǒng)的設(shè)計(jì)畢業(yè)論文-資料下載頁(yè)

2024-10-08 14:39本頁(yè)面

【導(dǎo)讀】行控制,從而實(shí)現(xiàn)對(duì)溫度和濕度的檢測(cè)和控制。數(shù)碼顯示電路能顯示當(dāng)前的溫濕度和預(yù)

  

【正文】 x6d,0x7d,0x07,0x7f, 鄭州大學(xué)本科畢業(yè)(設(shè)計(jì))論文 34 0x6f,0x77,0x7c,0x39,0x5e,0x79,0x71,0x00}。//顯示表 //uchar code table[]={0xC0,0xF9,0xA4,0xB0,0x99,0x92,0x82,0xF8,0x80, 0x90,0x88,0x83,0xC6,0xA1,0x86,0x8E}。//供陽(yáng)表 //uchar code table[]={0xA0,0xBB,0x62,0x2A,0x39,0x2C,0x24,0xBA,0x20, 0x28,0x30,0x25,0xE4,0x23,0x64,0x74}。//供陽(yáng)表 bit xsbz,setbz,setupbz,setdownbz。 uchar ma,adjs,setmaxt,setmint,setmaxh,setminh,setmode。 uint tmp。//溫度 //uint admezhi。 //uchar tmpbuf[5]。//臨時(shí)保存 /************************************** 549 控制引腳宏定義 *************************************/ sbit TLC549_SDO=P1^3。//數(shù)據(jù) sbit TLC549_CS=P1^4。//片選 sbit TLC549_SCK=P1^2。///*549 時(shí)鐘 */ uint adzhi。 uint adyzhi。 uint adzzhi。 uint admezhi。 uint xianzhi。 uint sdzhi。 bit clbz。 uchar js。 //AD 相關(guān) //uint tmp。//溫度 uchar setzhi。 // 設(shè)定值 bit setbz,setkbz,setupbz,setdownbz。//設(shè)置標(biāo)準(zhǔn) void Delay(int useconds)//延時(shí) { { int s。 for(s=0。suseconds。s++)。//延時(shí) } ucharReset_Bus(boid) //DS18B20 總線(xiàn)復(fù)位 { uchar presence。 倉(cāng)庫(kù)溫濕度檢測(cè)系統(tǒng)的設(shè)計(jì) 35 TMDAT=0。//輸出為 0 Delay(29)。//延時(shí) TMDAT=1。//輸出為 1 Delay(3)。//延時(shí) presence=TMDAT。 Delay(25)。 return(presence)。 } void Write_Bit(char bitval)//DS18B20 寫(xiě)入一位命令 { TMDAT=0。 if(bitval==1)TMDAT=1。 Delay(5)。 TMDAT=1。 } void Write_Byte(char val)//DS18B20 希爾一個(gè)字節(jié)數(shù) { uchari。 uchar temp。 for(i=0。i8。i++)。 temp=vali。 tempamp。=0x01。 Write_Bit(temp)。 } Delay(5)。 } uchar Read_Bit(void)//DS18B20 讀一位 { uchar i。 TMDAT=0。 TMDAT=1。 for(i=0。i3。i++)。 return(TMDAT)。 } uchar Read_Byte(void) //度一個(gè)字節(jié) { uchar i。 uchar value=0。 for(i=0。i8。i++) { if(Read_Byte())balue=0x01i。 鄭州大學(xué)本科畢業(yè)(設(shè)計(jì))論文 36 Delay(6)。 } return(value)。 } void DS1820_Tmp_Resd(void) ////DS18B20 讀操作 { uint TEMP。 uchar TEMP。 uchar TEMP_LSB,TEMP_MSB。 Reset_Bus()。 //DS18B20 總線(xiàn)復(fù)位 Write_Byte(0xCC)。 //DS18B20 命令 Write_Byte(0x44)。 //DS18B20 命令 Delay(20)。 Reset_Bus()。 Write_Byte(0xCC)。 //DS18B20 命令 Write_Byte(0x44)。 //DS18B20 命令 TEMP_LSB=Resd_Byte()。//DS18B20讀低字節(jié) TEMP_MSB=Resd_Byte()。//DS18B20讀高字節(jié) TEMP=TEMP_MSB; TEMP=TEMP8。 TEMP=TEMP/TEMP_MSB。 if(TEMP0xfffe)tmp=TEMP。 } void DS18B20_cl()//取溫度值 { uchar tmph,tmp1,sign。 DS18B20_tmp_Read()。 sign=(uchar)((tnp8)amp。0xf0)。 if(sign==0xf0) { tmp=(tmp0)+1。//為負(fù) tmpbuf[5]=1。 } //else Sign_Port=1。 else tmpbuf[5]=0。 tmp1=(uchar)(tmpamp。0x0f)。 } //else Sign_Port=1。 else tmpbuf[5]=0。 tmp1=(uchar)(tmpamp。0x0f)。 tmph=(uchar)((tmp4)amp。0xff)。 tmp1=tmp1*。 倉(cāng)庫(kù)溫濕度檢測(cè)系統(tǒng)的設(shè)計(jì) 37 tmpbuf[4]=tmp1%10。 tmpbuf[3]=tmp1%10。 tmpbuf[2]=tmp1%10。 tmpbuf[1]=tmph%10。 tmpbuf[0]=(tmph%100)/10。 tmpbuf[1]=tmph%100。 //if(tmpbuf[0]==0) tmpbuf[0]=10。 if(tmpbuf[1]==0 tmpbuf[1]=10。 } //////處理 doing() { uchar tzhi。 tzhi=tmpbuf[1]*10+tmpbuf[2]。 if((tzhisetmaxt|(tzhisetmint)|(sdzhisetmaxh)|(setminh)))speak=1。 else speak=0。 /* if(tzhisetmaxt) { fanjdq=1。hotjdq=0。fanled=0。hotled=1。speak=1。 } if(tzhisetmint) { fanjdq=0。hotjdq=0。fanled=0。hotled=1。speak=1。 } if((tzhisetmint)amp。(tzhisetmaxt)) { fanjdq=0。hotjdq=0。fanled=0。hotled=1。 } if(sdzhisetmaxh) { humiled=1; speak=1。 } if(sdzhisetmaxh) { humiled=0。 speak=1。 }//加濕 if((setminhsdzhi)amp。(setmaxhsdzhi)) { humiled=1。 }//關(guān) 鄭州大學(xué)本科畢業(yè)(設(shè)計(jì))論文 38 if((tzhisetmint)%(tzhisetmaxt)amp。(setminhsdzhi)amp。setmaxhsdzhi)) { speak=1。 } //////////////////// ////////顯示處理 //////// xianshi(); int abcd=0。 if(setmode!=0)goto xsset。 abcd=sdzhi。 //abcd%=100。 XSOUT=table[sdzhi/10]。 wei6=0。 Delay(60)。 wei=1。 XSOUT=table[sdzhi%10]。 wei5=0。 Delay(60)。 wei5=1。 XSOUT=table[0]。 qwei=0。 Delay(60)。 qwei=1。 if(tmpbufp[5]==1) XSOUT=0x7f。 else { XSOUT=table[tmpbuf[1]]。 } bwei=0。 Delay(60)。 bwei=1。 XSOUT=table[tmpbuf[2]]。 XSOUTamp。=0xdf。 swei=0。 Delay(60)。 swei=1。 XSOUT=table[tmpbuf[3]]。 倉(cāng)庫(kù)溫濕度檢測(cè)系統(tǒng)的設(shè)計(jì) 39 gwei=0。 Delay(60)。 gwei=1。 ruturn。 //設(shè)置顯示 xsset。 XSOUT=table[setmode]。 qwei=0。 Delay(60); qwei=1。 XSOUT=XSOUT=0x7f。//橫 bwei=0。 Delay(60)。 bwei=1。 if(setmode==1)abcd=setmaxt。 if(setmode==2)abcd=setmaxt。 if(setmode==3)abcd=setmaxh。 if(setmode==4)abcd=setmaxh。 XSOUT=table[abcd/10]。 swei=0。 Delay(60)。 swei=1。 XSOUT=table[abcd/10]。 gwei=0。 Delay(60)。 gwei=1。 } void key() { if((!set)amp。(setbz)) Delay(10)。 if(!set) { setbz=0。 setmode++。 if(setmode4)setmode=0。 } } if((!setup)amp。(setupbz)) { Delay(10)。 鄭州大學(xué)本科畢業(yè)(設(shè)計(jì))論文 40 if(!setup) { setupbz=0。 if((setmode==1)amp。(setmaxt99))setmaxt++。 if((setmode==2amp。(setmintsetmaxt1))) { setmint++。 } if((setmode==2)amp。(setmintsetmaxt1)) { setmaxt++。 } if((setmode==3)amp。(setmaxt99))setmaxt++。 if((setmode==4)amp。(setmainhsetmaxt1)) { setmaxt++。 } } } if((setup)amp。(!setupbz))Delay(10)。 { if((setup) { setupbz=1。 } if((!swtdown)amp。(setdownbz)) { Delay(10)。 } if(!swtdown) { setdownbz=0。 } if((setmode==1)amp。(setmaxtsetmint+1))setmaxt。 if((setmode==2)amp。(setmint0)) { setmaxt。 } if((setmode==3)amp。(setmaxtsetmint+1))setmaxt。 if((setmode==4)amp。(setmint0)) { setmaxt。 } } 倉(cāng)庫(kù)溫濕度檢測(cè)系統(tǒng)的設(shè)計(jì) 41 if((setdown)amp。!(setdownbz)) { Delay(10)。if(setdown) { setdownbz=1。 } } ///定時(shí)中斷程序 /// void t0(void)interrupt 1 using 0 { ms++。 if(ms=20) { ms=0。 xsbz=!xsbz。 } TH0=(6553610000)/256。 TL0=(6552610000)%256。 TR0=1。 //開(kāi)始計(jì)時(shí) ET0=1。 EA=1。 //speak=!speak。//產(chǎn)生報(bào)警 } /****************************************** 名稱(chēng): read549 功能: TLC549 驅(qū)動(dòng)模塊 輸入?yún)?shù): port通道號(hào) 輸出參數(shù):轉(zhuǎn)換值 *****************************************/ //平光滑處理 void pfc1() { adjs++。 admezhi+=adyzhi。 if(adjs=10) { a
點(diǎn)擊復(fù)制文檔內(nèi)容
環(huán)評(píng)公示相關(guān)推薦
文庫(kù)吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1