[go: up one dir, main page]

CN103472713A - Time correction system of clock - Google Patents

Time correction system of clock Download PDF

Info

Publication number
CN103472713A
CN103472713A CN2013104443292A CN201310444329A CN103472713A CN 103472713 A CN103472713 A CN 103472713A CN 2013104443292 A CN2013104443292 A CN 2013104443292A CN 201310444329 A CN201310444329 A CN 201310444329A CN 103472713 A CN103472713 A CN 103472713A
Authority
CN
China
Prior art keywords
clock
time
correction
information
module
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
CN2013104443292A
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.)
Huzhou Vocational and Technical College
Original Assignee
Huzhou Vocational and Technical College
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 Huzhou Vocational and Technical College filed Critical Huzhou Vocational and Technical College
Priority to CN2013104443292A priority Critical patent/CN103472713A/en
Publication of CN103472713A publication Critical patent/CN103472713A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Electric Clocks (AREA)

Abstract

一种时钟的时间校正系统,其特征在于:包括:启动模块,用于启动校正系统;时钟模块,用于在启动校正系统时,提供当前的时钟信息;用户接口,用于用户从时钟模块获取当前时钟信息,并与参考时钟的确定信息进行比较,得到当前时钟的误差信息,由此确定进行时钟校正的数值参数;误差补偿模块,与用户接口连接,利用用户第一次输入的校正参数对当前时钟信息,进行校正;时间寄存器,用于记录上一次对时钟进行调整设置后的时间信息。本发明根据仪器或人工测试出时钟的时间速度,在预定的周期内,输入一次校正参数校正后时钟后,系统就在后续的周期内循环运行,保证了时钟的准确度,减少了调整时钟的次数,使用方便,实用性强。

A clock time correction system, characterized in that it includes: a starting module for starting the correction system; a clock module for providing current clock information when starting the correction system; a user interface for the user to obtain from the clock module The current clock information is compared with the determined information of the reference clock to obtain the error information of the current clock, thereby determining the numerical parameters for clock correction; the error compensation module is connected with the user interface, and uses the correction parameters input by the user for the first time to correct The current clock information is used for correction; the time register is used to record the time information after the clock was adjusted and set last time. In the present invention, the time velocity of the clock is tested by an instrument or manually, and within a predetermined period, after the clock is corrected by inputting correction parameters once, the system will run cyclically in the subsequent period, ensuring the accuracy of the clock and reducing the cost of adjusting the clock. Times, easy to use, strong practicability.

Description

一种时钟的时间校正系统A Clock Time Correction System

技术领域 technical field

本发明涉及一种时钟的时间校正系统,属于电子技术领域。 The invention relates to a clock time correction system, which belongs to the field of electronic technology.

背景技术 Background technique

在家庭和一些办公场合,尤其是学校上下课的铃声,各种各样的数字时钟层出不穷,其能实现年月日、时间的显示。这些时钟的硬件构成中,目前用的最多的是DS1302时钟芯片,因为各种原因(最主要的是晶振),在时间的准确度上存在偏移现象,这就要求人们隔一段时间需要重新调整时间,比较麻烦。 In families and some office situations, especially the ringtones of school and get out of class, various digital clocks emerge in an endless stream, which can realize the display of year, month, day and time. Among the hardware components of these clocks, the DS1302 clock chip is currently the most used. Due to various reasons (the most important is the crystal oscillator), there is a deviation in the accuracy of the time, which requires people to readjust after a period of time. Time is more troublesome.

目前,时钟基本上可以分为两大类,一种是用纯硬件电路实现的时钟,另一种是用智能芯片实现的数字时钟,但二者有一个共同点就是时间基准基本上都采用晶振实现,最常用的是频率为32767hz的晶振。晶振的主要参数有:温度频差、负载电容、谐振阻抗等十多个,这些参数完全达到设计要求是很困难的,因此,存在误差是必然的。这样在生活使用中很不方便,需要经常的调整,尤其是学校上课下课的铃声,如果不准确会造成一些混乱,所以,一个准确度较高的时钟是非常必要的。 At present, clocks can basically be divided into two categories, one is a clock realized by a pure hardware circuit, and the other is a digital clock realized by a smart chip, but the two have one thing in common that the time reference basically uses a crystal oscillator Realization, the most commonly used is the crystal oscillator with a frequency of 32767hz. The main parameters of the crystal oscillator are: temperature frequency difference, load capacitance, resonant impedance, etc. It is very difficult for these parameters to fully meet the design requirements, so errors are inevitable. This is very inconvenient in daily life and requires frequent adjustments, especially the ringtones of the school when classes are in and out of class. If it is inaccurate, it will cause some confusion. Therefore, a clock with higher accuracy is very necessary.

