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

正文內容

【課程設計】基于數(shù)字溫度傳感器數(shù)字溫度計的設計(word檔)-資料下載頁

2025-05-07 18:02本頁面
  

【正文】 return d。 } void read() //讀溫度 { unsigned int hh。 while(init18b20())。 //初始化 write18b20(0xcc)。 //跳過讀序列號的操作 write18b20(0x44)。 //啟動溫度轉換 delay(125)。 //轉換需要一點時間,延時 while(init18b20())。 //初始化 write18b20(0xcc)。 //跳過讀序列號的操作 write18b20(0xbe)。 //讀溫度寄存器(頭兩個值分別為溫度的低位和高位) l=read18b20()。 //讀出溫度的低位 LSB h=read18b20()。 //讀出溫度的高位 MSB hh=l。 if(h0x7f) { flag=0。 //溫度小于 0 h=~h。 l=~l+1。 } else flag=1。 h=h4。 l=l4。 zhen=h|l。 hhamp。=0x0f。 hh*=625。 disbuf[0]=zhen/100+39。039。 //將溫度值轉換,存儲以便顯示 if(zhen/100==0){disbuf[0]=39。 39。} disbuf[1]=zhen%100/10+39。039。 disbuf[2]=zhen%10+39。039。 disbuf[3]=39。.39。 disbuf[4]=hh/1000+39。039。 //小數(shù)部分 disbuf[5]=hh/100%10+39。039。 disbuf[6]=0xdf。 disbuf[7]=39。c39。 } endif //防止被重定義 ifndef _l602_h define _1602_h define uchar unsigned char define uint unsigned int //函數(shù)聲明 void delay(uchar a)。 void senddata(uchar m)。 void sendcmd(uchar n)。 void pos(uchar i,uchar j)。 //i=0 表示在第一行, i=1 表示在第二行 void intril()。 //定義通道 sbit en=P2^6。 sbit rw=P2^5。 sbit rs=P2^4。 void delayss(uchar a) //延時 1602 顯示時必須延時 {uchar i,j。 for(i=a。i0。i) for(j=0。j248。j++)。 } void senddata(uchar m) //送數(shù)據(jù) { rw=0。 rs=1。 en=1。 P0=m。 delayss(5)。 en=0。 delayss(5)。 } void sendcmd(uchar n) //送地址命令 { rw=0。 rs=0。 en=1。 P0=n。 delayss(5)。 en=0。 delayss(5)。 } void pos(uchar i,uchar j) //定位是哪一行 { if(i) sendcmd(0xc0+j)。 else sendcmd(0x80+j)。 } void intril() { sendcmd(0x38)。 //顯示模式設置 5*7 點 sendcmd(0x0c)。 //開顯示 光標不顯示且不閃爍 sendcmd(0x06)。 //光標地址自動加一 sendcmd(0x01)。 //清屏 } endif
點擊復制文檔內容
高考資料相關推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1