【正文】
摘 要隨著科學(xué)技術(shù)的進(jìn)步,數(shù)字電路對人們影響越來越廣,數(shù)字領(lǐng)域的發(fā)展致使工業(yè)、農(nóng)業(yè)、科技和國防等領(lǐng)域以及人們的社會生活發(fā)生了令人矚目的變革。在數(shù)字電子高速發(fā)展的時(shí)代,日歷時(shí)鐘已經(jīng)成為了不可缺少的一部分,本課程設(shè)計(jì)是要用數(shù)字集成電路實(shí)現(xiàn)。 本文以 AT89S51 單片機(jī)為核心,采用串行時(shí)鐘芯片 DS1302,顯示電路采用 LED 動態(tài)掃描方式、 按鍵電路、和復(fù)位電路等部分構(gòu)成,以實(shí)現(xiàn)時(shí)鐘日歷顯示的功能。取代過去多用并行接口的時(shí)鐘芯片。改良其接口復(fù)雜、占用數(shù)據(jù)總線接線多、芯片體積大占用空間多的缺點(diǎn)。關(guān)鍵字:AT89S51 單片機(jī),串行時(shí)鐘芯片 DS1302,LED 動態(tài)掃描 摘要IABSTRACT With the progress of science and technology, digital circuit impact on people more widely, resulting in the development of the digital domain industry, agriculture, science and technology and defense fields, and people39。s social life has undergone remarkable changes. In the era of rapid development of digital electronics, the battery has bee an indispensable part of this course is designed to achieve power supply to use digital integrated circuits We based on AT89S51 as the core, the serial clock chip DS1302, show circuit using LED dynamic scanning mode, buttons, and reset circuit circuit such as part, in order to realize the function of the calendar displays clock. Replace the past use parallel interface chip of the clock. Improved its interface plex, take up the data bus wiring, take up the space is big chip faults.Key Words:AT89S51 , DS1302, Dynamic LED scan目錄 II目 錄 第 1 章 緒論.................................................1 引言 ....................................................1 單片機(jī)的發(fā)展歷程 ........................................1 本論文主要研究內(nèi)容 ......................................2 第 2 章 主要硬件選擇與功能介紹...............................3 單片機(jī) ..................................................3 LED 數(shù)碼管顯示器 ........................................3 鍵盤結(jié)構(gòu) ................................................4 實(shí)時(shí)時(shí)鐘芯片 ............................................5. DS1302 內(nèi)部結(jié)構(gòu) ........................................5 讀寫時(shí)序說明 ..........................................7 電路連線圖 ............................................8. I2C 儲存芯片介紹 .......................................8 I2C 總線協(xié)議 ..........................................9 74LS138 譯碼芯片 ........................................9 第 3 章 硬件設(shè)計(jì)............................................11 單片機(jī)端口分配 .........................................11 AT89S51 單片機(jī)最小系統(tǒng)外圍電路 .......................11 按鍵電路 ...............................................14 顯示電路 ...............................................15 第 4 章 軟件設(shè)計(jì)............................................17 動態(tài)顯示模塊程序 .......................................17 時(shí)鐘 DS1302 模塊程序 ....................................19 第 5 章 電路板的設(shè)計(jì)與制作..................................21 PROTEL 2021 背景 .........................................21 制作過程 ...............................................21 繪制 PCB 板圖 .........................................22 制作 PCB 板 ...........................................23 元件的焊接 ...........................................23 電路的仿真 ...........................................23目錄III 第 6 章 系統(tǒng)調(diào)試...........................................25 第 7 章 結(jié) 論..............................................26 參考文獻(xiàn)...................................................27 致謝.......................................................28 附錄.......................................................29 實(shí)物圖.....................................................30目錄 0第 1 章 緒 論 引言隨著科技的發(fā)展,電子日歷的出現(xiàn),迅速占領(lǐng)了傳統(tǒng)日歷的大部分領(lǐng)地成為人們?nèi)粘I畹谋貍淦?。電子日歷具有性能穩(wěn)定、精確度高、成本低等特點(diǎn)。廣泛用于家庭、公司、機(jī)關(guān)等眾多場所,為人們的日常生活提供了方便,是人們?nèi)粘I钪胁豢扇鄙俚囊徊糠?。本文設(shè)計(jì)以單片機(jī) AT89S51 為核心部件的日歷時(shí)鐘, 采用動態(tài)掃描方式,以共陰 LED 數(shù)碼管作顯示器、 38 譯碼器 74LS138 做驅(qū)動電路,用 3 片 74LS138 并聯(lián)擴(kuò)展 IO 口,將 5 位 IO 口擴(kuò)展成 24 位驅(qū)動端口,74LS138 產(chǎn)生的驅(qū)動信號為低電平有效,當(dāng) P2 口前 5 位輸入一個(gè)有效的5 位 BCD 碼時(shí),選中對應(yīng)的一位共陰數(shù)碼管,同時(shí) P0 口送入段選信號,即完成動態(tài)掃描顯示功能。本文硬件設(shè)計(jì)包括:AT89S51 單片機(jī)、RC 復(fù)位電路、+5V 直流電源電路、按鍵電路、 74LS138 驅(qū)動器動態(tài)顯示掃描電路、I2C 儲存電路、實(shí)時(shí)時(shí)鐘電路。主要用到單片機(jī)的編程軟件(Keil)及電路仿真調(diào)試軟件(Protel)等常用軟件。 單