JPH0653794A - Pulse width modulation circuit - Google Patents

Pulse width modulation circuit

Info

Publication number
JPH0653794A
JPH0653794A JP20345292A JP20345292A JPH0653794A JP H0653794 A JPH0653794 A JP H0653794A JP 20345292 A JP20345292 A JP 20345292A JP 20345292 A JP20345292 A JP 20345292A JP H0653794 A JPH0653794 A JP H0653794A
Authority
JP
Japan
Prior art keywords
counter
bit
register
pwm
bits
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.)
Withdrawn
Application number
JP20345292A
Other languages
Japanese (ja)
Inventor
Nobuaki Niimori
信明 新森
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.)
Oki Electric Industry Co Ltd
Oki Micro Design Miyazaki Co Ltd
Original Assignee
Oki Electric Industry Co Ltd
Oki Micro Design Miyazaki Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Oki Electric Industry Co Ltd, Oki Micro Design Miyazaki Co Ltd filed Critical Oki Electric Industry Co Ltd
Priority to JP20345292A priority Critical patent/JPH0653794A/en
Publication of JPH0653794A publication Critical patent/JPH0653794A/en
Withdrawn legal-status Critical Current

Links

Landscapes

  • Analogue/Digital Conversion (AREA)

Abstract

PURPOSE:To obtain a PWM output waveform with a high frequency and with comparatively simple configuration without increasing a frequency of an operating clock signal and with lowering the resolution of a duty factor of the PWM output. CONSTITUTION:The circuit is provided with a 1-bit register 10 to which a duty factor (a) is set, a 1-bit counter 20 counting number of pulses of a clock signal CK and a comparator means 30 for detecting the duty factor comparing counts of the said register 10 and the counter 20. N-Bits in l-bits (n=l-m) of the counter 20 are shifted toward high-order bits. Then n-bits of the register 10 and the counter 20 overflown by the said shift are compared by the comparator means 30, and a PWM pulse whose frequency is a multiple of 2<n> of a conventional frequency is outputted from the said comparator means 30 depending whether or not the content of the said register 10 is incremented by one based on the result of comparison.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は、信号処理において入力
信号のパルス幅変調を行うパルス幅変調回路(以下、P
WMという)に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a pulse width modulation circuit (hereinafter referred to as P
WM).

【0002】[0002]

【従来の技術】図2は、従来の8ビットのPWMの一構
成例を示すブロック図である。この8ビットのPWM
は、入力信号に対する変調幅を設定する8ビットのレジ
スタ1と、クロック信号CKを計数(カウント)する8
ビットのカウンタ2と、該レジスタ1の値とカウンタ2
の値を比較する比較手段であるコンパレータ3と、該カ
ウンタ2のキャリーCYでセットされ、該コンパレータ
3の一致信号S3でリセットされてPWMパルスを出力
するリセット・セット型フリップフロップ(以下、RS
−FFという)4とで、構成されている。
2. Description of the Related Art FIG. 2 is a block diagram showing a configuration example of a conventional 8-bit PWM. This 8-bit PWM
Is an 8-bit register 1 for setting a modulation width for an input signal, and 8 for counting the clock signal CK.
Bit counter 2, value of register 1 and counter 2
And a reset-set flip-flop (hereinafter referred to as RS which is set by the carry CY of the counter 2 and reset by the coincidence signal S3 of the comparator 3 to output a PWM pulse).
-FF) 4.

