CN104821806A - Clock control device and control method thereof - Google Patents

Clock control device and control method thereof Download PDF

Info

Publication number
CN104821806A
CN104821806A CN201510240857.5A CN201510240857A CN104821806A CN 104821806 A CN104821806 A CN 104821806A CN 201510240857 A CN201510240857 A CN 201510240857A CN 104821806 A CN104821806 A CN 104821806A
Authority
CN
China
Prior art keywords
clock
signal
module
telecommunication
city
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.)
Granted
Application number
CN201510240857.5A
Other languages
Chinese (zh)
Other versions
CN104821806B (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.)
Midea Group Co Ltd
Guangdong Midea Kitchen Appliances Manufacturing Co Ltd
Original Assignee
Midea Group Co Ltd
Guangdong Midea Kitchen Appliances Manufacturing 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 Kitchen Appliances Manufacturing Co Ltd filed Critical Midea Group Co Ltd
Priority to CN201510240857.5A priority Critical patent/CN104821806B/en
Publication of CN104821806A publication Critical patent/CN104821806A/en
Application granted granted Critical
Publication of CN104821806B publication Critical patent/CN104821806B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention discloses a clock control device and a control method thereof. The clock control device comprises a display module, a clock module, a zero-crossing detection module, and a control module. The invention also provides a clock control method. Clock signals in an electric appliance control module have severe deviation caused by long-time usage, the device calibrates the clock signals in the control module and regulates precision through electric supply signals, so as to obtain an accurate clock source. Through the device and the method, the clock source which is stable and accurate is obtained, and the clock in the control module is calibrated.

Description

