TW575801B - Method for calibrating real time clock - Google Patents

Method for calibrating real time clock Download PDF

Info

Publication number
TW575801B
TW575801B TW91123484A TW91123484A TW575801B TW 575801 B TW575801 B TW 575801B TW 91123484 A TW91123484 A TW 91123484A TW 91123484 A TW91123484 A TW 91123484A TW 575801 B TW575801 B TW 575801B
Authority
TW
Taiwan
Prior art keywords
time
real
error
time clock
clock
Prior art date
Application number
TW91123484A
Other languages
Chinese (zh)
Inventor
Wei Zuo
Tai-Shui Ho
Shih-Kuang Tsai
Original Assignee
Inventec Appliances Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Inventec Appliances Corp filed Critical Inventec Appliances Corp
Priority to TW91123484A priority Critical patent/TW575801B/en
Application granted granted Critical
Publication of TW575801B publication Critical patent/TW575801B/en

Links

Landscapes

  • Electric Clocks (AREA)

Description

575801 五、發明說明(l) 關於一種即時時鐘(Real Tirae Ciock, 名士果,^進:·,特別是有關於利用頻率計數器所測量之 末抆準振盪器產生之即時時鐘的方法。 (Crys:=子统中之即時時鐘’大多係以晶體振盪器 I而,由〇r)配合R-c電路為主要之構成元件。 鐘也會受到連帶影響,而失去其準確性在=中:二1 i ^ !11 ^ ^cserver system) ^ ^ ^ ^ t 要廣播(br0adcast)日期資訊的時間給用戶 或巧於電腦系統而言,所執行之應 曰期資訊之精確時間,若是苴系 才式』此而要 動Γ統之整體效能將會大打; ::無法動作。因此,實在有必要針對即時 = 有效之杈準方法,以確保即時時鐘之精準度。 有鏗於此’本發明的主要目 (Rea"— ClQck,RTC)之 ;^1出:種即時時鐘 所量測的振盈器之振盪頻率來校準振頻率計數器 鐘,以確保即時時鐘之精準度技丰振盛’產生之即時時 法,種校準即時時鐘之* :=:接著,根據量測頻率計算對應:之里—振誤盪/之-量 將决差時間存到-非揮性記憶體内 =差¥間。再 間從非揮性記憶體内取出誤差時間並利用誤 第4頁 參 0685-8802TWF(n); ELLEN.ptd 575801575801 V. Description of the invention (l) Regarding a real-time clock (Real Tirae Ciock, Baishiguo, Jinjin: ·, in particular, there is a method for using a real-time clock generated by a quasi-oscillator measured by a frequency counter.) Most of the real-time clocks in the sub-system are based on the crystal oscillator I, which is mainly composed of 0r) and Rc circuits. The clock will also be affected by it and lose its accuracy. In the middle: 2 1 ^ ! 11 ^ ^ cserver system) ^ ^ ^ ^ t To broadcast (br0adcast) the time of the date information to the user or coincidentally with the computer system, the precise time of the scheduled information should be executed, if it is not a talented person. The overall effectiveness of the Γ system will be greatly affected; :: Cannot act. Therefore, it is necessary to target the real-time = effective method to ensure the accuracy of the real-time clock. For this reason, the main purpose of the present invention (Rea "-ClQck, RTC) is ^ 1: a kind of oscillator frequency measured by a real-time clock to calibrate the oscillation frequency counter clock to ensure the accuracy of the real-time clock The real-time method of the generation of "Dongji Fengzhensheng", a kind of calibrated real-time clock *: =: Then, calculate the corresponding according to the measurement frequency: 里-oscillates / /-the amount of time is stored in the non-volatile In-memory = difference ¥ between. Then take out the error time from the non-volatile memory and use the error page 4 See 0685-8802TWF (n); ELLEN.ptd 575801

