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

正文內(nèi)容

遠(yuǎn)程控制智能家居管理系統(tǒng)畢業(yè)論文-資料下載頁(yè)

2025-06-28 06:32本頁(yè)面
  

【正文】 /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////函數(shù) void readmend(void)。實(shí)現(xiàn)功能:讀取短信內(nèi)容,判斷相應(yīng)指令是否正確//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////******************************************************************************************************************/ void readmend(void){ uchar i。 for(i=0。i8。i++) //將短信內(nèi)容中的指令部分截取出來(lái)放到 { //CommandBuf數(shù)組中 CommandBuf[i]=SystemBuf[64+i]。 } if(Compare()amp。amp。(CommandBuf[6]==39。k39。)) //判斷指令是否為開(kāi)繼電器指令 { switch(CommandBuf[7]) { case 0x31: relay_1=0。 // check=1。 break。 case 0x32: relay_2=0。 // check=1。 break。 case 0x33: relay_3=0。 // check=1。 break。 case 0x34: // check=1。 break。 case 0x35: case 0x36: case 0x37: case 0x38: case 0x41: case 0x42: case 0x43: case 0x44: case 0x45: case 0x46: case 0x47: case 0x48: case 0x3f: // check=1。 break。 default:flag=1。 //其他指令定義為錯(cuò)誤操作 break。 //置位錯(cuò)誤操作位為1 } } else { if(Compare()amp。amp。(CommandBuf[6]==39。g39。)) //判斷指令是否為關(guān)閉電器指令 { switch(CommandBuf[7]) { case 0x31: relay_1=1。 break。 case 0x32: relay_2=1。 break。 case 0x33: relay_3=1。 break。 case 0x34: break。 case 0x35: case 0x36: case 0x37: case 0x38: case 0x41: case 0x42: case 0x43: case 0x44: case 0x45: case 0x46: case 0x47: case 0x48: break。 default:flag=1。 //其他指令定義為錯(cuò)誤操作 break。 //置位錯(cuò)誤操作位為1 } } else {flag=1。} //如果發(fā)送的指令既不是open也不是shut就定義為錯(cuò)誤操作 }}/*******************************************************************************************/////////////////////////////////bit Compare(void)********************************************************************************************/ bit Compare(void) { uchar i,k。 for(i=0。i6。i++) { if(CommandBuf[i]==password[i]) k++。 } if(k==6) { k=0。 return 1。 } }/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////報(bào)警短息:應(yīng)用中斷 模擬紅外、煙霧、煤氣報(bào)警//////////////////////////////////////////////////////////////////////////////////////////////void sendBaoJing(void){ uchar i。 for(i=0。i8。i++) { AT_SendNumber[i]=AT_CMGS[i]。 } for(i=8。i24。i++) { AT_SendNumber[i]=MyTel[i8]。 //將對(duì)方號(hào)碼提取用來(lái)回復(fù)給對(duì)方 } sendstring(AT_SendNumber)。 Delay_ms(400)。 sendstring(danger)。 // Delay_ms(30)。 sendchar(0X1A)。} includeincludeincludeuchar password[6]。uchar passwordx[6]={39。039。,39。039。,39。039。,39。039。,39。039。,39。139。}。//初始密碼000001/*========================關(guān)閉IAP功能====================*/void iap_disable(){ isp_contr=0x00。 //關(guān)IAP功能 isp_cmd =0x00。 //清寄存器 isp_trig =0x00。 //清觸發(fā)器 isp_addrh=0x00。 isp_addrl=0x00。}/*=========================讀數(shù)據(jù)======================*/uchar e2_read(uint addres){ uchar i=0。 uchar z=0。 EA=0。 isp_addrl=addres%0x100。 //低位地址 isp_addrh=addres/0x100。 //高位地址 isp_contr=0x80。 //設(shè)時(shí)間與充ISP操作。 isp_cmd=0x01。 //寫(xiě)命令 isp_trig=0x46。 //觸發(fā) isp_trig=0xb9。 //觸發(fā)啟動(dòng)。 for(i=0。i6。i++)。 //延時(shí) iap_disable()。 //關(guān)IAP功能 z=isp_data。 //把數(shù)據(jù)送到Z并返回 EA=1。 return(z)。}/*=========================編程數(shù)據(jù)=====================*/void e2_write(uint addres,uchar write_data)//寫(xiě)數(shù)據(jù)。{ uchar i=0。 EA=0。 isp_data=write_data。 //要寫(xiě)入的數(shù)據(jù)。 isp_addrl=addres%0x100。 //低位地址 isp_addrh=addres/0x100。 //高位地址 isp_contr=0x80。 //設(shè)時(shí)間與充ISP操作 isp_cmd=0x02。 //寫(xiě)命令 isp_trig=0x46。 //觸發(fā) isp_trig=0xb9。 //觸發(fā)啟動(dòng) for(i=0。i6。i++)。 //延時(shí) EA=1。 iap_disable()。 //關(guān)IAP功能}/*=========================擦除扇區(qū)======================*/void e2_erasure (uint addres) //扇區(qū)擦除。{ EA=0。 isp_addrl=addres%0x100。 //低位地址 isp_addrh=addres/0x100。 //高位地址 isp_contr=0x80。 //設(shè)時(shí)間與充ISP操作。 isp_cmd=0x03。 //扇區(qū)命命令 isp_trig=0x46。 //觸發(fā) isp_trig=0xb9。 //觸發(fā)啟動(dòng)。 iap_disable()。 //關(guān)IAP功能 EA=1。}/*=========================存儲(chǔ)讀取======================*///State=1 存儲(chǔ)數(shù)據(jù)、為0則讀取數(shù)據(jù)并返回。Value1為寫(xiě)入的數(shù);addres為地址//第一扇區(qū):0x20000x21FF 第二扇區(qū):0x22000x23FF //第三扇區(qū):0x24000x25FF 第四扇區(qū):0x26000x27FF //第五扇區(qū):0x28000x29FF 第六扇區(qū):0x2A000x2BFF//第七扇區(qū):0x2C000x2DFF 第八扇區(qū):0x2E000x2FFFuchar Isp_Write_Read(bit State,uchar Value1,uint addres){ uchar num。 if(State==1) { e2_erasure(addres)。 e2_write(addres,Value1)。 } else { num= e2_read(addres)。 return num。 }}/////////////////讀出EEPROM中的密碼///////////////////void Read_Password(void){uchar i。for(i=0。i6。i++){password[i]=Isp_Write_Read(0,0,0x2000+0x0200*i)。}}///////////////向EEPROM中寫(xiě)入密碼////////////////////void Write_Password(void){uchar i。for(i=0。i6。i++){Isp_Write_Read(1,passwordx[i],0x2000+0x0200*i)。}} includeincludeincludevoid Delay_ms(uint x){ uint a,b。 for(a=x。a0。a) for(b=100。b0。b)。} includeincludeincludeincludeuchar code Table1602A[]=TC35GSMMODEL。uchar code Table1602B[]=MADE BY ZH_M_J。void delay1602(uint x){ uint a,b。 for(a=x。a0。a) for(b=10。b0。b)。}void write1602_(uchar )//寫(xiě)指令{ OUT_1602=。 Lcd1602_RS=0。 Lcd1602_RW=0。 Lcd1602_EN=0。 delay1602(10)。 Lcd1602_EN=1。 delay1602(10)。 Lcd1602_EN=0。 }void write1602_date(uchar date)//寫(xiě)數(shù)據(jù){ O
點(diǎn)擊復(fù)制文檔內(nèi)容
數(shù)學(xué)相關(guān)推薦
文庫(kù)吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1