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

正文內(nèi)容

基于單片機(jī)的數(shù)字溫度計(jì)設(shè)計(jì)報(bào)告-閱讀頁(yè)

2024-10-27 08:46本頁(yè)面
  

【正文】 ]=t%100/10。 p[1]=ws[3]+39。 p[2]=ws[2]+39。 p[3]=ws[1]+39。 p[4]=39。 p[5]=ws[0]+39。 p[6]=39。 if(ws[3]==0) p[1]=39。 if(ws[3]==0amp。ws[2]==0) p[2]=39。 } void main() { int t。 uchar code str2[16]=XM:zhaocancan。 uchar temp[16]= 。 ShowString(0,0,str1)。 Delayms(5000)。 while(1) { t=Get_Temperature()。 ShowString(0,1,temp)。 } } 溫度傳感器子程序 15 include include define uchar unsigned char define uint unsigned int sbit DQ=P3^3。} uchar Init_DS18B20()//成功返回 0,失敗返回 1 { uchar status。 Delay(8)。 Delay(90)。 Delay(8)。 Delay(100)。 return status。 for(i=0。i++) { DQ=0。0x01。 DQ=1。 } } uchar ReadOneByte() { uchar i,dat=0。 _nop_()。i8。 dat=1。 _nop_()。 if(DQ) dat|=0x80。DQ=1。 } int Get_Temperature() { int t。 uchar a,b,fh。//初始化失敗,溫度應(yīng)小于 125 else { 16 WriteOneByte(0xcc)。//啟動(dòng)溫度轉(zhuǎn)換 Init_DS18B20()。//跳過(guò)讀序列號(hào),可加速 WriteOneByte(0xbe)。//低位 b=ReadOneByte()。 fh=bamp。 if(fh!=0)//fh 的最高位為 1,表示負(fù)號(hào) { b=~b。 tt=((b*256)+a+1)*。 } else { tt=((b*256)+a)*。} } return t。 sbit RW=P2^1。 void Delayms(uint ms) { uchar i。i120。 } } uchar Busy_Check() { uchar LCD_Status。 RW=1。 Delayms(1)。 EN=0。 }//LCD_Status 的最高位為 1 表示忙, 0 表示空閑 void Write_LCD_Command(uchar cmd)//寫 LCD 命令 { while((Busy_Check()amp。//如果忙則等待 RS=0。 EN=0。 EN=1。 EN=0。0x80)==0x80)。 RW=0。 P0=dat。 Delayms(1)。 } void Initialize_LCD() { Write_LCD_Command(0x38)。//表示 8 位輸出 , 2 行 , 5x7 點(diǎn)陣 Write_LCD_Command(0x01)。//清屏 Write_LCD_Command(0x06)。//字符進(jìn)入模式 Write_LCD_Command(0x0c)。//顯示開(kāi) , 關(guān)光標(biāo) } void ShowString(uchar x,uchar y,uchar*str) { uchar i=0。 if(y==1) Write_LCD_Command(0xc0|x)。i16。 } }
點(diǎn)擊復(fù)制文檔內(nèi)容
醫(yī)療健康相關(guān)推薦
文庫(kù)吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1