Timing circuit and timing method of real-time clock
By designing a timing circuit in the real-time clock of engineering equipment and agricultural equipment, and using MCU and frequency meter to calibrate and sample the clock frequency, the clock deviation problem caused by the reduction in the built-in battery capacity is solved, and more accurate timing is achieved.
Patent Information
- Application Number
- CN202510250204.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-04
- Publication Date
- 2025-05-06
AI Technical Summary
When the real-time clock on engineering equipment and agricultural equipment is not used for a long time, the built-in battery is gradually consumed and the voltage is reduced, resulting in a large deviation in the real-time clock count.
A real-time clock timing circuit is designed. Through the control of the MCU, the clock frequency of the crystal oscillator is calibrated and sampled by using a frequency meter, save the calibration frequency, and time it is based on the current actual working voltage and calibration frequency during normal operation.
By precalibrating and saving the clock frequency, it is possible to correct according to the actual operating voltage during actual timing, thereby improving the accuracy of timing.
Smart Images

Figure CN119937271A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of engineering equipment or agricultural equipment, and in particular to a timing circuit and a timing method of a real-time clock on a clock instrument on engineering equipment or agricultural equipment. Background Art
[0002] At present, many circuits are generally equipped with two power supply forms: built-in battery and external power supply. When there is an external power supply, it is powered by the external power supply, and when the external power supply is cut off, it is powered by the built-in battery. Then, for engineering equipment and agricultural equipment, due to their special working characteristics, there will be a long period of non-use state, which causes the circuits on these equipment (such as clock instruments) to work for a long time under the power supply of the built-in battery. As time goes by, the power of the built-in battery will gradually consume and the voltage will gradually decrease. Technicians have found that the reduction in voltage will cause a large deviation in the real-time clock in the circuit, and this problem needs to be improved. Summary of the invention
[0003] The object of the present invention is to provide a timing circuit and a timing method of a real-time clock with high accuracy.
[0004] To achieve the above object, the present invention provides the following technical solutions:
[0005] The present invention provides a timing circuit of a real-time clock, the timing circuit comprising a clock chip, a crystal oscillator, a capacitor, an MCU, a built-in battery, an external power supply, a first selection switch, a second selection switch, a third selection switch, a DAC module, an ADC module, and a storage module, the MCU having a power supply port, a DAC port, an ADC port, a first input / output port, and a second input / output port; the external power supply and the built-in battery are both connected to the power supply port of the MCU through the first selection switch to supply power to the MCU respectively; the second selection switch is connected to the clock chip, the built-in battery, the first input / output port of the MCU, and the DAC module, and the DAC module is also connected to the DAC port of the MCU to supply power to the clock chip respectively; the clock chip is connected to the crystal oscillator, the capacitor, and the MCU to supply power to the MCU according to the crystal oscillator. The clock frequency provided generates a counting time and sends it to the MCU; the third selection switch is connected to the crystal oscillator, the second input and output port of the MCU, and is connected to an external frequency meter. The MCU is also connected to the storage module. The clock frequency is pre-calibrated and sampled through the frequency meter under the control of the MCU, and the sampled clock frequency is stored in the storage module as the calibration frequency; the ADC module is connected to the built-in battery and to the ADC port of the MCU to collect the real-time voltage of the built-in battery. During normal operation, when the first selection switch and the second selection switch select the built-in battery to power the MCU and the clock chip, the real-time voltage of the built-in battery is provided to the MCU as the current actual working voltage, and the MCU performs timing according to the actual working voltage and the calibration frequency.
[0006] In one embodiment, during calibration, the first selection switch selects the external power supply to power the MCU, and the second selection switch selects the output of the DAC module as the calibration voltage to provide power to the clock chip according to the control of the first input and output port of the MCU, and the input of the DAC module is provided by the MCU according to the external power supply.
[0007] In one implementation, the number of calibration frequencies stored in the storage module is N, where N is greater than or equal to 1, each calibration frequency corresponds to a calibration voltage, and the N calibration voltages and the N calibration frequencies together constitute a calibration sequence table.
[0008] In one implementation, the MCU performs timing correction according to the following formula:
[0009] Among them, t current is the actual counting time after the MCU is currently calibrated, t is the counting time currently provided by the clock chip, and fcurrent is the clock frequency corrected according to the current actual working voltage and the calibrated frequency, and f is the standard clock frequency constant of 32.768kHz;
[0010] Among them, V current is the actual working voltage at present, V n and V n+1 The actual working voltage V current The two adjacent calibration voltages, f n and f n+1 is the calibration frequency corresponding to the two calibration voltages, and n+1 is less than or equal to N.
[0011] In one embodiment, V 1 and V N Corresponding to the minimum and maximum values of the operating voltage range of the clock chip.
[0012] In one implementation, the MCU is further connected to the frequency meter via a USB interface to receive the clock frequency sampled by the frequency meter as the calibration frequency.
[0013] In one embodiment, the ADC module is connected to the clock chip, and during calibration, the real-time working voltage of the clock chip is collected as the calibration voltage for calibration, and during normal operation, the real-time working voltage of the clock chip is collected as the actual working voltage for timing.
[0014] The present invention also provides a timing method for a real-time clock, which adopts the timing circuit as described above, and the timing method includes: calibrating and sampling the clock frequency of the crystal oscillator received by the clock chip through a frequency meter under the control of the MCU in advance, and storing the sampled clock frequency as the calibration frequency in a storage module. During normal operation, when the first selection switch and the second selection switch select the built-in battery to power the MCU and the clock chip, the MCU performs timing according to the actual working voltage and the calibration frequency.
[0015] In one embodiment, during calibration, the first selection switch selects to supply power to the MCU with an external power supply, and the second selection switch selects the output of the DAC module as the calibration voltage to be provided to the clock chip for power supply according to the control of the first input / output port of the MCU, and the input of the DAC module is provided by the MCU according to the external power supply; the number of calibration frequencies stored in the storage module is N, N is greater than or equal to 1, each calibration frequency corresponds to a calibration voltage, and the N calibration voltages and the N calibration frequencies together constitute a calibration sequence table;
[0016] When the MCU is timing, correction is performed according to the following formula:
[0017] Among them, t current is the actual counting time after the MCU is currently calibrated, t is the counting time currently provided by the clock chip, and f current is the clock frequency corrected according to the current actual working voltage and the calibrated frequency, and f is the standard clock frequency constant of 32.768kHz;
[0018] Among them, V current is the actual working voltage at present, V n and V n+1 The actual working voltage V current The two adjacent calibration voltages, f n and f n+1 is the calibration frequency corresponding to the two calibration voltages, and n+1 is less than or equal to N.
[0019] In one implementation, the ADC module is connected to the clock chip, and during calibration, the real-time working voltage of the clock chip is collected as the calibration voltage for calibration, and during normal operation, the real-time working voltage of the clock chip is collected as the actual working voltage for timing.
[0020] Compared with the prior art, the technical solution of the present invention has the following beneficial effects:
[0021] The timing circuit and timing method of the real-time clock of the present invention calibrate and sample the clock frequency of the crystal oscillator in advance, and save the sampled clock frequency as the calibration frequency. When timing in normal working operation, timing is performed according to the current actual working voltage and the saved calibration frequency, so the timing is relatively accurate. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0023] Figure 1 A schematic diagram of the circuit structure of a timing circuit of a real-time clock provided by the first embodiment of the present invention;
[0024] Figure 2 A schematic diagram of the circuit structure of another timing circuit of a real-time clock provided in the first embodiment of the present invention. DETAILED DESCRIPTION
[0025] The technical solutions in the embodiments of the present invention will be described clearly and completely below. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by those skilled in the art without creative work belong to the scope of protection of the present invention. It should be noted that the description order of the following embodiments is not used as a limitation on the preferred order of the embodiments of the present invention. In the following embodiments, the description of each embodiment has its own emphasis. For the parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.
[0026] See also Figure 1 As shown, the first embodiment of the present invention provides a timing circuit of a real-time clock, the timing circuit includes a clock chip 10, a crystal oscillator U, a capacitor C, an MCU20, a built-in battery 30, an external power supply 40, a first selection switch 51, a second selection switch 52, a third selection switch 53, a DAC module 60, an ADC module 70, and a storage module (not shown). The MCU20 has a power port VCC, a DAC port (unnumbered), an ADC port (unnumbered), a first input-output port IO1, and a second input-output port IO2; the external power supply 40 and the built-in battery 30 are both connected to the power port VCC of the MCU20 through the first selection switch 51 to supply power to the MCU20 respectively; the second selection switch 52 is connected to the clock chip 10, the built-in battery 30, the first input-output port IO1 of the MCU20, and the DAC module 60, and the DAC module 60 is also connected to the DAC port of the MCU20 to supply power to the clock chip 10 respectively; the clock chip 10 is connected to the crystal oscillator U, the second input-output port IO1 of the MCU20, and the DAC module 60 is connected to the DAC port of the MCU20 to supply power to the clock chip 10 respectively. The capacitor C and the MCU20 are connected to generate a counting time according to the clock frequency provided by the crystal oscillator U and send it to the MCU20; the third selection switch 53 is connected to the crystal oscillator U, the second input and output port IO2 of the MCU20, and is connected to an external frequency meter (not shown). The MCU20 is also connected to the storage module. The clock frequency is pre-calibrated and sampled through the frequency meter under the control of the MCU20, and the sampled clock frequency is stored in the storage module as the calibration frequency; the ADC module 70 is connected to the built-in battery 30 and the ADC port of the MCU20 to collect the real-time voltage of the built-in battery 30. During normal operation, when the first selection switch 51 and the second selection switch 52 select the built-in battery 30 to power the MCU20 and the clock chip 10, the real-time voltage of the built-in battery 30 is provided to the MCU20 as the current actual working voltage, and the MCU20 performs timing according to the actual working voltage and the calibration frequency.
[0027] in, Figure 1 The connection line between the clock chip 10 and the MCU20 is omitted. In a specific embodiment, the clock chip 10 and the MCU20 can be connected through their respective I2C interfaces. The timing circuit of the present invention pre-calibrates and samples the clock frequency of the crystal oscillator U, and saves the sampled clock frequency as the calibration frequency. When the actual timing of normal operation is performed, the timing is performed according to the current actual working voltage and the saved calibration frequency, so the timing is more accurate. In order to be able to perform calibration sampling, the timing circuit of the present invention is provided with a third selection switch 53, and is controlled by the second input and output port IO2 of the MCU20, and the clock frequency of the crystal oscillator U is exported to an output port out, so that the frequency meter can be sampled at this output port out, because in a general timing circuit, the crystal oscillator only provides the clock frequency to the clock chip, and does not make another output. Moreover, in a specific embodiment, the frequency meter can also be connected to the MCU20 via a USB interface, so that the frequency meter can directly send the clock frequency to the MCU20 after sampling, and the MCU20 then saves the received clock frequency as the calibration frequency to the storage module. Because many existing frequency meters have begun to have a secondary programming function, users can perform corresponding programming according to current actual needs to achieve data communication between the frequency meter and other devices (such as the MCU20 in the present invention).
[0028] In a specific embodiment, during calibration, the first selection switch 51 selects the external power supply 40 to power the MCU 20, and the second selection switch 52 selects the output of the DAC module 60 as the calibration voltage to provide to the clock chip 10 according to the control of the first input / output port IO1 of the MCU 20, and the input of the DAC module 60 is provided by the MCU 20 according to the external power supply 40. That is, during calibration, the external power supply 40 is used to power the MCU 20 and the clock chip 10. On the one hand, the external power supply 40 directly powers the MCU 20 through the selection of the first selection switch 51 (controlled by an input signal in), and on the other hand, it is further converted by the internal voltage of the MCU 20 to step down and then powers the clock chip 10 through the DAC module and the selection of the second selection switch 52 (controlled by the first input / output port IO1). Because the accuracy of the external power supply 40 is relatively high, the accuracy of the calibration voltage and the calibration frequency can be guaranteed. It should be supplemented that in normal operation, the second selection switch 52 will always select the built-in battery 30 to power the clock chip 10, regardless of whether there is an external power supply 40. A charging module (not shown) is also provided between the external power supply 40 and the built-in battery 30. When there is an external power supply 40, the first selection switch 51 selects the external power supply 40 to supply power to the MCU 20 chip, and at the same time, the charging module charges the built-in battery 30 to ensure that the built-in battery 30 has sufficient power. The built-in battery 30 further supplies power to the clock chip 10 through the second selection switch 52. When there is no external power supply 40, the first selection switch 51 selects the built-in battery 30 to supply power to the MCU 20 chip, and at the same time, the built-in battery 30 also supplies power to the clock chip 10 through the second selection switch 52. Correspondingly, the DAC module 60 is also specially provided for calibration sampling in the present invention, and does not participate in the work during normal operation.
[0029] In a specific embodiment, the number of the calibration frequencies stored in the storage module is N, N is greater than or equal to 1, each calibration frequency corresponds to a calibration voltage, and the N calibration voltages and N calibration frequencies together constitute a calibration sequence table. As described in the background technology, when the built-in battery 30 works for a long time, the voltage will slowly drop, so the clock chip 10 will slowly work at different voltages, so it is also necessary to calibrate at different voltages during calibration. In a specific embodiment, according to the normal working voltage range of the clock chip 10 (which will be indicated in its user manual), a step value can be set according to actual needs, and then the minimum value of the working voltage range gradually starts calibration sampling until the maximum value of the working voltage range is reached. During calibration, the working voltage of the clock chip 10 itself is provided by the MCU20 through the DAC module 60, so the MCU20 itself knows the different working voltages of the clock chip 10, that is, the different calibration voltages, and only needs the frequency meter to provide the clock frequency, which can be saved as the calibration frequency together with the corresponding calibration voltage, thereby finally forming a calibration sequence table containing N groups of calibration voltages and calibration frequencies. In order to further improve the accuracy, the frequency meter can sample multiple times during calibration sampling, and after the frequency meter obtains multiple frequencies that are continuously stable, the average value is sent to MCU20, and then the next calibration voltage is switched for calibration sampling. It is further supplemented that, considering the actual differences between different devices, each device needs to be calibrated as described in the present invention.
[0030] After the calibration is completed, it can be used normally for normal timing. In a specific embodiment, when the MCU 20 is timing, correction is performed according to the following formula:
[0031] Among them, t current is the actual counting time after the current correction by MCU20, t is the counting time currently provided by the clock chip 10, and f current is the clock frequency corrected according to the current actual working voltage and the calibrated frequency, and f is the standard clock frequency constant of 32.768kHz;
[0032] Among them, V current is the actual working voltage at present, V n and V n+1 The actual working voltage V current The two adjacent calibration voltages, f n and f n+1 is the calibration frequency corresponding to the two calibration voltages, and n+1 is less than or equal to N.
[0033] Among them, V 1 and V NThe minimum and maximum values of the working voltage range of the clock chip 10 correspond to the minimum and maximum values. That is, the timing circuit of the present invention does not directly use the counting time provided by the clock chip 10 for timing, because under different working voltages, the clock frequency provided by the crystal oscillator will have deviations, so the counting time provided by the clock chip 10 will also be inaccurate. The present invention, on the other hand, performs correction based on the current actual working voltage and the calibration frequency (and calibration voltage) saved during the previous calibration on the basis of the counting time currently provided by the clock chip 10, thereby improving the accuracy of timing. During the correction, because the current actual working voltage V of the built-in battery 30 is current It is not necessarily the same as a calibration voltage in the calibration sequence table, but is often between two calibration voltages. Therefore, look for the actual working voltage V in the calibration sequence table. current The two adjacent calibration voltages are then further searched for the corresponding two calibration frequencies, and then according to the formula Correct the clock frequency; then use the formula Correct the counting time, because the current clock frequency may deviate at any time, and the corresponding counting time may deviate, so the standard clock frequency constant f is used as the relative basis for correction, and the ratio of the difference between the current clock frequency and the standard clock frequency constant to the standard clock frequency constant is used as the correction ratio. If the current clock frequency is too fast (relative to the standard clock frequency constant, that is, f current greater than f), the corresponding current counting time will be relatively large, but ff current is a negative value, so the current counting time can be corrected back; if the current clock frequency is slow (relative to the standard clock frequency constant, that is, f current is less than f), the corresponding current counting time will be relatively small, but ff current If the value is positive, the current counting time can also be corrected back, so the present invention improves the accuracy of the counting time through correction.
[0034] The technicians further found that the voltage on the clock chip 10 is different from the voltage on the built-in battery 30 and the voltage output by the DAC module 60. Therefore, please refer to Figure 2As shown, in another specific embodiment, the ADC module 70 is connected to the clock chip 10, and the real-time working voltage of the clock chip 10 is collected as the calibration voltage for calibration during calibration, and the real-time working voltage of the clock chip 10 is collected as the actual working voltage for timing during normal operation. Of course, it can be easily understood according to the above description that under this embodiment, when the MCU20 controls the calibration, it still calibrates and samples from the minimum value of the working voltage range of the clock chip 10 in the above manner, and then gradually increases according to the step value until the maximum value of the working voltage range is reached, but the calibration voltage saved at this time is not the voltage output by the MCU20 through the DAC module 60, but the voltage on the clock chip 10 sampled by the ADC module 70. In this way, the voltage of the clock chip 10 is also collected as the actual working voltage for timing correction during normal operation. In this way, the accuracy is further improved.
[0035] The second embodiment of the present invention provides a timing method of a real-time clock, the timing method adopts the timing circuit as described above, the timing method includes: pre-calibrating and sampling the clock frequency of the crystal oscillator U received by the clock chip 10 through a frequency meter under the control of MCU20, and storing the sampled clock frequency as the calibration frequency in the storage module, in normal operation, when the first selection switch 51 and the second selection switch 52 select the built-in battery 30 to supply power to the MCU20 and the clock chip 10, the MCU20 performs timing according to the actual working voltage and the calibration frequency. Similarly, the timing method of the present invention calibrates and samples the clock frequency of the crystal oscillator U in advance, and stores the sampled clock frequency as the calibration frequency. When the actual timing is performed in normal operation, the timing is performed according to the current actual working voltage and the stored calibration frequency, so the timing is more accurate.
[0036] Specifically, in one embodiment, during calibration, the first selection switch 51 selects the external power supply 40 to supply power to the MCU 20, and the second selection switch 52 selects the output of the DAC module 60 as the calibration voltage to supply power to the clock chip 10 according to the control of the first input / output port IO1 of the MCU 20, and the input of the DAC module 60 is provided by the MCU 20 according to the external power supply 40; the number of calibration frequencies stored in the storage module is N, N is greater than or equal to 1, each calibration frequency corresponds to a calibration voltage, and the N calibration voltages and the N calibration frequencies together constitute a calibration sequence table;
[0037] When the MCU 20 is timing, correction is performed according to the following formula:
[0038] Among them, t current is the actual counting time after the current correction by MCU20, t is the counting time currently provided by the clock chip 10, and f currentis the clock frequency corrected according to the current actual working voltage and the calibrated frequency, and f is the standard clock frequency constant of 32.768kHz;
[0039] Among them, V current is the actual working voltage at present, V n and V n+1 The actual working voltage V current The two adjacent calibration voltages, f n and f n+1 is the calibration frequency corresponding to the two calibration voltages, and n+1 is less than or equal to N.
[0040] The principle is exactly the same as that described in the previous introduction to the timing circuit, so I will not repeat it here.
[0041] Similarly, in another embodiment, the ADC module 70 is connected to the clock chip 10, and the real-time working voltage of the clock chip 10 is collected as the calibration voltage for calibration during calibration, and the real-time working voltage of the clock chip 10 is collected as the actual working voltage for timing during normal operation. In this embodiment, the accuracy is higher.
[0042] Compared with the prior art, the technical solution of the present invention has the following beneficial effects:
[0043] The timing circuit and timing method of the real-time clock of the present invention calibrate and sample the clock frequency of the crystal oscillator in advance, and save the sampled clock frequency as the calibration frequency. When timing in normal working operation, timing is performed according to the current actual working voltage and the saved calibration frequency, so the timing is relatively accurate.
[0044] The above is only a specific implementation of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be covered within the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims. In addition, the specification uses specific examples to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. The content of this specification should not be understood as a limitation on the present invention.
Claims
1. A timing circuit for a real-time clock, characterized in that: The timing circuit includes a clock chip, a crystal oscillator, a capacitor, an MCU, a built-in battery, an external power supply, a first selection switch, a second selection switch, a third selection switch, a DAC module, an ADC module, and a storage module. The MCU has a power port, a DAC port, an ADC port, a first input / output port, and a second input / output port; the external power supply and the built-in battery are both connected to the power port of the MCU through the first selection switch to supply power to the MCU respectively; the second selection switch is connected to the clock chip, the built-in battery, the first input / output port of the MCU, and the DAC module, and the DAC module is also connected to the DAC port of the MCU to supply power to the clock chip respectively; the clock chip is connected to the crystal oscillator, the capacitor, and the MCU to generate a timing signal according to the clock frequency provided by the crystal oscillator. The third selection switch is connected to the crystal oscillator, the second input and output port of the MCU, and is connected to an external frequency meter. The MCU is also connected to the storage module. The clock frequency is pre-calibrated and sampled through the frequency meter under the control of the MCU, and the sampled clock frequency is stored in the storage module as the calibration frequency; the ADC module is connected to the built-in battery and to the ADC port of the MCU to collect the real-time voltage of the built-in battery. In normal operation, when the first selection switch and the second selection switch select the built-in battery to power the MCU and the clock chip, the real-time voltage of the built-in battery is provided to the MCU as the current actual working voltage, and the MCU performs timing according to the actual working voltage and the calibration frequency.
2. The timing circuit according to claim 1, characterized in that: During calibration, the first selection switch selects the external power supply to power the MCU, and the second selection switch selects the output of the DAC module as the calibration voltage to power the clock chip according to the control of the first input and output port of the MCU, and the input of the DAC module is provided by the MCU according to the external power supply.
3. The timing circuit according to claim 2, characterized in that: The number of the calibration frequencies stored in the storage module is N, where N is greater than or equal to 1, each calibration frequency corresponds to a calibration voltage, and the N calibration voltages and the N calibration frequencies together constitute a calibration sequence table.
4. The timing circuit according to claim 3, characterized in that: When the MCU is timing, correction is performed according to the following formula: Among them, t current is the actual counting time after the MCU is currently calibrated, t is the counting time currently provided by the clock chip, and f current is the clock frequency corrected according to the current actual working voltage and the calibrated frequency, and f is the standard clock frequency constant of 32.768kHz; Among them, V current is the actual working voltage at present, V n and V n+1 The actual working voltage V current The two adjacent calibration voltages, f n and f n+1 is the calibration frequency corresponding to the two calibration voltages, and n+1 is less than or equal to N.
5. The timing circuit according to claim 4, characterized in that: V1 and V N Corresponding to the minimum and maximum values of the operating voltage range of the clock chip.
6. The timing circuit according to claim 1, characterized in that: The MCU is also connected to the frequency meter via a USB interface to receive the clock frequency sampled by the frequency meter as the calibration frequency.
7. The timing circuit according to claim 1, characterized in that: The ADC module is connected to the clock chip, and collects the real-time working voltage of the clock chip as the calibration voltage for calibration during calibration, and collects the real-time working voltage of the clock chip as the actual working voltage for timing during normal operation.
8. A timing method of a real-time clock, characterized in that: The timing method adopts the timing circuit as described in any one of claims 1 to 7, and the timing method includes: calibrating and sampling the clock frequency of the crystal oscillator received by the clock chip through a frequency meter under the control of the MCU in advance, and storing the sampled clock frequency as the calibration frequency in a storage module. During normal operation, when the first selection switch and the second selection switch select the built-in battery to power the MCU and the clock chip, the MCU performs timing according to the actual working voltage and the calibration frequency.
9. The timing method according to claim 8, characterized in that: During calibration, the first selection switch selects to supply power to the MCU with an external power supply, and the second selection switch selects the output of the DAC module as the calibration voltage to supply power to the clock chip according to the control of the first input / output port of the MCU, and the input of the DAC module is provided by the MCU according to the external power supply; the number of calibration frequencies stored in the storage module is N, N is greater than or equal to 1, each calibration frequency corresponds to a calibration voltage, and the N calibration voltages and the N calibration frequencies together constitute a calibration sequence table; When the MCU is timing, correction is performed according to the following formula: Among them, t current is the actual counting time after the MCU is currently calibrated, t is the counting time currently provided by the clock chip, and f current is the clock frequency corrected according to the current actual working voltage and the calibrated frequency, and f is the standard clock frequency constant of 32.768kHz; Among them, V current is the actual working voltage at present, V n and V n+1 The actual working voltage V current The two adjacent calibration voltages, f n and f n+1 is the calibration frequency corresponding to the two calibration voltages, and n+1 is less than or equal to N.
10. The timing method according to claim 9, characterized in that: The ADC module is connected to the clock chip. During calibration, the real-time working voltage of the clock chip is collected as the calibration voltage for calibration. During normal operation, the real-time working voltage of the clock chip is collected as the actual working voltage for timing.