【正文】
畢業(yè)論文 設(shè)計(jì) 題 目 : 基于單片機(jī)的數(shù)字萬年歷設(shè)計(jì) 學(xué)生姓名 : 鄭得利 學(xué)生學(xué)號(hào) : 0908040147 系 別 : 電氣信息工程學(xué)院 專 業(yè) : 通信工程 屆 別 : 2020屆 指導(dǎo)教師 : 朱士永 成績(jī) 淮南師范學(xué)院電氣信息工程學(xué)院 2020 屆通信工程專業(yè)畢業(yè)論文 第 1 頁 基 于單片機(jī)的數(shù)字萬年歷設(shè)計(jì) 學(xué)生: 鄭得利 指導(dǎo)教師: 朱士永 淮南師范學(xué)院 電氣信息工程學(xué)院 摘 要 : 本文借助電路仿真軟件 Protues 對(duì)基于 AT89S51 單片機(jī)的電子萬年歷的設(shè)計(jì)方法及仿真進(jìn)行了全面的闡述。該電子萬年歷在硬件方面主要采用 AT89C51 單片機(jī)作為主控核心,由 DS1302時(shí)鐘芯片提供時(shí)鐘、 1602LCM 點(diǎn)陣液晶顯示屏顯示。 AT89C51 單片機(jī)是由 Atmel 公司推出的,功耗小,電壓可選用 4~ 6V 電壓供電; DS1302 時(shí)鐘芯片是美國 DALLAS 公司推出的具有涓細(xì)電流充電功能的低功耗實(shí)時(shí)時(shí)鐘芯片,它可 以對(duì)年、月、日、星期、時(shí)、分、秒進(jìn)行計(jì)時(shí),還具有閏年補(bǔ)償?shù)榷喾N功能,而且 DS1302 的使用壽命長,誤差?。粩?shù)字顯示是采用的 LED 液晶顯示屏來顯示,可以同時(shí)顯示年、月、日、星期、時(shí)、分、秒等信息。此外,該電子萬年歷還具有時(shí)間校準(zhǔn)等功能。在軟件方面,主要包括日歷程序、時(shí)間調(diào)整程序,顯示程序等。所有程序編寫完成后,在 Keil軟件中進(jìn)行調(diào)試,確定沒有問題后,在 Proteus軟件中嵌入單片機(jī)內(nèi)進(jìn)行仿真。 論文主要研究了液晶顯示器 LCM及時(shí)鐘芯片 DS1302,溫度傳感器 DS18B20 與單片機(jī)之間的硬件互聯(lián)及通信,對(duì)數(shù)種 硬件連接方案進(jìn)行了詳盡的比較,在軟件方面對(duì)日歷算法也進(jìn)行了論述。 研究結(jié)果表明,由于萬年歷的應(yīng)用相當(dāng)普遍,所以其設(shè)計(jì)的核心在于硬件成本的節(jié)約軟件算法的優(yōu)化,力求做到物美價(jià)廉,才能擁有更廣闊的市場(chǎng)前景。 關(guān)鍵詞: 單片機(jī); DS1302; DS18B20; LCM1602 Design of the digital Perpetual Calendar based on Single chip microputer Student: delizheng tutor: yongshizhu Institute of electrical and information engineering of huainan normal university ABSTRACT: This paper mainly discuss the design and simulation of electronic calender based on AT89S51 with the help of the hardware side, the electronic calendar using AT89C51 microcontroller as the main control center, clock provided by the DS1302 clock chip , 1602LED dot matrix LCD Corporation AT89C51 microcontroller is producted by Atmel Corporation, 淮南師范學(xué)院電氣信息工程學(xué)院 2020 屆通信工程專業(yè)畢業(yè)論文 第 2 頁 low power consumption, voltage can be selected 4V~ 6V voltage power supply。 DS1302 clock chip, launched in the United States with DALLAS small current charging function real time clock chip, low power consumption, it can be years , month, date, day, hour, minute, seconds time, also has a leap year pensation and other functions, and DS1302 long life, small error。 LED digital display is used in LCD displays that can display in , month, day, week, hours, minutes, seconds and other addition, the electronic calendar is also a time calibration functions. In terms of software, including calendar program, time to adjust procedures, display procedures. All programming is plete, the Keil software debugging, make sure there is no problem, in the Proteus software embedded within the simulated MCU. This article focus on liquid crystal screen LCM1602 and clock chip DS1302,temperature sensor DS18B20 which connected and municated with solutions will also pared with each software side, calender calculation will be discussed as well. The results are as follows:as electronic calender are widely used in our daily should be chip and convenient so as to win more profit. Keyword: Microcontroller,DS1302; DS18B20; LCD1602 目 錄 前言 ........................................................................................................................................ 3 1 方案設(shè)計(jì) .............................................................................................................................. 4 概述 ........................................................................................................................... 4 實(shí)時(shí)時(shí)鐘 研究的背景及意義 .............................................................................. 4 系統(tǒng)的總體設(shè)計(jì) ................................................................................................ 5 系統(tǒng)基本方案選擇和論證 ............................................................................................ 6 單片機(jī)芯片的選擇 ............................................................................................ 6 顯示模塊選擇方案和論證 .................................................................................. 6 時(shí)鐘芯片的選擇方案和論證 .............................................................................. 6 電路設(shè)計(jì)最終方案決定 ..................................................................................... 7 2 硬件電路設(shè)計(jì) ....................................................................................................................... 7 系統(tǒng)硬件概述 ............................................................................................................. 7 單片機(jī)最小系統(tǒng) .......................................................................................................... 8 單片機(jī)的復(fù)位電路 ...................................................................................................... 9 時(shí)鐘芯片電路 ............................................................................................................ 11 時(shí)鐘芯片引腳介紹 ........................................................................................... 11 時(shí)鐘芯片 DS1302 介紹 .....................................................................................12 1602LCD 液晶顯示屏 ..................................................................................................13 1602 字符型 LCD 簡(jiǎn)介 ......................................................................................13 1602 引腳功能說明 .........................................................................................13 蜂鳴器鬧鈴電路 .........................................................................................................14 按鍵調(diào)整電路 ............................................................................................................14 淮南師范學(xué)院電氣信息工程學(xué)院 2020 屆通信工程專業(yè)畢業(yè)論文 第 3 頁 顯示模塊 ...................................................................................................................15 3 軟件部分設(shè)計(jì) ..............................................................................................