目前,最常用的时间精度调整方法有:一个是采用精度非常高的晶振实现(但仍解决不了误差现象),另一个就是对晶振的旁路电容的容值进行调整,调整后的时间精度会大大提高,但是仍会存在时间误差,据统计经验,一般的时钟误差是:每4小时差1秒(快或者慢1秒),更糟糕的有1小时变快或者慢几秒,这样人们总是会在隔一段时间后,必须要校正时钟。当然,有些智能设备如手机,根据国家的标准授时会自动调整,但对一般的时钟是没法实现的。 At present, the most commonly used time accuracy adjustment methods are: one is to use a very high-precision crystal oscillator (but it still cannot solve the error phenomenon), the other is to adjust the capacitance of the bypass capacitor of the crystal oscillator, and the adjusted time accuracy will be lower. It is greatly improved, but there will still be time errors. According to statistical experience, the general clock error is: every 4 hours, the difference is 1 second (fast or slow by 1 second), and what is worse is that it becomes faster or slower by a few seconds in 1 hour, so that people always It is necessary to correct the clock after a period of time. Of course, some smart devices, such as mobile phones, can automatically adjust the time service according to the national standard, but it cannot be realized for ordinary clocks.

发明内容 Contents of the invention

本发明的主要目的在于提供一种时钟的时间校正系统,其可以自动循环进行数字时钟的时间调整,无需人工频繁的调整,使用方便,实用性强。 The main purpose of the present invention is to provide a time correction system for clocks, which can automatically and cyclically perform time adjustments for digital clocks without manual frequent adjustments, and is easy to use and highly practical.

为了达到上述目的,本发明采用如下技术方案:一种时钟的时间校正系统,其特征在于:包括: In order to achieve the above object, the present invention adopts the following technical scheme: a time correction system of a clock, characterized in that: comprising:

启动模块,用于启动校正系统; A start module, used to start the correction system;

时钟模块,用于在启动校正系统时,提供当前的时钟信息; A clock module, used to provide current clock information when starting the correction system;

用户接口,用于用户从时钟模块获取当前时钟信息,并与参考时钟的确定信息进行比较,得到当前时钟的误差信息,由此确定进行时钟校正的数值参数; The user interface is used for the user to obtain the current clock information from the clock module, and compare it with the determined information of the reference clock to obtain the error information of the current clock, thereby determining the numerical parameters for clock correction;

误差补偿模块,与用户接口连接,利用用户第一次输入的校正参数对当前时钟信息,进行校正; The error compensation module is connected with the user interface, and uses the correction parameters input by the user for the first time to correct the current clock information;

时间寄存器,用于记录上一次对时钟进行调整设置后的时间信息。 The time register is used to record the time information after the clock is adjusted and set last time.

优选地,所述系统还包括参考时钟模块,用于提供准确的时钟信息。 Preferably, the system further includes a reference clock module for providing accurate clock information.

优选地,所述启动模块在确定校正周期后,循环启用。 Preferably, the activation module is activated cyclically after the calibration period is determined.

优选地,所述时钟校正的数值参数,包括误差单位、误差值和校正周期。 Preferably, the numerical parameters of the clock correction include error unit, error value and correction period.

本发明的有益效果是:本发明根据仪器或人工测试出时钟的时间误差,输入一次校正参数校正时钟后,系统就在后续的周期内循环运行,保证了时钟的准确度,减少调整时钟的次数,使用方便,实用性强。 The beneficial effects of the present invention are: the present invention detects the time error of the clock according to the instrument or manual test, and after inputting the correction parameters once to calibrate the clock, the system will run cyclically in the subsequent cycle, ensuring the accuracy of the clock and reducing the number of clock adjustments , easy to use and strong practicability.

