導航:首頁 > 編程語言 > 萬年歷主程序流程圖

萬年歷主程序流程圖

發布時間:2025-06-02 21:45:35

Ⅰ 急求一片基於單片機的電子鍾 或者萬年歷的英文文獻5000字左右的!!!! 急求!!

Design of the digital Perpetual Calendar based on
real-time clock chip
Abstract:This Electronic calendar uses the AT89S52 microcontroller as the core for the control. Time Circuit which is constituted by Dallas's DS1302 real-time clock chip achieved a time and date display, it increased functionality 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 measurement
1 Introction
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 after power-off time and date,and time is a big error. Designed the system using real-time clock chip (DS1302) as a 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 practicality of the circuit add temperature measurement circuit,timekeeping and alarm functions.
2 System hardware design
Schematic circuit shown in Figure 2:

System architecture diagram
2.1 Power Supply Circuit
In order to rece 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 ATMEL's latest MCU Procts 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 recing the power circuit . In addition,also has a watchdog circuit,a reliable 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 system 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 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 DS1302, the chip can automatically generate century,year,month,day,hour,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,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
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,113-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 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 Dallas's DS18B20. The device because of its low price,easy circuits,measurement precision,etc..
2.6 audio signal generator and driver circuit
The circuit's function is to receive control circuit to send to the entire point of time and timing signal,according to system settings proce different frequencies of audio signals,amplification by the drive circuit to drive speakers to voice their opinions in order to realize the whole point timekeeping and alarm functions.

中文譯文:
基於實時鍾晶元的電子萬年歷的設計
摘要:電子萬年歷以AT89S52單片機為控制核心,採用Dallas公司的DS1302實時鍾晶元構成計時電路,實現了時間和日期的顯示,還增加了溫度顯示和整點報時的功能。文章對該系統的硬體電路、工作原理做了詳細介紹,同時給出了軟體設計的流程圖及主要程序代碼
關鍵詞:單片機,實時鍾.溫度測量
1引言
電子萬年歷在家庭居室、學校、車站和廣場使用越來越廣泛,給人們的生活、學習、工作帶來極大的方便。針對以往的電子萬年歷斷電後需重新調整時間與日期,且計時誤差大的現象。本系統設計採用實時鍾晶元(DS1302)作為計時器件,該晶元內部自帶晶體振盪器,這樣就有效的保證了計時的精確性,並且內部自帶鏗電池使得在斷電情況能繼續更新時間信息。本設計採用AT89S52作為主控制器,為了提高電路的實用性加入溫度測量電路、報時和鬧鍾功能。
2系統硬體的設計
電路原理圖如圖所示:

該系統的結構框圖
系統的工作原理是:主控制器每隔一段時間(小於一秒鍾)讀一次時鍾晶元的內部寄存器的值,將讀出的日歷、時間信息實時的顯示在LED數碼顯示器一上。同時,主控制器不斷的掃描按鍵電路和溫度測量電路,當有鍵按下時,識別出按鍵的值並調整相應的時間或日歷的值再寫入時鍾晶元內部。溫度數據由測量電路(DS18B20)獲得的溫度值送入顯示電路顯示。
2. 1電源電路
為了減少電路成本,本系統電源電路由變壓器變壓、三端集成穩壓(L7805>電路產生5V,具有簡單、可靠、價格低廉等特點。
2. 2主控制器
主控制器採用ATMEL公司的最新系列單片機產品AT89S52。該單片機除了擁有MCS-51系列單片機的所有優點外,內部還具有8KB的在系統可編程FLASH存儲器,低功耗的空閑和掉電模式,極大的降低了電路的功耗。另外,還具有一個看門狗電路,為電路的可靠工作提供了更大的保證。
2. 3數碼管顯示電路
顯示電路採用具有高亮度、使用壽命長、價格低廉等特點的LED數碼管。整個顯示電路由LED數碼管和顯示驅動電路和解碼電路構成。由於本系統中顯示的內容較多,共需要16個數碼管,分別用八位顯示年、月、日,四位顯示時間,二二位顯示星期,二位顯示溫度。為了節省控制器的資源,在控制器和顯示器之間加入一個解碼電路使本來需要16根控制線的電路變成只需四根控制線,極大的節省了系統資源。該解碼器由兩個3-8解碼器構成。
2. 4實時鍾晶元
本設計採用美國Dallas公司的DS12C887A,該晶元能夠自動產生世紀、年、月、日、時、分、秒等時間信息。利用內部的世紀寄存器,配合軟體就能解決』千年』,的問題。該晶元內部自帶有鏗電池,外部掉電時,其內部的時間信息還能夠保持10年之久。對於一天內的時間記錄有 12小時制和24小時制兩種模式。時間的表示方法也有兩種,一種用二進制數表示,另一種用BCD碼表示。該晶元內部帶有128位元組的RAM,其中11位元組用來存儲時間信息,4位元組用來存儲晶元的控制信息,稱為控制寄存器,113位元組通用RAM可供用戶存儲臨時信息。此外,用戶還可以對晶元進行編程式控制制輸出各種方波,並可對其內部的三路中斷通過軟體進行屏蔽。
2. 5按鍵與溫度測且電路
本系統為了使電路更簡單,按鍵電路只設計了三個按鍵,分別是』設置』、』+』、』-』,三個鍵用來調整日歷以及時鍾。本系統為了提高電路的實用性,增加了一個溫度顯示功能。該系統的溫度測量電路採用Dallas公司的DS1280。該器件由於其具有價格低廉、電路簡單、測量精確等優點。
2. 6音頻信號產生及驅動電路
本電路的功能是接收控制電路發送來的整點報時及定時信號,根據系統設定產生不同頻率的音頻信號,由驅動電路加以放大驅動揚聲器發出聲音,從而實現整點報時及鬧鍾的功能。

希望可以幫到你!!!

閱讀全文

與萬年歷主程序流程圖相關的資料

熱點內容
中國資料庫發展研討會 瀏覽:415
win7去掉登錄密碼 瀏覽:38
imacappleid 瀏覽:560
網易郵箱怎麼發文件手機app 瀏覽:325
如何快速升級考拉 瀏覽:745
編程加入高考需要什麼條件 瀏覽:602
小米手機怎麼同步舊手機app的數據 瀏覽:253
cad版本不同會顯示外來文件嗎 瀏覽:538
卸載ps提示有正在使用的文件 瀏覽:165
忘記路由器wifi密碼 瀏覽:390
5s升級103 瀏覽:140
博圖v13上載程序 瀏覽:142
有什麼夜晚網站 瀏覽:115
win10環境配置在哪個文件夾 瀏覽:949
文件王測試視頻 瀏覽:874
易語言圖片框顯示文件夾的相片 瀏覽:211
如何通過數據網路發簡訊 瀏覽:423
電腦導入u盤文件在哪裡 瀏覽:334
手機文件應用包去哪裡找 瀏覽:350
為什麼統計數據尺碼不出來 瀏覽:36

友情鏈接