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

正文內(nèi)容

基于單片機at89s52控制的數(shù)字時鐘系統(tǒng)(編輯修改稿)

2025-07-24 19:35 本頁面
 

【文章內(nèi)容簡介】 部件,利用S52語言編程,通過鍵盤控制和LED數(shù)碼管顯示實現(xiàn)了時間、日歷和鬧鐘功能。它性能穩(wěn)定,價格低廉,有很好的性價比,有利于工廠的大規(guī)模生產(chǎn)。附錄1 主要元器件清單 序號名稱、型號及規(guī)格數(shù)量備注1電阻 177。5%6 2電阻 177。5%43電阻 177。5%14電阻 RJ142W180Ω177。5%15電阻 177。5%96電阻 177。5%17瓷片電容30pF18電解電容100uF/25V19電解電容10uF/25V110單片機AT89S5211174ls244212發(fā)光二極管713按鍵614石英晶體振蕩器6M115共陰級8段數(shù)碼顯示管5101AGN3716*1附錄2:/*數(shù)字時鐘: 采用7位LED軟件譯碼動態(tài)顯示,P0為字段碼,P2為位選碼,數(shù)碼管共陰; key0為功能鍵,keykeykey3為調(diào)節(jié)鍵,key4為鬧鈴開關(guān)鍵。*/include include sbit key0=P1^0。sbit key1=P1^1。sbit key2=P1^2。sbit key3=P1^3。sbit P1_4=P1^4。sbit P1_5=P1^5。sbit P1_6=P1^6。sbit P1_7=P1^7。sbit P3_0=P3^0。sbit P3_1=P3^1。sbit P3_7=P3^7。unsigned char code dispcode[]={0x3f,0x06,0x5b,0x4f, 0x66,0x6d,0x7d,0x07, 0x7f,0x6f,0x77,0x7c, 0x39,0x5e,0x79,0x71,0x00}。 unsigned char dispbitcode[]={0xfd,0xfb,0xf7,0xef,0xdf,0xbf,0x7f}。unsigned char dispbuf[7]。 unsigned char dispbuf0[7]={7,0,2,0,5,2,1}。 //時間緩存unsigned char dispbuf1[7]={7,1,0,4,0,7,0}。 //年月緩存unsigned char dispbuf2[7]={7,0,0,1,0,2,1}。 //鬧鈴時間緩存unsigned char dispbitt。 unsigned char second=20。 unsigned char minite=50。 unsigned char hour=12。unsigned char day=1。unsigned char week=7。unsigned char month=4。unsigned char year=7。unsigned char second1。unsigned char minite1=1。unsigned char hour1=12。 unsigned int tt。 unsigned int con。 unsigned int s。unsigned char i,j。void day_28()。void day_29()。void day_30()。void day_31()。delay1ms(int t)。void keyscan()。 nl()。 main() { TMOD=0x02。 TH0=0x06。 TL0=0x06。 TR0=1。 ET0=1。 EA=1。 P1_5=0。 P1_6=0。 P1_7=0。 P3_7=1。 while(1) { keyscan()。 nl()。 } }/*按鍵處理子程序*/void keyscan(void) { //EA=0。 if(key0==0) { delay1ms(10)。 while(key0==0)。 {con=(con+1)%4。} //TR0=0。ET0=0。 //按鍵調(diào)節(jié)時停止計時 //TR0=1。ET0=1。} } if(con==1) //功能選擇1,時間調(diào)節(jié) { P1_5=1。 if(key1==0) { delay1ms(10)。 while(key1==0)。 //K1按一次小時加1 {hour=(hour+1)%24。} dispbuf0[5]=hour%10。 dispbuf0[6]=hour/10。 } if(key2==0) { delay1ms(10)。 while(key2==0)。 //K2按一次分鐘加1 {minite=(minite+1)%60。} dispbuf0[3]=minite%10。 dispbuf0[4]=minite/10。 } if(key3==0) { delay1ms(10)。 while(key3==0)。 //K3按一次星期加1 {week=(week)%7+1。} dispbuf0[0]=week。 } P1_5=0。 } if(con==2)
點擊復(fù)制文檔內(nèi)容
研究報告相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖片鄂ICP備17016276號-1