時時鐘。 為了讓本發明之上 明顯易懂,下文特舉一 詳細說明如下: 實施例 述和其他目 較佳實施例 的、特徵、和優點能更 ’並配合所附圖示,作 第1圖係表示本發明的 施例之流程圖。本發明用以又於卩日、、時鐘之方法的第一貪 (Real Time Ci〇ck,RTC),^弈振盪器產生之即時時鐘 盪器之量測頻率步驟Sl01 ;利】;率量振 欲產生沒有誤差之即時時鐘時妾者,,计异該振盪器 Fnonnal以及一天的總秒數Ts d (步驟^的正常振盪頻率 32.768 kHz的振盪器來產時驟),-般:振盪頻率 ^【…^,而一天二二^所以正常振盈頻率 # X 、县此古。 的總秒數為86400秒。再根攄 該正常振盪頻率Fn_al、一天的婢 u胃 F_ure計算對應之誤差時間T (步,驟㈣以及量測頻率 $塞H士 盔—工曰士』士以步驟Sl〇3),在此實施例中 决差日守間Te為母一天即日才時鐘誤差的秒數,其中Hour clock. In order to make the present invention obvious and easy to understand, a detailed description is given below as follows: The description of the embodiments and other preferred embodiments of the present invention can be further characterized, and the features, and advantages can be further improved. A flowchart of an embodiment of the present invention. The present invention uses the real time clock (RTC) method of the next day, clock method to measure the frequency of the real-time clock oscillator generated by the game oscillator, step S01; To generate a real-time clock without error, consider the oscillator Fnonnal and the total number of seconds Ts d in a day (the normal oscillation frequency of step ^ is 32.768 kHz to produce the time),-General: Oscillation frequency ^ [… ^, And one day two two ^ so the normal vibration surplus frequency # X, the county is ancient. The total number of seconds is 86400 seconds. Then, based on the normal oscillation frequency Fn_al and the stomach stomach F_ure for one day, calculate the corresponding error time T (step, step, and measurement frequency $ plug H, helmet-worker), and take step S103. Here, In the embodiment, the difference between the day and the day Te is the number of seconds of the clock error between the mother and the day, where

Te = U-Fmeasure/F_al) X Ts_day。接著,將時 記憶體内(步驟S1 04)。最後,备陪 左才门L仔勾陝閃 出誤差時間並利用誤差時間校;Te = U-Fmeasure / F_al) X Ts_day. Next, the time is stored in the body (step S104). In the end, prepare to accompany Zuo Caimen L Tsai and Shaanxi to show the error time and use the error time to correct it;

仅+即時時鐘(步驟S1 05),裹 例而言,當測量振盪器之量測頻率F A 時,誤差時間Te為5· 2734375秒,即二· 2 5.2734375秒’但因為數位電路處:表味二母一天將快 及處理具有過高精確度的數字,所以時二限/:,無法儲# (5. 2734375)儲入快閃記憶體内,所以、叮法/也接將此值 Π 所以可在快閃記憶體内 575801 五、發明說明(3) 設定於每天減掉5秒,以改善每曰 3日多減一秒即減掉6秒,以校準 块差,並於母隔 述精確度不足的問題。 、t、’里並微調以解決上 要注意的是,在本發明 例儲存誤差時間,但本發明亦可用i ^快閃記憶體為 誤差時間。 匕非揮性記憶體儲存 第2圖係表示本發明的校準即 施例之流程圖。本發明用以校之^法的第一只 ίΏ Ί τ - ρι 仅+振盧益產生之即時時鐘 (Real Time Clock,RTC),首先,刹田相方 L ▲ 盪之量測楣產F 利用頻率計數器測量振 " 、羊measure ( ν驟以01)。接著,計算該赛湯哭 欲產生沒有誤差之即時時鐘時ϋ二,羞盗 P ^ 〇 ^ ^ _ 士 丁尸吓而要的正常振盪頻率 nonnai並且叹疋預没時間的秒數Ts (步驟S2 一 頻率32.768山的«器來產生即時時鐘,所以 頻率Fn则al為32. 76 8 kHz 〇再根據該正常振盪頻率卩又 =^間的秒以及量測頻率F—計算對應之誤^時 二\步,2〇3),在此實施例中誤差時❿為在預設時^ 内即日守日守鐘誤差的秒數,其中T = ( 1Only + real-time clock (step S1 05). For example, when measuring the measuring frequency FA of the oscillator, the error time Te is 5 · 2734375 seconds, which is 2.2 · 5.2734375 seconds'. But because the digital circuit is: The second mother will quickly process numbers with high accuracy in one day, so the time limit / :, cannot store # (5. 2734375) stored in flash memory, so, Ding method / also connect this value Π so It can be stored in flash memory 575801. 5. Description of the invention (3) Set to reduce 5 seconds every day to improve that by subtracting one second every 3 days, or 6 seconds, to calibrate the block difference, and accurately describe the difference in the mother. The problem of insufficient degree. , T, and ′ are fine-tuned to solve the problem. It should be noted that the error time is stored in the example of the present invention, but the present invention can also use the flash memory as the error time. Nonvolatile Memory Storage FIG. 2 is a flowchart showing a calibration example of the present invention. The first Ώ Ί τ-ρ only + Real Time Clock (RTC) generated by Zhenlu Yi in the method of the present invention. First of all, measure the production frequency of the production phase F ▲ The counter measures vibration, and the sheep measure (v step to 01). Next, calculate the time when the Sai Tang cries to produce an instant clock without error, the normal oscillating frequency nonnai that the shy corpse P ^ 〇 ^ ^ _ is scared and the number of seconds Ts sighed (step S2 A frequency of 32.768 is used to generate a real-time clock, so the frequency Fn is 32. 76 8 kHz. 〇 Then according to the normal oscillation frequency 卩 = seconds between ^ and the measurement frequency F-calculate the corresponding error ^ Hour 2 \ Step, 2〇3), in this embodiment, the error time ❿ is the number of seconds of the day-to-day clock error within the preset time ^, where T = (1

