【正文】
MP手機、數(shù)碼照相機 、智能洗衣機、智能冰箱、高科技電視機等都是單片機應(yīng)用的典型例子。 結(jié)合 單片機 的發(fā)展,我國的很多技術(shù)工程人員根據(jù)自己的工作需要開發(fā)出許多擁有自主知識產(chǎn)權(quán)的單片機應(yīng)用產(chǎn)品,推動了我 國生產(chǎn)力的發(fā)展。 Debugging。 關(guān)鍵詞 :單片機;作息時間控制; Protel;調(diào)整 ;秒表 I Singlechipmicroputer based control of the school schedule ABSTRACT This article mainly introduced how to design a daily schedule control system using the SCM. First, understand the system deeply, including the feasibility、practicality and so on, then determined the design proposal. After that, design the hardware, including uses the Protel plan schematic diagram and the PCB board as well as the material object manufacture. Finally, design the software. In software design, use the simulation software to debug on PC machine first, then confirm and improve the function in the selfmade circuit board. Through this topic39。 本設(shè)計通過單片機內(nèi)部的定時器進行 1S 定時,利用 8 位七段 LED 數(shù)碼顯示器顯示時間,顯示格式為:時 分 秒,最大計時時間為 235959。方案確定后,進行硬件設(shè)計,其中包括利用 Protel 繪制原理圖和 PCB 以及實物的制作。 具有 4個按鍵來作功能設(shè)置,可以設(shè)置現(xiàn)在的時間及顯示定時設(shè)置時間 。 研究方法、手段及步驟: 1.作息時間能控制電鈴 2.單片機作息時間控制的功能如下: 使用 4位七段顯示器來顯示現(xiàn)在的時間 。在調(diào)時的時候,調(diào)整單元開始閃爍,利用鍵盤輸入調(diào)整時間。此系統(tǒng)可以實現(xiàn)對時間的智能化控制,擺脫了傳統(tǒng)的由人來控制時間的長短的不便,可廣泛應(yīng)用在學(xué)校、工廠和機關(guān)的自動打鈴、計時、路燈及室內(nèi)照明和其他對象控制,因此具有廣闊的市場和良好的經(jīng)濟效益。 研究內(nèi)容: 本設(shè)計是一個具有報時功能的作息時間控制鐘 ,通過單片機內(nèi)部的定時器進行1S 定時,利用 8 位七段 LED 數(shù)碼 顯示器顯示時間,顯示格式為:時 分 秒,最大計時時間為 235959。 由鍵盤、聲音輸出模塊和指示燈三部分組成,系統(tǒng)擴展三個按鍵用于報時及校正時間。 顯示格式為:時 分 秒,最大計時時間為 235959。 , 打到控制目的。最后,進行軟件設(shè)計。在計時的時候,將當(dāng)前時 間和定時時間比較,如果相等,就鈴響 10s。s design, learn to develop small application system using the SCM. This design carries on 1S through the SCM internal timer fixed time, uses 8 the LED numerical code monitor tell time, the display format is hourminutesecond, the biggest time is 235959. When timing, pare current time with fixed time, if is equal, makes a sound 10s on the bell. Because there is fixed time counts error, therefore requires the nonperiodical time. In timing time, the adjustment unit does not stop the twinkle, uses the keyboard entry time. Key words: SCM 。 stopwatch 目 錄 前 言 ................................................................... 1 1 緒 論 ............................................................... 2 課題的提出及意義 .................................................. 2 設(shè)計的要求 ........................................................ 2 2 硬件設(shè)計 ............................................................... 3 系統(tǒng)框圖 .......................................................... 3 AT89S52 單片機 .................................................... 3 功能特性 .................................................... 3 引腳功能 .................................................... 4 鍵盤部分 .......................................................... 7 鍵盤工作原理 ................................................. 7 獨立式鍵盤 ................................................... 9 行列式鍵盤 .................................................. 9 顯示部分 ......................................................... 11 LED 顯示器簡介 .............................................. 11 LED 靜態(tài)顯示法接口設(shè)計 ...................................... 12 LED 動態(tài)顯示法接口設(shè)計 ...................................... 12 74LS244 芯片 ................................................ 13 復(fù)位電路 ......................................................... 14 復(fù)位操作 ................................................... 14 復(fù)位電路 ................................................... 14 時鐘電路 ......................................................... 15 振蕩電路 ................................................... 15 指令時序 ................................................... 15 音響電路 ......................................................... 16 電源部分 ......................................................... 16 AC220V 轉(zhuǎn)換 DC5V ............................................ 16 DC9V~ DC40V 轉(zhuǎn)換 DC5V ....................................... 17 ISP 模塊 ......................................................... 17 ISP 技術(shù) .................................................... 17 ISP 的工作原理 .............................................. 17 74HC373 芯片 ................................................ 18 ISP 試驗軟件 Easy 51Pro ................................ 20 3 軟件設(shè)計 .............................................................. 21 主程序設(shè)計 ....................................................... 21 子程序設(shè)計 ....................................................... 22 顯示子程序 ................................................. 22 定時器 T0 中斷服務(wù)程序 ...................................... 22 定時器 T1 中斷服務(wù)程序 ...................................... 23 鍵盤處理程序 ............................................... 24 調(diào)時功能程序 ............................................... 24 鬧鈴判斷子程序 ............................................. 25 4 系統(tǒng)安裝與調(diào)試 ........................................................ 26 系統(tǒng)構(gòu)建 ......................................................... 26 設(shè)計原理圖 .................................................. 26 實驗驗證 ................................................... 26 制作 PCB .................................................... 27 安裝元器件 ................................................. 27 硬件調(diào)試 ......................................................... 28 軟件調(diào)試 ......................................................... 28 PC+在線仿真器 +編程器 ....................................... 28 PC+模擬仿真軟件 +編程器 ..................................... 28 總 結(jié) ................................................................ 30 附 錄 .................................................................. 31 參考文獻 ................................................................ 46 致 謝 .................................................................. 47 1 前 言 21 世紀是信息技術(shù)蓬勃發(fā)展的世紀,單片機技術(shù)的應(yīng)用及發(fā)展就是其中之一。但是單片機的應(yīng)用意義遠不限于它的應(yīng)用范疇或由此帶來的經(jīng)濟效益,更重