JP2008219155A - Pwm signal generation circuit - Google Patents

Pwm signal generation circuit Download PDF

Info

Publication number
JP2008219155A
JP2008219155A JP2007050202A JP2007050202A JP2008219155A JP 2008219155 A JP2008219155 A JP 2008219155A JP 2007050202 A JP2007050202 A JP 2007050202A JP 2007050202 A JP2007050202 A JP 2007050202A JP 2008219155 A JP2008219155 A JP 2008219155A
Authority
JP
Japan
Prior art keywords
pwm signal
output
circuit
triangular wave
comparator
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
JP2007050202A
Other languages
Japanese (ja)
Inventor
Seiji Makita
聖嗣 牧田
Yoshinobu Kume
宜伸 粂
Yoshiaki Oshima
義敬 尾島
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.)
Toyota Motor Corp
Original Assignee
Toyota Motor 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 Toyota Motor Corp filed Critical Toyota Motor Corp
Priority to JP2007050202A priority Critical patent/JP2008219155A/en
Publication of JP2008219155A publication Critical patent/JP2008219155A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Analogue/Digital Conversion (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a PWM signal generation circuit which can generate a high-resolution PWM signal with high precision. <P>SOLUTION: The PWM signal generation circuit comprises a circuit generating a digital PWM signal based on a clock signal CLK, a triangle wave generator generating a triangle wave synchronized with the clock signal CLK, a section for generating a threshold for the triangle wave corresponding to the linear region of the triangle wave, and a comparator for comparing the triangle wave with a threshold generated from threshold generating section wherein the resolution of the digital PWM signal is enhanced based on the output from the comparator. <P>COPYRIGHT: (C)2008,JPO&INPIT

Description

本発明は、高い分解能のPWM信号を生成できるPWM信号生成回路に関する。   The present invention relates to a PWM signal generation circuit capable of generating a PWM signal with high resolution.

従来から、出力電圧を制御するPWM波生成回路において、フィードバック電圧に応じて電流値が変化する定電流回路と、該定電流回路からの電流を充電するコンデンサと、該コンデンサの電荷を放電するスイッチ回路と、前記フィードバック電圧を入力し、デジタル信号を遅延回路に伝送するA/Dコンバータと、該デジタル信号を入力し、スイッチ回路を制御する遅延回路と、前記コンデンサの電圧によりPWM波電圧を制御する第1コンパレータとを具備することを特徴とするPWM波生成回路が知られている(例えば、特許文献1参照)。   Conventionally, in a PWM wave generation circuit that controls an output voltage, a constant current circuit whose current value changes according to a feedback voltage, a capacitor that charges current from the constant current circuit, and a switch that discharges the charge of the capacitor A circuit, an A / D converter that inputs the feedback voltage and transmits a digital signal to the delay circuit, a delay circuit that inputs the digital signal and controls the switch circuit, and a PWM wave voltage is controlled by the voltage of the capacitor There is known a PWM wave generation circuit including a first comparator (see, for example, Patent Document 1).

また、基準クロック単位に分解可能なPWM生成するためのPWMのオン,オフ情報と、基準クロックでカウントするカウンタと、該カウンタのとりうるカウント値毎にそれに対応する前記オン,オフ情報を選択し出力するセレクタ回路またはコンパレータ回路を有し、前記セレクタ回路、または前記コンパレータ回路が出力する信号を合成してPWM信号を形成する波形合成回路からなるPWM生成回路において、前記波形合成回路は、少なくとも2単位以上の時間範囲の前記コンパレータ回路によるコンパレート結果又は前記セレクタ回路によるセレクト結果同士を演算した結果を基本クロックでラッチし、その異なったラッチ結果同士をさらに少なくとも2個以上演算した結果毎に、基本クロックでラッチし、さらに同等の操作をラッチが1個になるまで繰り返し、その1個のラッチの出力を前記基本クロック分解能のPWM信号として用いる事を特徴としたデジタルPWM信号生成回路が知られている(例えば、特許文献2参照)。
特開2001−169541号公報 特開2004−345280号公報
Also, PWM on / off information for generating PWM that can be decomposed into reference clock units, a counter that counts with the reference clock, and the on / off information corresponding to each count value that the counter can take are selected. In a PWM generation circuit including a selector circuit or a comparator circuit that outputs, and a waveform synthesis circuit that forms a PWM signal by synthesizing signals output from the selector circuit or the comparator circuit, the waveform synthesis circuit includes at least 2 The result of calculating the comparison result by the comparator circuit or the selection result by the selector circuit in the unit time range or more is latched with a basic clock, and for each result of further calculating at least two different latch results, Latch with the basic clock, and even the equivalent operation There repeated until one, the digital PWM signal generating circuit is known which is characterized by using the output of one latch as PWM signal of the base clock resolution (e.g., see Patent Document 2).
JP 2001-169541 A JP 2004-345280 A

ところで、上述の特許文献2に記載される構成も同様であるが、一般的なデジタル型のPWM信号生成回路では、高い分解能のPWM信号を生成するためには、高速なクロックを扱う必要があり、高価な回路構成となる問題点がある。   By the way, although the structure described in the above-mentioned patent document 2 is also the same, in a general digital type PWM signal generation circuit, in order to generate a high resolution PWM signal, it is necessary to handle a high-speed clock. There is a problem that an expensive circuit configuration is required.

また、一方で、アナログ型のPWM信号生成回路では、デューティを決定するための指示値と三角波(ランプ波を含む、以下、同じ。)を比較することになるが、高い分解能のPWM信号を生成するためには、高い精度の指示値及び良好な直線性の三角波を実現する必要がある。また、ノイズの影響などにより指示値や三角波が影響を受けないように配慮しなければならず、また、低ドリフト、低オフセットのコンパレータは一般的に高価であり、デジタル型と同様に、高価な回路構成となる問題点がある。   On the other hand, in the analog type PWM signal generation circuit, an instruction value for determining the duty is compared with a triangular wave (including a ramp wave, the same applies hereinafter), but a high resolution PWM signal is generated. In order to achieve this, it is necessary to realize a highly accurate indication value and a triangular wave with good linearity. In addition, consideration must be given so that the indication value and triangular wave are not affected by the influence of noise, etc. Also, low-drift, low-offset comparators are generally expensive and, like digital types, are expensive. There is a problem of circuit configuration.

この点、上述の従来技術では、デジタル信号を遅延回路に伝送するA/Dコンバータを用いることで、PWM信号の高周波化(デジタル信号による不連続なパルス幅の連続化)を図っているが、PWM信号の分解能を高めるまでには至っていない。   In this regard, in the above-described conventional technology, the A / D converter that transmits the digital signal to the delay circuit is used to increase the frequency of the PWM signal (continuous discontinuous pulse width by the digital signal). The resolution of the PWM signal has not been improved.

そこで、本発明は、高分解能のPWM信号を精度良く生成できるPWM信号生成回路を提供することを目的とする。   Accordingly, an object of the present invention is to provide a PWM signal generation circuit capable of generating a high-resolution PWM signal with high accuracy.

上記目的を達成するため、第1の発明に係るPWM信号生成回路は、クロック信号CLKに基づいてデジタルPWM信号を生成するデジタルPWM信号生成回路と、
前記クロック信号CLKと同期した三角波を発生させる三角波発生器と、
前記三角波に対する閾値であって、該三角波の直線領域に対応する閾値を生成する閾値生成部と、
前記三角波と、前記閾値生成部により生成される閾値とを比較する比較器とを備え、
前記比較器の出力に基づいて、前記デジタルPWM信号の分解能を高くすることを特徴とする。
To achieve the above object, a PWM signal generation circuit according to a first aspect of the present invention includes a digital PWM signal generation circuit that generates a digital PWM signal based on a clock signal CLK,
A triangular wave generator for generating a triangular wave synchronized with the clock signal CLK;
A threshold value generating unit that generates a threshold value for the triangular wave and corresponding to a linear region of the triangular wave;
A comparator that compares the triangular wave with a threshold value generated by the threshold value generator;
The resolution of the digital PWM signal is increased based on the output of the comparator.

第2の発明に係るPWM信号生成回路は、
クロック信号CLKに基づいてデジタルPWM信号を生成するデジタルPWM信号生成回路と、
前記クロック信号CLKと同期した互いに位相の異なる2つ以上の三角波を発生させる三角波発生器と、
前記2つ以上の三角波に対する閾値を生成する閾値生成部と、
前記2つ以上の三角波のそれぞれと、前記閾値生成部により生成される閾値とを比較する比較器とを備え、
前記比較器の出力に基づいて、前記デジタルPWM信号の分解能を高くすることを特徴とする。
The PWM signal generation circuit according to the second invention is:
A digital PWM signal generation circuit that generates a digital PWM signal based on the clock signal CLK;
A triangular wave generator for generating two or more triangular waves having different phases in synchronization with the clock signal CLK;
A threshold generation unit that generates a threshold for the two or more triangular waves;
A comparator that compares each of the two or more triangular waves with a threshold value generated by the threshold value generator;
The resolution of the digital PWM signal is increased based on the output of the comparator.

第3の発明は、第2の発明に係るPWM信号生成回路において、
前記閾値生成部は、前記2つ以上の三角波のそれぞれの直線領域に対応する閾値を生成することを特徴とする。
A third invention is the PWM signal generation circuit according to the second invention,
The threshold value generation unit generates a threshold value corresponding to each linear region of the two or more triangular waves.

第4の発明は、第3の発明に係るPWM信号生成回路において、
前記三角波発生器は、それぞれの直線領域が連続して現れるように傾き及び位相が調整された2つ以上の三角波を発生させることを特徴とする。これにより、任意のタイミングで三角波の直線領域を使用することが可能となり、精度の高いPWM信号を高分解能で生成することが可能となる。
A fourth invention is the PWM signal generation circuit according to the third invention, wherein
The triangular wave generator may generate two or more triangular waves whose slopes and phases are adjusted so that each linear region appears continuously. As a result, it is possible to use a triangular wave linear region at an arbitrary timing, and it is possible to generate a highly accurate PWM signal with high resolution.

第5の発明は、第2の発明に係るPWM信号生成回路において、
前記2つ以上の三角波は、前記クロック信号CLKの2倍の周期を有し、互いに位相が180度ずれ、且つ、それぞれの直線領域が連続して現れるように傾き及び位相が調整された2つの三角波からなることを特徴とする。これにより、任意のタイミングで三角波の直線領域を使用することが可能となり、精度の高いPWM信号を高分解能で生成することが可能となる。
A fifth invention is the PWM signal generation circuit according to the second invention,
The two or more triangular waves have a period twice that of the clock signal CLK, are out of phase with each other by 180 degrees, and are adjusted in inclination and phase so that each linear region appears continuously. It consists of a triangular wave. As a result, it is possible to use a triangular wave linear region at an arbitrary timing, and it is possible to generate a highly accurate PWM signal with high resolution.

第6の発明は、第2の発明に係るPWM信号生成回路において、
前記2つ以上の三角波は、前記クロック信号CLKの2倍の周期を有し、且つ、互いに位相が180度ずれた2つの三角波からなり、
前記比較器は、前記2つの三角波がそれぞれ入力される2つの比較器からなり、
前記2つの比較器の出力のうちの一方の比較器の出力を、前記クロック信号CLKの周期毎に交互に用いて、前記デジタルPWM信号の分解能を高くすることを特徴とする。これにより、2つの三角波の直線領域を前記クロック信号CLKの周期毎に交互に用いることで、任意のタイミングで三角波の直線領域を使用することが可能となり、その結果、精度の高いPWM信号を高分解能で生成することが可能となる。
A sixth invention is the PWM signal generation circuit according to the second invention,
The two or more triangular waves are composed of two triangular waves having a period twice that of the clock signal CLK and being 180 degrees out of phase with each other.
The comparator comprises two comparators to which the two triangular waves are input,
The output of one of the two comparators is alternately used for each period of the clock signal CLK to increase the resolution of the digital PWM signal. Thus, by alternately using two triangular wave linear regions for each cycle of the clock signal CLK, it becomes possible to use the triangular wave linear region at an arbitrary timing. As a result, a highly accurate PWM signal can be increased. It is possible to generate with resolution.

第7の発明は、第6の発明に係るPWM信号生成回路において、
前記デジタルPWM信号のデューティを規定するデジタル情報を保持するレジスタと、
前記クロック信号CLKに基づいて動作するカウンタと、
前記レジスタ内の出力と、前記カウンタの出力とを比較する比較回路と、
前記2つの比較器の出力に基づいて、該2つの比較器の出力のうちの一方の比較器の出力を、前記クロック信号CLKの周期毎に交互に出力する波形合成回路と、
前記比較回路の出力と、前記波形合成回路の出力との論理積を取るAND回路とを更に備え、
前記デジタルPWM信号生成回路は、前記AND回路の出力と、前記カウンタの出力とが入力されるフリップフロップを備えることを特徴とする。これにより、前記2つの比較器の出力をクロック信号CLKの周期毎に交互に用いて、前記デジタルPWM信号の分解能を適切に高くすることが可能となる。
A seventh invention is the PWM signal generation circuit according to the sixth invention,
A register for holding digital information defining the duty of the digital PWM signal;
A counter that operates based on the clock signal CLK;
A comparator for comparing the output in the register with the output of the counter;
Based on the outputs of the two comparators, a waveform synthesis circuit that alternately outputs the output of one of the two comparators for each period of the clock signal CLK;
An AND circuit that takes a logical product of the output of the comparison circuit and the output of the waveform synthesis circuit;
The digital PWM signal generation circuit includes a flip-flop to which an output of the AND circuit and an output of the counter are input. This makes it possible to appropriately increase the resolution of the digital PWM signal by alternately using the outputs of the two comparators for each cycle of the clock signal CLK.

第8の発明は、第1又は2の発明に係るPWM信号生成回路において、
前記比較器の出力に基づいて、前記比較器の出力が変化するタイミングで前記デジタルPWM信号のデューティを変化させることを特徴とする。これにより、前記比較器の出力に基づいて、前記デジタルPWM信号の分解能を適切に高くすることが可能となる。
An eighth invention is the PWM signal generation circuit according to the first or second invention, wherein
Based on the output of the comparator, the duty of the digital PWM signal is changed at the timing when the output of the comparator changes. This makes it possible to appropriately increase the resolution of the digital PWM signal based on the output of the comparator.

第9の発明は、第1又は2の発明に係るPWM信号生成回路において、
前記デジタルPWM信号のデューティを規定するデジタル情報を保持するレジスタと、
前記クロック信号CLKに基づいて動作するカウンタと、
前記レジスタ内の出力と、前記カウンタの出力とを比較する比較回路と、
前記比較回路の出力と、前記比較器の出力との論理積を取るAND回路とを更に備え、
前記デジタルPWM信号生成回路は、前記AND回路の出力と、前記カウンタの出力とが入力されるフリップフロップを備えることを特徴とする。これにより、前記比較器の出力に基づいて、前記デジタルPWM信号の分解能を適切に高くすることが可能となる。
A ninth invention is the PWM signal generation circuit according to the first or second invention, wherein
A register for holding digital information defining the duty of the digital PWM signal;
A counter that operates based on the clock signal CLK;
A comparator for comparing the output in the register with the output of the counter;
An AND circuit that performs a logical product of the output of the comparison circuit and the output of the comparator;
The digital PWM signal generation circuit includes a flip-flop to which an output of the AND circuit and an output of the counter are input. This makes it possible to appropriately increase the resolution of the digital PWM signal based on the output of the comparator.

本発明によれば、高分解能のPWM信号を精度良く生成できるPWM信号生成回路を得ることができる。   According to the present invention, it is possible to obtain a PWM signal generation circuit that can accurately generate a high-resolution PWM signal.

以下、図面を参照して、本発明を実施するための最良の形態の説明を行う。   The best mode for carrying out the present invention will be described below with reference to the drawings.

図1は、本発明の実施例1によるPWM信号生成回路1を示す回路図である。図2は、図1に示した回路図における各点の波形等を示す図である。   FIG. 1 is a circuit diagram showing a PWM signal generation circuit 1 according to Embodiment 1 of the present invention. FIG. 2 is a diagram showing the waveform of each point in the circuit diagram shown in FIG.

PWM信号生成回路1は、主に、デジタルPWM信号生成回路と、デューティ追加回路とからなる。ここでは、先ず、デジタルPWM信号生成回路の構成について説明する。   The PWM signal generation circuit 1 mainly includes a digital PWM signal generation circuit and a duty addition circuit. Here, first, the configuration of the digital PWM signal generation circuit will be described.

デジタルPWM信号生成回路は、主に、図1において、参照符号200,201,202,203,205,206及び207付された要素とから構成される。   The digital PWM signal generation circuit is mainly composed of elements denoted by reference numerals 200, 201, 202, 203, 205, 206, and 207 in FIG.

参照符号200は、クロック信号CLKの入力を示し、参照符号201は、4段のDフリップフロップを用いた4ビットのアップカウンタを示す。   Reference numeral 200 indicates an input of the clock signal CLK, and reference numeral 201 indicates a 4-bit up counter using four stages of D flip-flops.

参照符号203は、6ビットのDuty設定レジスタである。尚、図に示す例では、Duty設定レジスタ203は、6ビットのデジタル情報を格納し、上位4ビット(DD0〜DD3)のデータがカウンタ201の出力と比較され、下位2ビット(DA0〜DA1)のデータが後述の閾値生成のために利用される。Duty設定レジスタ203内のDuty設定データは、所定のキャリア周波数毎に、図示しないデコーダーからの入力データに基づいて変更される。即ち、Duty設定レジスタ203の出力(格納データ)は、図示しないデコーダーの出力に応じて変化される(即ち、Dutyを決めるデジタル情報が外部から供給される。)。   Reference numeral 203 is a 6-bit duty setting register. In the example shown in the figure, the duty setting register 203 stores 6-bit digital information, the upper 4 bits (DD0 to DD3) are compared with the output of the counter 201, and the lower 2 bits (DA0 to DA1). This data is used for threshold generation described later. The duty setting data in the duty setting register 203 is changed based on input data from a decoder (not shown) for each predetermined carrier frequency. That is, the output (stored data) of the duty setting register 203 is changed according to the output of a decoder (not shown) (that is, digital information for determining the duty is supplied from the outside).

参照符号202は、Duty設定レジスタ203の出力DD0〜DD3(上位4ビット)とカウンタ201の値を比較する比較回路である。より詳細には、比較回路202は、カウンタ201の各DフリップフロップのQ端子の各出力と、Duty設定レジスタ203の各出力DD0〜DD3との排他的論理和の否定をそれぞれとる計4つのXNOR回路で構成された比較回路である。   Reference numeral 202 is a comparison circuit that compares the outputs DD0 to DD3 (upper 4 bits) of the duty setting register 203 with the value of the counter 201. More specifically, the comparison circuit 202 performs a total of four XNORs that respectively negate exclusive ORs of the outputs of the Q terminals of the D flip-flops of the counter 201 and the outputs DD0 to DD3 of the duty setting register 203. It is the comparison circuit comprised with the circuit.

参照符号205は、カウンタ201の値が0になったときに一定のパルスを発生させるワンショット(モノステーブルマルチバイブレーター)を含むNOR回路である。   Reference numeral 205 is a NOR circuit including a one-shot (monostable multivibrator) that generates a constant pulse when the value of the counter 201 becomes zero.

参照符号206は、比較回路202の各XNOR回路の出力の論理積を取るAND回路206Aと、AND回路206Aの出力(図2の波形K参照)と後述の波形合成部320の出力(図2の波形J参照)の論理積を取るAND回路206Bと、AND回路206Bの出力(図2の波形L参照)が「1」のときに一定のパルスを発生させるワンショットとを含む回路である。   Reference numeral 206 denotes an AND circuit 206A that takes the logical product of the outputs of the respective XNOR circuits of the comparison circuit 202, an output of the AND circuit 206A (see waveform K in FIG. 2), and an output of a waveform synthesizer 320 described later (in FIG. 2). This circuit includes an AND circuit 206B that performs a logical product of the waveform J (see waveform J) and a one-shot that generates a constant pulse when the output of the AND circuit 206B (see waveform L in FIG. 2) is “1”.

参照符号207は、回路205及び回路206の各ワンショットが出力するパルスによりPWM信号を生成するフリップフロップである。フリップフロップ207のS入力には、NOR回路205の出力が接続され、フリップフロップ207のR入力には、AND回路206の出力が接続されている。フリップフロップ207は、カウンタ201のオーバーフロー若しくはオールクリアによりセットされ、回路206のH出力によりリセットされる。   Reference numeral 207 denotes a flip-flop that generates a PWM signal by a pulse output from each one shot of the circuit 205 and the circuit 206. The output of the NOR circuit 205 is connected to the S input of the flip-flop 207, and the output of the AND circuit 206 is connected to the R input of the flip-flop 207. The flip-flop 207 is set when the counter 201 overflows or all clears, and is reset by the H output of the circuit 206.

以上の構成において、厳密には、Duty設定レジスタ203の下位2ビット(DA0〜DA1)と、AND回路206Bとを除いた回路が、“デジタルPWM信号生成回路”を構成する。このデジタルPWM信号生成回路では、Duty設定レジスタ203の出力(DD0〜DD3)によって、どのクロック周期(1キャリア周期を16分周した16通りのタイミング)でOFFデューティとするかを自由に変えることができる。即ち、このデジタルPWM信号生成回路では、2の分解能を有するデジタルPWM信号の生成が可能である。 In the above configuration, strictly speaking, a circuit excluding the lower 2 bits (DA0 to DA1) of the duty setting register 203 and the AND circuit 206B constitutes a “digital PWM signal generation circuit”. In this digital PWM signal generation circuit, the clock cycle (16 timings obtained by dividing one carrier cycle by 16) can be freely changed by the output (DD0 to DD3) of the duty setting register 203. it can. That is, in the digital PWM signal generating circuit is possible to generate a digital PWM signal having a resolution of 2 4.

尚、デジタルPWM信号生成回路の構成は、上述したものに限られず多種多様であり、次に説明するデューティ追加回路は、如何なる構成のデジタルPWM信号生成回路に対しても適用可能である。   The configuration of the digital PWM signal generation circuit is not limited to the one described above, and there are various types. The duty adding circuit described below can be applied to any configuration of the digital PWM signal generation circuit.

次に、本実施例の特徴的な構成であるデューティ追加回路を構成する要素ついて説明する。デューティ追加回路は、主に、図1において、上述のAND回路206Bと、上述のDuty設定レジスタ203の下位2ビット(DA0〜DA1)と、参照符号302,304,308,310,312,320,330が付された要素とから構成される。   Next, elements constituting the duty adding circuit which is a characteristic configuration of the present embodiment will be described. 1, the duty adding circuit mainly includes the above-described AND circuit 206B, the lower 2 bits (DA0 to DA1) of the above-described duty setting register 203, reference numerals 302, 304, 308, 310, 312, 320, It is comprised from the element to which 330 was attached | subjected.

参照符号302は、D/Aコンバータであり、Duty設定レジスタ203の出力DA0、DA1(下位2ビット)をD/A変換する。本例では、D/Aコンバータ302は、Duty設定レジスタ203の出力DA0、DA1に応じて、4値の電圧値を出力可能である。   Reference numeral 302 is a D / A converter that D / A converts the outputs DA0 and DA1 (lower 2 bits) of the duty setting register 203. In this example, the D / A converter 302 can output four voltage values according to the outputs DA0 and DA1 of the duty setting register 203.

参照符号304は、後述の制御装置330のレベルシフト制御部332による制御下で、D/Aコンバータ302の出力電圧のレベルを変化させるレベルシフト回路である。レベルシフト回路304の出力は、後述の第1及び第2三角波に対する閾値として機能する。本実施例では、レベルシフト回路304は、D/Aコンバータ302の4値の電圧値のレベルを、後述の如く、三角波の直線領域γ(図3参照)に対応するように、変化させる。図2に示す例では、波形Bで示すように、Duty設定レジスタ203の出力DA0、DA1(下位2ビット)が一定であり、それに伴い、レベルシフト回路304の出力(閾値)も一定である。   Reference numeral 304 is a level shift circuit that changes the level of the output voltage of the D / A converter 302 under the control of a level shift control unit 332 of the control device 330 described later. The output of the level shift circuit 304 functions as a threshold for first and second triangular waves described later. In this embodiment, the level shift circuit 304 changes the level of the four voltage values of the D / A converter 302 so as to correspond to the triangular wave linear region γ (see FIG. 3), as will be described later. In the example shown in FIG. 2, as indicated by the waveform B, the outputs DA0 and DA1 (lower 2 bits) of the duty setting register 203 are constant, and accordingly, the output (threshold value) of the level shift circuit 304 is also constant.

参照符号306は、クロック信号CLKに同期した第1三角波を生成する第1三角波発生器である。第1三角波発生器306は、クロック信号CLKの2周期毎に発生するパルス信号(図2の波形C参照)に基づいて、当該パルス信号の立ち上がりエッジ及び立下りエッジに同期した第1三角波(図2の波形D参照)を発生させる。従って、第1三角波の周期は、クロック信号CLKの周期の2倍である。   Reference numeral 306 denotes a first triangular wave generator that generates a first triangular wave synchronized with the clock signal CLK. The first triangular wave generator 306 is based on a pulse signal (see waveform C in FIG. 2) generated every two cycles of the clock signal CLK, and is synchronized with the rising edge and falling edge of the pulse signal (see FIG. 2). 2 waveform D). Therefore, the period of the first triangular wave is twice the period of the clock signal CLK.

