JPH01141412A - Pwm converting circuit - Google Patents

Pwm converting circuit

Info

Publication number
JPH01141412A
JPH01141412A JP62301169A JP30116987A JPH01141412A JP H01141412 A JPH01141412 A JP H01141412A JP 62301169 A JP62301169 A JP 62301169A JP 30116987 A JP30116987 A JP 30116987A JP H01141412 A JPH01141412 A JP H01141412A
Authority
JP
Japan
Prior art keywords
pattern
data
bit
bits
address
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP62301169A
Other languages
Japanese (ja)
Other versions
JPH0652875B2 (en
Inventor
Toyoo Kiuchi
木内 豊雄
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NEC Corp
Original Assignee
NEC Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NEC Corp filed Critical NEC Corp
Priority to JP30116987A priority Critical patent/JPH0652875B2/en
Publication of JPH01141412A publication Critical patent/JPH01141412A/en
Publication of JPH0652875B2 publication Critical patent/JPH0652875B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Analogue/Digital Conversion (AREA)

Abstract

PURPOSE:To cause a ripple, after a PWM output signal passes an integrating circuit, to be small with the small quantity of hardwares by reading two patterns from a pattern storing means according to digital data to which a pulse width modulation(PWM) conversion is executed, synthesizing them, and outputting an optimum PWM output pattern. CONSTITUTION:A PWM signal, in which a first pattern is repeated 2N times in a prescribed time period and, simultaneously, a second pattern is inserted into the part of the 2N-1 delimitation of the first pattern, is outputted. In such a case, the first and second patterns '010010010010010' and '101110111011101' are the patterns in which the data of '1' are uniformly arranged by a number indicated by the high order N bit and low order N bit of input data. Consequently, the number of pulses contained in the PWM signal and a pulse period are both dynamically changed according to the input data. Namely, the pulse period is made short. For such a reason, the ripple, after the PWM output signal passes the integrating circuit, can be made small.

Description

【発明の詳細な説明】 [産業上の利用分野] 本発明は、ディジタルデータをパルス幅変調(Puls
e Width Modulation:PWM)する
PWM変換回路に関し、特に一定周期中に繰り返し出力
されるパルスのパルス幅の総和がディジタルデータに比
例した値となるPWM信号を生成し出力するPWM変換
回路に関する。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention applies pulse width modulation (Pulse Width Modulation) to digital data.
The present invention relates to a PWM conversion circuit that performs Width Modulation (PWM), and particularly relates to a PWM conversion circuit that generates and outputs a PWM signal in which the sum of pulse widths of pulses repeatedly output during a fixed period is a value proportional to digital data.

し従来の技術] ディジタルデータを入力すると共に、予め定められた時
間周期内に複数のパルス信号を出力し、前記時間周期に
おけるパルス信号のパルス幅の総和を上記ディジタルデ
ータの値に比例する長さとするPWM変換回路は、例え
ばD/A変換における積分器の前段等に使用される。こ
の種のPWM変換回路は、各種民生機器のディジタル化
に伴って小型で簡易な構成のものが求められている。
[Prior art] Digital data is input and a plurality of pulse signals are output within a predetermined time period, and the sum of the pulse widths of the pulse signals in the time period is set to a length proportional to the value of the digital data. The PWM conversion circuit is used, for example, at a stage before an integrator in D/A conversion. This type of PWM conversion circuit is required to have a small size and a simple configuration as various consumer devices become digitalized.

第5図は従来のPWM変換回路を示すブロワ2り図であ
る0例えば、8ビットのディジタルデータDATAは、
ラッチ信号りに基づいて8ビットのデータラッチ回路4
1に保持される。このデータラッチ回路41で保持され
た8ビットのディジタルデータDATAのうち上位5ビ
ットのデータDHは5ビットの第1の比較器42の一方
の入力として与えられ、下位3ビットのデータDLは3
ビットの第2の比較器43の一方の入力として与えられ
る。
FIG. 5 is a blower diagram showing a conventional PWM conversion circuit. For example, 8-bit digital data DATA is
8-bit data latch circuit 4 based on latch signal
It is held at 1. Of the 8-bit digital data DATA held in this data latch circuit 41, the upper 5 bits of data DH are given as one input of the 5-bit first comparator 42, and the lower 3 bits of data DL are
It is given as one input of the bit second comparator 43.

一方、5ビットの第1のカウンタ44は、クロック信号
CKOをカウントし、そのカウント値CN1を前記第1
の比較器42の他方の入力に与えている。第1の比較器
42からの一致信号Mは、。D型フリップフロップ45
に与えられ、同フリップフロップ45の出力をリセット
する。また、カウンタ44の桁あふれ信号FもD型フリ
ップフロップ45に与えられ、同フリップフロップ45
の出力をセットする。一方、カウンタ44の内容が“3
1”になる直前に出力されるクロックパルスCKIは、
3ビットの第2のカウンタ46に与えられている。この
第2のカウンタ46は、第1のカウンタ44が一巡する
都度クロックパルスCK1をカウントし、そのカウント
値CN2を第2の比較器43の他方の入力に与えている
。そして、前記り型フリップフロップ45の出力PH(
主パルス)と第2の比較器43の出力PL(副パルス)
とをOR回路47で論理和した値をPWM信号として出
力するようになっている。
On the other hand, the 5-bit first counter 44 counts the clock signal CKO and converts the count value CN1 into the first counter 44.
is applied to the other input of the comparator 42. The match signal M from the first comparator 42 is: D type flip-flop 45
is applied to reset the output of the flip-flop 45. Further, the overflow signal F of the counter 44 is also given to the D-type flip-flop 45.
Set the output of . On the other hand, the content of the counter 44 is “3”.
The clock pulse CKI output just before it becomes 1” is
A 3-bit second counter 46 is provided. This second counter 46 counts the clock pulse CK1 each time the first counter 44 makes one round, and supplies the count value CN2 to the other input of the second comparator 43. Then, the output PH(
main pulse) and the output PL of the second comparator 43 (sub pulse)
The OR circuit 47 outputs the value obtained by logically adding the values and the values as a PWM signal.