【0003】図3は図2に示すPWMの動作波形図であ
り、この図を参照しつつ、図2の変調動作を説明する。
図2のPWMでは、入力信号に対する変調幅Nをレジス
タ1に設定しておく。クロック信号CKのパルス数がカ
ウンタ2でカウントされ、そのカウンタ2からキャリー
CYが出力されると、該キャリーCYでRS−FF4が
セットされてPWM出力が“1”になる。そして、カウ
ンタ2がクロック信号CKのパルス数をカウントし、該
カウンタ2の値が00HからFFHへ変化する間に、レ
ジスタ1に設定された値Nになったとき、コンパレータ
3から一致信号S3が出力され、該一致信号S3によっ
てRS−FF4がリセットされ、PWM出力が“0”に
なる。従って、レジスタ1の値Nを01Hから0FFH
に設定することににより、1/256デューティから2
55/256デューティのPWM出力波形を任意に得る
ことができる。
FIG. 3 is an operation waveform diagram of the PWM shown in FIG. 2. The modulation operation of FIG. 2 will be described with reference to this figure.
In the PWM of FIG. 2, the modulation width N for the input signal is set in the register 1. When the counter 2 counts the number of pulses of the clock signal CK and the carry CY is output from the counter 2, RS-FF4 is set by the carry CY and the PWM output becomes "1". Then, the counter 2 counts the number of pulses of the clock signal CK, and when the value of the counter 2 reaches the value N set in the register 1 during the change from 00H to FFH, the coincidence signal S3 is output from the comparator 3. The RS-FF4 is output, the RS-FF4 is reset by the coincidence signal S3, and the PWM output becomes "0". Therefore, the value N of register 1 is changed from 01H to 0FFH.
Setting from 1/256 duty to 2
A 55/256 duty PWM output waveform can be arbitrarily obtained.

【0004】[0004]

【発明が解決しようとする課題】しかしながら、上記構
成のPWMでは、次のような課題があった。従来のPW
Mでは、PWM出力波形の周波数が8ビットカウンタ2
のオーバフロー時に発生するキャリーCYにより決定さ
れるため、高い周波数のPWM出力波形を得るために
は、8ビットカウンタ2の動作クロック信号CKの周波
数を上げるか、あるいは該8ビットカウンタ2を7ビッ
トカウンタ以下にしてPWM出力波形のデューティの分
解能を下げる方法がある。ところが、動作クロック信号
CKは、使用しているシステムの動作クロック信号に依
存して上限があるため、その周波数を上限値以上に上げ
ることが不可能である。また、デューティの分解能を下
げる方法では、PWMとして使用範囲の低下を招く。
However, the PWM having the above structure has the following problems. Conventional PW
In M, the frequency of the PWM output waveform is 8 bit counter 2
Since it is determined by the carry CY that occurs at the time of overflow, in order to obtain a high-frequency PWM output waveform, the frequency of the operation clock signal CK of the 8-bit counter 2 is increased, or the 8-bit counter 2 is changed to a 7-bit counter. There is a method of reducing the duty resolution of the PWM output waveform as follows. However, since the operation clock signal CK has an upper limit depending on the operation clock signal of the system being used, it is impossible to raise its frequency to the upper limit value or more. Further, the method of lowering the duty resolution causes a reduction in the range of use as PWM.

【0005】そこで、従来では、低いデューティのパル
スを2つ組み合わせ、高いデューティのパルスを作るよ
うにしているが、回路規模が大型化すると共に、組み合
わせる2つのパルスのタイミングずれによるデューティ
精度の劣化を招き、未だ技術的に十分満足のゆくPWM
を得ることが困難であった。本発明は、前記従来技術が
持っていた課題として、システムの動作クロック信号を
上げることなく、またPWM出力のデューティの分解能
を下げることなく、比較的簡単な構成で、高精度な、高
い周波数のPWM出力波形を得ることが困難な点につい
て解決したPWMを提供するものである。
Therefore, conventionally, two low-duty pulses are combined to create a high-duty pulse. However, the circuit scale becomes large, and the duty accuracy deteriorates due to the timing deviation between the two combined pulses. Inviting, PWM still technically satisfactory
Was difficult to obtain. The present invention has the problems that the above-mentioned conventional techniques have, without increasing the operating clock signal of the system and without lowering the resolution of the duty of the PWM output, with a relatively simple configuration, with high accuracy and high frequency. The present invention provides PWM that solves the problem that it is difficult to obtain a PWM output waveform.

【0006】[0006]