参照符号308は、クロック信号CLKに同期した第2三角波を生成する第2三角波発生器である。第2三角波発生器308は、クロック信号CLKの2周期毎に発生するパルス信号(図2の波形F参照)に基づいて、当該パルス信号の立ち上がりエッジ及び立下りエッジに同期した第2三角波(図2の波形G参照)を発生させる。従って、第2三角波の周期は、クロック信号CLKの周期の2倍である。第2三角波用のパルス信号(図2の波形F参照)は、第1三角波用のパルス信号(図2の波形C参照)に対して、位相が180度ずれされている。従って、第2三角波発生器308は、第1三角波に対して位相が180度ずれた第2三角波を発生させるように構成されている。   Reference numeral 308 denotes a second triangular wave generator that generates a second triangular wave synchronized with the clock signal CLK. The second triangular wave generator 308 is based on a pulse signal (see waveform F in FIG. 2) generated every two periods of the clock signal CLK, and is synchronized with the rising edge and falling edge of the pulse signal (see FIG. 2). 2 waveform G). Therefore, the period of the second triangular wave is twice the period of the clock signal CLK. The pulse signal for the second triangular wave (see waveform F in FIG. 2) is 180 degrees out of phase with the pulse signal for the first triangular wave (see waveform C in FIG. 2). Accordingly, the second triangular wave generator 308 is configured to generate a second triangular wave that is 180 degrees out of phase with the first triangular wave.

