版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡介
1、精選優(yōu)質(zhì)文檔-傾情為你奉上 電子萬年歷的設(shè)計(jì)與制作(翻譯)1、 引言電子鐘已成為人們?nèi)粘I钪斜夭豢缮俚奈锲罚瑥V泛用于個(gè)人家庭以及車站、碼頭、劇院、辦公室等公共場所,給人們的生活、學(xué)習(xí)、工作、娛樂帶來了極大的方便。隨著技術(shù)的發(fā)展,人們已不再滿足于鐘表原先簡單的計(jì)時(shí)功能,希望出現(xiàn)一些新的功能,諸如日歷的顯示、鬧鐘的應(yīng)用等,以帶來更大的方便,而所有這些,又都是以數(shù)字化的電子時(shí)鐘為基礎(chǔ)的。因此,研究實(shí)用電子時(shí)鐘及其擴(kuò)展應(yīng)用,有著非常現(xiàn)實(shí)的意義,具有很大的實(shí)用價(jià)值1。由于數(shù)字集成電路技術(shù)的發(fā)展和采用了先進(jìn)的石英技術(shù),現(xiàn)代電子鐘具有走時(shí)準(zhǔn)確、性能穩(wěn)定、制作維修簡單等優(yōu)點(diǎn),彌補(bǔ)了傳統(tǒng)鐘表的許多不足之處。我
2、們利用單片機(jī)技術(shù)設(shè)計(jì)制作的電子萬年歷, 可以很方便的由軟件編程進(jìn)行功能的調(diào)整和改進(jìn),使其在能夠準(zhǔn)確顯示年、月、日、時(shí)間、星期的同時(shí),還能具有很多其他的功能。如設(shè)定鬧鐘、語音報(bào)時(shí)、陰陽歷的轉(zhuǎn)換、二十四節(jié)氣的顯示等,有一定的新穎性和實(shí)用性,同時(shí)體積小、攜帶方便,使用也更為方便,具有技術(shù)更新周期短、成本低、開放靈活等優(yōu)點(diǎn),具備一定的市場前景。這里要介紹的就是一款可滿足使用者特殊要求,輸出方式靈活、計(jì)時(shí)準(zhǔn)確、性能穩(wěn)定、維護(hù)方便的實(shí)用電子萬年歷。2、技術(shù)可行性隨著國內(nèi)超大規(guī)模集成電路的出現(xiàn),微處理器及其外圍芯片有了迅速的發(fā)展。集成技術(shù)的最新發(fā)展之一是將CPU和外圍芯片,如程序存儲(chǔ)器、數(shù)據(jù)存儲(chǔ)器、并行I/
3、O口、串行I/O口、定時(shí)/計(jì)數(shù)器、中斷控制器及其他控制部件集成在一個(gè)芯片之中,制成單片計(jì)算機(jī)(Single-Chip Microcomputer)。而近年來推出的一些高檔單片機(jī)還包括有許多特殊功能單元,如A/D、D/A轉(zhuǎn)換器、調(diào)制解調(diào)器、通信控制器、鎖相環(huán)、DMA、浮點(diǎn)運(yùn)算單元、PWM控制輸出單元、PWM輸出時(shí)的死區(qū)可編程控制功能等。因此,只要外加一些擴(kuò)展電路及必要的通道接口就可以構(gòu)成各種計(jì)算機(jī)應(yīng)用系統(tǒng),如工業(yè)流水線控制系統(tǒng)、作為家用電器的主控制器、分布式控制系統(tǒng)的終端節(jié)點(diǎn)或作為其主控制節(jié)點(diǎn)起中繼的作用、數(shù)據(jù)采集系統(tǒng)、自動(dòng)測試系統(tǒng)等2。單片機(jī)的出現(xiàn),并在各技術(shù)領(lǐng)域中得到如此迅猛的發(fā)展,與單片機(jī)
4、構(gòu)成計(jì)算機(jī)應(yīng)用系統(tǒng)所形成的下述特點(diǎn)有關(guān): 2.1、單片機(jī)構(gòu)成的應(yīng)用系統(tǒng)有較大的可靠性。這些可靠性的獲得除了依靠單片機(jī)芯片本身的高可靠性以及應(yīng)用有最少的聯(lián)接外,還可以方便地采用軟、硬件技術(shù)。2.2、系統(tǒng)擴(kuò)展、系統(tǒng)配置較典型、規(guī)范,容易構(gòu)成各種規(guī)模的應(yīng)用系統(tǒng),應(yīng)用系統(tǒng)有較高的軟、硬件利用系數(shù)。 2.3、由于構(gòu)成的應(yīng)用系統(tǒng)是一個(gè)計(jì)算機(jī)系統(tǒng),相當(dāng)多的測、控功能由軟件實(shí)現(xiàn),故具有柔性特征,不須改變硬件系統(tǒng)就能適當(dāng)?shù)馗淖兿到y(tǒng)功能。 2.4、有優(yōu)異的性能、價(jià)格比。可以說,目前國內(nèi)外面臨的單片機(jī)應(yīng)用技術(shù),如同60年代面臨晶體管技術(shù),70年代面臨數(shù)字集成電路一樣。單片機(jī)和可編程門陣列相結(jié)合,構(gòu)成新一代電子應(yīng)用技
5、術(shù)是不可能回避的一項(xiàng)新型的工程應(yīng)用技術(shù)3。3、 設(shè)計(jì)背景隨著經(jīng)濟(jì)的不斷發(fā)展,人們對(duì)生活質(zhì)量的要求也在不斷地提高。廠家也不斷的推出各種電子產(chǎn)品以滿足人們的需要,而電子萬年歷則順應(yīng)了人們對(duì)時(shí)間方面的要求。傳統(tǒng)的電子萬年歷功能較為單一,價(jià)格較高,較難走進(jìn)千家萬戶,沒能達(dá)到人們生活中所需要的最基本要求,本課題旨在設(shè)計(jì)一款,功能較全面,價(jià)格較低且實(shí)用性強(qiáng)的電子萬年歷。以滿足不同使用者的需求。4、設(shè)計(jì)要求能設(shè)計(jì)并制作出功能比較全面,價(jià)格較為適中的電子萬年歷。功能要求:可以顯示年、月、日、顯示時(shí)間、星期;擴(kuò)展要求:具有陰陽歷轉(zhuǎn)換功能、節(jié)日功能。設(shè)計(jì)相應(yīng)的軟件并與硬件設(shè)計(jì)者共同完成系統(tǒng)的軟件設(shè)計(jì)工作,基本完成
6、系統(tǒng)的軟、硬件統(tǒng)調(diào)工作。編寫符合天河學(xué)院畢業(yè)論文規(guī)范的設(shè)計(jì)論文。設(shè)計(jì)者應(yīng)具備單片機(jī)系統(tǒng)設(shè)計(jì)的基本知識(shí),設(shè)計(jì)須提供單片機(jī)系統(tǒng)的開發(fā)工具。5、設(shè)計(jì)的意義隨著電子技術(shù)的迅速發(fā)展,特別是隨著大規(guī)模集成電路 出現(xiàn),給人類生活帶來了根本性的變化。尤其是單片機(jī)技術(shù)的應(yīng)用產(chǎn)品已經(jīng)走進(jìn)了千家萬戶。電子萬年歷的出現(xiàn)給人們的生活帶來了諸多方便。但傳統(tǒng)的電子萬年歷除顯示時(shí)間以外,功能較為單一,逐漸失去了市場。新型電子萬年歷的產(chǎn)生 更會(huì)帶來更多方便,現(xiàn)在的發(fā)展方向以實(shí)用型,方便型,美觀型,精巧型為主。電子萬年歷作為電子類小設(shè)計(jì)不僅是市場上的寵兒,也是單片機(jī)實(shí)驗(yàn)中一個(gè)很常用的題目。我國生產(chǎn)的電子萬年歷有很多種,總體上來說
7、以研究多功能電子萬年歷為主,使萬年歷除了原有的顯示時(shí)間,日期等基本功能外,還具有鬧鈴,報(bào)警等功能。商家生產(chǎn)的電子萬年歷更從質(zhì)量,價(jià)格,實(shí)用上考慮,不斷的改進(jìn)電子萬年歷的設(shè)計(jì),使其更加的具有市場。6、對(duì)設(shè)計(jì)的認(rèn)識(shí)本設(shè)計(jì)為軟件,硬件相結(jié)合的一組設(shè)計(jì)。在軟件設(shè)計(jì)過程中,應(yīng)對(duì)硬件部分有相關(guān)了解,這樣有助于對(duì)設(shè)計(jì)題目的更深了解,有助于軟件設(shè)計(jì)。基本的要了解一些主要器件的基本功能,作用。本設(shè)計(jì)采用的是除了采用集成化的時(shí)鐘芯片外,還有采用MCU的方案,利用AT89系列單片微機(jī)制成萬年歷電路,采用軟件和硬件結(jié)合的方法,控制LED數(shù)碼管輸出,分別用來顯示年、月、日、時(shí)、分、秒,其最大特點(diǎn)是:硬件電路簡單,安裝方
8、便易于實(shí)現(xiàn),軟件設(shè)計(jì)獨(dú)特,可靠。AT89C51是由ATMEL公司推出的一種小型單片機(jī)。95年出現(xiàn)在中國市場。其主要特點(diǎn)為采用Flash存貯器技術(shù),降低了制造成本,其軟件、硬件與MCS-51完全兼容,可以很快被中國廣大用戶接受,其程序的電可擦寫特性,7、AT89C51和DS1302的資料. 7.1 AT89C51AT89C51是一種帶4K字節(jié)閃爍可編程可擦除(FPEROMFlash Programmable and Erasable Read Only Memory)的低電壓,高性能CMOS 8位微處理器,俗稱。AT89C2051是一種帶2K字節(jié)閃爍可編程可擦除只讀存儲(chǔ)器的單片機(jī)。單片機(jī)的可擦除
9、只讀存儲(chǔ)器可以反復(fù)擦除100次。該器件采用ATMEL高密度非易失存儲(chǔ)器制造技術(shù)制造,與工業(yè)標(biāo)準(zhǔn)的MCS-51指令集和輸出管腳相兼容。由于將多功能8位CPU和閃爍存儲(chǔ)器組合在單個(gè)芯片中,ATMEL的AT89C51是一種高效微控制器,AT89C2051是它的一種精簡版本。AT89C單片機(jī)為很多嵌入式控制系統(tǒng)提供了一種靈活性高且價(jià)廉的方案。 主要特性:與MCS-51 兼容 4K字節(jié)可編程閃爍存儲(chǔ)器 壽命:1000寫/擦循環(huán)數(shù)據(jù)保留時(shí)間:10年全靜態(tài)工作:0Hz-24MHz三級(jí)程序存儲(chǔ)器鎖定1288位內(nèi)部RAM32可編程I/O線兩個(gè)16位定時(shí)器/計(jì)數(shù)器5個(gè)中斷源 可編程串行通道低功耗的閑置和掉電模式片
10、內(nèi)振蕩器和時(shí)鐘電路 管腳說明:P0口:P0口為一個(gè)8位漏級(jí)開路雙向I/O口,每腳可吸收8TTL門電流。當(dāng)P1口的管腳第一次寫1時(shí),被定義為高阻輸入。P0能夠用于外部程序數(shù)據(jù)存儲(chǔ)器,它可以被定義為數(shù)據(jù)/地址的第八位。在FIASH編程時(shí),P0 口作為原碼輸入口,當(dāng)FIASH進(jìn)行校驗(yàn)時(shí),P0輸出原碼,此時(shí)P0外部必須被拉高。P1口:P1口是一個(gè)內(nèi)部提供上拉電阻的8位雙向I/O口,P1口緩沖器能接收輸出4TTL門電流。P1口管腳寫入1后,被內(nèi)部上拉為高,可用作輸入,P1口被外部下拉為低電平時(shí),將輸出電流,這是由于內(nèi)部上拉的緣故。在FLASH編程和校驗(yàn)時(shí),P1口作為第八位地址接收。 P2口:P2口為一個(gè)
11、內(nèi)部上拉電阻的8位雙向I/O口,P2口緩沖器可接收,輸出4個(gè)TTL門電流,當(dāng)P2口被寫“1”時(shí),其管腳被內(nèi)部上拉電阻拉高,且作為輸入。并因此作為輸入時(shí),P2口的管腳被外部拉低,將輸出電流。這是由于內(nèi)部上拉的緣故。P2口當(dāng)用于外部程序存儲(chǔ)器或16位地址外部數(shù)據(jù)存儲(chǔ)器進(jìn)行存取時(shí),P2口輸出地址的高八位。在給出地址“1”時(shí),它利用內(nèi)部上拉優(yōu)勢,當(dāng)對(duì)外部八位地址數(shù)據(jù)存儲(chǔ)器進(jìn)行讀寫時(shí),P2口輸出其特殊功能寄存器的內(nèi)容。P2口在FLASH編程和校驗(yàn)時(shí)接收高八位地址信號(hào)和控制信號(hào)。P3口:P3口管腳是8個(gè)帶內(nèi)部上拉電阻的雙向I/O口,可接收輸出4個(gè)TTL門電流。當(dāng)P3口寫入“1”后,它們被內(nèi)部上拉為高電平,
12、并用作輸入。作為輸入,由于外部下拉為低電平,P3口將輸出電流(ILL)這是由于上拉的緣故。RST:復(fù)位輸入。當(dāng)振蕩器復(fù)位器件時(shí),要保持RST腳兩個(gè)機(jī)器周期的高電平時(shí)間。ALE/PROG:當(dāng)訪問外部存儲(chǔ)器時(shí),地址鎖存允許的輸出電平用于鎖存地址的地位字節(jié)。在FLASH編程期間,此引腳用于輸入編程脈沖。在平時(shí),ALE端以不變的頻率周期輸出正脈沖信號(hào),此頻率為振蕩器頻率的1/6。因此它可用作對(duì)外部輸出的脈沖或用于定時(shí)目的。然而要注意的是:每當(dāng)用作外部數(shù)據(jù)存儲(chǔ)器時(shí),將跳過一個(gè)ALE脈沖。如想禁止ALE的輸出可在SFR8EH地址上置0。此時(shí), ALE只有在執(zhí)行MOVX,MOVC指令是ALE才起作用。另外,
13、該引腳被略微拉高。如果微處理器在外部執(zhí)行狀態(tài)ALE禁止,置位無效。/PSEN:外部程序存儲(chǔ)器的選通信號(hào)。在由外部程序存儲(chǔ)器取指期間,每個(gè)機(jī)器周期兩次/PSEN有效。但在訪問外部數(shù)據(jù)存儲(chǔ)器時(shí),這兩次有效的/PSEN信號(hào)將不出現(xiàn)。/EA/VPP:當(dāng)/EA保持低電平時(shí),則在此期間外部程序存儲(chǔ)器(0000H-FFFFH),不管是否有內(nèi)部程序存儲(chǔ)器。注意加密方式1時(shí),/EA將內(nèi)部鎖定為RESET;當(dāng)/EA端保持高電平時(shí),此間內(nèi)部程序存儲(chǔ)器。在FLASH編程期間,此引腳也用于施加12V編程電源(VPP)。XTAL1和XTAL2分別為反向放大器的輸入和輸出。該反向放大器可以配置為片內(nèi)振蕩器。石晶振蕩和陶瓷振
14、蕩均可采用。如采用外部時(shí)鐘源驅(qū)動(dòng)器件,XTAL2應(yīng)不接。有余輸入至內(nèi)部時(shí)鐘信號(hào)要通過一個(gè)二分頻觸發(fā)器,因此對(duì)外部時(shí)鐘信號(hào)的脈寬無任何要求,但必須保證脈沖的高低電平要求的寬度。 整個(gè)PEROM陣列和三個(gè)鎖定位的電擦除可通過正確的控制信號(hào)組合,并保持ALE管腳處于低電平10ms 來完成。在芯片擦操作中,代碼陣列全被寫“1”且在任何非空存儲(chǔ)字節(jié)被重復(fù)編程以前,該操作必須被執(zhí)行。此外,AT89C51設(shè)有穩(wěn)態(tài)邏輯,可以在低到零頻率的條件下靜態(tài)邏輯,支持兩種軟件可選的掉電模式。在閑置模式下,CPU停止工作。但RAM,定時(shí)器,計(jì)數(shù)器,串口和中斷系統(tǒng)仍在工作。在掉電模式下,保存RAM的內(nèi)容并且凍結(jié)振蕩器,禁止
15、所用其他芯片功能,直到下一個(gè)硬件復(fù)位為止。 串口通訊單片機(jī)的結(jié)構(gòu)和特殊寄存器,這是你編寫軟件的關(guān)鍵。至于串口通信需要用到那些特殊功能寄存器呢,它們是SCON,TCON,TMOD,SCON等,各代表什么含義呢?SBUF 數(shù)據(jù)緩沖寄存器這是一個(gè)可以直接尋址的串行口專用寄存器。有朋友這樣問起過“為何在串行口收發(fā)中,都只是使用到同一個(gè)寄存器SBUF?而不是收發(fā)各用一個(gè)寄存器?!睂?shí)際上SBUF 包含了兩個(gè)獨(dú)立的寄存器,一個(gè)是發(fā)送寄存,另一個(gè)是接收寄存器,但它們都共同使用同一個(gè)尋址地址99H。CPU 在讀SBUF 時(shí)會(huì)指到接收寄存器,在寫時(shí)會(huì)指到發(fā)送寄存器,而且接收寄存器是雙緩沖寄存器,這樣可以避免接收中
16、斷沒有及時(shí)的被響應(yīng),數(shù)據(jù)沒有被取走,下一幀數(shù)據(jù)已到來,而造成的數(shù)據(jù)重疊問題。發(fā)送器則不需要用到雙緩沖,一般情況下我們?cè)趯懓l(fā)送程序時(shí)也不必用到發(fā)送中斷去外理發(fā)送數(shù)據(jù)。操作SBUF寄存器的方法則很簡單,只要把這個(gè)99H 地址用關(guān)鍵字sfr定義為一個(gè)變量就可以對(duì)其進(jìn)行讀寫操作了,如sfr SBUF = 0x99;當(dāng)然你也可以用其它的名稱。通常在標(biāo)準(zhǔn)的reg51.h 或at89x51.h 等頭文件中已對(duì)其做了定義,只要用#include 引用就可以了。SCON 串行口控制寄存器通常在芯片或設(shè)備中為了監(jiān)視或控制接口狀態(tài),都會(huì)引用到接口控制寄存器。SCON 就是51 芯片的串行口控制寄存器。它的尋址地址是
17、98H,是一個(gè)可以位尋址的寄存器,作用就是監(jiān)視和控制51 芯片串行口的工作狀態(tài)。51 芯片的串口可以工作在幾個(gè)不同的工作模式下,其工作模式的設(shè)置就是使用SCON 寄存器。REM 為允許接收位,REM 置1 時(shí)串口允許接收,置0 時(shí)禁止接收。REM 是由軟件置位或清零。如果在一個(gè)電路中接收和發(fā)送引腳P3.0,P3.1 都和上位機(jī)相連,在軟件上有串口中斷處理程序,當(dāng)要求在處理某個(gè)子程序時(shí)不允許串口被上位機(jī)來的控制字符產(chǎn)生中斷,那么可以在這個(gè)子程序的開始處加入REM=0 來禁止接收,在子程序結(jié)束處加入REM=1 再次打開串口接收。大家也可以用上面的實(shí)際源碼加入REM=0 來進(jìn)行實(shí)驗(yàn)。TB8 發(fā)送數(shù)據(jù)
18、位8,在模式2 和3 是要發(fā)送的第9 位。該位可以用軟件根據(jù)需要置位或清除,通常這位在通信協(xié)議中做奇偶位,在多處理機(jī)通信中這一位則用于表示是地址幀還是數(shù)據(jù)幀。RB8 接收數(shù)據(jù)位8,在模式2 和3 是已接收數(shù)據(jù)的第9 位。該位可能是奇偶位,地址/數(shù)據(jù)標(biāo)識(shí)位。在模式0 中,RB8 為保留位沒有被使用。在模式1 中,當(dāng)SM2=0,RB8 是已接收數(shù)據(jù)的停止位。TI 發(fā)送中斷標(biāo)識(shí)位。在模式0,發(fā)送完第8 位數(shù)據(jù)時(shí),由硬件置位。其它模式中則是在發(fā)送停止位之初,由硬件置位。TI 置位后,申請(qǐng)中斷,CPU 響應(yīng)中斷后,發(fā)送下一幀數(shù)據(jù)。在任何模式下,TI 都必須由軟件來清除,也就是說在數(shù)據(jù)寫入到SBUF 后,
19、硬件發(fā)送數(shù)據(jù),中斷響應(yīng)(如中斷打開),這時(shí)TI=1,表明發(fā)送已完成,TI 不會(huì)由硬件清除,所以這時(shí)必須用軟件對(duì)其清零。RI 接收中斷標(biāo)識(shí)位。在模式0,接收第8 位結(jié)束時(shí),由硬件置位。其它模式中則是在接收停止位的半中間,由硬件置位。RI=1,申請(qǐng)中斷,要求CPU 取走數(shù)據(jù)。但在模式1 中,SM2=1時(shí),當(dāng)未收到有效的停止位,則不會(huì)對(duì)RI 置位。同樣RI 也必須要靠軟件清除。常用的串口模式1 是傳輸10 個(gè)位的,1 位起始位為0,8 位數(shù)據(jù)位,低位在先,1 位停止位為1。它的波特率是可變的,其速率是取決于定時(shí)器1 或定時(shí)器2 的定時(shí)值(溢出速率)。AT89C51 和AT89C2051 等51 系列
20、芯片只有兩個(gè)定時(shí)器,定時(shí)器0 和定時(shí)器1,而定時(shí)器2是89C52 系列芯片才有的。波特率在使用串口做通訊時(shí),一個(gè)很重要的參數(shù)就是波特率,只有上下位機(jī)的波特率一樣時(shí)才可以進(jìn)行正常通訊。波特率是指串行端口每秒內(nèi)可以傳輸?shù)牟ㄌ匚粩?shù)。有一些初學(xué)的朋友認(rèn)為波特率是指每秒傳輸?shù)淖止?jié)數(shù),如標(biāo)準(zhǔn)9600 會(huì)被誤認(rèn)為每秒種可以傳送9600個(gè)字節(jié),而實(shí)際上它是指每秒可以傳送9600 個(gè)二進(jìn)位,而一個(gè)字節(jié)要8 個(gè)二進(jìn)位,如用串口模式1 來傳輸那么加上起始位和停止位,每個(gè)數(shù)據(jù)字節(jié)就要占用10 個(gè)二進(jìn)位,9600 波特率用模式1 傳輸時(shí),每秒傳輸?shù)淖止?jié)數(shù)是960010960 字節(jié)。51 芯片的串口工作模式0的波特率是固
21、定的,為fosc/12,以一個(gè)12M 的晶振來計(jì)算,那么它的波特率可以達(dá)到1M。模式2 的波特率是固定在fosc/64 或fosc/32,具體用那一種就取決于PCON 寄存器中的SMOD位,如SMOD 為0,波特率為focs/64,SMOD 為1,波特率為focs/32。模式1 和模式3 的波特率是可變的,取決于定時(shí)器1 或2(52 芯片)的溢出速率。 7.1 DS1302DS1302 ,DS1302是DALLAS 公司推出的涓流充電時(shí)鐘芯片,內(nèi)含有一個(gè)實(shí)時(shí)時(shí)鐘/日歷和31 字節(jié)靜態(tài)RAM,通過簡單的串行接口與單片機(jī)進(jìn)行通信實(shí)時(shí)時(shí)鐘/日歷電路.提供秒分時(shí)日日期.月年的信息,每月的天數(shù)和閏年的天
22、數(shù)可自動(dòng)調(diào)整時(shí)鐘操作可通過AM/PM 指示決定采用24 或12 小時(shí)格式.DS1302 與單片機(jī)之間能簡單地采用同步串行的方式進(jìn)行通信,僅需用到三個(gè)口線:1 RES 復(fù)位,2 I/O 數(shù)據(jù)線,3 SCLK串行時(shí)鐘.時(shí)鐘/RAM 的讀/寫數(shù)據(jù)以一個(gè)字節(jié)或多達(dá)31 個(gè)字節(jié)的字符組方式通信.DS1302 工作時(shí)功耗很低,保持?jǐn)?shù)據(jù)和時(shí)鐘信息時(shí)功率小于1mW.DS1302 是由DS1202 改進(jìn)而來,增加了以下的特性.雙電源管腳用于主電源和備份電源供應(yīng)Vcc1,為可編程涓流充電電源附加七個(gè)字節(jié)存儲(chǔ)器.它廣泛應(yīng)用于電話傳真便攜式儀器以及電池供電的儀器儀表等產(chǎn)品領(lǐng)域.下面將主要的性能指標(biāo)作一綜合: 實(shí)時(shí)時(shí)鐘
23、具有能計(jì)算2100 年之前的秒分時(shí)日日期星期月年的能力還有閏年調(diào)整的能力; 31 8 位暫存數(shù)據(jù)存儲(chǔ)RAM; 串行I/O 口方式使得管腳數(shù)量最少; 寬范圍工作電壓2.0 5.5V; 工作電流2.0V 時(shí),小于300nA; 讀/寫時(shí)鐘或RAM 數(shù)據(jù)時(shí)有兩種傳送方式單字節(jié)傳送和多字節(jié)傳送字符組方式; 8 腳DIP 封裝或可選的8 腳SOIC 封裝根據(jù)表面裝配; 簡單3 線接口; 與TTL 兼容Vcc=5V; 可選工業(yè)級(jí)溫度范圍-40 +85; 與DS1202 兼容; 在DS1202 基礎(chǔ)上增加的特性;對(duì)Vcc1 有可選的涓流充電能力;雙電源管用于主電源和備份電源供應(yīng);備份電源管腳可由電池或大容量電
24、容輸入; E-calendar design and production (translation) 1, Introduction Clock has become an everyday essential items, are widely used in individual households, as well as stations, terminals, theaters, offices and other public places, to peoples lives, study, work, entertainment brought great convenienc
25、e. As technology advances, people are no longer satisfied with a simple timing function of the original clock, hoping some new features, such as the calendar display, alarm clock application, so as to bring greater convenience, all of which, they are both is based on digital electronic clock basis.
26、Therefore, the study and practical application of electronic clock and its extension has a very real sense, has great practical value 1. As digital integrated circuits technology development and adoption of advanced quartz technology, modern electronic clock with the travel-time accuracy, stable per
27、formance, making simple repairs, etc., make up the traditional watch many of the deficiencies. We use single-chip microcomputer designed an electronic calendar, can be easily programmed by the software functional adjustments and improvements, so that it can accurately display the year, month, day, t
28、ime, weeks at the same time, but also has many other functions. Such as setting the alarm clock, voice timekeeping, lunisolar calendar conversion, 24 solar terms of the displays, there is a certain novelty and usefulness, while small, portable, easy to use and more with technology refresh cycle is s
29、hort, low-cost , open and flexible, etc., with a certain degree of market prospects. Here is to introduce a user to meet specific requirements, the output flexible and timing accuracy, stable performance, convenient maintenance and practical electronic calendar. 2, the technical feasibility of With
30、the emergence of the domestic super-large scale integrated circuits, microprocessors and peripheral chips has been rapid development. Integration technology is one of the latest developments in the CPU and peripheral chips, such as program memory, data memory, parallel I / O ports, serial I / O port
31、s, timer / counter, interrupt controller and other control components in a single chip of the , the made-chip computer (Single-Chip Microcomputer). In recent years launched a number of high-end microcontroller also includes many special functional unit, such as the A / D, D / A converters, modems, c
32、ommunications controller, PLL, DMA, floating point unit, PWM control output unit, PWM the output when the dead-programmable control functions. Therefore, as long as necessary, along with some expansion of the channel interface circuit and can be formed a variety of computer application systems, such
33、 as industrial production line control systems, household appliances, as the main controller, distributed control system, the terminal node or as part of its master control node from the Following the role of data acquisition systems, automatic test systems, etc. 2. SCM, and have been in various tec
34、hnical fields such rapid development, and SCM systems constitute a computer applications related to the formation of the following characteristics: 2.1, single-chip computer application systems have greater reliability. The reliability of access in addition to their high reliability microcontroller
35、chip itself and the application of at least connection, but also can easily use the software and hardware technology. 2.2, system expansion, system configuration more typical, standardized, easy to create various size applications, the application system has a higher hardware and software utilizatio
36、n factor. 2.3, due to the application constitutes a system is a computer system, a considerable number of measurement, control function is performed by software, it has flexible features, no need to change the hardware system will be able to change the system functions properly. 2.4, has excellent p
37、erformance price ratio. Can be said that facing the MCU application technologies at home and abroad, as the 60s transistor technology faces 70 years to face the same digital integrated circuits. Microcontroller and programmable gate arrays combine to form a new generation of electronic applications
38、and technology are impossible to evade a new type of engineering application of technology 3, design background As the economy continues to develop, peoples quality of life demands are constantly improving. Manufacturers have also been the introduction of a variety of electronic products to meet peo
39、ples needs, and e-calendar will conform to peoples time requirements. The more traditional electronic calendar features a single, higher prices, more difficult to every family, and did not meet the needs of peoples lives are the most basic requirement, this topic aims to design a functional more com
40、prehensive, low price and practical strong electronic calendar. In order to meet different user needs. 4, the design requirements Be able to design and create a more comprehensive features, the price is more moderate electronic calendar. Functional requirements: You can display year, month, day, sho
41、w time, week; expansion requirements: a lunisolar calendar conversion function, holiday function. To design appropriate software and hardware and system software designers have completed design work, and basically complete the system software and hardware integration transfers. Thesis prepared in ac
42、cordance with specifications of the Milky Way College of papers. Designers should have the basics of microcomputer system design, design to provide SCM system development tools. 5, the significance of the design With the rapid development of electronic technology, especially with the large scale int
43、egrated circuits appear to human life brought about fundamental changes. In particular, the application of microcomputer technology products have been entered into households. The emergence of electronic calendar has brought a lot of peoples lives easy. However, traditional electronic calendar Apart
44、 from showing the time beyond the functional is more a single, gradually lost the market. The emergence of new electronic calendar will bring more convenience, the present direction of development with practical, convenient type, beautiful type, compact-based. E-calendar as a small electronics desig
45、n is not only the darling of the market, but also one of the most commonly used microcontroller experiment subject. Produced in our country there are many kinds of electronic calendar, on the whole to study multi-function electronic calendar-based, so that addition to the original calendar display t
46、ime, date and other basic functions, also has the alarm and alarm functions. Production of electronic business calendar more from the quality, price, and practical to consider, continuous improvement of the electronic calendar designed to make it more that have market. 6 knowledge of design The desi
47、gn for the software, hardware, a combination of a group design. In the software design process to deal with the hardware part of the relevant knowledge, which will help design a better understanding of the subject will help software design. Essential to understand the basic functions of some of the
48、major components, roles. This design is used in addition to integrated clock chip, there are programs using MCU using the AT89 series of single-chip microcomputer made calendar circuit, using the method of combining software and hardware to control LED digital tube output, respectively, used to disp
49、lay year, month, day, hour, minute, seconds, its most important feature is: the hardware circuit is simple, easy installation and easy to implement, software design a unique and reliable. ATMEL Corporation AT89C51 launched by a small microcontroller. 95 years in the Chinese market. The main feature
50、for the introduction of Flash memory technology to reduce manufacturing costs, its software and hardware is fully compatible with the MCS-51, can be quickly accepted by Chinese customers, its procedures Electrically Erasable features, 7, AT89C51 and DS1302 data. 7.1 AT89C51 AT89C51 is a kind of 4K b
51、ytes of flash erasable programmable read-only memory (FPEROM-Flash Programmable and Erasable Read Only Memory) of the low-voltage, high-performance CMOS 8-bit microprocessors, commonly known as microcontrollers. AT89C2051 is a kind of 2K bytes of flash erasable programmable read only memory of the m
52、icrocontroller. MCU EEPROM erasure can be repeated 100 times. The device uses high-density non-volatile memory ATMEL manufacturing technology manufacturing, and industry-standard MCS-51 instruction set and output pins are compatible. Owing to the multi-function 8-bit CPU and flash memory combined in
53、 a single chip, ATMEL The AT89C51 is a highly efficient micro-controller, AT89C2051 is a streamlined version of it. AT89C SCM for many embedded control system provides a high degree of flexibility and inexpensive solution. Main features: Compatible with MCS-51 4K bytes of programmable flash memory L
54、ife: 1000 write / erase cycles Data retention: 10 years Fully static work: 0Hz-24MHz 3 Program Memory Lock 128 8-bit internal RAM 32 programmable I / O Line Two 16-bit timer / counter 5 interrupt sources Programmable Serial Channel Low-power idle and power-down mode On-chip oscillator and clock circ
55、uitry Pin Description: P0 port: P0 port as an 8-bit open drain bi-level I / O port, each pin can absorb 8TTL gate current. When the P1 port pin for the first time to write 1, is defined as high-impedance input. P0 can be used for external program data memory, which can be defined as data / address o
56、f the eighth. The FIASH programming, P0 port input as the original code, when FIASH to verify when, P0 output of the original code, this time must be pulled outside P0. P1 port: P1 port is an internal pull-up resistor to provide 8-bit bi-directional I / O port, P1 port buffer to receive the output 4
57、TTL gate current. P1 port pin to write a post, was the internal pull-high, can be used as input, P1 port is an external pull-down low, the output current, which is due to internal pull-ups sake. In the FLASH programming and verification time, P1 port as the eighth-bit address to receive. P2 port: P2
58、 port for an internal pull-up resistor 8-bit bi-directional I / O port, P2 port buffer can receive the output 4 TTL gate current, when the P2 port is to write 1, its pin is internal pull-up resistors, and as input. And therefore, as input, P2 port pins are externally pulled low, the output current. This is due to internal pull-ups sake. P2 port wh
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 2025 小學(xué)四年級(jí)科學(xué)下冊(cè)壓縮空氣玩具原理講解課件
- 2026湖北荊州市監(jiān)利市事業(yè)單位人才引進(jìn)64人參考考試試題附答案解析
- 2026福建南平市建陽區(qū)文化體育和旅游局招聘1人備考考試試題附答案解析
- 2026年上半年黑龍江省人民政府黑瞎子島建設(shè)和管理委員會(huì)事業(yè)單位公開招聘工作人員4人參考考試試題附答案解析
- 建立有效的家屬溝通與教育
- 2026山東臨沂莒南縣部分事業(yè)單位招聘綜合類崗位29人備考考試題庫附答案解析
- 2026廣西柳州市融安縣公安局招聘警務(wù)輔助人員50人備考考試試題附答案解析
- 2026重慶銅梁區(qū)慶隆鎮(zhèn)人民政府向社會(huì)公開招聘1人參考考試試題附答案解析
- 2026“夢工場”招商銀行重慶分行寒假實(shí)習(xí)生招聘備考考試題庫附答案解析
- 2026年度菏澤鄄城縣事業(yè)單位公開招聘初級(jí)綜合類崗位人員備考考試試題附答案解析
- 2025至2030中國丙烯酸壓敏膠行業(yè)調(diào)研及市場前景預(yù)測評(píng)估報(bào)告
- 2025年初級(jí)經(jīng)濟(jì)師考試卷附答案
- 車輛保證過戶協(xié)議書
- 2026年勞動(dòng)合同示范文本
- 2025年《城市公共汽車和電車客運(yùn)管理規(guī)定》知識(shí)考試題庫及答案解析
- 數(shù)字文旅發(fā)展的沉浸式體驗(yàn)創(chuàng)新
- 電焊工考試100題(帶答案)
- 物業(yè)項(xiàng)目運(yùn)營管理培訓(xùn)
- 掌握生命晶石制作技能初級(jí)工作指南
- 雨課堂在線學(xué)堂《審美的歷程》作業(yè)單元考核答案
- 裝修公司施工進(jìn)度管控流程詳解
評(píng)論
0/150
提交評(píng)論