CN102545778B - Closed-loop temperature compensation method and device for clock crystal oscillator - Google Patents

Closed-loop temperature compensation method and device for clock crystal oscillator Download PDF

Info

Publication number
CN102545778B
CN102545778B CN201010616495.2A CN201010616495A CN102545778B CN 102545778 B CN102545778 B CN 102545778B CN 201010616495 A CN201010616495 A CN 201010616495A CN 102545778 B CN102545778 B CN 102545778B
Authority
CN
China
Prior art keywords
frequency
temperature
impulse number
frequency impulse
frequency signal
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
CN201010616495.2A
Other languages
Chinese (zh)
Other versions
CN102545778A (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.)
Xiamen Galaxy Longxin Technology Co ltd
Original Assignee
YINHE LONGXIN SCIENCE AND TECHNOLOGY Co Ltd SUZHOU
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 YINHE LONGXIN SCIENCE AND TECHNOLOGY Co Ltd SUZHOU filed Critical YINHE LONGXIN SCIENCE AND TECHNOLOGY Co Ltd SUZHOU
Priority to CN201010616495.2A priority Critical patent/CN102545778B/en
Publication of CN102545778A publication Critical patent/CN102545778A/en
Application granted granted Critical
Publication of CN102545778B publication Critical patent/CN102545778B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Oscillators With Electromechanical Resonators (AREA)
  • Electric Clocks (AREA)

Abstract

The invention provides a closed-loop temperature compensation method and a closed-loop temperature compensation device for a clock crystal oscillator. A second pulse of a 32768Hz quartz crystal is continuously corrected by using an accurate high-frequency quartz crystal until the number of high-frequency pulses of a high-frequency pulse signal which is read in a time gate generated by the 32768Hz quartz crystal is equal to that of the high-frequency pulses which are theoretically accurate. Because the 32768Hz quartz crystal can be calibrated at any temperature, the frequency offset of the 32768Hz quartz crystal caused by temperature difference is compensated. In a closed-loop temperature compensation mode which is provided by the embodiment of the invention, the frequency temperature characteristic curve shape of a clock crystal is unrelated, and consistency is not required. Therefore, by adoption of a temperature soft compensation method provided by the invention, accurate temperature compensation can be realized. The cost of the temperature soft compensation method is low, and the size of a corresponding system is small.

Description

