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

正文內(nèi)容

片機(jī)原理及系統(tǒng)課程設(shè)計(jì)--基于單片機(jī)的電子鬧鐘設(shè)計(jì)-文庫吧

2025-05-15 06:31 本頁面


【正文】 t //****************************位聲明 ******************************** sbit key1=P1^0。 sbit key2=P1^1。 sbit key3=P1^2。 sbit key4=P1^3。 sbit fmq=P2^1。 //************************數(shù)碼管顯示的數(shù)值 ************************** uchar code table[]={0xc0,0xf9,0xa4,0xb0,0x99,0x92, // 0 1 2 3 4 5 0x82,0xf8,0x80,0x90,0xbf,0x0ff}。 // 6 7 8 9 滅 void jia()。 //定義時(shí)間加函數(shù) void jian()。 //定義時(shí)間減函數(shù) //********************數(shù)組定義,數(shù)組內(nèi)含有 8 個(gè)數(shù)值 ****************** uchar table1[8],table2[8],table3[8],table4[8]。 //**************************時(shí)間顯示初始值 ************************** uchar shi=12,fen=0,miao=0。 //**************************定義全局變量 **************************** uchar shi1,fen1,miao1,shi2,fen2,miao2,shi3,fen3,miao3。 uchar shi4,fen4,miao4。 uchar flag, flag1, wss, t, t1, alm1, alm2, alm3。 // 1 秒 等時(shí) 位閃 次數(shù) 校時(shí) 鬧 1 鬧 2 鬧 3 uint flag2。 // 蜂鳴 //*********************延時(shí)函數(shù),用于動(dòng)態(tài)掃描數(shù)碼管 ***************** void delay(uchar i) { uchar x,y。 for(x=i。x0。x) for(y=120。y0。y)。 } //*******************************初始化函數(shù) ************************* void init() { TMOD=0x01。 //工作方式 1 單片機(jī)原理及系統(tǒng)課程設(shè)計(jì)報(bào)告 7 TH0=0x3c。 //定時(shí)時(shí)間為: 50ms (6553650000)/256 TL0=0x0b0。 //(6553650000)%256 ET0=1。 //打開定時(shí)器 EA=1。 //開總中斷 TR0=1。 //啟動(dòng)定時(shí)器 } //********************顯示子函數(shù),用于顯示時(shí)間數(shù)值 ***************** void display() { uchar i,j。 if(t!=10||wss==0) { table1[0]=miao%10。 //分離秒的個(gè)位與十位 table1[1]=miao/10。 } else { table1[0]=table1[1]=11。} if(t!=11||wss==0) { table1[3]=fen%10。 //分離分的個(gè)位與十位 table1[4]=fen/10。 } else { table1[3]=table1[4]=11。} if(t!=12||wss==0) { table1[6]=shi%10。 //分離時(shí)的個(gè)位與十位 table1[7]=shi/10。 } else { table1[6]=table1[7]=11。} table1[2]=table1[5]=10。 j=0x7f。 for(i=0。i=7。i++) //從秒到時(shí)的掃描 { P3=j。 //選通點(diǎn)亮八個(gè)數(shù)碼管 P0=table[table1[i]]。 //顯示數(shù)值 delay(10)。 //調(diào)用延時(shí)程序 j=_cror_(j,1)。 //循環(huán)右移 } } //*******************顯示子函數(shù),用于顯示定時(shí) 1 時(shí)間 ***************** void display1() { uchar i,j。 if(alm1==0) { if(t!=1||wss==0) { table2[0]=miao1%10。 //分離秒的個(gè)位與十位 table2[1]=miao1/10。 } else { table2[0]=table2[1]=11。} 單片機(jī)原理及系統(tǒng)課程設(shè)計(jì)報(bào)告 8 if(t!=2||wss==0) { table2[3]=fen1%10。 //分離分的個(gè)位與十位 table2[4]=fen1/10。 } else { table2[3]=table2[4]=11。} if(t!=3||wss==0) { table2[6]=shi1%10。 //分離時(shí)的個(gè)位與十位 table2[7]=shi1/10。 } else { table2[6]=table2[7]=11。} } else table2[0]=table2[1]=table2[3]=table2[4]=table2[6]=table2[7]=10。 table2[2]= table2[5]=10。 j=0x7f。 for(i=0。i=7。i++) //從秒到時(shí)的掃描 { P3=j。 //選通點(diǎn)亮八個(gè)數(shù)碼管 P0=table[table2[i]]。 //顯示數(shù)值 delay(10)。 //調(diào)用延時(shí)程序 j=_cror_(j,1)。 //循環(huán)右移 } } //********************顯示子函數(shù),用于顯示定時(shí) 2 時(shí)間 ****************** void display2() { uchar i,j。 if(alm2==0) { if(t!=4||wss==0) { table3[0]=miao2%10。 //分 離秒的個(gè)位與十位 table3[1]=miao2/10。 } else { table3[0]=table3[1]=11。} if(t!=5||wss==0) { table3[3]=fen2%10。 //分離分的個(gè)位與十位 table3[4]=fen2/10。 } else
點(diǎn)擊復(fù)制文檔內(nèi)容
畢業(yè)設(shè)計(jì)相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1