今、クロック信号CKOの周期をTとすると、この回路
は、28 T=2567で規定される時間周期を32T
ずつ8つに分割し、各32Tの周期に8ビットのディジ
タルデータDATAの上位5ビットのデータDHの値×
Tの幅の主パルスPHを出力し、且つこれらの8つの主
パルスPHに下位3ビットのデータDLで示す数の幅T
の副パルスPLを1パルスずつ上記主パルスPHに付加
するものとなっている。
Now, if the period of the clock signal CKO is T, then this circuit has a time period of 32T defined by 28T=2567.
The value of the upper 5 bits of data DH of the 8-bit digital data DATA × the value of the data DH of the upper 5 bits of the 8-bit digital data DATA
The main pulses PH with a width of T are output, and these eight main pulses PH have a width T of the number indicated by the lower 3 bits of data DL.
The sub-pulses PL are added one pulse at a time to the main pulse PH.

第6図は、ディジタルデータDATAがパA3H”であ
った場合の主パルスPHと副パルスPLとを示す波形で
ある。即ち、この場合、DATAの上位5ビットが“1
0100”=“20”、下位3ビットが“011 ” 
=“3″であるから、図示のように主パルスPHのパル
ス幅が207、副パルスPLの付加数が3°°となり、
周期256Tにおける総パルス幅が21X3+20X5
=163=A3Hとなる。
FIG. 6 shows the waveforms of the main pulse PH and the sub-pulse PL when the digital data DATA is “PaA3H”. That is, in this case, the upper 5 bits of DATA are “1”.
0100” = “20”, lower 3 bits are “011”
= "3", so the pulse width of the main pulse PH is 207 and the number of additional sub pulses PL is 3°° as shown in the figure.
Total pulse width in period 256T is 21X3+20X5
=163=A3H.

この回路によれば、カウンタ及び比較器等により簡易に
PWM変換回路を構成することができるという利点があ
る。
This circuit has the advantage that a PWM conversion circuit can be easily constructed using a counter, a comparator, and the like.

[発明が解決しようとする問題点] 上述した従来のPWM変換回路では、PWM変換するデ
ィジタルデータnビット中の上位mピッ)(man)を
カウンタのカウント値と比較することによって、主パル
スPHのパルス幅を決定する。また、このPWM変換回
路では、周期2”XT(Tはクロック周期)中の主パル
スPHの個数は2”−′1個、主パルスPHの周期は2
1×Tであリ、これらはPWM変換するディジタルデー
タの値とは無関係にPWM回路のハードウェア構成によ
り予め定められたものである。
[Problems to be Solved by the Invention] In the conventional PWM conversion circuit described above, the main pulse PH is determined by comparing the upper m bits (man) of the n bits of digital data to be PWM converted with the count value of the counter. Determine the pulse width. In addition, in this PWM conversion circuit, the number of main pulses PH during period 2''XT (T is the clock period) is 2''-'1, and the period of main pulse PH is 2''.
1×T, and these are predetermined by the hardware configuration of the PWM circuit, regardless of the value of digital data to be PWM converted.

一方、PWM変換後のパルス信号は一般に積分回路を通
過してアナログ信号に変換されるが、従来のPWM変換
回路では、上記のように主パルスの周期及び数が固定さ
れ、しかも構成上主パルスの周期を極端に短くしたり、
主パルスの数を増やしたりすることができないため、積
分回路を通過したアナログ信号に比較的大きなリップル
成分が含まれてしまうという問題点がある。
On the other hand, the pulse signal after PWM conversion generally passes through an integrating circuit and is converted into an analog signal, but in conventional PWM conversion circuits, the period and number of main pulses are fixed as described above, and furthermore, due to the structure, the main pulse Extremely shorten the period of
Since it is not possible to increase the number of main pulses, there is a problem that a relatively large ripple component is included in the analog signal that has passed through the integrating circuit.

本発明は、かかる問題点に鑑みてなされたものであって
、アナログ変換した際のリップル成分が少ないPWM信
号が得られ、しかも構成が簡素なPWM変換回路を提供
することを目的とする。
The present invention has been made in view of such problems, and an object of the present invention is to provide a PWM conversion circuit that can obtain a PWM signal with less ripple components when converted to analog and has a simple configuration.