A kind of closed-loop temperature compensation of clock crystal oscillator method and apparatus
Technical field
The present invention relates to clock accuracy technique for temperature compensation field, particularly a kind of closed-loop temperature compensation of clock crystal oscillator method and apparatus.
Background technology
At present, except requiring extra high standard source, the high precision clock frequency of using in industry and daily life is mainly from quartz oscillator.The frequency of the quartz oscillator that at present, clock is used is both at home and abroad 32768Hz.
Referring to accompanying drawing 1, this figure is the frequency-temperature characteristic curve chart of 32768Hz quartz oscillator.The frequency departure of 32768Hz quartz oscillator within the scope of-30 to+60 ℃ is about (+40) ppm to (150) ppm (ppm represent 1,000,000/) than Δ F/F, and the clocking error producing every day like this can reach more than 15 seconds.
Therefore, if reach higher clock accuracy, need to carry out temperature-compensating to the frequency departure of quartz oscillator, current temperature-compensating comprises two kinds of hard benefit and soft benefits.
Hard benefit is mainly that the hard cost of mending is higher, and whole volume is larger from the enterprising trip temperature compensation of hardware, is not suitable for the little and low occasion of cost of clock volume.
The method of soft benefit is mainly to have MCU chip to come across the occasion of identical product simultaneously, utilize the good 32768Hz quartz crystal of frequency-temperature characteristic curve conformity of quartz oscillator as the independent real-time clock (RTC hanging in MCU chip, Real-Time Clock) the outer crystal of circuit, utilize MCU inside/outside portion sensor for measuring temperature detected temperatures value, the frequency temperature deviate that show that by searching frequency-temperature characteristic curve table this temperature value is corresponding, MCU realizes compensation correction by revising pulse per second (PPS) frequency division value (32768 ± N, N is real-time correction value).
This soft compensating method cost is lower at present, but because it is open-loop compensation, any one goes wrong the consistency of the consistency of the reference voltage that the consistency of frequency-temperature characteristic curve conformity, temperature sensor, A/D gather, the manufacture of the inner A/D Acquisition Circuit of MCU etc., all cannot guarantee final compensation result.If have any one or multinomial going wrong, will cause compensation result inaccurate.
Summary of the invention
The technical problem to be solved in the present invention is to provide a kind of closed-loop temperature compensation of clock crystal oscillator method and apparatus, and cost is low, and volume is little, and compensation result is accurate.
The invention provides a kind of closed-loop temperature compensation of clock crystal oscillator method, comprise the following steps:
Obtaining default high-frequency signal expression formula of the temperature T in the unit interval and high-frequency impulse number Pt in every section of broken line is: Pt=(a*T+b); Wherein, a, b are constant; The frequency-temperature characteristic curve of described default high-frequency signal is sectional broken line, in every section of broken line, is straight line;
When temperature T, read the high-frequency impulse number Pt1 of the described default high-frequency signal in the scheduled time gate that 32768Hz quartz crystal produces;
When temperature T, by Pt=(a*T+b), calculate the theoretical high-frequency impulse number Pt2 of described default high-frequency signal in described scheduled time gate;
The high-frequency impulse number Pt1 relatively reading and corresponding theoretical high-frequency impulse number Pt2;
When the high-frequency impulse number Pt1 reading is greater than theoretical high-frequency impulse number Pt2, regulate the narrowed width of the pulse per second (PPS) of quartzy 32768Hz crystal generation; Otherwise regulate the width of the pulse per second (PPS) of 32768Hz quartz crystal generation to broaden; Until the high-frequency impulse number Pt1 reading equates with theoretical high-frequency impulse number Pt2.
Preferably, described temperature T is obtained by temperature sensor, the AD collection value N that temperature sensor obtains aDbecome piecewise linear relationship with temperature T, expression formula is: T=Kn*N aD; Wherein, Kn is the proportionality coefficient of n section.
Preferably, the expression formula of the default high-frequency signal of described the acquisition temperature T in the unit interval and high-frequency impulse number Pt in every section of broken line, is specially:
When the first temperature T 1, the high-frequency impulse number that obtains described high-frequency signal in M standard second burst length is P1; When the second temperature T 2, the high-frequency impulse number that obtains described high-frequency signal in M standard second burst length is P2;
The temperature T of this default high-frequency signal in the unit interval and the expression formula of high-frequency impulse number Pt are: Pt=(a*T+b); Wherein, a=(P1-P2)/[M* (T1-T2)]; B=(P1T1-P2T2)/[M (T1-T2)].
Preferably, the narrowed width of the pulse per second (PPS) that described adjusting 32768Hz quartz crystal produces or broaden, is specially: by regulating the clock division coefficient of 32768Hz quartz crystal regulate the narrowed width of pulse per second (PPS) or broaden.
Preferably, the frequency of described default high-frequency signal is more than or equal to 1MHz.
The present invention also provides a kind of closed-loop temperature compensation of clock crystal oscillator device, comprises with lower unit:
The expression formula acquiring unit of default high-frequency signal, for obtaining default high-frequency signal expression formula of the temperature T in the unit interval and high-frequency impulse number Pt in every section of broken line is: Pt=(a*T+b); Wherein, a, b are constant; The frequency-temperature characteristic curve of described default high-frequency signal is sectional broken line, in every section of broken line, is straight line;
High-frequency impulse number reading unit, for when the temperature T, reads the high-frequency impulse number Pt1 of the described default high-frequency signal in the scheduled time gate that 32768Hz quartz crystal produces;
Computing unit, for when the temperature T, calculates the theoretical high-frequency impulse number Pt2 of described default high-frequency signal in described scheduled time gate by Pt=(a*T+b);
Comparing unit, for the high-frequency impulse number Pt1 that relatively reads and corresponding theoretical high-frequency impulse number Pt2;
Pulse per second (PPS) regulon, when the comparative result of comparing unit is the high-frequency impulse number Pt1 that reads while being greater than theoretical high-frequency impulse number Pt2, for regulating the narrowed width of the pulse per second (PPS) that 32768Hz quartz crystal produces; Otherwise for regulating the width of the pulse per second (PPS) of 32768Hz quartz crystal generation to broaden; Until be adjusted to the high-frequency impulse number Pt1 reading, equate with theoretical high-frequency impulse number Pt2.
Preferably, also comprise temperature collecting cell, the AD collection value N of temperature collecting cell aDbecome piecewise linear relationship with temperature T, expression formula is: T=Kn*N aD; Wherein, Kn is the proportionality coefficient of n section.
Preferably, the expression formula acquiring unit of described default high-frequency signal, for obtaining the expression formula of the default high-frequency signal temperature T in the unit interval and high-frequency impulse number Pt in every section of broken line, is specially:
When the first temperature T 1, the high-frequency impulse number that obtains described high-frequency signal in M standard second burst length is P1; When the second temperature T 2, the high-frequency impulse number that obtains described high-frequency signal in M standard second burst length is P2;
The temperature T of this default high-frequency signal in the unit interval and the expression formula of high-frequency impulse number Pt are: Pt=(a*T+b); Wherein, a=(P1-P2)/[M* (T1-T2)]; B=(P1T1-P2T2)/[M (T1-T2)].
Preferably, described pulse per second (PPS) regulon for by regulate 32768Hz quartz crystal the pulse per second (PPS) of clock division coefficient adjustment narrowed width or broaden.
Preferably, the frequency of described default high-frequency signal is more than or equal to 1MHz.
Compared with prior art, the present invention has the following advantages:
The closed-loop temperature compensation of clock crystal oscillator method and apparatus that the embodiment of the present invention provides, by the pulse per second (PPS) that high frequency quartz crystal is constantly proofreaied and correct 32768Hz quartz crystal accurately, until the high-frequency impulse number of the high-frequency pulse signal reading in the time gate producing at 32768Hz quartz crystal is with high-frequency impulse number is identical accurately in theory, owing to can all 32768Hz quartz crystal being calibrated, therefore compensated 32768Hz quartz crystal due to the different frequency departures that produce of temperature under arbitrary temp.Due to the closed loop thermal compensation way that the embodiment of the present invention adopts, therefore irrelevant with the frequency-temperature characteristic curve shape of clock crystal, more do not require consistency.Therefore the soft compensating method of temperature that, the present embodiment provides can be realized accurate temperature-compensating.And the cost of soft compensating method itself is lower, corresponding system bulk is less.
Accompanying drawing explanation
Fig. 1 is the frequency-temperature characteristic curve chart of 32768Hz quartz oscillator;
Fig. 2 is closed-loop temperature compensation of clock crystal oscillator embodiment of the method one flow chart provided by the invention;
Fig. 3 is closed-loop temperature compensation of clock crystal oscillator device embodiment provided by the invention mono-structure chart;
Fig. 4 is closed-loop temperature compensation of clock crystal oscillator device embodiment provided by the invention bis-structure charts.
Embodiment
For those skilled in the art being understood better and implementing technical scheme of the present invention, introduce several technical terms related to the present invention below.
Quartz oscillator: be a kind of resonating device that utilizes the piezoelectric effect of quartz crystal (crystalline solid of silicon dioxide) to make, its basic comprising is roughly: from a quartz crystal, by certain azimuth, cut thin slice (referred to as wafer, it can be square, rectangle or circle etc.), on its two corresponding surfaces, apply silver layer as electrode, on each electrode, respectively welding a lead-in wire receives on pin, add package casing and just formed quartz-crystal resonator, referred to as quartz crystal or crystal oscillator.
32768Hz quartz crystal Chang Zuowei clock crystal.
For above-mentioned purpose of the present invention, feature and advantage can be become apparent more, below in conjunction with accompanying drawing, the specific embodiment of the present invention is described in detail.
Referring to Fig. 2, this figure is closed-loop temperature compensation of clock crystal oscillator embodiment of the method one flow chart provided by the invention.
The closed-loop temperature compensation of clock crystal oscillator method that the embodiment of the present invention provides, comprises the following steps:
S201: obtaining default high-frequency signal expression formula of the temperature T in the unit interval and high-frequency impulse number Pt in every section of broken line is:
Pt=(a*T+b) (1)
Wherein, a, b are constant; The frequency-temperature characteristic curve of described default high-frequency signal is sectional broken line, in every section of broken line, is straight line;
The frequency-temperature characteristic curve of the default high-frequency signal that the present embodiment is selected is sectional broken line, and every section of broken line is straight line, and T and Pt are linear relationship like this.
Default high-frequency signal in the present embodiment can be produced by any high frequency quartz oscillator, and optimized frequency is quartz oscillator more than 1MHz, and what the present invention selected is the quartz oscillator of 16MHz.
S202: when temperature T, read the high-frequency impulse number Pt1 of the described default high-frequency signal in the scheduled time gate that 32768Hz quartz crystal produces;
For example, scheduled time gate is N second, and the N producing at 32768Hz quartz crystal reads the high-frequency impulse number Pt1 of default high-frequency signal in second;
It should be noted that, Pt1 is that the N producing at 32768Hz quartz crystal read in second, and this N second is coarse.
S203: when temperature T, calculate the theoretical high-frequency impulse number Pt2 of described default high-frequency signal in described scheduled time gate by Pt=(a*T+b);
It should be noted that, scheduled time gate is N second, and corresponding standard time gate is also N second, and just Pt2 is obtained by formula (1), and formula (1) is to obtain under the standard time, and therefore corresponding time gate is also standard.
Owing to having been obtained high-frequency impulse number corresponding to any temperature in the unit interval by S201, therefore, by formula (1), can calculate theoretical high-frequency impulse number in any temperature, any time section.While varying with temperature due to this high-frequency signal, frequency shift (FS) is very little, and therefore, corresponding pulse per second (PPS) is very accurate.
It should be noted that S202 and the S203 sequencing that has no time.
S204: the high-frequency impulse number Pt1 relatively reading and corresponding theoretical high-frequency impulse number Pt2;
Because the pulse per second (PPS) of high-frequency signal is very accurate, therefore with this high-frequency signal, as benchmark, proofread and correct 32768Hz quartz crystal.If 32768Hz quartz crystal is also very accurate, the high-frequency impulse number Pt1 reading so and corresponding theoretical high-frequency impulse number Pt2 should equate.
S205: when the high-frequency impulse number Pt1 reading is greater than theoretical high-frequency impulse number Pt2, regulate the narrowed width of the pulse per second (PPS) of quartzy 32768Hz crystal generation; Otherwise regulate the width of the pulse per second (PPS) of 32768Hz quartz crystal generation to broaden; Until the high-frequency impulse number Pt1 reading equates with theoretical high-frequency impulse number Pt2.
The closed-loop temperature compensation of clock crystal oscillator method that the embodiment of the present invention provides, by the pulse per second (PPS) that high frequency quartz crystal is constantly proofreaied and correct 32768Hz quartz crystal accurately, until the high-frequency impulse number of the high-frequency pulse signal reading in the time gate producing at 32768Hz quartz crystal is with high-frequency impulse number is identical accurately in theory, owing to can all 32768Hz quartz crystal being calibrated, therefore compensated 32768Hz quartz crystal due to the different frequency departures that produce of temperature under arbitrary temp.Due to the closed loop thermal compensation way that the embodiment of the present invention adopts, therefore irrelevant with the frequency-temperature characteristic curve shape of clock crystal, more do not require consistency.Therefore the soft compensating method of temperature that, the present embodiment provides can be realized accurate temperature-compensating.And the cost of soft compensating method itself is lower, corresponding system bulk is less.
Introduce and how to obtain the temperature T of this default high-frequency signal in the unit interval and the expression formula of high-frequency impulse number Pt below.
Owing to presetting the frequency-temperature characteristic curve of high-frequency signal, it is sectional broken line, every section of broken line is straight line, therefore can obtain by the straight line expression formula of two point form the temperature T of this default high-frequency signal in the unit interval and the expression formula of high-frequency impulse number Pt, be specially:
When the first temperature T 1, the high-frequency impulse number that obtains described high-frequency signal in M standard second burst length is P1; When the second temperature T 2, the high-frequency impulse number that obtains described high-frequency signal in M standard second burst length is P2;
The temperature T of this default high-frequency signal in the unit interval and the expression formula of high-frequency impulse number Pt are: Pt=(a*T+b); Wherein, a=(P1-P2)/[M* (T1-T2)]; B=(P1T1-P2T2)/[M (T1-T2)].
It should be noted that, because the slope of straight line corresponding to every section of broken line is different, therefore, can search corresponding broken line by temperature T, then obtain the expression formula of corresponding temperature T and high-frequency impulse number Pt.
Be understandable that, by the high-frequency impulse number in M standard second pulse, can obtain the high-frequency impulse number in the unit interval.When M numerical value is larger, the high-frequency impulse number in the unit interval of acquisition is more accurate.
Temperature T in the embodiment of the present invention can be obtained by temperature sensor, the temperature AD collection value N that temperature sensor obtains aDbecome piecewise linear relationship with temperature T, expression formula is: T=Kn*N aD; Wherein, Kn is the proportionality coefficient of n section.
That in the present embodiment, adopt is AD collection value N aD, the reference voltage therefore gathering with temperature absolute value and AD is, the manufacture of AD Acquisition Circuit itself is irrelevant, thereby do not need the consistency of temperature sensor, the consistency of the inner A/D Acquisition Circuit manufacture of the consistency of the reference voltage that A/D gathers and MCU.
The narrowed width of the pulse per second (PPS) that described adjusting 32768Hz quartz crystal produces or broaden, is specially: can be by regulating the clock division coefficient of 32768Hz quartz crystal regulate the narrowed width of pulse per second (PPS) or broaden.When divide ratio is larger, the width of pulse per second (PPS) is wider, otherwise narrower.
It should be noted that, the closed loop thermal compensation method that the embodiment of the present invention provides is by the pulse per second (PPS) output after adjusting, and the while is as the benchmark of new scheduled time gate.For example, the M value of scheduled time gate is 5 seconds, and 5 pulse per second (PPS)s after adjusting are as the time gate of counting high-frequency impulse.
Closed loop thermal compensation method provided by the invention is simple in structure, and it is convenient to control, and without special processes requirement, is applicable to the occasion of using in enormous quantities, and cost is low.
Method based on above-mentioned closed-loop temperature compensation of clock crystal oscillator, the present invention also provides the device of closed-loop temperature compensation of clock crystal oscillator, below in conjunction with specific embodiment, describes its part in detail.
Referring to Fig. 3, this figure is closed-loop temperature compensation of clock crystal oscillator device embodiment provided by the invention mono-structure chart.
The closed-loop temperature compensation of clock crystal oscillator device that the embodiment of the present invention provides, comprises with lower unit:
The expression formula acquiring unit 401 of default high-frequency signal, for obtaining default high-frequency signal expression formula of the temperature T in the unit interval and high-frequency impulse number Pt in every section of broken line is: Pt=(a*T+b); Wherein, a, b are constant; The frequency-temperature characteristic curve of described default high-frequency signal is sectional broken line, in every section of broken line, is straight line;
High-frequency impulse number reading unit 402, for when the temperature T, reads the high-frequency impulse number Pt1 of the described default high-frequency signal in the scheduled time gate that 32768Hz quartz crystal produces;
Computing unit 403, for when the temperature T, calculates the theoretical high-frequency impulse number Pt2 of described default high-frequency signal in described scheduled time gate by Pt=(a*T+b);
Comparing unit 404, for the high-frequency impulse number Pt1 that relatively reads and corresponding theoretical high-frequency impulse number Pt2;
Pulse per second (PPS) regulon 405, when the comparative result of comparing unit 404 is the high-frequency impulse number Pt1 that reads while being greater than theoretical high-frequency impulse number Pt2, for regulating the narrowed width of the pulse per second (PPS) that 32768Hz quartz crystal produces; Otherwise for regulating the width of the pulse per second (PPS) of 32768Hz quartz crystal generation to broaden; Until be adjusted to the high-frequency impulse number Pt1 reading, equate with theoretical high-frequency impulse number Pt2.
The closed-loop temperature compensation of clock crystal oscillator device that the embodiment of the present invention provides, by the pulse per second (PPS) that high frequency quartz crystal is constantly proofreaied and correct 32768Hz quartz crystal accurately, until the high-frequency impulse number of the high-frequency pulse signal reading in the time gate producing at 32768Hz quartz crystal is with high-frequency impulse number is identical accurately in theory, owing to can all 32768Hz quartz crystal being calibrated, therefore compensated 32768Hz quartz crystal due to the different frequency departures that produce of temperature under arbitrary temp.What adopt due to the embodiment of the present invention is closed loop thermal compensation way, therefore irrelevant with the frequency-temperature characteristic curve shape of clock crystal, does not more require consistency.Therefore the soft compensating method of closed loop thermal that, the present embodiment provides can be realized accurate temperature-compensating.And the cost of soft compensating method itself is lower, corresponding system bulk is less.
How the expression formula acquiring unit 401 of introducing default high-frequency signal below obtains the temperature T of this default high-frequency signal in the unit interval and the expression formula of high-frequency impulse number Pt.
Owing to presetting the frequency-temperature characteristic curve of high-frequency signal, it is sectional broken line, every section of broken line is straight line, therefore can by the straight line expression formula of two point form, obtain the temperature T of this default high-frequency signal in the unit interval and the expression formula of high-frequency impulse number Pt in every section of broken line, be specially:
When the first temperature T 1, the high-frequency impulse number that obtains described high-frequency signal in M standard second burst length is P1; When the second temperature T 2, the high-frequency impulse number that obtains described high-frequency signal in M standard second burst length is P2;
The temperature T of this default high-frequency signal in the unit interval and the expression formula of high-frequency impulse number Pt are: Pt=(a*T+b); Wherein, a=(P1-P2)/[M* (T1-T2)]; B=(P1T1-P2T2)/[M (T1-T2)].
It should be noted that, because the slope of straight line corresponding to every section of broken line is different, therefore, can search corresponding broken line by temperature T, then obtain the expression formula of corresponding temperature T and high-frequency impulse number Pt.
Be understandable that, by the high-frequency impulse number in M standard second pulse, can obtain the high-frequency impulse number in the unit interval.When M numerical value is larger, the high-frequency impulse number in the unit interval of acquisition is more accurate.
Temperature T in the embodiment of the present invention can be obtained by temperature sensor, the temperature AD collection value N that temperature sensor obtains aDbecome piecewise linear relationship with temperature T, expression formula is: T=Kn*N aD; Wherein, Kn is the proportionality coefficient of n section.
That in the present embodiment, adopt is AD collection value N aD, the reference voltage therefore gathering with temperature absolute value and AD is, the manufacture of AD Acquisition Circuit itself is irrelevant, thereby do not need the consistency of temperature sensor, the consistency of the inner A/D Acquisition Circuit manufacture of the consistency of the reference voltage that A/D gathers and MCU.
Pulse per second (PPS) regulon 405 regulates the narrowed width of the pulse per second (PPS) that 32768Hz quartz crystals produce or broadens, and is specially: can be by regulating the clock division coefficient of 32768Hz quartz crystal regulate the narrowed width of pulse per second (PPS) or broaden.
It should be noted that, the closed loop thermal compensation method that the embodiment of the present invention provides is by the pulse per second (PPS) output after adjusting, and the while is as the benchmark of new scheduled time gate.For example, the M value of scheduled time gate is 5 seconds, and 5 pulse per second (PPS)s after adjusting are as the time gate of counting high-frequency impulse.
Referring to Fig. 4, this figure is device embodiment bis-structure charts provided by the invention.
It should be noted that, the closed loop thermal compensation arrangement that the embodiment of the present invention provides can be realized by MCU, supposes that MCU has obtained the temperature T of default high-frequency signal in the unit interval in advance and the expression formula of high-frequency impulse number Pt is: Pt=(a*T+b).
Temperature sensor 501 measures ambient temperature, pass to AD by the temperature signal of measurement and adopt unit 502;
The AD that AD adopts unit 502 to obtain temperature gathers N aDthereby the linear relationship by AD collection value and temperature T, obtains temperature T;
Computing unit 503, the high-frequency impulse number Pt2 while calculating the Current Temperatures T in scheduled time gate;
The plug-in high-frequency crystal 509 of MCU is used for producing default high-frequency signal;
The clock signal that 32768Hz quartz crystal 510 produces produces pulse per second (PPS) by frequency divider 507;
The pulse per second (PPS) that scheduled time gate 506 is produced by frequency divider 507 obtains scheduled time gate;
High-frequency impulse number reading unit 505 can have the counter of MCU inside to realize, for read the number Pt1 of the high-frequency impulse of high-frequency crystal generation in scheduled time gate.
Comparing unit 504, for comparing Pt1 and Pt2, sends to pulse per second (PPS) regulon 508 by comparative result;
Pulse per second (PPS) regulon 508, for regulating the divide ratio of frequency divider 507, and then adjusts the pulse per second (PPS) width that 32768Hz produces; Until Pt1 and Pt2 equate.
It should be noted that, the pulse per second (PPS) that frequency divider 507 the produces pulse per second (PPS) after by way of compensation is simultaneously for output.
Closed loop thermal compensation method provided by the invention can utilize the resource of MCU self to complete temperature-compensating, does not need to add in addition hardware, therefore simple in structure, and it is convenient to control, and without special processes requirement, is applicable to the occasion of using in enormous quantities, and cost is low.
The above, be only preferred embodiment of the present invention, not the present invention done to any pro forma restriction.Although the present invention discloses as above with preferred embodiment, yet not in order to limit the present invention.Any those of ordinary skill in the art, do not departing from technical solution of the present invention scope situation, all can utilize method and the technology contents of above-mentioned announcement to make many possible changes and modification to technical solution of the present invention, or be revised as the equivalent embodiment of equivalent variations.Therefore, every content that does not depart from technical solution of the present invention,, all still belongs in the scope of technical solution of the present invention protection any simple modification made for any of the above embodiments, equivalent variations and modification according to technical spirit of the present invention.