参照符号330は、制御装置である。制御装置330は、レベルシフト制御部332と、電流調整制御部334と、位相調整制御部336とを備える。   Reference numeral 330 is a control device. The control device 330 includes a level shift control unit 332, a current adjustment control unit 334, and a phase adjustment control unit 336.

レベルシフト制御部332は、レベルシフト回路304を制御して、図3に示すように、レベルシフト回路304の出力レベル(閾値)が、三角波(第1三角波及び第2三角波)の直線領域γに対応するように、レベルシフト回路304の出力レベルを変化させる。即ち、レベルシフト制御部332は、レベルシフト回路304と協動して、三角波の立ち上がり領域β及び立下り領域α以外の直線性の良い領域γだけが利用されるように、レベルシフト回路304の出力(閾値)を調整する。   The level shift control unit 332 controls the level shift circuit 304 so that the output level (threshold value) of the level shift circuit 304 is in the linear region γ of the triangular wave (first triangular wave and second triangular wave) as shown in FIG. The output level of the level shift circuit 304 is changed so as to correspond. That is, the level shift control unit 332 cooperates with the level shift circuit 304 so that only the region γ having good linearity other than the rising region β and the falling region α of the triangular wave is used. Adjust the output (threshold).

電流調整制御部334は、第1三角波発生器306及び第2三角波発生器308内の各電流調整回路の可変抵抗の抵抗値を調整して、三角波(第1三角波及び第2三角波)の上りと下りの傾きを調整する。例えば、電流調整回路の抵抗比が1:1に調整した場合には、図4(A)に示すように、上りと下りの傾きが同一の(2等辺三角形の)三角波が生成され、電流調整回路の抵抗比が3:1に調整した場合には、図4(B)に示すように、上りと下りの傾きの絶対値の比が1:3となる三角波が生成される。   The current adjustment control unit 334 adjusts the resistance value of the variable resistance of each current adjustment circuit in the first triangular wave generator 306 and the second triangular wave generator 308 to increase the triangular wave (first triangular wave and second triangular wave). Adjust the downward slope. For example, when the resistance ratio of the current adjustment circuit is adjusted to 1: 1, as shown in FIG. 4A, a triangular wave having the same upward and downward slope (isosceles triangle) is generated, and the current adjustment is performed. When the resistance ratio of the circuit is adjusted to 3: 1, as shown in FIG. 4B, a triangular wave is generated in which the ratio of the absolute values of the up and down slopes is 1: 3.

