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

正文內(nèi)容

課程設(shè)計(jì)論文-基于ds18b20的多點(diǎn)溫度測(cè)量系統(tǒng)(編輯修改稿)

2024-11-28 11:28 本頁(yè)面
 

【文章內(nèi)容簡(jiǎn)介】 接很生疏, 需要多加練習(xí)。 建議 希望在以后的學(xué)習(xí)中能過(guò)再多做類似本設(shè)計(jì)的練習(xí),提高動(dòng)手能力,夯實(shí)基礎(chǔ)知識(shí)。 5 附錄 原件明細(xì)表 DS18B20 兩個(gè)、 AT89S52 一塊、 74HC573 一塊、按鈕開(kāi)關(guān) 3個(gè)、 10K 電阻三個(gè)、 電阻兩個(gè)、 10uf 電解電容一個(gè)、 四位八段數(shù)碼管一個(gè)。 設(shè)計(jì)原理圖 參看上面的仿真圖。 設(shè)計(jì)的主程序: include define uchar unsigned char define uint unsigned int sbit DS=P2^0。 //定義溫度傳感器的數(shù)據(jù)引腳 sbit button1=P3^5。 //定義按鈕開(kāi)關(guān)的控制位腳 sbit button2=P3^6。 12 uint temp。 // 溫度值 sbit dula=P2^6。 uchar code table[]={0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d, 0x07,0x7f,0x6f,0x77,0x7c,0x39,0x5e,0x79,0x71}。 uchar code table1[]={0xbf,0x86,0xdb,0xcf,0xe6,0xed,0xfd, 0x87,0xff,0xef}。 uchar code ROM_CODE1[]={0x28,0xaa,0x4b,0x27,0x03,0x00,0x00,0x06}。 uchar code ROM_CODE2[]={0x28,0x1b,0x40,0x12,0x03,0x00,0x00,0x8f}。 void delay(uint count) //延時(shí)函數(shù) { uint i。 while(count) { i=200。 while(i0) i。 count。 } } void dsreset() //18B20 復(fù)位,初始化函數(shù) { 13 uint i。 DS=0。 i=103。 while(i0)i。 DS=1。 i=6。 while(i0)i。 } bit tmpreadbit() // 讀 1位數(shù)據(jù)函數(shù) { uint i。 bit dat。 DS=0。 i++。i++。 DS=1。 i++。i++。 dat=DS。 i=8。 // 短延時(shí) while(i0)i。 return (dat)。 } uchar tmpread() //讀 1字節(jié)函數(shù) { uchar i,j,dat。 dat=0。 for(i=1。i=8。i++) { 14 j=tmpreadbit()。 dat=(j7)|(dat1)。 //讀出的數(shù)據(jù)最低位在最前面,這樣剛好一個(gè)字節(jié)在 DAT 里 } return(dat)。 } void tmpwritebyte(uchar dat) //write a byte to ds18b20 向 1820 寫一個(gè)字節(jié)數(shù)據(jù)函數(shù) { uint i。 uchar j。 bit testb。 for(j=1。j=8。j++) { testb=datamp。0x01。 dat=dat1。 if(testb) //write 1 { DS=0。 i++。i++。 DS=1。 i=8。while(i0)i。 } else { DS=0。 //write 0 i=8。while(i0)i。 DS=1。 15 i++。i++。 } } } void match_rom(uchar fp) //匹配 ROM ID { char k。 t
點(diǎn)擊復(fù)制文檔內(nèi)容
公司管理相關(guān)推薦
文庫(kù)吧 www.dybbs8.com
備案圖片鄂ICP備17016276號(hào)-1