電子萬年歷中英文翻譯_第1頁
電子萬年歷中英文翻譯_第2頁
電子萬年歷中英文翻譯_第3頁
電子萬年歷中英文翻譯_第4頁
免費(fèi)預(yù)覽已結(jié)束,剩余1頁可下載查看

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報或認(rèn)領(lǐng)

文檔簡介

1、design of the digital perpetual calendar based onreal-time clock chipabstract:this electronic calendar uses the at89s52 microcontroller as the core for the control. time circuit which is constituted by dallass ds12c887a real-time clock chip achieved a time and date display, it increased functionalit

2、y for the temperature display and the whole point timekeeping. this paper discusses the hardware circuit of the system, principle in detail,and gives the flow chart of the software design and the major source code. keywords:microcontroller; real-time clock; temperature measurement1 introduction e-ca

3、lendar-bedroom at home,schools,stations and more and more extensive use of plaza for peoples lives,study,work great convenience. electronics calendar for the past need to re-adjust after power-off time and date,and time is a big error. designed the system using real-time clock chip (ds12c887a) as a

4、timer parts,the chip comes with an internal crystal oscillator,so that effectively guarantee the accuracy of the time and hang own internal battery power makes the situation will continue to update the time information . this design uses at89s52 as the main controller,in order to improve the practic

5、ality of the circuit add temperature measurement circuit,timekeeping and alarm functions. 2 system hardware design schematic circuit shown in figure 2: real-time clock core片audio signal generator and driver single-chip controllerat89s52ledkey circuittemperature measurement circuitpower circuit syste