位相調整制御部336は、クロック信号CLKと第1及び第2三角波が同期するように、第1及び第2三角波の位相を調整する。尚、上述の如く、第1及び第2三角波は、クロック信号CLKの2周期が1周期に対応し、互いに対して位相が180度ずれている。   The phase adjustment control unit 336 adjusts the phases of the first and second triangular waves so that the clock signal CLK and the first and second triangular waves are synchronized. As described above, in the first and second triangular waves, two periods of the clock signal CLK correspond to one period and are 180 degrees out of phase with each other.

このように、電流調整制御部334及び位相調整制御部336は、第1及び第2三角波が相似となり、位相だけがずれるように制御を行う。   As described above, the current adjustment control unit 334 and the phase adjustment control unit 336 perform control so that the first and second triangular waves are similar and only the phase is shifted.

図1に戻る。参照符号310は、第1三角波発生器306からの第1三角波と、レベルシフト回路304からの閾値とを比較する第1比較器である。第1比較器310は、オペアンプで構成されたアナログ式のコンパレータである。第1比較器310は、第1三角波発生器306により発生される第1三角波と、レベルシフト回路304からの閾値とを比較し、第1三角波が閾値以上の場合に「H」を出力し、第1三角波が閾値より小さい場合に「L」を出力する(図2の波形B,D,E参照)。   Returning to FIG. Reference numeral 310 is a first comparator that compares the first triangular wave from the first triangular wave generator 306 with the threshold value from the level shift circuit 304. The first comparator 310 is an analog comparator configured with an operational amplifier. The first comparator 310 compares the first triangular wave generated by the first triangular wave generator 306 with the threshold value from the level shift circuit 304, and outputs “H” when the first triangular wave is greater than or equal to the threshold value. When the first triangular wave is smaller than the threshold value, “L” is output (see waveforms B, D, and E in FIG. 2).

参照符号312は、第2三角波発生器308からの第2三角波と、レベルシフト回路304からの閾値とを比較する第2比較器である。第2比較器312は、オペアンプで構成されたアナログ式のコンパレータである。第2比較器312は、第2三角波発生器308により発生される第2三角波と、レベルシフト回路304からの閾値とを比較し、第2三角波が閾値以上の場合に「H」を出力し、第2三角波が閾値より小さい場合に「L」を出力する(図2の波形B,G,H参照)。   Reference numeral 312 is a second comparator that compares the second triangular wave from the second triangular wave generator 308 with the threshold value from the level shift circuit 304. The second comparator 312 is an analog comparator configured with an operational amplifier. The second comparator 312 compares the second triangular wave generated by the second triangular wave generator 308 with the threshold value from the level shift circuit 304, and outputs “H” when the second triangular wave is equal to or greater than the threshold value. When the second triangular wave is smaller than the threshold value, “L” is output (see waveforms B, G, and H in FIG. 2).

参照符号320は、波形合成部320である。波形合成部320は、第1比較器310の出力とカウンタ201の前段のDフリップフロップ201AのQ端子の出力との論理積(図2のEとIのAND波形参照)と、第2比較器312の出力とカウンタ201の前段のDフリップフロップ201AのQ端子の出力の反転との論理積(図2のHとI反転のAND波形参照)とを、論理和(OR)により合成する(図2の波形J参照)。波形合成部320の出力は、回路206のAND回路206Bに入力される。尚、波形合成部320は、上述した合成態様を実現する構成に限られず、AND回路206Bへの入力が、クロックの1周期毎に、第2比較器312の出力と第1比較器310の出力とで入れ替わるように構成されていればよい。   Reference numeral 320 is a waveform synthesizer 320. The waveform synthesizer 320 generates a logical product of the output of the first comparator 310 and the output of the Q terminal of the preceding D flip-flop 201A of the counter 201 (see the AND waveform of E and I in FIG. 2) and the second comparator. The logical product of the output of 312 and the inversion of the output of the Q terminal of the D flip-flop 201A of the preceding stage of the counter 201 (see the AND waveform of H and I inversion in FIG. 2) is synthesized by OR (OR) (FIG. 2 waveform J). The output of the waveform synthesizer 320 is input to the AND circuit 206B of the circuit 206. The waveform synthesis unit 320 is not limited to the configuration that realizes the above-described synthesis mode, and the input to the AND circuit 206B is the output of the second comparator 312 and the output of the first comparator 310 for each cycle of the clock. It may be configured to be replaced with.

