CN103728877A - Electronic calendar accurate time proofreading method with no need for time base hardware calibration - Google Patents

Electronic calendar accurate time proofreading method with no need for time base hardware calibration Download PDF

Info

Publication number
CN103728877A
CN103728877A CN201410023080.2A CN201410023080A CN103728877A CN 103728877 A CN103728877 A CN 103728877A CN 201410023080 A CN201410023080 A CN 201410023080A CN 103728877 A CN103728877 A CN 103728877A
Authority
CN
China
Prior art keywords
time
electronic calendar
error
calibration
day
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.)
Pending
Application number
CN201410023080.2A
Other languages
Chinese (zh)
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.)
Anhui University of Science and Technology
Original Assignee
Anhui University of Science and Technology
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 Anhui University of Science and Technology filed Critical Anhui University of Science and Technology
Priority to CN201410023080.2A priority Critical patent/CN103728877A/en
Publication of CN103728877A publication Critical patent/CN103728877A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Electric Clocks (AREA)

Abstract

The invention discloses an electronic calendar accurate time proofreading method with no need for time base hardware calibration. A time interval between twice timing proofreading performed by a user is recorded in the electronic calendar running process by using an EEPROM inside a single chip microcomputer; errors of an electronic calendar every day are calculated according to an error between the twice timing proofreading and accurate time; automatic proofreading is performed on the time of the electronic calendar at the zero (00:00:00) moment every day to remove error time every day, accordingly complicated time base hardware calibration of manufacturers and the accumulative error effect of the electronic calendar can be avoided, and dispersity errors existing in crystals are eliminated. In the adopted technical scheme, automatic error calibration can be achieved on the base that any hardware circuit is not added, the complicated production process of time base accuracy correction of the manufacturers can be omitted, a production period of products is shortened, and the production cost is reduced.

Description