Clock control device and control method thereof
Technical field
The present invention relates to field of household appliances, particularly a kind of clock control device and control method thereof.
Background technology
Existing household electrical appliance need the function with timing or timing usually, therefore need clock signal.Based on cost consideration, the clock that household electrical appliance generally adopt the controller of household electrical appliance built-in or external crystal oscillating circuit obtain clock signal.But easily there is error in built-in clock or the clock signal of crystal oscillating circuit, and accumulates in time, and error is increasing, affects household electrical appliance and normally work.Therefore to correct clock signal, but existing correcting scheme complex structure and cost is high.
Summary of the invention
The present invention is intended at least to solve one of technical problem existed in prior art.For this reason, the present invention needs to provide a kind of clock control device and a kind of clock control method.
For achieving the above object, the execution mode of first aspect present invention proposes a kind of clock control device, comprising:
Clock module, for providing the first clock signal;
Zero passage detection module, for detecting civil power and obtaining zero cross signal; And
Control module, described control module respectively with described clock module and described zero passage detection model calling, described control module for the treatment of described zero cross signal with obtain civil power second clock signal and according to described second clock signal calibration the first clock signal.
In some embodiments, described clock module is crystal oscillating circuit or Tao Zhen circuit.
In some embodiments, described zero passage detection module comprises:
Photoelectrical coupler, described photoelectrical coupler comprises first input end, the second input, the first output and the second output; Described first input end is connected with the live wire of civil power, and described second input is connected with the zero line of civil power, described first output head grounding;
First resistance, described second output exports described zero cross signal by described first resistance;
Second resistance, described second resistant series is arranged between described first input end and civil power live wire;
3rd resistance, described 3rd resistance is arranged between described second output and predeterminated voltage; And
First electric capacity, described first capacitances in series is arranged between described second output and ground.
In some embodiments, described photoelectrical coupler comprises:
Light-emitting diode, the anode of described light-emitting diode is described first input end, and the negative electrode of described Light-Emitting Diode is described second input; And
Phototriode, very described first output of transmitting of described phototriode, very described second output of current collection of described phototriode.
In some embodiments, described control module comprises:
Processing unit, described processing unit comprises chip port and timer;
Clock selecting portion, described clock selecting portion is used for selective system clock;
Clock filtering portion, described clock filtering portion is used for carrying out filtering process to described zero cross signal;
Clock alignment portion, described clock alignment portion is used for calibrating described clock signal; And
Clock accuracy handling part, described clock accuracy handling part is used for regulating the precision of described clock signal.
In some embodiments, described chip port and described timer are the input/output terminal of described processing unit, are connected with described clock selecting portion, described clock filtering portion, described clock alignment portion, described clock accuracy handling part.
In some embodiments, described clock control device also includes the display module be connected with described control module, described display module be used for read clock time, minute, second.
For achieving the above object, the execution mode of second aspect present invention proposes a kind of clock control method, comprises the following steps:
S1, selects the first clock signal;
S2, collects the zero cross signal of civil power;
S3, carries out filtering process to described zero cross signal, obtains the second clock signal of civil power; And
S4, calibrates described first clock signal according to described second clock signal, obtains described 3rd clock signal;
In some embodiments, described step S3 comprises following sub-step:
S31, carries out filtering process to described zero cross signal, and filtering variable adds up; And
S32, judging that whether the described city signal of telecommunication is normal according to described filtering variable accumulated value, and to city's signal of telecommunication effective marker assignment, be normally 1, is 0 extremely.
In some embodiments, described step S4 comprises sub-step:
According to described city signal of telecommunication effective marker, S41, judges that whether the described city signal of telecommunication is normal, if so, enters step S42, if not, return;
S42, calibrates, and calibration variables adds up; And
S43, when described calibration variables is added to predetermined value, calibration terminates.
In some embodiments, described step also comprises sub-step after described step S4:
According to described city signal of telecommunication effective marker, S51, judges that whether the described city signal of telecommunication is normal, if so, enters step S52, if not, enter step S53;
S52, described second clock signal carries out clock count, and the first timing variable adds up; And
S53, described 3rd clock signal carries out clock count, and the second timing variable adds up.
Additional aspect of the present invention and advantage will part provide in the following description, and part will become obvious from the following description, or be recognized by practice of the present invention.
Accompanying drawing explanation
Above-mentioned and/or additional method of the present invention and advantage will become obvious and easy understand from accompanying drawing below combining to the description of execution mode, wherein:
Fig. 1 is the high-level schematic functional block diagram of the clock control device according to one embodiment of the present invention;
Fig. 2 is the fundamental diagram of the crystal oscillator clock according to one embodiment of the present invention;
Fig. 3 is the circuit diagram of the zero passage detection module of clock control device according to one embodiment of the present invention;
Fig. 4 is the high-level schematic functional block diagram of the control module according to one embodiment of the present invention;
Fig. 5 is the waveform schematic diagram normally worked according to the zero passage detection module of one embodiment of the present invention;
Fig. 6 is the waveform schematic diagram of the zero passage detection module abnormal work according to one embodiment of the present invention;
Fig. 7 is the clock control method flow chart according to one embodiment of the present invention;
Fig. 8 is the filtering process chart according to one embodiment of the present invention;
Fig. 9 is the clock alignment flow chart according to one embodiment of the present invention;
Figure 10 regulates flow chart according to the clock accuracy of one embodiment of the present invention.
Embodiment
Be described below in detail embodiments of the present invention, the example of described execution mode is shown in the drawings, and wherein same or similar label represents same or similar element or has element that is identical or similar functions from start to finish.Being exemplary below by the execution mode be described with reference to the drawings, only for explaining the present invention, and can not limitation of the present invention being interpreted as.
In describing the invention, it will be appreciated that, term " " center ", " longitudinal direction ", " transverse direction ", " length ", " width ", " thickness ", " on ", D score, " front ", " afterwards ", " left side ", " right side ", " vertically ", " level ", " top ", " end ", " interior ", " outward ", " clockwise ", orientation or the position relationship of the instruction such as " counterclockwise " are based on orientation shown in the drawings or position relationship, only the present invention for convenience of description and simplified characterization, instead of indicate or imply that the device of indication or element must have specific orientation, with specific azimuth configuration and operation, therefore limitation of the present invention can not be interpreted as.In addition, term " first ", " second " only for describing object, and can not be interpreted as instruction or hint relative importance or imply the quantity indicating indicated technical characteristic.Thus, be limited with " first ", the feature of " second " can express or impliedly comprise one or more described features.In describing the invention, the implication of " multiple " is two or more, unless otherwise expressly limited specifically.
In describing the invention, it should be noted that, unless otherwise clearly defined and limited, term " installation ", " connection ", " connection " should be interpreted broadly, and such as, can be fixedly connected with, also can be removably connect, or connect integratedly; Can be mechanical connection, also can be electrical connection or can communication mutually; Can be direct connection, also indirectly can be connected by intermediary, can be the connection of two element internals or the interaction relationship of two elements.For the ordinary skill in the art, above-mentioned term concrete meaning in the present invention can be understood as the case may be.
In the present invention, unless otherwise clearly defined and limited, fisrt feature second feature it " on " or D score can comprise the first and second features and directly contact, also can comprise the first and second features and not be directly contact but by the other characterisation contact between them.And, fisrt feature second feature " on ", " top " and " above " comprise fisrt feature directly over second feature and oblique upper, or only represent that fisrt feature level height is higher than second feature.Fisrt feature second feature " under ", " below " and " below " comprise fisrt feature directly over second feature and oblique upper, or only represent that fisrt feature level height is less than second feature.
Disclosing hereafter provides many different execution modes or example is used for realizing different structure of the present invention.Of the present invention open in order to simplify, hereinafter the parts of specific examples and setting are described.Certainly, they are only example, and object does not lie in restriction the present invention.In addition, the present invention can in different example repeat reference numerals and/or reference letter, this repetition is to simplify and clearly object, itself does not indicate the relation between discussed various execution mode and/or setting.In addition, the various specific technique that the invention provides and the example of material, but those of ordinary skill in the art can recognize the application of other techniques and/or the use of other materials.
Fig. 1 is the high-level schematic functional block diagram of the clock control device according to one embodiment of the present invention.
The clock control device 10 of embodiments of the present invention comprises clock module 100, zero passage detection module 200, control module 300 and display module 400.
Clock module 100 is for providing the first clock signal.Zero passage detection module 200 exports zero cross signal ZERO for detecting civil power.Particularly, zero passage detection module 200, for judging the forward and reverse of city's signal of telecommunication, then exports zero cross signal ZERO.Control module 300 is connected with clock module 100 and zero passage detection module 200 respectively, control module 300 for the treatment of zero cross signal ZERO with obtain civil power second clock signal and according to second clock signal calibration first clock signal.Display module 400 is connected with control module 300, display module 400 for accurate clock information after showing calibration, such as, time, minute, second.
The clock control device of embodiments of the present invention utilizes the civil power be connected with household electrical appliance to correct the first clock signal, because the cycle of civil power is by department of State Grid timing alignment, accuracy is high, and can not accumulate, that is to say that second clock new signal accuracy is high, and can not accumulate.And be connected with household electrical appliance due to civil power, zero cross signal ZERO easily obtains, convenient and cost is lower.
General, based on cost consideration, clock module 100 can be crystal oscillating circuit or Tao Zhen circuit.Namely the clock signal for crystal oscillator or Tao Zhen circuit provide believed by the first clock.
Fig. 2 is the fundamental diagram of the crystal oscillator clock according to one embodiment of the present invention.
General, the actual frequency f of crystal oscillating circuit 0error delta f=|f is there is with standard frequency f 0-f|, and error can build up.Usual error is 20PPM (Part Per Million hundred very much), i.e. the frequency of 10MHz, exists 200Hz error.In one-period T, error delta f=|f 0-f|, N number of all after dates, T=N/f, T 0=N/f 0, Δ T=|T-T 0|=(N*f 0-N*f)/(f*f 0)=(N* Δ f)/(f*f 0).Such as, f=10MHz, error is 20PPM, then f 0=9.9998MHz.As N=1M, T=0.1s, Δ T ≈ 0.2 μ s, as N=1000M, T=100s, Δ T=2ms; In other words every 100s just has 2ms error, accumulates and within one hour, has 36*2=72ms error, have the error of 24*72=1728ms=1.728s every day, needs to correct.
Fig. 3 is the circuit diagram of the zero passage detection module 200 according to one embodiment of the present invention.
Zero passage detection module 200 comprises photoelectrical coupler 210 and the first resistance R1.Photoelectrical coupler 210 comprises first input end, the second input, the first output and the second output.The first input end of photoelectrical coupler 210 is connected with the live wire of civil power, and the second input of photoelectrical coupler 210 is connected with the zero line of civil power, and the first output head grounding of photoelectrical coupler 210, photoelectrical coupler 210 can realize the isolation of forceful electric power and light current.One end of first resistance R1 is connected with the second output of photoelectrical coupler 210, and the other end of the first resistance R1 is output, and output is connected to export zero cross signal ZERO to control module 300 with control module 300, and the first resistance R1 is used for carrying out output current limiting.
Photoelectrical coupler 210 comprises light-emitting diode D and photosensitive triode Q.The anode of light-emitting diode D is the first input end of photoelectrical coupler 210, and the negative electrode of light-emitting diode D is the second input of photoelectrical coupler 210.The emitter E of phototriode Q is the first output of photoelectrical coupler 210, and the collector electrode C of phototriode Q is the second output of photoelectrical coupler 210.
Zero passage detection module 200 also comprises the first electric capacity C1.First electric capacity C1 is arranged in series between photoelectrical coupler 210 first output and the second output.One end of first electric capacity C1 is connected with the other end of the first resistance R1, the other end ground connection of the first electric capacity C1, and the signal that the first electric capacity C1 is used for output exports carries out filtering.
Zero passage detection module 200 also comprises the second resistance R2.Second resistance R2 is connected between photoelectrical coupler first input end and the live wire of civil power, and the second resistance R2 is used for carrying out for inputting current limliting.
Zero passage detection module 200 also comprises the 3rd resistance R3.One end of 3rd resistance R3 is connected with the second output of photoelectrical coupler 210, and the other end of the 3rd resistance R3 is connected with default power supply such as 5V DC power supply, and the 3rd resistance R3 is pull-up resistor.For drawing high level signal.
In other words, zero passage detection module 200 is made up of an optocoupler, three resistance and an electric capacity, for detecting the cycle of input civil power, and judges the positive direction of input civil power.Particularly, when city's signal of telecommunication is from the first input end of photoelectrical coupler 210 and the input of the second input, if the voltage of city's signal of telecommunication is in positive half period, light-emitting diode D conducting is luminous, the conducting of photosensitive triode Q light, thus the zero cross signal ZERO of output output low level; If the voltage of city's signal of telecommunication is in negative half-cycle, light-emitting diode D ends not luminous, and photosensitive triode Q ends, thus output exports the zero cross signal ZERO of high level.Thus, control module 300 can judge the forward and reverse of input civil power according to zero cross signal ZERO, and zero passage detection module 200 internal circuit configuration is simple, low price.
Fig. 4 is the high-level schematic functional block diagram of the control module 300 according to one embodiment of the present invention.
In the clock control device 10 of embodiments of the present invention, control module 300 includes processing unit 310, clock selecting portion 320, clock filtering portion 330, clock alignment portion 340 and clock accuracy handling part 350.Processing unit 310 comprises chip port 311 and timer 312.
Chip port 311 and timer 312 are the input/output terminal of processing unit 310, correspondingly with clock selecting portion 320, clock filtering portion 330, clock alignment portion 340 and precision handling part 350 connect.Chip port 311 for inputing to processing unit 310 by above-mentioned each portion clock signal, and exports the clock signal after process to display module 400.Timer 312 is connected with clock selecting portion 320, and timer 312 for inputting the first clock signal, and exports the first clock signal to clock filtering portion 330, clock alignment portion 340 and precision handling part 350 via chip port.
Clock selecting portion 320 is for the first clock signal of selecting clock module 100 to provide after clock control device 10 powers on system clock as processing unit 10, and exporting the first clock signal to timer 312 place, system clock can provide the function such as timing and timing.
Under normal circumstances, the accuracy of zero passage detection module 200 may be deteriorated along with service time, causes civil power Signal Fail, can not directly be used for calibrating.
Concrete, Fig. 5 is the waveform schematic diagram normally worked according to the zero passage detection module 200 of one embodiment of the present invention.Mains frequency is converted to the frequency of zero cross signal ZERO by zero passage detection module 200: when civil power is positive voltage, and zero cross signal ZERO is low level, and when civil power is negative voltage, zero cross signal ZERO is high level.When zero passage detection module 200 normally works, TZERO normal period of zero cross signal ZERO equals the cycle T POWER of mains waveform substantially.But when in zero passage detection module 200, photoelectrical coupler 210 breaks down, zero cross signal cycle and normal period there is larger difference in TZERO.
Waveform schematic diagram when Fig. 6 is abnormal according to the zero passage detection module of an embodiment of the invention.When photoelectrical coupler 210 drives bad, there is B point in figure, cause TERR0 to be less than TPOWER.When photoelectrical coupler 210 breaks down, zero cross signal ZERO keeps high level or low level always, occurs D point in figure.When the temperature increases, the resistance R1 playing metering function becomes large, and zero cross signal ZERO rises slowly, occurs C point in figure, causes TERR1 to be greater than TPOWER.
Therefore, before to the first clock signal calibration, filtering process should be carried out to zero cross signal ZERO.Filtering process is realized by clock filtering portion 330.
The zero cross signal ZERO that 330 pairs, clock filtering portion zero passage detection module 200 is collected carries out filtering process.After filtering process, obtain the second clock signal of civil power, second clock signal enters clock alignment portion 340, and calibrates the first clock signal in timer 312 as benchmark.After calibration, the secondary signal of civil power and the clock signal of timer 312, by clock accuracy handling part 350, carry out the adjustment of clock accuracy, after adjustment by display module 400 by clock time, minute, second shows.
So, clock control device 10 according to the embodiment of the present invention, by resources such as civil powers, obtains stable clock source, and timer 312 is calibrated, when losing efficacy in outside stabilizing clock source, time clock feature still can normally be run, and precision meets the demands.
Fig. 7 is the clock control method flow chart according to one embodiment of the present invention, and in the present embodiment, the step of clock control method comprises:
S1, selects the first clock signal;
S2, collects the zero cross signal ZERO of civil power;
S3, to zero cross signal ZERO process, obtains the second clock signal of civil power; And
S4, calibrates the first clock signal according to second clock signal, obtains the 3rd clock signal;
After electrical equipment powers on, clock selecting portion 320 the first clock signal of selecting crystal oscillating circuit to provide exports timer 312 to as the internal clock signal of control module 300.Zero passage detection module 200 collects the zero cross signal ZERO of civil power, because zero passage detection module 200 may exist fault, therefore will carry out to the zero cross signal ZERO collected the second clock signal that filtering process obtains civil power by clock filtering portion 330.When city's signal of telecommunication is normal, second clock signal is calibrated via the first clock signal in 340 pairs, clock alignment portion timer 312 as benchmark, obtains the 3rd clock signal.Second clock signal and the 3rd clock signal carry out precision adjustment through clock accuracy handling part 350, to obtain accurate clock information.Clock information is exported by display module 400.When city's signal of telecommunication is normal, second clock signal output clock information can be used.During civil power abnormal signal, the 3rd clock signal output clock information can be used.
So, by easily obtain and city's signal of telecommunication that accuracy is high, obtain stable clock source, and controller internal clock signal calibrated, make the clock apparatus of electrical equipment can ensure high accuracy all the time.
Fig. 8 is the filtering process chart according to one embodiment of the present invention, i.e. step S3, comprises following sub-step:
S31, carries out filtering process to described zero cross signal, and filtering variable adds up; And
S32, judging that whether city's signal of telecommunication is normal according to filtering variable accumulated value, and to city's signal of telecommunication effective marker assignment, be normally 1, is 0 extremely.
The output port of zero passage detection module 200 is connected with chip port 311.Before filtering process, first carry out Initialize installation to chip port 311, concrete, chip port 311 is set to input state, and external interrupt is opened.And Initialize installation is carried out to timer 312, and concrete, timing base is set, and timer 312 is interrupted opening.Such as, timing base is set to 0.5ms, and the every 0.5ms of timer 312 interrupts once, then filtering variable adds 1.When external interrupt condition meets, such as zero cross signal ZERO is rising edge, and filtering variable adds up.Judge that whether filtering variable accumulated value is eligible, be namely greater than M, be less than N, when satisfying condition, filtering variable resets, and civil power clock effective marker position Q assignment 1, illustrates that city's signal of telecommunication is normal.If filtering variable is ineligible, then anomalous counts variable adds 1, and when anomalous counts variable is greater than predetermined value, anomalous counts variable resets, and civil power clock effective marker position Q assignment 0, illustrates civil power abnormal signal.The selection gist normal civil power periodical filtering variable of lower limit M and higher limit N ± 20%.Such as, if civil power is the frequency of 50Hz, timing base is 0.5ms, then normal civil power periodical filtering variable is 0.02/0.0005=40, its ± 20%, then can show that lower limit M be 32, higher limit N is 48.
So, the filtering process to city's signal of telecommunication can be completed, be easy to judge whether city's signal of telecommunication occurs exception, and do basis for the calibration carried out subsequently and precision regulate.
Fig. 9 is the clock alignment flow chart according to one embodiment of the present invention, i.e. step S4, comprises following sub-step:
According to city signal of telecommunication effective marker Q, S41, judges that whether city's signal of telecommunication is normal, if so, enters step S42, if not, return;
S42, calibrates, and calibration variables adds up; And
S43, when calibration variables is added to predetermined value, calibration terminates.
Before the input clock calibration of 330 pairs, clock alignment portion, the civil power effective marker Q that first will generate after clock filtering portion 330 filtering process according to zero cross signal ZERO judges that whether city's signal of telecommunication is normal.If city's signal of telecommunication is normal, then effective marker Q is 1, if civil power invalidating signal, then effective marker is 0.When city's signal of telecommunication is normal, carry out clock signal calibration, calibration marker P assignment 1.If city's signal of telecommunication is abnormal, then stops calibration, return to clock filtering portion 330.After calibration starts when zero cross signal ZERO becomes low level from high level, calibration variables M adds 1, if when city's frequency is 50Hz, each civil power cycle is 20ms, then cross signal ZERO level and become low level once every 20ms from high level.Initialize installation is carried out to timer 312, setting timing base and calibration duration.Such as timing base is set to 1ms, and the every 1ms of timer 312 interrupts once, and calibration variables N adds 1.Judge that whether calibration variables is eligible, as calibration variables M >=T, stop calibration, calibration marker P assignment becomes 0, and calibration value is the accumulated value of calibration variables N, and calibration variables N resets, and clock alignment terminates.T is the number of times of required counting in calibration duration, and length is 1 hour when calibrated, and when mains frequency is 50Hz, each civil power cycle is 20ms, then 1 hour needs counting 3600/0.02=180,000, i.e. T=180,000, and now N=3,600,000; If civil power is 60Hz, then T=3600*60=216,000.
So, can complete the calibration to timer clock signal in the normal situation of city's signal of telecommunication, accuracy is high.
Figure 10 regulates flow chart according to the clock accuracy of one embodiment of the present invention, and step also comprises following sub-step after step S4:
According to city signal of telecommunication effective marker Q, S51, judges that whether city's signal of telecommunication is normal, if so, enters step S52, if not, enter step S53;
S52, the civil power signal-count after using filtering to detect, the first timing variable adds up; And
S53, use the crystal oscillating circuit clock signal counting calibrated, the second timing variable adds up.
The second clock signal exported by clock filtering portion 330 filtering process and the 3rd clock signal exported through clock alignment portion 340, enter clock accuracy handling part 350.Before carrying out precision adjustment, whether normally again detect city's signal of telecommunication according to city signal of telecommunication effective marker Q.City's signal of telecommunication is then directly utilized to carry out clock count time normal.Carry out Initialize installation to chip port 311, concrete, chip port is set to input state, and external interrupt is opened, when external interrupt satisfies condition, such as zero cross signal ZERO is rising edge, and the first counting variable adds 1.When timing variable reaches predetermined value, the first counting variable resets, and the second of clock adds 1.When reaching 60 the second of clock, the second of clock resets, and dividing of clock adds 1.When clock point reach 60 time, point resetting of clock, clock time add 1, until counting process terminates.First counting variable is determined by mains frequency, and such as, if mains frequency is 50Hz, being then exactly 1s when the first counting variable equals 50, if civil power is 60Hz, is then exactly 1s when the first counting variable equals 60.If city's signal of telecommunication is abnormal, then the first clock signal of the timer 312 calibrated is utilized to carry out timing.Initialize installation is carried out to timer 312, concrete, timing base is set.Such as timing base is set to 1ms, and every 1ms second counting variable adds 1, and when the second counting variable reaches 1000, the second counting variable resets, and the second of clock adds 1.When reaching 60 the second of clock, the second of clock resets, and dividing of clock adds 1.When clock point reach 60 time, point resetting of clock, clock time add 1.The duration utilizing calibrated timer 312 clock signal to carry out counting can only be the setting calibration duration of timer 312, and the concrete time span that namely calibration value N is corresponding, time clock feature is only accurately within this time period.
So, the adjustment to clock accuracy can be completed.When city's signal frequency is normal, use city's signal of telecommunication timing, when civil power abnormal signal, use calibrated timer in controller to carry out timing, still can ensure the accuracy of clock.
An embodiment of the invention provide a kind of clock apparatus and control method, use existing computer board and hardware, and the resource such as civil power, obtain stable clock source, by means of the accuracy of city's signal of telecommunication, when its frequency is normal, the clock of main control chip is calibrated and precision adjustment, when external stabilization clock source lost efficacy, time clock feature still can normally be run, and precision meets the demands.
In the description of this specification, specific features, structure, material or feature that the description of reference term " execution mode ", " some execution modes ", " exemplary embodiment ", " example ", " concrete example " or " some examples " etc. means to describe in conjunction with described execution mode or example are contained at least one execution mode of the present invention or example.In this manual, identical execution mode or example are not necessarily referred to the schematic representation of above-mentioned term.And the specific features of description, structure, material or feature can combine in an appropriate manner in any one or more execution mode or example.
Although illustrate and describe embodiments of the present invention, those having ordinary skill in the art will appreciate that: can carry out multiple change, amendment, replacement and modification to these execution modes when not departing from principle of the present invention and aim, scope of the present invention is by claim and equivalents thereof.