[問題点を解決するための手段] 本発明に係るPWM変換回路は、処理すべき2Nビット
の入力データを保持するデータ保持手段と、このデータ
保持手段に保持された2Nビットの入力データの上位N
ビットと下位Nビットとを順番に選択する選択手段と、
この選択手段で選択された上位Nビットのデータと下位
Nビットのデータとをアドレスとして順次入力し、後述
する2Nlビットの第1.第2のパターンを順次出力す
るパターン記憶手段と、上記第1のパターンを保持しそ
れを巡回出力する第1のシフトレジスタと、前記第2の
パターンを保持し、前記第1のシフトレジスタが1回巡
回する都度前記第2のパターンをシフト出力する第2の
シフトレジスタと、これら第1.第2のシフトレジスタ
からの出力を論理和しPWM信号として出力する論理和
手段とを備えている。
[Means for Solving the Problems] The PWM conversion circuit according to the present invention includes a data holding means for holding 2N bits of input data to be processed, and a data holding means for holding 2N bits of input data to be processed, and an upper part of the 2N bits of input data held in the data holding means. N
selection means for sequentially selecting the bit and the lower N bits;
The data of the upper N bits and the data of the lower N bits selected by this selection means are sequentially input as addresses, and the first . a pattern storage means for sequentially outputting a second pattern; a first shift register for holding the first pattern and outputting it cyclically; a second shift register that shifts and outputs the second pattern each time the first . and an OR means for ORing the output from the second shift register and outputting it as a PWM signal.

そして、前記第1.第2のパターンは、パターン記憶手
段に与えられるNビットのアドレスが示す数だけ“1″
のデータを含んだパターンであって、これら“1”のデ
ータが上位ビットから下位ビットにかけて略均等に配置
されている点に特徴がある。
And the above-mentioned 1. The second pattern is "1" as many as the number indicated by the N-bit address given to the pattern storage means.
This pattern includes data of 1, and is characterized in that these "1" data are approximately evenly distributed from the upper bit to the lower bit.

