【正文】
與 制 作 鄭州輕院輕工職業(yè)學(xué)院 ??飘厴I(yè)設(shè)計(jì)(論文) 題 目 電子時(shí)鐘的設(shè)計(jì)與制作 學(xué)生姓名 王 愛 鋒 專業(yè)班級(jí) 08 級(jí)電子信息工程技術(shù)一班 學(xué) 號(hào) 0 8 1 0 3 1 8 2 系 別 機(jī) 電 工 程 系 指導(dǎo)教師 (職稱 ) 趙文麗(講師) 完成時(shí)間 2022 年 4 月 15 日 電 子 時(shí) 鐘 的 設(shè) 計(jì) 與 制 作 摘 要 基于 51 單片機(jī)可校時(shí)數(shù)字時(shí)鐘電路設(shè)計(jì),單片機(jī)計(jì) 算機(jī)即單片微型計(jì)算機(jī)。本文利用單片機(jī)實(shí)現(xiàn)數(shù)字時(shí)鐘計(jì)時(shí)功能的主要內(nèi)容,其中 AT89S51是核心元件同時(shí)采用數(shù)碼管動(dòng)態(tài)顯示“時(shí)”,“分”,“秒”的現(xiàn)代計(jì)時(shí)裝置。 關(guān)鍵詞 : 單片機(jī) 數(shù)字時(shí)鐘 LED數(shù)碼管顯示 按鍵 電 子 時(shí) 鐘 的 設(shè) 計(jì) 與 制 作 Abstract The base and 51 digital clock when the microcontroller can be the school circuit design, singlechip puter that is singlechip microputer. (SingleChip Microputer) is a CPU, RAM, ROM, counting and multiple interfaces in one microcontroller. Quartz crystal oscillator is a highprecision timing tools, electronic clock, quartz watch, quartz is used quartz technology, high precision timing, good stability, easy to use, does not require frequent adjustment. The digital electronic clock with the time integrated circuits, the decoding instead of mechanical transmission, with LED display instead of a pointer display and then display the time and reduce the timing error, this table has the hours, minutes and seconds displays the time function, but also in progress and subproofreading, the flexibility of a good chip select. In this paper, MCU function digital clock timing the main contents of which AT89S51 is a core element at the same time the use of digital control dynamic display time, sub, second modern timing devices. Compared with the traditional mechanical watch, it has a traveltime accuracy, display and intuitive and so on. It is a time period of 24 hours, substantially fullscale as 23:59:59, another time with a school function, memory function after power outages, power restoration can be realized when the time synchronization and so on. The design by the MCU AT89S51 chip and LED digital tube as the core, supplemented by the necessary circuitry to form a single chip digital clock. Key words: shrapnel machine digital clock LED digital tube display button 電 子 時(shí) 鐘 的 設(shè) 計(jì) 與 制 作 目 錄 引言 …………. ………… . ………. ……… …. …………. … ……… .… …. …………. 1 1 AT89S51 芯片簡(jiǎn)介: ............................................................................... 2 內(nèi)部結(jié)構(gòu) ......................................................................................... 2 . 中央處理器: ........................................................................................... 3 . 數(shù)據(jù)存儲(chǔ)器( RAM): .......................................................................... 3 89S51 的引腳說明: ...................................................................... 4 . Pin9: RESET/Vpd 復(fù)位信號(hào)復(fù)用腳: ................................................. 5 . Pin30: ALE/PROG 引腳: ..................................................................... 5 . Pin31: EA/Vpp 引腳: ........................................................................... 6 2 驅(qū)動(dòng)器 74LS245 簡(jiǎn)介: ...................................................................... 7 3 LED 數(shù)碼管簡(jiǎn)介 ........................................................................................ 8 LED 數(shù)碼管顯示器結(jié)構(gòu)與原理 .................................................... 8 LED 顯示器接口及顯示方式 ........................................................ 8 . 數(shù)碼管使用條件: ................................................................................... 9 . 數(shù)碼管使用注意事項(xiàng): ......................................................................... 10 4 相關(guān)硬件的其他元器件的簡(jiǎn)介 ......................................................... 11 晶體振蕩器簡(jiǎn)介 ........................................................................... 11 . 晶體振蕩器的應(yīng)用: ............................................................................. 11 電子電容器的標(biāo)識(shí) ....................................................................... 12 . 電容器標(biāo)識(shí)的方法: ........................................................................... 12 . 常用電容的幾項(xiàng)特性: ....................................................................... 12 . 電容容量的標(biāo)注及使用常識(shí): ........................................................... 12 電阻的選用簡(jiǎn)介 ........................................................................... 13 . 作用 : ...................................................................................................... 13 . 計(jì)算原則: ............................................................................................ 14 . 注意: .................................................................................................... 14 電 子 時(shí) 鐘 的 設(shè) 計(jì) 與 制 作 5 電路制作原理制作分析 ..................................................................... 15 主程序執(zhí)行流程圖 ....................................................................... 15 數(shù)碼管顯示模塊 ........................................................................... 19 定時(shí)器計(jì)數(shù)器 T0 中斷服務(wù)程序: ............................................ 19 按鍵處理模塊: ........................................................................... 19 整個(gè)電路原理圖: ....................................................................... 20 致謝 ……… ……… ……………………………… … ………………………… 20 參考文獻(xiàn) … ……… … …………………… ……… …… ……… …………………… 21 附錄一、源程序代碼 …………………………… ……… .…… ...…………………… 22 附錄 二 、 電路圖 ……………………………… ……… ……… .……………………… 26 電 子 時(shí) 鐘 的 設(shè) 計(jì) 與 制 作 1 引 言 近年來隨著計(jì)算機(jī)在社會(huì)領(lǐng)域的滲透和大規(guī)模集成電路的發(fā)展,單片機(jī)的應(yīng)用正在不斷地走向深入,由于它具有功能強(qiáng),體積小,功耗低,價(jià)格便宜,工作可靠,使用方便等特點(diǎn),因此特別適合于與控制有關(guān)的系統(tǒng),越來越廣泛地應(yīng)用于自動(dòng)控制,智能化儀器,儀表,數(shù)據(jù)采集,軍工產(chǎn)品以及家用電器等各個(gè)領(lǐng)域,單片機(jī)往往十作為一個(gè)核心部件來使用,在根據(jù)具體硬件結(jié)構(gòu),以及針對(duì)具體應(yīng)用對(duì)象特點(diǎn)的軟件結(jié)合,以作完善。二是采用時(shí)鐘芯片,它的功能強(qiáng)大,功能不見集成在芯片內(nèi)需,自動(dòng)產(chǎn)生時(shí)鐘相關(guān)功能。電路設(shè)計(jì)及調(diào)試過程,本次做的數(shù)字時(shí)鐘十以( AT89S51)為核心,結(jié)合相關(guān)的元器件(共陰的 LED 數(shù)碼管顯示器 、驅(qū)動(dòng)器 74LS245),在配以相應(yīng)的軟件,達(dá)到制作簡(jiǎn)易數(shù)字鐘的目的,其硬件部分難點(diǎn)在于元器件的選擇、布局及焊接。