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

正文內(nèi)容

本科畢業(yè)論文-基于51單片機的智能電子時鐘設(shè)計【完-預(yù)覽頁

2025-07-05 08:22 上一頁面

下一頁面
 

【正文】 scan_step++。 TL0=(256125)。 } // //定時中斷 // uchar xcou=0。 void time0 (void) interrupt 1 { if (beep_en) { bz_flag=!bz_flag。 //LED 掃描 }else if (xcou==8 ) { xcou=0。 ms=0。 } if (tm_x10ms==100) //秒 { tm_second++。 //亮度高 } tm_x10ms=0。 tm_minute=0。 tm_day=1。 //平年各月天數(shù) uchar GetMDays(uchar cyear, uchar cmonth) { uchar rtn。 cmonth==2) //閏年 2 月 rtn=29。 } } // //GetKey 讀取按鍵 // uchar GetKey(void) { uchar rtn=0。//mode else if (P3_5==0) rtn|=0x02。 //pressed if (flag) { gms=0。 Light_Delay=60。 uchar tmp。 LedSet(DEG4,0)。 tmp=InKey()。 gms。 x10ms=0。 if (hh==100) hh=0。 LedSet(DEG4,ss % 10)。 }else { LedSet(DEG1,hh / 10)。 LedSet(DEG5,ss / 10)。 break。 else if (tmp== 0x02)//重置 { LedSet(DEG1,0)。 LedSet(DEG5,0)。mm=0。 } } break。 while (1) { if (gms !=0) { gms。 else if (tmp==0x02) { //set pos++。 tmp++。 tmp++。 }else if(pos==2) { tm_second=0。 else tmp。 else tmp。 } cms=0。 LedSet(DEG4,tm_minute % 10)。 }else if (cms==500) { if (pos==0) { LedSet(DEG1,20)。 }else if (pos==2) { LedSet(DEG5,20)。 while (rtn ==0) { rtn=GetKey()。 uint cms=0。 LedSet(DEG4,mm % 10)。 //hh=0,mm=0,ss=30,mms=0,m10ms=0。cms=0。 tmp=GetKey()。 break。 else mm=0。 else hh=99。 else ss=59。 LedSet(DEG4,mm % 10)。 }else if (cms==500) { if (pos==1) { LedSet(DEG1,20)。 }else if (pos==3) { LedSet(DEG5,20)。gms=0。 else { hh。 } }else { ss。 LedSet(DEG2,hh % 10)。 LedSet(DEG6,ss % 10)。 LedSet(DEG3,ss / 10)。 LedSet(6,0xB4)。cms=0。 LedSet(DEG2,0)。 LedSet(DEG6,0)。 LedSet(DEG3,20)。 LedSet(6,0xFF)。 else if (cms==300) beep_en=1。 } } } } } } // //日期 // void TaskDate() { uchar tmp,pos=0。 LedSet(DEG3,tm_month / 10)。 LedSet(6,0x7A)。//year cms=0。 if (cms==1) { LedSet(DEG1,tm_year / 10)。 LedSet(DEG5,tm_day / 10)。 LedSet(DEG2,20)。 LedSet(DEG6,20)。 else if (tmp==0x02) //next pos { pos++。 else tm_year=1。 else tm_day=1。 else tm_month=12。 } 鬧鐘版本 /******************************************************************************* 項目編號: CLK01 名稱:多功能時鐘 39。 39。 //返回當前日期的月份天數(shù) void T0_init()。 //秒表模式 void TaskSetTime()。 //日期 uchar InKey()。 //時分秒 uchar tm_x10ms=0。 uchar beep_delay=0。 bit alarmsound=0。 LedSet(DEG3,tm_minute / 10)。 LedSet(6,0xE0)。 //倒計時模式 TaskSetAlarm()。 TaskSetTime()。 default: 。 void LedScan() { P1=0。 if (led_scan_stepLight_Set ) led_scan_step=0。 EA=1。 uchar ms=0。 P2_7=bz_flag。 ms++。 if (beep_delay!=0) { beep_delay。 else if (tm_x10ms==20 || tm_x10ms==50) beep_en=0。 beep_en=0。 //變暗 else Light_Set=7。 if (tm_minute==60) //時 { tm_hour++。 if (tm_dayGetMDays(tm_year,tm_month)) //月 { tm_month++。 } } } } //鬧鐘檢查 if (al==1) { if (al_hour==tm_hour) { if (al_minute==tm_minute) { alarmtime=60。 if (cyear % 4==0 amp。 } // //設(shè)置指定位置數(shù)碼管的字符 // void LedSet(uchar pos, uchar num) { if (pos=6) led_buf[pos]=num。 flag=1。 //up else if (P3_7==0) rtn|=0x08。 } if (gms10) rtn=0。 if (rtn!=0) alarmsound=0。 while (1) { LedSet(DEG1,0)。 LedSet(DEG5,0)。 //等待啟動鍵 if (tmp==0x01) //mode key exit { return。 if (ccms==10) { x10ms++。 if (ss==60) { ss=0。 } } } }else if (ccms==9) //刷新顯示 { if (hh==0) { LedSet(DEG1,mm / 10)。 LedSet(DEG5,x10ms / 10)。 LedSet(DEG2,hh % 10)。 LedSet(DEG6,ss % 10)。 case 0x02: //set 暫停 while (1) { tmp=GetKey()。 LedSet(DEG2,0)。 LedSet(DEG6,0)。ss=0。 } } } } } } } // //時間設(shè)置模式 // void TaskSetTime() { uchar tmp,pos=0。 cms++。 cms=0。 if (tmp=24) tmp=0。 if (tmp=60) tmp=0。 } cms=0。 tm_hour=tmp。 tm_second=0。 } if (cms==1) { LedSet(DEG1,tm_hour / 10)。 LedSet(DEG5,tm_second / 10)。 LedSet(DEG2,20)。 LedSet(DEG6,20)。 } return (rtn)。 while (1) { LedSet(DEG1,hh / 10)。 LedSet(DEG5,ss / 10)。 tmp=InKey()。 pos=1。 if (tmp==0x01) //exit { return。 } } else if (tmp==0x04) //up { if ( pos==1)//hh { if (hh99) hh++。 }else if (pos==3)//s { if (ss59) ss++。 }else if (pos==2)//mm { if (mm0) mm。 } } if (cms==1) { LedSet(DEG1,hh / 10)。 LedSet(DEG5,ss / 10)。 LedSet(DEG2,20)。 LedSet(DEG6,20)。 while (1) { if (gms!=0) { cms++。 mm=59。 m10ms=99。 LedSet(DEG3,mm / 10)
點擊復(fù)制文檔內(nèi)容
畢業(yè)設(shè)計相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1