【正文】
.............................................................................................. 12 .............................................................................................................. 12 .................................................................................................................. 12 .................................................................................................................. 12 .................................................................................................................. 13 ........................................................................................................... 13 .................................................................................................................. 14 .................................................................................................................. 15 .................................................................................................................. 15 第 4章 系統(tǒng)的軟件設(shè)計 ................................................................................................................... 16 程序流程框圖: ................................................................................................................. 16 第 5章 系統(tǒng)測試 ............................................................................................................................. 18 硬件測試 ............................................................................................................................ 18 軟件測試 ............................................................................................................................ 18 結(jié)束語 ............................................................................................................................................. 19 致謝 ................................................................................................................................................. 19 參考文獻 .......................................................................................................................................... 20 附錄 1:程序 ................................................................................................................................... 22 第 1 章 緒 論 在當(dāng)代繁忙的工作與生活中,時間與我們每一個人都有非常密切的關(guān)系,每個人都受到時間的影響,隨著社會、科技的發(fā)展,人類得知時間,從觀太陽、擺鐘到現(xiàn)在電子鐘,不斷研究、創(chuàng)新。 DS1302。s long life, small error。 關(guān)鍵詞: 單片機; DS1302; LCD1602 Abstract Electronic calendar is a widely used tool for the daily time, more and more important in modern society. The electronic calendar in terms of hardware as the main control mainly STC89C52 microcontroller core, provided by the DS1302 clock chip clock, 1602LCD LCD display. STC89C52 microcontroller by Atmel introduced, the power consumption, voltage can be selected 4 ~ 6V voltage power supply。所有程序編寫完成后,在 Keil 軟件中進行調(diào)試,確定沒有問題后,燒寫到單片機上進行測試。此外,該電子萬年歷還具有時間校準(zhǔn)等功能。 此電子萬年歷在硬件方面主要采用 STC89C52 單片機作為主控核心,由 DS1302 時鐘芯片提供時鐘、 1602LCD 液晶顯示屏顯示。 3. 若填寫內(nèi)容較多可另紙附后。7 課程設(shè)計報告 課題名稱: 基于單 片機的電子 鐘設(shè)計 院 (系): 自動化系 專 業(yè): 自動化 班 級: 自動化 2 班 學(xué)生姓名: 包良進 學(xué) 號: 2020090110207 指導(dǎo)教師: 黃書童 桂林航天工業(yè)學(xué)院 課程設(shè)計報告 系(部): 自動化系 專業(yè) 班級: 自動化 2 班 學(xué)生姓名: 包良進 學(xué) 號: 2020090110207 設(shè)計題目: 數(shù) 字電子鐘 完成日期 2020年 7 月 3日 指 導(dǎo) 教 師 評 語 :_____________________________________ _______________________________________________________ _______________________________________________________ 成績(五級記分制): 指導(dǎo)教師(簽字): _____________________ 桂林航天工業(yè)學(xué)院 課程設(shè)計任務(wù)書 設(shè)計題目: 學(xué)生姓名 包良進 課程名稱 數(shù)字電子鐘 專業(yè)班級 自動化 2 班 地 點 實訓(xùn)樓 408 起止時間 設(shè)計內(nèi)容 設(shè)計參數(shù) 設(shè)計進度 設(shè)計成果 參考資料 說明 1. 本表應(yīng)在每次實施前由指導(dǎo)教師填寫一式 2 份,審批后所在系(部)和指導(dǎo)教師各留 1份。 2. 多名學(xué)生共用一題的,在設(shè)計內(nèi)容、參數(shù)、要求等方面應(yīng)有所區(qū)別。 系(部)分管領(lǐng)導(dǎo): 教研室主任: 指導(dǎo)教師: 年 月 日 2020 年 7 月 3 日 摘 要 電子萬年歷是一種應(yīng)用非常廣泛日常計時工具,對現(xiàn)代社會越來越重要。 STC89C52 單片機是由 Atmel 公司推出的,功耗小,電壓可選用 4~ 6V電壓供電; DS1302 時鐘芯片是美國 DALLAS 公司推出的低功耗實時時鐘芯片,它可以對年、月、日、星期、時、分、秒進行計時,還具有閏年補償?shù)榷喾N功能,而且 DS1302 的使用壽命長,誤差?。?對于數(shù)字電子萬年歷采用直觀的數(shù)字顯示, 數(shù)字顯示是采用的 1602LED 液晶顯示屏來顯示,可以同時顯示年、月、日、星期、時、分 、秒等信息。在軟件方面,主要包括日歷程序、時間調(diào)整程序,顯示程序等。 此設(shè)計主要由時鐘芯片 DS1302 和溫度傳感器 DS18B20 采集數(shù)據(jù)到單片機進行處理再通過 LCD1602 顯示出來,本論文主要研究了液晶顯示器 LCD 及時鐘芯片DS1302,溫度傳感器 DS18B20 與單片機之間的硬件互聯(lián)及通信,對數(shù)種硬件連接方案進行了詳盡的比較,在軟件方面對日歷算法也進行了論述。 DS1302 clock chip introduced in the United States DALLAS lowpower real time clock chip, which can be year, month, day, week, hours, minutes and seconds time, but also has leapyear pensation, and other functions, and the DS130239。 for digital electronic calendar using an intuitive digital display, digital display is used 1602LED LCD screen to display, you can also shows year, month, day, week, hours, minutes, seconds and other information. In addition, the electronic calendar is also a time calibration and other functions. In terms of software, including calendar, time to adjust procedures, display procedures. All programming is pleted, the Keil software debugging, make sure that no problem, programmed into the microcontroller for testing. This design mainly by the clock chip DS1302 temperature sensor to the microcontroller DS18B20 collect data for processing and then through the LCD1602 display, this thesis, the liquid crystal display LCD and clock chip DS1302, temperature sensor and microcontroller DS18B20 interconnection and munication between the hardware on Several hardware connection scheme for a detailed pari