Ts—day。接者,將誤差時間Te存到快閃記憶體内(步驟 S204)。最後,每隔該預設時間從快閃記憶體内取出誤差 ,間並利用誤差時間校準即時時鐘(步驟S2〇5),舉例而 吕,當測量振盪器之量測頻率Fme_re為32· 77〇 kHz時,若 預設時間為四天,誤差時間Te則為21〇9375秒,即表示每 四天將快2 1 · 0 9 3 7 5秒,但因為數位電路處理時的限制,無 法儲存及處理具有過高精確度的數字,所以無法直接將&Ts_day. Then, the error time Te is stored in the flash memory (step S204). Finally, the error is taken out of the flash memory at the preset time, and the real-time clock is calibrated with the error time (step S205). For example, when the measurement frequency Fme_re of the measurement oscillator is 32.77. At kHz, if the preset time is four days, the error time Te is 21019375 seconds, which means that it will be 2 1 · 0 9 3 7 5 seconds every four days, but due to the limitation of digital circuit processing, it cannot be stored and Handling numbers with too high a precision, so you cannot directly &

〇685.8802TWF(n); ELLEN.ptd 第6頁 五、發明說明(4) 值(21. 09375)儲入快閃記憶體内 設…四天減掉21秒,以改善每四天記憶體内 以解決上,精確度不足的問題。 旱即時時鐘並微調 要注意的是,在本發明之實施例 例儲存誤差時間,但本發明亦 二:閃記憶體為 誤差時間。 八匕非揮性記憶體儲存 根本以上所述,本發明所揭露之 Clock, , 盪為之振盈頻率來校準振盪器產生之即時里遠 到本發明確保即時時鐘之精準度的目的。、,α b 了達 雖然本發明已以較佳實施例揭露如上,鈇Α f 和範圍内,當可作: = ’在不脫離本發明之精神 範圍當視後附之申2之更動與潤飾’因此本發明之保護 田錢之甲4專利範圍所界定者為準。 0685-8802TWF(η); ELLEN.ptd 第7頁 575801 圖式簡單說明 第1圖係表示本發明的校準即時時鐘之方法的第一實 施例之流程圖。 第2圖係表示本發明的校準即時時鐘之方法的第二實 施例之流程圖。 0685-8802TWF(n); ELLEN.ptd 第8頁 1111«〇685.8802TWF (n); ELLEN.ptd Page 6 V. Description of the invention (4) The value (21. 09375) is stored in the flash memory device ... 21 seconds are subtracted in four days to improve the memory in every four days To solve the problem of insufficient accuracy. It is important to note that the error time is stored in the embodiment of the present invention, but the present invention also has two: the flash memory is the error time. Eight dagger non-volatile memory storage Basically, the clock, disclosed in the present invention, oscillates to a frequency that oscillates to oscillate the instantaneous distance generated by the oscillator to the purpose of the present invention to ensure the accuracy of the real-time clock. Although the present invention has been disclosed in a preferred embodiment as described above, within the range of ΔΑ f and the range, it can be done as follows: = 'Without departing from the spirit and scope of the present invention, the changes and decorations of the attached application 2 should be regarded as 'Therefore, the scope of the patent for protecting Tian Qian's A4 patent of the present invention shall prevail. 0685-8802TWF (η); ELLEN.ptd Page 7 575801 Brief Description of Drawings Figure 1 is a flowchart showing the first embodiment of the method for calibrating a real-time clock according to the present invention. Fig. 2 is a flowchart showing a second embodiment of the method for calibrating a real-time clock according to the present invention. 0685-8802TWF (n); ELLEN.ptd page 8 1111 «

