CN104993820A - Calibration device and calibration method for frequency of oscillator - Google Patents

Calibration device and calibration method for frequency of oscillator Download PDF

Info

Publication number
CN104993820A
CN104993820A CN201510396877.1A CN201510396877A CN104993820A CN 104993820 A CN104993820 A CN 104993820A CN 201510396877 A CN201510396877 A CN 201510396877A CN 104993820 A CN104993820 A CN 104993820A
Authority
CN
China
Prior art keywords
oscillator
frequency
time interval
zero crossing
calibration
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
CN201510396877.1A
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.)
Midea Group Co Ltd
Guangdong Midea HVAC Equipment Co Ltd
Original Assignee
Midea Group Co Ltd
Guangdong Midea HVAC Equipment Co Ltd
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 Midea Group Co Ltd, Guangdong Midea HVAC Equipment Co Ltd filed Critical Midea Group Co Ltd
Priority to CN201510396877.1A priority Critical patent/CN104993820A/en
Publication of CN104993820A publication Critical patent/CN104993820A/en
Pending legal-status Critical Current

Links

Landscapes

  • Electric Clocks (AREA)

Abstract

The invention relates to the field of electronic circuits and discloses a calibration device and a calibration method for frequency of an oscillator. The calibration device comprises a zero crossing point detection module, which is used for detecting a zero crossing point of an alternating current signal output by a reference oscillator; a timer, which is driven by a calibrated oscillator and is used for timing a time interval between two adjacent zero crossing points of the alternating current signal output by the reference oscillator; and a judging module, which is used for judging whether the time interval timed by the timer is within an error range of a theoretical time interval between two adjacent zero crossing points of the reference oscillator, if yes, judging that the frequency of the calibrated oscillator is normal, and otherwise judging that the frequency of the calibrated oscillator is abnormal. According to the calibration device and the calibration method, the uncontrollable phenomenon of an MCU (Micro Controller Unit) of the calibrated oscillator and a machine utilizing the MCU can be prevented, and the running safety of the MCU and the machine utilizing the MCU is improved.

Description

