【正文】
II With the design of electric clock calendar ABSTRACT With the rapid development of electronic technology, especially with the emergence of largescale integrated circuits, to human life brought about fundamental changes. Its singlechip technology is the product has entered the tens of thousands of households. The emergence of the electronic calendar to people’s lives is brought about by a lot of convenience. This article will first describe the working principle of the system hardware with the system block diagram to illustrate the structure , highlighted by the application of the system interface technology of the hardware and the interface module functions and work processes, and secondly, the procedures described in detail the various module and the realization of processes. The design of digital integrated circuits technology takes singlechip technology as the core. This article is the guiding philosophy of the preparation of a bination of hardware and software to hardwarebased, to the preparation of various functional modules . AT89S52 in the system for the control of singlechip core to realtime clock circuitry on the DS1302 year, month, day, weekdays, hours, minutes, seconds for time, also has multiple functions, such as a leap year pensation, at the same time with assembly language software design, increase the readability and procedures. LCD display data through the system and therefore have a userfriendly operation and aesthetic results. Key words: AT89S52; DS1302;; LCD1602; 1 目 錄 第一章 緒論 ........................................................................................................ 1 選題意義 ................................................................................................. 1 當(dāng)今應(yīng)用領(lǐng)域電子鐘的發(fā)展趨勢(shì) .......................................................... 1 本課題主要研究的內(nèi)容 ......................................................................... 2 第二章 系統(tǒng)方案論證 ........................................................................................ 3 系統(tǒng)具體要求 ......................................................................................... 3 系統(tǒng)基本方案的選擇和論證 .................................................................. 3 單片機(jī)芯片的選擇方案和論證 ..................................................... 4 顯示器件的選擇方案和論證 ......................................................... 4 時(shí)鐘電路的選擇方案和論證 ......................................................... 4 電路設(shè)計(jì)最終方案決定 ......................................................................... 5 第三章 系統(tǒng)的硬件設(shè)計(jì)與實(shí)現(xiàn) ........................................................................ 6 系統(tǒng)硬件描述 ......................................................................................... 6 芯片介紹 ................................................................................................. 6 AT89S52芯片 ................................................................................ 6 DS1302實(shí)時(shí)時(shí)鐘芯片 ................................................................... 8 LCD1602液晶顯示芯片 .............................................................. 10 系統(tǒng)硬件模塊的設(shè)計(jì) ........................................................................... 12 AT89S52主控模塊的設(shè)計(jì) ........................................................... 12 DS1302時(shí)鐘模塊的設(shè)計(jì) ............................................................. 13 LCD1602顯示模塊的設(shè)計(jì) .......................................................... 13 2 第四章 系統(tǒng)軟件設(shè)計(jì) ...................................................................................... 15 軟件整體設(shè)計(jì) ....................................................................................... 15 子模塊設(shè)計(jì) ........................................................................................... 16 DS1302時(shí)鐘子模塊的設(shè)計(jì) ......................................................... 16 LCD1602顯示子模塊的設(shè)計(jì) ...................................................... 19 軟件測(cè)試 ............................................................................................... 22 測(cè)試結(jié)果及分析 .......................................................................... 22 測(cè)試結(jié)論 ...................................................................................... 23 第五章 系統(tǒng)調(diào)試 .............................................................................................. 24 軟件調(diào)試 ............................................................................................... 24 仿真軟件介紹 .............................................................................. 24 軟件調(diào)試過程及結(jié)果分析 ........................................................... 25 硬件調(diào)試 ............................................................................................... 26 課程設(shè)計(jì)總結(jié) ...................................................................................................... 27 致 謝 ............................................................................................................. 28 參考文獻(xiàn) ............................................................................................................. 29 附錄 A 系統(tǒng)電路設(shè)計(jì)原理圖 ........................................................................... 30 附錄 B 系統(tǒng)源程序 .......................................................................................... 30 1 第一章 緒論 選題意義 隨著進(jìn)入 21 世紀(jì),現(xiàn)代科技的進(jìn)一步發(fā)展??梢院敛豢鋸埖卣f,電子技術(shù)的應(yīng)用無處不在,電子技 術(shù)正在不斷的改變著我們的生活,改變著我們的世界。一旦遇到重要的事情,忘記時(shí)間這將會(huì)帶來很大的損失。 隨著大規(guī)模集成電路技術(shù)的發(fā)展, 已經(jīng) 可以將 CPU、 RAM、 ROM、定時(shí) /計(jì)數(shù)器以及輸入 /輸出 (I/O)接口電路等計(jì)算機(jī)的主要部件集成在一塊集成電路芯片上, 這樣組成的芯片級(jí)的微型計(jì)算機(jī)就是“單片微型計(jì)算機(jī) (Single Chip Microputer)”。所以更準(zhǔn)確的叫法應(yīng)是微控制器 (Micro Controller Unit— MCU)。單片機(jī)應(yīng)用的重要意義還在于,他從根本上改變了傳統(tǒng)的控制系統(tǒng)設(shè)計(jì)思想和設(shè)計(jì)方法。這種軟件代替硬件的控制技術(shù)也稱為微控制技術(shù),是傳統(tǒng)控制技術(shù)的一次革命。 當(dāng)今應(yīng)用領(lǐng)域電子鐘的發(fā)展趨勢(shì) 單片機(jī)的發(fā)展大致經(jīng)歷了三代 : 第一代 : 以 1976 年推出的 MCS48 系列為代表,其主要的技術(shù)特征是將 CPU 和計(jì)算機(jī)外圍電路集成到了一個(gè)芯片上,成為與通用 CPU 分道揚(yáng)鑣的標(biāo)志。主要技術(shù)特點(diǎn)是向