Claims (1)

575801 六、申請專利範圍 1. 一種校準即時時鐘之方法,用以校準一振盪器產生 之即時時鐘,其包括下列步驟: 利用一頻率計數器測量該振盪器之一量測頻率; 根據該量測頻率計算對應之一誤差時間; 將該誤差時間存到一非揮性記憶體内;以及 每隔一固定時間從該非揮性記憶體内取出該誤差時間 並利用該誤差時間校準即時時鐘。 2. 如申請專利範圍第1項所述之校準即時時鐘之方 法,其中該誤差時間為在該固定時間内該即時時鐘誤差的 秒數。 3. 如申請專利範圍第2項所述之校準即時時鐘之方 法,其中根據該量測頻率計算對應之誤差時間的步驟更包 括下列子步驟: 計算該振盪器欲產生沒有誤差之即時時鐘時所需要的 一正常振盪頻率Fn_al並且設定該固定時間的秒數Ts ;以及 根據該正常振盪頻率Fn_al、該固定時間的秒數Ts以及該量 測頻率計算對應之誤差時間Te,其中Te = (1 - FmeasuFe / Fn_al ) X Ts, F_s㈣為該量測頻率。 4. 如申請專利範圍第1項所述之校準即時時鐘之方 法,其中該固定時間為一天,該誤差時間為每一天該即時 時鐘誤差的秒數。 5. 如申請專利範圍第4項所述之校準即時時鐘之方 法,其中根據該量測頻率計算對應之誤差時間的步驟更包 括下列子步驟:575801 6. Application scope 1. A method for calibrating a real-time clock for calibrating a real-time clock generated by an oscillator, which includes the following steps: using a frequency counter to measure a measurement frequency of the oscillator; according to the measurement frequency Calculate a corresponding error time; store the error time in a non-volatile memory; and take out the error time from the non-volatile memory every fixed time and use the error time to calibrate the real-time clock. 2. The method for calibrating a real-time clock as described in item 1 of the scope of patent application, wherein the error time is the number of seconds of the real-time clock error within the fixed time. 3. The method for calibrating a real-time clock as described in item 2 of the scope of the patent application, wherein the step of calculating the corresponding error time according to the measurement frequency further includes the following sub-steps: Calculate the time when the oscillator wants to generate a real-time clock without error. A normal oscillation frequency Fn_al is required and the number of seconds Ts of the fixed time is set; and a corresponding error time Te is calculated according to the normal oscillation frequency Fn_al, the seconds Ts of the fixed time, and the measurement frequency, where Te = (1- FmeasuFe / Fn_al) X Ts, F_s㈣ is the measurement frequency. 4. The method for calibrating the real-time clock according to item 1 of the scope of patent application, wherein the fixed time is one day, and the error time is the number of seconds of the real-time clock error per day. 5. The method for calibrating a real-time clock as described in item 4 of the scope of patent application, wherein the step of calculating the corresponding error time based on the measurement frequency further includes the following sub-steps: 0685-8802TWF(n); ELLEN.ptd 第9頁 575801 六、申請專利範圍 計算該振盪器欲產生沒有誤差之即時時鐘時所需要的 一正常振盪頻率Fn_al以及一天的總秒數Ts day ;以及 根據該正常振盪頻率Fn_al、一天的總秒數Ts day以及該 量測頻率計算對應之誤差時間Te,其中Te = U-F_sure/Fn_al) X Ts_day, Fmeasure為該量測頻率。 6.如申請專利範圍第1項所述之校準即時時鐘之方 法,其中該非揮性記憶體為一快閃記憶體。 ❿0685-8802TWF (n); ELLEN.ptd Page 9 575801 6. The scope of the patent application calculates a normal oscillation frequency Fn_al and a total number of seconds Ts day required for the oscillator to generate an instant clock without errors; and according to The normal oscillation frequency Fn_al, the total number of seconds in a day Ts day, and the error time Te corresponding to the measurement frequency calculation, where Te = U-F_sure / Fn_al) X Ts_day, and Fmeasure is the measurement frequency. 6. The method for calibrating a real-time clock according to item 1 of the scope of patent application, wherein the non-volatile memory is a flash memory. ❿ 0685-8802TWF(n); ELLEN.ptd 第10頁0685-8802TWF (n); ELLEN.ptd page 10
TW91123484A 2002-10-11 2002-10-11 Method for calibrating real time clock TW575801B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW91123484A TW575801B (en) 2002-10-11 2002-10-11 Method for calibrating real time clock

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW91123484A TW575801B (en) 2002-10-11 2002-10-11 Method for calibrating real time clock