Oscillator frequency calibration equipment and method
Technical field
The present invention relates to electronic circuit field, particularly, relate to a kind of oscillator frequency calibration equipment and method.
Background technology
At present, be nearly all use oscillator to provide running frequency to MCU.Requirement in UL Valuation Standard, MCU normally will work in half frequency ~ octave coverage of normal operating frequency, so will verify the oscillator frequency that MCU uses, to ensure the operation of MCU normal safe.
At present, the oscillator that seldom can use MCU carries out frequency verification, and lack the verification of running frequency, can when the oscillator of MCU mistake in or oscillator damage, cause MCU run-time error, use the problems such as the abnormal switch of load of the machine of MCU, and certain potential safety hazard can be there is.
Summary of the invention
The object of this invention is to provide a kind of oscillator frequency calibration equipment and method, this calibration equipment and method can verify the frequency of oscillator, thus micro-control unit (MCU) can be prevented and use the machine of MCU to occur uncontrollable phenomenon, and the safety in operation of the machine of MCU and use MCU can be improved.
To achieve these goals, the invention provides a kind of oscillator frequency calibration equipment, this calibration equipment comprises: zero-crossing examination module, for detecting the zero crossing of the AC signal that reference oscillator exports; Timer, this timer is by being carried out timing by verification oscillator drives for the time interval between two adjacent zero crossings of AC signal of exporting described reference oscillator; And judge module, for judging whether the time interval of described timer institute timing is positioned at the error range in the theory adjacent zero crossing time interval of described reference oscillator, if so, then judges that the frequency by verifying oscillator is normal, if not, then judge to be verified the frequency anomaly of oscillator.
The present invention also provides a kind of oscillator frequency method of calibration, and this method of calibration comprises: the zero crossing detecting the AC signal that reference oscillator exports; By by by the timer of verification oscillator drives, timing is carried out to the time interval between two adjacent zero crossings of the AC signal that described reference oscillator exports; And judge whether the time interval of described timer institute timing is positioned at the error range in the theory adjacent zero crossing time interval of described reference oscillator, if, then judging that the frequency by verifying oscillator is normal, if not, then judging to be verified the frequency anomaly of oscillator.
Pass through technique scheme, due to the zero crossing of the AC signal that reference oscillator exports can be detected, by carrying out timing to the time interval between two of the AC signal that reference oscillator exports adjacent zero crossings by by the timer of verification oscillator drives and judge whether the time interval of described timer institute timing is positioned at the error range in the theory adjacent zero crossing time interval of reference oscillator, thus can judge that whether the frequency by verifying oscillator is abnormal quickly and easily, such user just can take measures in time, make it possible to prevent from using by the MCU of verification oscillator and use the machine of MCU to occur uncontrollable phenomenon, prevent the abnormal switch problem of machine loading, and the safety in operation of the machine of MCU and use MCU can be improved.
Other features and advantages of the present invention are described in detail in embodiment part subsequently.
Accompanying drawing explanation
Accompanying drawing is used to provide a further understanding of the present invention, and forms a part for specification, is used from explanation the present invention, but is not construed as limiting the invention with embodiment one below.In the accompanying drawings:
Fig. 1 is the schematic block diagram of the oscillator frequency calibration equipment according to one embodiment of the present invention;
Fig. 2 is the flow chart of the oscillator frequency method of calibration according to one embodiment of the present invention; And
Fig. 3 is the another flow chart of the oscillator frequency method of calibration according to one embodiment of the present invention.
Embodiment
Below in conjunction with accompanying drawing, the specific embodiment of the present invention is described in detail.Should be understood that, embodiment described herein, only for instruction and explanation of the present invention, is not limited to the present invention.
As shown in Figure 1, zero-crossing examination module 10, timer 20, judge module 30 and reference oscillator 40 is comprised according to the oscillator frequency calibration equipment of one embodiment of the present invention.Zero-crossing examination module 10 is for detecting the zero crossing of the AC signal of reference oscillator 40 output; Timer 20 is by being driven by verification oscillator 50 and carrying out timing for the time interval between two adjacent zero crossings of AC signal of exporting described reference oscillator 40; And judge module 30, for judging whether the time interval of timer 20 timing is positioned at the error range in the theory adjacent zero crossing time interval of reference oscillator 40, if so, then judges that the frequency by verifying oscillator 50 is normal, if not, then judge by the frequency anomaly verifying oscillator 50.
Preferably, described zero-crossing examination module 10 can be zero-crossing detection circuit.The application does not limit the physical circuit form of zero-crossing detection circuit, and any zero-crossing detection circuit that also namely can realize zero-crossing examination is all feasible.
Preferably, described reference oscillator 40 can for by the oscillator fixed of frequency outside verification oscillator 50 or use by the internal oscillator (when this MCU has internal oscillator) of the micro-control unit (MCU) of verification oscillator 50.
In addition, the theory adjacent zero crossing time interval of reference oscillator 40 can obtain by reference to the frequency of oscillator 40, and also, the frequency of hypothetical reference oscillator 40 is f, then theoretical adjacent zero crossing time interval Δ T=1/f.
Preferably, the error range in the theory of the reference oscillator 40 adjacent zero crossing time interval such as can for by the described theory adjacent zero crossing time interval ± 50% scope formed.For the output frequency of reference oscillator 40 for 50Hz, then reference oscillator 40 export AC signal two adjacent zero crossings between the theory adjacent zero crossing time interval be Δ T=20ms, then this theoretical adjacent zero crossing time interval ± 50% scope formed should be 10ms ~ 30ms.
One skilled in the art will appreciate that the error range in the theoretical adjacent zero crossing time interval is not limited to above-mentioned citing, it can require to arrange according to actual conditions and available accuracy.Still the situation being 20ms for the above-mentioned theory adjacent zero crossing time interval is described, and the error range in the theoretical adjacent zero crossing time interval can be arranged to such as 15ms ~ 25ms.
Preferably, described judge module 30 can also be used for adding up by the number of times of the cline frequency exception of verification oscillator 50, and the number of times judging cline frequency exception whether overfrequency is made mistakes threshold value, if exceed, then impels the circuit reset used by being verified oscillator 50.Such as, impel to use and resetted by the MCU of verification oscillator 50, cut off all loads of machine using this MCU, thus guarantee MCU and use the safe operation of machine of this MCU.
Fig. 2 is the flow chart of the oscillator frequency method of calibration according to one embodiment of the present invention.As shown in Figure 2, this oscillator frequency method of calibration comprises:
The zero crossing of the AC signal that S1, detection reference oscillator export;
S2, by by by the timer of verification oscillator drives, timing is carried out to the time interval between two adjacent zero crossings of the AC signal that described reference oscillator exports; And
S3, judge whether the time interval of described timer institute timing is positioned at the error range in the theory adjacent zero crossing time interval of reference oscillator, if so, then judging that the frequency by being verified oscillator is normal, if not, then judging to be verified the frequency anomaly of oscillator.
Preferably, oscillator frequency method of calibration according to the present invention can adopt zero-crossing detection circuit to detect the zero crossing of the AC signal that reference oscillator exports.The physical circuit form of zero-crossing detection circuit is unrestricted, as long as it can realize zero-crossing examination.
Preferably, described reference oscillator can for by the oscillator fixed of frequency outside verification oscillator or use by the internal oscillator (when this MCU has internal oscillator) of the micro-control unit (MCU) of verification oscillator.
In addition, the theory adjacent zero crossing time interval of reference oscillator can obtain by reference to the frequency of oscillator, and also, the frequency of hypothetical reference oscillator is f, then theoretical adjacent zero crossing time interval Δ T=1/f.
Preferably, the error range in the theory of the reference oscillator adjacent zero crossing time interval such as can for by the described theory adjacent zero crossing time interval ± 50% scope formed.For the output frequency of reference oscillator for 50Hz, then reference oscillator export AC signal two adjacent zero crossings between the theory adjacent zero crossing time interval be Δ T=20ms, then this theoretical adjacent zero crossing time interval ± 50% scope formed should be 10ms ~ 30ms.
One skilled in the art will appreciate that the error range in the theoretical adjacent zero crossing time interval is not limited to above-mentioned citing, it can require to arrange according to actual conditions and available accuracy.Still the situation being 20ms for the above-mentioned theory adjacent zero crossing time interval is described, and the error range in the theoretical adjacent zero crossing time interval can be arranged to such as 15ms ~ 25ms.
Preferably, oscillator frequency method of calibration according to the present invention can also comprise: add up by the number of times of the cline frequency exception of verification oscillator; And the number of times judging cline frequency exception whether overfrequency to make mistakes threshold value, if exceed, then impel the circuit reset used by verification oscillator.Such as, impel to use and resetted by the MCU of verification oscillator, cut off all loads of machine using this MCU, thus guarantee MCU and use the safe operation of machine of this MCU.
Fig. 3 shows the another exemplary process diagram of the oscillator frequency method of calibration according to one embodiment of the present invention.As shown in Figure 3, this frequency verification method comprises the steps:
The zero crossing of the AC signal that S30, detection reference oscillator export.
S31, judge whether the zero crossing AC signal that reference oscillator exports being detected.If zero crossing detected, then forward step S32 to; Otherwise, forward step S34 to.
S32, judge whether it is the zero crossing AC signal that reference oscillator exports being detected first.If zero crossing detected first, then forward step S33 to; Otherwise, forward step S35 to.
S33, make by by verification oscillator drives timer reset, even Δ T1=0; Counting (FreqErrCnt) by verifying oscillator cline frequency exception is reset, even FreqErrCnt=0.And then forward step S31 to.
S34, when the zero crossing of the AC signal that reference oscillator exports not detected, carry out timing by by the timer of verification oscillator drives, and forward step S31 to detect the zero crossing AC signal that reference oscillator exports whether again being detected.
In integrated circuit fields, normally carry out frequency division to obtain clock signal when driving timer by the output of the oscillator to such as crystal oscillator and so on, such timer just carries out timing under the driving of obtained clock signal, also be each clock signal period, the clock pulses number M of timer institute timing adds 1, then the time of timer institute timing just equals M* clock signal period.Be 12MHz with the output frequency of oscillator, this output frequency carried out to 12 frequency divisions and obtain frequency for f 1the clock signal of=1MHz also drives timer to be that example is described by this clock signal, and the time of timer institute timing equals M/f 1, wherein M is the number of the clock signal period that timer is counted.The present invention verifies based on this frequency to oscillator just.Exemplary concrete verification deterministic process is as follows: the adjacent zero crossing of the theory due to reference oscillator time interval Δ T is fixing, if so become large by the frequency of verification oscillator, the number of the clock signal period that timer then can be made to count during Δ T than time normal the clock signal period number counted by verification oscillator frequency large, thus make the time interval (the i.e. M/f of timer institute timing 1) be greater than the theory adjacent zero crossing time interval Δ T of reference oscillator, thus can judge to be verified the frequency anomaly of oscillator.Similarly, if diminished by the frequency of verification oscillator or damaged by verification oscillator, also can judge based on the mode similar with above-mentioned exemplary verification deterministic process that whether the frequency by verifying oscillator is abnormal.
Do you S35, when not being the zero crossing AC signal that reference oscillator exports being detected first, judge that the time interval Δ T1 of timer institute timing is in allowed band? namely the error range in the theory adjacent zero crossing time interval of reference oscillator such as whether is positioned at.If be positioned at allowed band, then forward step S36 to, otherwise forward step S37 to.During this judgement, by the timer that drives by verification oscillator stop timing.Describe the error range in the theory adjacent zero crossing time interval of reference oscillator above in detail, repeated no more here.
S36, when by drive by verification oscillator the timing of timer institute the time interval, Δ T1 was positioned at allowed band, make by the timer that drives by verification oscillator reset, even Δ T1=0; Make to be verified oscillator cline frequency anomalous counts to reset, even FreqErrCnt=0.And then terminate frequency verification.
S37, when by by verification oscillator drive the timing of timer institute the time interval, Δ T1 was not positioned at allowed band, make to be verified oscillator cline frequency anomalous counts FreqErrCnt and add 1, and make by the timer that drives by verification oscillator reset, even Δ T1=0.And then forward step S38 to.
S38, judge to be verified oscillator cline frequency anomalous counts FreqErrCnt and whether be less than frequency and make mistakes threshold value N, if be less than, then forward step S31 to, otherwise forward step S39 to.
S39, impel use by verification oscillator MCU reset.In addition, all loads of the machine using this MCU can also be cut off.Then, terminate to be verified the frequency verification of oscillator.
By adopting the oscillator frequency method of calibration shown in Fig. 3, can guarantee to use the safe operation by the MCU of verification oscillator, prevent this MCU and use the machine of this MCU to occur uncontrollable phenomenon, such as, can prevent the phenomenon using the abnormal switch of the load of the machine of this MCU, etc.
Below the preferred embodiment of the present invention is described in detail by reference to the accompanying drawings; but; the present invention is not limited to the detail in above-mentioned execution mode; within the scope of technical conceive of the present invention; can carry out multiple simple variant to technical scheme of the present invention, these simple variant all belong to protection scope of the present invention.
In addition, also can carry out combination in any between various different execution mode of the present invention, as long as it is without prejudice to thought of the present invention, it should be considered as content disclosed in this invention equally.

