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

正文內(nèi)容

本科畢業(yè)論文-基于51單片機(jī)的智能電子時鐘設(shè)計(jì)【完-資料下載頁

2025-06-03 08:22本頁面
  

【正文】 rtn)。 } // //秒表模式 // void TaskSecond() { uchar hh=0,mm=0,ss=0,x10ms=0,ccms。 uchar tmp。 while (1) { LedSet(DEG1,0)。 LedSet(DEG2,0)。 LedSet(DEG3,0)。 LedSet(DEG4,0)。 LedSet(DEG5,0)。 LedSet(DEG6,0)。 LedSet(6,0xD4 )。 tmp=InKey()。 //等待啟動鍵 if (tmp==0x01) //mode key exit { return。 } else if (tmp==0x04 || tmp==0x08) //set key start { //運(yùn)行中 gms=0。 while (1) { if (gms!=0) { ccms++。 gms。 if (ccms==10) { x10ms++。 ccms=0。 if (x10ms==100) { ss++。 x10ms=0。 if (ss==60) { ss=0。 mm++。 if (mm==60) { hh++。 if (hh==100) hh=0。 } } } }else if (ccms==9) //刷新顯示 { if (hh==0) { LedSet(DEG1,mm / 10)。 LedSet(DEG2,mm % 10)。 LedSet(DEG3,ss / 10)。 LedSet(DEG4,ss % 10)。 LedSet(DEG5,x10ms / 10)。 LedSet(DEG6,x10ms % 10)。 LedSet(6,0xD4 )。 }else { LedSet(DEG1,hh / 10)。 LedSet(DEG2,hh % 10)。 LedSet(DEG3,mm / 10)。 LedSet(DEG4,mm % 10)。 LedSet(DEG5,ss / 10)。 LedSet(DEG6,ss % 10)。 LedSet(6,0xD0 )。 } }else { switch (GetKey()) { case 0x01: //mode 退出 return 。 break。 case 0x02: //set 暫停 while (1) { tmp=GetKey()。 if (tmp== 0x01) //mode exit return。 else if(tmp==0x04 || tmp==0x08) //繼續(xù) break。 else if (tmp== 0x02)//重置 { LedSet(DEG1,0)。 LedSet(DEG2,0)。 LedSet(DEG3,0)。 LedSet(DEG4,0)。 LedSet(DEG5,0)。 LedSet(DEG6,0)。 LedSet(6,0xD4 )。 hh=0。mm=0。ss=0。x10ms=0。ccms =0。 } } break。 } } } } } } } // //時間設(shè)置模式 // void TaskSetTime() { uchar tmp,pos=0。 uint cms=0。 gms=0。 while (1) { if (gms !=0) { gms。 cms++。 tmp=GetKey()。 if (tmp==0x01) return。 else if (tmp==0x02) { //set pos++。 cms=0。 if (pos==3) return。 }else if (tmp==0x04) //up { if (pos==0)//hh { tmp=tm_hour。 tmp++。 if (tmp=24) tmp=0。 tm_hour=tmp。 }else if (pos==1)//mm { tmp=tm_minute。 tmp++。 if (tmp=60) tmp=0。 tm_second=0。 tm_minute=tmp。 }else if(pos==2) { tm_second=0。 } cms=0。 }else if (tmp==0x08) //down { if (pos==0)//hh { tmp=tm_hour。 if (tmp==0) tmp=23。 else tmp。 tm_hour=tmp。 }else if (pos==1)//mm { tmp=tm_minute。 if (tmp==0) tmp=59。 else tmp。 tm_second=0。 tm_minute=tmp。 }else if(pos==2) { tm_second=0。 } cms=0。 } if (cms==1) { LedSet(DEG1,tm_hour / 10)。 LedSet(DEG2,tm_hour % 10)。 LedSet(DEG3,tm_minute / 10)。 LedSet(DEG4,tm_minute % 10)。 LedSet(DEG5,tm_second / 10)。 LedSet(DEG6,tm_second % 10)。 LedSet(6,0xE0)。 }else if (cms==500) { if (pos==0) { LedSet(DEG1,20)。 LedSet(DEG2,20)。 }else if (pos==1) { LedSet(DEG3,20)。 LedSet(DEG4,20)。 }else if (pos==2) { LedSet(DEG5,20)。 LedSet(DEG6,20)。 } }else if (cms==1000) cms=0。 } } } // //等待一個按鍵 // uchar InKey(void) { uchar rtn=0。 while (rtn ==0) { rtn=GetKey()。 } return (rtn)。 } // //倒計(jì) 時 // void TaskStopWatch() { uchar tmp,pos=0。 uchar hh=0,mm=0,ss=30,mms=0,m10ms=0。 uint cms=0。 while (1) { LedSet(DEG1,hh / 10)。 LedSet(DEG2,hh % 10)。 LedSet(DEG3,mm / 10)。 LedSet(DEG4,mm % 10)。 LedSet(DEG5,ss / 10)。 LedSet(DEG6,ss % 10)。 LedSet(6,0xB0)。 //hh=0,mm=0,ss=30,mms=0,m10ms=0。 tmp=InKey()。 if (tmp==0x01) return。 else if (tmp==0x02) { //stop time set gms=0。cms=0。 pos=1。 while (1) { if (gms!=0) { cms++。 gms。 tmp=GetKey()。 if (tmp==0x01) //exit { return。 }else if (tmp==0x02) //next pos { pos++。 if (pos==4) { pos=0。 break。 } } else if (tmp==0x04) //up { if ( pos==1)//hh { if (hh99) hh++。 else hh=0。 }else if (pos==2)//mm { if (mm59) mm++。 else mm=0。 }else if (pos==3)//s { if (ss59) ss++。 else ss=0。 } } else if (tmp==0x08) //down { if ( pos==1)//hh { if (hh0) hh。 else hh=99。 }else if (pos==2)//mm { if (mm0) mm。 else mm=59。 }else if (pos==3)//s { if (ss0) ss。 else ss=59。 } } if (cms==1) { LedSet(DEG1,hh / 10)。 LedSet(DEG2,hh % 10)。 LedSet(DEG3,mm / 10)。 LedSet(DEG4,mm % 10)。 LedSet(DEG5,ss / 10)。 LedSet(DEG6,ss % 10)。 LedSet(6,0xB0)。 }else if (cms==500) { if (pos==1) { LedSet(DEG1,20)。 LedSet(DEG2,20)。 }else if (pos==2) { LedSet(DEG3,20)。 LedSet(DEG4,20)。 }else if (pos==3) { LedSet(DEG5,20)。 LedSet(DEG6,20)。 } }else if (cms==1000) cms=0。 } } } else if (tmp==0x04 || tmp==0x08) { //start cms=0。gms=0。 while (1) { if (gms!=0) { cms++。 gms。 if (cms % 10==1) { if (m10ms==0) { if (ss==0) { if (mm==0) { if (hh==0) //stop break。 else { hh。 mm=59。 } }else { mm。 ss=59。 } }else { ss。 m10ms=99。 } }else m10ms。 }else { if (hh!=0) { LedSet(DEG1,hh / 10)。 LedSet(DEG2,hh % 10)。 LedSet(DEG3,mm / 10)。 LedSet(DEG4,mm % 10)。 LedSet(DEG5,ss / 10)。 LedSet(DEG6,ss
點(diǎn)擊復(fù)制文檔內(nèi)容
畢業(yè)設(shè)計(jì)相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1