次に、図2を参照して、本実施例のPWM信号生成回路1によるPWM信号の生成態様の要部を説明する。   Next, with reference to FIG. 2, the main part of the PWM signal generation mode by the PWM signal generation circuit 1 of the present embodiment will be described.

図2において、Duty設定レジスタ203の出力(DD0〜DD3)は、PWM信号のキャリア周波数の周期(本例では、16×1クロック周期)毎に変更されている。   In FIG. 2, the output (DD0 to DD3) of the duty setting register 203 is changed for each carrier frequency period (in this example, 16 × 1 clock period) of the PWM signal.

AND回路206Aの出力は、図2の波形Kにて示すように、Duty設定レジスタ203の出力とカウンタ201の出力とが一致した場合に、「1」となる。この例では、キャリア周波数の1周期目と、2周期目でDuty設定レジスタ203の出力(DD0〜DD3)が変化したため、「1」の出力タイミングが変化している。即ち、AND回路206Aの出力は、キャリア周波数の1周期目では、カウンタ値が“6”となるタイミングで「1」となり、キャリア周波数の2周期目では、カウンタ値が“3”となるタイミングで「1」となる。   The output of the AND circuit 206A becomes “1” when the output of the duty setting register 203 and the output of the counter 201 coincide with each other as shown by the waveform K in FIG. In this example, since the output (DD0 to DD3) of the duty setting register 203 is changed in the first period and the second period of the carrier frequency, the output timing of “1” is changed. That is, the output of the AND circuit 206A becomes “1” at the timing when the counter value becomes “6” in the first cycle of the carrier frequency, and at the timing when the counter value becomes “3” in the second cycle of the carrier frequency. “1”.

波形合成部320の出力は、図2の波形Jにて示すように、カウンタ201の出力が偶数のときは、第1比較器310の出力(波形E参照)が「H」になるのと同期して立ち上がり、カウンタ201の出力が奇数のときは、第2比較器312の出力(波形H参照)が「H」になるのと同期して立ち上がる。尚、図2に示す例では、キャリア周波数の1周期目と、2周期目とで閾値(波形Bの高さ)は変化していない。閾値が変化した場合は、それに応じて、第1比較器310及び第2比較器312の「H」の出力タイミングがクロック信号CLKの同周期内でずれ、それに伴い、波形合成部320の「H」の出力タイミングがクロック信号CLKの同周期内でずれることになる。   The output of the waveform synthesizer 320 is synchronized with the output of the first comparator 310 (see waveform E) being “H” when the output of the counter 201 is an even number, as shown by the waveform J in FIG. When the output of the counter 201 is an odd number, the output of the second comparator 312 (see waveform H) rises in synchronization with the “H” level. In the example shown in FIG. 2, the threshold value (the height of the waveform B) does not change between the first period and the second period of the carrier frequency. When the threshold value is changed, the output timing of “H” of the first comparator 310 and the second comparator 312 is shifted within the same period of the clock signal CLK, and accordingly, “H” of the waveform synthesis unit 320 is changed. "Is shifted within the same period of the clock signal CLK.

AND回路206Bの出力は、図2の波形Lにて示すように、キャリア周波数の1周期目では、カウンタ値が“6”となる周期に、第1比較器310の出力(波形E参照)が「H」になるのと同期して(第1三角波が閾値を超えた時に同期して)、「1」になる。キャリア周波数の2周期目では、カウンタ値が“3”となる周期に、第2比較器312の出力(波形H参照)が「H」になるのと同期して(第2三角波が閾値を超えた時に同期して)、「1」になる。   As shown by the waveform L in FIG. 2, the output of the AND circuit 206B is the output of the first comparator 310 (see waveform E) in the cycle in which the counter value is “6” in the first cycle of the carrier frequency. Synchronized with “H” (synchronized when the first triangular wave exceeds the threshold), it becomes “1”. In the second cycle of the carrier frequency, the output of the second comparator 312 (see waveform H) is synchronized with the output of the second comparator 312 (see waveform H) in the cycle in which the counter value is “3” (the second triangular wave exceeds the threshold value). It becomes “1” in synchronization.

この結果、生成されるPWM信号(フリップフロップ207のQ出力:PWMOUT)は、図2の波形PWMにて示すように、キャリア周波数の1周期目では、カウンタ値が“0”となるタイミングでセットされてONデューティとなり、第1三角波が閾値を超えるタイミングでOFFデューティとなる。また、キャリア周波数の2周期目では、カウンタ値が“0”となるタイミングでセットされてONデューティとなり、第2三角波が閾値を超えるタイミングでOFFデューティとなる。   As a result, the generated PWM signal (Q output of the flip-flop 207: PWMOUT) is set at the timing when the counter value becomes “0” in the first cycle of the carrier frequency, as shown by the waveform PWM in FIG. It becomes ON duty and becomes OFF duty at the timing when the first triangular wave exceeds the threshold value. In the second cycle of the carrier frequency, the counter value is set at the timing when it becomes “0” and becomes ON duty, and becomes OFF duty when the second triangular wave exceeds the threshold value.

次に、以上説明した本実施例のデューティ追加回路の技術的な意義について説明する。   Next, the technical significance of the duty adding circuit of the present embodiment described above will be described.

ここでは、先ず、デューティ追加回路が存在しない場合を考える。この場合は、図1に示す回路において、波形合成部320の出力(図2の波形J参照)が常に「H」である場合と等価である。この場合、PWM信号(フリップフロップ207のQ出力:PWMOUT)のデューティは、AND回路206Aの出力(図2の波形K)にのみ依存する。波形Kは、クロック信号CLKの周期に同期して「1」と「0」とが切り替わる。このため、PWM信号は、クロック信号CLKの周期に同期したタイミングでしかオン/オフの切り替わりが生じない。この結果、PWM信号は、波形Kの分解能がDuty設定レジスタ203の上位4ビットに対応して2であることから、2の分解能しか有さない。 Here, first, consider a case where there is no duty adding circuit. This case is equivalent to the case where the output of the waveform synthesizer 320 (see waveform J in FIG. 2) is always “H” in the circuit shown in FIG. In this case, the duty of the PWM signal (Q output of the flip-flop 207: PWMOUT) depends only on the output of the AND circuit 206A (waveform K in FIG. 2). In the waveform K, “1” and “0” are switched in synchronization with the cycle of the clock signal CLK. For this reason, the PWM signal is switched on / off only at a timing synchronized with the cycle of the clock signal CLK. As a result, PWM signal, since the resolution of the waveform K is upper 4 corresponding to the bit 2 4 Duty setting register 203, has only a resolution of 2 4.

一方、本実施例のように、デジタルPWM信号生成回路にデューティ追加回路を付加した場合は、PWM信号のデューティは、AND回路206Aの出力(図2の波形K)に加えて、波形合成部320の出力(図2の波形J)にも依存する。波形Jは、図2に示すように、第1比較器310の出力(波形E参照)及び第2比較器312の出力(波形H参照)に応じて、クロック信号CLKの1周期内で「H」と「L」とが切り替わる。これにより、デューティ追加回路が存在しない場合に比べて、クロック信号CLKの1周期の分数倍(何分の1)のデューティを追加することができる。例えば、図示の例のようにDuty設定レジスタ203の下位2ビットのデジタル情報で4値の電圧値(閾値)を生成する場合、クロック信号CLKの1周期を4分割した周期で、波形合成部320の出力(及びこれに伴いフリップフロップ207のR入力)を「1」と「0」間で自由に切り替えることができる。(この場合、24×4の分解能を有するPWM信号を生成可能である)。 On the other hand, when a duty adding circuit is added to the digital PWM signal generation circuit as in this embodiment, the duty of the PWM signal is set to the waveform synthesis unit 320 in addition to the output of the AND circuit 206A (waveform K in FIG. 2). Depends on the output (waveform J in FIG. 2). As shown in FIG. 2, the waveform J is “H” within one cycle of the clock signal CLK in accordance with the output of the first comparator 310 (see waveform E) and the output of the second comparator 312 (see waveform H). "And" L "are switched. As a result, it is possible to add a duty that is a fraction (a fraction) of one cycle of the clock signal CLK as compared with the case where there is no duty adding circuit. For example, when generating four voltage values (threshold values) with the low-order 2 bits of digital information in the duty setting register 203 as in the illustrated example, the waveform synthesizer 320 has a period obtained by dividing one period of the clock signal CLK into four. (And thus the R input of the flip-flop 207) can be freely switched between “1” and “0”. (In this case, a PWM signal having a resolution of 2 4 × 4 can be generated).

