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

正文內(nèi)容

單片機課程設(shè)計-基于gsm的智能家居系統(tǒng)(參考版)

2024-11-14 17:23本頁面
  

【正文】 i6。 } } /////////////////讀出 EEPROM 中的密碼 /////////////////// void Read_Password(void) { uchar i。 } else { num= e2_read(addres)。 if(State==1) { e2_erasure(addres)。 } /*=========================存儲讀取 ======================*/ //State=1 存儲 數(shù)據(jù)、為 0 則讀取數(shù)據(jù)并返回 。 iap_disable()。 //觸發(fā) isp_trig=0xb9。 isp_cmd=0x03。 //高位地址 isp_contr=0x80。 isp_addrl=addres%0x100。 //關(guān) IAP 功能 } /*=========================擦除扇區(qū) ======================*/ void e2_erasure (uint addres) //扇區(qū)擦除。 //延時 徐州師范大學物理與電子工程學院課程設(shè)計報告 24 EA=1。i6。 //觸發(fā) isp_trig=0xb9。 //設(shè)時間與充 ISP 操作 isp_cmd=0x02。 //低位地址 isp_addrh=addres/0x100。 //要寫入的數(shù)據(jù)。 EA=0。 } /*=========================編程數(shù)據(jù) =====================*/ void e2_write(uint addres,uchar write_data)//寫數(shù)據(jù)。 //把數(shù)據(jù)送到 Z 并返回 EA=1。 //延時 iap_disable()。i6。 //觸發(fā)啟動。 //寫命令 isp_trig=0x46。 //設(shè)時間與充 ISP 操作。 //低位地址 isp_addrh=addres/0x100。 EA=0。 } /*=========================讀數(shù)據(jù) ======================*/ uchar e2_read(uint addres) { uchar i=0。 //清觸發(fā)器 isp_addrh=0x00。 //關(guān) IAP 功能 isp_cmd =0x00。}。,39。,39。,39。,39。,39。 uchar passwordx[6]={39。 sendchar(0X1A)。 sendstring(danger)。 //將對方號碼提取用來回復給對方 } sendstring(AT_SendNumber)。i24。i++) { AT_SendNumber[i]=AT_CMGS[i]。 for(i=0。 return 1。i++) { if(CommandBuf[i]==password[i]) k++。 for(i=0。 //置位錯誤操作位為 1 } } else {flag=1。 default:flag=1。 case 0x34: break。 case 0x33: relay_3=1。 case 0x32: relay_2=1。)) //判斷指令是否為關(guān)閉電器指令 { switch(CommandBuf[7]) { case 0x31: relay_1=1。(CommandBuf[6]==39。 //置位錯誤操作位為 1 徐州師范大學物理與電子工程學院課程設(shè)計報告 21 } } else { if(Compare()amp。 default:flag=1。 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。 case 0x34: // check=1。 // check=1。 break。 case 0x32: relay_2=0。 // check=1。k39。amp。i++) // 將短信內(nèi)容中的指令部分截取出來放到 { //CommandBuf 數(shù)組中 CommandBuf[i]=SystemBuf[64+i]。 for(i=0。 } /******************************************************************************************************************/ ////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////函數(shù) void readmend(void)。 } Delay_ms(30)。 // check=0。 if(flag==0) { //if(check==1) //{ // sendstring(state)。 //將對方號碼提取用來回復給對方 } sendstring(AT_SendNumber)。i24。i++) { AT_SendNumber[i]=AT_CMGS[i]。 for(i=0。 //發(fā)送 AT+CMGR=?,?代表短信儲存所在位置 } /******************************************************************************************************************/ ////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////// 函數(shù) void sendmessage(void)。 } Rx=0。RxRxIn。i++) { AT_delete[i]=numberbuf[i8]。 } for(i=8。i8。 Delay_ms(5000)。 Delay_ms(1000)。 //發(fā)送 AT+CMGR=?,?代表短信儲存所在位置 } /******************************************************************************************************************/ ////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////// 函數(shù) void delete_message。 } Rx=0。RxRxIn。i++) { AT_Read[i]=numberbuf[i8]。 } for(i=8。i8。i++) { numberbuf[i]=SystemBuf[14+i]。 for(i=0。 實 現(xiàn) 功 能 : 發(fā) 送 讀 取 短 信 指令 ,//////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /******************************************************************************************************************/ void read_message(void) { uchar i。(SystemBuf[6]==0x52)) //GR send=1。(SystemBuf[5]==0x47)amp。實現(xiàn)功能 :判斷短信 ,準備是否回復短信給目標號碼 ////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /******************************************************************************************************************/ void message_read(void) { if((sendready==1)amp。 } 徐州師范大學物理與電子工程學院課程設(shè)計報告 17 Rx=0。iRx。SystemBuf[6]==0x49) //如果有新短信 (TI)來 ,模塊會通過串口向單片機發(fā)送字符串 , { // 此函數(shù)的功能是判斷是否有新短信來 ,如果來的話就置位準備接受位標志為 1 receiveready=1。 if((SystemBuf[5]==0x54)amp。 } } /******************************************************************************************************************/ ////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////函數(shù) void receive_ready(void)。 } Rx=0。RxRxIn。 } else { //beep=0。Rx++) { SystemBuf[Rx]=0x00。 //如果單片機沒有收到 OK,就繼續(xù)發(fā)送初始化指令 / for(Rx=0。K39。amp。O39。 Delay_ms(1000)。 } Rx=0。RxRxIn。
點擊復制文檔內(nèi)容
公司管理相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1