[作用コ 本発明によれば、予め定められた時間周期の中で、第1
のパターンが2N回繰り返され、かつ上記第1のパター
ンの2N−1個の区切りの部分に第2のパターンが内挿
されたPWM信号が出力される。ここで、第1.第2の
パターンは、入力データの上位Nビット及び下位Nビッ
トで示される数だけ“1”のデータを均等配置させたも
のであるから、上記のPWM信号に含まれるパルスの数
及びパルス周期はいずれも入力データに応じてダイナミ
ックに変化する。即ち、パルスの数は従来よりも多く、
パルス周期は従来よりも短くなるように変化する。この
ため、本発明により得られたPWM出力信号の積分回路
通過後のリップルを極めて小さくすることができる。
[Operation] According to the present invention, within a predetermined time period, the first
A PWM signal is output in which the pattern is repeated 2N times and the second pattern is interpolated into 2N-1 divisions of the first pattern. Here, the first. In the second pattern, the number of "1" data indicated by the upper N bits and lower N bits of the input data is evenly distributed, so the number of pulses and the pulse period included in the above PWM signal are Both change dynamically depending on input data. In other words, the number of pulses is greater than before,
The pulse period changes to become shorter than before. Therefore, the ripple of the PWM output signal obtained by the present invention after passing through the integrating circuit can be made extremely small.

また、本来2Nビットの入力データに対し、それに応じ
た数及び周期のパルス信号を得るため用意すべきパター
ンの数は22N個であるが、本発明においては、入力デ
ータを上位Nビットと下位Nビットとに分け、上位Nビ
ットにより得られる第1のパターンと下位Nビットによ
り得られる第2のパターンとの組合せで上記2Nビット
の入力データに対するパターンを生成している。第1の
パターンと第2のパターンとは同じものであるから、本
発明においては、用意又は生成すべきパターンの数は、
2N個で足りる。従って、本発明によれば、構成が簡素
化する。
In addition, originally, for 2N bits of input data, the number of patterns that should be prepared in order to obtain pulse signals with the corresponding number and period is 22N, but in the present invention, the input data is divided into upper N bits and lower N bits. A pattern for the 2N-bit input data is generated by combining a first pattern obtained by the upper N bits and a second pattern obtained by the lower N bits. Since the first pattern and the second pattern are the same, in the present invention, the number of patterns to be prepared or generated is
2N pieces is enough. Therefore, according to the present invention, the configuration is simplified.

[実施例] 以下、添付の図面に基づいて本発明の実施例について説
明する。
[Example] Hereinafter, an example of the present invention will be described based on the accompanying drawings.

第1図は本発明の第1の実施例に係るPWM変換回路を
示すブロック図である。
FIG. 1 is a block diagram showing a PWM conversion circuit according to a first embodiment of the present invention.

入力データである8ビットのディジタルデータDATA
と、このディジタルデータDATAのラッチタイミング
を与えるラッチ信号りとは8ビットのデータラッチ回路
11に入力されている。ラッチ信号りは周波数が1/3
2MHz、パルス幅が2μsecとなっている。データ
ラッチ回路11に保持されたディジタルデータDATA
のうち、上位4ビットのデータDHと下位4ビットのデ
ータDLとは、夫々マルチプレクサ12の各入力端子に
導入されている。
8-bit digital data DATA that is input data
A latch signal that provides latch timing for this digital data DATA is input to an 8-bit data latch circuit 11. The frequency of the latch signal is 1/3
The frequency is 2 MHz and the pulse width is 2 μsec. Digital data DATA held in the data latch circuit 11
Of these, the upper 4 bits of data DH and the lower 4 bits of data DL are introduced into each input terminal of the multiplexer 12, respectively.

一方、前記ラッチ信号りは第1のデイレイ回路13に与
えられている。第1のデイレイ回路13は、ラッチ信号
りを5μsecだけ遅延させて遅延信号LDIを出力す
る。この遅延信号LDIは更に第2のデイレイ回路14
に入力されている。第2のデイレイ回路14は遅延信号
LDIを更に5μsecだけ遅延させて遅延信号LS2
を出力する。
On the other hand, the latch signal is given to the first delay circuit 13. The first delay circuit 13 delays the latch signal by 5 μsec and outputs the delayed signal LDI. This delay signal LDI is further transmitted to the second delay circuit 14.
has been entered. The second delay circuit 14 further delays the delay signal LDI by 5 μsec to generate a delay signal LS2.
Output.

これら遅延信号LDI、LD2は夫々D型フリップフロ
ップ(D−FF)15に入力されている。
These delayed signals LDI and LD2 are input to D-type flip-flops (D-FF) 15, respectively.

D型フリップフロップ15は、遅延信号LD1が“1”
になるとその出力を“1”にし、遅延信号LD2が“1
”になるとその出力を“0″にすることにより、その出
力を選択信号SELとしてマルチプレクサ12に出力す
る。
The D-type flip-flop 15 has a delay signal LD1 of “1”.
When the output becomes “1”, the delay signal LD2 becomes “1”.
”, the output is set to “0” and the output is output to the multiplexer 12 as the selection signal SEL.

マルチプレクサ12は選択信号SELにより順次選択し
たディジタルデータDATAの上位4ビットのデータD
Hと下位4ビットのデータDLとをROM (Read
 0nly Memory> 16のアドレスADとし
て与える。ROM16は第2図に示すようなパターンを
記憶したパターン記憶手段である。
The multiplexer 12 selects the upper 4 bits of data D of the digital data DATA sequentially selected by the selection signal SEL.
H and the lower 4 bits of data DL are stored in a ROM (Read
0nly Memory> Give as 16 addresses AD. The ROM 16 is a pattern storage means that stores patterns as shown in FIG.

このパターンは、アドレスの値に応じた数だけ“1”を
含む15ビットのパターンであって、“1”のデータが
上位ビットから下位ビットにかけて均等に配置されたパ
ターンとなっている。このROM16は、前記遅延信号
LDI、LD2をOR回路17によって論理和して得ら
れた読出し信号RDに応じて指定アドレスのパターンC
0NTを出力する。ROM16から出力されたC0NT
は16ビットの第1のデータラッチ回路18と第2のデ
ータラッチ回路19の上位ビット側に入力されている。
This pattern is a 15-bit pattern that includes a number of "1"s corresponding to the value of the address, and is a pattern in which "1" data is evenly distributed from the upper bit to the lower bit. This ROM 16 receives a pattern C of a designated address according to a read signal RD obtained by ORing the delay signals LDI and LD2 by an OR circuit 17.
Outputs 0NT. C0NT output from ROM16
is input to the upper bit side of the 16-bit first data latch circuit 18 and second data latch circuit 19.

これらのデータラッチ回路18.19のLSBには常に
“0”が与えられており、ラッチ信号には前記遅延信号
LDI、LD2が夫々与えられている。第1のデータラ
ッチ回路18に格納されたデータは巡回型の第1のシフ
トレジスタ20に入力され、第2のデータラッチ回路1
9に格納されたデータは第2のシフトレジスタ21に入
力されている。
"0" is always applied to the LSB of these data latch circuits 18 and 19, and the delay signals LDI and LD2 are applied to the latch signals, respectively. The data stored in the first data latch circuit 18 is input to the cyclic first shift register 20, and the data is input to the second data latch circuit 1.
The data stored in 9 is input to the second shift register 21.

一方、8 MHzのクロック信号CKOは、第1のシフ
トレジスタ20のシフトクロック信号として与えられる
と共に、分周回路22に入力されている0分周回路22
はクロック信号CKOを16分周して0.5)41(z
のクロック信号CKIを出力する。このクロック信号C
KIは、第2のシフトレジスタ21のシフトクロック信
号として与えられると共に、分周回路23に入力されて
いる。分周回路23はクロック信号CKIを更に16分
周して1/32MHzのクロック信号CK2を出力する
On the other hand, the 8 MHz clock signal CKO is given as a shift clock signal to the first shift register 20 and is also input to the frequency divider circuit 22.
divides the clock signal CKO by 16 and obtains 0.5)41(z
outputs the clock signal CKI. This clock signal C
KI is given as a shift clock signal to the second shift register 21 and is also input to the frequency dividing circuit 23 . The frequency dividing circuit 23 further divides the clock signal CKI by 16 and outputs a 1/32 MHz clock signal CK2.

このクロック信号CK2は、2つのシフトレジスタ20
.21にラッチ信号として与えられている。
This clock signal CK2 is applied to two shift registers 20
.. 21 as a latch signal.

シフトレジスタ20.21は、格納されたデータをクロ
ック信号CKO,CKIに基づいて並直列変換し、第1
のパルスPHと第2のパルスPLとを夫々出力する。こ
れらのパルスPH及びPLはOR回路24で論理和され
、PWM信号として出力されるようになっている。
The shift registers 20 and 21 parallel-serial convert the stored data based on the clock signals CKO and CKI, and
pulse PH and second pulse PL, respectively. These pulses PH and PL are logically summed by an OR circuit 24 and output as a PWM signal.

次に、このように構成された本実施例の動作について説
明する。
Next, the operation of this embodiment configured as described above will be explained.

図示しない演算部からは31.25μsecの周期で演
算結果(ディジタルデータDATA)が出力される。ラ
ッチ信号りの周波数は1/3214)1z、その周期は
31.25μSeCであるから、データDATAが1つ
送出される毎に、データラッチ回路11にそのデータD
ATAがラッチされる。ラッチ信号りが“1nとなって
から、5μsec後に遅延信号LDIが“1′”になる
と、D型フリップフロップ15がセットされて選択信号
SELが“1”となり、マルチプレクサ12によりデー
タラッチ回路11に格納されたデータの上位4ビットの
内容DHがROM16のアドレスADとして出力される
A calculation unit (not shown) outputs calculation results (digital data DATA) at a cycle of 31.25 μsec. Since the frequency of the latch signal is 1/3214)1z and the period is 31.25 μSeC, each time data DATA is sent out, the data latch circuit 11 sends the data D
ATA is latched. When the delay signal LDI becomes "1'" 5 μsec after the latch signal becomes "1n," the D-type flip-flop 15 is set and the selection signal SEL becomes "1". The content DH of the upper 4 bits of the stored data is output as the address AD of the ROM 16.

ROM16は読出し信号RDに同期してデータラッチ回
路11のデータの上位4ビットにより指定されるアドレ
スADに基き、15ビットの第1のパターンを出力する
。このとき、データラッチ回路18にラッチ信号として
遅延信号LDIが与えられるので、上記第1のパターン
は、データラッチ回路18に入力される。
The ROM 16 outputs a 15-bit first pattern based on the address AD specified by the upper 4 bits of data in the data latch circuit 11 in synchronization with the read signal RD. At this time, the data latch circuit 18 is given the delay signal LDI as a latch signal, so the first pattern is input to the data latch circuit 18.

次に、遅延信号LDIより更に5μsec遅れて遅延信
号LD2が“1″となると、D型フリップフロップ15
がリセットされて選択信号SELが“O”となり、マル
チプレクサ12によりデータラッチ回路11に格納され
たデータの下位4ビットの内容DLがROM16のアド
レスADとして出力される。ROM16は、読出し信号
RDに同期してデータラッチ回路11のデータの下位4
ビットにより指定されるアドレスADに基き、15ビッ
トの第2のパターンを出力する。この時、データラッチ
回路19にラッチ信号として遅延信号LD2が与えられ
ているので、上記第2のパターンはデータラッチ回路1
9ヘラツチされる。
Next, when the delay signal LD2 becomes "1" with a further delay of 5 μsec from the delay signal LDI, the D-type flip-flop 15
is reset, the selection signal SEL becomes "O", and the content DL of the lower 4 bits of the data stored in the data latch circuit 11 is output by the multiplexer 12 as the address AD of the ROM 16. The ROM 16 stores the lower 4 data of the data latch circuit 11 in synchronization with the read signal RD.
A 15-bit second pattern is output based on the address AD specified by the bit. At this time, since the delay signal LD2 is given to the data latch circuit 19 as a latch signal, the second pattern is the same as that of the data latch circuit 1.
9 Heratsuchi is received.

例えば、データラッチ回路11にラッチされたデータD
ATAが“5BM”であるとすると、データラッチ回路
18へは“010010010010010”のパター
ン(第1のパターン)がラッチ信号りより5μsec遅
れて入力され、データラッチ回路19へは“10111
0111011101”のパターン(第2のパターン)
がラッチ信号りより10μsec遅れて入力される。こ
のようにデータラッチ回路11へのデータのラッチ後、
1゛0μSeCの間に第1.第2のパターンがデータラ
ッチ回路18.19に夫々ラッチされる。
For example, data D latched in the data latch circuit 11
Assuming that ATA is "5BM", a pattern (first pattern) of "010010010010010" is inputted to the data latch circuit 18 with a delay of 5 μsec from the latch signal, and "10111" is inputted to the data latch circuit 19.
0111011101” pattern (second pattern)
is input 10 μsec later than the latch signal. After the data is latched into the data latch circuit 11 in this way,
1st during 1゛0μSeC. The second patterns are latched into data latch circuits 18 and 19, respectively.

データラッチ回路18.19では、夫々、LSBに“°
0′′を加えた16ビットのパターン“0010010
010010010”、“0101110111011
101’を保持する。これらのパターンは、1/32M
Hzのクロック信号CK2の立上がりエッ′ジにより夫
々シフトレジスタ20゜21に入力され、直ちにシフト
処理される。シフトレジスタ20に入力されたデータは
クロック信号CKOに基づいて8 MHzで巡回右シフ
トされ、シフトレジスタ21に入力されたデータはクロ
ック信号CKIに基づいて0.5MHzで右シフトされ
る。
In the data latch circuits 18 and 19, “°” is applied to the LSB, respectively.
16-bit pattern with 0'' added “0010010
010010010”, “0101110111011
101' is retained. These patterns are 1/32M
At the rising edge of the Hz clock signal CK2, the signals are input to the shift registers 20 and 21, respectively, and are immediately shifted. The data input to the shift register 20 is cyclically right-shifted at 8 MHz based on the clock signal CKO, and the data input to the shift register 21 is right-shifted at 0.5 MHz based on the clock signal CKI.

第3図(a)、(b)は、データが“5 B o ”で
ある場合に、夫々シフトレジスタ20.21から出力さ
れる第1.第2のパルスPH,PLを示すタイミングチ
ャート図である。クロック信号CKOの周期をTとする
と、16Tの間に第1のパルスPH”01001001
00100100”がシリアルに出力され、“0”を挿
入したLSBの出力タイミングに第2のパルスPLの各
ビットが出力される。
FIGS. 3(a) and 3(b) show the first . FIG. 3 is a timing chart diagram showing second pulses PH and PL. If the period of the clock signal CKO is T, the first pulse PH"01001001 is generated during 16T.
00100100" is serially output, and each bit of the second pulse PL is output at the LSB output timing with "0" inserted.

従って、これらパルスPH,PLを論理和してなるPW
M出力信号は、第1のパルスPHを16回繰返し、かつ
第1のパターンPHのLSBの出力タイミングに第2の
パルスPLを1ビットずつ内挿したパターンとなる。
Therefore, PW obtained by ORing these pulses PH and PL
The M output signal has a pattern in which the first pulse PH is repeated 16 times and the second pulse PL is interpolated bit by bit at the output timing of the LSB of the first pattern PH.

即ち、OR回路24はクロック信号CK2の立上がりか
ら31.25μsecの間に5X 16+ 11=91
=’“58M”個の“1”と165個(256−91=
165)の°“0”からなるPWMパルスを出力するこ
とになる。
That is, the OR circuit 24 performs 5X 16+ 11=91 during 31.25 μsec from the rise of the clock signal CK2.
='“58M” “1” and 165 (256-91=
165) and outputs a PWM pulse consisting of "0".

