CN1206959A - Pulse signal generator and generating method thereof - Google Patents

Pulse signal generator and generating method thereof Download PDF

Info

Publication number
CN1206959A
CN1206959A CN 98103098 CN98103098A CN1206959A CN 1206959 A CN1206959 A CN 1206959A CN 98103098 CN98103098 CN 98103098 CN 98103098 A CN98103098 A CN 98103098A CN 1206959 A CN1206959 A CN 1206959A
Authority
CN
China
Prior art keywords
signal
pulse
clock signal
reference signal
cycle
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
CN 98103098
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.)
NEC Corp
Original Assignee
NEC Corp
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 NEC Corp filed Critical NEC Corp
Priority to CN 98103098 priority Critical patent/CN1206959A/en
Publication of CN1206959A publication Critical patent/CN1206959A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Control Of Stepping Motors (AREA)

Abstract

A pulse signal generation device including a reference signal cycle measuring unit (11) for receiving input of a reference signal to calculate a cycle of the reference signal by using an appropriate clock signal, a pulse width calculation unit (12) for obtaining the number of pulses oscillating during a period of one cycle of a reference signal and dividing a cycle of a reference signal on a clock signal basis measured by the reference signal cycle measuring unit (11) by the number of pulses of the pulse signal to calculate a pulse width of a pulse signal on the basis of the clock signal, and a pulse signal generation unit (13) for generating a pulse signal with a pulse width calculated by the pulse width calculation unit (12).

Description

Pulse signal generation device and method
The present invention relates to a kind of pulse generating unit, this pulse generating unit is in a pulse with output one predetermined number in cycle of signal of assigned frequency, as the vertical synchronizing signal that is used for video control.
Consideration produces the pulse signal with fixed number oscillating impulse in having the one-period of the signal S1 of fixed cycle as shown in figure 14.In that pulse signal S2 will the signal S1 of fixed cycle exports according to having as shown in FIG., the pulse period that can obtain exporting by following calculation expression (1) (duty ratio: 50%):
Figure A9810309800051
In this formula, the cycle of T1 representation signal S1, the umber of pulse of the pulse signal S2 that the Np representative is exported in the one-period of signal S1.
For example, the cycle of putative signal S1 is 10ms, and the umber of pulse of pulse signal S2 is to be expressed as follows half cycle time of 4, one pulses in the one-period of signal S1: 10 ms 4 × 2 = 1.25 ms - - - ( 2 )
The following describes procedure operation in the cycle of one of said fixing periodic signal inner control pulse signal umber of pulse.In this case, pulse signal is exported by the timer Interrupt Process of carrying out in the fixed cycle edges of signals that external interrupt is handled and per half pulse signal cycle begins.
Figure 15 is the block diagram that shows the particular hardware structure that is used for this operational instances.Pulse signal generation device 1500 shown in Figure 15 comprises: a time-sharing circuit 1501 is used for the clock signal frequency division that external oscillator 1510 vibrations are produced; One timer counter register 1502 is used for the clock number counting of the clock signal behind the frequency division of time-sharing circuit 1501 outputs in a fixed cycle; With an edge testing circuit 1504, be used to detect the edge of the fixed cycle input signal S150 that the outside applies; With a timer comparand register 1503, be used to be provided with the pulse that to export pulsewidth towards signal.
Shown in Figure 16 is the flow chart that adopts the external interrupt of above-mentioned pulse signal generation device 1500 to handle, and shown in Figure 17 be the flow chart that adopts the timer Interrupt Process of above-mentioned pulse signal generation device 1500.Figure 18 is the sequential chart in the time sequential routine of output one pulse signal.The beginning sequential that pulse signal generation device 1500 is handled drops on the rising edge that the outside applies fixed cycle signal S150.
At first, when external interrupt shown in Figure 16 is handled, obtain a pulse duration (step 1601) of determining arbitrarily that is used for wanting output pulse signal, thereby timer comparand register 1503 is provided with resulting pulse width values (step 1602).Then, begin to export a pulse signal (step 1603) to start timer (step 1604).Then, carry out the timer Interrupt Process of pulse output to finish this processing (step 1605).Again then, after half past output pulse period, timer Interrupt Process shown in Figure 17 begins.
In the timer Interrupt Process, at first whether the output level of pulse signal anti-phase (step 1701) is finished (step 1702) with the output of determining pulse signal.For continuous output pulse signal, next timer break period is set to finish this processing (step 1703).On the other hand, in order to finish the output of pulse signal, timer interrupts being set to forbid to finish this processing (step 1704).
The following describes the example that above-mentioned conventional pulse signal generation device is applied to the lens control device of video camera.At first the Stepping Motor Control method will be described.Figure 19 is the block diagram of stepping motor control apparatus, and Figure 20 is the sequential chart of the signal of drive stepping motor.A microcomputer 1901 shown in Figure 19 has been realized the various functions of the pulse signal generation device 1500 shown in Figure 15 by program control.
Microcomputer 1901 receives the input of vertical synchronizing signal S190, permits signal S193 to export a step motor drive pulse signal S191, a stepping motor direction control signal S192 and a step motor drive to a step motor control IC1902.The step motor drive signal S194 that the various control signals outputs that step motor control IC1902 response is sent by microcomputer 1901 are made of the signal of one to four phase.The driving that the output level of step motor control IC 1902 each pulse by the step motor drive pulse signal S191 that sends at microcomputer 1901 change step motor drive signal S194 comes control step motor 1903.
The operation of the microcomputer that is used for camera lens control 1901 output step motor drive pulse signal S191 as an example will be described below.In the microcomputer 1901 of control video camera, software moves according to vertical synchronizing signal S190, so that view data is handled.Microcomputer 1901 is determined the relevant information that focuses at phase vertical synchronizing signal S1901 weekly, with the control amasthenic lens, thereby picture is focused.Also have, in the operation of zoom lens, because the single operation of zoom lens has arrived outside the focus picture, and therefore zoom lens should be operated with the focusing of amasthenic lens, so microcomputer is controlled according to vertical synchronizing signal S190.
Here the situation in the time of will error occurring in conjunction with the system clock when microcomputer 1901 describes.The system clock of microcomputer 1901 (the signal S1 of a fixed cycle) is because the change of temperature and oscillator changes of properties and produced an error in the assigned frequency of oscillator.Thereby when having produced an error and increased the time in 1901 system clock S1 cycles of microcomputer, last output time of pulse signal S2 shortens, as shown in figure 21.On the contrary, when error produces when shortening the time of system clock S1 one-period, last output time of pulse signal S2 has just prolonged, as shown in figure 22.
The driving time of zoom motor and focusing motor will be described below.When the amasthenic lens operation focused on, generally speaking, when the degree that defocuses was high, camera lens moved significantly with quick focusing, and when the degree that defocuses was low, camera lens slowly moved and focuses on.Relation between the zoom lens action that the manipulation of zoom lens and zoom lever form will illustrate in conjunction with Figure 23.The state of supposing the zoom lever that is not inclined to any direction is as neutral state, and by zoom lever being tilted to a preset direction amasthenic lens moved on to and to take the photograph (TELE) mode far away or wide-angle (WIDE).Tilt zoom bar to an assigned direction causes amasthenic lens to move on to TELE mode or WIDE mode apace significantly, and the tilt zoom bar makes camera lens move slowly by a small margin.
For the fast moving zoom lens, the pulse number of the step motor drive pulse signal of exporting in the time at the one-period of vertical synchronizing signal S190 increases (Figure 24).On the contrary, moving lens lentamente, the pulse number of the step motor drive pulse signal of exporting in the time at the one-period of vertical synchronizing signal S190 will be reduced (Figure 25).In the zoom motor, because the error rate in the impulse hunting of step motor drive pulse signal at interval increases, the driving sound that is produced also increases.Therefore, as shown in figure 24, the fast moving zoom lens will increase the error rate in the impulse hunting at interval of step motor drive pulse signal, cause sending big driving sound.On the contrary, as shown in figure 25, slowly the error rate in the impulse hunting at interval of zoom lens motionless zoom lens minimizing step motor drive pulse signal can send less relatively driving sound.
As previously mentioned, because conventional pulse signal generation device is owing to the difference of the change of temperature and oscillator self performance has produced an error of microsystem clock, this device can not produce accurate pulse signal.
For example, in the drive controlling of stepping motor, because comprise an error as the step motor drive pulse signal of coherent pulse signal, stepping motor can not accurately be driven.
Also have, when stepping motor during at high-speed cruising, the pulse duration of step motor drive pulse signal shortens and has increased error rate in a pulse duration, causes the increase of oscillator on step motor drive pulse signal error rate.Therefore increased stepper motor driven sound.
Because stepper motor driven sound increases, the driving sound of stepping motor will carry out going on record as noise during the picture photographing at video camera.
An object of the present invention is to provide a kind of pulse signal generation device, it can solve the defective of above-mentioned routine, and can produce an accurate pulse consistently, and the method that this device adopted by the pulse duration of regulating the pulse signal that to export according to reference signal with fixed frequency.
Another object of the present invention provides a kind of pulse signal generation device, and when being used for step motor control, it can prevent that driving sound from increasing by exporting a stable drive pulse signal, and the method that this device adopted.
A further object of the present invention provides a kind of pulse signal generation device, when being used for Infrared remote controller, it can proofread and correct clock signal used when producing remote signal, reducing oscillator to clocking in the requirement aspect the high accuracy, and the method that this device adopted.
According to an aspect of the present invention, pulse signal generation device with pulse signal of the preset frequency consistent with the fixed cycle reference signal of a kind of generation comprises:
The cycle reference signal measurement mechanism is used to receive the input of reference signal, to calculate the cycle of reference signal with suitable clock signal;
The pulse duration calculation element, be used to obtain the number of oscillating impulse in the reference signal one-period, and the clock signal that measures according to the cycle reference signal measurement mechanism is with cycle of this reference signal pulse number frequency division by the pulse signal, to calculate the pulse duration of pulse signal according to this clock signal; With
Pulse signal generation device is used to produce a pulse signal, and this pulse signal has the pulse duration that calculates with the pulse duration calculation element.
In preferred construction, the clock number of the clock signal that cycle reference signal measurement mechanism counting vibrates in the reference signal one-period is with the cycle of the reference signal that obtains being recorded by this clock signal.
In another preferred structure, the calculated value in pulse duration calculation element comparison reference signal cycle and the measured value of cycle reference signal, calculating the error of clock signal, and proofread and correct pulse duration calculated value based on the pulse signal of clock signal according to the error of clock signal.It is error free and clock signal that calculate obtains, described cycle reference signal measured value clock signal actual measurement that the calculated value of described cycle reference signal is based on the supposition clock signal.
In preferred construction, the cycle reference signal measurement mechanism calculates the clock number of oscillating clock signal in the reference signal one-period, with cycle of the reference signal that obtains recording by clock signal and
The pulse duration calculation element compares the calculated value of cycle reference signal and the measured value of cycle reference signal to calculate the error amount of clock signal, wherein the calculated value of cycle reference signal is to be that basic calculation obtains with the clock signal calculated when not having error in the supposition clock signal, and the measured value of cycle reference signal is by obtaining with clock signal actual measurement one cycle reference signal.Proofread and correct calculated value according to the error of clock signal then based on the pulse signal pulse duration of clock signal.
In another preferred construction, cycle reference signal measurement mechanism, pulse duration calculation element and pulse signal generation device are set on the microcomputer, to be controlled at the driving of the stepping motor that uses in the camera lens control;
Reference signal is a vertical synchronizing signal;
Clock signal is the clock signal of system of a microcomputer; With
The pulse signal that is produced is a pulse signal that is used for the control step motor.
In another preferred structure, cycle reference signal measurement mechanism, pulse duration calculation element and pulse signal generation device are set on the microcomputer that is installed on the infrared remote controller;
Reference signal is one to be used for first clock signal of timer function;
Clock signal is one to be used to produce the second clock signal of remote signal;
The pulse signal that produces is a remote signal; With
The pulse duration calculation element compares the first clock signal period calculated value and the first clock signal period measured value to calculate the error amount of second clock signal, wherein the first clock signal period calculated signals value is that the second clock calculated signals of calculating when not having error according to supposition second clock signal obtains, and the first clock signal period measured value is by obtaining with second clock signal actual measurement first clock signal period.Proofread and correct calculated value according to the error of second clock signal then based on the remote signal pulse duration of second clock signal.
According to a further aspect in the invention, a kind of generation has the pulse signal generation method of the pulse signal of the preset frequency consistent with the fixed cycle reference signal, comprises the steps:
The input that receives reference signal is to calculate the cycle of reference signal with a suitable clock signal;
Obtain the number of oscillating impulse in the reference signal one-period, and according to clock signal with cycle of this reference signal pulse number frequency division, to calculate the pulse duration of pulse signal according to this clock signal by the pulse signal; With
Produce a pulse signal, this pulse signal has the pulse duration that calculates.
In preferred construction, in the step of calculating cycle reference signal,
To the clock number of the oscillating clock signal in reference signal one-period counting, with the periodicity of the reference signal that obtains recording by clock signal.
In preferred construction, the pulse duration calculation procedure comprises the steps:
The calculated value of cycle reference signal and the measured value of cycle reference signal are compared to calculate the error amount of clock signal, wherein the calculated value of cycle reference signal is to be that basic calculation obtains with the clock signal calculated when not having error in the supposition clock signal, and the measured value of cycle reference signal is by obtaining with clock signal actual measurement one cycle reference signal; With
Proofread and correct pulse duration calculated value according to the error of this clock signal based on the pulse signal of clock signal.
Other purpose of the present invention, feature and advantage will embody from following detailed description.
Understand by having more fully the present invention in detailed description of preferred embodiments given below and the accompanying drawing, wherein preferred embodiment should not be regarded as limitation of the present invention, and it only is in explains and illustrative purposes.
In the accompanying drawing:
Figure 1 shows that the block diagram of the structure of pulse signal generation device according to an embodiment of the invention;
The flow chart of performed operation when Fig. 2 controls for the camera lens that is applied to video camera when present embodiment, it is depicted as the schematic diagram of signal edge Interrupt Process operation;
The flow chart of performed operation when Fig. 3 controls for the camera lens that is applied to video camera when present embodiment, it is depicted as the schematic diagram of pulse duration computing operation;
The flow chart of performed operation when Fig. 4 controls for the camera lens that is applied to video camera when present embodiment, it is depicted as the schematic diagram of pulse signal output function;
Figure 5 shows that a kind of block diagram of structure of the stepping motor control apparatus that adopts present embodiment;
Figure 6 shows that the block diagram of the hardware configuration of the capture interrupt of being responsible for stepping motor control apparatus shown in Figure 5;
Figure 7 shows that the block diagram of the hardware configuration of the timer interruption of being responsible for stepping motor control apparatus shown in Figure 5;
Figure 8 shows that the sequential chart that is used to explain the timer counting principle;
Figure 9 shows that the block diagram of the structure of the infrared remote controller that adopts present embodiment;
Figure 10 shows that an exemplary plot of remote controller signal;
Figure 11 is the flow chart of performed operation when present embodiment is applied to infrared remote controller, and it is depicted as the schematic diagram that the master clock Error Calculation is handled operation;
Figure 12 is the flow chart of performed operation when present embodiment is applied to infrared remote controller, and it is depicted as the schematic diagram that operation is handled in remote signal output;
Figure 13 shows that the schematic diagram of the timer operation that is used for illustrating the master clock Error Calculation;
The cycle according to external signal of Figure 14 shows that is during output pulse signal, the sequential chart of the relation between external signal and the pulse signal;
Figure 15 shows that the block diagram of the structure of a conventional pulse signal generation device;
Figure 16 shows that the flow chart of the external interrupt processing operation in the conventional pulse signal generation device;
Figure 17 shows that the flow chart of the timer Interrupt Process operation in the conventional pulse signal generation device;
The sequential chart of the pulse signal oscillating operation that conventional pulse signal generation device carried out of serving as reasons shown in Figure 180;
Figure 19 shows that a kind of schematic diagram of structure of the stepping motor control apparatus that adopts conventional pulse signal generation device;
The sequential chart of the step motor drive control that step motor drive control device of serving as reasons the conventional pulse signal generation device of use shown in Figure 20 is carried out;
Shown in Figure 21 is the sequential chart of an example of the error in the pulse signal of the actuating force of control step motor;
Shown in Figure 22 is the sequential chart of another example of the error in the pulse signal of the actuating force of control step motor;
Shown in Figure 23 is the schematic diagram that concerns between the operation of convergent-divergent motor and actuating speed;
Shown in Figure 24 in convergent-divergent motor-driven speed by the sequential chart of an example of the caused error of error of the pulse signal of the actuating force that is used for the control step motor;
Shown in Figure 25 in convergent-divergent motor-driven speed by the sequential chart of another example of the caused error of error of the pulse signal of the actuating force that is used for the control step motor;
Next with reference to the accompanying drawings the preferred embodiments of the present invention are discussed in detail.In ensuing explanation, will provide many details and one of the present invention be understood completely to provide.Yet, those technology skilful persons be it is evident that the present invention can implement under the situation of these details not having.In other example,, the present invention will at length not show for well-known structure for being beyonded one's depth.
Figure 1 shows that the schematic block diagram of the structure of pulse signal generation device according to an embodiment of the invention.The pulse signal generation device 10 of present embodiment adopts the reference signal of fixed cycle, produces and export the pulse signal of the required pulse width in a cycle with the reference signal of being shorter than.With reference to Fig. 1, the pulse signal generation device 10 of present embodiment comprises a cycle reference signal measuring unit 11 that is used for the cycle of measuring reference signals, one is used for determining a pulse duration computing unit 12 with the pulse duration (cycle) of the pulse signal that is output according to the result of calculation that is obtained by cycle reference signal measuring unit 11, and one is used to produce and export a pulse signal generating unit 13 that has by the pulse signal of pulse duration computing unit 12 determined pulse duration j.Among Fig. 1, only the unique portion in this enforcement structure is illustrated, and omitted remaining common part.Pulse signal generation device 10 is realized by the microcomputer of a computer program control.A computer program that is used to control this microcomputer is stored in such as disk, in the common storage of CD or semiconductor memory.This program is called in the internal memory of microcomputer to control a data processing unit, carries out above-mentioned cycle reference signal measuring unit 11 thus, the function of pulse duration computing unit 12 and pulse signal generating unit 13.
In above-mentioned structure, cycle reference signal measuring unit 11 receives the input of a reference signal and utilizes a suitable clock signal to calculate the cycle of this reference signal.More particularly, the clock number of the clock signal of being vibrated in the time at the one-period of reference signal by statistics, unit 11 utilize described clock signal to obtain the cycle of the reference signal calculated.
The pulse number that the pulse signal that pulse duration computing unit 12 obtains being output is vibrated in the one-period of reference signal, and the cycle of the reference signal that will be calculated by cycle reference signal measuring unit 11 divided by the pulse number of the pulse signal that will be output to calculate the cycle of this pulse signal, i.e. pulse duration according to described clock signal.In practice, can adopt multiple different computational methods according to the purposes of the pulse signal that will export.For example can be with the one-period of reference signal divided by the twice of the pulse number of the pulse signal that will export time with half period of calculating the pulse signal that to export.
Pulse signal generation device 13 produces and exports a pulse signal with required pulse width according to the result of calculation that is obtained by pulse duration computing unit 12.When in pulse duration computing unit 12 as calculating as described in the above-mentioned example be time of half period of this pulse signal the time, just by with the output signal of every half period the output level pulse signal that oppositely can to export its cycle be the required cycle.
Next, will the pulse signal generation device of present embodiment specifically described as the application on the video camera of an example.Fig. 2 and the flow chart that Figure 4 shows that the operation of each processing that will be performed in this case.Figure 5 shows that the block diagram of the structure of a stepping motor control apparatus.With reference to Fig. 5, this stepping motor control apparatus comprises the step motor control IC520 and the microcomputer 530 that is used for this control step Electric Machine Control IC that are used for the driving of control step motor 510, and the pulse signal generation device 10 of present embodiment wherein shown in Figure 1 is installed on this microcomputer 530.
Among Fig. 5, be loaded into a reference signal that vertical synchronizing signal S10 is a fixed cycle on the microcomputer 530.The cycle of the clock signal of system of exporting in the built-in timer from microcomputer 530 is shorter than the cycle of vertical synchronizing signal S10.In addition, step motor drive pulse signal S11 of microcomputer 530 outputs.The operation that is used to control video camera all is to carry out on the basis of this vertical synchronizing signal S10.Therefore the amasthenic lens that does not show among the figure and the control of zoom lens are also carried out in an identical manner.
Figure 6 shows that the block diagram of the hardware configuration that is used to carry out capture interrupt.With reference to Fig. 6, this structure comprises an oscillator 610, a time-sharing circuit 601 that is used for five equilibrium clock signal (it is the output of oscillator 610) with the clock signal of system of generation microcomputer 530, a timer counter register 602 that is used to add up the output of time-sharing circuit 601, an edge sense circuit 603 that is used for the edge of detection of vertical synchronizing signal S10, and one be used for catching register 604 in the count value of the timing place storage timer counter register 602 of edge sense circuit 603 output.The time-sharing circuit 601 of said structure, timer counter register 602, edge sense circuit 603 and catch register 604 and on microcomputer 530, realize by a computer program by controller and operate as a cycle reference signal measuring unit 11 as shown in Figure 1.
Figure 7 shows that the schematic diagram that is used to carry out the hardware configuration that timer interrupts.With reference to Fig. 7, this structure comprises an oscillator 610,601, one timer counter registers 602 of a time-sharing circuit and one are used for the time of the half period of a step motor drive pulse signal is made as the timer comparand register 605 of the pulse signal that will export.The time-sharing circuit 601 of said structure and timer counter register 602 are identical with its pairing element in Fig. 6, and one is used from capture interrupt and timer interruption.In addition, time-sharing circuit 601, timer counter register 602 and timer comparand register 605 are realized on microcomputer 530 by a computer program by controller and are operated as a pulse duration computing unit 12 shown in Figure 1.
When initial operation, in a single day detect the edge of the vertical synchronizing signal S10 that is loaded, catch register 604 and just be stored in a count value that detects the moment timer counter register 602 at edge by edge sense circuit 603 by edge sense circuit 603.Subsequently, in the identical moment, capture interrupt request signal S15 of unit 604 outputs.Corresponding to interrupt request singal S15, microcomputer 30 is by cycle reference signal measuring unit 11 and pulse duration computing unit 12 enabling signal edge Interrupt Process and pulse duration computing.
In signal edge was as shown in Figure 2 handled, the time span of the one-period of vertical synchronizing signal S10 was calculated.In the signal edge is handled,, be stored in a register value of catching in the register 604 and be stored among the RAM as internal memory as what will be illustrated thereafter.Subsequently, in case output capture interrupt signal from catch register 604 is just according to the period T cr of following expression formula (3) (it is based on a register value CR1 who catches register 604 who is kept at register value CR0 among the RAM by previous signal edge Interrupt Process and obtains in the current output of capture interrupt signal) calculating based on the vertical synchronizing signal S10 of clock signal of system.
Tcr=(number of times that overflows * 10000H)+CR1-CR0 ... (3)
The number of times that overflows is represented the number of times that the numeral of the clock signal of system that constitutes by 601 five equilibriums of time-sharing circuit and by clock count register 602 is overflowed, and 10000H represents that then the digital counting register 602 of present embodiment utilizes 16 bit timing device computing system clock signals.
Next, be stored in cycle of the vertical synchronizing signal S10 that calculated as (step 202) among the RAM of internal memory and will be stored in (step 203) among the RAM by the register value CR1 that catches register 604 that this processing obtained similarly.
Next, will the pulse duration computing about step motor drive pulse signal shown in Figure 3 be described.At first, will reach according to the period T cr of the above-mentioned vertical synchronizing signal S10 that is calculated in signal edge Interrupt Process is the time T sp (step 301) of the set umber of pulse P of step motor drive pulse signal with the half period of following expression formula (4) calculated step motor-driven pulse signal S11: Tsp = Tcr P × 2 - - - - - - ( 4 )
Next, time value of putting of half period that will be by the resulting stepping motor pulse signal of aforementioned calculation S11 (step 302) in the timer stepping register 605.Subsequently, the number that the initial output level (step 303) of step motor drive signal S11 is set and the pulse that will be output is set in addition interrupts (step 305) so that the timer that will be allowed to be set.
Through the value of putting after the time in the timer stepping register 606, the output of step motor drive signal S11 is handled and is timed the device Interrupt Process and starts after finishing aforesaid operations.
Next, pulse signal generating unit 13 is carried out the output processing of stepping motor enabling signal shown in Figure 4.At first, unit 13 with the output level of step motor drive signal S11 oppositely (step 401) to determine whether to have finished the output (step 402) of step motor drive signal S11.In order to continue the output of step motor drive signal S11, subtract " 1 " by the output number at step S122 (403) and calculate the umber of pulse of step motor drive signal to permit next pulse output handling interrupt (step 404).Subsequently, in case finished and output in the number same number of the set pulse of the step 304 of Fig. 3, thus unit 13 is just forbidden ensuing pulse and is continued to interrupt finishing this processing (step 402 and 404).
Below aforesaid operations is summarized.Built-in timer (clock signal of system) by microcomputer 530 is calculated cycle of being loaded into the vertical synchronizing signal S10 on the microcomputer 530 and the cycle that is obtained is divided into the required umber of pulse that is provided with into the step motor drive signal S11 cycle with calculated step motor drive signal S11, and stepping motor 510 is had the step motor drive signal S11 driving in gained cycle thus.Therefore even when the frequency shift of the oscillator 610 of microcomputer 530, it also can be set to by the umber of pulse of step motor drive signal S11 be same as vertical synchronizing signal S10 and export the step motor drive signal S11 with same widths consistently.In addition, by changing the output umber of pulse of step motor drive signal S11, it can be according to described number number output step motor drive signal S11.
In addition, because the deration of signal is measurement in the one-period (T1 among Fig. 8) at vertical synchronizing signal S10, and step motor drive signal S11 is output in the next cycle (T2 of Fig. 8) at vertical synchronizing signal S10, and the frequency change of oscillator can be discerned in real time to correct the pulse duration of step motor drive signal S11.Consequently, even when the frequency of oscillator takes place to change brokenly owing to multiple factor, it also can export a step motor drive signal accurately consistently for vertical synchronizing signal S10.
As mentioned above, because in above-mentioned application example, the cycle of vertical synchronizing signal S10 is to utilize a reference clock signal based on the clock signal that is produced by oscillator 610 to calculate, and the pulse duration of step motor drive signal S11 is determined according to this result of calculation, therefore can export a pulse signal that obtains by accurate five equilibrium vertical synchronizing signal S10.Consequently, the output time of step motor drive signal S11 neither can be extended also and can not be shortened, thereby makes stepping motor 510 operate reposefully.
Thereby this configuration has reduced the driving noise of stepping motor prevents to note stepping motor when video camera is recorded driving noise.In addition, when stepping motor during, thereby will not prevent that the increase of stepping motor from driving noise owing to can not produce error in pulse duration with high speed operation.
Below, will carry out specific description as the application on the infrared remote controller of an example to the pulse signal generation device of present embodiment.Figure 9 shows that the block diagram of the structure of an infrared remote controller.With reference to Fig. 9, infrared remote controller comprises a microcomputer 910, a keyboard matrix that is used to receive an instruction input, a LCD display panel 930, a main clock oscillator 940 that is used to export a master clock signal, 950, one infrared LEDs 960 of secondary clock oscillator and a transistor 970 that is used for the signal amplification that is used to export a secondary clock signal, the pulse signal generation device 10 of present embodiment wherein shown in Figure 1 is installed on this microcomputer 910.
In said structure, be used as the crystal oscillator of the normally 32.78KHz of secondary clock oscillator 950, it also exercises the function of timer.Usually, the error of crystal oscillator approximately be ± 0.001%.As main clock oscillator 940 is to be used for procedure operation to export the oscillator of a remote signal.To be used as main clock oscillator 940 situations to the oscillator that has a frequency of oscillation error of several percentages in RC vibration below describes.
Ensuing explanation is to be one in the secondary clock signal of hypothesis to be divided into 2 by an output with secondary clock oscillator 950 14Part and have and carry out under the prerequisite of signal in cycle (500ms) of predetermined fixed, be a remote signal from the pulse signal output (pulse signal generation device 10) of microcomputer 910.Figure 10 shows that the schematic diagram of an example of the form of remote signal.The form of remote signal shown in Figure 10 is by a guidance code, one 32 bit data sign indicating number, and a terminating code and a frame period are formed.Contraposition 0 and position 1 have accurately defined the pulse duration of data bit as shown in the figure.
In the infrared remote controller of structure like this, pulse signal generation device 10 utilizes master clock signal to calculate the cycle of secondary clock signal to produce the remote signal based on this result of calculation.Different with Stepping Motor Control, for remote signal, be not arranged on the umber of pulse of being vibrated in the one-period of secondary clock signal, but according to the content-defined pulse duration of above-mentioned data.In advance accurately clock the cycle of secondary clock signal.Therefore, according to the result calculated of the secondary clock signal period that utilizes master clock signal to carry out, the error of master clock signal frequency is corrected and utilizes the master clock signal of being proofreaied and correct to produce a remote signal.
Figure 11 shows that the flow chart of master clock signal Error Calculation processing operation.What at first, wait and secondary clock signal counting finished counts (step 1101 and 1102) to start timer by a master clock signal synchronously.Then, wait for that once more secondary synchronization of clock signals is to stop timer counting (step 1103 and 1104) by a master clock signal.Subsequently, utilize the error (step 1105) of the count value calculating master clock signal of timer.
In the timer counting operation of step 1101 to 1104, timer begins in the operation cycle of a numerical value of as shown in figure 13 secondary clock signal master clock signal to be counted to obtain a count value from 0000h.Because the cycle of secondary clock signal is set as 500ms as mentioned above, therefore can obtain master clock signal to the desirable count value of a count cycle of secondary clock signal, the i.e. count value of a gained when master clock signal does not have error by calculating based on a frequency of oscillation of cycle of secondary clock signal and main clock oscillator 940.According to the count value C2 that calculates a resulting count value C1 and a reality by this, can calculate the error of master clock signal according to following expression (5). error ( % ) = C 2 - C 1 C 1 × 100 - - - ( 5 )
Figure 12 shows that the flow chart of remote signal output function.With reference to Figure 12, it is depicted as and is used for carrying out branch process (see figure 10) (step 1201) according to the formatting of the remote signal that will be output corresponding to first of the time data of the pulse duration of each signal.Subsequently, each signal is provided with corresponding to a pulse duration predefined time data (step 1202).Then, for the remote signal that will be output a high level and a low level (step 1203 and 1204) are set.Then, according to handle the error (step 1205) of error amount correction in the time data of each signal that is obtained by master clock signal Error Calculation shown in Figure 1.Subsequently, time data value of putting that error has been corrected (step 1206) in the timer stepping register.At last, the output mode with remote signal becomes the next pattern of operation.
Here, will the remote signal time error correction processing of step 1205 be described in detail.In the time data set handling of step 1202, setting is based on by calculating the time data of an ideal value being obtained, supposes promptly that master clock signal does not have error and the time data (being designated hereinafter simply as basic time) (it has been handled in Error Calculation shown in Figure 11 and has been illustrated) that obtains.In step 1205, according to following expression formula (6) based on the error of handling the master clock signal of obtaining by Error Calculation shown in Figure 11 to proofreading and correct described basic time.
Time=basic time * (1+error (%)) is set ... (6)
Because aforesaid operations can be proofreaied and correct the master clock signal from the error with several percentages of main clock oscillator 940 output for having the levels of errors (± 0.001%) that approximates secondary clock oscillator 950 greatly, therefore can export an accurate remote signal.
As mentioned above, in above-mentioned application example, utilize a known periods that master clock signal calculates secondary clock signal obtaining the error of master clock signal, thereby the output time of the remote signal utilizing master clock signal and produce is proofreaied and correct according to this error.This makes the error of master clock signal can be reduced to the error that approximates a high accuracy crystal oscillator greatly, thereby exports an accurate remote signal.In addition and since can with one have than mistake and the more cheap relatively oscillator of price as master oscillator 940, the manufacturing cost of device can be reduced.
As mentioned above, because when the reference signal based on a fixed cycle produces pulse signal, be used for producing and make that relatively the pulse duration of pulse signal can be regulated in real time between the clock signal of pulse signal and the reference signal when the error of clock signal is proofreaied and correct, pulse signal generation device of the present invention and method thereof can produce a pulse signal with appropriate frequency consistently according to a reference signal.
Such as, when applying the present invention to step motor drive when control, therefore it can export a pulse signal that has corresponding to the typical pulse width of the one-period of vertical synchronizing signal.Consequently, during drive stepping motor, the output time of a pulse signal that is used to drive neither can be extended also and can not be shortened, and drives noise thereby stepping motor can be operated reposefully to reduce.
When applying the present invention to infrared remote controller,, also can proofread and correct timer according to accurate clock signal even in the clock signal that be used for producing remote signal, have error.It has eliminated the needs to the high precision oscillator that is used to generate the clock signal that is used to produce remote signal, thereby has reduced manufacturing cost.
Although describe the present invention by exemplary embodiment, should under the situation that does not deviate from the spirit and scope of the present invention, can be carried out above-mentioned and other multiple variation by those technology skilful persons be understood that to the present invention, omit and increase.Therefore, the present invention should not be understood that only to be confined to above-mentioned specific embodiment, but has comprised the scope of the contained lid of characteristic of illustrating in the claim of being added and all possible embodiment within the equivalent thereof.

Claims (9)

1. a generation has the pulse signal generation device of the pulse signal of the preset frequency consistent with the fixed cycle reference signal, comprising:
Cycle reference signal measurement mechanism (11) is used to receive the input of described reference signal, to calculate the cycle of described reference signal with suitable clock signal;
Pulse duration calculation element (12), be used to obtain the number of oscillating impulse in described reference signal one-period, and the described clock signal that measures according to described cycle reference signal measurement mechanism (11) is with cycle of described reference signal pulse number frequency division by described pulse signal, to calculate the pulse duration of described pulse signal according to described clock signal; With
Pulse signal generation device (13) is used to produce a pulse signal, and this pulse signal has the pulse duration that calculates with described pulse duration calculation element (12).
2. pulse signal generation device as claimed in claim 1 is characterized in that:
Described cycle reference signal measurement mechanism (11), it is to the clock count of the described clock signal of vibrating in described reference signal one-period, with the cycle of the described reference signal that obtains being recorded by described clock signal.
3. pulse signal generation device as claimed in claim 1 is characterized in that:
Described pulse duration calculation element (12), it compares the calculated value of described cycle reference signal and the measured value of described cycle reference signal to calculate the error amount of described clock signal, the calculated value of wherein said cycle reference signal is to be that basic calculation obtains with the described clock signal calculated when not having error in the described clock signal of supposition, and the measured value of described cycle reference signal is by obtaining with the described reference signal one-period of described clock signal actual measurement; With
Proofread and correct pulse duration calculated value according to the error of described clock signal based on the described pulse signal of described clock signal.
4. pulse signal generation device as claimed in claim 1 is characterized in that
Described cycle reference signal measurement mechanism (11), it is to the clock count of the described clock signal of vibrating in described reference signal one-period, with cycle of the described reference signal that obtains recording by described clock signal and
Described pulse duration calculation element (12), it compares the calculated value of described cycle reference signal and the measured value of described cycle reference signal to calculate the error amount of described clock signal, the calculated value of wherein said cycle reference signal is to be that basic calculation obtains with the described clock signal calculated when not having error in the described clock signal of supposition, and the measured value of described cycle reference signal is by obtaining with the described reference signal one-period of described clock signal actual measurement; With
Proofread and correct pulse duration calculated value according to the error of described clock signal based on the described pulse signal of described clock signal.
5. pulse signal generation device as claimed in claim 1 is characterized in that
Described cycle reference signal measurement mechanism (11), described pulse duration calculation element (12) and described pulse signal generation device (13) are set at a microcomputer (530) and go up to be used for being controlled at the used stepping motor of camera lens control;
Described reference signal is a vertical synchronizing signal;
Described clock signal is the clock signal of system of described microcomputer (530);
The described pulse signal that will produce is the pulse signal that is used to control described stepping motor.
6. pulse signal generation device as claimed in claim 1 is characterized in that
Described cycle reference signal measurement mechanism (11), described pulse duration calculation element (12) and described pulse signal generation device (13) are set on the microcomputer (910) that is installed on the infrared remote controller;
Described reference signal is one to be used for first clock signal of timer function;
Described clock signal is one to be used to produce the second clock signal of remote signal;
The described pulse signal that will produce is described remote signal;
Described pulse duration calculation element (12)
Described first clock signal period calculated value and the described first clock signal period measured value are compared to calculate the error amount of described second clock signal, the wherein said first clock signal period calculated signals value is that the described second clock calculated signals of calculating when not having error according to the described second clock signal of supposition obtains, and the described first clock signal period measured value is by obtaining with described first clock signal period of described second clock signal actual measurement; With
Proofread and correct calculated value according to the error of described second clock signal based on the described remote signal pulse duration of described second clock signal.
7. a generation has the pulse signal generation method of the pulse signal of the preset frequency consistent with the fixed cycle reference signal, comprises the steps:
Receive the cycle of input to calculate described reference signal of described reference signal with a suitable clock signal;
Obtain the number of oscillating impulse in described reference signal one-period, and according to described clock signal with cycle of described reference signal pulse number frequency division, to calculate the pulse duration of described pulse signal according to described clock signal by described pulse signal; With
Produce a pulse signal, this pulse signal has the pulse duration that calculates.
8. pulse signal generation method as claimed in claim 7, wherein in calculating the described step of described cycle reference signal,
To the clock count of the described oscillating clock signal in the described reference signal one-period, with the periodicity of the described reference signal that obtains recording by described clock signal.
9. pulse signal generation method as claimed in claim 7, wherein
Described pulse duration calculation procedure comprises the steps:
The calculated value of described cycle reference signal and the measured value of described cycle reference signal are compared to calculate the error amount of described clock signal, the calculated value of wherein said cycle reference signal is to be that basic calculation obtains with the described clock signal calculated when not having error in the described clock signal of supposition, and the measured value of described cycle reference signal is to obtain by the cycle with the described reference signal of described clock signal actual measurement; With
Proofread and correct pulse duration calculated value according to the error of described clock signal based on the described pulse signal of described clock signal.
CN 98103098 1997-07-29 1998-07-29 Pulse signal generator and generating method thereof Pending CN1206959A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 98103098 CN1206959A (en) 1997-07-29 1998-07-29 Pulse signal generator and generating method thereof

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP203607/97 1997-07-29
CN 98103098 CN1206959A (en) 1997-07-29 1998-07-29 Pulse signal generator and generating method thereof

Publications (1)

Publication Number Publication Date
CN1206959A true CN1206959A (en) 1999-02-03

Family

ID=5217737

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 98103098 Pending CN1206959A (en) 1997-07-29 1998-07-29 Pulse signal generator and generating method thereof

Country Status (1)

Country Link
CN (1) CN1206959A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100433541C (en) * 2002-09-10 2008-11-12 华邦电子股份有限公司 Apparatus and method for frequency signal starting
CN105469591A (en) * 2016-01-04 2016-04-06 西安交通大学 Portable infrared remote control pulse signal generator and pulse width correction method
CN105835801A (en) * 2015-01-28 2016-08-10 格瑞玛股份公司 Drive for motor-vehicle accessory
CN107276469A (en) * 2017-07-27 2017-10-20 深圳怡化电脑股份有限公司 The driving method and drive device of stepper motor

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100433541C (en) * 2002-09-10 2008-11-12 华邦电子股份有限公司 Apparatus and method for frequency signal starting
CN105835801A (en) * 2015-01-28 2016-08-10 格瑞玛股份公司 Drive for motor-vehicle accessory
CN105835801B (en) * 2015-01-28 2018-07-31 格瑞玛股份公司 Driving equipment for means of transport main cabin accessory
CN105469591A (en) * 2016-01-04 2016-04-06 西安交通大学 Portable infrared remote control pulse signal generator and pulse width correction method
CN107276469A (en) * 2017-07-27 2017-10-20 深圳怡化电脑股份有限公司 The driving method and drive device of stepper motor

Similar Documents

Publication Publication Date Title
US20040109081A1 (en) Auto-focusing device, electronic camera, amd auto-focusing method
TWI491164B (en) Method of driving a motor-driven mechanical system
CN111240370A (en) Method, device and system for correcting position of holder and storage medium
CN1204451C (en) Equipment with antivibrating function
CN1206959A (en) Pulse signal generator and generating method thereof
US7348770B2 (en) Electronic device for interrupt signal control to acquire encoder speed information and a method thereof
JP2009542120A5 (en)
CN105681668A (en) Control method, control device and electronic device
KR100295117B1 (en) Pulse signal generator and method for generating and outputting error-free pulse signal in synchronization with signal of constant period
JP3676350B2 (en) Motor speed control apparatus and method
CN109901628A (en) Based on SENT protocol E-ACT controls and velocity measuring system and method
CN105847686A (en) Control method, control device and electronic device
JP6824083B2 (en) Clock generator, clock generator, and image recorder
US7800997B2 (en) Method and apparatus for generating frequency-multiplied frequency generator signal used in optical drive
CN115174815A (en) Camera module, control method of camera module and electronic equipment
CN109886323B (en) Device for testing motion trail filtering algorithm
JPH03183399A (en) Pulse motor drive
CN105681670A (en) Control method, control device and electronic device
JPH0492557A (en) Original reader
JP3046170B2 (en) CCD line sensor drive
KR101058030B1 (en) Motor control device and method
JPH09237124A (en) Method for driving and controlling original scanning travelling body
CN1791931A (en) Disc drive apparatus, and method for timing recalibration in a disc drive apparatus
JP2008017659A5 (en)
SU260284A1 (en) Academy of Sciences of the USSR "g =.:;; C.;

Legal Events

Date Code Title Description
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C06 Publication
PB01 Publication
C02 Deemed withdrawal of patent application after publication (patent law 2001)
WD01 Invention patent application deemed withdrawn after publication