附图说明 Description of drawings

图1为本发明实施例的结构示意框图。 Fig. 1 is a schematic block diagram of the structure of an embodiment of the present invention.

图1中标记的说明如下:1-启动模块,2-时钟模块,3-用户接口,4-误差补偿模块,5-时间寄存器,6-参考时钟模块。 The descriptions of the marks in Fig. 1 are as follows: 1 - start module, 2 - clock module, 3 - user interface, 4 - error compensation module, 5 - time register, 6 - reference clock module.

图2为本发明实施例工作原理流程图。 Fig. 2 is a flowchart of the working principle of the embodiment of the present invention.

具体实施方式 Detailed ways

本发明目的的实现、功能特点及有益效果,下面将结合具体实施例以及附图做进一步的说明。 The realization, functional characteristics and beneficial effects of the present invention will be further described below in conjunction with specific embodiments and accompanying drawings.

下面结合附图和具体实施例对本发明所述技术方案作进一步的详细描述,以使本领域的技术人员可以更好的理解本发明并能予以实施,但所举实施例不作为对本发明的限定。 The technical scheme of the present invention will be described in further detail below in conjunction with the accompanying drawings and specific examples, so that those skilled in the art can better understand the present invention and implement it, but the examples given are not intended to limit the present invention .

本发明实施例时钟的时间校正系统,包括: The time correction system of the clock in the embodiment of the present invention includes:

启动模块1,用于启动校正系统,所述启动模块1在确定校正周期后,循环启用; The startup module 1 is used to start the calibration system, and the startup module 1 is activated cyclically after the calibration period is determined;

时钟模块2,用于在启动校正系统时,提供当前的时钟信息; Clock module 2, used to provide current clock information when starting the correction system;

用户接口3,用于用户从时钟模块2获取当前时钟信息,并与参考时钟模块6的确定信息进行比较,得到当前时钟的误差信息,由此确定进行时钟校正的数值参数,包括误差单位、误差值和校正周期; The user interface 3 is used for the user to obtain the current clock information from the clock module 2, and compare it with the determined information of the reference clock module 6 to obtain the error information of the current clock, thereby determining the numerical parameters for clock correction, including the error unit, error value and calibration period;

误差补偿模块4,与用户接口3连接,利用用户输入的校正参数对当前时钟信息,进行校正; The error compensation module 4 is connected with the user interface 3, and uses the correction parameters input by the user to correct the current clock information;

时间寄存器5,用于记录时钟上一次对时钟进行调整设置后的时间信息。 The time register 5 is used to record the time information after the clock was adjusted and set last time.

所述系统还包括参考时钟模块6,用于提供准确的时钟信息。 The system also includes a reference clock module 6 for providing accurate clock information.

本发明实施例工作原理如下: The working principle of the embodiment of the present invention is as follows:

1、模块的入口参数(形参) 1. The entry parameter (formal parameter) of the module

要实现时钟的误差调整,必须先要知道时钟存在的误差大小。对于采用国标授时,可以自动监测,不需要人工参与,其他的都需要人工输入时间误差。本发明校正参数共有三个:一个是调时时宽(即多少时间后可调整,单位分钟),第二个参数是加减标识(即加调还是减调),第三个是调整的时间(单位是秒)。举例:如果时钟在3小时内,时钟快了1秒,则一个参数为180,第二个为加,第三个为1。 To realize the error adjustment of the clock, the error size of the clock must be known first. When using the national standard, it can be monitored automatically without manual participation, and other time errors need to be manually input. There are three correction parameters in the present invention: one is the time adjustment time width (that is, after how long it can be adjusted, the unit is minutes), the second parameter is the addition and subtraction mark (that is, increase or decrease), and the third is the adjustment time ( in seconds). Example: If the clock is 1 second faster within 3 hours, one parameter is 180, the second is plus, and the third is 1.

校正参数的获取,系统定义三个静态变量,在人机接口界面下,进入系统时钟校正状态(该程序在设计人机接口的时候要预留),输入这个几个参数即可。 To obtain the calibration parameters, the system defines three static variables. Under the HMI interface, enter the system clock calibration state (this program should be reserved when designing the HMI), and input these parameters.

2、校正 2. Calibration

本发明实施例采用集中补偿算法,例如:调时时宽为3小时,则循环周期为3小时,每经过3个小时系统自动进行误差补偿,并修改DS1302的秒时间寄存器5。 The embodiment of the present invention adopts the centralized compensation algorithm, for example: if the time adjustment time width is 3 hours, then the cycle period is 3 hours, and the system automatically performs error compensation every 3 hours, and modifies the second time register 5 of the DS1302.

另外,若采用时间寄存器5实施断电保护时,断电后,系统自动记忆参数。 In addition, if the time register 5 is used to implement power-off protection, the system will automatically memorize the parameters after power-off.

Claims (4)

1.一种时钟的时间校正系统,其特征在于:包括: 1. A time correction system of a clock, characterized in that: comprising: 启动模块,用于启动校正系统; A start module, used to start the correction system; 时钟模块,用于在启动校正系统时,提供当前的时钟信息; A clock module, used to provide current clock information when starting the correction system; 用户接口,用于用户从时钟模块获取当前时钟信息,并与参考时钟的确定信息进行比较,得到当前时钟的误差信息,由此确定进行时钟校正的数值参数; The user interface is used for the user to obtain the current clock information from the clock module, and compare it with the determined information of the reference clock to obtain the error information of the current clock, thereby determining the numerical parameters for clock correction; 误差补偿模块,与用户接口连接,利用用户第一次输入的校正参数对当前时钟信息,进行校正; The error compensation module is connected with the user interface, and uses the correction parameters input by the user for the first time to correct the current clock information; 时间寄存器,用于记录时钟上一次对时钟进行调整设置后的时间信息。 The time register is used to record the time information after the clock was adjusted and set last time. 2.根据权利要求1所述的时钟的时间校正系统,其特征在于:所述系统还包括参考时钟模块,用于提供准确的时钟信息。 2. The clock time correction system according to claim 1, characterized in that: said system further comprises a reference clock module for providing accurate clock information. 3.根据权利要求1所述的时钟的时间校正系统,其特征在于:所述启动模块在确定校正周期后,循环启用。 3. The clock time correction system according to claim 1, characterized in that: after the correction cycle is determined, the start-up module is activated cyclically. 4.根据权利要求1所述的时钟的时间校正系统,其特征在于:所述时钟校正的数值参数,包括误差单位、误差值和校正周期。 4. The clock time correction system according to claim 1, characterized in that: said numerical parameters of clock correction include error unit, error value and correction period.
CN2013104443292A 2013-09-25 2013-09-25 Time correction system of clock Pending CN103472713A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2013104443292A CN103472713A (en) 2013-09-25 2013-09-25 Time correction system of clock

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2013104443292A CN103472713A (en) 2013-09-25 2013-09-25 Time correction system of clock

Publications (1)

Publication Number Publication Date
CN103472713A true CN103472713A (en) 2013-12-25

Family

ID=49797605

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2013104443292A Pending CN103472713A (en) 2013-09-25 2013-09-25 Time correction system of clock

Country Status (1)

Country Link
CN (1) CN103472713A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104503220A (en) * 2014-11-18 2015-04-08 深圳市金立通信设备有限公司 Terminal, clock and clock calibration system
CN104503221A (en) * 2014-11-18 2015-04-08 深圳市金立通信设备有限公司 Clock calibration method
CN104883235A (en) * 2015-06-26 2015-09-02 上海远景数字信息技术有限公司 Clock time synchronization precision improving method based on PTP protocol
CN107450305A (en) * 2017-08-14 2017-12-08 珠海格力节能环保制冷技术研究中心有限公司 Calibration method and correction device, the smart machine of clock chip
CN108628153A (en) * 2018-04-28 2018-10-09 惠州市德赛西威汽车电子股份有限公司 A method of improving vehicle-mounted MP5 times precision

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1258868A (en) * 1998-12-08 2000-07-05 赫德森索夫特株式会社 Watch and clock with function of raising accuracy
JP2002365385A (en) * 2001-06-07 2002-12-18 Nec Corp Time information supply device
CN201383301Y (en) * 2009-03-06 2010-01-13 深圳市大眼界光电科技有限公司 Novel LED display screen
CN102455656A (en) * 2010-10-22 2012-05-16 比亚迪股份有限公司 Automobile clock calibration system and calibration method
CN102621873A (en) * 2011-01-26 2012-08-01 富泰华工业(深圳)有限公司 Electronic device with clock correction function and clock correction method thereof
CN103034116A (en) * 2012-11-14 2013-04-10 福建省计量科学研究院 Method for improving accuracy of timing of quartz timer

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1258868A (en) * 1998-12-08 2000-07-05 赫德森索夫特株式会社 Watch and clock with function of raising accuracy
JP2002365385A (en) * 2001-06-07 2002-12-18 Nec Corp Time information supply device
CN201383301Y (en) * 2009-03-06 2010-01-13 深圳市大眼界光电科技有限公司 Novel LED display screen
CN102455656A (en) * 2010-10-22 2012-05-16 比亚迪股份有限公司 Automobile clock calibration system and calibration method
CN102621873A (en) * 2011-01-26 2012-08-01 富泰华工业(深圳)有限公司 Electronic device with clock correction function and clock correction method thereof
CN103034116A (en) * 2012-11-14 2013-04-10 福建省计量科学研究院 Method for improving accuracy of timing of quartz timer

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104503220A (en) * 2014-11-18 2015-04-08 深圳市金立通信设备有限公司 Terminal, clock and clock calibration system
CN104503221A (en) * 2014-11-18 2015-04-08 深圳市金立通信设备有限公司 Clock calibration method
CN104883235A (en) * 2015-06-26 2015-09-02 上海远景数字信息技术有限公司 Clock time synchronization precision improving method based on PTP protocol
CN107450305A (en) * 2017-08-14 2017-12-08 珠海格力节能环保制冷技术研究中心有限公司 Calibration method and correction device, the smart machine of clock chip
CN107450305B (en) * 2017-08-14 2020-03-27 珠海格力电器股份有限公司 Time correction method and device for clock chip and intelligent equipment
CN108628153A (en) * 2018-04-28 2018-10-09 惠州市德赛西威汽车电子股份有限公司 A method of improving vehicle-mounted MP5 times precision

Similar Documents

Publication Publication Date Title
CN102118160B (en) Circuit and method for generating clock signal
CN103472713A (en) Time correction system of clock
CN103176400B (en) Intelligent ammeter clock calibration method
CN100456858C (en) Time error compensation device and method for terminal
CN105573106B (en) To the amendment circuit and its method of RTC accuracy of timekeeping in a kind of intelligent electric meter
CN108063617A (en) The clock frequency calibration method and system of a kind of low frequency RC oscillators
CN106292839B (en) Real-time clock compensation circuit and calibration method, device
CN108475101A (en) The method and apparatus detected and controlled that number is under-voltage
CN104937504B (en) The punctual method of quartz watch high accuracy
JP2014010704A (en) Clock correction circuit and clock correction method
CN104702214B (en) A kind of method of crystal oscillator frequency compensation
CN106505996A (en) A high-precision frequency offset compensation method for RTC chips combined with variable capacitors
CN105629061B (en) A kind of precise frequency measuring device based on the wide reference pulse of high stability
CN104483827A (en) System and method for calibrating digital clock measurement
CN103424731A (en) Electric energy meter real-time clock correction device and correction method
CN107765760B (en) RTC module clock source dynamic calibration method and RTC module clock source dynamic calibration system in instrument sleep mode
CN101959298B (en) Method and device for calibrating slow timing clock and terminal
CN101995816B (en) Automatic clock calibration method and automatic clock calibration device
CN202614950U (en) Time system for earthquake data acquisition
CN102438066B (en) Mobile phone and temperature detection method based on same
CN105759674B (en) Calibration method, alignment unit, clock circuit and the mobile communication terminal of slow clock
CN102096440A (en) Method for keeping high precision of real time clock circuit
CN103034116A (en) Method for improving accuracy of timing of quartz timer
CN203117837U (en) Clock calibration system
CN107645288A (en) Electronic circuit, method and electronic device for generating pulses

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: 20131225