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

正文內(nèi)容

紅外光通信裝置業(yè)設(shè)計畢業(yè)論文(編輯修改稿)

2024-07-23 08:03 本頁面
 

【文章內(nèi)容簡介】 SendIRdata(char p_irdata){ int i。 char irdata=p_irdata。 //發(fā)送9ms的起始碼 endcount=223。 flag=1。 count=0。 do{}while(countendcount)。 // endcount=117。 flag=0。 count=0。 do{}while(countendcount)。 //發(fā)送十六位地址的前八位 irdata=iraddr1。 for(i=0。i8。i++) {21 //() endcount=10。 flag=1。 count=0。 do{}while(countendcount)。 //停止發(fā)送紅外信號(即編碼中的高電平) if(irdata(irdata/2)*2) //判斷二進(jìn)制數(shù)個位為1還是0 { endcount=41。 //1為寬的高電平 } else { endcount=15。 //0為窄的高電平 } flag=0。 count=0。 do{}while(countendcount)。 irdata=irdata1。 } //發(fā)送十六位地址的后八位 irdata=iraddr2。 for(i=0。i8。i++) { endcount=10。 flag=1。 count=0。23 do{}while(countendcount)。 if(irdata(irdata/2)*2) { endcount=41。 } else { endcount=15。 } flag=0。 count=0。 do{}while(countendcount)。 irdata=irdata1。 } //發(fā)送八位數(shù)據(jù) irdata=p_irdata。 for(i=0。i8。i++) { endcount=10。 flag=1。 count=0。 do{}while(countendcount)。 if(irdata(irdata/2)*2) { endcount=41。 }23 else { endcount=15。 } flag=0。 count=0。 do{}while(countendcount)。 irdata=irdata1。 } //發(fā)送八位數(shù)據(jù)的反碼 irdata=~p_irdata。 for(i=0。i8。i++) { endcount=10。 flag=1。 count=0。 do{}while(countendcount)。 if(irdata(irdata/2)*2) { endcount=41。 } else { endcount=15。 } flag=0。 count=0。25 do{}while(countendcount)。 irdata=irdata1。 } endcount=10。 flag=1。 count=0。 do{}while(countendcount)。 flag=0}附錄B3 單片機(jī)紅外信號解碼程序void IR_IN() interrupt 2 using 0{ unsigned char j,k,N=0。 EX1 = 0。 delay(15)。 if (IRIN==1) { EX1 =1。 return。 } //確認(rèn)IR信號出現(xiàn) while (!IRIN) //等IR變?yōu)楦唠娖?,跳過9ms的前導(dǎo)低電平信號。 { delay(1)。} for (j=0。j4。j++) //收集四組數(shù)據(jù) { for (k=0。k8。k++) //每組數(shù)據(jù)有8位 { while (IRIN) {delay(1)。} //等 IR 變?yōu)榈碗娖健? while (!IRIN) {delay(1)。} //等 IR 變?yōu)楦唠娖? 25 while (IRIN) //計算IR高電平時長 { delay(1)。 N++。 if (N=30) { EX1=1。 return。} //。 } //高電平計數(shù)完畢 IRCOM[j]=IRCOM[j] 1。 //數(shù)據(jù)最高位補(bǔ)“0” if (N=8) {IRCOM[j] = IRCOM[j] | 0x80。} //數(shù)據(jù)最高位補(bǔ)“1” N=0。 }//end for k }//end for j if (IRCOM[2]!=~IRCOM[3]) { EX1=1。 return。 } IRCOM[5]=IRCOM[2] amp。 0x0F。 //取鍵碼的低四位 IRCOM[6]=IRCOM[2] 4。 //右移4次,高四位變?yōu)榈退奈? temp= IRCOM[6]*16+IRCOM[5]。 time[0]=table[temp/10]。time[1]=table[temp%10]。 for(j=0。j50。j++) display()。 EX1 = 1。 }附錄B4 單片機(jī)紅外發(fā)送程序include include include define uint unsigned intdefine uchar unsigned char///////////////////////////////////sbit P2_1 = P2^1。 //發(fā)送紅外端口sbit jdq=P2^0。27unsigned char i。static bit OP。 //紅外發(fā)射管的亮滅static unsigned int count。 //延時計數(shù)器static unsigned int endcount。 //終止延時計數(shù)static unsigned char flag。 //紅外發(fā)送標(biāo)志char iraddr1。 //十六位地址的第一個字節(jié)char iraddr2。 //十六位地址的第二個字節(jié)void SendIRdata(char p_irdata)。void delay()。
點擊復(fù)制文檔內(nèi)容
研究報告相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖片鄂ICP備17016276號-1