基于51單片機(jī)電子萬年歷畢業(yè)論文.doc
基于51單片機(jī)電子萬年歷畢業(yè)論文,摘 要:電子萬年歷是一種非常廣泛日常計(jì)時(shí)工具,對現(xiàn)代社會(huì)越來越流行。它可以對年、月、日、周日、時(shí)、分、秒進(jìn)行計(jì)時(shí),還具有閏年補(bǔ)償?shù)榷喾N功能,而且ds1302的使用壽命長,誤差小。對于數(shù)字電子萬年歷采用直觀的數(shù)字顯示,可以同時(shí)顯示年、月、日、周日、時(shí)、分、秒和溫度等信息,還具有時(shí)間校準(zhǔn)等功...
內(nèi)容介紹
此文檔由會(huì)員 csfujixie 發(fā)布基于51單片機(jī)電子萬年歷畢業(yè)論文
摘 要:
電子萬年歷是一種非常廣泛日常計(jì)時(shí)工具,對現(xiàn)代社會(huì)越來越流行。它可以對年、月、日、周日、時(shí)、分、秒進(jìn)行計(jì)時(shí),還具有閏年補(bǔ)償?shù)榷喾N功能,而且DS1302的使用壽命長,誤差小。對于數(shù)字電子萬年歷采用直觀的數(shù)字顯示,可以同時(shí)顯示年、月、日、周日、時(shí)、分、秒和溫度等信息,還具有時(shí)間校準(zhǔn)等功能。該電路采用AT89S52單片機(jī)作為核心,功耗小,能在3V的低壓工作,電壓可選用3~5V電壓供電。
本設(shè)計(jì)是基于51系列的單片機(jī)進(jìn)行的電子萬年歷設(shè)計(jì),可以顯示年月日時(shí)分秒及周信息,具有可調(diào)整日期和時(shí)間功能。在設(shè)計(jì)的同時(shí)對單片機(jī)的理論基礎(chǔ)和外圍擴(kuò)展知識(shí)進(jìn)行了比較全面準(zhǔn)備。在硬件與軟件設(shè)計(jì)時(shí),沒有良好的基礎(chǔ)知識(shí)和實(shí)踐經(jīng)驗(yàn)會(huì)受到很大限制,每項(xiàng)功能實(shí)現(xiàn)時(shí)需要那種硬件,程序該如何編寫,算法如何實(shí)現(xiàn)等,沒有一定的基礎(chǔ)就不可能很好的實(shí)現(xiàn)。在編寫程序過程中發(fā)現(xiàn)以現(xiàn)有的相關(guān)知識(shí)要獨(dú)自完成編寫任務(wù)困難重重,在老師和同學(xué)的幫助下才完成了程序部分的編寫。
萬年歷的設(shè)計(jì)過程在硬件與軟件方面進(jìn)行同步設(shè)計(jì)。硬件部分主要由AT89C52單片機(jī),LED顯示電路,以及調(diào)時(shí)按鍵電路等組成。在單片機(jī)的選擇上本人使用了AT89C52單片機(jī),該單片機(jī)適合于許多較為復(fù)雜控制應(yīng)用場合。顯示器使用2片7SEG-MPX8-CA和一片7SEG-MPX4-CA。7SEG-MPX8-CA是一種八個(gè)共陽二極管顯示器,7SEG-MPX4-CA是一種四個(gè)共陽二極管顯示器。為了能更輕松的控制這三片顯示器,本人使用了3片74HC164來驅(qū)動(dòng)。74HC164 是 8 位邊沿觸發(fā)式移位寄存器,串行輸入數(shù)據(jù),然后并行輸出。軟件方面主要包括日歷程序、時(shí)間調(diào)整程序,公歷轉(zhuǎn)陰歷程序,顯示程序等。程序采用匯編語言編寫,以便更簡單地實(shí)現(xiàn)調(diào)整時(shí)間及陰歷顯示功能。所有程序編寫完成后,在wave軟件中進(jìn)行調(diào)試,確定沒有問題后,在Proteus軟件中嵌入單片機(jī)內(nèi)進(jìn)行仿真。最后總在老師同學(xué)的幫助以及自己的努力下完成了此次電子萬年歷的設(shè)計(jì)。
關(guān)鍵詞:
Abstract
E-calendar day time is a very wide range of tools, increasingly popular in modern society. It can be year, month, day, Sunday, hours, minutes, seconds for time, but also has a leap year compensation to a variety of functions, and the DS1302's long life, small error. For the digital electronic calendar using an intuitive digital display can simultaneously display year, month, day, Sunday, hours, minutes, seconds, and temperature and other information, but also a time-calibration and other functions. The circuit uses AT89S52 microcontroller as the core, power consumption, low-voltage work in 3V, the voltage can choose 3 ~ 5V voltage supply.
The design is based on 51 series of microcontrollers to the design of electronic calendar, you can display date information on when the minutes and seconds, and weeks, with adjustable date and time functions. At the same time in the design of the theoretical basis of the MCU and peripheral expansion of knowledge of the more comprehensive preparation. The hardware and software design, there is no good basic knowledge and practical experience will be greatly limited, each feature is required to achieve the kind of hardware, procedures, how to write, how to implement such algorithms, there is no certain foundation can not be good implementation. Found during the preparation process to the existing knowledge to complete the preparation of the task alone difficult,
In the help of teachers and students to complete the program part of the preparation.
Calendar of the design process in hardware and software to synchronize the design. Hardware mainly by the AT89C52 microcontroller, LED display circuit, and the tune composed of the circuit when the button. In the SCM choice I used the AT89C52 microcontroller, which is suitable for many of the more complex control applications. Monitor the use of two 7SEG-MPX8-CA and a 7SEG-MPX4-CA. 7SEG-MPX8-CA is a total of eight-yang diode display, 7SEG-MPX4-CA is a total of four-yang diode display. In order to more easily control the three monitors, I use three 74HC164 to drive.
74HC164 is an 8-bit edge-triggered shift register, serial input data, and parallel output. The software includes calendar program, time to adjust procedures, turn the lunar calendar programs, display programs. Programs written in assembly language used in order to more easily adjust the time and the realization of the lunar calendar display. All programming is complete, the wave software debugging, make sure that no problems, in the Proteus software within a microcontroller embedded in the simulation. The final overall the teacher to help students, as well as their own efforts to complete the design of the electronic calendar.
Keywords:
Clock electric clock:DS1302;DS18B20:Dynamic scan:scm
~~~~~~目錄~~~~~~
一、設(shè)計(jì)要求與方案論證 ………………………………………………………………………4
1.1 設(shè)計(jì)要求 ……………………………………………………………………………………4
1.2 系統(tǒng)基本方案選擇和論證 …………………………………………………………………4
1.2.1單片機(jī)芯片的選擇方案和論證 …………………………………………………………4
1.2.2 顯示模塊選擇方案和論證 ………………………………………………………………4
1.2.3 時(shí)鐘芯片的選擇方案和論證 ……………………………………………………………4
1.2.4 溫度傳感器的選擇方案與論證 …………………………………………………………5
二.系統(tǒng)的硬件設(shè)計(jì)與實(shí)現(xiàn)………………………………………………………………………5
2.1 電路設(shè)計(jì)框圖 ………………………………………………………………………………5
2.2 系統(tǒng)硬件概述 ………………………………………………………………………………5
2.3 主要單元電路的設(shè)計(jì) ………………………………………………………………………6
2.3.1單片機(jī)主控制模塊的設(shè)計(jì) ………………………………………………………………6
2.3.2時(shí)鐘電路模塊的設(shè)計(jì) ……………………………………………………………………6
2.3.3溫度采集模塊設(shè)計(jì) ………………………………………………………………………7
2.3.4 電路原理及說明 …………………………………………………………………………7
2.3.5顯示模塊的設(shè)計(jì) …………………………………………………………………………8
三、系統(tǒng)的軟件設(shè)計(jì) ……………………………………………………………………………9
3.1程序流程框圖 ………………………………………………………………………………9
3.2 子程序的設(shè)計(jì) ………………………………………………………………………………9
3.2.1 DS18B20溫度子程序 ……………………………………………………………………9
3.2.2 讀、寫DS1302子程序 …………………………………………………………………10
四. 指標(biāo)測………………………………………………………………………………………11
4.1 測試儀器……………………………………………………………………………………11
4.2硬件測試……………………………………………………………………………………11
4.3軟件測試……………………………………………………………………………………11
4.4測試結(jié)果分析與結(jié)論………………………………………………………………………12
4.4.1 測試結(jié)果分析……………………………………………………………………………12
4.4.2 測試結(jié)論…………………………………………………………………………………12
五、作品總結(jié)……………………………………………………………………………………12
六、致謝詞………………………………………………………………………………………12
參考文獻(xiàn)…………………………………………………………………………………………13
附錄一:系統(tǒng)電路圖……………………………………………………………………………14
附錄二:系統(tǒng)程序清單…………………………………………………………………………15
附錄三:系統(tǒng)使用說明書………………………………………………………………………40
TA們正在看...
- 案例解析房地產(chǎn)企業(yè)的稅收籌劃.pdf
- 財(cái)務(wù)分析培訓(xùn).pdf
- 財(cái)務(wù)內(nèi)控管理大全手冊.pdf
- 某某酒樓管理手冊.pdf
- 用于內(nèi)部審計(jì)部門的入門培訓(xùn).pdf
- 濕法提取五氧化二釩的工藝研究.doc
- 四川大學(xué)道教與宗教文化研究所西方哲學(xué)史(宗教學(xué)...rar
- 四川大學(xué)道教與宗教文化研究所宗教學(xué)原理2002,200...rar
- 四川大學(xué)高分子科學(xué)與工程學(xué)院電子技術(shù)基礎(chǔ)2002考...rar
- 四川大學(xué)高分子科學(xué)與工程學(xué)院鑄造合金及熔煉2000...rar