The accurate calibration method of the electronic calendar of base hardware calibration during a kind of exempting from
Technical field
The present invention relates to electronic calendar timing error software calibration technical field, the time calibrating method that particularly relates to a kind of high precision, software realization, can avoid manufacturer loaded down with trivial details time base hardware calibration and electronic calendar cumulative errors effect, overcome the error that the para-curve feature of crystal precision causes, and the aging error causing of crystal oscillator frequency.
Background technology
Current electronic calendar, employing be quartz crystal oscillator as time base realize real-time clock (RTC) timing, by Single-chip Controlling, realize the demonstration of time.What quartz crystal oscillator adopted is 32.768kHz crystal, and 32768 is 15 powers of 2, than the timebase frequency that is easier to frequency division generation 1Hz.Typical 32.768kHz crystal can not provide degree of precision in wide temperature range, and in whole temperature range, precision is parabolic type.In addition, the dispersed error of crystal in ± 100ppm, be equivalent to one day slow or fast 8.64 seconds, annual (calculating with 365 days) maximum error is 3153.6 seconds.
The error existing due to crystal oscillator itself has directly affected the accuracy of timekeeping of real-time clock, and current existing solution mainly contains two large classes: a class is base hardware accurate correction mode while adopting clock chip, and another kind of is employing Systematic Error Correction mode.
Base hardware accurate correction mode while adopting clock chip:
Time base crystal oscillator normal frequency scope be 32760Hz~32775Hz, by adjusting the load capacitance of crystal oscillator, can finely tune the oscillation frequency of crystal oscillator, manufacturer adopts this correcting mode at present.The frequency of adjusting crystal oscillator by the load capacitance of fine setting crystal oscillator, makes the frequency of crystal oscillator approach as far as possible 32.768kHz.In Fig. 1, C 1and C 2for the load capacitance of crystal oscillator, general C 2be a fixed capacity (5pF), C 1for tunable capacitor (3.3pF~20pF).In the process of adjusting, staff needs constantly to adjust tunable capacitor C 1finely tune the frequency of crystal oscillator.In order to reach higher precision, staff need to constantly finely tune, observe, consuming time so longer.Meanwhile, due to the existence of distributed capacitance, load capacitance (3.3pF~20pF) is originally smaller, is difficult to the precision that reaches higher.For the process of this adjustment, even veteran employee still will spend the longer time to calibrate.
Adopt Systematic Error Correction mode:
1, the wireless radio station time signal calibration of giving the correct time.National Time Service Center, Chinese Academy of Sciences's shortwave time service platform (BPM), 24 hours every days are continuously with four kinds of frequency (2.5MHz, 5MHz, 10MHz, 15MHz guarantees 3 kinds of frequencies simultaneously) alternately broadcast standard time, standard-frequency signal, covering radius surpasses 3000 kilometers, and time service precision is millisecond (signa) magnitude.The basic skills Shi You wireless station broadcast time signal (abbreviation time signal) of shortwave time service, user receives time signal with radio receiver, then carries out local calibration.Radiothermy time signal carries out circuit complexity and the cost that time-frequency transmission and calibration steps have increased electronic calendar, advantageous particularly the user of 1ms magnitude for requiring synchronism deviation, is suitable for high-end or special user.
2, network timing automatic calibration.Computing machine, after each start interconnection network, can carry out one subsynchronously with Internet time server, realizes the check and correction to the time.The precondition of this mode is that user's clock system must connect computer network, and opens network automatic time proofreading function.
By the wireless radio station time signal calibrating mode that gives the correct time, its hardware circuit more complicated; By network timing automatic calibration mode, must there is the connection of network, this two schemes is all difficult to realize on low cost, popular electronic calendar.
Summary of the invention
In order to solve the problem of above existence, the accurate calibration method of the electronic calendar of base hardware calibration while the invention provides a kind of exempting from, can avoid manufacturer loaded down with trivial details time base hardware accurate correction and electronic calendar cumulative errors effect, overcome the dispersed error that crystal exists.
The technical solution adopted in the present invention is:
By using the EEPROM of single-chip microcomputer inside, in electronic calendar operational process, recording user (or manufacturer) is separated by time interval of twice time calibration of a period of time.By this twice time check and correction and the error that correct time produces, automatically calculate the electronic calendar error of every day.The zero point of every day (00:00:00) constantly, the time of electronic calendar is carried out to automatic calibration, remove the error time of every day, thereby can avoid manufacturer loaded down with trivial details time base hardware calibration and electronic calendar cumulative errors effect, overcome the error that the para-curve feature of crystal precision causes, and the aging error causing of crystal oscillator frequency.
Compared with prior art, the invention has the beneficial effects as follows:
1, because the error of crystal oscillator own is little, in the time of can exempting in this way in production run, base hardware be accurately proofreaded, and simplifies production procedure, reduces cost of products.
2, by the particular moment in every day (midnight), carry out automatic calibration, can effectively avoid the cumulative errors effect of electronic calendar, improved the timing precision of electronic calendar, long-term per day error reaches Millisecond.
3, without increasing any hardware circuit, the mode by software realizes completely.
4, by after twice time calibration, electronic calendar just can carry out automatic error calibration by program, while having avoided the later school of user, operates; Correction data is stored in the EEPROM of single-chip microcomputer inside, even Single Chip Microcomputer (SCM) system power-off, correction data still can be preserved.
5, do not change user's time check and correction operating process, do not increase user's operation easier.
6, every day special time calibration marker position is set, after having calibrated, by the zero clearing of calibration marker position, prevent when clock current time is faster than the time after adjusting, after completing calibration, again arrive clock at zero point, calibration, makes system enter the situation of endless loop again.
Accompanying drawing explanation
Fig. 1 is: the one-piece construction figure of the accurate calibration method of electronic calendar of base hardware calibration during a kind of exempting from.
Fig. 2 is: the program control flow chart of the accurate calibration method of electronic calendar of base hardware calibration during a kind of exempting from.
Fig. 3 is: the error counting subroutine process flow diagram of the accurate calibration method of electronic calendar of base hardware calibration during a kind of exempting from.
Fig. 4 is: subroutine flow chart time calibration of the accurate calibration method of electronic calendar of base hardware calibration during a kind of exempting from.
Fig. 5 is: the user time of the accurate calibration method of electronic calendar of base hardware calibration check and correction process flow diagram during a kind of exempting from.
Embodiment
Below in conjunction with accompanying drawing, the present invention is further described.
In Fig. 1, C 1, C 2for fixed capacity, XTAL is the time base crystal oscillator of nominal value 32.768kHz.Time base crystal oscillator base while providing for clock chip, while producing the frequency meter of 1Hz by clock chip frequency division later.Single-chip microcomputer and clock chip read or data writing by I/O mouth, by button, the time are adjusted, by the display module read clock time.
In Fig. 2, after single-chip microcomputer electrifying startup, by reading the register data of clock chip, carry out the demonstration of time, and at the zero point of every day, the time of clock is calibrated.When user's setting-up time, entry time is had no progeny in setting, and by calling error counting subroutine, calculates the error of clock, writes the EEPROM of single-chip microcomputer inside.When clock time be zero point clock constantly, by allocating time, proofread subroutine, the time is proofreaded.When clock time is at 23, check mark position Flag=1 is set, guarantees that clock can normally proofread during clock to zero point next time.
In Fig. 3, during a kind of exempting from, to realize the process of automatic calibration as follows for the accurate calibration method of the electronic calendar of base hardware calibration:
1, user (or manufacturer) takes after electronic calendar for the first time, and electronic calendar is carried out to time calibration for the first time, setting-up time T 1(take second as least unit).By user, (or manufacturer) time of pressing set key, triggered single-chip microcomputer external interrupt, the time T that call subroutine is set user 1write clock chip is kept in the EEPROM of single-chip microcomputer inside simultaneously.
2, after a while, when user (or manufacturer) carries out time calibration for the second time, setting-up time T 2(take second as least unit).By user, (or manufacturer) time of pressing set key, triggered single-chip microcomputer external interrupt, the time T that call subroutine is set user 2clock time T during with setting 0write the EEPROM of single-chip microcomputer inside; By calling the subroutine of error operation time, the error (T of the clock time when calculating the time of user's setting and setting 2-T 0); Use again this error divided by the mistiming (T of twice proof time 2-T 1) be multiplied by the time 86400S of a day, calculate check and correction during this period of time in, the time deviation of every day
Figure BDA0000458206400000031
and by this time deviation ε T original time error that superposes, result restore (product initial deviation is set to 0) in the EEPROM of single-chip microcomputer inside.
3, at the zero point of every day (00:00:00), by allocating time, proofread subroutine, to current clock time T 0proofread (is T 0=T 0+ ε T), complete the automatic calibration to the time.When error time is less than 1S, the time delay by single-chip microcomputer removes error, error of time of day can be brought up to Millisecond.
In Fig. 4, single-chip microcomputer is by reading the time error ε T of inner EEPROM, and the time of clock is calibrated.After having calibrated, by the zero clearing of calibration marker position (Flag=0), prevent when clock current time is faster than the time after adjusting, complete calibration and again arrive clock at zero point, recalibration enters the situation of endless loop later.
In Fig. 5, user can and adjust two buttons of key by setting key and complete the correction to the time.When user presses setting key, from calendar, start to adjust year, month, day, hour, minute, after having adjusted, write calendar chip, with second of time zero clearing, single-chip microcomputer calculates time deviation and preserves.

Claims (7)

1. the accurate calibration method of the electronic calendar of base hardware calibration while exempting from, is characterized in that: by using the EEPROM of single-chip microcomputer inside, and in electronic calendar operational process, the time interval of twice time check and correction of recording user; By this twice time check and correction and the error that correct time produces, calculate the electronic calendar error of every day; The zero point of every day (00:00:00) constantly, the time of electronic calendar is carried out to automatic Proofreading, remove the error time of every day, thus can avoid manufacturer loaded down with trivial details time base hardware calibration and electronic calendar cumulative errors effect, overcome the dispersed error that crystal exists.
2. the accurate calibration method of electronic calendar of base hardware calibration during a kind of exempting from according to claim 1, it is characterized in that: manufacturer carries out base hardware degree of accuracy when loaded down with trivial details without the electronic calendar to after producing and proofreaies and correct, can save the time base correction in production procedure, reduce production cost.
3. the accurate calibration method of electronic calendar of base hardware calibration during a kind of exempting from according to claim 1, is characterized in that: without increasing any hardware circuit, the mode by software realizes and eliminates time integral error completely.
4. the accurate calibration method of electronic calendar of base hardware calibration during a kind of exempting from according to claim 1, is characterized in that: carry out automatic Proofreading by the particular moment in every day, effectively avoid the cumulative errors effect of electronic calendar; Can overcome well the time error that the caused oscillator frequency deviations such as frequency aging due to variation of ambient temperature, crystal oscillator cause electronic calendar, improve the degree of accuracy of electronic calendar, long-term per day error can reach Millisecond.
5. the accurate calibration method of electronic calendar of base hardware calibration during a kind of exempting from according to claim 1, it is characterized in that: user is by after twice time adjustment, electronic calendar just can carry out time base error by program and automatically calculate and adjust, and has avoided the later troublesome operation of user.
6. the accurate calibration method of electronic calendar of base hardware calibration during a kind of exempting from according to claim 1, is characterized in that: do not change the operating process of user's time check and correction, do not increase user's operation easier, realize time adjustment completely by software mode.
7. the accurate calibration method of electronic calendar of base hardware calibration during a kind of exempting from according to claim 1, it is characterized in that: every day special time calibration marker position is set, after having calibrated, by the zero clearing of calibration marker position, prevent when clock current time is faster than the time after adjusting, after completing calibration, again arrive clock at zero point, recalibration enters the situation of endless loop.
CN201410023080.2A 2014-01-17 2014-01-17 Electronic calendar accurate time proofreading method with no need for time base hardware calibration Pending CN103728877A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410023080.2A CN103728877A (en) 2014-01-17 2014-01-17 Electronic calendar accurate time proofreading method with no need for time base hardware calibration

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410023080.2A CN103728877A (en) 2014-01-17 2014-01-17 Electronic calendar accurate time proofreading method with no need for time base hardware calibration

Publications (1)

Publication Number Publication Date
CN103728877A true CN103728877A (en) 2014-04-16

Family

ID=50452996

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410023080.2A Pending CN103728877A (en) 2014-01-17 2014-01-17 Electronic calendar accurate time proofreading method with no need for time base hardware calibration

Country Status (1)

Country Link
CN (1) CN103728877A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007132886A (en) * 2005-11-14 2007-05-31 Funai Electric Co Ltd Video information processor, and method for correcting time of video information processor
CN102722099A (en) * 2012-06-13 2012-10-10 东莞市洲进钟表有限公司 Clock correction system with error computing function and correction method
CN103034116A (en) * 2012-11-14 2013-04-10 福建省计量科学研究院 Method for improving accuracy of timing of quartz timer
CN103052150A (en) * 2012-11-19 2013-04-17 安徽工程大学 Wireless sensor network time synchronization method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007132886A (en) * 2005-11-14 2007-05-31 Funai Electric Co Ltd Video information processor, and method for correcting time of video information processor
CN102722099A (en) * 2012-06-13 2012-10-10 东莞市洲进钟表有限公司 Clock correction system with error computing function and correction method
CN103034116A (en) * 2012-11-14 2013-04-10 福建省计量科学研究院 Method for improving accuracy of timing of quartz timer
CN103052150A (en) * 2012-11-19 2013-04-17 安徽工程大学 Wireless sensor network time synchronization method

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
李春玲: "自校准高精度单片机时钟系统", 《华东交通大学学报》 *
管力锐: "自动校时实时日历时钟的设计", 《微计算机信息》 *
董民政,陈永强: "微处理机适时时钟校时方法的研究", 《兰州铁道学院学报》 *

Similar Documents

Publication Publication Date Title
JP2624176B2 (en) Electronic clock and time correction method
CN100456858C (en) Time error compensation device and method for terminal
CN111781987B (en) Real-time clock calibration method and related device
CN107329399B (en) Low-power-consumption control method of satellite time service clock system and clock system
US7075859B2 (en) Radio-controlled timepiece and control method for the same
US20090129208A1 (en) Apparatus, system and method for keeping time
CN110262210B (en) Crystal oscillator time keeping method based on counter
JP2001159690A (en) Portable device and real time information production method
CN102163041B (en) Wide range temperature error compensating method of real-time clock and system thereof
CN102253638A (en) Frequency stability control and compensation method for automatically keeping time in complex environment
JP2007078405A (en) Timing program of software timepiece
CN111831056A (en) Real-time clock calibration module and method and real-time clock chip
JPH04230890A (en) Individually selecting and calling-out receiver with clock function
CN103092068A (en) Timing method and timing system
CN101995816B (en) Automatic clock calibration method and automatic clock calibration device
JP6898903B2 (en) Transceiver with real-time clock
CN103152033B (en) Clock-generating device and method thereof and data transferring method
JP2002217722A (en) Reference frequency generator
CN109217821B (en) Frequency device compensation method, device and system and computer readable storage medium
CN100565424C (en) Bearing calibration and device
US4114363A (en) Electronic timepiece
US7679466B1 (en) Counter-based resonator frequency compensation
CN106444966B (en) A kind of real-time clock RTC adjustment device and method
CN103728877A (en) Electronic calendar accurate time proofreading method with no need for time base hardware calibration
JPH05157859A (en) Radio corrected clock

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20140416

RJ01 Rejection of invention patent application after publication