Claims (10)

1. an oscillator frequency calibration equipment, this calibration equipment comprises:
Zero-crossing examination module, for detecting the zero crossing of the AC signal that reference oscillator exports;
Timer, this timer is by being carried out timing by verification oscillator drives for the time interval between two adjacent zero crossings of AC signal of exporting described reference oscillator; And
Judge module, for judging whether the time interval of described timer institute timing is positioned at the error range in the theory adjacent zero crossing time interval of described reference oscillator, if so, then judges that the frequency by verifying oscillator is normal, if not, then judge to be verified the frequency anomaly of oscillator.
2. calibration equipment according to claim 1, wherein, described zero-crossing examination module is zero-crossing detection circuit.
3. calibration equipment according to claim 1, wherein, described reference oscillator is the oscillator fixed by the frequency verified outside oscillator or uses by the internal oscillator of the micro-control unit (MCU) of verification oscillator.
4. calibration equipment according to claim 1, wherein, the error range in the described theory adjacent zero crossing time interval for by the described theory adjacent zero crossing time interval ± 50% scope formed.
5. calibration equipment according to claim 1, wherein, described judge module is also for adding up by the number of times of verification oscillator cline frequency exception, and the number of times judging cline frequency exception whether overfrequency is made mistakes threshold value, if exceed, then impel the circuit reset used by verification oscillator.
6. an oscillator frequency method of calibration, this method of calibration comprises:
Detect the zero crossing of the AC signal that reference oscillator exports;
By by by the timer of verification oscillator drives, timing is carried out to the time interval between two adjacent zero crossings of the AC signal that described reference oscillator exports; And
Judge whether the time interval of described timer institute timing is positioned at the error range in the theory adjacent zero crossing time interval of described reference oscillator, if so, then judging that the frequency by verifying oscillator is normal, if not, then judging to be verified the frequency anomaly of oscillator.
7. method of calibration according to claim 6, wherein, adopts zero-crossing detection circuit to detect the zero crossing of the AC signal that described reference oscillator exports.
8. method of calibration according to claim 6, wherein, described reference oscillator is the oscillator fixed by the frequency verified outside oscillator or uses by the internal oscillator of the micro-control unit (MCU) of verification oscillator.
9. method of calibration according to claim 6, wherein, the error range in the described theory adjacent zero crossing time interval for by the described theory adjacent zero crossing time interval ± 50% scope formed.
10. method of calibration according to claim 6, wherein, this method of calibration also comprises:
Add up by the number of times of verification oscillator cline frequency exception; And
The number of times judging cline frequency exception whether overfrequency is made mistakes threshold value, if exceed, then impels the circuit reset used by verification oscillator.
CN201510396877.1A 2015-07-07 2015-07-07 Calibration device and calibration method for frequency of oscillator Pending CN104993820A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510396877.1A CN104993820A (en) 2015-07-07 2015-07-07 Calibration device and calibration method for frequency of oscillator

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510396877.1A CN104993820A (en) 2015-07-07 2015-07-07 Calibration device and calibration method for frequency of oscillator

