歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux編程 >> Linux編程 >> S3C6410硬件RTC(實時時鐘)

S3C6410硬件RTC(實時時鐘)

日期:2017/3/1 10:22:37   编辑:Linux編程
1、OVERVIEW綜述
The Real Time Clock (RTC) unit can be operated by the backup battery when the system power is off. The data
include the time by second, minute, hour, date, day, month, and year. The RTC unit works with an external 32.768

KHz crystal and can perform the alarm function.

當系統電源關閉時,通過備用電源可以運行實時時鐘(RTC)單元。數據包含的時間,即秒,分鐘,小時,日期,日,月和年。RTC 工作由一個外部32.768kHz 的晶體驅動,並可以執行報警功能。

2、FEATURES特性

The Real Time Clock includes the following features:
• BCD number: second, minute, hour, date, day, month, and year. BCD編碼。
• Leap year generator 閏年發生器。
• Alarm function: alarm-interrupt or wake-up from power-off mode.報警功能:報警中斷或從斷電模式中喚醒。
• Tick counter function: tick-interrupt or wake-up from power-off mode.時鐘計數功能:時鐘節拍中斷或從斷電模式中喚醒。
• Year 2000 problem is removed.這個在下面說,千年蟲問題。
• Independent power pin (RTCVDD).
• Supports millisecond tick time interrupt for RTOS kernel time tick.可以用於實時操作系統的系統時鐘

3、REAL TIME CLOCK OPERATION DESCRIPTION實時時鐘的結構框圖

3.1、 LEAP YEAR GENERATOR閏年發生器

The leap year generator can determine the last date of each month out of 28, 29, 30, or 31, based on data from
BCDDAY, BCDMON, and BCDYEAR. This block considers leap year in deciding on the last date. An 8-bit counter
can only represent 2 BCD digits, therefore it cannot decide whether “00” year (the year with its last two digitszeros) is a leap year or not.To solve this problem,the RTC block in 6410 has hard-wired logic to support the leap year in 2000. Note 1900 is not leap year while2000 is leap year. Therefore, two digits of 00 in 6410 denote 2000, not 1900.So, RTC in 6410 supports from 1901 to 2099.

閏年發生器通過BCDDAY, BCDMON 和BCDYEAR 的數據來決定每個月的最後一天是28,29,30 還是31。
這個模塊是通過決定最後的日期來判斷閏年的。一個8 位的計數器只能代表兩個BCD 數字,因此它不能決
定‘00’年(年的最後兩個數字為‘00’)是不是閏年. 舉例來說,它不能區分1900 年和2000 年。要解決這個問題,S3C6410 中的實時時鐘模塊,在2000 年中,硬連接邏輯支持閏年。注意1900 年不是閏年,
而2000 年是閏年。因此在S3C6410 中的‘00’的兩個數字表示2000 而不是1900。所以6410支持1901年到2099年。

Copyright © Linux教程網 All Rights Reserved