同様にデータラッチ回路11にラッチされるデータが例
えば“B A H”であったとすると、第3図(b)に
示すようなパルスPH,PLが各シフトレジスタ20.
21から出力される。
Similarly, if the data latched by the data latch circuit 11 is, for example, "B A H", pulses PH and PL as shown in FIG. 3(b) are sent to each shift register 20.
It is output from 21.

これらから明らかなように、本実施例の回路によれば、
得られるPWMパルスのパルス周期T′がデータの内容
に応じてダイナミックに変化する。
As is clear from these, according to the circuit of this example,
The pulse period T' of the obtained PWM pulse changes dynamically depending on the content of the data.

そして、これらは、周期が従来の回路で得られるものよ
りも短く、パルス数も多いので、これを積分した場合に
得られるアナログ信号のリップルも少ないものとなる。
Since these have a shorter period and a greater number of pulses than those obtained by conventional circuits, the ripples of the analog signal obtained when these are integrated are also small.

また、8ビットのデータに対して本来用意すべきパター
ンの数は28=256通りであるが、本回路によれば、
8ビットのデータを上位、下位4ビットずつに分け、こ
れらにより措定される2つのパターンを合成して所望の
パターンを得るようにしているので、用意すべきパター
ンは2’=16通りだけでよく、ROM16も簡単な構
成で済む。
Also, the number of patterns that should be prepared for 8-bit data is 28=256, but according to this circuit,
Since the 8-bit data is divided into upper and lower 4 bits and the two patterns defined by these are combined to obtain the desired pattern, only 2' = 16 patterns are required. , ROM 16 can also have a simple configuration.