Publications (1)

Publication Number Publication Date
CN104993820A true CN104993820A (en) 2015-10-21

Family

ID=54305584

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510396877.1A Pending CN104993820A (en) 2015-07-07 2015-07-07 Calibration device and calibration method for frequency of oscillator

Country Status (1)

Country Link
CN (1) CN104993820A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105892560A (en) * 2016-03-29 2016-08-24 杭州和利时自动化有限公司 Clock detection method and system used for embedded system

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1870491A (en) * 2005-05-24 2006-11-29 深圳市木青科技实业有限公司 Clock recovery technology using of far-end measuring near-end recovery simulation packet circuit
US20110298507A1 (en) * 2010-05-13 2011-12-08 Anders Jakobsson System and method for calibrating output frequency in phase locked loop
CN103427403A (en) * 2012-05-25 2013-12-04 华为终端有限公司 Electronic equipment protection method and electronic equipment
CN103684256A (en) * 2012-09-12 2014-03-26 无锡华润矽科微电子有限公司 High-accuracy digital temperature-compensated crystal oscillator circuit structure with built-in crystal oscillator
CN103853081A (en) * 2012-12-06 2014-06-11 海尔集团公司 MCU internal clock calibration system and method and PCB
CN104639161A (en) * 2014-12-31 2015-05-20 陕西烽火电子股份有限公司 Automatic calibration method for frequency of crystal oscillator

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1870491A (en) * 2005-05-24 2006-11-29 深圳市木青科技实业有限公司 Clock recovery technology using of far-end measuring near-end recovery simulation packet circuit
US20110298507A1 (en) * 2010-05-13 2011-12-08 Anders Jakobsson System and method for calibrating output frequency in phase locked loop
CN103427403A (en) * 2012-05-25 2013-12-04 华为终端有限公司 Electronic equipment protection method and electronic equipment
CN103684256A (en) * 2012-09-12 2014-03-26 无锡华润矽科微电子有限公司 High-accuracy digital temperature-compensated crystal oscillator circuit structure with built-in crystal oscillator
CN103853081A (en) * 2012-12-06 2014-06-11 海尔集团公司 MCU internal clock calibration system and method and PCB
CN104639161A (en) * 2014-12-31 2015-05-20 陕西烽火电子股份有限公司 Automatic calibration method for frequency of crystal oscillator

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105892560A (en) * 2016-03-29 2016-08-24 杭州和利时自动化有限公司 Clock detection method and system used for embedded system

