版權說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權,請進行舉報或認領
文檔簡介
1、<p> Design of the digital Perpetual Calendar based on</p><p> real-time clock chip</p><p> Abstract:This Electronic calendar uses the AT89S52 microcontroller as the core for the control
2、. Time Circuit which is constituted by Dallas's DS12C887A real-time clock chip achieved a time and date display, it increased functionality for the temperature display and the whole point timekeeping. This paper dis
3、cusses 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; Temperatu</p><p> 1 Intro
4、duction </p><p> E-calendar-bedroom at home,schools,stations and more and more extensive use of plaza for people's lives,study,work great convenience. Electronics calendar for the past need to re-adjust
5、 after power-off time and date,and time is a big error. Designed the system using real-time clock chip (DS12C887A) as a timer parts,the chip comes with an internal crystal oscillator,so that effectively guarantee the acc
6、uracy of the time and hang own internal battery power makes the situation will continue to upda</p><p> 2 System hardware design </p><p> Schematic circuit shown in Figure 2:</p><p&
7、gt; System architecture diagram</p><p> 2.1 Power Supply Circuit </p><p> In order to reduce circuit costs,the system power supply circuit by the transformer transformer,three-terminal integr
8、ated regulator (L7805> circuit 5V, has a simple,reliable, inexpensive and so on. </p><p> 2.2 Host Controller </p><p> Host controller using ATMEL's latest MCU Products AT89S52. Apart f
9、rom 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 circ
10、uit . In addition,also has a watchdog circuit,a reliable job for the circuit provides greater assurance. </p><p> 2.3 digital tube display circuit </p><p> Show circuit with a high brightness,
11、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 system to display the contents of more,a tot
12、al 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 circu
13、it 16 so that would have</p><p> 2.4 Real-time clock chip </p><p> This design uses the United States Dallas company DS12C887A, the chip can automatically generate century,year,month,day,hour,
14、minute,second,such 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
15、,the internal time information also be able to maintain for 10 years. Time for a single day record of 12 hours and there is a 24-hour mode. Time Table </p><p> Ways that also has two kinds of binary numbers
16、,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,113-byte gene
17、ral-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. </p
18、><p> 2.5 Buttons and temperature measurements and circuit </p><p> The system in order to make the circuit more easy,button circuit design only three keys, which are 'set','+',
19、39;-', 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 Dallas's D
20、S1280. The device because of its low price,easy circuits,measurement precision,etc.. </p><p> 2.6 audio signal generator and driver circuit </p><p> The circuit's function is to receive co
21、ntrol circuit to send to the entire point of time and timing signal,according to system settings produce different frequencies of audio signals,amplification by the drive circuit to drive speakers to voice their opinions
22、 in order to realize the whole point timekeeping and alarm functions. </p><p> 3 system software design </p><p> Procedures of the system by the main program interrupt service f
23、unction and pose a number of Functions. Main function and interrupt the completion of the initialization function. Timer interrupt function main timing clock chip to complete scanning and keypad scanning. Clock chip main
24、 function is to read and write time,read out the calendar information and to amend the specific value of the internal write clock chip. </p><p> The main source code is as follows: </p><p><
25、b> 中文譯文:</b></p><p> 基于實時鐘芯片的電子萬年歷的設計</p><p> 摘要:電子萬年歷以AT89S52單片機為控制核心,采用Dallas公司的DS12C887A實時鐘芯片構成計時電路,實現(xiàn)了時間和日期的顯示,還增加了溫度顯示和整點報時的功能。文章對該系統(tǒng)的硬件電路、工作原理做了詳細介紹,同時給出了軟件設計的流程圖及主要程序源代碼。</
26、p><p> 關鍵詞:單片機,實時鐘.溫度測量</p><p><b> 1引言</b></p><p> 電子萬年歷在家庭居室、學校、車站和廣場使用越來越廣泛,給人們的生活、學習、工作帶來極大的方便。針對以往的電子萬年歷斷電后需重新調(diào)整時間與日期,且計時誤差大的現(xiàn)象。本系統(tǒng)設計采用實時鐘芯片(DS12C887A)作為計時器件,該芯片內(nèi)部自帶
27、晶體振蕩器,這樣就有效的保證了計時的精確性,并且內(nèi)部自帶鏗電池使得在斷電情況能繼續(xù)更新時間信息。本設計采用AT89S52作為主控制器,為了提高電路的實用性加入溫度測量電路、報時和鬧鐘功能。</p><p><b> 2系統(tǒng)硬件的設計</b></p><p> 電路原理圖如圖所示:</p><p><b> 該系統(tǒng)的結構框圖<
28、;/b></p><p> 系統(tǒng)的工作原理是:主控制器每隔一段時間(小于一秒鐘)讀一次時鐘芯片的內(nèi)部寄存器的值,將讀出的日歷、時間信息實時的顯示在LED數(shù)碼顯示器一上。同時,主控制器不斷的掃描按鍵電路和溫度測量電路,當有鍵按下時,識別出按鍵的值并調(diào)整相應的時間或日歷的值再寫入時鐘芯片內(nèi)部。溫度數(shù)據(jù)由測量電路(DS1280)獲得的溫度值送入顯示電路顯示。</p><p><b&
29、gt; 2. 1電源電路</b></p><p> 為了減少電路成本,本系統(tǒng)電源電路由變壓器變壓、三端集成穩(wěn)壓(L7805>電路產(chǎn)生5V,具有簡單、可靠、價格低廉等特點。</p><p><b> 2. 2主控制器</b></p><p> 主控制器采用ATMEL公司的最新系列單片機產(chǎn)品AT89S52。該單片機除了擁有
30、MCS-51系列單片機的所有優(yōu)點外,內(nèi)部還具有8KB的在系統(tǒng)可編程FLASH存儲器,低功耗的空閑和掉電模式,極大的降低了電路的功耗。另外,還具有一個看門狗電路,為電路的可靠工作提供了更大的保證。</p><p> 2. 3數(shù)碼管顯示電路</p><p> 顯示電路采用具有高亮度、使用壽命長、價格低廉等特點的LED數(shù)碼管。整個顯示電路由LED數(shù)碼管和顯示驅動電路和譯碼電路構成。由于本系統(tǒng)
31、中顯示的內(nèi)容較多,共需要16個數(shù)碼管,分別用八位顯示年、月、日,四位顯示時間,二二位顯示星期,二位顯示溫度。為了節(jié)省控制器的資源,在控制器和顯示器之間加入一個譯碼電路使本來需要16根控制線的電路變成只需四根控制線,極大的節(jié)省了系統(tǒng)資源。該譯碼器由兩個3-8譯碼器構成。</p><p><b> 2. 4實時鐘芯片</b></p><p> 本設計采用美國Dalla
32、s公司的DS12C887A,該芯片能夠自動產(chǎn)生世紀、年、月、日、時、分、秒等時間信息。利用內(nèi)部的世紀寄存器,配合軟件就能解決’千年’,的問題。該芯片內(nèi)部自帶有鏗電池,外部掉電時,其內(nèi)部的時間信息還能夠保持10年之久。對于一天內(nèi)的時間記錄有 12小時制和24小時制兩種模式。時間的表示方法也有兩種,一種用二進制數(shù)表示,另一種用BCD碼表示。該芯片內(nèi)部帶有128字節(jié)的RAM,其中11字節(jié)用來存儲時間信息,4字節(jié)用來存儲芯片的控制信息,稱為控制
33、寄存器,113字節(jié)通用RAM可供用戶存儲臨時信息。此外,用戶還可以對芯片進行編程控制輸出各種方波,并可對其內(nèi)部的三路中斷通過軟件進行屏蔽。</p><p> 2. 5按鍵與溫度測且電路</p><p> 本系統(tǒng)為了使電路更簡單,按鍵電路只設計了三個按鍵,分別是’設置’、’+’、’-’,三個鍵用來調(diào)整日歷以及時鐘。本系統(tǒng)為了提高電路的實用性,增加了一個溫度顯示功能。該系統(tǒng)的溫度測量電路采
34、用Dallas公司的DS1280。該器件由于其具有價格低廉、電路簡單、測量精確等優(yōu)點。</p><p> 2. 6音頻信號產(chǎn)生及驅動電路</p><p> 本電路的功能是接收控制電路發(fā)送來的整點報時及定時信號,根據(jù)系統(tǒng)設定產(chǎn)生不同頻率的音頻信號,由驅動電路加以放大驅動揚聲器發(fā)出聲音,從而實現(xiàn)整點報時及鬧鐘的功能。 </p><p><b> 3系統(tǒng)的
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
- 4. 未經(jīng)權益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 眾賞文庫僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責。
- 6. 下載文件中如有侵權或不適當內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
評論
0/150
提交評論