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

正文內(nèi)容

數(shù)字電子鐘整體設(shè)計畢業(yè)論文-資料下載頁

2025-06-28 15:15本頁面
  

【正文】 break。 case 2: temp=Read1302(DS1302_MONTH)。 //讀取月數(shù) temp=temp+1。 //月數(shù)加1 up_stop=1。 H_toBCD()。 if(temp0x12) temp=1。 break。 default:break。 } while(Up==0)。 }}void Upkeytime()//時間加一按鍵{ Up=1。 if(Up==0) { delay(8)。 switch(count) { case 1: temp=Read1302(DS1302_SECOND)。 //讀取秒數(shù) temp=temp+1。 //加1 up_stop=1。 H_toBCD()。 if(temp0x59) //超過59秒,清零 temp=0。 break。 case 2: temp=Read1302(DS1302_MINUTE)。 //讀取分鐘 temp=temp+1。 //加1 up_stop=1。 H_toBCD()。 if(temp0x59) //超過59分鐘,清零 temp=0。 break。 default:break。 } while(Up==0)。 }}void Setkey()//模式選擇按鍵{ Set=1。 if(Set==0) { delay(8)。 count=count+1。 //Setkey按一次,count就加1 done=1。 //進入調(diào)整模式 while(Set==0)。 }}void keydonedate()//日期按鍵功能{ uchar Second。 if(stop==0) //關(guān)閉時鐘,停止計時 { Write1302(0x8e,0x00)。 //寫入允許 temp=Read1302(0x80)。 Write1302(0x80,temp|0x80)。 //時鐘停止 Write1302(0x8e,0x80)。 //禁止寫入 stop=1。 //時鐘停止標志 } Setkey()。 //掃描模式切換按鍵 switch(count) { case 1: //調(diào)整日 { Upkeydate()。 if(up_stop==1) { Write1302(0x8e,0x00)。 //寫入允許 Write1302(0x86,temp)。 //寫入新的日數(shù) Write1302(0x8e,0x80)。 //禁止寫入 up_stop=0。 } shan_day++。 //位閃計數(shù) if(shan_day3) shan_day=0。 }break。 case 2: //調(diào)整月 { shan_day=0。 Upkeydate()。 if(up_stop==1) { Write1302(0x8e,0x00)。 //寫入允許 Write1302(0x88,temp)。 //寫入新的月數(shù) Write1302(0x8e,0x80)。 //禁止寫入 up_stop=0。 } shan_month++。 if(shan_month3) shan_month=0。 }break。 case 3: shan_month=0。 // 跳出調(diào)整模式,返回默認顯示狀態(tài) Second=Read1302(DS1302_SECOND)。 Write1302(0x8e,0x00)。 //寫入允許 Write1302(0x80,Secondamp。0x7f)。 Write1302(0x8E,0x80)。 //禁止寫入 done=0。 break。 //開啟中斷,標志位置0并退出 default:count=0。done=0。break。 }}void keydonetime()//時間按鍵功能{ uchar Second。 if(stop==0) //關(guān)閉時鐘,停止計時 { Write1302(0x8e,0x00)。 //寫入允許 temp=Read1302(0x80)。 Write1302(0x80,temp|0x80)。 //時鐘停止 Write1302(0x8e,0x80)。 //禁止寫入 stop=1。 //時鐘停止標志 } Setkey()。 //掃描模式切換按鍵 switch(count) { case 1: //調(diào)整秒 { Upkeytime()。 if(up_stop==1) { Write1302(0x8e,0x00)。 //寫入允許 Write1302(0x80,temp)。 //寫入新的秒數(shù) Write1302(0x8e,0x80)。 //禁止寫入 up_stop=0。 } shan_s++。 if(shan_s3) shan_s=0。 }break。 case 2: //調(diào)整分 { shan_s=0。 Upkeytime()。 if(up_stop==1) { Write1302(0x8e,0x00)。 //寫入允許 Write1302(0x82,temp)。 //寫入新的分數(shù) Write1302(0x8e,0x80)。 //禁止寫入 up_stop=0。 } shan_m++。 if(shan_m3) shan_m=0。 }break。 case 3: shan_m=0。 // 跳出調(diào)整模式,返回默認顯示狀態(tài) Second=Read1302(DS1302_SECOND)。 Write1302(0x8e,0x00)。 //寫入允許 Write1302(0x80,Secondamp。0x7f)。 Write1302(0x8E,0x80)。 //禁止寫入 done=0。 break。 //開啟中斷,標志位置0并退出 default:count=0。done=0。break。 }}//**********************鬧鐘部分*********************void Upkeynao()//鬧鐘加一按鍵{ Up=1。 if(Up==0) { delay(8)。 switch(press) { case 1: temp=naom。 temp=temp+1。 up_stop=1。 H_toBCD()。 if(temp0x59) temp=0。 break。 case 2: temp=naoh。 temp=temp+1。 up_stop=1。 H_toBCD()。 if(temp0x23) temp=0。 break。 default:break。 } while(Up==0)。 }}void n_Setkey() //鬧鐘模式選擇按鍵{ sao_z=1。 if(sao_z==0) { delay(8)。 press=press+1。 //Setkey按一次,press就加1 done=1。 //進入調(diào)整模式 naoToStr()。 Print(naoStr)。 while(sao_z==0)。 }}void keydonenao() //鬧鐘調(diào)整按鍵功能{ n_Setkey()。 //掃描模式切換按鍵 switch(press) { case 1: { Upkeynao()。 if(up_stop==1) { naom=temp。 up_stop=0。 } shan_naom++。 if(shan_naom3) shan_naom=0。 naoToStr()。 Print(naoStr)。 }break。 case 2: { shan_naom=0。 Upkeynao()。 if(up_stop==1) { naoh=temp。 up_stop=0。 } shan_naoh++。 if(shan_naoh3) shan_naoh=0。 naoToStr()。 Print(naoStr)。 }break。 case 3: shan_naoh=0。 done=0。 break。 default:press=0。done=0。break。 }}void x_ling(SYSTEMTIME *Time) //響鈴程序{ if((TimeTimeStr[0]==naoStr[0])amp。amp。(TimeTimeStr[1]==naoStr[1])amp。amp。(TimeTimeStr[2]==naoStr[2])amp。amp。(TimeTimeStr[3]==naoStr[3])) { XiangLing=0。 //響鈴 } else XiangLing=1。 //滅鈴}void sao_zao(void) { n_Setkey()。 while(done==1) { keydonenao()。 }}//****************LED顯示程序************************void show_time(unsigned char *str){ DS1302_GetTime(amp。Time1302)。 //將Time1302(結(jié)構(gòu)體變量名)數(shù)據(jù)轉(zhuǎn)到自定義的結(jié)構(gòu)型數(shù)組 DateToStr(amp。Time1302)。 //日期數(shù)據(jù)
點擊復制文檔內(nèi)容
黨政相關(guān)相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1