Claims (11)

1. a clock control device, is characterized in that, comprising:
Clock module, for providing the first clock signal;
Zero passage detection module, for detecting city's signal of telecommunication and obtaining zero cross signal; And
Control module, described control module respectively with described clock module and described zero passage detection model calling, described control module for the treatment of described zero cross signal with obtain civil power second clock signal and according to described second clock signal calibration the first clock signal.
2. clock control device as claimed in claim 1, it is characterized in that, described clock module is crystal oscillating circuit or Tao Zhen circuit.
3. clock control device as claimed in claim 1, it is characterized in that, described zero passage detection module comprises:
Photoelectrical coupler, described photoelectrical coupler comprises first input end, the second input, the first output and the second output; Described first input end is connected with the live wire of civil power, and described second input is connected with the zero line of civil power, described first output head grounding;
First resistance, described second output exports described zero cross signal by described first resistance;
Second resistance, described second resistant series is arranged between described first input end and civil power live wire;
3rd resistance, described 3rd resistance is arranged between described second output and predeterminated voltage; And
First electric capacity, described first capacitances in series is arranged between described second output and ground.
4. clock control device as claimed in claim 3, it is characterized in that, described photoelectrical coupler comprises:
Light-emitting diode, the anode of described light-emitting diode is described first input end, and the negative electrode of described Light-Emitting Diode is described second input; And
Phototriode, very described first output of transmitting of described phototriode, very described second output of current collection of described phototriode.
5. clock control device as claimed in claim 1, it is characterized in that, described control module comprises:
Processing unit, described processing unit comprises chip port and timer;
Clock selecting portion, described clock selecting portion is used for selective system clock;
Clock filtering portion, described clock filtering portion is used for carrying out filtering process to described zero cross signal;
Clock alignment portion, described clock alignment portion is used for calibrating described clock signal; And
Clock accuracy handling part, described clock accuracy handling part is used for regulating the precision of described clock signal.
6. clock control device as claimed in claim 5, it is characterized in that, described chip port and described timer are the input/output terminal of described processing unit, are connected with described clock selecting portion, described clock filtering portion, described clock alignment portion, described clock accuracy handling part.
7. clock control device as claimed in claim 1, it is characterized in that, described clock control device also includes the display module be connected with described control module, and described display module is used for read clock information.
8. a clock control method, is characterized in that, comprises the following steps:
S1, selects the first clock signal;
S2, collects the zero cross signal of civil power;
S3, processes described zero cross signal, obtains second clock signal; And
S4, calibrates described clock first clock signal according to described second clock signal, obtains the 3rd clock signal.
9. clock control method as claimed in claim 8, it is characterized in that, described step S3 comprises following sub-step:
S31, carries out filtering process to described zero cross signal, and filtering variable adds up; And
S32, judging that whether the described city signal of telecommunication is normal according to described filtering variable accumulated value, and to city's signal of telecommunication effective marker assignment, be normally 1, is 0 extremely.
10. clock control method as claimed in claim 9, it is characterized in that, described step S4 comprises sub-step:
According to described city signal of telecommunication effective marker, S41, judges that whether the described city signal of telecommunication is normal, if so, enters step S42, if not, return;
S42, calibrates, and calibration variables adds up; And
S43, when described calibration variables is added to predetermined value, calibration terminates.
11. clock control methods as claimed in claim 9, it is characterized in that, described step also comprises sub-step after described step S4:
According to described city signal of telecommunication effective marker, S51, judges that whether the described city signal of telecommunication is normal, if so, enters step S52; If not, step S53 is entered;
S52, described second clock signal carries out clock count, and the first timing variable adds up; And
S53, described 3rd clock signal carries out clock count, and the second timing variable adds up.
CN201510240857.5A 2015-05-12 2015-05-12 Clock control device and its control method Active CN104821806B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510240857.5A CN104821806B (en) 2015-05-12 2015-05-12 Clock control device and its control method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510240857.5A CN104821806B (en) 2015-05-12 2015-05-12 Clock control device and its control method

Publications (2)

Publication Number Publication Date
CN104821806A true CN104821806A (en) 2015-08-05
CN104821806B CN104821806B (en) 2018-01-02

Family

ID=53731999

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510240857.5A Active CN104821806B (en) 2015-05-12 2015-05-12 Clock control device and its control method

Country Status (1)

Country Link
CN (1) CN104821806B (en)

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105847100A (en) * 2016-06-20 2016-08-10 福州台江区超人电子有限公司 Mobile phone household intelligent control system
CN105867263A (en) * 2016-06-20 2016-08-17 福州台江区超人电子有限公司 Intelligent control system for barbershop
CN105872112A (en) * 2016-06-20 2016-08-17 福州台江区超人电子有限公司 Remote communication control system for traditional Chinese medicine decoction room
CN105955050A (en) * 2016-06-20 2016-09-21 福州台江区超人电子有限公司 Household intelligent control system
CN106054710A (en) * 2016-06-20 2016-10-26 福州台江区超人电子有限公司 Intelligent control system for eating house
CN106054711A (en) * 2016-06-20 2016-10-26 福州台江区超人电子有限公司 Intelligent control system for restaurant
CN106100946A (en) * 2016-06-20 2016-11-09 福州台江区超人电子有限公司 A kind of household electric appliances remote control system
CN106102225A (en) * 2016-06-20 2016-11-09 福州台江区超人电子有限公司 Bridge guardrail pipe control system of lamp decoration
CN106101237A (en) * 2016-06-20 2016-11-09 福州台江区超人电子有限公司 A kind of green house of vegetables temperature and humidity control system
CN108768574A (en) * 2018-05-03 2018-11-06 杭州讯能科技有限公司 A kind of synchronous method of network clocking, device, equipment and readable storage medium storing program for executing
CN106020030B (en) * 2016-07-19 2018-12-04 福州准点信息科技有限公司 Eating house intelligence control system
CN109062021A (en) * 2018-09-21 2018-12-21 珠海格力电器股份有限公司 It is a kind of to interrupt the method and air conditioner for generating time base by zero passage

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100291185B1 (en) * 1997-06-26 2001-07-12 박종섭 Apparatus for minimizing clock skew
CN102842915A (en) * 2012-08-23 2012-12-26 天津大学 Grid-connected inverter with information integration function
CN203494061U (en) * 2013-07-09 2014-03-26 广东紫薇星实业有限公司 Portable magnetic therapy apparatus
CN204539101U (en) * 2015-05-12 2015-08-05 广东美的厨房电器制造有限公司 Clock control device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100291185B1 (en) * 1997-06-26 2001-07-12 박종섭 Apparatus for minimizing clock skew
CN102842915A (en) * 2012-08-23 2012-12-26 天津大学 Grid-connected inverter with information integration function
CN203494061U (en) * 2013-07-09 2014-03-26 广东紫薇星实业有限公司 Portable magnetic therapy apparatus
CN204539101U (en) * 2015-05-12 2015-08-05 广东美的厨房电器制造有限公司 Clock control device

