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

正文內容

數(shù)字溫濕度計的設計論文-資料下載頁

2025-06-22 15:05本頁面
  

【正文】 uf[4]=11。 //什么也不顯示dispbuf[5]=humi1/100。 //濕度的十位dispbuf[6]=humi1/10%10。//濕度的個位dispbuf[7]=humi1%10。//濕度的小數(shù)位if((humihumiset)||(temptempset))//比較報警{P0_4=0。//二極管亮} else{P0_4=39。Z39。//二極管不亮}}else { if(t==1)//顯示設置的溫度{if(temph9){dispbuf[0]=10。//顯示“”}else{dispbuf[0]=11。//什么也不顯示}dispbuf[1]=temph%10。//設置溫度的十位dispbuf[2]=templ%10。//設置溫度的個位dispbuf[3]=11。dispbuf[4]=11。dispbuf[5]=11。dispbuf[6]=11。dispbuf[7]=11。}else //顯示濕度{dispbuf[0]=11。dispbuf[1]=11。dispbuf[2]=11。dispbuf[3]=11。dispbuf[4]=11。dispbuf[5]=humih%10。//設置濕度十位dispbuf[6]=humil%10。//設置濕度的個位dispbuf[7]=11。}}}void t0(void) interrupt 1 //中斷函數(shù){if(P0_0==0)//切換顯示鍵{for(i=5。i0。i)for(j=248。j0。j)。if(P0_0==0){t++。if(t2){t=0。}while(P0_0==0)。}}if(t==1)//顯示設置的溫度值,這時可以設置溫度值{if(P0_1==0){for(i=5。i0。i)for(j=248。j0。j)。if(P0_1==0)//調溫度的十位{temph++。if(temph==15)//1014 分別表示0——4{temph=0。}}while(P0_1==0)。}if(P0_2==0)//調溫度的個位{for(i=5。i0。i)for(j=248。j0。j)。if(P0_2==0){templ++。if(templ==10){templ=0。}}while(P0_2==0)。}}elseif(t==2)//顯示設置的濕度值,這時可以設置濕度值{if(P0_1==0){for(i=5。i0。i)for(j=248。j0。j)。if(P0_1==0)//調節(jié)濕度的十位{humih++。if(humih==10){humih=0。}}while(P0_1==0)。}if(P0_2==0)//調節(jié)濕度個位{for(i=5。i0。i)for(j=248。j0。j)。if(P0_2==0){humil++。if(humil==10){humil=0。}}while(P0_2==0)。}}if(temph10){tempset=temph*10+templ。//溫度是正數(shù)}else{tempset=(10temph)templ。//溫度是負數(shù)}humiset=humih*10+humil。 mstt++。if(mstt==8)//掃描數(shù)碼管,每 2S 秒掃描一次{mstt=0。if((dispbitt==2)||(dispbitt==6))//顯示小數(shù)點{P1=dispcode[dispbuf[dispbitt]]amp。0xfb。}else{P1=dispcode[dispbuf[dispbitt]]。}P2=dispbitcode[dispbitt]。dispbitt++。if(dispbitt==8){dispbitt=0。} }}char s_write_byte(unsigned char value)//寫一個字節(jié)的數(shù)據(jù){unsigned char i,error=0。for(i=0x80。i0。i/=2){if(iamp。value)DATA=1。elseDATA=0。SCK=1。_nop_()。_nop_()。_nop_()。SCK=0。}DATA=1。SCK=1。error=DATA。SCK=0。return error。}char s_read_byte(unsigned char ack)//讀一個字節(jié)的數(shù)據(jù){unsigned char i,val=0。DATA=1。for(i=0x80。i0。i/=2){SCK=1。if(DATA) {val=(val|i)。}SCK=0。}DATA=!ack。//ack 為低電平時表示數(shù)據(jù)發(fā)送完畢SCK=1。_nop_()。_nop_()。_nop_()。SCK=0。DATA=1。return val。}void s_transstart(void)//傳輸啟動時序{DATA=1。SCK=0。_nop_()。SCK=1。_nop_()。DATA=0。_nop_()。SCK=0。_nop_()。_nop_()。_nop_()。SCK=1。_nop_()。DATA=1。_nop_()。SCK=0。}void s_connectionreset(void)//通訊復位時序{unsigned char i。DATA=1。SCK=0。for(i=0。i9。i++){SCK=1。SCK=0。}s_transstart()。}char s_measure(unsigned char *p_value,unsigned char *p_checksum,unsigned char mode)//測量函數(shù){unsigned error=0。unsigned int i。s_transstart()。switch(mode){case TEMP:error+=s_write_byte(MEASURE_TEMP)。break。//寫濕度指令case HUMI:error+=s_write_byte(MEASURE_HUMI)。break。//寫溫度指令default :break。}for(i=0。i65535。i++)if(DATA==0) break。通訊完畢,數(shù)據(jù)線被拉底if(DATA) {error+=1。}*(p_value) =s_read_byte(ACK)。//讀出數(shù)據(jù)的高八位*(p_value+1)=s_read_byte(ACK)。//讀出數(shù)據(jù)的低八位return error。}void calc_sth11(float *p_humidity,float *p_temperature)//轉換物理量,從而得到想要的數(shù)據(jù)值{const float C1=。const float C2=。const float C3=。const float T1=。const float T2=。float rh=*p_humidity。float t=*p_temperature。float rh_lin。float rh_true。float t_c。t_c=t*。rh_lin=C3*rh*rh+C2*rh+C1。rh_true=(t_c25)*(T1+T2*rh)+rh_lin。if(rh_true) rh_true=。*p_temperature=t_c。*p_humidity=rh_true。}void main()//主函數(shù){value humi_val,temp_val。unsigned char error,checksum。unsigned int i。s_connectionreset()。//通訊復位TMOD=0x02。//中斷初始化TH0=0x06。TL0=0x06。TR0=1。ET0=1。EA=1。while(1){error=0。error+=s_measure((unsigned char*)amp。,amp。checksum,HUMI)。error+=s_measure((unsigned char*)amp。,amp。checksum,TEMP)。if(error!=0)//如果 error=1,從新復位 {s_connectionreset()。}else{=(float)。=(float)。calc_sth11(amp。,amp。)。display(,)。s_connectionreset()。}for(i=0。i40000。i++)。s_connectionreset()。}}外文資料DS1722 Digital ThermometerWith scientific and technological progress and development of the types of temperature sensors increasingly wide range of application of the increasingly widespread, and the beginning analog toward digital, singlebus, dualbus and bus3 direction. And the number of temperature sensors because they apply to all microprocessor interface consisting of automatic temperature control system simulation can be overe sensor and microprocessor interface need signal conditioning circuit and A / D converters advantages of the drawbacks, has been widely used in industrial control, electronic transducers, medical equipment and other temperature control system. Among them, which are more representative of a digital temperature sensor DS18B20, MAX6575, the DS1722, MAX6636 other. This paper introduces the DS1722 digital temperature sensor characteristics, the use of the method and its timing. Internal structure and other relevant content. FEATURES:Temperature measurements require no external ponents。Measures temperatures from 55176。C to +120176。C. Fahrenheit equivalent is 67176。F to +248176。F。Thermometer accuracy is 177。176。C。Thermometer resolution is configurable from 8 to 12 bits (176。C to 176。C resolution)。Data is read from/written to via a Motorola Serial Peripheral Interface (SPI) or standard 3wire serial interface。Wide analog power supply range ( )。Separate digital supply allows for logic。Available in an 8pin SOIC (150 mil), 8pin USOP, and flip chip package。PIN ASSIGNMENTFIGURE 1 PIN ASSIGNMENTPIN DESCRIPTION:SERMODE Serial Interface Mode.CE Chip Enable.SCLK Serial Clock.GND – Ground.VDDA Analog Supply Voltage.SDO Serial Data Out.SDI Serial Data In.VDDD Digital Supply Voltage.DESCRIPTION:The DS1722 Digital Thermometer and Thermostat with SPI/3Wire Interface provides temperature readings which ind
點擊復制文檔內容
環(huán)評公示相關推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1