Claims (8)

1. a closed-loop temperature compensation of clock crystal oscillator method, is characterized in that, comprises the following steps:
Obtaining default high-frequency signal expression formula of the temperature T in the unit interval and high-frequency impulse number Pt in every section of broken line is: Pt=(a*T+b); Be specially: when the first temperature T 1, the high-frequency impulse number that obtains described high-frequency signal in M standard second burst length is P1; When the second temperature T 2, the high-frequency impulse number that obtains described high-frequency signal in M standard second burst length is P2; The temperature T of this default high-frequency signal in the unit interval and the expression formula of high-frequency impulse number Pt are: Pt=(a*T+b); Wherein, a=(P1-P2)/[M* (T1-T2)]; B=(P1T1-P2T2)/[M (T1-T2)]; Wherein, a, b are constant; The frequency-temperature characteristic curve of described default high-frequency signal is sectional broken line, in every section of broken line, is straight line;
When temperature T, read the high-frequency impulse number Pt1 of the described default high-frequency signal in the scheduled time gate that 32768Hz quartz crystal produces;
When temperature T, by Pt=(a*T+b), calculate the theoretical high-frequency impulse number Pt2 of described default high-frequency signal in described scheduled time gate;
The high-frequency impulse number Pt1 relatively reading and corresponding theoretical high-frequency impulse number Pt2;
When the high-frequency impulse number Pt1 reading is greater than theoretical high-frequency impulse number Pt2, regulate the narrowed width of the pulse per second (PPS) of 32768Hz quartz crystal generation; Otherwise regulate the width of the pulse per second (PPS) of 32768Hz quartz crystal generation to broaden; Until the high-frequency impulse number Pt1 reading equates with theoretical high-frequency impulse number Pt2.
2. method according to claim 1, is characterized in that, described temperature T is obtained by temperature sensor, the AD collection value N that temperature sensor obtains aDbecome piecewise linear relationship with temperature T, expression formula is: T=Kn*N aD; Wherein, Kn is the proportionality coefficient of n section.
3. method according to claim 1, it is characterized in that, the narrowed width of the pulse per second (PPS) that described adjusting 32768Hz quartz crystal produces or broaden, is specially: by regulating the clock division coefficient of 32768Hz quartz crystal regulate the narrowed width of pulse per second (PPS) or broaden.
4. method according to claim 1, is characterized in that, the frequency of described default high-frequency signal is more than or equal to 1MHz.
5. a closed-loop temperature compensation of clock crystal oscillator device, is characterized in that, comprises with lower unit:
The expression formula acquiring unit of default high-frequency signal, for obtaining default high-frequency signal expression formula of the temperature T in the unit interval and high-frequency impulse number Pt in every section of broken line is: Pt=(a*T+b); Be specially: when the first temperature T 1, the high-frequency impulse number that obtains described high-frequency signal in M standard second burst length is P1; When the second temperature T 2, the high-frequency impulse number that obtains described high-frequency signal in M standard second burst length is P2; The temperature T of this default high-frequency signal in the unit interval and the expression formula of high-frequency impulse number Pt are: Pt=(a*T+b); Wherein, a=(P1-P2)/[M* (T1-T2)]; B=(P1T1-P2T2)/[M (T1-T2)]; Wherein, a, b are constant; The frequency-temperature characteristic curve of described default high-frequency signal is sectional broken line, in every section of broken line, is straight line;
High-frequency impulse number reading unit, for when the temperature T, reads the high-frequency impulse number Pt1 of the described default high-frequency signal in the scheduled time gate that 32768Hz quartz crystal produces;
Computing unit, for when the temperature T, calculates the theoretical high-frequency impulse number Pt2 of described default high-frequency signal in described scheduled time gate by Pt=(a*T+b);
Comparing unit, for the high-frequency impulse number Pt1 that relatively reads and corresponding theoretical high-frequency impulse number Pt2;
Pulse per second (PPS) regulon, when the comparative result of comparing unit is the high-frequency impulse number Pt1 that reads while being greater than theoretical high-frequency impulse number Pt2, for regulating the narrowed width of the pulse per second (PPS) that 32768Hz quartz crystal produces; Otherwise for regulating the width of the pulse per second (PPS) of 32768Hz quartz crystal generation to broaden; Until be adjusted to the high-frequency impulse number Pt1 reading, equate with theoretical high-frequency impulse number Pt2.
6. device according to claim 5, is characterized in that, also comprises temperature collecting cell, the AD collection value N of temperature collecting cell aDbecome piecewise linear relationship with temperature T, expression formula is: T=Kn*N aD; Wherein, Kn is the proportionality coefficient of n section.
7. device according to claim 5, is characterized in that, described pulse per second (PPS) regulon is used for by the narrowed width of the clock division coefficient adjustment pulse per second (PPS) of adjusting 32768Hz quartz crystal or broadens.
8. device according to claim 5, is characterized in that, the frequency of described default high-frequency signal is more than or equal to 1MHz.
CN201010616495.2A 2010-12-30 2010-12-30 Closed-loop temperature compensation method and device for clock crystal oscillator Active CN102545778B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201010616495.2A CN102545778B (en) 2010-12-30 2010-12-30 Closed-loop temperature compensation method and device for clock crystal oscillator

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201010616495.2A CN102545778B (en) 2010-12-30 2010-12-30 Closed-loop temperature compensation method and device for clock crystal oscillator

