JP2794440B2 - PWM controller - Google Patents

PWM controller

Info

Publication number
JP2794440B2
JP2794440B2 JP4658189A JP4658189A JP2794440B2 JP 2794440 B2 JP2794440 B2 JP 2794440B2 JP 4658189 A JP4658189 A JP 4658189A JP 4658189 A JP4658189 A JP 4658189A JP 2794440 B2 JP2794440 B2 JP 2794440B2
Authority
JP
Japan
Prior art keywords
signal
data
register
control
down counter
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.)
Expired - Fee Related
Application number
JP4658189A
Other languages
Japanese (ja)
Other versions
JPH02228253A (en
Inventor
純一 印東
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to JP4658189A priority Critical patent/JP2794440B2/en
Publication of JPH02228253A publication Critical patent/JPH02228253A/en
Application granted granted Critical
Publication of JP2794440B2 publication Critical patent/JP2794440B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Dc-Dc Converters (AREA)

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本願発明は、複写装置の電源制御等に用いるPWM(Pul
se Width Modulation)制御装置に関するものである。
DETAILED DESCRIPTION OF THE INVENTION [Industrial Application Field] The present invention relates to a PWM (Pull
se Width Modulation) control device.

〔従来の技術〕[Conventional technology]

従来は、この種のPWM制御装置への制御データの切り
換えは、任意のタイミングで行う様にしていた。この従
来の技術を第8図に示すPWM制御装置のブロック図で説
明する。
Conventionally, switching of control data to this kind of PWM control device has been performed at an arbitrary timing. This conventional technique will be described with reference to a block diagram of a PWM control device shown in FIG.

1はアップダウンカウンタコントロールブロックであ
り、このブロック中に存在するアップダウンカウンタ
(以下U/Dカウンタと称す)のカウンタ出力値が2の信
号バスラインを通じて3のダウンカウンタのデータ入力
端子に入力されている。ダウンカウンタ3のカウンタ出
力値は4のバスラインを通じて5のダウンカウント値判
定回路に入力されている。ダウンカウント値判定回路5
は、ダウンカウンタ3のカウント値及び25の信号バス上
のデータ値に応じて、6の信号ライン上にデューティコ
ントロール信号を出力し、又10の信号ライン上に1周期
のパルス出力が終了し、次のパルス信号形成スタートを
示すロード信号を出力する。
Reference numeral 1 denotes an up / down counter control block, in which a counter output value of an up / down counter (hereinafter referred to as a U / D counter) existing in this block is input to a data input terminal of a down counter of 3 through a signal bus line of 2. ing. The counter output value of the down counter 3 is input to a down count value determination circuit 5 through a bus line 4. Down count value judgment circuit 5
Outputs a duty control signal on signal line 6 according to the count value of down counter 3 and the data value on signal bus 25, and completes one cycle of pulse output on signal line 10; A load signal indicating the start of the next pulse signal formation is output.

信号線6は、7のPWM信号整形回路の波形コントロー
ル信号入力端子に接続されている。又信号ライン10は、
ブロック1,3,7のLOAD信号入力端子にそれぞれ接続され
ている。PWM信号整形回路7の信号出力端子は、8の信
号線を通して9の信号出力端子に接続されている。ブロ
ック3,5,7は同一クロックで同期がとられており、23の
信号線を通じて、ブロック3,5,7の各クロック信号入力
端子にクロックが入力される様構成されている。
The signal line 6 is connected to the waveform control signal input terminal of the PWM signal shaping circuit 7. Also, the signal line 10
These are connected to the LOAD signal input terminals of the blocks 1, 3, and 7, respectively. The signal output terminal of the PWM signal shaping circuit 7 is connected to the signal output terminal 9 through the signal line 8. The blocks 3, 5, and 7 are synchronized by the same clock, and a clock is input to each of the clock signal input terminals of the blocks 3, 5, and 7 through 23 signal lines.

22はCPUのバスラインであり、このバス上にCPUが出力
したブロック1,5のための制御データを、14のアドレス
信号ライン、15のストロボライン上の信号のコントロー
ルによりCPUが13のレジスタ上にセットする事が可能で
ある。レジスタ13の信号出力バスは、24及び25の信号バ
スを通じてそれぞれブロックの制御データ入力端子に接
続されている。
Reference numeral 22 denotes a CPU bus line. The CPU outputs control data for blocks 1 and 5 output from the CPU to blocks 13 and 14 by controlling signals on address signal lines 14 and strobe lines 15. It is possible to set to. The signal output bus of the register 13 is connected to the control data input terminal of the block through signal buses 24 and 25, respectively.

次に動作について説明する。 Next, the operation will be described.

CPUは信号バス22上に第一の制御データを出力するの
と同時にライン14,15に制御信号を送り、信号バス22上
のデータをレジスタ13にセットする。このデータを、ア
ップダウンカウンタコントロールブロック1はバスライ
ン24を、又ダウンカンウト値判定回路5はバスライン25
を通してとりこむ。ロード信号ライン10に出力されると
そのロード信号10の立ち下がりエッジでダウンカウンタ
回路3のデータ入力端子に、ブロック1のU/Dカウンタ
の出力値がセットされ、その後アップダウンカウンタコ
ントロール1は信号バス24上のデータ値及び信号ライン
26のフィードバック信号の状態を判定し、アップダウン
カウンタコントロールブロック1の中のU/Dカウンタの
出力値を1増加又は1減少又は増減なしとする3動作中
の1動作を選択し実行する。ライン23上のクロックが0
から1に立ち上がる都度に、ダウンカウンタ3はアップ
ダウンカウンタコントロール1のブロック中のU/Dカウ
ンタの出力値をその最大値として、その値からそのダウ
ンカウンタのカウント出力値を1ずつ減少するものとす
る。そして、ダウンカウント値判定回路5は、そのダウ
ンカウンタ3のカウント出力値をバスライン4を通じ、
ライン23上のクロック毎にその中にとりこみ、ライン25
からのデータと比較しその一致を判定して必要なデュー
ティのための信号を作成し、信号ライン6上に出力す
る。PWM信号整形回路7は、ライン6,10,23の信号を用い
て必要なデューティの矩形波を生成し信号ライン8を通
し、出力端子9に出力する。そして、ダウンカウント値
判定回路5は、ダウンカウンタ3が更にカウントダウン
しそのカウント出力値が零近くのある特定の値の範囲に
なるとライン10にロード信号を出力する。
At the same time as outputting the first control data on the signal bus 22, the CPU sends a control signal on lines 14 and 15 to set the data on the signal bus 22 to the register 13. The up / down counter control block 1 transmits this data to the bus line 24, and the down count value determination circuit 5
Ingest through. When output to the load signal line 10, the output value of the U / D counter of the block 1 is set to the data input terminal of the down counter circuit 3 at the falling edge of the load signal 10, and then the up / down counter control 1 Data values and signal lines on bus 24
The state of the 26 feedback signals is determined, and one of the three operations in which the output value of the U / D counter in the up / down counter control block 1 is increased by 1, decreased by 1, or not increased or decreased is selected and executed. Clock on line 23 is 0
Each time it rises from 1 to 1, the down counter 3 sets the output value of the U / D counter in the block of the up / down counter control 1 as its maximum value, and decreases the count output value of the down counter by 1 from that value. I do. Then, the down count value determination circuit 5 outputs the count output value of the down counter 3 through the bus line 4.
Take in every clock on line 23, line 25
Then, a signal for the required duty is created by comparing the data with the data from the corresponding data, and is output on the signal line 6. The PWM signal shaping circuit 7 generates a rectangular wave having a required duty using the signals on the lines 6, 10, and 23, and outputs the rectangular wave to the output terminal 9 through the signal line 8. Then, the down-count value judging circuit 5 outputs a load signal to the line 10 when the down-counter 3 further counts down and the count output value falls within a certain value range near zero.

この従来例におけるレジスタ13のセットデータの更新
は、クロックの停止状態や出力に異常が生じても問題が
ないタイミングで行われていた。
The update of the set data of the register 13 in the conventional example is performed at a timing when there is no problem even if the clock stops or an error occurs in the output.

〔発明が解決しようとする課題〕[Problems to be solved by the invention]

上述のPWM制御装置でソフトスタートをしようとする
場合には、レジスタ13のデータの書換えを頻繁に行う必
要があるが、CPUとPWM制御装置間のデータ引きわたし時
のタイミングに何の考慮もせずそのデータの書換えを頻
繁に行おうとすると以下の問題が生じる。
When trying to perform a soft start with the above-described PWM controller, it is necessary to frequently rewrite the data in the register 13, but no consideration is given to the timing of data transfer between the CPU and the PWM controller. If the data is frequently rewritten, the following problem occurs.

a.CPUが制御データを変更中に、該データをPWM制御回路
がとり込む事によって、PWM制御装置の出力端子から異
常パルスが出力され、ソフトスタートが正しくかからな
くなる危険がある。
a. While the CPU is changing the control data, the PWM control circuit takes in the data, so that an abnormal pulse is output from the output terminal of the PWM control device, and there is a danger that the soft start may not be performed correctly.

b.上記aの異常パルスによって、電源装置の保護回路が
作動し、電源動作そのものが不能になる恐れが生じる。
b. Due to the abnormal pulse of a, the protection circuit of the power supply device is activated, and the power supply operation itself may be disabled.

又、従来はCPU回路とPWM制御回路は別々のICで構成さ
れていたが、CPU回路とPWM制御回路とを1チップのIC上
に内蔵しようとすると、CPU回路とPWM制御回路とのイン
ターフェース間のデータのやりとりのタイミングに何ら
の考慮も払わずにおくと、ICの動作テスト時その出力パ
ルスの期待値が不定となりテストが困難となる。
In the past, the CPU circuit and the PWM control circuit were composed of separate ICs. However, if the CPU circuit and the PWM control circuit were to be built on a single-chip IC, the interface between the CPU circuit and the PWM control circuit would not work. If no consideration is given to the timing of data exchange, the expected value of the output pulse at the time of the operation test of the IC becomes undefined, making the test difficult.

本願発明は、このような事情のもとでなされたもの
で、CPUからの制御データを1時的に記憶するレジスタ
について、データの書換えを頻繁に行っても誤動作が生
ずることのないPWM制御装置を提案することを目的とす
るものである。
The present invention has been made under such circumstances, and a PWM control device that does not malfunction even when data is frequently rewritten for a register that temporarily stores control data from a CPU. The purpose is to propose.

〔課題を解決するための手段〕[Means for solving the problem]

上記目的を達成するため、本願の第1の発明ではPWM
制御装置をつぎの(1)のとおりに構成し、又、本願の
第2の発明では、PWM制御装置をつぎの(2)のとおり
に構成する。
In order to achieve the above object, the first invention of the present application employs a PWM
The control device is configured as in the following (1), and in the second invention of the present application, the PWM control device is configured as in the following (2).

(1)つぎのa,b,c,d,eの構成要素を備えるようにす
る。
(1) Provide the following components a, b, c, d, and e.

a.PWM出力のパルスの周期を決定するアップダウンカ
ウンタを有するアップダウンコントロール部。
a. An up-down control unit having an up-down counter for determining a cycle of a pulse of a PWM output.

b.上記アップダウンカウンタのデータをロード信号に
よりロードし、上記PWM出力のオン,オフを決定するダ
ウンカウンタ。
b. A down counter that loads the data of the up / down counter with a load signal and determines whether the PWM output is on or off.

c.CPUの制御のもとに、上記PWM出力にかかる制御デー
タを書き込むレジスタ。
c. A register for writing control data for the PWM output under the control of the CPU.

d.上記CPUからの上記レジスタのアドレス信号がHか
らL又はLからのHのタイミングで、上記ロード信号が
必ずH又はLとなるようにする同期手段。
d. Synchronizing means for ensuring that the load signal always goes to H or L at the timing when the address signal of the register from the CPU goes from H to L or H to L.

e.上記CPUが上記レジスタのアドレス信号を選択して
いるとき、該レジスタから上記アップダウンコントロー
ル部及び上記ダウンカウンタのダウンカウント値判定部
へ上記制御データを取り出すことを禁止する手段。
e. means for prohibiting taking out of the control data from the register to the up / down control unit and the down count value judgment unit of the down counter when the CPU selects the address signal of the register.

(2)つぎのa,b,c,dの構成要素を備えるようにする。(2) The following components a, b, c, and d are provided.

a.PWM出力のパルスの周期を決定するアップダウンカ
ウンタを有するアップダウンコントロール部。
a. An up-down control unit having an up-down counter for determining a cycle of a pulse of a PWM output.

b.上記アップダウンカウンタのデータをロード信号に
よりロードし、上記PWM出力のオン,オフを決定するダ
ウンカウンタ。
b. A down counter that loads the data of the up / down counter with a load signal and determines whether the PWM output is on or off.

c.CPUの制御のもとに、上記PWM出力にかかる制御デー
タを書き込むレジスタ。
c. A register for writing control data for the PWM output under the control of the CPU.

d.上記ロード信号によりわずかに先行するタイミング
で、上記CPUが上記レジスタのアドレス信号を選択して
いるか否かを判定し、選択していると判定したとき、上
記レジスタから上記アップダウンコントロール部及び上
記ダウンカウンタのダウンカウント値判定部へ上記制御
データを取り出すことを禁止する手段。
d. At a timing slightly preceding the load signal, the CPU determines whether or not the address signal of the register has been selected, and when it is determined that the address signal has been selected, the CPU determines from the register the up-down control unit and Means for prohibiting the control data from being taken out to the down-count value determination unit of the down counter.

〔作用〕[Action]

上記(1),(2)の構成によれば、CPUによるレジ
スタの制御データの書換え中に、レジスタのデータをア
ップダウンコントロール部及びダウンカウンタのダウン
カウンタ値判定部へ取り出すという動作は行われない。
According to the above configurations (1) and (2), the operation of extracting the register data to the up / down control unit and the down counter value determination unit of the down counter during the rewriting of the control data of the register by the CPU is not performed. .

〔実施例〕〔Example〕

以下本願発明を実施例で説明する。 Hereinafter, the present invention will be described with reference to examples.

第1図は、本願の第1の発明の実施例である、PWM制
御装置のブロック図である。
FIG. 1 is a block diagram of a PWM control device according to an embodiment of the first invention of the present application.

第8図の従来例に比較して、11a,12の回路が追加され
ているので、その事によって生じる動作の変更に関し、
以下に説明し、同じ動作を行う部分に関してはここでの
説明を省略する。
As compared with the conventional example shown in FIG. 8, the circuits 11a and 12 are added.
A description will be given below, and a description of a portion performing the same operation will be omitted.

12は、CPU回路とPWM制御回路の同期を行う(レジスタ
13の書換え中、制御データの取り出しを禁止する)ため
のラッチ回路であり、レジスタ13上にセットされたデー
タを18,19のバスラインを通じラッチし、その出力がバ
スライン20,21を通じてブロック1及び5の制御データ
入力端子に伝えられている。又、11aはレジスタ13,同期
用ラッチ12の制御回路であり、ライン16,17を通じて12,
13に各々制御信号を出力する。この制御回路11aには他
に10,14,15の信号線が接続されている。制御回路11a
は、信号線10からロード信号を、信号線14からアドレス
信号を、信号線15からストロボ信号を取りこみ、信号線
16,17上に出力する制御信号を生成する。なお、ロード
信号が出力されているときは、1,5,7の回路は、20,21上
のデータ,バスライン22上のデータが変化しても、誤動
作しない構成となっている。11a,12,13の回路以外は従
来の場合と同じなので説明は省略し、特に11a,12,13の
回路部分の動作に関し説明するため、第2図に、11aの
内部回路を具体的に示す。
12 synchronizes the CPU circuit with the PWM control circuit (register
13 is a latch circuit for prohibiting taking out of control data during rewriting of 13). The latch circuit latches the data set on the register 13 through the bus lines 18 and 19, and outputs the block 1 through the bus lines 20 and 21. And 5 are transmitted to the control data input terminals. Reference numeral 11a denotes a control circuit for the register 13 and the synchronization latch 12.
13 to output control signals. 10, 14, and 15 signal lines are connected to the control circuit 11a. Control circuit 11a
Captures the load signal from the signal line 10, the address signal from the signal line 14, the strobe signal from the signal line 15, and
Generate control signals to be output on 16,17. When the load signal is being output, the circuits 1, 5, and 7 are configured not to malfunction even if the data on 20, 21 and the data on the bus line 22 change. Except for the circuits 11a, 12, and 13, the description is omitted because it is the same as the conventional case. In particular, in order to explain the operation of the circuit portions 11a, 12, and 13, the internal circuit of 11a is specifically shown in FIG. .

制御回路11aは、図示のように26と27の2入力アンド
ゲート回路と28のインバータ回路からなり、回路27の出
力端子が信号線17に接続され、その一方の入力端子が信
号線15に、他方の入力端子が信号線14に接続されてい
る。又、2入力アンドゲート回路26の出力端子は信号線
16に接続され、その一方の入力端子に信号線10が入力さ
れ、他方の入力端子にはインバータ28の出力端子が接続
され、インバータ28の入力端子は信号線14に接続されて
いる。
The control circuit 11a includes a two-input AND gate circuit of 26 and 27 and an inverter circuit of 28, as shown in the drawing. The output terminal of the circuit 27 is connected to the signal line 17, and one of the input terminals is connected to the signal line 15, The other input terminal is connected to the signal line 14. The output terminal of the 2-input AND gate circuit 26 is a signal line.
The signal line 10 is input to one of the input terminals, the output terminal of the inverter 28 is connected to the other input terminal, and the input terminal of the inverter 28 is connected to the signal line 14.

次に動作について説明する。第3図にそのタイムチャ
ートを示す。
Next, the operation will be described. FIG. 3 shows the time chart.

CPUがレジスタ13にデータを書込む時には、レジスタ1
3のアドレスを選択するためのアドレス信号が不図示のC
PUより信号線14に出力される。そのアドレス信号の立ち
上がるタイミングをt0とする。t0からtα後のt2のタイ
ミングで信号線15上にストロボ信号が出力され、t0から
アドレス信号が立ち下がるまでの区間すなわちT14のタ
イミングで信号バス22上に出力されるレジスタ書換えデ
ータをレジスタ13内にとりこむ。
When the CPU writes data to register 13, register 1
Address signal for selecting address 3 is not shown in C
The signal is output from the PU to the signal line 14. The timing of the rising edge of the address signal and t 0. t 0 strobe signal is output onto the signal line 15 at the timing of t 2 after t alpha from the register rewrite that is output on signal bus 22 at the timing of the sections or T 14 from t 0 to the address signal falls The data is taken into the register 13.

信号線14上に1が立っている区間、即ちT14の範囲内
で信号線10の信号が0から1、そして1から0に変化す
るときは、インバータ28によりアンドゲート26の一方の
入力端子が0となっているため、ラッチ12の内容は書き
かわらずもとのデータA1のままとなる。
When the signal on the signal line 10 changes from 0 to 1 and from 1 to 0 in a section where 1 stands on the signal line 14, that is, within the range of T 14 , one input terminal of the AND gate 26 is controlled by the inverter 28. Is 0, the content of the latch 12 remains unchanged from the original data A1.

さて、信号ライン15の値がT14の範囲内にあるt2のタ
イミングに1となり、その後t3で0となると、信号バス
22上のデータA2がレジスタ13上にセットされる。その後
T4のタイミングで信号線14上の信号が1から0に変化
し、さらにtβ後t5のタイミングで信号線10上に1が立
つと、そのタイミングでレジスタ13上のA2のデータはラ
ッチ回路12がスルーの状態になるため、信号線20,21上
へ出力される。そして、t5からtγたったt6のタイミン
グで信号線10上の信号が1から0に変化し、A2のデータ
が同期用ラッチ12にラッチされる。ただし、このデータ
書換えの場合、CPUとPWM回路は同期がとられており、信
号線10上のLOAD信号は、信号線14上の信号がHからL又
はLからHへ変化するタイミングでは、必ずLとなる
(負論理の回路のときはHとなる)ものとする。又、t
αの方が必ずtγより大であり、又、信号線14上がLで
あるタイミングの方がtαより大であり、又、信号線14
上がLであるタイミングの方がtαより大とする。
Now, 1 next value of the signal line 15 is the timing of t 2 which is in the range of T 14, 0 and becomes thereafter t 3, signal bus
Data A2 on 22 is set on register 13. afterwards
Signal on line 14 at the timing of T 4 is changed to 0 from 1, further 1 stands on the signal line 10 at the timing of t 5 after t beta, A2 data on the register 13 at the timing of the latch Since the circuit 12 is in a through state, it is output onto the signal lines 20 and 21. Then, the signal on the signal line 10 changes from 1 to 0 at the timing of t 6 from t 5 to t γ , and the data of A 2 is latched by the synchronization latch 12. However, in the case of this data rewriting, the CPU and the PWM circuit are synchronized, and the LOAD signal on the signal line 10 is always at the timing when the signal on the signal line 14 changes from H to L or from L to H. L (H for negative logic circuits). Also, t
α is always larger than t γ , the timing when the signal line 14 is at L is larger than t α ,
Above those of the timing is L is larger than t α.

このようにして、CPUによるレジスタ13の書換え中
に、レジスタ13のデータをアップダウンコントロール部
1及びダウンカウンタ3のダウンカウント値判定部へ取
り出してPWM制御装置が誤動作するということが防止さ
れる。
In this way, it is possible to prevent the PWM control device from malfunctioning by taking out the data of the register 13 to the up-down control unit 1 and the down-count value determination unit of the down counter 3 while the CPU rewrites the register 13.

次に本願の第2の発明の実施例について説明する。 Next, an embodiment of the second invention of the present application will be described.

第4図は、第2の発明の実施例である、PWM制御装置
のブロック図である。
FIG. 4 is a block diagram of a PWM control device according to an embodiment of the second invention.

本実施例は、第4図に示すように上述の第1図の実施
例に比較して24の信号線が追加されている。又、制御回
路11a内部が変更されているので、第1図の実施例に比
較して異なる動作を行う部分に関し説明し、同じ動作を
行う部分に関してはここでの説明を省略する。
In this embodiment, as shown in FIG. 4, 24 signal lines are added as compared with the embodiment of FIG. Further, since the inside of the control circuit 11a has been changed, a portion performing an operation different from that of the embodiment of FIG. 1 will be described, and a description of the portion performing the same operation will be omitted.

第5図がその制御回路11b周辺の具体的な回路であ
る。第2図の回路に比べ、インバータ回路28が29のDタ
イプフリップフロップ(以下、DFFと省略)回路におき
かわっている。すなわち、信号線14がDFF回路29のデー
タ入力端子D及び27のアンドゲートの一方の入力端子に
接続され、24の信号線がDFF回路29のクロック入力端子
に接続され、その出力が2入力アンドゲート26の一方
の入力端子に接続され、信号線10がもう一方の信号線に
接続されている。信号線24の他端は、ダウンカウント値
判定回路5のタイミング信号出力端子に接続されてい
る。
FIG. 5 shows a specific circuit around the control circuit 11b. 2, the inverter circuit 28 is replaced by 29 D-type flip-flop (hereinafter abbreviated as DFF) circuits. That is, the signal line 14 is connected to the data input terminal D of the DFF circuit 29 and one input terminal of the AND gate of the DFF circuit 29, the signal line 24 is connected to the clock input terminal of the DFF circuit 29, and the output is two-input AND. The gate 26 is connected to one input terminal, and the signal line 10 is connected to the other signal line. The other end of the signal line 24 is connected to a timing signal output terminal of the down-count value determination circuit 5.

本実施例では第1図の実施例と異なり、アドレス信号
とロード信号の同期はとられていない。
In this embodiment, unlike the embodiment of FIG. 1, the address signal and the load signal are not synchronized.

次に動作について説明する。PWM出力信号の発生手法
に関しては従来例又は第1図の実施例と同じであり、ロ
ード信号が基準となっている。通常、PWM出力信号のパ
ルスの1周期の長さは連続して出力される2つのロード
信号の出力される時間間隔に相当する。即ち、ロード信
号でブロック1中のU/Dカウンタのカウント値がダウン
カウンタ3にセットされ、その値がクロックによってダ
ウンカウントされ、ダウンカウント値判定回路5がロー
ド信号を出力すべきカウント値にダウンカウンタがカウ
ントダウンされた事を判定し、ロード信号を発生し、再
びアップダウンカウンタのU/Dカウント値をダウンカウ
ンタにロードするというサイクルをくりかえす。今考え
ているこのPWM制御装置では、ロード信号が基本クロッ
クの2クロック分の時間出力され、このロード信号が出
力されているときにはブロック1,5,7中の回路は、信号
線20,21のデータが変化しても誤動作しないものとす
る。今ロード信号が、ダウンカウンタ値が1及び0にカ
ウントダウンしたとき信号ライン10上に出力され、その
タイミングでのアップダウンコントロールブロック1中
のU/Dカウンタの値がXとすると、該ロード信号がなく
なるとタイミングでXがダウンカウンタ3にロードされ
る。
Next, the operation will be described. The method of generating the PWM output signal is the same as the conventional example or the embodiment of FIG. 1, and the load signal is used as a reference. Usually, the length of one cycle of the pulse of the PWM output signal corresponds to the time interval between the output of two load signals that are continuously output. That is, the count value of the U / D counter in the block 1 is set in the down counter 3 by the load signal, the value is down-counted by the clock, and the down-count value determination circuit 5 down-counts to the count value to output the load signal. It determines that the counter has counted down, generates a load signal, and repeats the cycle of loading the U / D count value of the up / down counter into the down counter again. In this PWM controller, the load signal is output for two clocks of the basic clock. When the load signal is being output, the circuits in blocks 1, 5, and 7 are connected to signal lines 20 and 21. It does not malfunction even if the data changes. Now, when the load signal is output on the signal line 10 when the down counter value counts down to 1 and 0, and when the value of the U / D counter in the up / down control block 1 at that timing is X, the load signal becomes When it is exhausted, X is loaded into the down counter 3 at the timing.

すなわち、このダウンカウンタ3でX値が0までカウ
ントダウンされる時間がPWM信号の1周期となる。今、
Xが0まで、このダウンカウンタ3でダウンカウントさ
れる時間がロード信号が出力している時間の5倍以上の
値を持つ場合を考える。又、ダウンカウント値が2,1の
値を持つとき、すなわち、ロード信号と同じ長さのタイ
ミングだけ信号線24上に1が出力されるようなダウンカ
ウント値判定回路5が動作するものとする(第7図参
照)。
That is, the time when the X value is counted down to 0 by the down counter 3 is one cycle of the PWM signal. now,
It is assumed that the time during which the down-counter 3 counts down to X is equal to or greater than five times the time during which the load signal is output. When the down-count value has a value of 2,1, that is, the down-count value determination circuit 5 operates such that 1 is output on the signal line 24 at the same timing as the load signal. (See FIG. 7).

今アドレス信号14が1となる時間が、ロード信号が1
のときの3倍の長さであり、14が0となる時間が、14が
1である時間の倍以上あるものとする。又、14に1が立
つ時刻t0から15に1がたつ時刻t2までの時間tαがロー
ド信号が1のときの2倍以上の時間とする。今ロード信
号が出力されている時間をtγとする。
Now, the time when the address signal 14 becomes 1 becomes 1 when the load signal becomes 1.
It is assumed that the time when 14 is 0 is at least twice as long as when 14 is 1. The time t alpha from time t 0 to 1 stand 14 until time t 2 when 1 goes to 15 the load signal is at least twice the time when the 1. The time during which the load signal is output is represented by .

信号線24上の信号が0から1に変化するとき14に1が
立っているときには(第6図(c)参照)、第1図の実
施例で14の信号線に1が立っているとき、10の信号線上
のロード信号が0から1に変化した場合と同等の動作を
する。すなわち、信号線14上の1の信号がDFF29にラッ
チされ、アンドゲート26の一方の入力端子が0となる動
作以外は先の実施例と同じである。又、同様に、信号線
24上の信号が0から1に変化するとき、信号線14上に0
が立っているときには(第6図(a)参照)、先の実施
例で信号線14に0が立っているとき、信号線10上のロー
ド信号が0から1に変化した場合と同等の動作をする。
すなわち、信号線14上の信号が0であるため、信号線24
上の信号が0から1に変化したとき、DFF29のが1の
ままとなり、アンドゲート26の一方の入力端子が1とな
る動作以外は先の実施例の場合と同様の動作をする。た
だし、本実施例においては、信号線24上の信号が0から
1になるタイミングと、信号線14上の信号が0から1,又
は1から0に変化するタイミングとが完全に重なる様な
非同期動作が生じても回路には誤動作が生じないので、
この動作を次に説明する。
When 1 is set at 14 when the signal on the signal line 24 changes from 0 to 1 (see FIG. 6C), when 1 is set at 14 signal lines in the embodiment of FIG. , 10 operate in the same way as when the load signal on the signal line changes from 0 to 1. That is, the operation is the same as that of the previous embodiment except that the operation of turning the 1 signal on the signal line 14 into the DFF 29 and setting one input terminal of the AND gate 26 to 0 is performed. Similarly, signal lines
When the signal on 24 changes from 0 to 1, 0
(See FIG. 6 (a)), the operation equivalent to that when the load signal on the signal line 10 changes from 0 to 1 when the signal line 14 is 0 in the previous embodiment. do.
That is, since the signal on the signal line 14 is 0,
When the above signal changes from 0 to 1, DFF 29 remains at 1, and the same operation as in the previous embodiment is performed except that one input terminal of the AND gate 26 becomes 1. However, in this embodiment, the timing at which the signal on the signal line 24 changes from 0 to 1 and the timing at which the signal on the signal line 14 changes from 0 to 1, or from 1 to 0 are completely asynchronous. Even if the operation occurs, the circuit does not malfunction.
This operation will be described below.

14と24の信号線上の信号変化が同時ということは、DF
F29のクロックが0から1に変化するタイミングでその
D入力端子の信号が不定な状態と等価であり、その出力
は、1になるか0になるかは不定となるが、信号線24
上の信号が0から1になってから、10のラインが0から
1に変化するまでにDFF29の出力のデータが固定して
いれば、それ以降の動作そのものはDFF29の出力の価
によって一意的に決定される。今tαが2×tγより大
のため、第6図(b)のように、14と24の信号線上の信
号が同時に立ち上がり、たとえ信号線14上の信号が1と
判定されても、ロード信号10の立ち下がる時刻は信号線
15上の信号が0から1に立ち上がる前となる様構成され
ているため、信号線15上の信号が0から1に立ち上がる
タイミングでは、ラッチ12はラッチ状態となっており、
CPUによるデータの書換えによる誤動作は生じない。も
ちろん、信号線14上の信号が0と判定されたときはラッ
チ12のデータは変更されず何の問題も生じない。
Simultaneous signal change on signal lines 14 and 24 means DF
At the timing when the clock of F29 changes from 0 to 1, the signal of the D input terminal is equivalent to an undefined state, and its output becomes 1 or 0, but it is undefined.
If the data at the output of DFF29 is fixed from the time when the above signal changes from 0 to 1 to the time when the line 10 changes from 0 to 1, the subsequent operation itself is unique by the value of the output of DFF29. Is determined. Now, since t α is larger than 2 × t γ , as shown in FIG. 6B, the signals on the signal lines 14 and 24 rise simultaneously, and even if the signal on the signal line 14 is determined to be 1, The time when the load signal 10 falls is the signal line
Since the signal on line 15 is configured to be before rising from 0 to 1, at the timing when the signal on signal line 15 rises from 0 to 1, the latch 12 is in the latch state,
No malfunction occurs due to rewriting of data by the CPU. Of course, when the signal on the signal line 14 is determined to be 0, the data in the latch 12 is not changed and no problem occurs.

同様に、信号線14上の信号が0である時間がT14より
大のため、第6図(d)のタイミングのタイムチャート
の如く、信号線24上の信号が0から1に立ち上がるタイ
ミングと信号線14上の信号が1から0に立ち下がるタイ
ミングが同時のとき、信号線14上の信号が1とDFF29に
判定されても、信号線10上の信号が1のとき、信号線16
上の信号は直ちに1になる事はないため、ラッチ12のデ
ータは何ら変更が生じず問題とはならない。又、信号線
14上の信号が0と判定された場合は信号線14上のデータ
が0の条件下で、レジスタ13上のデータがラッチ12にラ
ッチされる事となり、何の問題も生じない。
Similarly, because the time signal on the signal line 14 is 0 is larger than T 14, as a time chart of the timing of FIG. 6 (d), the timing at which the signal on the signal line 24 rises from 0 to 1 When the signal on the signal line 14 falls from 1 to 0 at the same time, even if the signal on the signal line 14 is determined to be 1 and DFF29, if the signal on the signal line 10 is 1, the signal line 16
Since the above signal does not become 1 immediately, the data in the latch 12 is not changed at all and does not cause any problem. Also, signal line
When the signal on the signal 14 is determined to be 0, the data on the register 13 is latched by the latch 12 under the condition that the data on the signal line 14 is 0, and no problem occurs.

このように、本実施例では、ロード信号にわづかに先
行する(DFFのセトリングタイム以上先行する)タイミ
ングで、CPUがレジスタのアドレス信号を選択している
か否か判定することにより、アドレス信号とロード信号
の同期をとることなく、第1図の実施例と同様のPWM制
御装置の誤動作防止の機能を得ることができる。
As described above, in the present embodiment, the CPU determines whether or not the address signal of the register has been selected at a timing immediately preceding the load signal (before the settling time of the DFF or more), thereby determining the address signal. The function of preventing malfunction of the PWM control device similar to the embodiment of FIG. 1 can be obtained without synchronizing the load signals.

〔発明の効果〕〔The invention's effect〕

以上説明したように、本願の第1の発明及び第2の発
明によれば、 a.CPUが任意のタイミングで制御データを切り換えて
も、PWM出力に異常が生じない様に制御が可能となる。
As described above, according to the first and second aspects of the present invention, a. Even if the CPU switches control data at an arbitrary timing, control can be performed so that no abnormality occurs in the PWM output. .

b.上記aの項目が可能となる為、制御データをひんぱん
に切り換え制御する事の必要となる、PWM出力信号を利
用して制御するスイッチング電源のソフトスタートの制
御が容易となる。
b. Since the above item a becomes possible, it becomes easy to control the soft start of the switching power supply controlled by using the PWM output signal, which requires the control data to be frequently switched and controlled.

c.CPUとPWM出力信号の発生回路が同一IC上に構成される
場合、出力値の期待値が一意的に決定されICの回路テス
トが容易となる。
c. When the CPU and the PWM output signal generation circuit are configured on the same IC, the expected value of the output value is uniquely determined, and the circuit test of the IC becomes easy.

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

第1図は本願の第1の発明の実施例のブロック図、第2
図は同実施例の制御回路の結線図、第3図は同制御回路
の動作を示すタイミングチャート、第4図は本願の第2
の発明の実施例のブロック図、第5図は同実施例の制御
回路の結線図、第6図は同制御回路の動作を示すタイミ
ングチャート、第7図は第2の発明の動作を示すタイミ
ングチャート、第8図は従来例のブロック図である。 1……アップダウンカウンタコントロールブロック 2……ダウンカウンタ 5……ダウンカウント値判定回路 11a,11b……制御回路 12……同期用ラッチ 13……レジスタ 26,27……アンドゲート 28……インバータ 29……Dタイプフリップフロップ(DFF)
FIG. 1 is a block diagram of an embodiment of the first invention of the present application, and FIG.
FIG. 3 is a connection diagram of the control circuit of the embodiment, FIG. 3 is a timing chart showing the operation of the control circuit, and FIG.
FIG. 5 is a connection diagram of the control circuit of the embodiment, FIG. 6 is a timing chart showing the operation of the control circuit, and FIG. 7 is a timing chart showing the operation of the second invention. FIG. 8 is a block diagram of a conventional example. 1 ... Up / down counter control block 2 ... Down counter 5 ... Down count value judgment circuit 11a, 11b ... Control circuit 12 ... Synchronization latch 13 ... Register 26,27 ... And gate 28 ... Inverter 29 ...... D-type flip-flop (DFF)

Claims (2)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】つぎのa,b,c,d,eの構成要素を備えている
ことを特徴とするPWM制御装置。 a.PWM出力のパルスの周期を決定するアップダウンカウ
ンタを有するアップダウンコントロール部。 b.上記アップダウンカウンタのデータをロード信号によ
りロードし、上記PWM出力のオン,オフを決定するダウ
ンカウンタ。 c.CPUの制御のもとに、上記PWM出力にかかる制御データ
を書き込むレジスタ。 d.上記CPUからの上記レジスタのアドレス信号がHから
L又はLからHのタイミングで、上記ワード信号が必ず
H又はLとなるようにする同期手段。 e.上記CPUが上記レジスタのアドレス信号を選択してい
るとき、該レジスタから上記アップダウンコントロール
部及び上記ダウンカウンタのダウンカウント値判定部へ
上記制御データを取り出すことを禁止する手段。
1. A PWM control device comprising the following components a, b, c, d, and e. a. An up-down control unit having an up-down counter for determining a cycle of a pulse of a PWM output. b. A down counter that loads the data of the up / down counter with a load signal and determines whether the PWM output is on or off. c. A register for writing control data for the PWM output under the control of the CPU. d. Synchronizing means for ensuring that the word signal always becomes H or L at the timing when the address signal of the register from the CPU changes from H to L or from L to H. e. means for prohibiting taking out of the control data from the register to the up / down control unit and the down count value judgment unit of the down counter when the CPU selects the address signal of the register.
【請求項2】つぎのa,b,c,dの構成要素を備えているこ
とを特徴とするPWM制御装置。 a.PWM出力のパルスの周期を決定するアップダウンカウ
ンタを有するアップダウンコントロール部。 b.上記アップダウンカウンタのデータをロード信号によ
りロードし、上記PWM出力のオン,オフを決定するダウ
ンカウンタ。 c.CPUの制御のもとに、上記PWM出力にかかる制御データ
を書き込むレジスタ。 d.上記ロード信号よりわずかに先行するタイミングで、
上記CPUが上記レジスタのアドレス信号を選択している
か否かを判定し、選択していると判定したとき、上記レ
ジスタから上記アップダウンコントロール部及び上記ダ
ウンカウンタのダウンカウント値判定部へ上記制御デー
タを取り出すことを禁止する手段。
2. A PWM control device comprising the following components a, b, c, d. a. An up-down control unit having an up-down counter for determining a cycle of a pulse of a PWM output. b. A down counter that loads the data of the up / down counter with a load signal and determines whether the PWM output is on or off. c. A register for writing control data for the PWM output under the control of the CPU. d. At timing slightly preceding the above load signal,
The CPU determines whether or not the address signal of the register is selected, and when it is determined that the address signal is selected, the control data is transferred from the register to the up / down control unit and the down count value determination unit of the down counter. Means to prohibit taking out.
JP4658189A 1989-03-01 1989-03-01 PWM controller Expired - Fee Related JP2794440B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP4658189A JP2794440B2 (en) 1989-03-01 1989-03-01 PWM controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP4658189A JP2794440B2 (en) 1989-03-01 1989-03-01 PWM controller

Publications (2)

Publication Number Publication Date
JPH02228253A JPH02228253A (en) 1990-09-11
JP2794440B2 true JP2794440B2 (en) 1998-09-03

Family

ID=12751269

Family Applications (1)

Application Number Title Priority Date Filing Date
JP4658189A Expired - Fee Related JP2794440B2 (en) 1989-03-01 1989-03-01 PWM controller

Country Status (1)

Country Link
JP (1) JP2794440B2 (en)

Also Published As

Publication number Publication date
JPH02228253A (en) 1990-09-11

Similar Documents

Publication Publication Date Title
KR100230120B1 (en) Synchronous semiconductor memory
US6421382B1 (en) Pulse width modulation signal generator
JPH0375976A (en) Semiconductor integrated circuit device
JP2550837B2 (en) Scan path test control circuit
US5428765A (en) Method and apparatus for disabling and restarting clocks
JPH11145786A (en) Flip-flop reset circuit
JP2794440B2 (en) PWM controller
US9218030B2 (en) Programming interface and method
JPH1185304A (en) Clock input control circuit
US4741005A (en) Counter circuit having flip-flops for synchronizing carry signals between stages
ITMI991386A1 (en) CIRCUIT FOR THE REALIZATION OF A MINIMUM TIME OF WAKE - UP IN THE LOGICAL CIRCUITS OF WAKE - UP
US6760798B1 (en) Interface mechanism and method for interfacing a real-time clock with a data processing circuit
JP4201375B2 (en) Data transfer device
US6175257B1 (en) Integrated circuit comprising a master circuit working at a first frequency to control slave circuits working at a second frequency
JP2794441B2 (en) PWM controller
JPH031608A (en) Master slave type flip-flop circuit
JP2583441B2 (en) Clock control device and clock switching device
JP3036223B2 (en) Clock transfer circuit
JPS62260418A (en) Flip-flop circuit
JP2903548B2 (en) Logic circuit diagnostic system
JPH04196723A (en) Pwm controller
JPH0338109A (en) Pwm controller
JPH01123329A (en) Interrupting circuit
JPH02280263A (en) Microprocessor
JPH06282359A (en) Configuration control circuit

Legal Events

Date Code Title Description
LAPS Cancellation because of no payment of annual fees