なお、上記実施例では、パターン記憶回路として4ビッ
トアドレスのROM16を用いたが、パターン記憶回路
を例えば第4図に示すように構成すると、記憶すべきパ
ターン数を更に減少させることができる。
In the above embodiment, the 4-bit address ROM 16 is used as the pattern storage circuit, but if the pattern storage circuit is configured as shown in FIG. 4, the number of patterns to be stored can be further reduced.

第4図において、4ビットのアドレスADのうち、下位
3ビットは第1のインバータ回路31に入力されている
。このインバータ回路31は、アドレスADのMSBが
“1”のときのみアドレスADの下位3ビットを反転す
る。インバータ回路31の出力は3ビットアドレスのR
OM32にアドレス情報として与えられている。ROM
32は、第2図のパターンのうち、アドレス“0000
”から“0111”に対応した8つのパターンを記憶し
ている。ROM32の出力は更に第2のインバータ回路
33に入力されている。インバータ回路33は、アドレ
スADのMSBが“1”のときのみROM16から読出
されたパターンをビット反転させてデータラッチ18.
19に出力する。
In FIG. 4, of the 4-bit address AD, the lower 3 bits are input to the first inverter circuit 31. This inverter circuit 31 inverts the lower three bits of address AD only when the MSB of address AD is "1". The output of the inverter circuit 31 is a 3-bit address R
It is given to OM32 as address information. ROM
32 is the address “0000” of the pattern in FIG.
” to “0111” are stored.The output of the ROM 32 is further input to the second inverter circuit 33.The inverter circuit 33 is injected only when the MSB of the address AD is “1”. The bits of the pattern read from the ROM 16 are inverted and the data latches 18.
Output to 19.

