版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡介
PAGEPAGE23昆明工業(yè)職業(yè)技術(shù)學(xué)院課程設(shè)計(jì)任務(wù)書設(shè)計(jì)題目:電子時(shí)鐘電路班級:2010級電氣自動(dòng)控制技術(shù)3班學(xué)生姓名:學(xué)號(hào):指導(dǎo)教師:職稱:講師指導(dǎo)小組組長:教學(xué)班負(fù)責(zé)人:設(shè)計(jì)時(shí)間:2012年6月18日至2012年7月1日一、設(shè)計(jì)目的及設(shè)計(jì)要求(一)設(shè)計(jì)目的:按要求完成單片機(jī)實(shí)現(xiàn)電子時(shí)鐘系統(tǒng)(二)設(shè)計(jì)要求及技術(shù)指標(biāo)1、采用MCS—51系列單片機(jī)設(shè)計(jì)一個(gè)嫩而過顯示時(shí)、分、秒的電子時(shí)鐘。2、剛打開電源是,顯示的數(shù)據(jù)為12:00:00,然后電路會(huì)自動(dòng)開始計(jì)時(shí)。電路中應(yīng)有時(shí)、分、秒的各自單獨(dú)的時(shí)間調(diào)整按鈕。當(dāng)顯示數(shù)據(jù)變?yōu)?3:59:59時(shí),接下來的顯示數(shù)據(jù)應(yīng)變?yōu)?0:00:00.時(shí)間調(diào)整按鈕每按一次,應(yīng)使相應(yīng)調(diào)整的顯示時(shí)間值家1.3、位碼采用P1口通過3—8譯碼器實(shí)現(xiàn),段碼采用P1口通過74LS47芯片實(shí)現(xiàn)。(二)課程設(shè)計(jì)說明書應(yīng)包含的內(nèi)容1、目錄2、系統(tǒng)工作原理3、電子時(shí)鐘設(shè)計(jì)總體電路圖4、程序流程圖5、程序模塊設(shè)計(jì)6、設(shè)計(jì)分析總結(jié)7、參考文獻(xiàn)(三)課程設(shè)計(jì)應(yīng)完成的圖紙(1)時(shí)鐘電路設(shè)計(jì)電路圖A4一張(2)時(shí)鐘電路設(shè)計(jì)程序流程圖A4一張(四)其它要求:設(shè)計(jì)說明書采用A4紙打印,要求采用宋體小四,并標(biāo)上頁碼。(五)課程設(shè)計(jì)(論文)的期限:自2012年6月18日至2012年7月1日(六)課程設(shè)計(jì)(論文)進(jìn)度計(jì)劃:起訖日期工作內(nèi)容備注6月18日6月18日-6月19日6月20日-6月24日-6月26日6月27日-6月30日7月1日下達(dá)《課程設(shè)計(jì)任務(wù)書》收集設(shè)計(jì)資料擬定設(shè)計(jì)初稿修改設(shè)計(jì)方案、繪制設(shè)計(jì)草圖編制設(shè)計(jì)說明書、正式繪圖交設(shè)計(jì)資料,進(jìn)行質(zhì)疑。目錄課程設(shè)計(jì)名稱1、單片機(jī)簡介…………………()2、設(shè)計(jì)意義……………………()二、設(shè)計(jì)方案1、電子時(shí)鐘應(yīng)用方向…………()2、時(shí)鐘芯片的重要性…………()3、構(gòu)成電子時(shí)鐘的設(shè)計(jì)思路…………………()三、設(shè)計(jì)內(nèi)容8051單片機(jī)實(shí)現(xiàn)的控制及時(shí)鐘調(diào)整…………()四、硬件與軟件部分1電子時(shí)鐘的概述……………()2,電子時(shí)鐘的硬件電路設(shè)計(jì)………………()2.1選用單片機(jī)………………()2.28051單片機(jī)引腳…………()2.3單片機(jī)各接口功能:………()2.4單片機(jī)工作原理……………()2.5,發(fā)光二級管8字?jǐn)?shù)碼管的顯示……………()2.5.1數(shù)碼管有共陰極、共陽極兩種接法………………()2.5.2LED顯示分為靜態(tài)顯示和動(dòng)態(tài)顯示兩種方式……()2.6定時(shí)器/計(jì)數(shù)器T0中斷服務(wù)程序…………()2.774LS138譯碼器……………()2.874LS47芯片…………………()2.9電子時(shí)鐘校時(shí)………………()五、電子時(shí)鐘的軟件部分1、程序流程圖…………………()2、時(shí)鐘電路工作工作原理……()六、總結(jié)七、參考文獻(xiàn)八、附錄附錄一時(shí)鐘電路設(shè)計(jì)電路圖附錄二時(shí)鐘電路控制程序圖一、課程設(shè)計(jì)名稱:51單片機(jī)電子時(shí)鐘1、單片機(jī)簡介單片機(jī)全稱,單片機(jī)微型計(jì)算機(jī),從應(yīng)用領(lǐng)域來看,單片機(jī)主要用來控制系統(tǒng)運(yùn)行,所以又稱微控制器或嵌入式控制器,單片機(jī)是將計(jì)算機(jī)的基本部件微型化并集成在一塊芯片上的微型計(jì)算機(jī)。2、設(shè)計(jì)意義本課程設(shè)計(jì)主要掌握數(shù)碼管顯示電路的動(dòng)態(tài)顯示原理,了解74LS138芯片和74LS47芯片運(yùn)行方式,掌握掃描工作原理,掌握MCS-51單片機(jī)定時(shí)器、中斷工作原理以及處理程序編程方法,利用MCS-51單片機(jī)的功能與74LS138芯片、74LS47芯片、數(shù)碼管等部件組合構(gòu)成一個(gè)用于顯示時(shí)間的數(shù)字電路,時(shí)、分、秒都可調(diào)整。單片機(jī)技術(shù)在計(jì)算機(jī)中作為獨(dú)立的分支,有著性價(jià)比高、集成度高、體積少、可靠性高、控制功能強(qiáng)大、低功耗、低電壓、便于生產(chǎn)、便于攜帶等特點(diǎn),越來越廣泛的被應(yīng)用于實(shí)際生活中。二、設(shè)計(jì)方案:1、通過單片機(jī)內(nèi)部的計(jì)數(shù)/定時(shí)器,采用軟件編程來實(shí)現(xiàn)時(shí)鐘計(jì)數(shù),一般稱為軟時(shí)鐘,這種方法的硬件線路簡單,系統(tǒng)的功能一般與軟件設(shè)計(jì)相關(guān),通常用在對時(shí)間精度要求不高的場合。2、采用時(shí)鐘芯片,它的功能強(qiáng)大,功能部件集成在芯片內(nèi)部,具有自動(dòng)產(chǎn)生時(shí)鐘等相關(guān)功能,硬件成本相對較高;軟件編程簡單,通常用在對時(shí)鐘精度要求較高的場合。3、通過應(yīng)用8051單片機(jī)、74LS47芯片、74LS138芯片和數(shù)碼管來組成一個(gè)完整的時(shí)鐘控制電路,應(yīng)用各自的功能,相互組合,通過匯編語言實(shí)現(xiàn)各自原件相互聯(lián)系在一起,掌握一些數(shù)字電路的邏輯控制,時(shí)序控制三、設(shè)計(jì)內(nèi)容:使用8051單片機(jī)作為時(shí)鐘控制芯片,應(yīng)用單片機(jī)內(nèi)部的定時(shí)/計(jì)數(shù)器T0實(shí)現(xiàn)軟時(shí)鐘的目的。首先將T0設(shè)定工作于定時(shí)方式,對機(jī)器周期計(jì)數(shù)形成基準(zhǔn)時(shí)間,然后用另一個(gè)定時(shí)/計(jì)數(shù)器T1對基準(zhǔn)時(shí)間計(jì)數(shù)形成秒,妙計(jì)60次形成分,分計(jì)60形成小時(shí),小時(shí)計(jì)到12。最后通過數(shù)碼管把它們的內(nèi)容在相應(yīng)的位置顯示出來,達(dá)到時(shí)、分、秒計(jì)時(shí)的功能。還要實(shí)現(xiàn)對時(shí)間的調(diào)整功能,8051的P0.0、P0.1、P0.2外接三個(gè)獨(dú)立按鍵,當(dāng)按下P0.0按鍵時(shí),系統(tǒng)進(jìn)入調(diào)時(shí)間的狀態(tài)或啟動(dòng)時(shí)間顯示的功能;當(dāng)按下P0.1按鍵時(shí),對顯示的數(shù)碼管進(jìn)行加一的功能;當(dāng)按下P0.2按鍵時(shí),對顯示的數(shù)碼管進(jìn)行減一的功能,達(dá)到調(diào)整時(shí)間的目的。四、硬件與軟件部分1,電子時(shí)鐘的概述概述電子時(shí)鐘功用,利用MCS—51單片機(jī)定時(shí)、中斷功能完成時(shí)間的定時(shí)工作。整個(gè)系統(tǒng)具有參數(shù)設(shè)定和時(shí)間運(yùn)行,顯示時(shí)、分、秒的電子時(shí)鐘。開機(jī)時(shí)顯示時(shí)間為12:00:00,然后電路會(huì)自動(dòng)開始計(jì)時(shí),電路中時(shí)、分、秒各自有單獨(dú)的時(shí)間調(diào)整按鈕,當(dāng)時(shí)間到23:59:59時(shí),接下來顯示時(shí)間變?yōu)?0:00:00參數(shù)設(shè)定完后,電子時(shí)鐘顯示由6個(gè)LED數(shù)碼顯示器顯示時(shí)、分、秒2,電子時(shí)鐘的硬件電路設(shè)計(jì)2.1選用單片機(jī)1、選用單片機(jī)MCS—51系統(tǒng)選用8051單片機(jī),8051單片機(jī)內(nèi)有4KROM、256字節(jié)RAM,程序存放在4KROM。系統(tǒng)組成有:2.28051單片機(jī)引腳①VCC-芯片電源,接+5V②VSS-接地端③XTAL1、XTAL2-晶體振蕩電路反相輸入端和輸出端④ALE/PROG:地址鎖存允許/片內(nèi)EPROM編程脈沖ALE功能:用來鎖存P0口送出的低8位地址,PROG功能:片內(nèi)有EPROM的芯片,在EPROM編程期間,此引腳輸入編程脈沖。⑤PSEN:外ROM讀選通信號(hào)。⑥RST/VPD:復(fù)位/備用電源,RST(Reset)功能:復(fù)位信號(hào)輸入端,VPD功能:在VCC掉電情況下,接備用電源。⑦EA/VPP:內(nèi)外ROM選擇/片內(nèi)EPROM編程電源,EA功能:內(nèi)外ROM選擇端,VPP功能:片內(nèi)有EPROM的芯片,在EPROM編程期間,施加編程電源VPP。⑧單片機(jī)I/O接口擴(kuò)展當(dāng)單片機(jī)構(gòu)成系統(tǒng)時(shí),常常I/O接口不夠用,此時(shí)可以用MCS-51單片機(jī)的擴(kuò)展接口,根據(jù)相應(yīng)的需求擴(kuò)展接口嗎,利用MCS-51單片機(jī)的串行接口擴(kuò)展并行I/O接口2.3單片機(jī)各接口功能:①、時(shí)鐘電路,用8051單片機(jī)的內(nèi)部有一個(gè)高增益的反相放大器,其輸入端XTAL1,輸出端XTAL2,用輸入端XTAL1引腳和輸出端XTAL2引腳指教接入一個(gè)晶振,工作時(shí)鐘采用12MHz的晶振頻率產(chǎn)生一個(gè)精確的周期性脈沖信號(hào)的自激振蕩器②、RAM,51單片機(jī)有片內(nèi)存儲(chǔ)器RAM還有特殊寄存器SFR,可以存放數(shù)據(jù)但是不能用來當(dāng)做數(shù)據(jù)寄存器使用,也就是說用戶不能隨意的使用,特殊功能寄存器是可以隨意讀寫的,屬于RAM,RAM的主要功能用于存放程序運(yùn)行中的數(shù)據(jù)和結(jié)果的存儲(chǔ)。③、ROM,用于存儲(chǔ)預(yù)先編寫的程序,屬于只讀程序存儲(chǔ)器④、I/O接口,8051單片機(jī)有四組接口,分別是P0、P1、P2、P3。P0:系統(tǒng)不進(jìn)行擴(kuò)展時(shí)作為通用I/O接口,P0口有輸出數(shù)據(jù)、讀引腳、讀鎖存器的功能;P1口除了能做通用的I/O接口外,是專用的用戶數(shù)據(jù)通訊端,P1端口是具有輸出鎖存的靜態(tài);P2口增加了實(shí)現(xiàn)功能轉(zhuǎn)換的多路開關(guān)MUX,所以P2端口在功能上兼有P0端口和P1端口的特點(diǎn)。這主要表現(xiàn)在輸出功能上,當(dāng)切換開關(guān)向下接通時(shí),從內(nèi)部總線輸出的一位數(shù)據(jù)經(jīng)反相器和場效應(yīng)管反相后,輸出在端口引腳線上;當(dāng)多路開關(guān)向上時(shí),輸出的一位地址信號(hào)也經(jīng)反相器和場效應(yīng)管反相后,輸出在端口引腳線上。此外P2口不能輸出靜態(tài)的數(shù)據(jù),自身輸出外部程序存儲(chǔ)器的高8位地址,執(zhí)行MOVX指令時(shí),還輸出外部RAM的高位地址,故稱P2端口為動(dòng)態(tài)地址端口P3口除了作為通用I/O端口使用外,每個(gè)端口線都具有第二功能,當(dāng)處于第二功能時(shí),鎖存器輸出1,通過第二輸出功能線輸出特定的內(nèi)含信號(hào),在輸入方面,即可以通過緩沖器讀入引腳信號(hào),還可以通過替代輸入功能讀入片內(nèi)的特定第二功能信號(hào)。由于輸出信號(hào)鎖存并且有雙重功能,故P3端口為靜態(tài)雙功能端口。2.4單片機(jī)工作原理單片機(jī)運(yùn)行時(shí),單片機(jī)本身自帶的上電復(fù)位電路自動(dòng)向單片機(jī)輸入有效的復(fù)位信號(hào),使單片機(jī)內(nèi)各寄存器及端口復(fù)位到初始化狀態(tài),使程序計(jì)數(shù)器PC復(fù)位到0000H,然條后復(fù)位信號(hào)自動(dòng)去除掉,CPU開始從0000H地址讀取指令,暫存到指令寄存器,由指令譯碼器譯碼,譯碼結(jié)果送入定時(shí)與控制電路,產(chǎn)生各種定時(shí)與控制信號(hào),控制CPU執(zhí)行指令要求的控制、運(yùn)算、讀/寫數(shù)據(jù)等操作程序計(jì)數(shù)器具有加1功能,當(dāng)執(zhí)行完一條指令時(shí),PC會(huì)自動(dòng)跳轉(zhuǎn)指向下一條指令實(shí)現(xiàn)順序控制,當(dāng)執(zhí)行完后沒有循環(huán)指令時(shí),直到程序運(yùn)行完成后,PC不在執(zhí)行加1指令,從而使程序不在順序執(zhí)行,實(shí)現(xiàn)程序終止。2.5,發(fā)光二級管8字?jǐn)?shù)碼管的顯示2.5.1數(shù)碼管有共陰極、共陽極兩種接法。①共陰極接法:將多只LED的陽極連接在一起即為共陰式,,數(shù)碼管各段dp,g,f,e,d,c,b,a從高到低順序排列連接到并行接口各位相連,當(dāng)作為共陰極接法時(shí)高電平有效。②共陽極接法:將多只LED的陽極連接在一起即為共陽式,共陽式與共陰極不同共陽極低電平有效,但是在顯示時(shí)對于共陽極接法,會(huì)是數(shù)碼管在不需要工作時(shí)依然工作,所以在使用數(shù)碼管時(shí),一般采用共陰極接法2.5.2LED顯示分為靜態(tài)顯示和動(dòng)態(tài)顯示兩種方式①靜態(tài)顯示:靜態(tài)顯示占用CPU時(shí)間短,顯示簡單、穩(wěn)定,但當(dāng)顯示位數(shù)較多時(shí),占用接口資源多。動(dòng)態(tài)顯示接口電路較簡單,但占用CPU時(shí)間,顯示亮度較靜態(tài)顯示差,一般說,顯示位數(shù)較多時(shí),采用動(dòng)態(tài)或串并轉(zhuǎn)換;顯示位數(shù)較少時(shí),采用靜態(tài)顯示方式。選用共陰極LED,將共陰極點(diǎn)連接在一起接地,每一位的段選線與一個(gè)8位并行口相連,只要將要顯示的字符的字型碼送至并行口鎖存,LED顯示器上便立即顯示出該字符,直到CPU送來一個(gè)新的字型碼為止,由于靜態(tài)顯示每位數(shù)碼管均有獨(dú)立的段選碼,耗電量大,硬件多。②動(dòng)態(tài)顯示:將各位數(shù)碼管的段并聯(lián)接在一起,由P1口控制(字型口),每一個(gè)數(shù)碼管的共陰極(共陽極)接到P2.0、P2.1作為位選信號(hào)。雖說要顯示的字型碼通過P1口同時(shí)送到了每一個(gè)數(shù)碼管,但它們不會(huì)同時(shí)顯示同一個(gè)字符,只有控制共陰極(共陽極)的位選信號(hào)有效時(shí),對應(yīng)的數(shù)碼管才會(huì)顯示相應(yīng)字符。這種由字型口控制要顯示字符的字形碼,依此循環(huán)選通每位數(shù)碼管的位選信號(hào)就得到了動(dòng)態(tài)顯示效果。它主要是利用人眼的視覺暫留特性及數(shù)碼管得余光特性,看上去似乎是多位數(shù)碼管同時(shí)顯示。是當(dāng)顯示位數(shù)較多時(shí),節(jié)省硬件,接口電路簡單,但顯示占用CPU時(shí)間。2.6定時(shí)器/計(jì)數(shù)器T0中斷服務(wù)程序T0用于計(jì)時(shí),選中方式一,重復(fù)定時(shí),定時(shí)時(shí)間設(shè)為50ms,定時(shí)時(shí)間到則中斷,在中斷服務(wù)程序中用一個(gè)計(jì)數(shù)器對50ms計(jì)數(shù),計(jì)20次則對秒單元加一。秒單元加到60則對分單元加一,同時(shí)秒單元清0;分單元加到60則對時(shí)單元加一,同時(shí)分單元清0;時(shí)單元加到24則對時(shí)單元清0,標(biāo)志一天時(shí)間計(jì)滿。在對各單元計(jì)數(shù)的同時(shí),把他們的值放到存儲(chǔ)器單元的指定位置。2.774LS138譯碼器對3個(gè)輸入信號(hào)進(jìn)行譯碼。得到8個(gè)輸出狀態(tài)。G1,G2A,G2B,為數(shù)據(jù)允許輸出端,G2A,G2B低電平有效。G1高電平有效。A,B,C為譯碼信號(hào)輸出端,Y0~Y7為譯碼輸出端,低電平有效。本實(shí)驗(yàn)中用作位碼譯碼器選擇通過A、B、C的輸入來選擇輸出Y0~Y7,從而使得在數(shù)碼管上顯示出相應(yīng)的時(shí)間。2.874LS47芯片74LS47芯片主要作為段碼譯碼器,把用于將BCD碼轉(zhuǎn)化成數(shù)碼塊中的數(shù)字,然后我們就能看到從0-9的數(shù)字,通過A、B、C、D四個(gè)選擇輸入端來組合相應(yīng)的BCD碼,來使輸出0-9的數(shù)字顯示于數(shù)碼管。2.9電子時(shí)鐘校時(shí)定義三個(gè)按鍵時(shí)按鍵,分按鍵,加1鍵,用8051單片機(jī)的P0.0、P0.1、P0.2相連接,保證芯片的正常工作,同時(shí)加上了限流電阻。每個(gè)按鍵都是相互獨(dú)立的,在使用按鍵進(jìn)行調(diào)時(shí)間時(shí),由于每個(gè)按鍵占用了一條I/O接口線,按鍵之間不會(huì)相互影響,按鍵工作以高、低電平狀態(tài),通過采用8051單片機(jī)匯編語言的編程,軟件控制操作,在按鍵控制時(shí),沒有按鍵按下則時(shí)鐘正常走下去,當(dāng)時(shí)按下時(shí)加1到24時(shí)時(shí)進(jìn)行清零,分按下時(shí)加1到60時(shí)進(jìn)行清零,正常工作時(shí),分和秒運(yùn)行到59時(shí)自動(dòng)跳轉(zhuǎn)為00,然后在順序執(zhí)行。五、電子時(shí)鐘的軟件部分將程序以模塊方式分割成具有相應(yīng)功能的子程序,根據(jù)系統(tǒng)功能,合理安排主程序任務(wù),中斷服務(wù)程序任務(wù),程序有兩個(gè)分支:參數(shù)整定及時(shí)鐘運(yùn)行。1、程序流程圖:2、時(shí)鐘電路工作工作原理:電子時(shí)鐘各部分連接完畢后,接通電源,整個(gè)電路進(jìn)入復(fù)位狀態(tài),然后對時(shí)鐘進(jìn)行調(diào)試狀態(tài),通過按鍵操作和軟件程序的配合使用,達(dá)到時(shí)間的調(diào)整和設(shè)定,硬件電路完成后,通過匯編語言編寫的應(yīng)用程序,存儲(chǔ)于8051單片機(jī)的ROM中,通過對CPU的調(diào)用,讀取數(shù)據(jù),實(shí)現(xiàn)中斷,計(jì)時(shí),加1等指令。晶振產(chǎn)生一個(gè)頻率脈沖,系統(tǒng)提供基本的時(shí)鐘信號(hào)。通常一個(gè)系統(tǒng)共用一個(gè)晶振,便于各部分保持同步。在整個(gè)電子時(shí)鐘電路中單片機(jī)主要分配各部分的運(yùn)行,實(shí)現(xiàn)位碼段碼的選擇,以及數(shù)碼管顯示出相應(yīng)的數(shù)據(jù)值,達(dá)到一個(gè)微型計(jì)算機(jī)的控制要求,控制時(shí)、分、秒各自的加1與程序循環(huán)達(dá)到一天24小時(shí)的計(jì)時(shí)。六、總結(jié)經(jīng)過一段時(shí)間整理資料,把課程設(shè)計(jì)分成了硬件和軟件兩大模塊來完成電子時(shí)鐘電路。硬件部分主要涉及的是簡單的按鍵、電容、電阻、晶振和數(shù)碼管。在軟件部分,細(xì)分為了按鍵模塊、顯示模塊、定時(shí)/計(jì)數(shù)模塊,最后把幾個(gè)模塊整合在主程序模塊中,使得程序簡單明了。整個(gè)設(shè)計(jì)過程中遇到的最大問題是軟件的編寫,由于采用的是匯編語言其間使用到的各種寄存器、存儲(chǔ)器地址、變量很多,很難對程序的整體把握。通過電子鐘的設(shè)計(jì),對單片機(jī)的原理、結(jié)構(gòu)、外圍電路進(jìn)一步的了解。通過對電子時(shí)鐘的設(shè)計(jì),使本組同學(xué)把單片機(jī)應(yīng)用于實(shí)際生活當(dāng)中,讓我們感覺到單片機(jī)的應(yīng)用廣泛,經(jīng)過這次課程設(shè)計(jì),讓我們更加清晰的了解單片機(jī),同時(shí)也鍛煉了我們的團(tuán)隊(duì)合作精神,也是讓我們能力的一種提升。七、參考文獻(xiàn)[1]《單片機(jī)原理與應(yīng)用技術(shù)》王豐欒學(xué)德,北京航空航天大學(xué)出版社,2007。[3]《電子技術(shù)》劉阿玲北京理工大學(xué)出版社,2009八、附錄附錄一時(shí)鐘電路設(shè)計(jì)電路圖附錄二時(shí)鐘電路控制程序圖ORG00H主程序起始地址JMPSTART主程序STARTORG0BH定時(shí)器T0中斷起始地址JMPTIM0定時(shí)器T0中斷子程序TIM0START:MOVSP,#70H設(shè)置堆棧指針MOV28H,#00設(shè)置顯示位數(shù)掃描指針初值為0MOV2AH,#12H設(shè)置時(shí)鐘顯示寄存器初值為12HMOV2BH,#00設(shè)置分鐘顯示寄存器初值為00H MOV2CH,#00設(shè)置秒鐘顯示寄存器初值為00HMOVTM0D,#01H設(shè)置定時(shí)器T0工作方式為1MOVTH0,#0F0H定時(shí)4ms的初值,即0F060HMOVTL0,#60H初值的低位MOVIE,#82H定時(shí)器T0中斷允許MOVR4,#250保證后面實(shí)現(xiàn)中斷250次,即1s的延時(shí)SETBTR0啟動(dòng)定時(shí)器T0LOOP:JBP0.0,N2若秒沒有按鍵,就轉(zhuǎn)去下一步檢查分CALLDELAY延時(shí)5ms,消除抖動(dòng)MOVA,2CH將秒寄存器的值載入累加器AADDA,#01HA的內(nèi)容加1DAA十進(jìn)制調(diào)整MOV2CH,AA的值存入秒寄存器CJNEA,#60H,N1看是否已經(jīng)是60s,若不是就繼續(xù)檢查MOV2CH,#00已經(jīng)是60s,就清空秒寄存器的值N1:JNBP0.0,$秒按鍵還沒有放開就循環(huán)等待CALLDELAY延時(shí)5ms,消除抖動(dòng)N2:JBP0.1,N4若分沒有按鍵,就轉(zhuǎn)去下一步檢查時(shí)鐘CALLDELAY延時(shí)5ms,消除抖動(dòng)MOVA,2BH將分寄存器的值載入累加器AADDA,#01HA的內(nèi)容加1DAA十進(jìn)制調(diào)整MOV2BH,AA的值存入分寄存器CJNEA,#60H,N3看是否已經(jīng)是60分,若不是就繼續(xù)檢查MOV2BH,#00已經(jīng)是60分,就清空分寄存器的值N3:JNBP0.1,$分按鍵還沒有放開就循環(huán)等待CALLDELAY延時(shí)5ms,消除抖動(dòng)N4:JBP0.2,LOOP若時(shí)沒有按鍵,就轉(zhuǎn)回去檢查看是否秒有按鍵CALLDELAY延時(shí)5ms,消除抖動(dòng)MOVA,2AH將時(shí)寄存器的值載入累加器AADDA,#01HA的內(nèi)容加1DAA十進(jìn)制調(diào)整MOV2AH,AA的值存入時(shí)寄存器CJNEA,#24H,N5看是否已經(jīng)是24時(shí),若不是就繼續(xù)檢查MOV2AH,#00已經(jīng)是24時(shí),就清空時(shí)寄存器的值N5:JNBP0.2,$時(shí)鐘按鍵還沒有放開就循環(huán)等待CALLDELAY延時(shí)5ms,消除抖動(dòng)JMPLOOP返回重新檢查看是否有按鍵……定時(shí)器T0中斷子程序……TIM0:MOVTH0,#OFOH定時(shí)初值重設(shè)MOVTL0#60HPUSHACC將累加器的A值暫存于堆棧PUSHPSW將PSW的值暫存于堆棧DJNZR4,X2計(jì)時(shí)中斷不滿1s就退出繼續(xù)中斷MOVR4,#250計(jì)時(shí)1sCALLCLOCK調(diào)用計(jì)時(shí)子程序CLOCKCALLDISP調(diào)用顯示子程序DISPX2:CALLSCAN調(diào)用掃描子程序SCANPOPPSW到堆棧取出PSW的值POPACC到堆棧取回累加器ACC的值RETI返回主程序……掃描子程序……SCANMOVR0,#28HINC@R0顯示位數(shù)掃描值加1CJNE@R0,#6,X3掃描位數(shù)不為6就準(zhǔn)備控制輸出MOV@R0,#0掃描位數(shù)為6,就令其值為0X3:MOVA,@R0掃描位數(shù)載入AADDA,#20HA加上20H(顯示寄存器地址)=各時(shí)間顯示區(qū)地址MOVR1,A各時(shí)間顯示區(qū)地址存入AMOVA,@R0掃描位數(shù)存入ASWAPA將A的高低4位交換(其高4位為掃描的位數(shù),低4位為顯示數(shù)據(jù)值)ORLA,@R1將掃描值于顯示數(shù)據(jù)組合MOVP1,A顯示輸出RET……計(jì)時(shí)子程序……CLOCK:MOVA,2CH秒寄存器值載入AADDA,#1加1sDAA十進(jìn)制調(diào)整MOV2CH,AA的值存入秒寄存器CJNEA,#60H,X4A不等于60s,就跳出程序去顯示MOV2CH,#00已經(jīng)是60s,就清0MOVA,2BH分寄存器值載入AADDA,#1加1分DAA十進(jìn)制調(diào)整MOV2BH,AA的值存入分寄存器CJNEA,#60H,X4A不等于60分,就跳出程序去顯示MOV2BH,#00已經(jīng)是60分,就清0MOVA,2AH時(shí)寄存器值載入AADDA,#1加1小時(shí)DAA十進(jìn)制調(diào)整MOV2AH,AA的值存入時(shí)寄存器CJNEA,#24H,X4A不等于24時(shí),就跳出程序去顯示MOV2AH,#00已經(jīng)是24時(shí),就清0X4:RET……顯示子程序……DISP:MOVR1,#20H20H為顯示寄存器單元MOVA,2CH將秒寄存器的內(nèi)容存取AMOVB,#10H設(shè)B累加器的內(nèi)容為10HDINABA/B,商存入A(十位數(shù)),余數(shù)存入(個(gè)位數(shù))MOV@R1,B將顯示的個(gè)位數(shù)存入20H顯示寄存器單元INCR1MOV@R1,A將顯示的十位數(shù)存入21H顯示寄存器單元INCR1MOVA,2BH將分寄存器的內(nèi)容存入AMOVB,#10H設(shè)B累加器的值為10HDIVABA/B,商存入A(十位數(shù)),余數(shù)存入(個(gè)位數(shù))MOV@R1,B將顯示的個(gè)位數(shù)存入22H顯示寄存器單元INCR1MOV@R1,A將顯示的十位數(shù)存入23H顯示寄存器單元INCR1MOVA,2AH將時(shí)寄存器的內(nèi)容存入AMOVB,#10H設(shè)B累加器的內(nèi)容為10HDIVABA/B,商存入A(十位數(shù)),余數(shù)存入(個(gè)位數(shù))MOV@R1,B將顯示個(gè)位數(shù)存入24H顯示寄存器單元INCR1MOV@R1,A將顯示十位數(shù)存入25H顯示寄存器單元RET……延時(shí)5ms消除抖動(dòng)……DELAY:MOVR6,#60D1:MOVR7,#248DJNZR7,$DJNZR6,D1RETEND請刪除以下內(nèi)容,O(∩_∩)O謝謝!??!Thereisalsoevidenceofahigherproportionofperinatalcomplications(complicationsarisingaroundthetimeofgivingbirth)amongchildrenwithautisticsymptoms.Thesecomplicationsincludematernalbleedingafterthefirsttrimesterandmeconiumintheamnioticfluid.(Meconiumisasubstancethataccumulatesinthebowelofthedevelopingfetusandisdischargedshortlyafterbirth.)Someevidencesuggeststhattheuseofmedicationsduringpregnancymayberelatedtothedevelopmentofautisticsymptoms.Asnewborns,childrenwithautisticbehaviorsshowahigherrateofrespiratoryillnessandanemiathanhealthychildren.ALLERGIES,INFECTIONS,ANDIMMUNIZATIONS.Someprofessionalsbelievethatautisticdisordersmaybecausedbyallergiestoparticularfungi,viralinfections,andvariousfoods.Nocontrolledstudieshavesupportedthesebeliefs,butsomeparentsandprofessionalsreportimprovementwhenallergensand/orcertainfoodsareeliminatedfromthediet.Viralinfectionsofthemother,suchasrubella,oroftheyoungchild,suchasencephalitis,mumps,andmeasles,occasionallyappeartocauseautisticdisorders.Theissueisnothowhazardousboxingisbutwhetherthehazardsareacceptable.Theterm"autism"referstoaclusterofconditionsappearingearlyinchildhood.Allinvolvesevereimpairmentsinsocialinteraction,communication,imaginativeabilities,andrigid,repetitivebehaviors.Tobeconsideredanautisticdisorder,someoftheseimpairmentsmustbemanifestbeforetheageofthree.ThereferencebookusedbymentalhealthprofessionalstodiagnosementaldisordersistheDiagnosticandStatisticalManualofMentalDisorders,alsoknownastheDSM.The2000editionofthisreferencebook(theFourthEditionTextRevisionknownasDSM-IV-TR)placesautisminacategorycalledpervasivedevelopmentaldisorders.Allofthesedisordersarecharacterizedbyongoingproblemswithmutualsocialinteractionandcommunication,orthepresenceofstrange,repetitivebehaviors,interests,andactivities.Peoplediagnosedwiththesedisordersareaffectedinmanywaysfortheirentirelives.DescriptionEachchilddiagnosedwithanautisticdisorderdiffersfromeveryother,andsogeneraldescriptionsofautisticbehaviorandcharacteristicsdonotapplyequallytoeverychild.Still,thecommonimpairmentsinsocialinteraction,communicationandimagination,andrigid,repetitivebehaviorsmakeitpossibletorecognizechildrenwiththesedisorders,astheydiffermarkedlyfromhealthychildreninmanyways.Manyparentsofautisticchildrensensethatsomethingisnotquiterightevenwhentheirchildrenareinfants.Theinfantsmayhavefeedingproblems,dislikebeingchangedorbathed,orfussoveranychangeinroutine.Theymayholdtheirbodiesrigid,makingitdifficultforparentstocuddlethem.Or,theymayfailtoanticipatebeinglifted,lyingpassivelywhiletheparentreachesforthem,ratherthanholdingtheirarmsupinreturn.Mostparentsofautisticchildrenbecomeawareofthestrangenessoftheseandotherbehaviorsonlygradually.Imaginetoothestateofeventhewinner'shands,protectedonlybyhavingbeensoakedinbrine.Withtheircombinationofboxingandwrestlingmoves,earlycontestswereliterally‘noholdsbarred’;grappling,punching,tripping,andthrowingallbeingusedtoflooranopponent.Thewidely-adoptedBroughton'sRulesof1743eradicatedsomeofthebarbarismbyoutlawingthehittingofamanwhenhewasdown,andtheseizingofhairorthebodybelowthewaist,buttheystillpermittedbutting.Yetitwasnotthebrutalityoftheprize-ringwhichbroughtitsdemise,butthecorruptionwithwhichitbecameassociated.TherevivalofthesportasboxinginlateVictorianBritainsawseveralchangesdesignedtorenderitmorecivilized.Althoughsomeoftheoldpracticescontinuedforawhile—eventhefamousQueensburyRulesinitiallyallowedendurancecontests—bytheturnofthecenturythegeneralpicturewasoneofboxingingloves,limited-timerounds,pointsdecisionsafterafixednumberofroundshadelapsed,andweightdivisions,thoughthelatterhaveaccentuatedproblemsofdehydrationasfightersstruggleto‘maketheweight’.Formuchofthetwentiethcenturythehistoryofboxinghasbeenoneofcrumblingresistancetochangesintendedtoprotectfurtherthebrainsandbodiesofparticipants.Between1984and1993eightboxershaddiedsoonafterfightsintheUK;bantamweightBradleyStonewasaddedtothelistin1994.Followingareportfromamedicalworkingparty,whichincludedneurosurgeons,theBritishBoxingBoardofControlsubsequentlyintroducedmandatoryannualmagneticresonanceimagingscansforallboxerstoreplacethelesssophisticatedcomputerizedtomographywhichhadbeencompulsoryonlyforthosefightingeightroundsormore.Additionally,anyboxerknockedoutmustwait45days(previously28)beforeheagainenterstheringcompetitively,andhemustalsohaveahospitalcheck.Ringsidedoctorsmayadviserefereesonafighter'sconditionbetweenroundsandmayrecommendthatthecontestbestopped.Doctorsalsoexamineeachboxerattheconclusionoffightsandparamedicteamsmustbeonhandatallboxingbills.Themedicalprofessioninseveralcountrieshasincreasinglyadoptedananti-boxingstance,citingirreversiblebraindamageasitsmajorobjectiontothesport.Thisisakeypointfor,inabsolutetermsofdeathsandseriousinjuries,othersportssuchashorseracing,mountaineering,rugby,andevencricketappearmoredangerous,butinnoneofthemisdeliberateandrepeatedstrikingofanopponentpartoftherulesofthegame.Incontrastaboxerhasalicenceforphysicalassault.Theevidenceisclearthatrepeatedpummellingtotheheadcancausecumulativedamagetothebrain:heretimeisnogreathealer.Occasionally,acutebraininjurycanoccurduringafight.Thegreatestdangercomestowardstheendwhenatiredmanwithalooseneckhashisheadflippedbackrapidlybyapunch.Thiscantearaveinoutsideorinsidethebrain,whichthenleaksblood,causingpressureonthebrainandeventuallyleadingtoacoma.Onlyiftheclotisremovedrapidlycanthefightersurvive.Fightersnowtrainharder;theirbod-iesarefitter—buttheirbrainsarenomoreresilientthaninthepast.Somenations,notablySweden,havealreadybannedboxingonmedicalgrounds.SofartheBritishgovernmenthasbeenreluctanttofollowtheSwedishleadandsince1981fiveprivatemembers'anti-boxingBillsproposedinparliamenthavefailedtoreachthestatutebooks.Mostschools,bothstateandpublic,however,havedroppedboxingfromtheirphysicaleducationcurriculum.Yetitshouldbenotedthatamateurboxingisexceptionallywellregulated:notmorethanfourroundsarefought,headguardsareworn,andtherefereeisallowedtostopafighttopreventseriousinjury.However,headguards,whilstabsorbingenergyfrompunches,presentanevenlargertargettobehitandthusthenumberofblowsstrikinghomemaywellincrease.Indeed,studieshaveshownthatnon-boxingsportsmenoutperformevenamateurfightersinneurologicaltestsand,notwithstandingthesafetyprecautions,threeamateurfightershavesufferedseriousbraininjuryinBritishringssince1988.Forcenturiesboxinghasbeentheepitomeofovertmasculinity,ademonstrationofmanlinessanditsembodyingcharacteristicsofcourage,tolerationofpain,andself-discipline.Womenweremerelyornamentsdisplayingtheroundcards.Thiscontinues,butwomenhavesuccessfullydemandedequalrightsinthering.InBritain,girlsfromtheageof10arenowallowedtosparinamateurboxinggyms,andrecentlyprofessionalism,too,hasbeenrecognizedforwomen—significantlylaterthanitsacceptanceintheUSwherefightsforwomenhaveappearedontheundercardofworldchampionshipevents.Themoraldilemmaofboxingisthatitprovidesanhonestopportunitytoescapepoverty,butitalsomeansforsomealegalbeatingandforallthethreatofpermanentdamage.Hittingbelowthebeltisoutlawedtoprotectthegenitals,butsurelythebraindeservesevenmoreprotection,byreducingtheconcussivepoweroftheboxingglove,developingsaferheadgear,excludingtheheadasatarget—orbybanningthesportaltogether.Impairmentsinsocialinteractionareusuallyamongtheearliestsymptomstodevelop.Themostcommonsocialimpairmentisakindofindifferencetootherpeople,oraloofness,eventowardsparentsandclosecare-givers.Thebabymayfailtorespondtohisorhernamebeingcalledandmayshowverylittlefacialexpressionunlessextremelyangry,upset,orhappy.Babieswithautismmayresistbeingtouched,andappeartobelostintheirownworld,farfromhumaninteraction.Betweensevenand10monthsofage,mostinfantsoftenresistbeingseparatedfromaparentorwell-knowncaregiver,buttheseinfantsmayshownodisturbancewhenpickedupbyastranger.Otherchildrenwithautismmaybeverypassive,althoughlessresistanttoeffortsbyotherstointeract.However,theydonotinitiatesocialinteractionthemselves.Stillothersmayattempttoengagewithadultsandpeers,butinwaysthatstrikeothersasinappropriate,orodd.Inadolescenceandadulthood,someofthehigher-functioningindividualswithautisticdisordersmayappearoverlyformalandpolite.Theymayreactwithlittlespontaneity,asifsocialinteractiondoesn'tcomenaturallyoreasilytothem,andsotheyaretryingtofollowapre-determinedsetofrules.Someindividualswithautismhavenormalintelligence,andmanyhavespecialtalentsinareassuchasmusicormemory.However,individualswithautismmayhaveothermentaloremotionalproblemsthatco-existwiththeirautism.Someoftheseotherdisordersmayincludeimpulsecontroldisorders,obsessive-compulsivedisorder,moodandanxietydisorders,andmentalretardation.PSYCHOLOGICALANDFAMILYFACTORS.AlthoughHenryMaudsley,inthelate1800s,wasthefirstpsychiatristtofocusonveryyoungchildrenwithmentaldisorders,itwasthepsychiatristLeoKannerwhocoinedthephrase"earlyinfantileautism"in1943.Kannerbelievedthattheparentsofchildrenwithautisticbehaviorswereemotionallycoldandintellectuallydistant.Hecoinedtheterm"refrigeratorparents"todescribethem.Hisbeliefthatparentalpersonalityandbehaviorplayedapowerfulroleinthedevelopmentofautisticbehaviorsleftadevastatinglegacyofguiltandself-blameamongparentsofautisticchildrenthatcontinuestothisday.Recentstudiesareunequivocal,however,indemonstratingthatparentsofautisticchildrenarenodifferentfromparentsofhealthychildrenintheirpersonalitiesorparentingbehaviors.Infact,manyfamilieswithanautisticchildalsohaveoneormoreperfectlyhealthychildren.Becauseautisticchildrencanbeextremelysensitivetochange,anychangewithinthefamilysituationcanbepotentiallytraumatictotheautisticchild.Amove,divorce,birthofasiblingorotherstressorsthatoccurinthelivesofmostfamiliesmayevokeamoreextremereactionfromanautisticchild.Whilethereisnosingleneurologicalabnormalityfoundinchildrenwithautisticdisorders,someresearchusingnon-invasivebrainimagingtechniquessuchasmagneticresonanceimaging(MRI)suggeststhatcertainareasofthebrainmaybeinvolved.Severalofthebrainareasbeingresearchedareknowntocontrolemotionandtheexpressionofemotion.Theseareasincludethetemporallobe(largelobeofeachsideofthebrainthatcontainsasensoryareaassociatedwithhearing),thelimbicsystem,thecerebellum,thefrontallobe,theamygdala,andthebrainstem,whichregulateshomeostasis(bodytemperatureandheartrate).Recentresearchhasfocusedparticularlyonthetemporallobebecauseofthefindingthatpreviouslyhealthypeoplewhosustaintemporallobedamagemaydevelopautistic-likesymptoms.Inanimalresearch,whenthetemporallobeisdamaged,socialbehaviordeclines,andrestless,repetitivemotorbehaviorsarecommon.WhenmeasuredbyMRI,totalbrainvolumeappearstobegreaterforthosewithautisticdisorders.Otherneurologicalfactorsincludelesionstothebrain,congenitalrubella,undiagnosedanduntreatedphenylketonuria(PKU),tuberoussclerosis,andRett'sdisorder(arelatedconditioninwhichthebabydevelopsinanapparentlynormalmannerthroughagefivemonths,andthenbeginstolosecommunicativeandsocialinteractionskills).ThecommonchildhoodimmunizationseriesknownasMMR(measles,mumps,rubella)hasrecentlycomeunderscrutinyasapossiblecauseofsomeautisticconditions.BasketballcanmakeatrueclaimtobeingtheonlymajorsportthatisanAmericaninvention.Fromhighschooltotheprofessionallevel,basketballattractsalargefollowingforlivegamesaswellastelevisioncoverageofeventsliketheNationalCollegiateAthleticAssociation(NCAA)annualtournamentandtheNationalBasketballAssociation(NBA)andWomen'sNationalBasketballAssociation(WNBA)playoffs.AndithasalsomadeAmericanheroesoutofitsplayerandcoachlegendslikeMichaelJordan,LarryBird,Earvin"Magic"Johnson,SherylSwoopes,andothergreatplayers.基于C8051F單片機(jī)直流電動(dòng)機(jī)反饋控制系統(tǒng)的設(shè)計(jì)與研究基于單片機(jī)的嵌入式Web服務(wù)器的研究MOTOROL
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲(chǔ)空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 2025年度春夏季草花種植基地合作采購合同3篇
- 2025年電子商務(wù)平臺(tái)產(chǎn)品入駐合作協(xié)議書模板4篇
- 深圳市龍城初級中學(xué)2025屆中考三模生物試題含解析
- 2025年節(jié)能環(huán)保廠房股權(quán)交易執(zhí)行協(xié)議4篇
- 2025年度綠色校園與環(huán)保企業(yè)深度合作項(xiàng)目合同范本3篇
- 2025年度礦產(chǎn)資源勘查測繪技術(shù)服務(wù)合同4篇
- 二零二五年度船舶保險(xiǎn)合同3篇
- 2025版小米智能家居產(chǎn)品售后服務(wù)協(xié)議3篇
- 2025年度倉儲(chǔ)信息化管理合同4篇
- 二零二五年度茶葉種植基地生態(tài)環(huán)境保護(hù)合同3篇
- 勞動(dòng)合同續(xù)簽意見單
- 大學(xué)生國家安全教育意義
- 封條(標(biāo)準(zhǔn)A4打印封條)
- 2024年保育員(初級)培訓(xùn)計(jì)劃和教學(xué)大綱-(目錄版)
- 河北省石家莊市2023-2024學(xué)年高二上學(xué)期期末考試 語文 Word版含答案
- 企業(yè)正確認(rèn)識(shí)和運(yùn)用矩陣式管理
- 分布式光伏高處作業(yè)專項(xiàng)施工方案
- 陳閱增普通生物學(xué)全部課件
- 檢驗(yàn)科主任就職演講稿范文
- 人防工程主體監(jiān)理質(zhì)量評估報(bào)告
- 20225GRedCap通信技術(shù)白皮書
評論
0/150
提交評論