Publications (1)

Publication Number Publication Date
TW575801B true TW575801B (en) 2004-02-11

Family

ID=32734256

Family Applications (1)

Application Number Title Priority Date Filing Date
TW91123484A TW575801B (en) 2002-10-11 2002-10-11 Method for calibrating real time clock

Country Status (1)

Country Link
TW (1) TW575801B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104297716A (en) * 2014-09-29 2015-01-21 江阴长仪集团有限公司 Intelligent electric meter RTC calibrating method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104297716A (en) * 2014-09-29 2015-01-21 江阴长仪集团有限公司 Intelligent electric meter RTC calibrating method
CN104297716B (en) * 2014-09-29 2017-02-08 江阴长仪集团有限公司 Intelligent electric meter RTC calibrating method

Similar Documents

Publication Publication Date Title
US11012032B2 (en) Systems and methods for frequency compensation of real-time-clock systems
CN106569544B (en) Real-time timepiece chip and its clock correcting method, device
US5771180A (en) Real time clock and method for providing same
JP6282723B2 (en) High-precision timekeeping method for quartz electronic watches
CN107765760B (en) RTC module clock source dynamic calibration method and RTC module clock source dynamic calibration system in instrument sleep mode
TW201220016A (en) A calibration method and apparatus for clock signal and an electronic device
US20180324724A1 (en) Method And System For Precise Temperature And Timebase PPM Error Estimation Using Multiple Timebases
CN102163041B (en) Wide range temperature error compensating method of real-time clock and system thereof
TW200839483A (en) Real-time clock correction methods and apparatus
CN103901942A (en) Clock precision calibration method and device for terminal
JP3174910B2 (en) Frequency generation method and circuit
TW575801B (en) Method for calibrating real time clock
TWI378223B (en) Navigation apparatus and positioning method thereof
JP2021103415A (en) Real time clock device and electronic apparatus
TWM323062U (en) Correcting apparatus and clock device using the same
JP2013167597A (en) Real time clock
JP2008281514A (en) Device for measuring gas composition
TWI391630B (en) Satellite navigation system receiver and positioning method thereof
JP4711546B2 (en) Temperature correction method for real-time clock and processing device provided with real-time clock
CN112737574B (en) Timing calibration method and related device for clock source in chip
US8344817B2 (en) Compensating DFLL with error averaging
JPH06342088A (en) Timing method, semiconductor device and timer
JP2014137250A (en) Electronic weighing instrument with flow rate calculation function
CN112286039A (en) Clock calibration method and device and readable storage medium
JP2017020852A (en) Embedded device

Legal Events

Date Code Title Description
MM4A Annulment or lapse of patent due to non-payment of fees