【正文】
t_DateTime(DateTime[0],LCD_DSY_BUFFER2+11)。[39。 } else if(K4==0) // 確定 { while(K4==0)。 Adjust_Index=1。 TR0=1。s 150th anniversary celebrations and will attend City39?;蛟S是愧疚于自己似乎把轉(zhuǎn)瞬即逝的很多個不同的日子過成了同一天的樣子;或許是追溯過去,對自己那些近乎偏執(zhí)的怪異信念的醒悟,這些天以來,思緒一直很凌亂,在腦海中不斷糾纏。t remember his appearance. 童年時,覺得壓歲錢和新衣服是過年必備,但是隨 著年齡的推進(jìn),會越來越發(fā)現(xiàn),那些東西根本就可有可無;初中時,以為要有一場暗戀才意味著真正的成長,但三年過去后,自己心平氣和的寫同學(xué)錄的時候,突然就發(fā)現(xiàn)是不是真正的成長了,好像并沒有那么重要了;然后到了高中,覺得非要吐露出自己的心聲才能為高中生涯里的懵懂情愫劃上一個句點,但畢業(yè)晚會的時候最終還是被梗塞在了咽喉,后來再次站在他曾經(jīng)揮汗如雨的球場,看著他投過籃球的球框時,突然間發(fā)現(xiàn)自己已經(jīng)想不起他的容顏。 28 At the moment, the sky is dark, the air is fresh factor after just rained. Suddenly thought of blue plaid shirt。 Baumgartner the disappointing news: Mission aborted. r plays an important role in this mission. Starting at the ground, conditions have to be very calm winds less than 2 mph, with no precipitation or humidity and limited cloud cover. The balloon, with capsule attached, will move through the lower level of the atmosphere (the troposphere) where our daytoday weather lives. It will climb higher than the tip of Mount Everest ( miles/ kilometers), drifting even higher than the cruising altitude of mercial airliners ( miles/ kilometers) and into the stratosphere. As he crosses the boundary layer (called the tropopause),e can expect a lot of turbulence. The supersonic descent could happen as early as Sunda. The weatheThe balloon will slowly drift to the edge of space at 120,000 feet ( Then, I would assume, he will slowly step out onto something resembling an Olympic diving platform. Below, the Earth bees the concrete bottom of a swimming pool that he wants to land on, but not too hard. Still, he39。嫌惡過自己的怯懦,最終卻發(fā)現(xiàn)有很多 緣分 ,有很多錯過,好像冥冥之中真的已經(jīng)注定。 Then in high school, think don39。s plaint. In a statement the Russian side added: We found no racist insults from fans of CSKA. Age has reached the end of the beginning of a word. May be guilty in his 27 seems to passing a lot of different life became the appearance of the same day。re clear about the terms of the agreement. It might be best to get advice from an experienced adviser, for example, at a Citizens Advice Bureau. To find your nearest CAB, including those that give advice by , click on nearest CAB. For more information about making a claim to an employment tribunal, see Employment tribunals. The (lack of) air up there Watch mCayman Islandsbased Webb, the head of Fifa39。 TH0=50000/256。 LCD_DSY_BUFFER2[15]=39。 25 } else if(K3==0) // 減 { while (K3==0)。 if(Adjust_Index==5) Adjust_Index=4。 Format_DateTime(DateTime[2],LCD_DSY_BUFFER2+5)。 24 } } /* 定時器每秒刷新 LCD 顯示 */ void T0_INT() interrupt 1 { TH0=50000/256。 break。 RefreshWeekDay()。 break。amp。 if(x==1amp。 for(i=1。amp。 for(i=0。 RST=0。 CLK=1。 CLK=0。 x=1。 DelayMS(1)。 Display_LCD_String(0x40,dian zi ri li)。 Write_LCD_Command(0x01)。 RW=0。 RW=0。 EN=0。i120。 uchar Read_LCD_State()。 uchar tCount=0。 //DS1302 復(fù)位線 sbit RS=P2^0。在解決這些問題的過程中發(fā)現(xiàn)網(wǎng)絡(luò)確實是一個很好的學(xué)習(xí)平臺,利用前人的經(jīng)驗可以提 高自己的解決實際問題的能力。 proteus 是一個非常好用的仿真軟件,其具有強(qiáng)大的電路原理圖繪制功能,且可以實現(xiàn)模擬電路仿真、數(shù)字電路仿真、單片機(jī)及其外圍電路組成的系統(tǒng)仿真、鍵盤、 LCD 系統(tǒng)仿真等多種功能; 和 keil 聯(lián)合使用時可以檢測所編寫的程序的正確與否。多次按 K1 鍵,當(dāng)全部閃爍位全閃爍完畢時,就可以退出調(diào)整模式。當(dāng)時達(dá)到 24 時,也一樣處理。 Format_DateTime(DateTime[0],LCD_DSY_BUFFER2+11)。 if(++tCount!=2) return。amp。 case 2: //時 if(x== 1amp。 if(x== 1amp。 if(x==1amp。DateTime[6]0) DateTime[6]。i++) d+=MonthsDays[i]。 } void RefreshWeekDay() { uint i,d,w=5。i++) { DateTime[i]=Read_Data(0x81+2*i)。 Write_DS1302(0x8e,0x00)。 write_setds(0x88,0x03)。 第 7~ 14 腳: D0~ D7為 8位雙向數(shù)據(jù)線 。下面以長沙太陽人電子有限公司的 1602 字符型液晶顯示器為例,介紹其用法。對于位 6,若對程序進(jìn)行讀 /寫時 RAM=1,對時間進(jìn)行讀 /寫時, CK=0。 RST 輸 入有兩種功能:首先, RST 接通控制邏輯,允許地址 /命令序列送入移位寄存器;其次, RST 提供終止單字節(jié)或多字節(jié)數(shù)據(jù)的傳送手段。 主要單元電路的設(shè)計 單片機(jī)主控制模塊的設(shè)計 STC89C52單片機(jī)為 40引腳雙列直插芯片 ,有四個 I/O口 P0,P1,P2,P3, MCS51單片機(jī)共有 4個 8位的 I/O口( P0、 P P P3) ,每一條 I/O 線都能獨(dú)立地作輸出或輸入。所以顯示部分采用 1602 液晶顯示。我們進(jìn)行了如下拓展:實現(xiàn)日歷和時鐘的顯示并且能夠?qū)δ暝氯諘r分秒進(jìn)行調(diào)試。相比于老師要求我們做的“簡易數(shù)字鐘”的設(shè)計要求: 開機(jī)時,顯示 12: 00: 00 的時間開始計時; 控制 “秒 ”的調(diào)整,每按一次加 1 秒; 控制 “分 ”的調(diào)整,每按一次加 1 分; 控制 “時 ”的調(diào)整,每按一次加 1 個小時。 方案三: 采用 LCD 液晶顯示屏 ,液晶顯示屏的顯示功能強(qiáng)大 ,可顯示大量文字 ,圖形 ,顯示多樣 ,清晰可見 ,與普通數(shù)碼管相比功耗較小,硬件連接簡單??? 產(chǎn)生年、月、日、時、分、秒,具有使用壽命長,精度高和低功耗等特點,同時具有掉電自動保存功能 ,本電路采用 DS1302 單字節(jié)傳送方式實現(xiàn)與主控機(jī)之間數(shù)據(jù)的傳送;顯示部分由 1602 構(gòu)成。 RST 是復(fù) 位 /片選線,通過把 RST 輸 入驅(qū)動置高電平來啟動所有的數(shù)據(jù)傳送。 DS1302 的控制字,此控制字的位 7 必須置 1,若為 0 則不能 把對 DS1302 進(jìn)行讀寫數(shù)據(jù)。 6 顯示模塊的設(shè)計 1. 1602 介紹 字符型液晶顯示模塊是一種專門用于顯示字母、數(shù)字、符號等點陣式LCD,目前常用 16*1, 16*2, 20*2 和 40*2 行等的模塊。 第 6腳: E端為使能端,當(dāng) E端由高電平跳變成低電平時,液晶模塊執(zhí)行命令。 write_setds(0x86,0x17)。時間調(diào)整程序流程圖如圖 B所示 : 判斷是否有鍵按下 Y N 計時停止 判斷功能鍵按下次數(shù) ≤ 7 次 =8 次 對應(yīng)位閃爍 加鍵按下 減鍵按下 對應(yīng)位時間加 1 對應(yīng)位時間減 1 顯示子程序 返回,進(jìn)入主程序 圖 B 時間調(diào)整程序流程圖 10 void SET_DS1302() { uchar i。i7。y%100!=0)||(y%400==0)。iDateTime[4]。amp。DateTime[4]12) DateTime[4]++。 case 3: //日 MonthsDays[2]=isLeapYear(2021+DateTime[6])? 29:28。 break。 12 case 1: //秒 if(x== 1amp。 TL0=50000%256。 Format_DateTime(DateTime[1],LCD_DSY_BUFFER2+8)。 時分秒進(jìn)位算法 當(dāng)秒,分達(dá)到 60 時,向分進(jìn)位,且秒數(shù)置零,從新開始計數(shù)。按 K3 鍵是對閃爍位進(jìn)行減一的操作。并且本實驗的電子鐘即要實現(xiàn)時間的現(xiàn)實,還要實現(xiàn)日期的現(xiàn)實,所以若是運(yùn)用數(shù)碼管進(jìn)行顯示的話,就算運(yùn)用動態(tài)顯示,所占用的 IO 口多,并且所需的數(shù)碼管個數(shù)多,硬件復(fù)雜。 盡管有參加電子設(shè)計大賽的經(jīng)歷了,但是可能由于近一年時間沒有接觸單片機(jī),編程,看程序的原因了,在整個過程中還是遇到了很多故障,不過通過各種渠道(比如網(wǎng)絡(luò),請教同學(xué),老師等等)解決了一些故障,雖然沒有全部解決,但能在短短一周內(nèi)通過此次作業(yè),實現(xiàn)電子鐘的功能,還是有點成就感的。 //DS1302 時鐘線 sbit RST=P1^2。 // 確定 void Display_LCD_String(uchar p,uchar *s)。 //當(dāng)前調(diào)節(jié)的時間:秒,分,時,日, uchar Change_Flag[]=MHDMY。 while(x) for(i=0。 state=P0。 RS=1。 RS=0。 DelayMS(1)。 // DelayMS(1000)。i++) { Write_LCD_Data(s[i])。 CLK=0。 CLK=1。 dat=DS1302_Read_Byte()。 CLK=0。 } /* 讀取當(dāng)前時期時間