Publications (2)

Publication Number Publication Date
CN102545778A CN102545778A (en) 2012-07-04
CN102545778B true CN102545778B (en) 2014-08-13

Family

ID=46351876

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201010616495.2A Active CN102545778B (en) 2010-12-30 2010-12-30 Closed-loop temperature compensation method and device for clock crystal oscillator

Country Status (1)

Country Link
CN (1) CN102545778B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103970184B (en) * 2013-02-06 2017-05-17 上海东软载波微电子有限公司 Method and device for adjusting real time clock system
CN104065341B (en) * 2013-03-18 2018-06-05 厦门歌乐电子企业有限公司 Crystal oscillator clock compensation method and device
CN104218891A (en) * 2013-06-05 2014-12-17 上海华虹集成电路有限责任公司 Closed-loop temperature compensation device for clock crystal oscillator
CN114020069B (en) * 2021-11-05 2022-12-09 北京北方华创微电子装备有限公司 Temperature adjusting method, temperature adjusting device and semiconductor process equipment

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100471035C (en) * 2004-06-03 2009-03-18 电子科技大学 Temperature-compensating method for quartz crystal oscillator
CN101826850A (en) * 2010-03-19 2010-09-08 北京天碁科技有限公司 Method for controlling working frequency of quartz crystal and reference clock based on quartz crystal

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3901693B2 (en) * 2003-03-28 2007-04-04 沖電気工業株式会社 Oscillation circuit and oscillation circuit control method

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100471035C (en) * 2004-06-03 2009-03-18 电子科技大学 Temperature-compensating method for quartz crystal oscillator
CN101826850A (en) * 2010-03-19 2010-09-08 北京天碁科技有限公司 Method for controlling working frequency of quartz crystal and reference clock based on quartz crystal

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
《数字传感器非线性校正方法研究》;孙鹏;《工业仪表与自动化装置》;20090831(第4期);15-17 *
孙鹏.《数字传感器非线性校正方法研究》.《工业仪表与自动化装置》.2009,(第4期),15-17.

