【正文】
數碼管電子顯示屏 05. 15 摘 要 : 本設計采用的是 AT89S52 單片機,該單片機采用的 MCU51 內核,因此具有很好的兼容性,內部帶有 8KB 的 ROM,能夠存儲大量的程序,最突出特點是具有 ISP 在系統(tǒng)燒寫功能,使得燒寫程序更加方便。 計時芯片采用 DALLAS 公司的涓細充電時鐘芯片 DS1302,該芯片通過簡單的串行通信與單片機進行通信,時鐘 /日歷電路能夠實時提供年、月、日、時、分、秒、星期信息,采用雙電源供電,當外部電源掉電時能夠利用后備電池準確計時。 溫度檢測采用 DALLAS 公司的數字化溫度傳感器 DS18B20,該芯片采用的是獨特的“ 一線總線”的方式與單片機進行通信,一線總線獨特而且經濟的特點,是用戶可以輕松的組建傳感器網絡,為測量系統(tǒng)的構建引入全新的概念。實時溫度采用一線總線的方式傳輸大大的提高了信號的抗干擾性,分辨率可通過軟件設置,其小巧的體積為各種環(huán)境下測量溫度提供了方便。 綜上所述此萬年歷具有讀取方便、顯示直觀、功能多樣、電路簡潔、成本低廉等諸多優(yōu)點,符合電子儀器儀表的發(fā)展趨勢, 更符合我們實際生活的需要,對我們大學生來說也更加有用, 具有廣闊的市場前景。 關鍵詞 : 時鐘電鐘; DS1302;動態(tài)掃描;單片機 數碼管電子顯示屏 05. 15 Abstract: This design USES the AT89S52 SCM is adopted, the SCM MCU51 kernel, therefore has the very good patibility with 8KB ROM, internal, able to store huge amounts of program, the most outstanding characteristic is to have the ISP in system burning function, causes burning program is more convenient. Timer chip adopt the DALLAS pany Juan fine charging clock chip DS1302, this chip through simple serial munication to municate with MCU, clock/calendar circuit can realtime provide year, month, day, time, seconds, week information, adopt double power supply, when external power off when power will be able to use backup battery accurate timing. Temperature detection using DALLAS pany39。s digital temperature sensor DS18B20, this chip USES is unique 1wire bus way to municate with MCU, 1wire bus unique and economic characteristic, is the user can easily established sensor work for measuring system, the construction of the concept of introducing new. Realtime temperature using 1wire bus way transmission greatly improve the antiinterference signal by software Settings, resolution, its small volume for various circumstances measuring temperature provided convenience. To sum up the calendar has read convenient, direct display, functional diversity, simple circuit, low cost, and many other advantages, conform to the trend of the development of electronic instruments, more accord with the need of our actual life, to our university students are more useful, a broad market prospect. Keywords : clock actuated。 DS1302。 Dynamic scanning。 microcontroller 數碼管電子顯示屏 05. 15 目錄 第一章 緒論 ..................................................................................................................................... 1 課題開發(fā)的背景及意義 .................................................................................................... 1 第二章 設計要求與方案論證 ....................................................................................................... 3 設計要求: ...................................................................................................................... 3 系統(tǒng)基本方案選擇和論證 ................................................................................................ 3 單片機芯片的選擇方案和論證: .......................................................................... 3 顯示模塊選擇方案和論證: ................................................................................. 3 時鐘芯片的選擇方案和論證: .............................................................................. 4 溫度傳感器的選擇方案與論證 : ............................................................................. 4 電路設計最終方案決定 .................................................................................................... 5 第三章 系統(tǒng)的硬件設計與實現 ................................................................................................... 6 電 路設計框圖 .................................................................................................................... 6 系統(tǒng)硬件概述 .................................................................................................................... 6 主要單元電路的設計 ....................................................................................................... 6 單片機主控制模塊的設計 ...................................................................................... 6 時鐘電路模塊的設計 .............................................................................................. 8 溫度采集模塊設計 .................................................................................................. 9 電路原理及說明 ..................................................................................................... 9 顯示模塊的設計 .................................................................................................... 12 第四章 系統(tǒng)的軟件設計 ............................................................................................................... 13 程序流程框圖 ................................................................................................................... 13 子程序的設計 .................................................................................................................. 15 DS18B20 溫度子程序 ........................................................................................... 15 讀、寫 DS1302 子程序 ........................................................................................ 16 第五章 系統(tǒng)的硬件設計 ............................................................................................................... 18 系統(tǒng)硬件電路設計 ........................................................................................................... 18 系統(tǒng)硬件仿真運行情況圖 ............................................................................................... 19 顯示日期、時間、實時溫 度 ............................................................................... 19 數碼管電子顯示屏 05. 15 第六章 測試分析 ......................................................................................................................... 20 軟件測試 .......................................................................................