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

正文內(nèi)容

c51課程設(shè)計(jì)報(bào)告(液晶時(shí)鐘)-wenkub.com

2025-04-08 22:17 本頁(yè)面
   

【正文】 delay_us(10)。 delay_us(100)。 rs = 0。 delay_us(10)。 delay_us(100)。 rs = 1。 delay_us(60)。 delay_us(60)。 delay_us(60)。 delay_us(200)。 //顯示當(dāng)前鬧鐘值 } }}/*↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓液晶控制函數(shù)↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓*/void init_lcd1602 ( void ) //1602液晶初始化函數(shù){ delay_us(500)。 //顯示當(dāng)前時(shí)間值 } if (KeyValue == 2) //若按下的是按鍵2,選擇設(shè)置鬧鐘 { SetAlarmFlage=1。 } if (KeyValue == 1) //若按下的是按鍵1,選擇設(shè)置時(shí)間 { SetTimeFlage=1。 } if (KeyValue == 3) //判斷有無(wú)按下設(shè)置按鍵 { SetFlage = 1。 KeyValue = GetKey()。 Value = 5。 Value = 3。 Value = 1。 if (Hour23) { Hour=0。 //清除顯示標(biāo)志位}/*↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓時(shí)間、鬧鈴計(jì)時(shí)運(yùn)算函數(shù)↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓*/void TimeRunning(void) //時(shí)鐘運(yùn)行{ if (Second59) //對(duì)時(shí)分秒進(jìn)行運(yùn)算 { Second=0。 //顯示鬧鐘的分的個(gè)位 lcd_w_dat (table[10])。 //顯示鬧鐘的時(shí)的十位 lcd_w_dat (table[AHour%10])。\039。 39。P39。 //清除顯示標(biāo)志位 }}void AlarmDisplay(void) //鬧鐘顯示{ uchar i=0。 } else { lcd_w_dat (table[10])。 } else { lcd_w_dat (table[10])。 i++。 //將顯示標(biāo)志位置1,防止在發(fā)生中斷時(shí),切斷當(dāng)前的顯示,防止造成顯示亂碼 lcd_w_cmd (0x80)。amp。 //清楚顯示標(biāo)志位}void Display(void) //主顯示函數(shù){ if(SetAlarmFlage==0 amp。\039。 i++。 lcd_w_cmd(0x80)。 DisplayFlage=1。 } LED3=1。 else AHour。 } } if (KeyValue==2) //若按下按鍵2,就對(duì)秒進(jìn)行減1 { if(ASecond1) ASecond。 if(AMinute==59) { AMinute=0。 while(KeyValue!=3) //若沒(méi)有按下確認(rèn)按鍵,直到按下確認(rèn)按鍵為止 { if(SetAlarmFlage==1) LED3=0。 //顯示當(dāng)前時(shí)鐘的值,用于在液晶顯示刷新 if(KeyValue==4 || SetAlarmFlage==0) { SetAlarmFlage=0。 else { AMinute=59。 else { AMinute=0。 //關(guān)閉設(shè)置時(shí)的LED,進(jìn)行下一步的設(shè)置分 KeyValue = GetKey()。 } AlarmDisplay()。 // if (KeyValue==1) //若按下按鍵1,就對(duì)時(shí)進(jìn)行加1 { if (AHour23) AHour++。 } KeyValue = GetKey()。 while(aset_dis[i]!=39。 //將時(shí)間設(shè)置標(biāo)志位置0,完成一次時(shí)間的設(shè)置 }}void SetAlarm(void) //鬧鈴設(shè)置{ uchar KeyValue=0,i=0。 //關(guān)閉LED,設(shè)置完成 EA=1。 } else Minute。 else { Second=59。 if(Hour==23) Hour=0。 //點(diǎn)亮LED3,用于顯示當(dāng)前是在設(shè)置時(shí)鐘的秒 KeyValue = GetKey()。 break。 if(Hour==0) Hour=23。 if(Hour==23) Hour=0。 while(KeyValue!=3) //若沒(méi)有按下確認(rèn)按鍵,直到按下確認(rèn)按鍵為止 { if(SetTimeFlage==1) LED2=0。 //顯示當(dāng)前時(shí)鐘的值,用于在液晶顯示刷新 if(KeyValue==4) { SetTimeFlage=0。 else Hour=0。 //將這值置0,用于時(shí)間顯示時(shí)顯示 :: KeyValue = GetKey()。 } EA=0。 while(tset_dis[i]!=39。 uchar tset_dis[]= Time setting。amp。 //查詢鍵盤,從中可以得出有沒(méi)有按鍵按下,按下的是不是設(shè)置按鍵3 if(SetTimeFlage==1) //設(shè)置時(shí)間標(biāo)志位被置1,就說(shuō)明當(dāng)前處于設(shè)置時(shí)間狀態(tài) { SetTime()。 EA=1。 init_lcd1602()。 //清計(jì)數(shù) Sound=1。 Second++。 } else if (mes15) ring=1。 mes++。 //聲明鬧鐘顯示函數(shù)void TimeRunning(void)。 //聲明設(shè)置鬧鐘函數(shù)void Menu_display(void)。 //聲明延時(shí)函數(shù)uchar GetKey(void)。void init_lcd1602 (void)。uchar table[]=0123456789: 。 //設(shè)定三盞LED的IO口,用于顯示當(dāng)前處于設(shè)置的時(shí)分秒sbit LED2 = P1^1。sbit quit = P3^3。 sbit e = P2^7。6C51液晶時(shí)鐘設(shè)計(jì)報(bào)告 水漾天藍(lán)附表1液晶時(shí)鐘源程序include define uchar unsigned char define RingingTime 30 //定義鬧鐘響鈴時(shí)間char Hour=23,Minute=59,Second=45。時(shí)間修改界面:按鍵按鍵按鍵按鍵LED1(對(duì)應(yīng)時(shí))
點(diǎn)擊復(fù)制文檔內(nèi)容
教學(xué)教案相關(guān)推薦
文庫(kù)吧 www.dybbs8.com
備案圖片鄂ICP備17016276號(hào)-1