6、m architecture diagram2.1 power supply circuit in order to reduce circuit costs,the system power supply circuit by the transformer transformer,three-terminal integrated regulator (l7805 circuit 5v, has a simple,reliable, inexpensive and so on. 2.2 host controller host controller using atmels latest

7、mcu products at89s52. apart from the single-chip microcomputer has a mcs-51 series single-chip all the benefits of things,also has 8kb of internal in-system programmable flash memory,free and low-power brown-out mode, greatly reducing the power circuit . in addition,also has a watchdog circuit,a rel

8、iable job for the circuit provides greater assurance. 2.3 digital tube display circuit show circuit with a high brightness,long life,low cost features such as the led digital tube. throughout the show circuit by the digital control and display led drive circuit and decoding circuit. because of the s

9、ystem to display the contents of more,a total of 16 digital tube, respectively,with eight shows year,month,day,four show time,show that 22 weeks,2 show the temperature. controller in order to save resources,between the controller and displays add a decoding circuit 16 so that would have required the

10、 line of control into the circuit only 4 control lines,a great save system resources. the decoder by the decoder constitute both 3-8. 2.4 real-time clock chip this design uses the united states dallas company ds12c887a, the chip can automatically generate century,year,month,day,hour,minute,second,su

11、ch as time information. century the use of internal registers with the software will be able to resolve the millennium, the problem. the chip has its own internal battery-keng,external brown-out,the internal time information also be able to maintain for 10 years. time for a single day record of 12 h

12、ours and there is a 24-hour mode. time table ways that also has two kinds of binary numbers,and the other with bcd code express. the chip with 128 bytes of internal ram,one of 11 bytes used to store time information,4 bytes of memory chips used to control information,known as the control register,11

13、3-byte general-purpose ram for users to store temporary information. in addition,users can also program the chip to control a variety of square-wave output,and its internal three-way through the software interrupt shielding. 2.5 buttons and temperature measurements and circuit the system in order to

14、 make the circuit more easy,button circuit design only three keys, which are set,+,-, three keys to adjust the calendar and clock. the system in order to improve the practicality of the circuit,an increase of a temperature display. the system temperature measurement circuit using dallass ds1280. the

15、 device because of its low price,easy circuits,measurement precision,etc. 2.6 audio signal generator and driver circuit the circuits function is to receive control circuit to send to the entire point of time and timing signal,according to system settings produce different frequencies of audio signal

16、s,amplification by the drive circuit to drive speakers to voice their opinions in order to realize the whole point timekeeping and alarm functions. 3 system software design procedures of the system by the main program interrupt service function and pose a number of functions. main function and inter

17、rupt the completion of the initialization function. timer interrupt function main timing clock chip to complete scanning and keypad scanning. clock chip main function is to read and write time,read out the calendar information and to amend the specific value of the internal write clock chip. the mai

18、n source code is as follows: 中文譯文:基于實時鐘芯片的電子萬年歷的設(shè)計摘要:電子萬年歷以at89s52單片機(jī)為控制核心,采用dallas公司的ds12c887a實時鐘芯片構(gòu)成計時電路,實現(xiàn)了時間和日期的顯示,還增加了溫度顯示和整點報時的功能。文章對該系統(tǒng)的硬件電路、工作原理做了詳細(xì)介紹,同時給出了軟件設(shè)計的流程圖及主要程序源代碼。關(guān)鍵詞:單片機(jī),實時鐘.溫度測量1引言電子萬年歷在家庭居室、學(xué)校、車站和廣場使用越來越廣泛,給人們的生活、學(xué)習(xí)、工作帶來極大的方便。針對以往的電子萬年歷斷電后需重新調(diào)整時間與日期,且計時誤差大的現(xiàn)象。本系統(tǒng)設(shè)計采用實時鐘芯片(ds12c8

19、87a)作為計時器件,該芯片內(nèi)部自帶晶體振蕩器,這樣就有效的保證了計時的精確性,并且內(nèi)部自帶鏗電池使得在斷電情況能繼續(xù)更新時間信息。本設(shè)計采用at89s52作為主控制器,為了提高電路的實用性加入溫度測量電路、報時和鬧鐘功能。2系統(tǒng)硬件的設(shè)計電路原理圖如圖所示:實時時鐘芯片音頻信號產(chǎn)生及驅(qū)動電路電源電路 單片機(jī)控制器at89s52數(shù)碼顯示管按鍵電路溫度測量電路 該系統(tǒng)的結(jié)構(gòu)框圖系統(tǒng)的工作原理是:主控制器每隔一段時間(小于一秒鐘)讀一次時鐘芯片的內(nèi)部寄存器的值,將讀出的日歷、時間信息實時的顯示在led數(shù)碼顯示器一上。同時,主控制器不斷的掃描按鍵電路和溫度測量電路,當(dāng)有鍵按下時,識別出按鍵的值并調(diào)整

20、相應(yīng)的時間或日歷的值再寫入時鐘芯片內(nèi)部。溫度數(shù)據(jù)由測量電路(ds1280)獲得的溫度值送入顯示電路顯示。2. 1電源電路為了減少電路成本,本系統(tǒng)電源電路由變壓器變壓、三端集成穩(wěn)壓(l7805電路產(chǎn)生5v,具有簡單、可靠、價格低廉等特點。2. 2主控制器主控制器采用atmel公司的最新系列單片機(jī)產(chǎn)品at89s52。該單片機(jī)除了擁有mcs-51系列單片機(jī)的所有優(yōu)點外,內(nèi)部還具有8kb的在系統(tǒng)可編程flash存儲器,低功耗的空閑和掉電模式,極大的降低了電路的功耗。另外,還具有一個看門狗電路,為電路的可靠工作提供了更大的保證。2. 3數(shù)碼管顯示電路顯示電路采用具有高亮度、使用壽命長、價格低廉等特點的l

21、ed數(shù)碼管。整個顯示電路由led數(shù)碼管和顯示驅(qū)動電路和譯碼電路構(gòu)成。由于本系統(tǒng)中顯示的內(nèi)容較多,共需要16個數(shù)碼管,分別用八位顯示年、月、日,四位顯示時間,二二位顯示星期,二位顯示溫度。為了節(jié)省控制器的資源,在控制器和顯示器之間加入一個譯碼電路使本來需要16根控制線的電路變成只需四根控制線,極大的節(jié)省了系統(tǒng)資源。該譯碼器由兩個3-8譯碼器構(gòu)成。2. 4實時鐘芯片本設(shè)計采用美國dallas公司的ds12c887a,該芯片能夠自動產(chǎn)生世紀(jì)、年、月、日、時、分、秒等時間信息。利用內(nèi)部的世紀(jì)寄存器,配合軟件就能解決千年,的問題。該芯片內(nèi)部自帶有鏗電池,外部掉電時,其內(nèi)部的時間信息還能夠保持10年之久。

22、對于一天內(nèi)的時間記錄有 12小時制和24小時制兩種模式。時間的表示方法也有兩種,一種用二進(jìn)制數(shù)表示,另一種用bcd碼表示。該芯片內(nèi)部帶有128字節(jié)的ram,其中11字節(jié)用來存儲時間信息,4字節(jié)用來存儲芯片的控制信息,稱為控制寄存器,113字節(jié)通用ram可供用戶存儲臨時信息。此外,用戶還可以對芯片進(jìn)行編程控制輸出各種方波,并可對其內(nèi)部的三路中斷通過軟件進(jìn)行屏蔽。2. 5按鍵與溫度測且電路本系統(tǒng)為了使電路更簡單,按鍵電路只設(shè)計了三個按鍵,分別是設(shè)置、+、-,三個鍵用來調(diào)整日歷以及時鐘。本系統(tǒng)為了提高電路的實用性,增加了一個溫度顯示功能。該系統(tǒng)的溫度測量電路采用dallas公司的ds1280。該器件

23、由于其具有價格低廉、電路簡單、測量精確等優(yōu)點。2. 6音頻信號產(chǎn)生及驅(qū)動電路本電路的功能是接收控制電路發(fā)送來的整點報時及定時信號,根據(jù)系統(tǒng)設(shè)定產(chǎn)生不同頻率的音頻信號,由驅(qū)動電路加以放大驅(qū)動揚(yáng)聲器發(fā)出聲音,從而實現(xiàn)整點報時及鬧鐘的功能。 3系統(tǒng)的軟件設(shè)計本系統(tǒng)程序由主程序、中斷服務(wù)函數(shù)和多個子函數(shù)構(gòu)成。主函數(shù)主要完成各子函數(shù)和中斷函數(shù)的初始化。定時中斷函數(shù)主要完成時鐘芯片的定時掃描及鍵盤掃描。時鐘芯片的讀寫函數(shù)主要是將時間、日歷信息讀出來,并把要修改的具體值寫入時鐘芯片內(nèi)部。主要源程序代碼如下:tgkqcwa3ptgz7r4i30ka1dkaghn3xtkknbycudxqa7fhyi2chhi92tgkqcwa3ptgshls50clmtwn60eo8wgqv7xav2ohum32wgeauwydiawgmer4i30ka1dkaghn3xtkknbycudxqa7fhyi2chhi92tgkqcwa3ptgz7r4i30ka1dkagtgkqcwa3ptgz7r4i30ka1dkaghn3xtkknbycudxqa7fhyi2chhi92tgkqcwa3ptgshls50clmtwn60eo8wgqv

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

評論

0/150

提交評論