このように、本実施例によれば、デジタルPWM信号生成回路に、三角波と閾値とを比較する比較器310,312の比較結果を用いるデューティ追加回路を付加することで、クロック信号CLKの1周期の分数倍(何分の1)のデューティを生成することができる。従って、例えば100kHzで14ビットの分解能のPWMをデジタルPWM信号生成回路のみで実現するのには、約1.6GHz(100×214kHz)の高速のクロックが必要であるが、本実施例によれば、14ビットの分解能は、例えばデジタルで8ビット、アナログで6ビット(2値の閾値)の分担とすると、26MHz程度のクロックで実現できる。 As described above, according to the present embodiment, by adding the duty adding circuit using the comparison result of the comparators 310 and 312 for comparing the triangular wave and the threshold to the digital PWM signal generation circuit, one cycle of the clock signal CLK is obtained. It is possible to generate a duty that is a fraction (a fraction) of. Therefore, for example, a high-speed clock of about 1.6 GHz (100 × 2 14 kHz) is required to realize PWM with a resolution of 14 bits at 100 kHz by using only a digital PWM signal generation circuit. According, the resolution of 14 bits, for example 8-bit digital, if the share of 6 bits in analog (threshold 2 6 values) can be implemented in the order of 26MHz clock.

次に、図5乃至図7を参照して、以上説明した本実施例のデューティ追加回路において2つの三角波(第1及び第2三角波)を利用することの技術的な意義について説明する。   Next, the technical significance of using two triangular waves (first and second triangular waves) in the duty adding circuit of the present embodiment described above will be described with reference to FIGS.

ここでは、比較例として、図5に示すような、1つの三角波を利用したデューティ追加回路を備える構成を考える。この比較例では、1つの三角波を利用する関係上、この三角波の周期は、クロック信号CLKの1周期と同一とされる。この比較例においても、本実施例と同様に、図5に示すように、三角波と閾値とを比較し、その比較結果を用いて、クロック信号CLKの1周期の分数倍(何分の1)のデューティを追加することができる。即ち、この比較例においても、即ち、Duty設定レジスタ203の下位2ビットのデジタル情報で4値の閾値を生成する場合には、クロック信号CLKの1周期を4分割した周期で、比較器400の出力(及びこれに伴いフリップフロップ207のR入力)を「H」と「L」とを自由に切り替えることができる(この場合、24×4の分解能を有するPWM信号を生成可能である)。 Here, as a comparative example, a configuration including a duty adding circuit using one triangular wave as shown in FIG. 5 is considered. In this comparative example, since one triangular wave is used, the period of this triangular wave is the same as one period of the clock signal CLK. Also in this comparative example, as in the present embodiment, as shown in FIG. 5, the triangular wave is compared with the threshold value, and by using the comparison result, a fractional multiple (one fraction of one cycle) of the clock signal CLK is used. ) Duty can be added. That is, also in this comparative example, that is, when a four-value threshold value is generated with the low-order 2 bits of digital information in the duty setting register 203, one cycle of the clock signal CLK is divided into four cycles. The output (and thus the R input of the flip-flop 207) can be freely switched between “H” and “L” (in this case, a PWM signal having a resolution of 2 4 × 4 can be generated).

図7は、本実施例の三角波(第1及び第2三角波)と閾値との関係と、比較例における三角波と閾値との関係とを、対比して示す図である。   FIG. 7 is a diagram showing the relationship between the triangular wave (first and second triangular waves) of this embodiment and the threshold value and the relationship between the triangular wave and the threshold value in the comparative example.

ところで、三角波の全領域において歪のない波形を生成することは困難である。特に、例えば領域αや領域βのような三角波の角の部分には、歪が発生しやすい。三角波と閾値とを比較する際に、例えば領域αや領域βのように歪が出やすい三角波の領域(三角波の角の部分)を閾値との比較に使用すると、三角波の歪の影響により比較精度(ひいてはPWM信号の精度)が悪化する。一方、PWM信号の分解能を更に高くするには、閾値の取りうる値をできるだけ多くする必要がある。従って、精度の高いPWM信号を高分解能で生成するには、三角波の電圧範囲(波高範囲)h内に、できるだけ多くの閾値を設定すればよい。しかしながら、閾値の値の数を増加させると、比較器のオフセットやドリフトに注意が必要となるので、閾値の値の数を増加させることには限界がある。また、閾値の値の数を増加させると、1LSBあたりの電圧が小さくなるので、三角波のフルスケールhを過度に増加させずに閾値の値の数を増加させることには限界がある。   By the way, it is difficult to generate a waveform without distortion in the entire region of the triangular wave. In particular, distortion is likely to occur at corners of a triangular wave such as the region α and the region β. When comparing a triangular wave with a threshold value, for example, if a triangular wave region (triangular wave corner), such as region α or region β, where distortion is likely to occur, is used for comparison with the threshold value, the accuracy of the comparison will be increased due to the effect of triangular wave distortion. (As a result, the accuracy of the PWM signal) deteriorates. On the other hand, in order to further increase the resolution of the PWM signal, it is necessary to increase the number of possible threshold values as much as possible. Therefore, in order to generate a highly accurate PWM signal with high resolution, it is only necessary to set as many threshold values as possible within the triangular wave voltage range (wave height range) h. However, since increasing the number of threshold values requires attention to the offset and drift of the comparator, there is a limit to increasing the number of threshold values. Further, if the number of threshold values is increased, the voltage per 1LSB becomes smaller, so there is a limit to increasing the number of threshold values without excessively increasing the full scale h of the triangular wave.

この点、本実施例では、第1及び第2三角波の電圧範囲(波高範囲)は、閾値の取りうる範囲Δhより大きい三角波で良いため、歪の大きい領域αや領域βを用いる必要が無くなり、精度の良いPWM信号の生成が可能となる。   In this respect, in the present embodiment, the voltage range (wave height range) of the first and second triangular waves may be a triangular wave larger than the range Δh that can be taken by the threshold value, so that it is not necessary to use the regions α and β having large distortions. A highly accurate PWM signal can be generated.

また、比較例では、図6の上段に示すように、三角波の直線領域γだけを閾値との比較に使用しようとすると、クロック信号CLKの1周期内における使用可能な三角波の領域は限られてしまう。即ち、三角波の直線領域γが連続していないためPWMが出力できない領域(OFFデューティできない領域)が存在してしまう。   In the comparative example, as shown in the upper part of FIG. 6, if only the triangular wave linear region γ is used for comparison with the threshold value, the usable triangular wave region within one cycle of the clock signal CLK is limited. End up. That is, since the triangular wave linear region γ is not continuous, there is a region where PWM cannot be output (region where OFF duty cannot be performed).

これに対して、本実施例によれば、図6の下段に示すように、クロック信号CLKの1周期毎に交互に第1及び第2三角波を用いるので、三角波の直線領域γだけを閾値との比較に使用しようしても、クロック信号CLKの1周期当たりの使用可能な三角波の領域は制限を受けない。例えば、図4(B)に示したように、第1及び第2三角波の上り勾配を小さく設定することで、図6の下段に示すように、第1及び第2三角波の直線領域γを交互に連続させて、第1及び第2三角波の直線領域γだけを途切れることなく使用することも可能である。このように、本実施例によれば、2つの三角波(第1及び第2三角波)を利用することで、三角波の歪の少ない直線領域γを効率的に利用することができ、PWM信号の分解能を効率的に高めることができる。   On the other hand, according to the present embodiment, as shown in the lower part of FIG. 6, the first and second triangular waves are alternately used for each cycle of the clock signal CLK. Even if it is used for comparison, the usable triangular wave area per cycle of the clock signal CLK is not limited. For example, as shown in FIG. 4B, by setting the first and second triangular wave ascending slopes small, the linear regions γ of the first and second triangular waves are alternated as shown in the lower part of FIG. It is also possible to use only the linear region γ of the first and second triangular waves without interruption. Thus, according to the present embodiment, by using two triangular waves (first and second triangular waves), it is possible to efficiently use the linear region γ with less distortion of the triangular wave, and to reduce the resolution of the PWM signal. Can be increased efficiently.

