【正文】
制數(shù)碼管動(dòng)態(tài)掃描 這方面的內(nèi)容,所以在有些內(nèi)容的準(zhǔn)備上還有很多不足之處,我希望自己通過這次設(shè)計(jì)可以有很大的提高,從這次實(shí)踐中學(xué)到一些經(jīng)驗(yàn),并在以后的工作中有實(shí)踐的指導(dǎo)。 在論文的編寫方面,讓我有了很好的文字表達(dá)能力及理論到實(shí)踐的應(yīng)用能力,并對(duì)簡(jiǎn)單的文字編譯有了更熟練的掌握。 23 參考文獻(xiàn) [1] 張毅剛 . 單片機(jī)原理及應(yīng)用 [M]. 北京:高等教育 出版社 ,2021 年,第一版, P34。 [3] 徐君毅等 . 單片微型計(jì)算機(jī)原理及應(yīng)用 [M]. 上海:上海科學(xué)技術(shù)出版社, 1988 年,第一版, P44。 [5] 李華 . MCS51 系列單片機(jī)使用接口技術(shù) [M]. 北京:北京航空航天大學(xué)出版社, 1993年,第一版, P80。 [7] 李廣弟 . 單片機(jī)基礎(chǔ) [M]. 北京:北京航空航天大學(xué)出版社, 2021 年,第一版, P38。 [9] 張洪潤(rùn),蘭清華 . 單片機(jī)應(yīng)用技術(shù)教程 [M],北京:清華大學(xué)出版社, 1997 年,第一版, P32。 24 附錄一 源程序 // 電子時(shí)鐘設(shè)計(jì) // include define uchar unsigned char define uint unsigned int define SPK P2_1 define K1 P2_2 define K2 P2_3 define K3 P2_4 define K4 P2_5 define LED P2_0 define FLAG P0_0 void keyscan()。 void K2function()。 void K4function()。 uchar hour=16,min=18,sec=0。 uint counter。 uchar deda=0。 void disp(uchar H,uchar M,uchar S)。 TH0=((655355000)/256)。 IE=0X82。 } // void T0_srv(void) interrupt 1 { TH0=((655355000)/256)。 deda++。 if(deda=200){sec++。} if(sec==60){min++。} if(min==60){hour++。} if(hour==24){hour=0。P3=0xDf。 P1=H%10。delay(5)。P3=0xf7。 P1=M%10。delay(5)。P3=0xfD。 P1=S%10。delay(5) 。 while(ms) { for(i=0。i++)。 delay(500)。 } 27 //蜂鳴器鳴響模塊 void BZ(uint k) { uint i。i1000。 disp(hour,min,sec)。ledsd()。} if(K2==0) {while(!K2)。K2function()。ledsd()。} if(K4==0) {while(!K4)。K4function()。 do { if(K2==0) {while(!K2)。hour%=24。} if(K3==0) {while(!K3)。min%=60。} disp(hour,min,sec)。 ledsd()。 } void K2function() { do { if(K2==0) {while(K2!=0)。AH%=24。} if(K3==0) {while(K3!=0)。AM%=60。} disp(AH,AM,0)。 29 ledsd()。 } //對(duì)時(shí)檢查函數(shù) void check() { if(AH==hour) { if(AM==min) BZ(30)。 do { if(K3==0) { do{disp(Asec,Msec,0)。 while(K2==1) { Msec=counter/2。Msec=0。 disp(Asec,Msec,0)。}while(K2==0)。}while(K2==0)。 Msec=0。 }while(K4==1)。 if(ON) BZ(3)。 } //主函數(shù) void main() { FLAG=0。 while(1) { keyscan()。 if(ON) check()。s CD4000 series these pure hardware do decides, the electric circuit certainly are a big PCB board! But if, if succeeded in the 70s with the US puts in the market the series monolithic integrated circuit, the result will have the huge difference! Because only the monolithic integrated circuit piles through you the procedure may realize the high intelligence, high efficiency, as well as redundant reliability! 34 Because the monolithic integrated circuit to the cost is sensitive, therefore present occupies the dominant status the software is the most preliminary assembly language, it was except the binary machine code above the most preliminary language, since why were such preliminary must use? Why highlevel did the language already achieve the visualization programming level not to use? The reason is very simple, is the monolithic integrated circuit does not have home puter such CPU, also has not looked like the hard disk such mass memory equipment. Inside even if a visualization higher order language pilation script only then a button, also will achieve several dozens K the sizes! Does not speak anything regarding the home use PC hard disk, but says regarding the monolithic integrated circuit cannot accept. The monolithic integrated circuit in the hardware source aspect39。s on operating system and the application software home use PC to e up the movement, home use PC could also not withstand. It can be said that the 20th century surmounted three “the electricity” the time, namely the electrical time, the Electronic Age and already entered puter time. However, this kind of puter, usually refers to the personal puter, is called PC machine. It by the main engine, the keyboard, the monitor and so on is posed. Also has a kind of puter, most people actually not how familiar. This kind of puter is entrusts with the intelligence each kind of mechanical monolithic integrated circuit (also to call micro controller). , This kind of puter39。s use domain already very widespread, like the intelligent measuring appliance, the solid work paid by time control, the munication equipment, the guidance system, the domestic electric appliances and so on. Once each product used the monolithic integrated circuit, could get up causes the effect which the product turned to a new generation, often before product range crown by adjective “intelligence”, like intelligence washer and so on. Now some factory39。概括的講:一塊芯片就成了一臺(tái)計(jì)算機(jī)。同時(shí),學(xué)習(xí)使用單片機(jī)是了解計(jì)算機(jī)原理與結(jié)構(gòu)的最佳選擇。我們現(xiàn)在用的全自動(dòng)滾筒洗衣機(jī)、排煙罩、 VCD等等的家電里面都可以看到它的身影! ......它主要是作為控制部分的核心部件。 單片機(jī)是靠程序的,并且可以修改。一個(gè)不是很復(fù)雜的功能要是用美國(guó) 50 年代 開發(fā)的 74 系列,或者 60年代的 CD4000 系列這些純硬件來搞定的話,電路一定是一塊大 PCB 板!但是如果要是用美國(guó) 70 年代成功投放市場(chǎng)的系列單片機(jī),結(jié)果就會(huì)有天壤之別!只因?yàn)閱纹瑱C(jī)的通過你編寫的程序可以實(shí)現(xiàn)高智能,高效率,以及高可靠性! 由于單片機(jī)對(duì)成本是敏感的,所以目前占統(tǒng)治地位的軟件還是最低級(jí)匯編語言,它是除了二進(jìn)制機(jī)器碼以上最低級(jí)的語言了,既然這么低級(jí)為什么還要用呢?很多高級(jí)的語言已經(jīng)達(dá)到了可視化編程的水平為什么不用呢?原因很簡(jiǎn)單,就是單片機(jī)沒有家用計(jì)算機(jī)那樣的 CPU,也沒有像硬盤那樣的海量存儲(chǔ)設(shè)備 。 單片機(jī)在硬件資源方面的利用率必須很高才行,所以匯編雖然原始卻還是在大量使用。 可以說,二十世紀(jì)跨越了三個(gè) “ 電 ” 的時(shí)代,即電氣時(shí)代、電子時(shí)代和現(xiàn)已進(jìn)入的電腦時(shí)代。它由主機(jī)、鍵盤、 37 顯示器等組成。這種計(jì)算機(jī)就是把智能賦予各種機(jī)械的單片機(jī)(亦稱微控制器)。因?yàn)樗w積小,通常都藏在被控機(jī)械的 “ 肚子 ” 里?,F(xiàn)在,這種單片機(jī)的使用領(lǐng)域已十分廣泛,如智能儀表、實(shí)時(shí)工控、通訊設(shè)備、導(dǎo)航系統(tǒng)、家用電器等?,F(xiàn)在有些工廠的技術(shù)人員或其它業(yè)余電子開發(fā)者搞出來的某些產(chǎn) 品,不是電路太復(fù)雜,就是功能太簡(jiǎn)單且極易被仿制。