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

正文內(nèi)容

基于單片機(jī)的數(shù)字溫度計(jì)設(shè)計(jì)與仿真畢業(yè)論文-資料下載頁(yè)

2025-06-27 19:40本頁(yè)面
  

【正文】 ture()功能說(shuō)明:用來(lái)報(bào)警入口參數(shù): 全局變量中的low_flag和high_flag***********************************************************/void deal_pare_temperature(){ if(low_flag) { beer=1。 } else beer=0。 if(high_flag) { beer1=1。 } else beer1=0。}6.:/*************************************************** 串行通信輸出程序部分所有的資源:****************************************************/ include /**********************************************************函數(shù)名稱(chēng):void usart()功能說(shuō)明:用串行的方式將溫度發(fā)送出去 (只輸出正值部分)入口參數(shù): 全局變量 temperature出口參數(shù):***********************************************************/uchar usart_temp。void usart(){ uchar usart_temp1。 usart_temp1=(uchar)(temperature/100)。//將溫度變?yōu)檎_值并強(qiáng)制轉(zhuǎn)換 if(usart_temp1!=usart_temp) //只要溫度變化就傳送 { SCON=0x40。 //使用串行方式1 TMOD=0x20。//定時(shí)器1為方式2 自動(dòng)重裝 TH1=0xfd。 //初值 ,得到的波特率為 9600 時(shí)鐘改用: TL1=0xfd。 TR1=1。//開(kāi)定時(shí)器 //EA=1。//開(kāi)總中斷 //沒(méi)有用到中斷 //ES=1。//開(kāi)串行中斷 //沒(méi)有用到中斷 SBUF=usart_temp。 while(~TI)。//等待傳送完 TI=0。//必須軟件清0 TR1=0。 //EA=0。 //ES=0。 usart_temp=usart_temp1。 }}7.:/*************************************************** 將各個(gè)部分整合部分所有的資源:包含void main_init() void dis_temperature() ****************************************************/ include /******************************************************************函數(shù)名稱(chēng):void main_init()功能說(shuō)明:主程序的初始化部分程序入口參數(shù):void*******************************************************************/void main_init(){ beer=0。//關(guān)閉報(bào)警 beer1=0。//關(guān)閉報(bào)警 lcd_initial()。 //初始化液晶 temperature=0。//初始化溫度 key1=0。key2=0。key3=0。//三個(gè)按鍵的初始化 low_temp=5。//設(shè)置的最低溫度 high_temp=35。//設(shè)置的最高溫度 low_flag=0。//實(shí)際溫度比設(shè)置最低溫度低時(shí)為1 high_flag=0。//實(shí)際溫度比設(shè)置最高溫度高時(shí)為1 //說(shuō)明部分 在主界面停約一秒多// lcd_prints( MCU temperature ,0,0)。 lcd_prints( by panguiyun ,0,1)。 delay(10000)。 //啟動(dòng)部分/////////////////////////////////////////// lcd_write(lcd_,0x01)。 //清屏 lcd_prints( start ,0,0)。 lcd_prints( key1:mod/exit ,0,1)。 delay(5000)。 lcd_write(lcd_,0x01)。 //清屏 lcd_prints( start. ,0,0)。 lcd_prints( key1:mod/exit ,0,1)。 //啟動(dòng)時(shí)報(bào)警響一下表示啟動(dòng) beer=1。 beer1=1。 delay(1000)。 beer=0。 beer1=0。 //啟動(dòng)時(shí)報(bào)警響一下完成 delay(4000)。 lcd_write(lcd_,0x01)。 //清屏 lcd_prints( start.. ,0,0)。 lcd_prints( key1:mod/exit ,0,1)。 delay(5000)。 lcd_write(lcd_,0x01)。 //清屏 lcd_prints( start... ,0,0)。 lcd_prints( key1:mod/exit ,0,1)。 delay(5000)。 lcd_write(lcd_,0x01)。 //清屏 lcd_prints( key2:+1C ,0,0)。 lcd_prints( key3:1C ,0,1)。 delay(10000)。 //啟動(dòng)部分完成/////////////////////////////////////////// }/******************************************************************函數(shù)名稱(chēng):void dis_temperature()功能說(shuō)明:顯示溫度程序入口參數(shù):void*******************************************************************/void dis_temperature(int temp_temperature){ uchar string[16]= 。 if((temp_temperatureamp。0x8000)==0x8000)//如果溫度是負(fù)值 { string[5]=39。39。 temp_temperatureamp。=0x0fff。//去掉符號(hào)位后面好計(jì)算 } else string[5]=39。 39。 string[6]=temp_temperature/1000+0x30。 string[7]=temp_temperature%1000/100+0x30。 string[8]=39。.39。 string[9]=temp_temperature%100/10+0x30。 string[10]=temp_temperature%10+0x30。 //*(string+11)=248。 *(string+12)=39。C39。// lcd_write(lcd_,0x01)。 //清屏 lcd_prints(string,0,1)。}/******************************************************************函數(shù)名稱(chēng):void main_scanf_deal()功能說(shuō)明:主程序按鍵處理程序入口參數(shù):void注 : !不表示大小,也不能用來(lái)比大小 !是設(shè)定來(lái)與真實(shí)溫度一起比大小報(bào)警用的 *******************************************************************/void main_scanf_deal(){ uchar flag2=0。//用來(lái)退出用的標(biāo)志 while(key1) { key1=0。 flag2=1。 while(flag2) { int tmp_high_temp。 lcd_write(lcd_,0x01)。//清屏 lcd_prints( high limit temp,0,0)。 dis_temperature((tmp_high_temp))。//顯示high limit tempreture key_scanf()。 if(key1)//MOD/EXIT鍵 { key1=0。 while(flag2) { int tmp_low_temp。 lcd_write(lcd_,0x01)。//清屏 lcd_prints( low limit temp,0,0)。 dis_temperature((tmp_low_temp))。//顯示low limit tempreture key_scanf()。 if(key1) { flag2=0。 key1=0。 } if(key2)//+1℃鍵 { low_temp++。 key2=0。 ///////最大limit temperature最小limit temperature的處理程序//// if(high_templow_temp) { low_temp。 lcd_write(lcd_,0x01)。//清屏 lcd_prints( low limit temp,0,0)。 lcd_prints( error ,0,1)。 delay(10000)。 } ///////最大limit temperature最小limit temperature的處理程序完//// } if(key3)//1℃鍵 { low_temp。 key3=0。 } if(low_temp0)//負(fù)數(shù)處理下好去顯示 {tmp_low_temp=((~low_temp+1)*100)|0x8000。} else tmp_low_temp=low_temp*100。// 正數(shù)處理下好去顯示 } } if(key2)//+1℃鍵 { high_temp++。 key2=0。 } if(key3)//1℃鍵 { high_temp。 key3=0。 ///////最大limit temperature最小limit temperature的處理程序//// if(high_templow_temp) { high_temp++。 lcd_write(lcd_,0x01)。//清屏 lcd_prints( high limit temp,0,0)。 lcd_prints( error ,0,1)。 delay(10000)。 } ///////最大limit temperature最小limit temperature的處理程序完//// } if(high_temp0)//負(fù)數(shù)處理下好去顯示 { tmp_high_temp=((~high_temp+1)*100)|0x8000。 } else tmp_high_temp=high_temp*100。// 正數(shù)處理下好去顯示 } key1=0。key2=0。key3=0。 }}8.:/************************************************************************ 基于單片機(jī)的數(shù)字溫度計(jì)設(shè)計(jì)與仿真 盤(pán)桂云 所用資源: 18B20溫度傳感器 1602液晶 MCU及相關(guān)小系統(tǒng)硬件 功能說(shuō)明:*************************************************************************/include //程序中用到的全局變量聲明//************************************************************************//************************************************************************ //key_scanf//uchar key1,key2,key3。 //18B20//int temperature。 //unite//int high_temp,low_temp。 //baoji//uchar low_flag,high_flag。
點(diǎn)擊復(fù)制文檔內(nèi)容
環(huán)評(píng)公示相關(guān)推薦
文庫(kù)吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1