CN100565424C - Bearing calibration and device - Google Patents

Bearing calibration and device Download PDF

Info

Publication number
CN100565424C
CN100565424C CN 200710078791 CN200710078791A CN100565424C CN 100565424 C CN100565424 C CN 100565424C CN 200710078791 CN200710078791 CN 200710078791 CN 200710078791 A CN200710078791 A CN 200710078791A CN 100565424 C CN100565424 C CN 100565424C
Authority
CN
China
Prior art keywords
time
value
index value
correcting
clock
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
CN 200710078791
Other languages
Chinese (zh)
Other versions
CN101075146A (en
Inventor
赵子羽
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
MediaTek Inc
Original Assignee
MediaTek Inc
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 MediaTek Inc filed Critical MediaTek Inc
Publication of CN101075146A publication Critical patent/CN101075146A/en
Application granted granted Critical
Publication of CN100565424C publication Critical patent/CN100565424C/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention provides a kind of bearing calibration and device, be applicable to portable unit, this bearing calibration comprises the following steps: to provide a reference clock; At very first time point, write down a very first time value and one first index value; At one second time point, write down one second index value, wherein the very first time point and second time point are calculated according to this reference clock; Calculate first index value and second index value; According to result of calculation, set one second time value.

Description

Bearing calibration and device
Technical field
The invention relates to a kind of bearing calibration and device, particularly about a kind of bearing calibration and device in order to the time value of proofreading and correct real-time clock.
Background technology
Fig. 1 is the control device synoptic diagram of prior art real-time clock.As shown in the figure, control device 100 control real-time clocks (hereinafter to be referred as RTC) 180, control device 100 comprises crystal oscillator 110, second counter 120, minute counter 130, hour counter 140, daily counter 150, year counter 160 and processor 170.For example, suppose that the frequency that crystal oscillator 110 is provided is 32768Hz.
Second counter 120 is according to frequency that crystal oscillator 110 produced and pulse count.Whenever the pulse number of accumulative total reaches at 32768 o'clock, the count value of second counter 120 adds 1.Second, the stored count of counter 120 reached at 60 o'clock, and then notification signal of second counter 120 outputs makes the count value of minute counter 130 add 1 to minute counter 130, and second counter 120 finishes present counting and begins a new counting.Whenever the stored count of minute counter 130 reaches at 60 o'clock, then minute counter 130 output notice signals are to hour counter 140, and minute counter 130 finishes present counting and begins a new counting.
Whenever the stored count of hour counter 140 reaches at 24 o'clock, then hour counter 140 output notice signals are to daily counter 150, and hour counter 140 finishes present counting and begins a new counting.When the stored count of daily counter 150 countings reached a preset value, then the output notice signal arrived a year counter 160, and daily counter 150 finishes present counting and begins a new counting.
When the stored count value when changing of second counter 120, minute counter 130, hour counter 140, daily counter 150 or year counter 160, then Dui Ying counter makes the time of its renewal RTC180 with notification processor 170.
Therefore, the correctness of RTC180 is determined by the oscillation frequency that crystal oscillator 110 is produced.Yet crystal oscillator 110 is subjected to the influence of following two factors easily, and produces incorrect oscillation frequency.First influence factor is a temperature.Second influence factor is frequency shift (FS).
When variation of ambient temperature, the oscillation frequency that crystal oscillator produced can change thereupon.In addition, because the influence of technology, make the oscillation frequency that crystal oscillator produced have ± skew of 20ppm.If crystal oscillator 110 produces incorrect oscillation frequency, will cause RTC180 to produce the wrong time.
For addressing the above problem, existing way is the stored count value of proofreading and correct second counter.As shown in Figure 2, control device 200 comprises a correction buffer device 290, in order to proofread and correct RTC 280.Processor 270 upgrades the stored count value of second counter 220 according to the stored value of correction buffer device 290.Though existing settling mode can make RTC 280 have the correct time, need the extra correction buffer device 290 that increases, be used to store correct count value.Thereby cause the increase of element cost and reducing of free space.
Summary of the invention
For solving above technical matters, the invention provides a kind of bearing calibration and means for correcting.
The invention provides a kind of bearing calibration, be applicable to a portable unit.This bearing calibration comprises the following steps: to provide a reference clock; At very first time point, write down a very first time value and one first index value; At one second time point, write down one second index value.The very first time point and second time point calculate according to reference clock.Calculate first index value and second index value; According to result of calculation, set one second time value; Wherein, this calculation procedure comprises: calculate the difference between this first index value and this second index value; According to this reference clock, with this difference convert to one correction time value; And should be worth the very first time and add that this value is to obtain this second time value correction time.
The present invention provides a kind of means for correcting in addition, is applicable to a portable unit.This portable unit has a real-time clock, and a very first time value can be provided.Means for correcting of the present invention comprises a counter and a processing module.One first index value and one second index value are counted and provided to counter according to a reference clock.Processing module is at very first time point, the record very first time value and first index value, at one second time point, write down second index value, calculate the difference between first index value and second index value then, according to this reference clock, with this difference convert to one correction time value, should be worth the very first time and add this value to obtain one second time value correction time, wherein the very first time point and second time point are to calculate according to reference clock.
Bearing calibration provided by the invention and means for correcting, by counter and index value and time value that processing module provided or write down are calculated, coming provides correct time value to real-time clock.Avoided producing the problem of the real-time clock output error time that incorrect oscillation frequency causes because of frequency generator.And need not increase extra impact damper, the cost that need not increase element just can be proofreaied and correct real-time clock.
Description of drawings
Fig. 1 is the control device synoptic diagram of an existing real-time clock.
Fig. 2 is the control device synoptic diagram of another existing real-time clock.
Fig. 3 is the synoptic diagram of the means for correcting of one embodiment of the invention.
Fig. 4 is the calculating synoptic diagram of processing module of the present invention.
Fig. 5 is the process flow diagram that is applicable to the bearing calibration of a portable unit of the present invention.
Embodiment
For above and other objects of the present invention, feature and advantage can be become apparent, cited below particularlyly go out preferred embodiment, and cooperate appended graphicly, be described in detail below.
Fig. 3 is the synoptic diagram of the means for correcting of one embodiment of the invention.Means for correcting 300 is applicable in the portable unit (for example mobile phone).Means for correcting 300 comprises a counter 310 and a processing module 320.Counter 310 is by a reference clock F RefCount pulse make accumulated counts in the fixed cycle, and provide index value ID 1~ID 5Portable unit comprises real-time clock (hereinafter to be referred as RTC) 32, in order to time value TV to be provided 1~TV 3
At time point T1, processing module is worth TV 320 writing times 1And index value ID 1At time point T2, processing module 320 recording indexes value ID 2, computation index value ID then 1And ID 2, so that RTC 32 provides time value TV 2Time point T 1And T 2Be according to reference clock F RefCalculate.
Means for correcting 300 also comprises frequency generator 330 and 340.Frequency generator 330 can be a crystal oscillator, in order to produce reference clock F RefFrequency generator 340 is in order to produce a specific clock F SPCRTC 32 is according to specific clock F SPC, time value TV is provided 1And TV 3In the present embodiment, reference clock F RefFrequency be 13MHz, and specific clock F SPCFrequency be 32KHz.
Reference clock F RefSide-play amount less than ± 10ppm, the frequency offset of the system clock that is produced by base station 31 is less than ± 0.05ppm.Reference clock F RefFrequency equal the frequency of the system clock of base station 31.In certain embodiments, since the frequency offset of system clock less than reference clock F RefSide-play amount, the reference clock F that therefore can utilize the system clock of base station 31 to come emending frequency generator 330 to be produced Ref
As specific clock F SPCWhen making a mistake, then the time value that provided of RTC 32 also can be incorrect.Therefore, processing module 320 will be upgraded the time value that RTC 32 is provided in a preset period.
For example, suppose that the time value that RTC 32 is provided is 01:25 (1: 25), and the time value that processing module 320 was just upgraded real-time clock every a hour and provided once.After one hour, the time value that RTC 32 is provided should be 02:25.Yet, because incorrect specific clock F SPCInfluence, the time value that makes RTC 32 reality be provided is 02:20.Therefore, processing module 320 just is updated to 02:25 with the time value that RTC 32 is provided by 02:20.
In addition, means for correcting 300 also comprises check timer 350.Counter 310 starts according to check timer 350 and begins counting, and check timer 350 is according to reference clock F RefPick up counting.With the GSM communication system is example, every
Figure C20071007879100081
The stored count value of counter 310 just adds 1.
When time point T is arrived in check timer 350 timing 1, processing module is worth TV 320 writing times 1And index value ID 1When time point T is arrived in check timer 350 timing 2, processing module 320 recording indexes value ID 2, and then according to index value ID 1, ID 2, indication RTC 32 provide correct time value.
From time point T 1To time point T 2Time should be a fixed value, but owing to comprise that the system of means for correcting 300 is busy, and make that processing module 320 can't be at time point T 2Real time record index value ID 2Therefore, processing module 320 will will consider the time that postpones record.
Fig. 4 is the calculating synoptic diagram of processing module.Suppose that counter was counted 780000 times in 310 1 hours, and processing module 320 was just upgraded the time value of a real-time clock every one hour.
At first, at time point T 1The time, the time value TV that processing module 320 is recorded 1Be 6:6:35 (6: 6: 35), and index value ID 1Be 780000.Then, at time point T 2The time, the index value ID that processing module 320 is recorded 2Should be 1560000.Yet in fact,, and make the index value ID that processing module 320 is recorded because system is busy 2Be 1561326.
Then, processing module 320 computation index value ID 1And ID 2Between a difference DIFF 1Difference DIFF 1Can be expressed from the next:
DIFF 1=ID 2-ID 1=1561326-780000=781326........................(1)
Then, processing module 320 is with difference DIFF 1Convert to and be worth CTV a correction time 1Be worth CTV correction time 1Can be expressed from the next:
CTV 1 = 781326 × 120 26 ms = 3606.12 sec = 3600 sec + 6 sec + 0.12 sec . . . ( 2 )
At last, processing module is worth TV 320 computing times 1Be worth CTV correction time 1And, with setting-up time value TV 2Because 3606 seconds (sec) represented 1 hour 6 seconds again, so with time value TV 1Added 1 hour 6 seconds again, the time value TV that RTC 32 is provided 2Set 7:6:41 (7: 6: 41) for.
In certain embodiments, at time point T 1, processing module is worth TV 320 writing times 1And index value ID 1At time point T 2, processing module is worth TV 320 writing times 3And index value ID 2Then, processing module 320 computation index value ID 1And ID 2Between difference DIFF 2, and according to this difference DIFF 2Adjust time value TV 3, make real-time clock 310 that time value TV is provided 2
For example, at time point T 1, the time value TV that processing module 320 is recorded 1Be 6:6:35 (6: 6: 35), and index value ID 1Be 780000.Then, at time point T 2, the time value TV that processing module 320 is recorded 3Be 7:6:35 (7: 6: 35), and index value ID 2Be 1561326.
Processing module 320 computation index value ID 1And ID 2Between difference DIFF 2Difference DIFF 2Can be expressed from the next:
DIFF 2=ID 2-ID 1=1561326-780000=781326........................(3)
Then, processing module 320 is according to difference DIFF 2, try to achieve one and adjust time value ATV.Adjusting time value ATV can be expressed from the next:
ATV = ( 781326 - 780000 ) × 120 26 ms = 6 sec + 0.12 sec . . . ( 4 )
Then, processing module 320 is adjusted time value TV according to adjusting time value ATV 3In certain embodiments, time value TV 2Equal time value TV 3(7:6:35) add adjustment time value ATV (6 seconds).Therefore, can be in the hope of time value TV 2Be 7:6:41.
In addition, because counter 310 stops counting under a sleep pattern.When making counter 310 switch to normal mode by sleep pattern, can begin counting from correct index value, means for correcting 300 also comprises a sleep module 360.The sleep module 360 in order to duration according to sleep pattern, control counter 310.
Before means for correcting 300 entered sleep pattern, the index value ID that is provided by counter 310 was provided earlier sleep module 360 4, the duration with sleep pattern converts a sleep index value SID to then.Leave sleep pattern and when entering normal mode, sleep module 360 is with index value ID at means for correcting 300 4The result of calculation that adds sleep index value SID is updated to counter 310, makes counter 310 by index value ID 5Begin counting.In the present embodiment, index value ID 5Be index value ID 4With sleep index value SID's and.
For example, suppose before means for correcting 300 enters sleep pattern the index value ID that counter 310 provides 4Be 124, and the duration of sleep pattern it is 3 seconds.Sleep module 360 first recording indexes value ID 4, and then convert the time that sleep pattern continues to sleep index value SID.Sleep index value SID can be expressed from the next:
SID = 3 sec 26 120 ks = 650 . . . ( 5 )
When entering normal mode leaving sleep pattern, index value ID 5Can be expressed from the next:
ID 5=ID 4+SID=124+650=774...........................(6)
Therefore, when means for correcting 300 reentered normal mode, counter 310 was to begin counting by 774.
Fig. 5 is the process flow diagram of bearing calibration of the present invention.This bearing calibration is applicable in the portable unit.At first, provide a reference clock F Ref(step S510).Because reference clock F RefMay have offset error, so a system clock that can utilize a base station to be provided comes calibration reference clock F Ref
At very first time point, record very first time value and first index value (step S520).With Fig. 3 is example, and processing module 320 is at time point T 1The time, the time value TV that record RTC 32 is provided 1Reach the index value ID that counter 310 is provided 1In the present embodiment, RTC 32 is the specific clock F that produced according to frequency generator 340 SPCAnd provide time value.And reference clock F RefGreater than specific clock F SPC
At second time point, write down second index value (step S530).In the present embodiment, the very first time point and second time point are counted according to reference clock.With Fig. 3 is example, and processing module 320 is at time point T 2, the index value ID that recording counter 310 is provided 2In other embodiments, processing module 320 also can write down the time value TV that RTC 32 is provided 3
Calculate first index value and second index value (step S540).According to result of calculation, set second time value (step S550).In the present embodiment, processing module 320 computation index value ID 1And ID 2Between difference, and with index value ID 1And ID 2Between difference convert to one correction time value.At last with time value TV 1Add one correction time value, just can try to achieve second time value.In certain embodiments, when the 3rd time value is recorded, processing module 320 is according to index value ID 1And ID 2Between difference, adjust the 3rd time value, in order to obtain second time value.
In addition, in other embodiments, can utilize a check timer.Check timer is according to reference clock and timing.When the check timer timing was put to the very first time, then write down the very first time value and first index value, when check timer timing during, then write down second index value to second time point.
Though the present invention discloses as above with preferred embodiment; right its is not in order to qualification the present invention, any the technical staff in the technical field, within the scope of the invention; can do some and change, so protection scope of the present invention is when being as the criterion with the scope that claim was defined.

Claims (22)

1. a bearing calibration is applicable to a portable unit, and this bearing calibration comprises:
One reference clock is provided;
At very first time point, write down a very first time value and one first index value;
At one second time point, write down one second index value, wherein should put the very first time and this second time point is to calculate according to this reference clock;
Calculate this first index value and this second index value; And
According to this result of calculation, set one second time value;
Wherein, this calculation procedure comprises:
Calculate the difference between this first index value and this second index value;
According to this reference clock, with this difference convert to one correction time value; And
Should be worth the very first time and add that this value is to obtain this second time value correction time.
2. bearing calibration as claimed in claim 1 is characterized in that, according to this difference, sets this second time value.
3. bearing calibration as claimed in claim 1 is characterized in that, further comprises:
At this second time point, write down one the 3rd time value; And
According to this difference, calculate one and adjust time value, and adjust the 3rd time value, to obtain this second time value according to this adjustment time value.
4. bearing calibration as claimed in claim 1 is characterized in that, utilizes a system clock to proofread and correct this reference clock.
5. bearing calibration as claimed in claim 4 is characterized in that, this system clock is provided by a base station.
6. bearing calibration as claimed in claim 1 is characterized in that, further comprises: open a correction timer and carry out this recording step, this correction timer is according to this reference clock and timing.
7. bearing calibration as claimed in claim 1 is characterized in that, this very first time value is provided by a specific clock, and the frequency of this reference clock is greater than the frequency of this specific clock.
8. a means for correcting is applicable to a portable unit, and this portable unit has a real-time clock, and a very first time value can be provided, and this means for correcting comprises:
One first index value and one second index value are counted and provided to one counter according to a reference clock; And
One processing module, at very first time point record this very first time value and this first index value, write down this second index value at one second time point, calculate the difference between this first index value and this second index value then, according to this reference clock, with this difference convert to one correction time value, should be worth the very first time and add this value correction time to obtain one second time value, wherein should put the very first time and this second time point is to calculate according to this reference clock.
9. means for correcting as claimed in claim 8 is characterized in that, further comprises a first frequency generator, in order to this reference clock to be provided.
10. means for correcting as claimed in claim 9 is characterized in that, this first frequency generator is a crystal oscillator.
11. means for correcting as claimed in claim 8 is characterized in that, further comprises a second frequency generator, in order to a specific clock to be provided, and the frequency of this reference clock is greater than the frequency of this specific clock.
12. means for correcting as claimed in claim 11 is characterized in that, this very first time value is to be provided according to this specific clock by real-time clock.
13. means for correcting as claimed in claim 8 is characterized in that, this reference clock is proofreaied and correct by a system clock.
14. means for correcting as claimed in claim 13 is characterized in that, this system clock is provided by a base station.
15. means for correcting as claimed in claim 8 is characterized in that, this means for correcting comprises that further one proofreaies and correct timer, carries out timing according to this reference clock.
16. means for correcting as claimed in claim 8 is characterized in that, this processing module is calculated the difference between this first index value and this second index value, and this real-time clock provides this second time value according to this difference.
17. means for correcting as claimed in claim 16 is characterized in that, at this second time point, this processing module is record one the 3rd time value further, calculate one and adjust time value, and adjust the 3rd time value, to obtain this second time value according to this adjustment time value.
18. means for correcting as claimed in claim 8 is characterized in that, under a sleep pattern, this counter stops counting, and under a normal mode, this counter continues counting.
19. means for correcting as claimed in claim 18 is characterized in that, this means for correcting further comprises a sleep module, in order to the duration according to this sleep pattern, controls this counter.
20. means for correcting as claimed in claim 19 is characterized in that, in this sleep pattern, this counter provides one the 4th index value, and at this normal mode, this counter provides one the 5th index value.
21. means for correcting as claimed in claim 20, it is characterized in that this sleep module converts the duration of this sleep pattern to a sleep index value, and the 4th index value is added this sleep index value, so that this counter under this normal mode, provides the 5th index value.
22. means for correcting as claimed in claim 21 is characterized in that, this counter is made accumulated counts by a count pulse of this reference clock in a fixed cycle.
CN 200710078791 2006-05-19 2007-02-27 Bearing calibration and device Active CN100565424C (en)

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
US74766606P 2006-05-19 2006-05-19
US60/747,666 2006-05-19
US11/536,981 2006-09-29

Publications (2)

Publication Number Publication Date
CN101075146A CN101075146A (en) 2007-11-21
CN100565424C true CN100565424C (en) 2009-12-02

Family

ID=38976227

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 200710078791 Active CN100565424C (en) 2006-05-19 2007-02-27 Bearing calibration and device

Country Status (1)

Country Link
CN (1) CN100565424C (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101464822B (en) * 2007-12-21 2011-09-21 中兴通讯股份有限公司 Test method for CPU timer accuracy
JP5965223B2 (en) * 2012-06-29 2016-08-03 ルネサスエレクトロニクス株式会社 Clock correction circuit and clock correction method
CN106227293A (en) * 2016-07-24 2016-12-14 泰凌微电子(上海)有限公司 A kind of system clock
CN106940665B (en) * 2017-03-24 2021-04-20 惠州Tcl移动通信有限公司 Time correction control method and system based on mobile terminal and mobile terminal
CN111309095B (en) * 2020-01-16 2022-02-15 广州小鹏汽车科技有限公司 Timing device, control method of timing device and terminal

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5740129A (en) * 1995-02-07 1998-04-14 Nokia Mobile Phones Limited Real time clock

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5740129A (en) * 1995-02-07 1998-04-14 Nokia Mobile Phones Limited Real time clock

Also Published As

Publication number Publication date
CN101075146A (en) 2007-11-21

Similar Documents

Publication Publication Date Title
US7307919B2 (en) Radio-controlled timepiece and method of adjusting the time kept by a radio-controlled timepiece
CN100565424C (en) Bearing calibration and device
US6961287B2 (en) Time error compensating apparatus and method in a terminal
JP4109927B2 (en) Radio correction watch and method
KR950012010B1 (en) Timepiece adjusted by time signal
JP2624176B2 (en) Electronic clock and time correction method
CN104777743B (en) Radio-controlled timepiece
CN111781987B (en) Real-time clock calibration method and related device
US5422863A (en) Automatically correcting electronic timepiece for selected signal receiving wireless receiver
US20080244301A1 (en) Real-time clock correction methods and apparatus
CN210243853U (en) Clock generating device suitable for node seismograph
JP3584042B2 (en) Receiver with clock function and time adjustment method
CN111831056A (en) Real-time clock calibration module and method and real-time clock chip
EP1573405B1 (en) Time-data transmitting apparatus and time-correcting system
CN100565387C (en) The time adjustment method of electric wave correcting timepiece and electric wave correcting timepiece
US7385876B2 (en) Radio-controlled timepiece, electronic device, time correcting method and computer product
JP2001051077A (en) Information output device for correcting time and automatic time correcting clock
CA1220530A (en) Real time clock synchronization
US7455447B2 (en) Method and apparatus for a portable device
CN103257570A (en) Electronic clock and electronic clock speed rectifying method
CN101242507B (en) Automatic correction device and its processing method
JP4976037B2 (en) Radio correction clock
JP2008032583A (en) Radio-controlled timepiece
EP0427515A2 (en) Automatically corrected electronic timepiece
CN104216281B (en) Radio-controlled timepiece

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant