JP2009017304A - Clock generation control circuit - Google Patents

Clock generation control circuit Download PDF

Info

Publication number
JP2009017304A
JP2009017304A JP2007177643A JP2007177643A JP2009017304A JP 2009017304 A JP2009017304 A JP 2009017304A JP 2007177643 A JP2007177643 A JP 2007177643A JP 2007177643 A JP2007177643 A JP 2007177643A JP 2009017304 A JP2009017304 A JP 2009017304A
Authority
JP
Japan
Prior art keywords
circuit
signal
frequency
counter
clock generation
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
JP2007177643A
Other languages
Japanese (ja)
Inventor
Shinobu Shioda
しのぶ 塩田
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.)
Sanyo Electric Co Ltd
System Solutions Co Ltd
Original Assignee
Sanyo Electric Co Ltd
Sanyo Semiconductor 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 Sanyo Electric Co Ltd, Sanyo Semiconductor Co Ltd filed Critical Sanyo Electric Co Ltd
Priority to JP2007177643A priority Critical patent/JP2009017304A/en
Priority to US12/145,668 priority patent/US7764126B2/en
Publication of JP2009017304A publication Critical patent/JP2009017304A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Stabilization Of Oscillater, Synchronisation, Frequency Synthesizers (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a clock generation control circuit for reducing a load of a CPU. <P>SOLUTION: The clock generation control circuit is provided with: a counter for counting pulses of a clock signal outputted from an oscillation circuit for a prescribed period, and when the count value becomes equal to a set value corresponding to the prescribed period and a frequency, switching an output level of a count control signal; and an error detection circuit for detecting a timing error between a timing signal indicating the prescribed period and the count control signal and outputting an error detection signal. A frequency control circuit generates a control signal based on the error detection signal. <P>COPYRIGHT: (C)2009,JPO&INPIT

Description

本願発明は、予め設定された周波数に応じたクロックを生成するように発振回路を制御するクロック生成制御回路に関する。   The present invention relates to a clock generation control circuit for controlling an oscillation circuit so as to generate a clock corresponding to a preset frequency.

図4に従来のデジタル方式のクロック生成回路100のブロック図を示す。クロック生成回路100は、発振回路122と、カウンタ104と、中央演算処理回路(CPU)130と、デジタル−アナログ変換回路(DAC)116と、を含んで構成される。   FIG. 4 is a block diagram of a conventional digital clock generation circuit 100. The clock generation circuit 100 includes an oscillation circuit 122, a counter 104, a central processing circuit (CPU) 130, and a digital-analog conversion circuit (DAC) 116.

発振回路122は、DAC116から出力された制御信号に応じて所定の周波数のクロックを生成する。発振回路122は、例えば電圧制御発振器(VCO)で構成することができ、DAC116が出力する電圧信号に応じた周波数のクロックを生成する。   The oscillation circuit 122 generates a clock having a predetermined frequency according to the control signal output from the DAC 116. The oscillation circuit 122 can be composed of, for example, a voltage controlled oscillator (VCO), and generates a clock having a frequency corresponding to the voltage signal output from the DAC 116.

カウンタ104は、発振回路122が出力するクロックのパルス数をカウントする。カウンタ104は、図示しない制御回路の制御に応じて、例えば1秒間に入力されるパルス数をカウントし、そのカウント値をCPU130に出力する。   The counter 104 counts the number of clock pulses output from the oscillation circuit 122. The counter 104 counts, for example, the number of pulses input per second in accordance with control of a control circuit (not shown), and outputs the count value to the CPU 130.

CPU130は、周波数の設定値を格納するレジスタ132を備えて構成され、カウンタ104から出力されたカウント値とレジスタ132に格納された設定値とに基づいて、発振回路122を制御するデジタルの制御信号を出力する。CPU130は、例えば、カウンタ104から出力されたカウント値とレジスタ132に格納された設定値との差分を演算し、その差分に応じた制御信号を生成する。また、CPU130は、所定の制御プログラムに応じて、クロック生成回路100に接続される周辺回路(図示なし)の動作を制御する。   The CPU 130 includes a register 132 that stores a set value of the frequency, and a digital control signal that controls the oscillation circuit 122 based on the count value output from the counter 104 and the set value stored in the register 132. Is output. For example, the CPU 130 calculates a difference between the count value output from the counter 104 and the set value stored in the register 132, and generates a control signal corresponding to the difference. Further, the CPU 130 controls the operation of a peripheral circuit (not shown) connected to the clock generation circuit 100 according to a predetermined control program.

DAC116は、CPU130から出力されたデジタルの制御信号をアナログ信号に変換して、発振回路122に出力する。   The DAC 116 converts the digital control signal output from the CPU 130 into an analog signal and outputs the analog signal to the oscillation circuit 122.

このように、クロック生成回路100は、カウンタ104によってクロックのパルス数をカウントし、そのカウント値に基づいてCPU130が制御信号を生成するデジタル方式のクロック生成回路である。   As described above, the clock generation circuit 100 is a digital clock generation circuit in which the counter 104 counts the number of clock pulses, and the CPU 130 generates a control signal based on the count value.

図5に従来のアナログ方式のクロック生成回路200のブロック図を示す。クロック生成回路200は発振回路222と、分周回路208と、位相比較回路202と、チャージポンプ回路(CP)204と、ローパスフィルタ(LPF)206と、を含んで構成される。   FIG. 5 shows a block diagram of a conventional analog clock generation circuit 200. The clock generation circuit 200 includes an oscillation circuit 222, a frequency dividing circuit 208, a phase comparison circuit 202, a charge pump circuit (CP) 204, and a low pass filter (LPF) 206.

発振回路222は、LPF206から出力された制御信号に応じて所定の周波数のクロックを生成する。発振回路122は、例えば電圧制御発振器(VCO)で構成することができ、LPF206が出力する電圧信号に応じたクロックを生成する。   The oscillation circuit 222 generates a clock having a predetermined frequency in accordance with the control signal output from the LPF 206. The oscillation circuit 122 can be composed of, for example, a voltage controlled oscillator (VCO), and generates a clock corresponding to the voltage signal output from the LPF 206.

分周回路208は、発振回路222から出力されたクロックを分周して、位相比較回路202に出力する。位相比較回路202は分周回路208から出力されたクロックと、基準クロックとを比較し、比較結果を後述するCP204に出力する。基準クロックは、例えば、水晶発振子(図示なし)から出力されたクロックを用いる。クロック生成回路200は、基準クロックの周波数と分周回路208の分周の設定に応じたクロックを生成する。   The frequency dividing circuit 208 divides the clock output from the oscillation circuit 222 and outputs it to the phase comparison circuit 202. The phase comparison circuit 202 compares the clock output from the frequency dividing circuit 208 with the reference clock, and outputs the comparison result to the CP 204 described later. As the reference clock, for example, a clock output from a crystal oscillator (not shown) is used. The clock generation circuit 200 generates a clock according to the setting of the frequency of the reference clock and the frequency dividing circuit 208.

CP204は、位相比較回路202の比較結果に応じて、ハイレベル(例えば3.3V)またはローレベル(たとえば0V)の電圧信号を選択的に出力する。   The CP 204 selectively outputs a high level (eg, 3.3 V) or low level (eg, 0 V) voltage signal according to the comparison result of the phase comparison circuit 202.

LPF206は、抵抗素子RとコンデンサCとを含んで構成される。抵抗素子Rの一方の端子はCP204に接続され、他方の端子は発振回路222に接続される。コンデンサCの一方の端子は、発振回路222と抵抗素子Rとの接続点に接続され、他方の端子は接地される。LPF206は、CP204が出力するパルス状の信号を平滑化して、発振回路222に出力する。   The LPF 206 includes a resistance element R and a capacitor C. One terminal of the resistance element R is connected to the CP 204, and the other terminal is connected to the oscillation circuit 222. One terminal of the capacitor C is connected to a connection point between the oscillation circuit 222 and the resistance element R, and the other terminal is grounded. The LPF 206 smoothes the pulsed signal output from the CP 204 and outputs it to the oscillation circuit 222.

このように、クロック生成回路200は、位相比較回路202の比較結果に基づいて、CP204及びLPF206によって制御信号を生成するアナログ方式のクロック生成回路である。
特開平8−316826号公報 特開2000−188542号公報
As described above, the clock generation circuit 200 is an analog clock generation circuit that generates a control signal by the CP 204 and the LPF 206 based on the comparison result of the phase comparison circuit 202.
JP-A-8-316826 JP 2000-188542 A

図4に示す従来のクロック生成回路100を用いる場合、CPU130を用いて発振回路122が出力するクロックの周波数を制御するため、CPU130の負荷が増大する。CPU130は、クロック生成回路100に接続される周辺回路の動作を制御するため、負荷が増大するとクロック生成回路100が搭載されるシステム全体の動作が遅くなるという問題がある。   When the conventional clock generation circuit 100 shown in FIG. 4 is used, since the frequency of the clock output from the oscillation circuit 122 is controlled using the CPU 130, the load on the CPU 130 increases. Since the CPU 130 controls the operation of the peripheral circuits connected to the clock generation circuit 100, there is a problem that the operation of the entire system on which the clock generation circuit 100 is mounted becomes slow when the load increases.

本願発明は、上記従来技術の問題を鑑み、CPUに負荷をかけることなく、予め設定された周波数に応じたクロックを生成するように制御することが可能なクロック生成制御回路を提供することを目的とする。   SUMMARY OF THE INVENTION The present invention has been made in view of the above-described problems of the prior art, and an object thereof is to provide a clock generation control circuit capable of performing control so as to generate a clock corresponding to a preset frequency without applying a load to the CPU. And

本願発明は、制御信号に基づいてクロック信号の周波数を制御して出力する発振回路と、制御信号を生成する周波数制御回路と、に接続されるクロック生成制御回路であって、発振回路が出力するクロック信号のパルス数を所定期間カウントし、所定期間及び周波数に応じた設定値と等しくなったときにカウント制御信号の出力レベルを切り替えるカウンタと、所定期間を示すタイミング信号とカウント制御信号とのタイミングの誤差を検出し、誤差検出信号を出力する誤差検出回路と、を備え、周波数制御回路は、誤差検出信号に基づいて制御信号を生成することを特徴とする。   The present invention is a clock generation control circuit connected to an oscillation circuit that controls and outputs a frequency of a clock signal based on a control signal, and a frequency control circuit that generates a control signal, and the oscillation circuit outputs A counter that counts the number of pulses of the clock signal for a predetermined period and switches the output level of the count control signal when it becomes equal to a set value corresponding to the predetermined period and frequency, and a timing between the timing signal indicating the predetermined period and the count control signal And an error detection circuit that outputs an error detection signal, and the frequency control circuit generates a control signal based on the error detection signal.

本願発明によれば、クロック生成制御回路は、CPUに負荷をかけることなく、予め設定された周波数に応じたクロックを生成するように制御することが可能となる。   According to the present invention, the clock generation control circuit can control to generate a clock corresponding to a preset frequency without applying a load to the CPU.

図1は、本発明の実施形態のクロック生成制御回路の概略のブロック図である。クロック生成制御回路10は、スイッチ22と、カウンタ24と、タイミング制御回路26と、周波数設定回路28と、誤差検出回路30と、を含んで構成される。クロック生成制御回路10は、発振回路50と周波数制御回路40とに接続されてクロック生成のシステムを形成する。   FIG. 1 is a schematic block diagram of a clock generation control circuit according to an embodiment of the present invention. The clock generation control circuit 10 includes a switch 22, a counter 24, a timing control circuit 26, a frequency setting circuit 28, and an error detection circuit 30. The clock generation control circuit 10 is connected to the oscillation circuit 50 and the frequency control circuit 40 to form a clock generation system.

発振回路50は、周波数制御回路40から出力された制御信号に応じたクロックCLKを生成する。発振回路50は、例えば電圧制御発振器(VCO)で構成することができ、
周波数制御回路40が出力する電圧信号に応じた周波数のクロックCLKを生成する。
The oscillation circuit 50 generates a clock CLK corresponding to the control signal output from the frequency control circuit 40. The oscillation circuit 50 can be composed of, for example, a voltage controlled oscillator (VCO).
A clock CLK having a frequency corresponding to the voltage signal output from the frequency control circuit 40 is generated.

スイッチ22は、発振回路50とカウンタ24とに接続され、クロックCLKをカウンタ24に出力するか否かを制御する。スイッチ22は、後述するタイミング制御26が出力する制御信号に基づいてスイッチのオン/オフを制御し、スイッチがオンの期間に入力されたクロックCLKを抽出して、出力する。   The switch 22 is connected to the oscillation circuit 50 and the counter 24 and controls whether or not to output the clock CLK to the counter 24. The switch 22 controls on / off of the switch based on a control signal output from a timing control 26 described later, and extracts and outputs the clock CLK input during the switch on period.

カウンタ24は、スイッチ22と誤差検出回路30とに接続され、スイッチ22から出力されたクロックCLKのパルス数をカウントし、カウント値に応じてカウント制御信号CNTを出力する。カウンタ24は、カウント動作を開始したときにカウント制御信号CNTをハイレベルに切り替え、カウント値が後述する周波数設定回路28に設定された設定値と等しくなったときにカウント制御信号CNTをローレベルに切り替える。   The counter 24 is connected to the switch 22 and the error detection circuit 30, counts the number of pulses of the clock CLK output from the switch 22, and outputs a count control signal CNT according to the count value. The counter 24 switches the count control signal CNT to the high level when the count operation starts, and sets the count control signal CNT to the low level when the count value becomes equal to a set value set in the frequency setting circuit 28 described later. Switch.

このとき、カウンタ24は、周波数設定回路28に設定される設定値を初期値としてカウントダウン動作を行うダウンカウンタとすることが好適である。このとき、カウンタ24は、カウント値が“0”になったときにカウント制御信号CNTをローレベルに切り替える。   At this time, the counter 24 is preferably a down counter that performs a count-down operation using a set value set in the frequency setting circuit 28 as an initial value. At this time, the counter 24 switches the count control signal CNT to the low level when the count value becomes “0”.

タイミング制御回路26は、スイッチ22のオン/オフ制御を行うとともに、カウンタ24のカウント動作の開始/終了を制御する。また、タイミング制御回路26は、後述する誤差検出回路30に対して所定の期間を示すタイミング信号Bを出力し、カウンタ24に対してカウント動作を開始するためのリセット信号RSTを出力する。   The timing control circuit 26 performs on / off control of the switch 22 and controls start / end of the count operation of the counter 24. Further, the timing control circuit 26 outputs a timing signal B indicating a predetermined period to an error detection circuit 30 described later, and outputs a reset signal RST for starting a counting operation to the counter 24.

周波数設定回路28は、例えばレジスタを含んで構成され、発振回路50が出力するクロックCLKの周波数に応じた設定値を格納する。周波数設定回路28に格納される設定値は、タイミング制御回路26が出力するタイミング信号Bの時間情報に基づいて、設定される周波数に応じたクロックのパルス数とすることが好適である。例えば、40kHzのクロックCLKを出力し、タイミング制御回路26が1秒間ハイレベルとなるタイミング信号Bを出力する場合、周波数設定回路28には“40000”に応じたデジタル値をレジスタに格納する。   The frequency setting circuit 28 includes a register, for example, and stores a set value corresponding to the frequency of the clock CLK output from the oscillation circuit 50. The set value stored in the frequency setting circuit 28 is preferably the number of clock pulses corresponding to the set frequency based on the time information of the timing signal B output from the timing control circuit 26. For example, when a clock CLK of 40 kHz is output and the timing control circuit 26 outputs a timing signal B that is at a high level for 1 second, a digital value corresponding to “40000” is stored in the register in the frequency setting circuit 28.

誤差検出回路30は、タイミング信号Bとカウント制御信号CNTとの誤差を検出し、検出結果に応じて正側誤差検出信号PC及び負側誤差検出信号NCを生成し、出力する。クロックCLKの周波数が設定された周波数より高いとき、誤差検出回路30は所定の期間ハイレベルとなる負側誤差検出信号NCを出力する。また、クロックCLKの周波数が設定された周波数より低いとき、誤差検出回路30は所定の期間ハイレベルとなる正側誤差検出信号PCを出力する。本発明の実施形態において、誤差検出回路30は、NOT素子32、34と、AND素子36、38を含んで構成される。   The error detection circuit 30 detects an error between the timing signal B and the count control signal CNT, and generates and outputs a positive side error detection signal PC and a negative side error detection signal NC according to the detection result. When the frequency of the clock CLK is higher than the set frequency, the error detection circuit 30 outputs a negative side error detection signal NC that is at a high level for a predetermined period. Further, when the frequency of the clock CLK is lower than the set frequency, the error detection circuit 30 outputs a positive error detection signal PC that is at a high level for a predetermined period. In the embodiment of the present invention, the error detection circuit 30 includes NOT elements 32 and 34 and AND elements 36 and 38.

NOT素子32は、タイミング信号Bを反転した信号を、AND素子36の一方の入力端子に出力する。NOT素子34はカウント制御信号CNTを反転した信号を、AND素子38の一方の入力端子に出力する。AND素子36は、一方の入力端子にNOT端子32の出力が入力され、他方の入力端子にカウント制御信号CNTが入力されて、演算結果を正側誤差検出信号PCとして出力する。AND素子38は、一方の入力端子にNOT素子34の出力が入力され、他方の入力端子にタイミング信号Bが入力されて、演算結果を負側誤差検出信号NCとして出力する。   The NOT element 32 outputs a signal obtained by inverting the timing signal B to one input terminal of the AND element 36. The NOT element 34 outputs a signal obtained by inverting the count control signal CNT to one input terminal of the AND element 38. In the AND element 36, the output of the NOT terminal 32 is input to one input terminal, the count control signal CNT is input to the other input terminal, and the calculation result is output as the positive-side error detection signal PC. In the AND element 38, the output of the NOT element 34 is input to one input terminal, the timing signal B is input to the other input terminal, and the calculation result is output as the negative side error detection signal NC.

周波数制御回路40は、誤差検出回路30から出力された正側誤差検出信号PC及び負側誤差検出信号NCに基づいて、発振回路50の生成するクロックCLKの周波数を制御する信号を生成し、出力する。本発明の実施の形態において、周波数制御回路40は、チ
ャージポンプ回路(CP)42と、ローパスフィルタ(LPF)44と、を含んで構成される。
The frequency control circuit 40 generates a signal for controlling the frequency of the clock CLK generated by the oscillation circuit 50 based on the positive-side error detection signal PC and the negative-side error detection signal NC output from the error detection circuit 30 and outputs them. To do. In the embodiment of the present invention, the frequency control circuit 40 includes a charge pump circuit (CP) 42 and a low-pass filter (LPF) 44.

CP42は、正側誤差検出信号PCおよび負側誤差検出信号NCに応じて、ハイレベル(例えば3.3V)またはローレベル(たとえば0V)の電圧信号を選択的に出力する。正側誤差検出信号PCがハイレベルのとき、CP42はハイレベルの電圧信号を出力し、負側誤差検出信号NCがハイレベルのとき、CP42はローレベルの電圧信号を出力する。LPF44は、図示しないコンデンサを含んで構成され、CP42が出力するパルス状の信号を平滑化して、発振回路50に出力する。つまり、LPF44に含まれるコンデンサは、正側誤差検出信号PCがハイレベルのときに充電され、負側誤差検出信号NCがハイレベルのときに放電される。   The CP 42 selectively outputs a high level (eg, 3.3 V) or low level (eg, 0 V) voltage signal in accordance with the positive side error detection signal PC and the negative side error detection signal NC. When the positive side error detection signal PC is at a high level, the CP 42 outputs a high level voltage signal, and when the negative side error detection signal NC is at a high level, the CP 42 outputs a low level voltage signal. The LPF 44 is configured to include a capacitor (not shown), and smoothes the pulse signal output from the CP 42 and outputs the smoothed signal to the oscillation circuit 50. That is, the capacitor included in the LPF 44 is charged when the positive error detection signal PC is at a high level, and is discharged when the negative error detection signal NC is at a high level.

次に、本発明の実施形態における、クロック生成制御回路の動作について説明する。図2及び図3は、本発明の実施形態のクロック生成制御回路の動作タイミングを示すタイミングチャートである。図2はクロックCLKの周波数が設定値より高い場合のクロック生成制御回路10の動作タイミングを示し、図3はクロックCLKの周波数が設定値より低い場合のクロック生成制御回路10の動作タイミングを示す。   Next, the operation of the clock generation control circuit in the embodiment of the present invention will be described. 2 and 3 are timing charts showing the operation timing of the clock generation control circuit according to the embodiment of the present invention. FIG. 2 shows the operation timing of the clock generation control circuit 10 when the frequency of the clock CLK is higher than the set value, and FIG. 3 shows the operation timing of the clock generation control circuit 10 when the frequency of the clock CLK is lower than the set value.

まず、図2に基づいて、クロックCLKの周波数が設定値より高い場合のクロック生成制御回路10の動作タイミングについて説明する。図2の例において、クロック生成制御回路10は10HzのクロックCLKを出力するように制御するものとする。このとき、タイミング制御回路26が出力するタイミング信号Bは、カウンタ24がカウント動作を開始してから1秒間ハイレベルの信号を出力し、周波数設定回路28に格納された設定値は、周波数10Hzに応じて“10”とする。   First, the operation timing of the clock generation control circuit 10 when the frequency of the clock CLK is higher than the set value will be described with reference to FIG. In the example of FIG. 2, the clock generation control circuit 10 is controlled to output a clock CLK of 10 Hz. At this time, the timing signal B output from the timing control circuit 26 outputs a high level signal for one second after the counter 24 starts the counting operation, and the setting value stored in the frequency setting circuit 28 is set to a frequency of 10 Hz. Accordingly, “10” is set.

タイミング制御回路26は、カウンタ24に対してリセット信号RSTとしてリセットパルスを出力する。このとき、カウンタ24はカウント動作を停止して初期状態に戻る。リセット信号RSTがハイレベルからローレベルに切り替わるとき、カウンタ24は周波数設定回路28に格納された設定値を初期値として、カウントダウン動作を開始する。このときタイミング信号Bはローレベルからハイレベルに切り替わる。また、スイッチ22はタイミング制御回路26の制御に基づいてオン状態となり、その期間に入力されたクロックCLKをカウンタ24へ出力する。   The timing control circuit 26 outputs a reset pulse as a reset signal RST to the counter 24. At this time, the counter 24 stops counting and returns to the initial state. When the reset signal RST switches from the high level to the low level, the counter 24 starts a countdown operation with the set value stored in the frequency setting circuit 28 as an initial value. At this time, the timing signal B is switched from the low level to the high level. The switch 22 is turned on under the control of the timing control circuit 26 and outputs the clock CLK input during that period to the counter 24.

カウンタ24は、入力されたクロックCLKに応じてカウントダウン動作をする。図2に記載の例において、カウンタ24は初期値を“10”として、カウントダウン動作を開始するとともに、ハイレベルのカウント制御信号CNTを出力する。カウンタ24は、カウント値が“0”となったときにローレベルのカウント制御信号CNTを出力する。このとき、クロックCLKの周波数が制御目標値に比べて高いため、タイミング信号Bのハイレベルの期間に比べてカウント制御信号CNTのハイレベルの期間は短くなる。   The counter 24 performs a countdown operation according to the input clock CLK. In the example shown in FIG. 2, the counter 24 sets the initial value to “10”, starts a countdown operation, and outputs a high level count control signal CNT. The counter 24 outputs a low-level count control signal CNT when the count value becomes “0”. At this time, since the frequency of the clock CLK is higher than the control target value, the high-level period of the count control signal CNT is shorter than the high-level period of the timing signal B.

誤差検出回路30は、NOT素子32とAND素子36の論理演算結果に基づいてローレベルの正側誤差検出信号PCを出力し、NOT素子34とAND素子38の論理演算結果に基づいてカウント制御信号CNTがローレベルに切り替わるタイミングからタイミング信号Bがローレベルに切り替わるタイミングまでハイレベルとなる負側誤差検出信号NCを出力する。周波数制御回路40は正側誤差検出信号PC及び負側誤差検出信号NCに基づいて、制御信号を低くして発振回路50が出力するクロックCLKの周波数が低くなるように制御する。   The error detection circuit 30 outputs a low-level positive-side error detection signal PC based on the logical operation result of the NOT element 32 and the AND element 36, and count control signal based on the logical operation result of the NOT element 34 and the AND element 38. The negative error detection signal NC that is at the high level is output from the timing at which the CNT switches to the low level to the timing at which the timing signal B switches to the low level. Based on the positive-side error detection signal PC and the negative-side error detection signal NC, the frequency control circuit 40 controls the frequency of the clock CLK output from the oscillation circuit 50 to be low by lowering the control signal.

次に、図3に基づいて、クロックCLKの周波数が設定値より低い場合のクロック生成制御回路10の動作タイミングについて説明する。図3の例において、クロック生成制御
回路10は10HzのクロックCLKを出力するように制御するものとする。このとき、タイミング制御回路26が出力するタイミング信号Bは、カウンタ24がカウント動作を開始してから1秒間ハイレベルの信号を出力し、周波数設定回路28に格納された設定値は、周波数10Hzに応じて“10”とする。
Next, the operation timing of the clock generation control circuit 10 when the frequency of the clock CLK is lower than the set value will be described with reference to FIG. In the example of FIG. 3, the clock generation control circuit 10 is controlled to output a clock CLK of 10 Hz. At this time, the timing signal B output from the timing control circuit 26 outputs a high level signal for one second after the counter 24 starts the counting operation, and the setting value stored in the frequency setting circuit 28 is set to a frequency of 10 Hz. Accordingly, “10” is set.

タイミング制御回路26は、カウンタ24に対してリセット信号RSTとしてリセットパルスを出力する。このとき、カウンタ24はカウント動作を停止して初期状態に戻る。リセット信号RSTがハイレベルからローレベルに切り替わるとき、カウンタ24は周波数設定回路28に格納された設定値を初期値として、カウントダウン動作を開始する。このときタイミング信号Bはローレベルからハイレベルに切り替わる。また、スイッチ22はタイミング制御回路26の制御に基づいてオン状態となり、その期間に入力されたクロックCLKをカウンタ24へ出力する。   The timing control circuit 26 outputs a reset pulse as a reset signal RST to the counter 24. At this time, the counter 24 stops counting and returns to the initial state. When the reset signal RST switches from the high level to the low level, the counter 24 starts a countdown operation with the set value stored in the frequency setting circuit 28 as an initial value. At this time, the timing signal B is switched from the low level to the high level. The switch 22 is turned on under the control of the timing control circuit 26 and outputs the clock CLK input during that period to the counter 24.

カウンタ24は、入力されたクロックCLKに応じてカウントダウン動作をする。図3に記載の例において、カウンタ24は初期値を“10”として、カウントダウン動作を開始するとともに、ハイレベルのカウント制御信号CNTを出力する。カウンタ24は、カウント値が“0”となったときにローレベルのカウント制御信号CNTを出力する。このとき、クロックCLKの周波数が制御目標値に比べて低いため、タイミング信号Bのハイレベルの期間に比べてカウント制御信号CNTのハイレベルの期間は長くなる。   The counter 24 performs a countdown operation according to the input clock CLK. In the example shown in FIG. 3, the counter 24 sets the initial value to “10”, starts a countdown operation, and outputs a high-level count control signal CNT. The counter 24 outputs a low-level count control signal CNT when the count value becomes “0”. At this time, since the frequency of the clock CLK is lower than the control target value, the high level period of the count control signal CNT is longer than the high level period of the timing signal B.

誤差検出回路30は、NOT素子32とAND素子36の論理演算結果に基づいてタイミング信号Bがローレベルに切り替わるタイミングからカウント制御信号CNTがローレベルに切り替わるタイミングまでハイレベルとなる正側誤差検出信号PCを出力し、NOT素子34とAND素子38の論理演算結果に基づいてローレベルの負側誤差検出信号NCを出力する。周波数制御回路40は正側誤差検出信号PC及び負側誤差検出信号NCに基づいて、制御信号を高くして発振回路50が出力するクロックCLKの周波数が高くなるように制御する。   The error detection circuit 30 is a positive-side error detection signal that goes high from the timing when the timing signal B switches to low level to the timing when the count control signal CNT switches to low level based on the logical operation result of the NOT element 32 and the AND element 36. PC is output, and a low-level negative error detection signal NC is output based on the logical operation results of the NOT element 34 and the AND element 38. Based on the positive side error detection signal PC and the negative side error detection signal NC, the frequency control circuit 40 controls the frequency of the clock CLK output from the oscillation circuit 50 to be high by increasing the control signal.

本発明の実施形態では、図2に示すクロックCLKの周波数が設定値より高い場合の制御動作、および、図3に示すクロックCLKの周波数が設定値より低い場合の制御動作を繰り返し行うことによって、一定の周波数を有するクロックCLKを連続的に出力する。   In the embodiment of the present invention, by repeatedly performing the control operation when the frequency of the clock CLK shown in FIG. 2 is higher than the set value and the control operation when the frequency of the clock CLK shown in FIG. 3 is lower than the set value, A clock CLK having a constant frequency is continuously output.

本発明の実施形態を適用することによって、CPUを用いることなく精度の高いクロックの周波数制御を行うことができる。よって、クロック生成制御回路10が搭載されるシステムにおいてCPUの負荷を軽減することが可能となり、システム全体の動作に影響を与えることを防ぐとともに、低い周波数であっても精度の高いクロックの周波数制御を行うことができる。   By applying the embodiment of the present invention, highly accurate clock frequency control can be performed without using a CPU. Therefore, it is possible to reduce the load on the CPU in the system in which the clock generation control circuit 10 is mounted, and it is possible to prevent the influence of the overall operation of the system and to control the frequency of the clock with high accuracy even at a low frequency. It can be performed.

本発明の第1の実施形態では、スイッチ22及びカウンタ24を用いて、所定期間(1秒間)に含まれるクロックCLKのパルス数をカウントする構成としたが、本願発明はこれに限られるものではない。例えば、タイミング制御回路26はカウンタ24に対してリセット信号RSTと、カウント動作を停止してカウント値を保持する制御を行う保持信号を出力する構成とすることができる。タイミング制御回路26は、カウント終了後に上述の保持信号を出力することにより、スイッチ22を用いることなく本発明を実施することができる。   In the first embodiment of the present invention, the switch 22 and the counter 24 are used to count the number of pulses of the clock CLK included in a predetermined period (one second). However, the present invention is not limited to this. Absent. For example, the timing control circuit 26 may be configured to output a reset signal RST and a holding signal for performing control for holding the count value by stopping the counting operation to the counter 24. The timing control circuit 26 can implement the present invention without using the switch 22 by outputting the above-mentioned holding signal after the count is completed.

本発明の実施形態に記載したスイッチ22及びカウンタ24の動作は、本発明を実施するための一例であって、これに限られるものではない。例えば、カウンタ24のリセット動作は必ずしもカウント開始の直前に行う必要はなく、カウント動作を行わない機関にリセット動作を行うことができる。また、カウンタ24のリセット動作は、カウント終了か
ら所定のパルス数分の時間が経過した後にリセットするよう構成することもできる。
The operation of the switch 22 and the counter 24 described in the embodiment of the present invention is an example for carrying out the present invention, and is not limited to this. For example, the reset operation of the counter 24 is not necessarily performed immediately before the count starts, and the reset operation can be performed for an engine that does not perform the count operation. Further, the reset operation of the counter 24 can be configured to reset after a predetermined number of pulses have elapsed from the end of counting.

また、本発明は、クロックCLKを図示しない分周回路に入力し、カウンタ24は分周されたクロックCLKのパルス数をカウントする構成としてもよい。これによって、カウンタ24は低速で動作することが可能となり、カウンタ24を高精度のカウンタで構成する必要がなく、クロック生成制御回路10またはそれが搭載されるシステムのコストを低くすることができる。   In the present invention, the clock CLK may be input to a frequency dividing circuit (not shown), and the counter 24 may count the number of pulses of the frequency-divided clock CLK. As a result, the counter 24 can operate at a low speed, and it is not necessary to configure the counter 24 with a high-accuracy counter, and the cost of the clock generation control circuit 10 or a system in which the clock generation control circuit 10 is mounted can be reduced.

本発明の実施形態では、CP42とLPF44で周波数制御回路40を構成したが、本発明を実施するための一例であって、これに限られるものではない。例えば、正側誤差検出信号PCと負側誤差検出信号NCのハイレベルの期間をカウンタを用いてカウントして、カウント値をデジタルアナログ変換して制御信号を生成する構成としてもよい。上記のような構成とすることで、コンデンサ等の部品を用いる必要がなくなり、システム全体の規模の増大を防ぐことができる。   In the embodiment of the present invention, the frequency control circuit 40 is configured by the CP 42 and the LPF 44, but this is an example for carrying out the present invention, and the present invention is not limited to this. For example, the high-level period of the positive error detection signal PC and the negative error detection signal NC may be counted using a counter, and the control value may be generated by digital-analog conversion of the count value. With the above configuration, it is not necessary to use components such as capacitors, and an increase in the scale of the entire system can be prevented.

本発明の実施形態のクロック生成制御回路の概略のブロック図である。1 is a schematic block diagram of a clock generation control circuit according to an embodiment of the present invention. 本発明の実施形態のクロック生成制御回路の動作タイミングを示すタイミングチャートである。It is a timing chart which shows the operation timing of the clock generation control circuit of the embodiment of the present invention. 本発明の実施形態のクロック生成制御回路の動作タイミングを示すタイミングチャートである。It is a timing chart which shows the operation timing of the clock generation control circuit of the embodiment of the present invention. 従来のクロック生成回路の概略のブロック図である。It is a schematic block diagram of a conventional clock generation circuit. 従来のクロック生成回路の概略のブロック図である。It is a schematic block diagram of a conventional clock generation circuit.

符号の説明Explanation of symbols

10 クロック生成制御回路、22 スイッチ、24,104 カウンタ、26 タイミング制御回路、28 周波数設定回路、30 誤差検出回路、32,34 NOT素子、36,38 AND素子、40 周波数制御回路、42,204 CP、44,206
LPF、50,122,222 発振回路、100,200 クロック生成回路、116 DAC、130 CPU、132 レジスタ、202 位相比較回路、208 分周回路。
10 clock generation control circuit, 22 switches, 24, 104 counter, 26 timing control circuit, 28 frequency setting circuit, 30 error detection circuit, 32, 34 NOT element, 36, 38 AND element, 40 frequency control circuit, 42, 204 CP 44,206
LPF, 50, 122, 222 oscillation circuit, 100, 200 clock generation circuit, 116 DAC, 130 CPU, 132 register, 202 phase comparison circuit, 208 frequency division circuit.

Claims (4)

制御信号に基づいてクロック信号の周波数を制御して出力する発振回路と、前記制御信号を生成する周波数制御回路と、に接続されるクロック生成制御回路であって、
前記発振回路が出力するクロック信号のパルス数を所定期間カウントし、前記所定期間及び周波数に応じた設定値と等しくなったときにカウント制御信号の出力レベルを切り替えるカウンタと、
前記所定期間を示すタイミング信号と前記カウント制御信号とのタイミングの誤差を検出し、誤差検出信号を出力する誤差検出回路と、を備え、
前記周波数制御回路は、前記誤差検出信号に基づいて前記制御信号を生成することを特徴とするクロック生成制御回路。
A clock generation control circuit connected to an oscillation circuit for controlling and outputting a frequency of a clock signal based on a control signal, and a frequency control circuit for generating the control signal,
A counter that counts the number of pulses of the clock signal output from the oscillation circuit for a predetermined period, and switches an output level of the count control signal when equal to a set value according to the predetermined period and the frequency;
An error detection circuit that detects an error in timing between the timing signal indicating the predetermined period and the count control signal and outputs an error detection signal;
The clock generation control circuit, wherein the frequency control circuit generates the control signal based on the error detection signal.
請求項1に記載のクロック生成回路において、
前記カウンタのカウント動作を制御するとともに、前記誤差検出回路に対して前記タイミング信号を出力するタイミング制御回路を更に備え、
前記カウンタは、前記タイミング制御回路の制御に応じてクロック信号のパルス数のカウントを開始することを特徴とするクロック生成制御回路。
The clock generation circuit according to claim 1,
A timing control circuit for controlling the counting operation of the counter and outputting the timing signal to the error detection circuit;
The clock generation control circuit, wherein the counter starts counting the number of pulses of the clock signal according to the control of the timing control circuit.
請求項1に記載のクロック生成回路において、
前記カウンタに接続され、前記設定値を格納する周波数設定回路を更に備え、
前記カウンタは、前記カウント値と前記設定値とが等しくなったときに前記カウント制御信号を出力することを特徴とするクロック生成制御回路。
The clock generation circuit according to claim 1,
A frequency setting circuit connected to the counter and storing the set value;
The clock generation control circuit, wherein the counter outputs the count control signal when the count value becomes equal to the set value.
請求項3に記載のクロック生成回路において、
前記カウンタは、前記周波数設定回路に格納された前記設定値を初期値としてカウントダウン動作を行い、カウント値が“0”になったときに前記カウント制御信号を出力することを特徴とするクロック生成制御回路。
The clock generation circuit according to claim 3.
The counter performs a countdown operation using the set value stored in the frequency setting circuit as an initial value, and outputs the count control signal when the count value becomes “0”. circuit.
JP2007177643A 2007-06-25 2007-07-05 Clock generation control circuit Pending JP2009017304A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2007177643A JP2009017304A (en) 2007-07-05 2007-07-05 Clock generation control circuit
US12/145,668 US7764126B2 (en) 2007-06-25 2008-06-25 Clock generation circuit and clock generation control circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2007177643A JP2009017304A (en) 2007-07-05 2007-07-05 Clock generation control circuit

Publications (1)

Publication Number Publication Date
JP2009017304A true JP2009017304A (en) 2009-01-22

Family

ID=40357623

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007177643A Pending JP2009017304A (en) 2007-06-25 2007-07-05 Clock generation control circuit

Country Status (1)

Country Link
JP (1) JP2009017304A (en)

Similar Documents

Publication Publication Date Title
JP2009005288A (en) Clock generating circuit
JP2011019212A (en) Digital noise protection circuit and method
KR20170012255A (en) Rc oscillator based on delay-free comparator
JP2002118467A (en) A/d converting circuit
JP2007116858A (en) Motor drive device and electronic device using it
EP3075076B1 (en) Main clock high precision oscillator
JP2010056594A (en) Pulse generation device
JP2007235188A (en) Triangular wave oscillation circuit
US7764126B2 (en) Clock generation circuit and clock generation control circuit
JP2015162840A (en) Double integral type a/d converter
JP2004304494A (en) A/D CONVERTER ADOPTING DeltaSigma MODULATION SYSTEM AND CONTROL APPARATUS EMPLOYING THE SAME
US7057358B2 (en) Electronic ballast and operating method for a gas discharge lamp
JP2009017304A (en) Clock generation control circuit
JP2007324819A (en) Delay time generation circuit
JP2012039273A (en) Double integration ad converter and integration ad converter
KR20060021202A (en) Method and ic for detecting variation of capacitance
JPH0668518B2 (en) Digital peak holding circuit
US20120181966A1 (en) Motor speed control circuit
JP2017017719A (en) Detection device
JP5800126B2 (en) Pulse generation circuit, integrated circuit device, detection device
JPH11178380A (en) Motor speed controller
JP3137156B2 (en) Motor drive
RU2258297C2 (en) Direct-current drive
WO2009019632A1 (en) Signal processor comprising an integrating analog-to-digital converter
JP2001060851A (en) Period correction frequency dividing circuit and period correction type oscillation circuit using the same