【正文】
河南科技大學(xué)畢業(yè)設(shè)計(jì)(論文) 基于單片機(jī)的同步電子時(shí)鐘設(shè)計(jì) 摘 要 單片計(jì)算機(jī)既單片微型計(jì)算機(jī)。由 RAM,ROM,CUP 構(gòu)成,定時(shí),計(jì)數(shù)和多種接口與一體的微型控制器。他體積小,成本低,功能強(qiáng),廣泛應(yīng)用于智能產(chǎn)業(yè)和工業(yè)自動(dòng)化上。而 51/52 系列單片機(jī)是各單片機(jī)中最為典型和最有代表性的一種。這次畢業(yè)設(shè)計(jì)通過對(duì)它的學(xué)習(xí),應(yīng)用,從而達(dá)到學(xué)習(xí),設(shè)計(jì)的能力。 單片機(jī)模塊中最常見的是數(shù)字鐘,數(shù)字鐘是一種用數(shù)字電路技術(shù)實(shí)現(xiàn)時(shí)、分、秒計(jì)時(shí)的裝置,與機(jī)械式時(shí)鐘相比具有更高的準(zhǔn)確性和直觀性, 且無機(jī)械裝置,具有更更長(zhǎng)的使用壽命,因此得到了廣泛的使用。數(shù)字鐘是采用數(shù)字電路實(shí)現(xiàn)對(duì) “時(shí) ”、 “分 ”、 “秒 ”數(shù)字顯示的計(jì)時(shí)裝置。數(shù)字鐘的精度、穩(wěn)定度遠(yuǎn)遠(yuǎn)超過老式機(jī)械鐘。 本設(shè)計(jì)使用 12MHZ 晶振與單片機(jī) AT89C52 相連接,以 AT89C52 芯片為核心, DS1302 為時(shí)鐘芯片 ,實(shí)現(xiàn)在 LCD 上顯示日期、時(shí)間、定時(shí) ,通過5 個(gè)按鍵實(shí)現(xiàn)設(shè)置日期、進(jìn)行調(diào)時(shí)、設(shè)定鬧鈴 等功能,在實(shí)現(xiàn)各功能時(shí) LCD進(jìn)行相應(yīng)顯示,鬧鈴或定時(shí)時(shí)間到時(shí)蜂鳴器響。軟件部分用 C 語言 實(shí)現(xiàn),分為顯示、延遲、調(diào)時(shí)、鬧鈴、定時(shí)、調(diào)整日期等部分。通過軟硬件結(jié)合達(dá) 到最終目的。 關(guān)鍵詞:?jiǎn)纹瑱C(jī),數(shù)字鐘, DS1302, LCD,C 語言 河南科技大學(xué)畢業(yè)設(shè)計(jì)(論文) 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è)計(jì)(論文) 目 錄 前言 ........................................................................................................... 1 第 1 章 設(shè)計(jì)要求與方案選擇 ............................................................... 2 167。 設(shè)計(jì)目的 .................................................................................. 2 167。 設(shè)計(jì)要求 .................................................................................. 2 167。 各模塊方案選擇與論證 .......................................................... 2 第 2 章 總體方案 .................................................................................... 4 167。 系統(tǒng)設(shè) 計(jì)的思路 ...................................................................... 4 167。 系統(tǒng)硬件描述 .......................................................................... 4 167。 系統(tǒng)軟件描述 .......................................................................... 5 167。 設(shè)計(jì)流程和預(yù)期結(jié)果 ............................................................. 6 第 3 章 系統(tǒng)硬件電路設(shè)計(jì)與實(shí)現(xiàn) ....................................................... 7 167。 硬件芯片介紹 ........................................................................ 7 167。 單片機(jī) AT89C52 ......................................................... 7 167。 DS1302 簡(jiǎn)介 ............................................................. 15 167。 系統(tǒng)硬件架構(gòu) ...................................................................... 17 167。 電源部分 .................................................................... 18 167。 復(fù)位與晶振電路 ....................................................... 18 167。 液晶顯示電路 ........................................................... 19 167。 按鍵電路 .................................................................... 19 第 4 章 系統(tǒng)軟件設(shè)計(jì) .......................................................................... 21 167。 軟件設(shè)計(jì)的總體說明 ........................................................... 21 167。 主程序流程圖 ......................................................................... 21 第 5 章 系統(tǒng)的仿真及調(diào)試 .................................................................. 22 167。 系統(tǒng)軟硬件調(diào)試 .................................................................... 22 167。 系統(tǒng)的仿真 ............................................................................ 23 167。 仿真軟件的簡(jiǎn)介 ......................................................... 23 河南科技大學(xué)畢業(yè)設(shè)計(jì)(論文) 167。 電子鐘系統(tǒng) PROTUES 仿真結(jié)果 ........................... 24 結(jié)論 ......................................................................................................... 26 參考文獻(xiàn) ................................................................................................. 27 致謝 ......................................................................................................... 28 附錄 ......................................................................................................... 29 河南科技大學(xué)畢業(yè)設(shè)計(jì)(論文) 1 前 言 數(shù)字電子時(shí)鐘,自從它發(fā)明的那天起,就成為人類的朋友,給人們的生活、學(xué)習(xí)、工作、娛樂帶來極大的方便。但隨著時(shí)間的推移,科學(xué)技術(shù)的不斷發(fā)展,生活節(jié)奏越來越快,基于 51/52 單片機(jī)的多功能電子鐘設(shè)計(jì)競(jìng)爭(zhēng)日益激烈,人們對(duì)時(shí)間計(jì)量的精度要求越來越高,應(yīng)用越來越廣??梢哉f時(shí)間的準(zhǔn)確已成為各行各業(yè)安全運(yùn)行的基礎(chǔ),如果時(shí)間出現(xiàn)誤差而不能及時(shí)校正,會(huì)造成一系列嚴(yán)重的后果和經(jīng)濟(jì)損失。電子時(shí)鐘的設(shè)計(jì)方法有多種,可用中小規(guī)模集成電路組成電子鐘,也可以利用專用的電子鐘芯片配以顯示電路及其所需要的外圍電路組成電子鐘,還可以利用對(duì)單片機(jī)編程來實(shí)現(xiàn)電子鐘。其中,利用單片機(jī)實(shí)現(xiàn)的電子時(shí)鐘具有硬件結(jié)構(gòu)簡(jiǎn)單、編程靈活、便于功能擴(kuò)展等特點(diǎn)。由單片機(jī)作為數(shù)字鐘的核心控制器,可以通過它的時(shí)鐘信號(hào)實(shí)現(xiàn)計(jì)時(shí)功能,將其時(shí) 間數(shù)據(jù)經(jīng)單片機(jī)輸出,利用顯示器顯示出來。通過鍵盤可以進(jìn)行定時(shí)、校時(shí)功能。輸出設(shè)備顯示器可以用液晶顯示技術(shù)或者數(shù)碼管顯示技術(shù)。多功能電子時(shí)鐘除了具有時(shí)鐘的功能外還可以包含與外界時(shí)間保持同步,從而人們可以不用擔(dān)心每次在時(shí)鐘掉電后,再次得電時(shí)需要重新調(diào)時(shí)。在各個(gè)行業(yè)生產(chǎn)及日常生活中,對(duì)時(shí)間同步這一功能始終占據(jù)著非常重要的地位。目前,典型的實(shí)例是手機(jī)和電腦的時(shí)間會(huì)始終保持運(yùn)轉(zhuǎn)而不用每次調(diào)時(shí),使生活變得更方便,而且具有較強(qiáng)推廣應(yīng)用價(jià)值。河南科技大學(xué)畢業(yè)設(shè)計(jì)(論文)