また、一般的に、三角波の角の部分の歪は、三角波が高周波になるほど現れやすくなる。この観点からも、本実施例によれば、クロック信号CLKの1周期毎に交互に第1及び第2三角波を用いるので、比較例に比べて、三角波の周波数を2分の1に抑えて、三角波の角の部分の歪の出現を抑制することができる。即ち、本実施例によれば、クロック信号CLKの高周波化された場合であっても、比較例に比べて三角波の直線領域γを確保しやすくなる。   In general, the distortion at the corners of the triangular wave is more likely to appear as the triangular wave becomes higher in frequency. Also from this point of view, according to the present embodiment, the first and second triangular waves are alternately used for each cycle of the clock signal CLK. Therefore, the frequency of the triangular wave is suppressed to a half as compared with the comparative example, Appearance of distortion at the corners of the triangular wave can be suppressed. That is, according to the present embodiment, even when the clock signal CLK is increased in frequency, it becomes easier to secure the triangular wave linear region γ than in the comparative example.

尚、以上説明した実施例1においては、添付の特許請求の範囲における「閾値生成部」は、Duty設定レジスタ203の下位2ビット(DA0〜DA1)、D/Aコンバータ302、レベルシフト回路304及びレベルシフト制御部332により協動して実現されている。   In the first embodiment described above, the “threshold generation unit” in the appended claims includes the lower 2 bits (DA0 to DA1) of the duty setting register 203, the D / A converter 302, the level shift circuit 304, and This is realized in cooperation with the level shift control unit 332.

図8は、本発明の実施例2によるPWM信号生成回路2を示す回路図である。実施例2によるPWM信号生成回路2のデューティ追加回路は、上述の実施例1によるPWM信号生成回路1におけるレベルシフト回路304及びレベルシフト制御部332が存在せず、その代わりに、制御装置340において波高位置調整制御部342を有する。その他の構成については、上述の実施例1と同様であってよい。   FIG. 8 is a circuit diagram showing the PWM signal generation circuit 2 according to the second embodiment of the present invention. In the duty addition circuit of the PWM signal generation circuit 2 according to the second embodiment, the level shift circuit 304 and the level shift control unit 332 in the PWM signal generation circuit 1 according to the first embodiment described above do not exist, but instead in the control device 340. A wave height position adjustment control unit 342 is provided. About another structure, you may be the same as that of the above-mentioned Example 1. FIG.

波高位置調整制御部342は、第1三角波発生器306及び第2三角波発生器308内のオペアンプの非反転入力端子への入力電圧を制御して、図3に示すように、D/Aコンバータ302の出力(閾値)が、三角波(第1三角波及び第2三角波)の直線領域γに対応するように、三角波の波高を変化させる。即ち、波高位置調整制御部342は、三角波の立ち上がり領域β及び立下り領域α以外の直線性の良い領域γだけが利用されるように、第1三角波発生器306及び第2三角波発生器308で発生される三角波の波高(振幅)を調整する。   The wave height position adjustment control unit 342 controls the input voltage to the non-inverting input terminal of the operational amplifier in the first triangular wave generator 306 and the second triangular wave generator 308, and as shown in FIG. Is changed so that the output (threshold value) corresponds to the linear region γ of the triangular wave (the first triangular wave and the second triangular wave). That is, the wave height position adjustment control unit 342 uses the first triangular wave generator 306 and the second triangular wave generator 308 so that only the region γ having good linearity other than the rising region β and the falling region α of the triangular wave is used. Adjust the wave height (amplitude) of the generated triangular wave.

このように本実施例2によっても、三角波側の波高位置を調整することで、第1及び第2三角波の直線領域γだけを利用して、歪の影響を受けない高精度のPWM信号を生成することができる。また、本実施例2によっても、2つの第1三角波及び第2三角波を用いることで、上述の実施例1に関連して説明した効果と同等の効果が得られる。   As described above, according to the second embodiment as well, by adjusting the wave height position on the triangular wave side, a highly accurate PWM signal that is not affected by distortion is generated using only the linear region γ of the first and second triangular waves. can do. Also in the second embodiment, the same effects as those described in connection with the first embodiment can be obtained by using the two first triangular waves and the second triangular wave.

尚、以上説明した実施例2においては、添付の特許請求の範囲における「閾値生成部」は、Duty設定レジスタ203の下位2ビット(DA0〜DA1)及びD/Aコンバータ302により協動して実現されている。   In the second embodiment described above, the “threshold value generation unit” in the appended claims is realized in cooperation with the lower 2 bits (DA0 to DA1) of the duty setting register 203 and the D / A converter 302. Has been.

以上、本発明の好ましい実施例について詳説したが、本発明は、上述した実施例に制限されることはなく、本発明の範囲を逸脱することなく、上述した実施例に種々の変形及び置換を加えることができる。   The preferred embodiments of the present invention have been described in detail above. However, the present invention is not limited to the above-described embodiments, and various modifications and substitutions can be made to the above-described embodiments without departing from the scope of the present invention. Can be added.

例えば、上述の実施例では、第1三角波発生器306及び第2三角波発生器308で発生される2つの第1三角波及び第2三角波に対して共通の閾値を用いているが、第1三角波及び第2三角波に対してそれぞれ別個の閾値を用いてもよい。   For example, in the above-described embodiment, a common threshold is used for the two first triangular waves and the second triangular wave generated by the first triangular wave generator 306 and the second triangular wave generator 308. Separate threshold values may be used for the second triangular wave.

また、上述の実施例では、第1三角波発生器306及び第2三角波発生器308で発生される2つの第1三角波及び第2三角波を用いているが、3以上の三角波を同様に用いてもよい。   In the above-described embodiment, two first triangular waves and second triangular waves generated by the first triangular wave generator 306 and the second triangular wave generator 308 are used, but three or more triangular waves may be used similarly. Good.

尚、上述の実施例1の説明で用いた比較例に関しても、三角波の直線領域γだけを閾値との比較に使用すれば、精度の高いPWM信号の生成は可能であり、かかる構成であれば、添付の特許請求の範囲における請求項1の範囲内である。   As for the comparative example used in the description of the first embodiment described above, if only the triangular wave linear region γ is used for comparison with the threshold value, a highly accurate PWM signal can be generated. Within the scope of claim 1 in the appended claims.

本発明の実施例1によるPWM信号生成回路1を示す回路図である。1 is a circuit diagram showing a PWM signal generation circuit 1 according to Embodiment 1 of the present invention. 図1に示した回路図における各点の波形等を示すタイミングチャート図である。FIG. 2 is a timing chart showing waveforms at respective points in the circuit diagram shown in FIG. 1. 閾値の適切な範囲を示す図である。It is a figure which shows the suitable range of a threshold value. 電流調整制御部324の調整例を示す図である。It is a figure which shows the example of adjustment of the electric current adjustment control part 324. 1つの三角波を利用したデューティ追加回路を備える比較例を示す図である。It is a figure which shows a comparative example provided with the duty addition circuit using one triangular wave. 比較例における主要な波形を示すタイミングチャート図である。It is a timing chart figure which shows the main waveforms in a comparative example. 本実施例の三角波(第1及び第2三角波)と閾値との関係と、比較例における三角波と閾値との関係とを、対比して示すタイミングチャート図である。It is a timing chart figure which compares and shows the relation between the triangular wave (the 1st and 2nd triangular wave) of this example, and a threshold, and the relation between the triangular wave in a comparative example, and a threshold. 本発明の実施例2によるPWM信号生成回路2を示す回路図である。It is a circuit diagram which shows the PWM signal generation circuit 2 by Example 2 of this invention. 波高位置調整制御部342の調整方法の説明図である。It is explanatory drawing of the adjustment method of the crest position adjustment control part.

符号の説明Explanation of symbols

1,2 PWM信号生成回路
201 カウンタ
202 比較回路
203 Duty設定レジスタ
302 D/Aコンバータ
304 レベルシフト回路
306 第1三角波発生器
308 第2三角波発生器
310 第1比較器
312 第2比較器
320 波形合成部
330,340 制御装置
332 レベルシフト制御部
324 電流調整制御部
336 位相調整制御部
342 波高位置調整制御部
1, 2 PWM signal generation circuit 201 Counter 202 Comparison circuit 203 Duty setting register 302 D / A converter 304 Level shift circuit 306 First triangular wave generator 308 Second triangular wave generator 310 First comparator 312 Second comparator 320 Waveform synthesis Units 330 and 340 Control device 332 Level shift control unit 324 Current adjustment control unit 336 Phase adjustment control unit 342 Wave height position adjustment control unit

Claims (9)