Cited By (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105847100B (en) * 2016-06-20 2018-08-17 福州准点信息科技有限公司 Mobile phone household intelligent control system
CN105872112B (en) * 2016-06-20 2018-09-25 福州准点信息科技有限公司 A kind of Traditional Chinese medicine decocting room Telecommunications Control System
CN105872112A (en) * 2016-06-20 2016-08-17 福州台江区超人电子有限公司 Remote communication control system for traditional Chinese medicine decoction room
CN105955050A (en) * 2016-06-20 2016-09-21 福州台江区超人电子有限公司 Household intelligent control system
CN106054710A (en) * 2016-06-20 2016-10-26 福州台江区超人电子有限公司 Intelligent control system for eating house
CN106054711A (en) * 2016-06-20 2016-10-26 福州台江区超人电子有限公司 Intelligent control system for restaurant
CN106100946A (en) * 2016-06-20 2016-11-09 福州台江区超人电子有限公司 A kind of household electric appliances remote control system
CN105847100A (en) * 2016-06-20 2016-08-10 福州台江区超人电子有限公司 Mobile phone household intelligent control system
CN106101237A (en) * 2016-06-20 2016-11-09 福州台江区超人电子有限公司 A kind of green house of vegetables temperature and humidity control system
CN106054711B (en) * 2016-06-20 2018-12-04 福州准点信息科技有限公司 Intelligent control system for restaurant
CN106102225A (en) * 2016-06-20 2016-11-09 福州台江区超人电子有限公司 Bridge guardrail pipe control system of lamp decoration
CN106100946B (en) * 2016-06-20 2018-09-14 福州准点信息科技有限公司 A kind of household electric appliances remote control system
CN106101237B (en) * 2016-06-20 2018-09-25 福州准点信息科技有限公司 A kind of green house of vegetables temperature and humidity control system
CN105867263A (en) * 2016-06-20 2016-08-17 福州台江区超人电子有限公司 Intelligent control system for barbershop
CN105955050B (en) * 2016-06-20 2018-10-02 福州准点信息科技有限公司 Home furnishings intelligent networked control systems
CN105867263B (en) * 2016-06-20 2018-05-22 福州准点信息科技有限公司 A kind of barber shop's intelligence control system
CN106054710B (en) * 2016-06-20 2018-12-04 福州准点信息科技有限公司 eating house intelligent control system
CN106020030B (en) * 2016-07-19 2018-12-04 福州准点信息科技有限公司 Eating house intelligence control system
CN108768574A (en) * 2018-05-03 2018-11-06 杭州讯能科技有限公司 A kind of synchronous method of network clocking, device, equipment and readable storage medium storing program for executing
CN109062021A (en) * 2018-09-21 2018-12-21 珠海格力电器股份有限公司 It is a kind of to interrupt the method and air conditioner for generating time base by zero passage

Also Published As

Publication number Publication date
CN104821806B (en) 2018-01-02

Similar Documents

Publication Publication Date Title
CN104821806A (en) Clock control device and control method thereof
KR101375523B1 (en) Circuit for measuring duty cycle of pulse width modulation signal
CN110191549B (en) LED (light emitting diode) accurate timing switch lamp and accurate timing drive circuit thereof
CN101413975A (en) Three-phase power input phase lack detection circuit
CN102005795A (en) Electric quantity detecting device for rechargeable battery
CN106597075B (en) A kind of alternating voltage detection device and method
BR102016023946A2 (en) monitoring device for an overvoltage arrester and monitoring system comprising the monitoring device
CN204539101U (en) Clock control device
CN103884942B (en) A kind of degradation system and method for photoelectrical coupler
CN105719906A (en) High-precision time relay and control method thereof
CN108802704A (en) A kind of radar transmitted pulse detection based on CPLD and protection system and method
CN204044255U (en) A kind of test unit for photoelectrical coupler
CN107300650B (en) Intermittent life test system and method
CN102457268B (en) Implementation method for 32-bit capture register
CN103175633A (en) Electron temperature measuring circuit with self-regulating function
CN108809299A (en) signal frequency measuring system
CN109490772A (en) Electric relay detection device and system
CN203326576U (en) Switch power supply over-current protection circuit
CN104020335B (en) Determine the method for minimum running voltage, device and the chip of chip
CN104698361B (en) The test device of SPM
CN208140791U (en) A kind of zero-detection circuit
US20140114593A1 (en) Apparatus and method for calculating electrical charge quantity or electrical discharge quantity for battery unit according to calibration parameter used for adjusting time interval of electrical charge/discharge calculation, and method for calibrating integral time interval
JP4550709B2 (en) Pulse counter
JP2022057025A (en) Instantaneous interruption of ac power supply and/or instantaneous low detection device
CN106123985B (en) A kind of flow signal synchronous

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
EXSB Decision made by sipo to initiate substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant