Time calibration method and device for clock

文档序号:1046241 发布日期:2020-10-09 浏览:7次 中文

阅读说明:本技术 一种时钟的时间校准方法和装置 (Time calibration method and device for clock ) 是由 伦观涛 易磊 陈彪 李国武 于 2019-03-28 设计创作,主要内容包括:本申请的实施例公开一种时钟的时间校准方法和装置,通过无线网络模块连接互联网无线接入点;通过所述互联网无线接入点从网络的时间服务器获取网络时间;根据所述获取的网络时间更新当前系统时间与所述网络时间同步,根据当前系统时间和所述时钟的指针时间之间的差值控制所述马达带动所述指针旋转以与当前系统时间同步。上述描述的时钟的时间调整方法和装置,通过获取网络的网络时间,并根据该网络时间自动调整指针,从而实现更准确的时间同步。(The embodiment of the application discloses a time calibration method and a time calibration device of a clock, wherein an internet wireless access point is connected through a wireless network module; acquiring network time from a time server of a network through the Internet wireless access point; and updating the synchronization of the current system time and the network time according to the acquired network time, and controlling the motor to drive the pointer to rotate according to the difference between the current system time and the pointer time of the clock so as to synchronize with the current system time. According to the time adjusting method and the time adjusting device of the clock, the network time of the network is obtained, and the pointer is automatically adjusted according to the network time, so that more accurate time synchronization is achieved.)

1. A method of time calibration of a clock, comprising:

the wireless network module is connected with an internet wireless access point;

acquiring network time from a time server of a network through the Internet wireless access point; and updating the synchronization of the current system time and the network time according to the acquired network time, and controlling the motor to drive the pointer to rotate according to the difference between the current system time and the pointer time of the clock so as to synchronize with the current system time.

2. The method of claim 1, wherein the controlling the motor to rotate the hands to synchronize with the current system time based on the difference between the current system time and the hand time of the clock specifically comprises:

and comparing the current system time with the pointer time in real time to obtain a difference value between the system time and the pointer time, and driving the pointer to rotate at a speed faster than the system time according to the difference value so as to synchronize the time indicated by the pointer with the system time.

3. The method of claim 1 or 2, wherein the wireless network module periodically powers on through a switch to connect the internet wireless access point to periodically calibrate time.

4. The method of claim 3, wherein the method further comprises:

periodically detecting the battery capacity, and controlling the pointer to be stopped at a zero position through the motor when the battery capacity is lower than a threshold value; or the like, or, alternatively,

periodically detecting the battery capacity, and controlling the pointer to stop at a preset position through the motor when the battery capacity is lower than a threshold value.

5. The method of claim 3, wherein the method further comprises:

calibrating the counting value of the crystal oscillator according to the difference value of the network time and the system time, and calculating the frequency of the crystal oscillator by adopting the following formula:

Figure FDA0002009893770000011

wherein

Wherein f isestimateIs an estimate of the actual frequency of the crystal oscillator, forigIs the crystal oscillator frequency, t, used by the system to schedule the last time periodnetIs the current network time, t, obtained from the networksysIs the local current system time of the clock, tinterIs the time interval between two synchronizations.

6. An apparatus for time alignment of a clock, comprising:

the wireless network module is used for connecting an internet wireless access point;

and the processor is used for acquiring accurate network time from a time server of a network through the Internet wireless access point, updating the synchronization between the current system time and the network time according to the acquired network time, and controlling the motor to drive the pointer to rotate according to the difference between the current system time and the pointer time of the clock so as to synchronize with the current system time.

7. The apparatus of claim 6, wherein the processor is configured to compare the current system time with the hand time in real time to obtain a difference between the system time and the hand time, and to synchronize the time indicated by the hand with the system time by driving the hand to rotate at a faster speed than the system time according to the difference.

8. The apparatus of claim 6 or 7, wherein the wireless network module periodically or through a switch to connect the internet wireless access point to cause the processor to periodically calibrate time.

9. The apparatus of claim 8, wherein the processor is further configured to periodically detect a battery level, and to control the pointer to stop at the zero position via the motor when the battery level is below a threshold; or, the controller is used for periodically detecting the battery capacity, and when the battery capacity is lower than a threshold value, the pointer is controlled to stop at a preset position through the motor.

10. The apparatus of claim 8, wherein the processor is further configured to calibrate a count value of a crystal oscillator according to a difference between the network time and the system time, and wherein the crystal oscillator frequency is calculated using the following equation:

wherein

Wherein f isestimateIs an estimate of the actual frequency of the crystal oscillator, forigIs the crystal oscillator frequency, t, used by the system to schedule the last time periodnetIs the current network time, t, obtained from the networksysIs the local current system time of the clock, tinterIs the time interval between two synchronizations.

14页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:用于车辆的时间同步系统和方法

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!