クロック信号CLKに基づいてデジタルPWM信号を生成するデジタルPWM信号生成回路と、
前記クロック信号CLKと同期した三角波を発生させる三角波発生器と、
前記三角波に対する閾値であって、該三角波の直線領域に対応する閾値を生成する閾値生成部と、
前記三角波と、前記閾値生成部により生成される閾値とを比較する比較器とを備え、
前記比較器の出力に基づいて、前記デジタルPWM信号の分解能を高くすることを特徴とする、PWM信号生成回路。
A digital PWM signal generation circuit that generates a digital PWM signal based on the clock signal CLK;
A triangular wave generator for generating a triangular wave synchronized with the clock signal CLK;
A threshold value generating unit that generates a threshold value for the triangular wave and corresponding to a linear region of the triangular wave;
A comparator that compares the triangular wave with a threshold value generated by the threshold value generator;
A PWM signal generation circuit, wherein the resolution of the digital PWM signal is increased based on the output of the comparator.
クロック信号CLKに基づいてデジタルPWM信号を生成するデジタルPWM信号生成回路と、
前記クロック信号CLKと同期した互いに位相の異なる2つ以上の三角波を発生させる三角波発生器と、
前記2つ以上の三角波に対する閾値を生成する閾値生成部と、
前記2つ以上の三角波のそれぞれと、前記閾値生成部により生成される閾値とを比較する比較器とを備え、
前記比較器の出力に基づいて、前記デジタルPWM信号の分解能を高くすることを特徴とする、PWM信号生成回路。
A digital PWM signal generation circuit that generates a digital PWM signal based on the clock signal CLK;
A triangular wave generator for generating two or more triangular waves having different phases in synchronization with the clock signal CLK;
A threshold generation unit that generates a threshold for the two or more triangular waves;
A comparator that compares each of the two or more triangular waves with a threshold value generated by the threshold value generator;
A PWM signal generation circuit, wherein the resolution of the digital PWM signal is increased based on the output of the comparator.
前記閾値生成部は、前記2つ以上の三角波のそれぞれの直線領域に対応する閾値を生成する、請求項2に記載のPWM信号生成回路。   The PWM signal generation circuit according to claim 2, wherein the threshold value generation unit generates a threshold value corresponding to each linear region of the two or more triangular waves. 前記三角波発生器は、それぞれの直線領域が連続して現れるように傾き及び位相が調整された2つ以上の三角波を発生させる、請求項3に記載のPWM信号生成回路。   4. The PWM signal generation circuit according to claim 3, wherein the triangular wave generator generates two or more triangular waves whose slopes and phases are adjusted such that respective linear regions appear continuously. 5. 前記2つ以上の三角波は、前記クロック信号CLKの2倍の周期を有し、互いに位相が180度ずれ、且つ、それぞれの直線領域が連続して現れるように傾き及び位相が調整された2つの三角波からなる、請求項2に記載のPWM信号生成回路。   The two or more triangular waves have a period twice that of the clock signal CLK, are out of phase with each other by 180 degrees, and are adjusted in inclination and phase so that each linear region appears continuously. The PWM signal generation circuit according to claim 2, comprising a triangular wave. 前記2つ以上の三角波は、前記クロック信号CLKの2倍の周期を有し、且つ、互いに位相が180度ずれた2つの三角波からなり、
前記比較器は、前記2つの三角波がそれぞれ入力される2つの比較器からなり、
前記2つの比較器の出力のうちの一方の比較器の出力を、前記クロック信号CLKの周期毎に交互に用いて、前記デジタルPWM信号の分解能を高くする、請求項2に記載のPWM信号生成回路。
The two or more triangular waves are composed of two triangular waves having a period twice that of the clock signal CLK and being 180 degrees out of phase with each other.
The comparator comprises two comparators to which the two triangular waves are input,
3. The PWM signal generation according to claim 2, wherein the output of one of the two comparators is alternately used for each cycle of the clock signal CLK to increase the resolution of the digital PWM signal. circuit.
前記デジタルPWM信号のデューティを規定するデジタル情報を保持するレジスタと、
前記クロック信号CLKに基づいて動作するカウンタと、
前記レジスタ内の出力と、前記カウンタの出力とを比較する比較回路と、
前記2つの比較器の出力に基づいて、該2つの比較器の出力のうちの一方の比較器の出力を、前記クロック信号CLKの周期毎に交互に出力する波形合成回路と、
前記比較回路の出力と、前記波形合成回路の出力との論理積を取るAND回路とを更に備え、
前記デジタルPWM信号生成回路は、前記AND回路の出力と、前記カウンタの出力とが入力されるフリップフロップを備える、請求項6に記載のPWM信号生成回路。
A register for holding digital information defining the duty of the digital PWM signal;
A counter that operates based on the clock signal CLK;
A comparator for comparing the output in the register with the output of the counter;
Based on the outputs of the two comparators, a waveform synthesis circuit that alternately outputs the output of one of the two comparators for each period of the clock signal CLK;
An AND circuit that takes a logical product of the output of the comparison circuit and the output of the waveform synthesis circuit;
The PWM signal generation circuit according to claim 6, wherein the digital PWM signal generation circuit includes a flip-flop to which an output of the AND circuit and an output of the counter are input.
前記比較器の出力に基づいて、前記比較器の出力が変化するタイミングで前記デジタルPWM信号のデューティを変化させる、請求項1又は2に記載のPWM信号生成回路。   The PWM signal generation circuit according to claim 1, wherein a duty of the digital PWM signal is changed at a timing at which the output of the comparator changes based on the output of the comparator. 前記デジタルPWM信号のデューティを規定するデジタル情報を保持するレジスタと、
前記クロック信号CLKに基づいて動作するカウンタと、
前記レジスタ内の出力と、前記カウンタの出力とを比較する比較回路と、
前記比較回路の出力と、前記比較器の出力との論理積を取るAND回路とを更に備え、
前記デジタルPWM信号生成回路は、前記AND回路の出力と、前記カウンタの出力とが入力されるフリップフロップを備える、請求項1又は2に記載のPWM信号生成回路。
A register for holding digital information defining the duty of the digital PWM signal;
A counter that operates based on the clock signal CLK;
A comparator for comparing the output in the register with the output of the counter;
An AND circuit that performs a logical product of the output of the comparison circuit and the output of the comparator;
The PWM signal generation circuit according to claim 1, wherein the digital PWM signal generation circuit includes a flip-flop to which an output of the AND circuit and an output of the counter are input.
JP2007050202A 2007-02-28 2007-02-28 Pwm signal generation circuit Pending JP2008219155A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2007050202A JP2008219155A (en) 2007-02-28 2007-02-28 Pwm signal generation circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2007050202A JP2008219155A (en) 2007-02-28 2007-02-28 Pwm signal generation circuit

Publications (1)

Publication Number Publication Date
JP2008219155A true JP2008219155A (en) 2008-09-18

Family

ID=39838725

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007050202A Pending JP2008219155A (en) 2007-02-28 2007-02-28 Pwm signal generation circuit

Country Status (1)

Country Link
JP (1) JP2008219155A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010103680A (en) * 2008-10-22 2010-05-06 Seiko Epson Corp Pulse width modulation circuit

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010103680A (en) * 2008-10-22 2010-05-06 Seiko Epson Corp Pulse width modulation circuit

Similar Documents

Publication Publication Date Title
JP4760909B2 (en) PWM signal generation circuit
KR20080030928A (en) Pwm signal generating circuit and power supply apparatus comprising such pwm signal generating circuit
US6507296B1 (en) Current source calibration circuit
JP2005198296A (en) Multi-stage numeric counter oscillator
US7049994B2 (en) Semiconductor integrated circuit
TW201507360A (en) Digital pulse width generator and generation method thereof
KR0139835B1 (en) D/a converter and a/d converter
JP2008219155A (en) Pwm signal generation circuit
JP5230528B2 (en) DA conversion circuit
JPWO2008026440A1 (en) A / D converter
KR100390384B1 (en) Pulse width modulator and arbitrary frequency generator using pulse distribution technique
JP2012151556A (en) Da conversion device
JP3417517B2 (en) Direct digital synthesizer
JPH06244639A (en) Frequency synthesizer
JP2001292064A (en) Analog/digital conversion circuit
KR100484133B1 (en) Apparatus and method for generating writing pulse on optical recording medium using ring oscillator
Chen A high-resolution digital PWM controller using capacitor integration
US20020184274A1 (en) Sinusoid synthesis
TW201332294A (en) Counter based digital pulse width modulation device could scalable the resolution
JP4096250B2 (en) Feedback type pulse width modulation A / D converter
JP2009033554A (en) Pulse width controller
JP2006138822A (en) Encoder position detecting circuit
JPH102759A (en) Interpolation pulse generator
JP4065804B2 (en) Semiconductor device
JP3114795B2 (en) High-speed AD converter