【正文】
;感謝同學(xué)在設(shè)計(jì)中給予我的指導(dǎo)和幫助。比如快進(jìn)的時(shí)候無(wú)法顯示數(shù)字,以及本次設(shè)計(jì)的數(shù)字電子秒表缺少對(duì)多次計(jì)時(shí)時(shí)間進(jìn)行記錄的功能。補(bǔ)上后顯示正常。在 Proteus 的庫(kù)中將所需的元件調(diào)出按照硬件設(shè)計(jì)原理圖將其連接好,將已生成的 HEX 文件加載入 AT89C51 之中,運(yùn)行之后顯示出了秒表的功能。實(shí)現(xiàn)快加功能 ACALL JIA1 。定時(shí)器 T0 賦初值 MOV TH0,9EH DJNZ R3,LOOP7 。重新加載計(jì)數(shù)值 MOV 11H,R2 RET 。等待快加信號(hào)為 0 時(shí)快加 CLR TR0 SETB TR1 HERE1:JNB ,HERE1 AJMP HERE 。中斷允許 MOV DPTR,TAB 。主程序入口地址 ORG 0003H AJMP ZHONGDUAN0 。可以對(duì)各個(gè)中斷程序進(jìn)行調(diào)用。五位位控制則由低位到高位分別接到 ~ 口, NPN 三極管 9013 做為位控制端的開關(guān),當(dāng) ~ 端口任意一個(gè)端口為高電平時(shí),與其相對(duì)應(yīng)的三極管就導(dǎo)通,對(duì)應(yīng)的數(shù)碼管導(dǎo)通顯示。系統(tǒng)總電路圖附錄 B 所示。單片機(jī)要完成復(fù)位,必須向復(fù)位端輸出并持續(xù)兩個(gè)機(jī)器 周期以上的高電平,從而實(shí)現(xiàn)復(fù)位操作。 MCS51 單片機(jī)在通常情況下,使用震蕩頻率為 6MHZ 的石英晶體,而 12MHZ頻率主要是在高速串行通信情況才使用,在這里我們用的是 12MHZ 的石英晶體。 控制開關(guān) 單片機(jī) AT89C51 位驅(qū)動(dòng) 兩位數(shù)碼管 11 電源電路 電源電路是系統(tǒng)的最基本部分,任何部分都離不開電源部分,單片機(jī)系統(tǒng)也不例外,而且我們應(yīng)該高度重視電源部分,不能因?yàn)殡娫床糠蛛娐繁容^簡(jiǎn)單而有所疏忽,其實(shí)有一半的故障或制作失敗都和電源有關(guān),電源部分做好才能保證電路的正常工作。主電路見附錄。 設(shè)計(jì)中包括硬件電路的設(shè)計(jì)和系統(tǒng)程序的設(shè)計(jì)。當(dāng) A、 B 任意一個(gè)為 低電平 ,則禁止新數(shù)據(jù)輸入,在時(shí)鐘端( CLOCK)脈沖上升沿作用下 Q0 為低電平。1288 位內(nèi)部 RAM 由于將多功能 8 位 CPU 和閃爍存儲(chǔ)器組合在單個(gè)芯 片中, ATMEL 的 AT89C51 是一種高效微控制器, AT89C2051 是它的一種精簡(jiǎn)版本。 外部擴(kuò)展存儲(chǔ)器時(shí),當(dāng) 作 地址總線(如圖中的 A0~A7 為地址總線接口) 。開始鍵用來(lái)控制秒表工作的開始;暫停鍵用來(lái)暫停程序的運(yùn)行;快加鍵控制快速計(jì)數(shù)的開始,利用暫停鍵停止;復(fù)位鍵是用來(lái)對(duì)程序復(fù)位用的,當(dāng)程序出現(xiàn)死循環(huán)或想從 00 開始重新計(jì)時(shí),按下復(fù)位鍵可返回程序開始,重新執(zhí)行。 數(shù)碼管顯示電路采用動(dòng)態(tài)掃描的方式,由于數(shù)碼管采用共陰極的接法,當(dāng)位選信號(hào)為高電平時(shí),該位選通, P0 口中的數(shù)據(jù)送到該段上顯示,節(jié)省接口資源,又能實(shí)時(shí)動(dòng)態(tài)的性能。 計(jì)方案 設(shè)計(jì)內(nèi)容 該實(shí)驗(yàn)要求進(jìn)行計(jì)時(shí)并在數(shù)碼管上顯示時(shí)間,則可利用 MCS 系列單片機(jī)微機(jī)仿真實(shí)驗(yàn)系統(tǒng)中的芯片 8051 中的 管腳作為外部中斷 0 的入口地址,并實(shí)現(xiàn)“開始”按鍵的功能;將 作為外部中斷 1 的入口地址,并實(shí)現(xiàn)“清零”按鍵的功能;使用 P0 口作為段碼數(shù)據(jù)輸出控制口, 74LS164 用作驅(qū)動(dòng)輸出控制,、 口分別實(shí)現(xiàn)暫停、快加的功能。秒表停止后對(duì)查看鍵 進(jìn)行掃描, 按下為低電平時(shí),調(diào)用最終緩存區(qū)的數(shù)據(jù)進(jìn)行顯示,即顯示上一次計(jì)時(shí)成績(jī)。顯示電路由兩位共陰極數(shù)碼管組成。 2021 年 8 月 28 日 15 點(diǎn) 15 分,中國(guó)選手孟關(guān)良 /楊文軍在雅典奧運(yùn)會(huì)男子 500米劃艇決賽中,以 1 分 40 秒 278 的成績(jī)獲得中國(guó)在雅典奧運(yùn)會(huì) 的第 28 金。西安航空職業(yè)技術(shù)學(xué)院 畢 業(yè) 設(shè) 計(jì)(論 文) 論文題目: 所屬系部: 電子工程系 指導(dǎo)老師: 職 稱: 學(xué)生姓名: 班級(jí)、學(xué)號(hào) : 專 業(yè): 西安航空職業(yè)技術(shù)學(xué)院制 年 月 日 2 西安航空職業(yè)技術(shù)學(xué)院 畢業(yè)設(shè)計(jì)(論文)任務(wù)書 題目: 任務(wù)與要求: 時(shí)間: 年 月 日 至 年 月 日 共 周 所屬系部: 學(xué)生姓名: 學(xué) 號(hào): 專業(yè): 指導(dǎo)單位或教研室: 指導(dǎo)教師: 職 稱: 西安航空職業(yè)技術(shù)學(xué)院制 年 月 日 畢業(yè)設(shè)計(jì) (論文 )進(jìn)度計(jì)劃表 3 日 期 工 作 內(nèi) 容 執(zhí) 行 情 況 指導(dǎo)教師 簽 字 教師對(duì)進(jìn)度計(jì)劃實(shí)施情況總評(píng) 簽名 年 月 日 本表作評(píng)定學(xué)生平時(shí)成績(jī)的依據(jù)之一。 關(guān)鍵字:?jiǎn)纹瑱C(jī);數(shù)字電子秒表;仿真 I Abstract With the rapid development of science and technology in recent years, SCM applications are constantdepth manner. In this paper, based on single chip design of digital electronic stopwatch. The main characteristics of this design timing accuracy of , to solve the traditional result of a lack accuracy due to timing errors and unfair, and is a variety of sports petitions, one of the essential equipment. In addition the hardware part of the set View button on the stopwatch can be the last time to save time for user queries. The design of the multifunction stopwatch system uses STC89C52 microcontroller as the central device, and use its timer / counter timing and the count principles, bined with display circuit, LED digital tube, as well as the external interrupt circuit to design a timer. The software and hardware together anically, allowing the system to achieve two LED display shows the time from 0 to seconds, Timing accuracy of seconds, Be able to correctly time at the same time to record a time, and the next time after the last time the time to search automatically added a second in which software systems using assembly language programming, including the display program, timing, interrupt service, external interrupt service routine, delay procedures, key consumer shaking procedures, and WAVE in the missioning, operation, hardware system uses to achieve PROTEUS powerful, simple and easy to observe the cut in the simulation can be observed on the actual working condition. Keyword: LED display; Highprecision stopwatch; 8051 1 目 錄 緒 論 ..............................................................................................................................................................2 1 引言 ...............................................................................................................................................................3 秒表及其發(fā)展現(xiàn)狀 .............................................................................................................................3 設(shè)計(jì)方案 ..............................................................................................................................................3 設(shè)計(jì)內(nèi)容 .......................................................................................................................................3 設(shè)計(jì)要求