【正文】
the development of social productive forces and the social informatization level, but also improve the modern electronic products to further improve the performance, product update rhythm also more and more quickly. Modern life of people pay more and more attention to the concept of time, money and time on the hospital. For those in time and accurately grasp the very strict about or inaccurate, time will bring great trouble, so as to displays clock digital tube than the pointer clock showed a lot of advantages. Digital pipe display time is simple and accurate readings, time to seconds. And mechanical dependent on crystal oscillators, may cause errors. A digital clock is used in digital circuit , points and second digital display timer. A digital clock accuracy and stability than old mechanical clock. In this design, we adopt LED digital display tube, minutes and seconds, when in 24 hours time, according to the principle of dynamic display of digital tube to show, with the crystals 12MHz produce oscillation pulses, timer count. In this design, the circuit has its time, still can realize the function of the time. A digital clock is its small, inexpensive, high precision, easy to use and when, the function is much, facilitate integration by vast consumption, so it has been widely used. Key words: digital electric clock microcontroller XXXX 職業(yè)技術(shù)學(xué)院 畢業(yè)設(shè)計(jì)(論文) 3 目 錄 摘要(中文) ????????????????????????????? ? Ⅰ 摘要(英文) ????????????????????????????? ?Ⅱ 引言 ……………………………………………………………………………………… ? 4 第 一 章 整體設(shè)計(jì)方案 ??????????????????????????? 5 單片機(jī)的選擇 ???????????????????????????? 5 單片機(jī)的基本結(jié)構(gòu) ?????????????????????????? 6 第 二 章 數(shù)字鐘的 硬件設(shè)計(jì) ????????????????????????? 11 最小系統(tǒng)設(shè)計(jì) ???????????????????????????? 11 LED 顯示電路 ???????????????????????????? 13 鍵盤(pán)控制電路 ???????????????????????????? 15 第 三 章 數(shù)字鐘的軟件設(shè)計(jì) ????????????????????????? 17 系統(tǒng)軟件設(shè)計(jì)流程圖 ????????????????????????? 17 數(shù)字電子鐘的原理圖 ??? ?????????????????????? 21 ????????????????????????????? 22 延時(shí) 子程序 ????????????????????????????? 22 主程序和 定時(shí)器中斷子程序 ?????????????????????? 22 LED 顯示子程序 ??????????????????????????? 23 按鍵控制子程序 ??????????????????????????? 25 第 四 章 系統(tǒng)仿真 ???????????????? ????????????? 28 PROTUES 軟件介紹 ?????????????????????????? 28 電子鐘系統(tǒng) PROTUES 仿真 ??????????????????????? 28 第 五 章 調(diào)試與功能說(shuō)明 ?????????????????????????? 29 系統(tǒng)性能測(cè)試與功能說(shuō)明 ??????????????????????? 29 系統(tǒng)時(shí)鐘誤差分析 ?????????????????????????? 29 軟件調(diào)試問(wèn)題及解 決 ???????????????? ????????? 29 結(jié)論 ?????????????????????????????????? 30 致謝 ?????????????????????????????????? 31 參考文獻(xiàn) ???????????????????????????????? 32 XXXX 職業(yè)技術(shù)學(xué)院 畢業(yè)設(shè)計(jì)(論文) 4 引言 20 世紀(jì)末,電子技術(shù)獲得了飛速的發(fā)展,在其推動(dòng)下,現(xiàn)代電子產(chǎn)品幾乎滲透了社會(huì)的各個(gè)領(lǐng)域,有力地推動(dòng)了社會(huì)生產(chǎn)力的發(fā)展和社會(huì)信息化程度的提高,同時(shí)也使現(xiàn)代電子產(chǎn)品性能進(jìn)一步提高,產(chǎn)品更新?lián)Q代的節(jié)奏也越來(lái)越快。在此次設(shè)計(jì)中,電路具有顯示時(shí)間的其本功能,還可以實(shí)現(xiàn)對(duì)時(shí)間的調(diào)整。數(shù)字鐘的精度、穩(wěn)定度遠(yuǎn)遠(yuǎn)超過(guò)老式機(jī)械鐘。而機(jī)械式的依賴(lài)于晶體震蕩器,可能會(huì)導(dǎo)致誤差。對(duì)于那些對(duì)時(shí)間把握非常嚴(yán)格和準(zhǔn)確的人或事來(lái)說(shuō),時(shí)間的不準(zhǔn)確會(huì)帶來(lái)非常大的麻煩,所以以數(shù)碼管為顯示器的時(shí)鐘比指針式的時(shí)鐘表現(xiàn)出了很大的優(yōu)勢(shì)。XXXX 職業(yè)技術(shù)學(xué)院 畢業(yè)設(shè)計(jì)(論文) 1XXXX 學(xué) 院 畢 業(yè) 論 文 基于單片機(jī)的數(shù)字鐘設(shè)計(jì) ; Digital clock design based on SCM 所在系院 XXXX 職業(yè)技術(shù)學(xué)院 專(zhuān)業(yè)班級(jí) : 電子信息工程技術(shù)( 1)班 學(xué)生學(xué)號(hào) : 2020240137 學(xué)生姓名 : XXX 指導(dǎo)教師 : XXX 2020 年 2 月 9 日 XXXX 職業(yè)技術(shù)學(xué)院 畢業(yè)設(shè)計(jì)(論文) 2 基于單片機(jī)的數(shù)字鐘設(shè)計(jì) 摘 要 20 世紀(jì)末,電子技術(shù)獲得了飛速的發(fā)展,在其推動(dòng)下,現(xiàn)代電子產(chǎn)品幾乎滲透了社會(huì)的各個(gè)領(lǐng)域,有力地推動(dòng)了社會(huì)生產(chǎn)力的發(fā)展和社會(huì)信息化程度的提高,同時(shí)也使現(xiàn)代電子產(chǎn)品性能進(jìn)一步提高,產(chǎn)品更新?lián)Q代的節(jié)奏也越來(lái)越快。 現(xiàn)代生活的人們?cè)絹?lái)越重視起了時(shí)間觀念,可以說(shuō) 是時(shí)間和金錢(qián)劃上了等號(hào)。數(shù)碼管顯示的時(shí)間簡(jiǎn)單明了而且讀數(shù)快、時(shí)間準(zhǔn)確顯示到秒。 數(shù)字鐘是采用數(shù)字電路實(shí)現(xiàn)對(duì)“時(shí)”、“分”、“秒”數(shù)字顯示的計(jì)時(shí)裝置。在這次設(shè)計(jì)中,我們采用 LED 數(shù)碼管顯示時(shí)、分、秒,以 24 小時(shí)計(jì)時(shí)方式,根據(jù)數(shù)碼管動(dòng)態(tài)顯示原理來(lái)進(jìn)行顯示,用 12MHz 的晶振產(chǎn)生振蕩脈沖,定時(shí)器 計(jì)數(shù)。數(shù)字鐘是其小巧,價(jià)格低廉,走時(shí)精度高,使用方便,功能多,便于集成化而受廣大消費(fèi)的喜愛(ài) ,因此得到了廣泛的使用。 時(shí)間對(duì)人們來(lái)說(shuō)總 是那么寶貴,工作的忙碌性和繁雜性容易使人忘記當(dāng)前的時(shí)間。但是,一旦重要事情,一時(shí)的耽誤可能釀成大禍。下面是單片機(jī)的主要發(fā)展趨勢(shì)。從前必須由模擬電路或數(shù)字電路實(shí)現(xiàn)的大部分功能,現(xiàn)在已能用單片機(jī)通過(guò)軟件方法來(lái)實(shí)現(xiàn)了。 單片機(jī)模塊中最常見(jiàn)的是數(shù)字鐘,數(shù)字鐘是一種用數(shù)字電路技術(shù)實(shí)現(xiàn)時(shí)、分、秒計(jì)時(shí)的裝置,與機(jī)械式時(shí)鐘相比具有更高的準(zhǔn)確性和直觀性,且無(wú)機(jī)械裝置,具有更更長(zhǎng)的使用壽命,因此得到了廣泛的使用。諸如定時(shí)自動(dòng)報(bào)警、按時(shí)自動(dòng)打鈴、時(shí)間程序自動(dòng)控制、定時(shí)廣播、自動(dòng)起閉路燈、定時(shí)開(kāi)關(guān)烘箱、通斷動(dòng)力設(shè)備、甚至各種定時(shí)電氣的自動(dòng)啟用等,所有這些,都是以鐘表數(shù)字化為基礎(chǔ)的