この回路は、第2図において、アドレス“0000”〜
“0111”までのパターンが“1111″〜“100
0”までのパターンと丁度ビット反転した関係にあるこ
とを利用して記憶パターンを第2図の1/2に減少させ
たものである。
This circuit has addresses “0000” to “0000” in FIG.
The pattern up to “0111” is “1111” to “100”
The number of stored patterns is reduced to 1/2 of that in FIG. 2 by taking advantage of the fact that the bits are exactly reversed from the pattern up to 0''.

なお、本発明は上述した各実施例に限定されるものでは
ない0例えば、バスのバス幅、ROMの容量、クロック
信号の周波数ラッチ及びシフトレジスタのビット幅等は
適宜変更可能である。同様にROMに格納されるデータ
パターンも任意に設定可能である。
Note that the present invention is not limited to the embodiments described above. For example, the bus width of the bus, the capacity of the ROM, the frequency latch of the clock signal, the bit width of the shift register, etc. can be changed as appropriate. Similarly, the data pattern stored in the ROM can also be set arbitrarily.

[発明の効果] 以上説明したように、本発明のPWM変換回路は、パタ
ーン記憶手段を使用し、PWM変換するディジタルデー
タの値に応じて、このパターン記憶手段より2つのパタ
ーンを読出し、これを合成することにより最適なPWM
出カバターンを出力することにより、小量のハードウェ
ア量で、PWM変換するディジタルデータの値に応じて
PWM出力信号のパルスの周期や個数をダイナミックに
変更し、PWM出力信号の積分回路通過後のリップルを
極めて小さくすることができる。
[Effects of the Invention] As explained above, the PWM conversion circuit of the present invention uses a pattern storage means, reads two patterns from the pattern storage means according to the value of digital data to be PWM converted, and converts the two patterns. Optimal PWM by combining
By outputting the output pattern, the period and number of pulses of the PWM output signal can be dynamically changed according to the value of the digital data to be PWM converted with a small amount of hardware, and the pulse period and number of pulses of the PWM output signal can be changed after passing through the integration circuit. Ripple can be made extremely small.

【図面の簡単な説明】[Brief explanation of the drawing]

第1図は本発明の第1の実施例に係るPWM変同回路の
動作タイミングチャート図、第4図は本発明の第2の実
施例に係るPWM変換回路におけるパターン記憶手段を
示すブロック構成図、第5図は従来のPWM変換回路の
ブロック構成図、第6図は同回路の動作タイミング図で
ある。 11.18.19,41;データラッチ回路、12;マ
ルチプレクサ、13,14;デイレイ回路、15,45
.D型フリップフロップ、16゜32 ; ROM、1
7.24,47.OR回路、20.21;シフトレジス
タ、22.23;分周回路、31,33;インバータ回
路、42.43;比較器、44.46 、カウンタ
FIG. 1 is an operation timing chart of a PWM conversion circuit according to a first embodiment of the present invention, and FIG. 4 is a block diagram showing a pattern storage means in a PWM conversion circuit according to a second embodiment of the present invention. , FIG. 5 is a block diagram of a conventional PWM conversion circuit, and FIG. 6 is an operation timing diagram of the circuit. 11.18.19, 41; Data latch circuit, 12; Multiplexer, 13, 14; Delay circuit, 15, 45
.. D-type flip-flop, 16°32; ROM, 1
7.24,47. OR circuit, 20.21; Shift register, 22.23; Frequency divider circuit, 31, 33; Inverter circuit, 42.43; Comparator, 44.46, Counter

Claims (3)

