【正文】
河南科技大學(xué)畢業(yè)設(shè)計(論文) 基于單片機的同步電子時鐘設(shè)計 摘 要 單片計算機既單片微型計算機。由 RAM,ROM,CUP 構(gòu)成,定時,計數(shù)和多種接口與一體的微型控制器。他體積小,成本低,功能強,廣泛應(yīng)用于智能產(chǎn)業(yè)和工業(yè)自動化上。而 51/52 系列單片機是各單片機中最為典型和最有代表性的一種。這次畢業(yè)設(shè)計通過對它的學(xué)習(xí),應(yīng)用,從而達(dá)到學(xué)習(xí),設(shè)計的能力。 單片機模塊中最常見的是數(shù)字鐘,數(shù)字鐘是一種用數(shù)字電路技術(shù)實現(xiàn)時、分、秒計時的裝置,與機械式時鐘相比具有更高的準(zhǔn)確性和直觀性, 且無機械裝置,具有更更長的使用壽命,因此得到了廣泛的使用。數(shù)字鐘是采用數(shù)字電路實現(xiàn)對 “時 ”、 “分 ”、 “秒 ”數(shù)字顯示的計時裝置。數(shù)字鐘的精度、穩(wěn)定度遠(yuǎn)遠(yuǎn)超過老式機械鐘。 本設(shè)計使用 12MHZ 晶振與單片機 AT89C52 相連接,以 AT89C52 芯片為核心, DS1302 為時鐘芯片 ,實現(xiàn)在 LCD 上顯示日期、時間、定時 ,通過5 個按鍵實現(xiàn)設(shè)置日期、進(jìn)行調(diào)時、設(shè)定鬧鈴 等功能,在實現(xiàn)各功能時 LCD進(jìn)行相應(yīng)顯示,鬧鈴或定時時間到時蜂鳴器響。軟件部分用 C 語言 實現(xiàn),分為顯示、延遲、調(diào)時、鬧鈴、定時、調(diào)整日期等部分。通過軟硬件結(jié)合達(dá) 到最終目的。 關(guān)鍵詞:單片機,數(shù)字鐘, DS1302, LCD,C 語言 河南科技大學(xué)畢業(yè)設(shè)計(論文) SYNCHRONOUS ELECTRONIC CLOCK DESIGN BASED ON SCM ABSTRACT A monolithic puter is single chip microputer. By RAM, ROM, CUP, timing, counting and multiple interfaces and the integration of the micro controller. He has the advantages of small volume, low cost, strong function, widely used in smart industries, and industrial automation. And 51 Series SCM is the most typical and the most representative one. The graduation design through the study, application, to achieve the study, design ability. SCM module are the most mon digital clock, a digital clock is a kind of digital circuit technology implementation, minutes and seconds timing device, and the mechanical clock pared with higher accuracy and intuitive, and without a mechanical device, has more longer service life, so it has been widely used. A digital clock is adopting digital circuit implementation of hour points and second digital display timer device. A digital clock precision, stability than old mechanical clock. This design uses a 12 MHZ crystal to connect with the machine AT89C52, takes AT89C52 chips as core, DS1302 chip is used as the lock chip, we are able to show date, time and fix the time,on LCD. We can use 5 key to constitute date, adjust time, enact the bell and set the countdown timer. When the electric carrying out each function, the LCD shows the tight function .When the alarm clock and the countdown timer were reached, the voice begins. The software part is realized by C language. It was divided into to show, delay, adjust, make bell, in fixed time, and adjust date etc. part. We get the end purpose c ombining the software and the hardware. KEYWORDS:SCM,digital clock, DS1302, LCD,C language 河南科技大學(xué)畢業(yè)設(shè)計(論文) 目 錄 前言 ........................................................................................................... 1 第 1 章 設(shè)計要求與方案選擇 ............................................................... 2 167。 設(shè)計目的 .................................................................................. 2 167。 設(shè)計要求 .................................................................................. 2 167。 各模塊方案選擇與論證 .......................................................... 2 第 2 章 總體方案 .................................................................................... 4 167。 系統(tǒng)設(shè) 計的思路 ...................................................................... 4 167。 系統(tǒng)硬件描述 .......................................................................... 4 167。 系統(tǒng)軟件描述 .......................................................................... 5 167。 設(shè)計流程和預(yù)期結(jié)果 ............................................................. 6 第 3 章 系統(tǒng)硬件電路設(shè)計與實現(xiàn) ....................................................... 7 167。 硬件芯片介紹 ........................................................................ 7 167。 單片機 AT89C52 ......................................................... 7 167。 DS1302 簡介 ............................................................. 15 167。 系統(tǒng)硬件架構(gòu) ...................................................................... 17 167。 電源部分 .................................................................... 18 167。 復(fù)位與晶振電路 ....................................................... 18 167。 液晶顯示電路 ........................................................... 19 167。 按鍵電路 .................................................................... 19 第 4 章 系統(tǒng)軟件設(shè)計 .......................................................................... 21 167。 軟件設(shè)計的總體說明 ........................................................... 21 167。 主程序流程圖 ......................................................................... 21 第 5 章 系統(tǒng)的仿真及調(diào)試 .................................................................. 22 167。 系統(tǒng)軟硬件調(diào)試 .................................................................... 22 167。 系統(tǒng)的仿真 ............................................................................ 23 167。 仿真軟件的簡介 ......................................................... 23 河南科技大學(xué)畢業(yè)設(shè)計(論文) 167。 電子鐘系統(tǒng) PROTUES 仿真結(jié)果 ........................... 24 結(jié)論 ......................................................................................................... 26 參考文獻(xiàn) ................................................................................................. 27 致謝 ......................................................................................................... 28 附錄 ......................................................................................................... 29 河南科技大學(xué)畢業(yè)設(shè)計(論文) 1 前 言 數(shù)字電子時鐘,自從它發(fā)明的那天起,就成為人類的朋友,給人們的生活、學(xué)習(xí)、工作、娛樂帶來極大的方便。但隨著時間的推移,科學(xué)技術(shù)的不斷發(fā)展,生活節(jié)奏越來越快,基于 51/52 單片機的多功能電子鐘設(shè)計競爭日益激烈,人們對時間計量的精度要求越來越高,應(yīng)用越來越廣??梢哉f時間的準(zhǔn)確已成為各行各業(yè)安全運行的基礎(chǔ),如果時間出現(xiàn)誤差而不能及時校正,會造成一系列嚴(yán)重的后果和經(jīng)濟損失。電子時鐘的設(shè)計方法有多種,可用中小規(guī)模集成電路組成電子鐘,也可以利用專用的電子鐘芯片配以顯示電路及其所需要的外圍電路組成電子鐘,還可以利用對單片機編程來實現(xiàn)電子鐘。其中,利用單片機實現(xiàn)的電子時鐘具有硬件結(jié)構(gòu)簡單、編程靈活、便于功能擴展等特點。由單片機作為數(shù)字鐘的核心控制器,可以通過它的時鐘信號實現(xiàn)計時功能,將其時 間數(shù)據(jù)經(jīng)單片機輸出,利用顯示器顯示出來。通過鍵盤可以進(jìn)行定時、校時功能。輸出設(shè)備顯示器可以用液晶顯示技術(shù)或者數(shù)碼管顯示技術(shù)。多功能電子時鐘除了具有時鐘的功能外還可以包含與外界時間保持同步,從而人們可以不用擔(dān)心每次在時鐘掉電后,再次得電時需要重新調(diào)時。在各個行業(yè)生產(chǎn)及日常生活中,對時間同步這一功能始終占據(jù)著非常重要的地位。目前,典型的實例是手機和電腦的時間會始終保持運轉(zhuǎn)而不用每次調(diào)時,使生活變得更方便,而且具有較強推廣應(yīng)用價值。河南科技大學(xué)畢業(yè)設(shè)計(論文)