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

正文內(nèi)容

gsm網(wǎng)絡(luò)的遠(yuǎn)程家庭智能監(jiān)控系統(tǒng)設(shè)計(jì)畢業(yè)論文-資料下載頁(yè)

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

【正文】 ,chinit,chping,chname。sbit LED1=P1^0。sbit LED2=P1^1。sbit LED3=P1^2。sbit LED4=P1^3。sbit LED=P1^4。uint Time,Time1。void delay1ms(uint x){ for(Time=0。Timex。Time++) for(Time1=0。Time1120。Time1++)。 }/********************************************************************* * C51中字符串函數(shù)的擴(kuò)充 * *********************************************************************/uchar strsearch(uchar *ptr2){//查字符串*ptr2在*ptr1中的位置//本函數(shù)是用來(lái)檢查字符串*ptr2是否完全包含在*ptr1中//返回: 0 沒(méi)有找到// 1255 從第N個(gè)字符開(kāi)始相同 uchar i,j,k。 uchar flag。 if(ptr2[0]==0) return(0)。 flag=0。 for(i=0,j=0。iMAX_TM2。i++){ if(uart_buff[i]==ptr2[j]){//第一個(gè)字符相同 for(k=i。kMAX_TM2。k++,j++){ if(ptr2[j]==0)//比較正確 return(i+1)。 //返回值是整數(shù),不含0 if(uart_buff[k]!=ptr2[j]) break。 } j=0。 } } return(0)。}/********************************************************************* * AT指令發(fā)送程序 * *********************************************************************/uchar Send_AT_Command( uchar type){ //發(fā)送AT指令////其他用para_temp AT_Command_Type=type。 send_count=0。 switch(type){ case RESET_TC35: //復(fù)位TC35 strcpy(uart_buff,AT+CFUN=1,1)。 break。 case CHECK_PIN: //檢查當(dāng)前是否要輸入PIN碼 strcpy(uart_buff,AT+CPIN?)。 break。 case TC35_INIT: //TC35初始化命令 strcpy(uart_buff,ATE0V0)。 break。 //0D 0A 54 43 33 35 0D 0A case SIM_ID: strcpy(uart_buff,ATE0V0+CMGF=1+CNMI=2,1)。 break。 case AT_IPR: strcpy(uart_buff,AT+IPR=9600)。 break。 case SMSS_ID: strcpy(uart_buff,ATE0V0^SSMSS=1+CNMI=2,1)。 break。 case SMS_CMGF: //SMS 接收方式, strcpy(uart_buff,ATE0V0+CMGF=0)。 break。 case PHONE_WRITE: //存電話號(hào)碼 strcpy(uart_buff,AT+CPBW=)。 strcat(uart_buff,para_temp)。 break。 case PHONE_READ: //讀電話本 strcpy(uart_buff,AT+CPBR=)。 strcat(uart_buff,amp。read_tmp)。 uart_buff[9]=0x0d。 uart_buff[10]=0x0a。 uart_buff[11]=0x00。 uart_buff[12]=0x00。 break。 case SMS_CMGR: //讀一個(gè)短信 strcpy(uart_buff,AT+CMGR=)。 strcat(uart_buff,para_temp)。 break。 case SMS_CMGS: //寫(xiě)一個(gè)短信 strcpy(uart_buff,AT+CMGS=)。 strcat(uart_buff,para_temp)。 break。 case SMS_CMGD: //刪除一個(gè)短信 strcpy(uart_buff,AT+CMGD=)。 strcat(uart_buff,para_temp)。 break。 case CMGS_MUB: //發(fā)報(bào)警短信內(nèi)容 strcpy(uart_buff,para_temp)。 break。 case AT_COMMAND: break。 default: receive_count=0。 return(TRUE)。 } ES=1。 strcat(uart_buff,\x0d\x00)。//在命令后加入CR send_count=0。 //設(shè)置發(fā)送指針 receive_count=0。 AT_Command_Status=COMMAND_WAIT。 //設(shè)置接收成功標(biāo)志 timer_S_t=0。 txd_rxd_bit=0。 at_send_bit=0。 TI=1。 //開(kāi)始發(fā)送數(shù)據(jù) RI=0。 //清除接收標(biāo)志 if (type==TC35_INIT){ while (timer_S_t6){ if (AT_Command_Status!=COMMAND_WAIT||txd_rxd_bit==1) return(TRUE)。 } } else if((type==SMS_CMGR)){ while (timer_S_t6){ if (AT_Command_Status!=COMMAND_WAIT||txd_rxd_bit==1) return(TRUE)。 } } else if((type==CALL_ID)){ while (timer_S_t2){ if (AT_Command_Status!=COMMAND_WAIT||txd_rxd_bit==1) return(TRUE)。 } } else{ while (timer_S_t6){ if (AT_Command_Status!=COMMAND_WAIT||txd_rxd_bit==1){ return(TRUE)。 } } } return(FALSE)。}void Sys_Init(void){//話機(jī)啟動(dòng)的初始化程序,包含鍵盤(pán)與定時(shí)器,串口等 //TH0=(6553646080)/256。//重新裝入定時(shí)25mS的初值到TH0,TL0 56320 //TL0=(6553646080)%256。 //65536()*20MS*1000=To 18432 47104 //1ms定時(shí) //(記數(shù)頻率) //1ms記數(shù) //16位 2^16 x = 922 x=64614 FC66 //定時(shí)器里不斷放fc66,不用懷疑51定時(shí)器得到的 1ms的精確性嗎 //TH0 = 0xf6。 //TL0 = 0x50。 TH0 = 0xB8。 TL0 = 0x00。 //20ms的時(shí)鐘基準(zhǔn)//串口中斷 TI=0。 RI=0。 SCON=0x50。 //選用方式1 TMOD=0x20。 TMOD = (TMOD amp。 0xf0) | 1。//MODE 1 TH1=0xfd。 //波特率為9600 TL1=0xfd。 PCON=0x00。 //倍頻0x80 IE = 0xb0。 // EA XX ET2 ES ET0 EX0 ET1 EX1 11000000 TR1=1。 //enable TIMER1 ES=1。 TR0=1。 ET0=1。 ET1=0。 EA=1。 timer_1S_t=0。 receive_count=0。 send_count=0xff。 //表示禁止發(fā)送,可以接收}//======================================================================//========================進(jìn)行SIM卡中的1到20條短信號(hào)碼的讀==============================================//======================================================================uchar READ_TEL(uchar r){ //讀短信號(hào)碼1-20個(gè) // uchar r。 para_temp[0]=(r/10)+0x30。para_temp[1]=(r%10)+0x30。 para_temp[2]=0x0d。para_temp[3]=0x00。 para_temp[4]=0x00。para_temp[5]=0x00。para_temp[6]=0x00。para_temp[7]=0x00。 para_temp[8]=0x00。para_temp[9]=0x00。para_temp[10]=0x00。para_temp[11]=0x00。 // timer_S_t=0。 while(timer_S_t1amp。amp。(AT_Command_Status==COMMAND_WAIT)) watch_dog_clear。 Send_AT_Command(SMS_CMGR)。 timer_S_t=0。 //while(timer_S_t1amp。amp。(AT_Command_Status==COMMAND_WAIT)) watch_dog_clear。 send_count=0。 if(strsearch(CMGR: 0,0)){ //+CMGR: 0,0 沒(méi)有短信返回 // timer_S_t=0。 while(timer_S_t1) watch_dog_clear。 ES=1。 //設(shè)置發(fā)送指針 receive_count=0。 send_count=0xff。 RI=0 。 return(FALSE)。 } else if(uart_buff[1]==0x0damp。amp。uart_buff[0]==0x34){ return(FALSE)。 } else{ if(AT_Command_Status==COMMAND_ERROR) return(FALSE)。 else return(TRUE)。 }}//============================================//========== 讀寫(xiě)短信程序//====================================================void read_sms(){ uchar i,r,j,t。 for(r=1。r20。r++){ timer_tmp=0。 // while(timer_tmp15) watch_dog_clear。// if(strsearch(+CMTI:)) return。 //是否有新短信 num_tmp1=r。 if(READ_TEL(r)!=1){ //讀一個(gè)短信 at+cmgr=119 讀指令 if(strsearch(+CMTI:)) return。 continue。 }//T
點(diǎn)擊復(fù)制文檔內(nèi)容
環(huán)評(píng)公示相關(guān)推薦
文庫(kù)吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1