Also Published As

Publication number Publication date
CN102545778A (en) 2012-07-04

Similar Documents

Publication Publication Date Title
CN202059371U (en) Device for realizing compensation of closed loop temperature of clock crystal oscillator
CN103176400B (en) Intelligent ammeter clock calibration method
CN106505996B (en) A kind of RTC chip high-precision frequency bias compensation method of combination variable capacitance
CN106569544B (en) Real-time timepiece chip and its clock correcting method, device
CN102545778B (en) Closed-loop temperature compensation method and device for clock crystal oscillator
JP5782724B2 (en) Oscillator
SE518565C2 (en) Normal frequency generator
CN108593124B (en) NB-IoT (NB-IoT) -supported high-precision temperature sensor
CN106647235B (en) A kind of punctual method wireless for recording type fault detector
CN202059372U (en) Device capable of realizing closed-loop temperature compensation of clock crystal oscillator based on high-frequency crystals
CN107315338A (en) A kind of chronometer time correcting device
JP6282723B2 (en) High-precision timekeeping method for quartz electronic watches
US9342054B2 (en) Apparatus and method of keeping time of day over an industrial temperature range
JP2007078405A (en) Timing program of software timepiece
CN104485954B (en) The control method and time device of a kind of time device
Ruffieux et al. 11.5 A 3.2× 1.5× 0.8 mm3 240nA 1.25-to-5.5 V 32kHz-DTCXO RTC module with an overall accuracy of µ1ppm and an all-digital 0.1 ppm compensation-resolution scheme at 1Hz
CN116106605A (en) Electric energy meter parameter compensation method, medium and system considering temperature change
EP2854294B1 (en) Temperature compensated timing signal generator
CN101943885A (en) Method for correcting timing precision of RTC inside SOC in intelligent electric meter
EP2525265B1 (en) Method of operation of a timepiece device
CN111934683B (en) Digital frequency correction method and system for temperature control RTC
CN103034116A (en) Method for improving accuracy of timing of quartz timer
US7554415B2 (en) Microcomputer including a CR oscillator circuit
EP3355626B1 (en) Method and apparatus for digital quartz temperature and drift compensation for a sleep timer of a nb-iot device
CN102082658B (en) Method and device for enhancing frequency stability of target 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
C14 Grant of patent or utility model
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20230816

Address after: Unit 1404b, 358 Chengyi street, phase III, software park, Xiamen City, Fujian Province, 361000

Patentee after: Xiamen Galaxy Longxin Technology Co.,Ltd.

Address before: 215123 International Science and Technology Park D201, No. 1355 Jinjihu Avenue, Suzhou Industrial Park, Suzhou City, Jiangsu Province

Patentee before: Suzhou Galaxy Camphol Technology Co.,Ltd.

TR01 Transfer of patent right