【課題を解決するための手段】図1(a),(b)は、
本発明のPWMの原理説明図である。図1(b)に示す
ように、本発明のPWMは、入力信号に対するデューテ
ィ値aを設定するlビット(但し、l;任意の正数)の
レジスタ10と、クロック信号CKのパルス数をカウン
トするlビットのカウンタ20と、前記レジスタ10と
カウンタ20の値を比較するデューティ検出用の比較手
段30とを備えている。そして、前記カウンタ20のl
ビットのうちのn(=l−m)ビット(但し、m,n;
任意の整数)を上位方向へシフトし、該シフトによって
はみ出した前記レジスタ10及びカウンタ20のnビッ
トを前記比較手段30で比較し、その比較結果で、前記
レジスタ10の値に+1加算するかしないかによって該
比較手段30から所定周波数のPWMパルスを出力する
構成にしている。
[Means for Solving the Problems] FIGS. 1 (a) and 1 (b) are
It is a principle explanatory drawing of PWM of the present invention. As shown in FIG. 1B, the PWM of the present invention counts the number of pulses of a clock signal CK and an l-bit (where l is an arbitrary positive number) register 10 that sets a duty value a for an input signal. 1-bit counter 20 and comparing means 30 for detecting the duty for comparing the values of the register 10 and the counter 20. Then, the l of the counter 20
Of the bits, n (= 1-m) bits (however, m, n;
(Arbitrary integer) is shifted in the upper direction, and the n bits of the register 10 and the counter 20 that have overflowed due to the shift are compared by the comparison means 30, and +1 is added to the value of the register 10 based on the comparison result. The comparison means 30 is configured to output a PWM pulse having a predetermined frequency.

【0007】[0007]

【作用】従来のPWMでは、低いデューティのパルスを
2つ組み合わせ、高いデューティのパルスを作るように
している。即ち、従来のPWMは、図1(a)に示すよ
うに、入力信号に対するデューティ値aを設定するlビ
ットのレジスタ10と、クロック信号CKのパルス数を
カウントするlビットのカウンタ20と、該レジスタ1
0とカウンタ20の値を比較するデューティ検出用の比
較手段30とを、備えている。通常、lビットのデュー
ティのパルスPを得るには、最低、lビットのカウンタ
20が必要となり、しかもその最高周波数Fmax は、該
カウンタ20に入力されるクロック信号CKのクロック
周波数をf(Hz)とすると、 Fmax =f/2l (Hz) ・・・(1) となる。パルスPの周波数Fを上げるには、クロック信
号CKのクロック周波数f(Hz)を上げるしかなかっ
た。
In the conventional PWM, two low-duty pulses are combined to create a high-duty pulse. That is, the conventional PWM includes an l-bit register 10 for setting a duty value a for an input signal, an l-bit counter 20 for counting the number of pulses of a clock signal CK, as shown in FIG. Register 1
The comparison means 30 for detecting the duty for comparing 0 and the value of the counter 20 is provided. Normally, in order to obtain the pulse P having the duty of 1 bit, at least the counter 20 of 1 bit is required, and the maximum frequency Fmax is the clock frequency of the clock signal CK input to the counter 20 is f (Hz). Then, Fmax = f / 2 l (Hz) (1) The only way to increase the frequency F of the pulse P is to increase the clock frequency f (Hz) of the clock signal CK.

【0008】そこで、本発明では、図1(b)に示すよ
うに、デューティを変えることなく、lビットのレジス
タ10に設定されたデューティ値aとlビットのカウン
タ20の内容とを比較する比較手段30のビットを変え
ることにより、高い周波数のパルスPを出力するように
している。即ち、本発明では、次式(2)のように、比
較手段30のlビットを、nビットと、周波数を上げた
いビット数n(周波数は2n 倍となる)とに、分ける。 l=m+n ・・・(2) また、レジスタ10に設定するデューティ値をaとする
と、そのaは次式(3)のように分けられる。 a=b×2n +c ・・・(3) a/2l デューティのパルスは、前記(1)〜(3)式
より、次式(4)のように求めることができる。
Therefore, in the present invention, as shown in FIG. 1B, the duty value a set in the l-bit register 10 and the content of the l-bit counter 20 are compared without changing the duty. By changing the bit of the means 30, a high frequency pulse P is output. That is, in the present invention, the 1 bit of the comparison means 30 is divided into n bits and the number of bits n for which the frequency is desired to be increased (the frequency becomes 2 n times) as in the following expression (2). l = m + n (2) Further, when the duty value set in the register 10 is a, the a is divided as in the following expression (3). a = b × 2 n + c (3) An a / 2 l duty pulse can be obtained from the above equations (1) to (3) as in the following equation (4).

【0009】[0009]

【数1】 これは、2n 個のパルスのうち、c個は(b+1)/2
m デューティのパルス、(2n −c)個はb/2m デュ
ーティのパルスを出力することにより、2n 個のパルス
のトータルにより、a/2l デューティのパルスが得ら
れることを示している。従って、nの値を1,2,3,
…,l−1にすることにより、パルスの周波数を2倍,
4倍,8倍,…,2l-1 倍まで上げることが可能にな
る。
[Equation 1] This is because of 2 n pulses, c pulses are (b + 1) / 2.
m duty pulse, (2 n −c) indicates that b / 2 m duty pulse is output to obtain a / 2 l duty pulse by totaling 2 n pulses. . Therefore, the values of n are 1, 2, 3,
..., by setting l-1, the frequency of the pulse is doubled,
It is possible to increase up to 4 times, 8 times, ..., 2 l-1 times.

【0010】[0010]

【実施例】第1の実施例 図4は、図1に示す本発明の第1の実施例を示すPWM
の構成図である。このPWMは、8ビットデューティの
変調を行い、カウンタの1/32の周波数のPWM出力
波形を得る回路である。即ち、図1のlビットのレジス
タ10が8ビットのレジスタ10Aで構成され、図1の
lビットのカウンタ20が、下位5ビットのカウンタ2
1と、該カウンタ21と直列接続された上位3ビットの
カウンタ22とで、構成されている。さらに、図1の比
較手段30が、8ビット構成の比較手段30Aで構成さ
れ、該比較手段30Aが、3ビットのコンパレータ31
と5ビットのコンパレータ32とで構成されている。5
ビットのコンパレータ32の一致信号S32と5ビット
のカウンタ21のキャリーCYとは、RS−FF40に
接続されている。RS−FF40は、5ビットのカウン
タ21のキャリーCYでセットされ、コンパレータ32
からの一致信号S32でリセットされてPWMパルスを
出力する回路である。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS First Embodiment FIG. 4 shows a PWM showing the first embodiment of the present invention shown in FIG.
It is a block diagram of. This PWM is a circuit that performs 8-bit duty modulation to obtain a PWM output waveform with a frequency of 1/32 of the counter. That is, the l-bit register 10 of FIG. 1 is configured by an 8-bit register 10A, and the l-bit counter 20 of FIG.
1 and a high-order 3-bit counter 22 connected in series with the counter 21. Further, the comparison means 30 of FIG. 1 is composed of a comparison means 30A having an 8-bit structure, and the comparison means 30A has a 3-bit comparator 31.
And a 5-bit comparator 32. 5
The coincidence signal S32 of the bit comparator 32 and the carry CY of the 5-bit counter 21 are connected to the RS-FF 40. The RS-FF 40 is set by the carry CY of the 5-bit counter 21, and the comparator 32
Is a circuit which is reset by the coincidence signal S32 from and outputs a PWM pulse.

【0011】図5は図4に示すPWMの動作波形図であ
り、この図を参照しつつ、図4の動作を説明する。クロ
ック信号CKが入力されると、該クロックパルスの数が
5ビットカウンタ21でカウントされる。カウンタ21
からキャリーCYが出ると、RS−FF40がセットさ
れ、PWM出力が“1”になる。その後、3ビットカウ
ンタ22の上位3ビットと8ビットレジスタ10Aの下
位3ビットとが、3ビットのコンパレータ31で比較さ
れ、3ビットカウンタ22の値がレジスタ10Aの下位
3ビットより小さい場合、8ビットレジスタ10Aの上
位5ビットの値に+1加算した値と、5ビットカウンタ
21の値とが、5ビットのコンパレータ32で比較さ
れ、両者が一致すると、該コンパレータ32から一致信
号S32が出力され、RS−FF40がリセットされて
PWM出力が“0”になる。
FIG. 5 is a PWM operation waveform diagram shown in FIG. 4, and the operation of FIG. 4 will be described with reference to this figure. When the clock signal CK is input, the number of clock pulses is counted by the 5-bit counter 21. Counter 21
When the carry CY is output from the RS-FF 40, the PWM output becomes "1". After that, the upper 3 bits of the 3-bit counter 22 and the lower 3 bits of the 8-bit register 10A are compared by the 3-bit comparator 31, and if the value of the 3-bit counter 22 is smaller than the lower 3 bits of the register 10A, then 8 bits The value obtained by adding +1 to the value of the higher 5 bits of the register 10A and the value of the 5-bit counter 21 are compared by the 5-bit comparator 32, and when they match, a match signal S32 is output from the comparator 32 and RS -FF40 is reset and the PWM output becomes "0".

【0012】また、カウンタ22の上位3ビットの値
が、レジスタ10Aの下位3ビットの値よりも大きい場
合、該レジスタ10Aの上位5ビットの値と、カウンタ
21の下位5ビットの値とが、5ビットのコンパレータ
32で比較され、両者が一致すると、該コンパレータ3
2から一致信号S32が出力され、RS−FF40がリ
セットされてPWM出力が“0”になる。例えば、8ビ
ットレジスタ10Aの上位5ビットの値をbとすると、
一つ一つのPWM出力波形はb/32デューティまたは
(b+1)/32デューティとなるが、8個の波形をト
ータルすると、a/256デューティ(但し、aは8ビ
ットレジスタ10Aの値)の波形が得られる。
If the value of the upper 3 bits of the counter 22 is larger than the value of the lower 3 bits of the register 10A, the value of the upper 5 bits of the register 10A and the value of the lower 5 bits of the counter 21 become It is compared by the 5-bit comparator 32, and if the two match, the comparator 3
The coincidence signal S32 is output from 2, the RS-FF 40 is reset, and the PWM output becomes “0”. For example, if the value of the upper 5 bits of the 8-bit register 10A is b,
Each PWM output waveform has b / 32 duty or (b + 1) / 32 duty, but when 8 waveforms are totaled, a waveform with a / 256 duty (where a is the value of 8-bit register 10A) is obtained. can get.

【0013】なお、図4は1/256(=8ビット)デ
ューティの変調例であるが、これらは1/256デュー
ティに限定されない。また、カウンタ20Aの上位と下
位の分け方により、PWM出力の周波数を2倍,4倍,
8倍〜128倍(1/256デューティの場合)まで上
げることが可能となる。以上のように、本実施例では、
カウンタ20Aを上位数ビットのカウンタ22と、それ
以外の下位のカウンタ21とに分け、該カウンタ22の
上位数ビットとレジスタ10Aの下位数ビットとを、コ
ンパレータ31で比較する。そして、カウンタ22の値
が小さければ、レジスタ10Aの上位の値に+1加算し
た値を、コンパレータ32でカウンタ21の下位の値と
比較し、PWMパルスを出力する。そのため、クロック
信号CKの周波数を上げることなく、またPWM出力の
デューティの分解能を下げることなく、比較的簡単な構
成で、高い周波数のPWM出力波形が得られる。
Although FIG. 4 shows an example of modulation with 1/256 (= 8 bits) duty, these are not limited to 1/256 duty. Further, depending on how the counter 20A is divided into upper and lower, the frequency of the PWM output is doubled, quadrupled,
It is possible to increase to 8 times to 128 times (in the case of 1/256 duty). As described above, in this embodiment,
The counter 20A is divided into a high-order several-bit counter 22 and other low-order counters 21, and the high-order several bits of the counter 22 and the low-order few bits of the register 10A are compared by a comparator 31. If the value of the counter 22 is small, the value obtained by adding +1 to the upper value of the register 10A is compared with the lower value of the counter 21 by the comparator 32, and the PWM pulse is output. Therefore, without increasing the frequency of the clock signal CK and without lowering the resolution of the duty of the PWM output, a PWM output waveform with a high frequency can be obtained with a relatively simple configuration.

【0014】第2の実施例 図6〜図8は、図1に示す本発明の第2の実施例を示す
PWMの構成ブロック図であり、図6は周波数2倍、図
7は周波数4倍、及び図8は周波数128倍のPWMで
ある。図6〜図8のPWMでは、図1のlビットレジス
タ10が8ビットレジスタ10Bで、lビットカウンタ
20が8ビットカウンタ20Bで、比較手段30が8ビ
ット加算器30Bで、それぞれ構成されている。8ビッ
トレジスタ10Bの各出力は、インバータ11−0〜1
1−7でそれぞれ反転されて8ビット加算器30Bへ入
力される。8ビット加算器30Bのキャリー入力CYI
Nには電源電位VDDが印加され、該8ビット加算器3
0Bのキャリー出力CYOUTがインバータ33で反転
されてPWM出力となる。
Second Embodiment FIGS. 6 to 8 are PWM block diagrams showing a second embodiment of the present invention shown in FIG. 1. FIG. 6 shows a frequency doubled and FIG. 7 shows a frequency doubled. , And FIG. 8 are PWM with a frequency 128 times. In the PWM of FIGS. 6 to 8, the l-bit register 10 of FIG. 1 is an 8-bit register 10B, the l-bit counter 20 is an 8-bit counter 20B, and the comparison unit 30 is an 8-bit adder 30B. . Each output of the 8-bit register 10B is connected to the inverter 11-0 to -1.
Each of them is inverted by 1-7 and input to the 8-bit adder 30B. Carry input CYI of 8-bit adder 30B
The power supply potential VDD is applied to N, and the 8-bit adder 3
The carry output CYOUT of 0B is inverted by the inverter 33 and becomes a PWM output.

【0015】図6のPWMでは、8ビットレジスタ10
Bの8ビット出力を各インバータ11−0〜11−7で
反転して8ビット加算器30Bへ入力する。8ビットカ
ウンタ20Bでは、例えば周波数10MHzのクロック
信号CKをカウントし、そのカウント値をn個(=1)
ずつシフトして(即ち、上位と下位の1ビットを入れ替
えて)、8ビット加算器30Bへ入力する。8ビット加
算器30Bでは、キャリー系を用い、レジスタ10Bと
カウンタ20Bの値を比較する。この8ビット加算器3
0Bのキャリー出力CYOUTがインバータ33で反転
され、周波数が10MHz/128のPWM出力波形と
なる。このように、カウンタ20Bの値をn個(=1)
ずつシフトすることにより、即ち該カウンタ20Bの上
位と下位を入れ替えるビット数(=1)により、クロッ
ク信号CKの周波数を上げることなく、またPWM出力
のデューティの分解能を下げることなく、簡単な構成
で、従来の2n 倍(n=1)の周波数のPWMパルスを
出力できる。
In the PWM of FIG. 6, the 8-bit register 10
The 8-bit output of B is inverted by each inverter 11-0 to 11-7 and input to the 8-bit adder 30B. The 8-bit counter 20B counts, for example, a clock signal CK having a frequency of 10 MHz, and the count value is n (= 1).
Each of them is shifted (that is, the upper and lower 1 bits are exchanged) and input to the 8-bit adder 30B. The 8-bit adder 30B uses a carry system to compare the values of the register 10B and the counter 20B. This 8-bit adder 3
The carry output CYOUT of 0B is inverted by the inverter 33 and becomes a PWM output waveform with a frequency of 10 MHz / 128. In this way, the value of the counter 20B is n (= 1)
By shifting each of them, that is, by the number of bits (= 1) for switching the upper and lower bits of the counter 20B, without increasing the frequency of the clock signal CK and without lowering the duty resolution of the PWM output, a simple configuration is achieved. , PWM pulses having a frequency 2n times (n = 1) that of the conventional one can be output.

【0016】図7のPWMでは、8ビット加算器30B
に入力するカウンタ20Bの値を、2個ずつシフトする
ことにより、従来の周波数の4倍(=10MHz/6
4)のPWMパルスを出力できる。また、図8のPWM
では、8ビット加算器30Bに入力する8ビットカウン
タ20Bの値を、7個ずつシフトすることにより、従来
の周波数の128倍(=10MHz/2)のPWMパル
スを出力できる。
In the PWM of FIG. 7, the 8-bit adder 30B
By shifting the value of the counter 20B that is input to the counter by two, four times the conventional frequency (= 10 MHz / 6
The PWM pulse of 4) can be output. In addition, the PWM of FIG.
Then, by shifting the value of the 8-bit counter 20B input to the 8-bit adder 30B by 7 each, a PWM pulse 128 times (= 10 MHz / 2) of the conventional frequency can be output.

【0017】[0017]

【発明の効果】以上詳細に説明したように、本発明によ
れば、カウンタ20のnビットを上位方向へシフトし、
該シフトによってはみ出したレジスタ10及びカウンタ
20のnビットを比較手段30で比較し、その比較結果
で、該レジスタ10の値に+1加算するかしないかによ
って所定周波数のPWMパルスを出力するようにしたの
で、クロック信号CKの周波数を上げることなく、また
PWM出力のデューティの分解能を下げることなく、比
較的簡単な構成で、従来の2〜2n (n;カウンタ20
の上位の値)倍の周波数のPWMパルスを出力できる。
As described above in detail, according to the present invention, the n bits of the counter 20 are shifted in the upper direction,
The comparing means 30 compares the n bits of the register 10 and the counter 20 that have overflowed due to the shift, and outputs a PWM pulse of a predetermined frequency depending on whether or not the value of the register 10 is incremented by 1 according to the comparison result. Therefore, without increasing the frequency of the clock signal CK and without lowering the resolution of the duty of the PWM output, the conventional 2 to 2 n (n; counter 20
A PWM pulse having a frequency equal to the upper value) can be output.

【図面の簡単な説明】[Brief description of drawings]

【図1】本発明のPWMの原理説明図である。FIG. 1 is a diagram illustrating the principle of PWM of the present invention.

【図2】従来のPWMの構成ブロック図である。FIG. 2 is a configuration block diagram of a conventional PWM.

【図3】図2の動作波形図である。FIG. 3 is an operation waveform diagram of FIG.

【図4】本発明の第1の実施例を示すPWMの構成ブロ
ック図である。
FIG. 4 is a configuration block diagram of PWM showing the first embodiment of the present invention.

【図5】図4の動作波形図である。5 is an operation waveform diagram of FIG.

【図6】本発明の第2の実施例を示す周波数2倍のとき
のPWMの構成ブロック図である。
FIG. 6 is a configuration block diagram of PWM when the frequency is doubled, showing a second embodiment of the present invention.

【図7】本発明の第2の実施例を示す周波数4倍のとき
のPWMの構成ブロック図である。
FIG. 7 is a configuration block diagram of PWM when the frequency is quadruple, showing the second embodiment of the present invention.

【図8】本発明の第2の実施例を示す周波数128倍の
ときのPWMの構成ブロック図である。
FIG. 8 is a configuration block diagram of PWM when the frequency is 128 times as large as the second embodiment of the present invention.

【符号の説明】[Explanation of symbols]

10 lビットレジスタ 10A,10B 8ビットレジスタ 11−0〜11−7,33 インバータ 20 lビットカウンタ 20A,20B 8ビットカウンタ 21 5ビットカウンタ 22 3ビットカウンタ 30,30A 比較手段 30B 8ビット加算器 31 3ビットコンパレータ 32 5ビットコンパレータ 40 RS−FF CK クロック信号 10 l bit register 10A, 10B 8 bit register 11-0 to 11-7, 33 Inverter 20 l bit counter 20A, 20B 8 bit counter 21 5 bit counter 22 3 bit counter 30, 30A Comparing means 30B 8 bit adder 3 13 3 Bit comparator 32 5 Bit comparator 40 RS-FF CK Clock signal

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】 入力信号に対するデューティ値aを設定
するlビット(但し、l;任意の正数)のレジスタ10
と、クロック信号CKのパルス数を計数するlビットの
カウンタ20と、前記レジスタ10とカウンタ20の値
を比較するデューティ検出用の比較手段30とを備え、 前記カウンタ20のlビットのうちのn(=l−m)ビ
ット(但し、m,n;任意の整数)を上位方向へシフト
し、該シフトによってはみ出した前記レジスタ10及び
カウンタ20のnビットを前記比較手段30で比較し、
その比較結果で、前記レジスタ10の値に+1加算する
かしないかによって該比較手段30から所定周波数のパ
ルスを出力する構成にしたことを特徴とするパルス幅変
調回路。
1. An l-bit register (where l is an arbitrary positive number) for setting a duty value a for an input signal.
And a 1-bit counter 20 for counting the number of pulses of the clock signal CK, and a duty detecting comparator 30 for comparing the values of the register 10 and the counter 20. (= 1m) bits (m, n; arbitrary integers) are shifted in the upper direction, and the n bits of the register 10 and the counter 20 which are pushed out by the shift are compared by the comparison means 30.
A pulse width modulation circuit characterized in that the comparison means 30 outputs a pulse of a predetermined frequency depending on whether or not the value of the register 10 is incremented by 1 based on the comparison result.
JP20345292A 1992-07-30 1992-07-30 Pulse width modulation circuit Withdrawn JPH0653794A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP20345292A JPH0653794A (en) 1992-07-30 1992-07-30 Pulse width modulation circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP20345292A JPH0653794A (en) 1992-07-30 1992-07-30 Pulse width modulation circuit

Publications (1)

Publication Number Publication Date
JPH0653794A true JPH0653794A (en) 1994-02-25

Family

ID=16474357

Family Applications (1)

Application Number Title Priority Date Filing Date
JP20345292A Withdrawn JPH0653794A (en) 1992-07-30 1992-07-30 Pulse width modulation circuit

Country Status (1)

Country Link
JP (1) JPH0653794A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO1997044899A1 (en) * 1996-05-20 1997-11-27 Asahi Kasei Kogyo Kabushiki Kaisha Circuit and method for modulating pulse width
US6593444B2 (en) 2000-02-29 2003-07-15 Shell Oil Company Thermoplastic polyurethane elastomers (TPUs) prepared with polytrimethylene carbonate soft segment
WO2008025153A1 (en) * 2006-08-28 2008-03-06 Tir Technology Lp Pwm method and apparatus, and light source driven thereby
DE102007002932A1 (en) * 2007-01-19 2008-07-24 Minebea Co., Ltd. Pulse width modulator, particularly for controlling motor or switch mode power supply, has N-Bit counter with selected increment, which is provided for producing temporary sequence of readings per metering cycle from counter value
JP2014132713A (en) * 2013-01-07 2014-07-17 Ricoh Co Ltd Pwm signal generation circuit, printer and pwm signal generation method
JP2015082833A (en) * 2013-10-24 2015-04-27 富士電機株式会社 Pulse signal generation device

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO1997044899A1 (en) * 1996-05-20 1997-11-27 Asahi Kasei Kogyo Kabushiki Kaisha Circuit and method for modulating pulse width
US6310913B1 (en) 1996-05-20 2001-10-30 Asahi Kasei Kabushiki Kaisha Circuit and method for modulating pulse width
US6593444B2 (en) 2000-02-29 2003-07-15 Shell Oil Company Thermoplastic polyurethane elastomers (TPUs) prepared with polytrimethylene carbonate soft segment
WO2008025153A1 (en) * 2006-08-28 2008-03-06 Tir Technology Lp Pwm method and apparatus, and light source driven thereby
DE102007002932A1 (en) * 2007-01-19 2008-07-24 Minebea Co., Ltd. Pulse width modulator, particularly for controlling motor or switch mode power supply, has N-Bit counter with selected increment, which is provided for producing temporary sequence of readings per metering cycle from counter value
DE102007002932B4 (en) * 2007-01-19 2012-05-16 Minebea Co., Ltd. Pulse width modulator and method for generating a pulse width control signal
JP2014132713A (en) * 2013-01-07 2014-07-17 Ricoh Co Ltd Pwm signal generation circuit, printer and pwm signal generation method
JP2015082833A (en) * 2013-10-24 2015-04-27 富士電機株式会社 Pulse signal generation device

Similar Documents

Publication Publication Date Title
US4623846A (en) Constant duty cycle, frequency programmable clock generator
JPS6143899B2 (en)
TWI532323B (en) Digital pulse width generator and generation method thereof
US5491440A (en) Automatic clock duty cycle adjusting circuit
US4550307A (en) Pulse generator
US4786823A (en) Noise pulse suppressing circuit in digital system
JPH0653794A (en) Pulse width modulation circuit
EP0061292B1 (en) Da converter
US4837573A (en) Digital to analog converter
US5127036A (en) Fifty percent duty cycle divided-by-m counter
JPH0376494B2 (en)
US7359475B2 (en) Counter circuit and semiconductor device containing the same
JP3665512B2 (en) Binary signal comparison device and PLL circuit using the same
US4224574A (en) Digital frequency quadrupler
JP2906966B2 (en) Pulse switching circuit
JPH06244639A (en) Frequency synthesizer
JPS6359570B2 (en)
JPH057900B2 (en)
JP3125651B2 (en) Rate generator
JP3290061B2 (en) Pulse counting circuit and FV conversion circuit
JPS6352808B2 (en)
JPS6022681Y2 (en) Digital to analog converter
JP2712725B2 (en) Latching device for parallel digital signals
US5767706A (en) Rate generator
KR100486236B1 (en) Apparatus for generating frequency-divided signal by except radix 2

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 19991005