Similar Documents

Publication Publication Date Title
CN101710159B (en) Novel direct-current converter valve test unit
CN104795874B (en) Method and device for carrying out wireless charging control
CN104360144B (en) Determine the method and system of AC signal zero crossing point
CN105675029B (en) A kind of wind generator system and speed-position detection device and method
EP3565073B1 (en) Self-test of over-current fault detection
CN106405232A (en) Frequency determination circuit, power converter comprising same and related method
CN103107707A (en) Resonant conversion circuit and resonant controller
CN103166566A (en) Three-phase motor driving control device
CN104155502B (en) Voltage fluctuation detection method and system
CN102841247A (en) Detection method for grid frequency
CN104502883B (en) The abnormality detection and solution of computation chip
CN106249063A (en) A kind of three-phase alternating-current supply phase sequence lack detection circuit and method
TWI543505B (en) Application of the input voltage detection circuit with parameter setting function in the power converter and its parameter setting and circuit protection method
CN107329071A (en) A kind of performance test circuit, test device and the method for IGBT drivers
CN110470967A (en) A kind of pulse power AC aging test platform and test method
CN103823181A (en) Motor assembling unit quality detection system and method
CN104993820A (en) Calibration device and calibration method for frequency of oscillator
CN105892560A (en) Clock detection method and system used for embedded system
CN103123376B (en) A kind of performance testing device of soft initiator
JP2014160045A (en) Partial discharge inspection device and inspection method
CN103176101B (en) A kind of detection method of line fault, equipment and system
JP5674844B2 (en) Duty ratio detection circuit and method for PWM signal
CN102455396A (en) Three-phase alternating current open-phase and reverse phase detection method
CN104995842A (en) Contention avoidance control device and contention avoidance control method for PWM output and A/D conversion, as well as power control system
CN103817404B (en) A kind of hand arc welding machine three-phase electric power open phase detection method and device

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

RJ01 Rejection of invention patent application after publication