【特許請求の範囲】[Claims] (1)2Nビットの入力データを保持するデータ保持手
段と、このデータ保持手段に保持された前記入力データ
の上位Nビットと下位Nビットとを順次選択する選択手
段と、この選択手段で選択された前記各Nビットのデー
タをアドレスとして順次入力しこのアドレスの値に応じ
た数の“1”のデータを上位ビットから下位ビットに略
均等に配してなる2^N−1ビットのパターンを夫々出
力するパターン記憶手段と、前記上位Nビットのアドレ
スを指定することにより前記パターン記憶手段から出力
される第1のパターンを保持し該第1のパターンを所定
のクロック信号に基づいて巡回させると共に該第1のパ
ターンをシフト出力する第1のシフトレジスタと、前記
下位Nビットのアドレスを指定することにより前記パタ
ーン記憶手段から出力される第2のパターンを保持し、
前記第1のシフトレジスタが1回巡回する都度前記第2
のパターンをシフト出力する第2のシフトレジスタと、
これら第1及び第2のシフトレジスタからのシフト出力
を論理和しその値をPWM信号として出力する論理和手
段とを有することを特徴とするPWM変換回路。
(1) data holding means for holding 2N bits of input data; selection means for sequentially selecting the upper N bits and lower N bits of the input data held in the data holding means; Each of the above N bits of data is sequentially input as an address, and a 2^N-1 bit pattern is created in which the number of "1" data corresponding to the value of this address is distributed approximately evenly from the upper bit to the lower bit. a pattern storage means for outputting each, and holding a first pattern outputted from the pattern storage means by specifying an address of the upper N bits, and circulating the first pattern based on a predetermined clock signal; a first shift register for shifting and outputting the first pattern; and holding a second pattern output from the pattern storage means by specifying an address of the lower N bits;
Each time the first shift register circulates once, the second shift register
a second shift register that shifts and outputs a pattern of
A PWM conversion circuit comprising an OR means for ORing the shift outputs from the first and second shift registers and outputting the resulting value as a PWM signal.
(2)前記パターン記憶手段は、Nビットのアドレスの
値に応じた数の“1”のデータを上位ビットから下位ビ
ットに略均等に配してなる2^N−1ビットのパターン
を記憶したROMであることを特徴とする特許請求の範
囲第1項に記載のPWM変換回路。
(2) The pattern storage means stores a 2^N-1 bit pattern in which a number of "1" data corresponding to the value of the N-bit address is distributed approximately evenly from the upper bit to the lower bit. The PWM conversion circuit according to claim 1, which is a ROM.
(3)前記パターン記憶手段は、Nビットのアドレスの
うちの下位N−1ビットを、上記アドレスの最上位ビッ
トの値が“1”である場合に限り反転出力する第1のイ
ンバータ回路と、このインバータ回路からのN−1ビッ
トのデータをアドレスとし、該アドレスの値に応じた数
の“1”のデータを上位ビットから下位ビットに略均等
に配してなる2^N−1ビットのパターンを記憶したR
OMと、このROMの出力を、前記Nビットのアドレス
のうちの最上位ビットの値が“1”である場合に限り反
転出力する第2のインバータ回路とからなるものである
ことを特徴とする特許請求の範囲第1項に記載のPWM
変換回路。
(3) the pattern storage means includes a first inverter circuit that inverts and outputs the lower N-1 bits of the N-bit address only when the value of the most significant bit of the address is "1"; The N-1 bit data from this inverter circuit is used as an address, and the number of "1" data corresponding to the value of the address is distributed approximately equally from the upper bit to the lower bit. R memorized the pattern
It is characterized by comprising an OM and a second inverter circuit that inverts and outputs the output of the ROM only when the value of the most significant bit of the N-bit address is "1". PWM according to claim 1
conversion circuit.
JP30116987A 1987-11-28 1987-11-28 PWM conversion circuit Expired - Lifetime JPH0652875B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP30116987A JPH0652875B2 (en) 1987-11-28 1987-11-28 PWM conversion circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP30116987A JPH0652875B2 (en) 1987-11-28 1987-11-28 PWM conversion circuit

Publications (2)

Publication Number Publication Date
JPH01141412A true JPH01141412A (en) 1989-06-02
JPH0652875B2 JPH0652875B2 (en) 1994-07-06

Family

ID=17893624

Family Applications (1)

Application Number Title Priority Date Filing Date
JP30116987A Expired - Lifetime JPH0652875B2 (en) 1987-11-28 1987-11-28 PWM conversion circuit

Country Status (1)

Country Link
JP (1) JPH0652875B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2007000943A1 (en) * 2005-06-28 2007-01-04 Rohm Co., Ltd. Current control circuit, led current control apparatus, and light emitting apparatus

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2007000943A1 (en) * 2005-06-28 2007-01-04 Rohm Co., Ltd. Current control circuit, led current control apparatus, and light emitting apparatus
US7659873B2 (en) 2005-06-28 2010-02-09 Rohm Co., Ltd. Current control circuit, LED current control apparatus, and light emitting apparatus

Also Published As

Publication number Publication date
JPH0652875B2 (en) 1994-07-06

Similar Documents

Publication Publication Date Title
JPH03253108A (en) Direct digital synthesizer and signal generation
US5789992A (en) Method and apparatus for generating digital pulse width modulated signal using multiplied component and data signals
JP2842389B2 (en) Random number generator
JPH07101847B2 (en) Digital Phase Locked Loop Device
JPH07114466B2 (en) Video signal fading circuit
JP3276852B2 (en) Code conversion circuit
US20100201409A1 (en) Frequency Divider Circuit
JPH01141412A (en) Pwm converting circuit
EP0735374A2 (en) Time counting circuit and counter circuit
US6215728B1 (en) Data storage device capable of storing plural bits of data
CA2081757C (en) Variable frequency signal generating method
JPH11163689A (en) Clock multiplication circuit
JPS6328368B2 (en)
JP3125651B2 (en) Rate generator
JPS6352808B2 (en)
JPH08330946A (en) Time count circuit and counter circuit
JPH07225630A (en) Optional waveform generator with sequence function
JPH09261015A (en) Frequency variable pulse waveform generating circuit
JPH06224708A (en) Pulse width modulation circuit
JP2958220B2 (en) Phase signal conversion method and phase signal converter
JPH07135469A (en) D/a converter
JP2689539B2 (en) Divider
SU1529451A1 (en) Protection-rate scaler with fractional divison ratio
SU813677A1 (en) Digital frequency synthesizer
JPH0983368A (en) D/a converting circuit

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20040409

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20040511

A02 Decision of refusal

Effective date: 20040914

Free format text: JAPANESE INTERMEDIATE CODE: A02