JPH05206807A - Multiple signal waveform generator - Google Patents
Multiple signal waveform generatorInfo
- Publication number
- JPH05206807A JPH05206807A JP1043492A JP1043492A JPH05206807A JP H05206807 A JPH05206807 A JP H05206807A JP 1043492 A JP1043492 A JP 1043492A JP 1043492 A JP1043492 A JP 1043492A JP H05206807 A JPH05206807 A JP H05206807A
- Authority
- JP
- Japan
- Prior art keywords
- data
- register
- signal
- output
- cpu
- 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
Links
Landscapes
- Manipulation Of Pulses (AREA)
Abstract
(57)【要約】
【目的】 ソフト処理を簡単化でき、ソフト処理時間を
大幅に短縮できる、複数信号波形の生成装置を提供す
る。
【構成】 本発明装置ではレジスタ2に、複数の加算デ
ータの最小値のサムデータを設定する必要がある。加算
データは、サムデータがレジスタ201,202に、キ
ャリデータがレジスタ203,204に記憶される。レ
ジスタ201と203,202と204は夫々レジスタ
ペアAとBを構成していて、CPU4の一命令によりキ
ャリフラグのセット,リセットができるので、ソフト処
理が簡単化でき、ソフト処理時間が大幅に短縮できる。
(57) [Summary] [Purpose] To provide a multi-signal waveform generation device capable of simplifying software processing and significantly shortening software processing time. [Constitution] In the device of the present invention, it is necessary to set the minimum value sum data of a plurality of addition data in the register 2. Sum data is stored in the registers 201 and 202, and carry data is stored in the registers 203 and 204. The registers 201 and 203 and 202 and 204 respectively form register pairs A and B, and the carry flag can be set and reset by one instruction of the CPU 4, so that the software processing can be simplified and the software processing time can be greatly shortened. it can.
Description
【0001】[0001]
【産業上の利用分野】CPUを用いた、複数のPWM波
形等の信号波形を生成する装置に関するものである。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a device which uses a CPU to generate a plurality of signal waveforms such as PWM waveforms.
【0002】[0002]
【関連の技術】1つのカウンタ,1つのデジタルコンパ
レータ,1つの比較用レジスタを具備し、CPUを用い
た複数のPWM波形を同時に生成する信号波形生成装置
を本発明者は提案している。この提案の一部は特願平3
−129123号として出願されている。これらは公知
の技術ではないので、“関連技術例”として説明する。 (関連技術例1)複数の信号波形の生成の基本は、1個
の信号波形の生成であるので、まず1個の信号波形の生
成について関連技術例1で説明する。Related Art The inventor of the present invention has proposed a signal waveform generation device that includes one counter, one digital comparator, and one comparison register, and uses a CPU to simultaneously generate a plurality of PWM waveforms. Part of this proposal is Japanese Patent Application No. 3
It has been filed as No. 129123. Since these are not known technologies, they will be described as "related technology examples". (Related Technology Example 1) Since the basic of generation of a plurality of signal waveforms is the generation of one signal waveform, the generation of one signal waveform will be described first in Related Technology Example 1.
【0003】図4は関連技術例1である“信号波形生成
装置”のブロック図である。図において、1は自走のn
ビット(一般的にはニブルの整数倍)で構成されたバイ
ナリカウンタ(以下カウンタという)、2はカウンタ1
と同一ビット長(レジスタ長)で構成されたレジスタ
(またはアキュミュレータ)である。5はカウンタ1と
レジスタ2の各対応するLSBからMSBの各ビットご
とにその値を比較し全ビットの値の一致がとれたとき一
致出力“1”を出すディジタルコンパレータである。そ
の一致出力は信号線10に出力され、Tフリップフロッ
プ(以下TFFという)6のT入力端子に供給されてい
る。同時にCPU4の割り込み入力端子に供給されてい
る。3はROM1で、CPU4がデータ及び実行プログ
ラムをアクセス可能な構造となっている。CPU4は、
レジスタ2の出力信号を信号線9で入力できる構造とな
っており、演算出力端子が信号線12を通じてレジスタ
2の信号入力端子に接続している。また、システムクロ
ックが信号線7を通じてカウンタ1およびCPU4のク
ロック信号入力端子に供給され、またディジタルコンパ
レータ5にも同期をとるため供給されている。また、カ
ウンタ1の制御信号入力端子にCPU4の制御信号出力
端子が信号線13を通じて接続している。FIG. 4 is a block diagram of a "signal waveform generating apparatus" which is a first related art example. In the figure, 1 is a self-propelled n
A binary counter (hereafter called a counter) composed of bits (generally an integral multiple of nibbles), 2 is a counter 1
It is a register (or accumulator) configured with the same bit length (register length) as. A digital comparator 5 compares the values of the corresponding LSBs of the counter 1 and the register 2 for each bit of the MSB and outputs a coincidence output "1" when the values of all the bits are coincident. The coincidence output is output to the signal line 10 and is supplied to the T input terminal of a T flip-flop (hereinafter referred to as TFF) 6. At the same time, it is supplied to the interrupt input terminal of the CPU 4. Reference numeral 3 denotes a ROM 1, which has a structure in which the CPU 4 can access the data and the execution program. CPU4
The output signal of the register 2 can be input through the signal line 9, and the operation output terminal is connected to the signal input terminal of the register 2 through the signal line 12. The system clock is also supplied to the clock signal input terminals of the counter 1 and the CPU 4 through the signal line 7, and also to the digital comparator 5 for synchronization. Further, the control signal input terminal of the counter 1 is connected to the control signal output terminal of the CPU 4 through the signal line 13.
【0004】次に図5のフローチャートを参照して動作
について説明する。CPU4がシステム動作可能状態に
なると(S1参照)、ROM1・3からPWMの制御情
報、例えば生成する信号波形のLレベルの期間のデータ
を読み出し(S2)、レジスタ2にセットする(S
3)。そしてCPU4は、信号線13を通じてカウンタ
1にカウント開始信号を送出する(S4)。カウンタ1
は、今例えばバイナリアップカウンタとすれば、信号線
7を通じて入力されるシステムクロックに同期しカウン
トアップし、その各ビットの値がレジスタ2の対応する
各ビット値と全て一致すると、ディジタルコンパレータ
5はその一致を検出し(S6,YES)、信号線10上
に“1”の信号を出力する。今の場合、CPU4はあら
かじめ信号線14を通じクリア信号がTFF6に送りリ
セットしておく。その結果、TFF6の出力信号の論理
状態(以下状態という)が反転し(S7)、出力端子1
1の信号状態が“L”から“H”へ変化する。同時にそ
の信号線10上の“1”の信号が割り込み信号となって
CPU4の割り込み信号入力端子に加えられる。CPU
4はその割り込み信号を検出し(S8)、ROM1・3
から新たに生成する信号の“H”レベルの期間のデータ
をとりだし(S9)、それと信号線9で読み込んだレジ
スタ2上の“L”レベルの期間のデータとの和をとり、
その結果をレジスタ2に再設定する(S10)。その
際、和のキャリデータは切りすてる。続いて、カウンタ
1とレジスタ2の各ビットの値を比較し(S11,S1
2)、各ビットの値が全て一致すると、TFF6の出力
信号を反転させ(S13)、CPU4に割り込みをかけ
(S14)、ROM1・3からつぎの“L”レベルの期
間のデータを読み出し(S15)、それとレジスタ2上
の“H”レベルの期間のデータとの和をとり、レジスタ
2に再設定する(S16)。そして、以上のS5〜S1
6の動作をくり返すことによって出力端子11に希望す
る1個の信号波形を得ることができる。なお、カウンタ
1のビット長は、生成する信号波形の1周期より長い周
期のクロックを生成できる長さのものとする。Next, the operation will be described with reference to the flowchart of FIG. When the CPU 4 is in the system operable state (see S1), PWM control information, for example, data in the L level period of the signal waveform to be generated is read from the ROM 1 and 3 (S2) and set in the register 2 (S).
3). Then, the CPU 4 sends a count start signal to the counter 1 through the signal line 13 (S4). Counter 1
Is a binary up counter, the digital comparator 5 counts up in synchronization with the system clock input through the signal line 7, and when the value of each bit matches all corresponding bit values of the register 2. The coincidence is detected (S6, YES), and the signal "1" is output on the signal line 10. In this case, the CPU 4 sends a clear signal to the TFF 6 through the signal line 14 and resets it in advance. As a result, the logical state of the output signal of the TFF 6 (hereinafter referred to as state) is inverted (S7), and the output terminal 1
The signal state of 1 changes from "L" to "H". At the same time, the signal "1" on the signal line 10 becomes an interrupt signal and is applied to the interrupt signal input terminal of the CPU 4. CPU
4 detects the interrupt signal (S8), and ROM1 / 3
Then, the data in the "H" level period of the newly generated signal is taken out (S9), and the sum of it and the data in the "L" level period on the register 2 read by the signal line 9 are taken,
The result is reset in the register 2 (S10). At that time, the Japanese carry data is cut off. Then, the value of each bit of the counter 1 and the register 2 is compared (S11, S1
2) When all the values of the respective bits match, the output signal of the TFF 6 is inverted (S13), the CPU 4 is interrupted (S14), and the data of the next "L" level period is read from the ROM 1.3 (S15). ), And the sum of it and the data in the "H" level period on the register 2 is taken and reset to the register 2 (S16). And the above S5-S1
By repeating the operation of 6, it is possible to obtain one desired signal waveform at the output terminal 11. The bit length of the counter 1 is such that a clock having a cycle longer than one cycle of the generated signal waveform can be generated.
【0005】(関連技術例2)図6は関連技術例2であ
る“複数信号波形生成装置”のブロック図である。本例
はRAM100,セレクタ101,TFF102,10
3を備え2個の信号波形を生成する点で関連技術例1と
異なっている。(Related Art Example 2) FIG. 6 is a block diagram of a "multi-signal waveform generating apparatus" which is an example 2 of related art. In this example, RAM 100, selector 101, TFF 102, 10
3 is different from the related art example 1 in that two signal waveforms are provided.
【0006】回路動作の同じ部分の説明は省略し異なっ
ている部分について説明する。ディジタルコンパレータ
5の出力線10は、CPU4の入力端子のみならずセレ
クタ101の信号入力端子に接続している。セレクタ1
01の信号セレクト端子は信号線104を通してCPU
4のセレクト信号出力端子に接続している。またセレク
タ101の出力端子の一方は、TFF102のT入力端
子に、他方は、TFF103のT入力端子に接続してい
る。TFF102,103の出力はそれぞれ出力端子1
05,106に供給されている。また、TFF102,
103のリセット端子は信号線14を介してCPU4に
接続されている。RAM100は、CPU4とバスで接
続されており、CPU4が任意のタイミングで読み書き
可能な構造とする。他の回路は図4と同等なので説明を
省略する。Description of the same parts of the circuit operation will be omitted, and different parts will be described. The output line 10 of the digital comparator 5 is connected not only to the input terminal of the CPU 4 but also to the signal input terminal of the selector 101. Selector 1
The signal select terminal 01 is connected to the CPU through the signal line 104.
4 select signal output terminal. One of the output terminals of the selector 101 is connected to the T input terminal of the TFF 102 and the other is connected to the T input terminal of the TFF 103. The outputs of the TFFs 102 and 103 are output terminals 1 respectively.
It is supplied to 05 and 106. In addition, the TFF 102,
The reset terminal of 103 is connected to the CPU 4 via the signal line 14. The RAM 100 is connected to the CPU 4 via a bus and has a structure in which the CPU 4 can read and write at arbitrary timing. Since the other circuits are the same as those in FIG. 4, the description thereof will be omitted.
【0007】次に図7を参照して動作について説明す
る。システムリセット後(S21)、CPU4は、各信
号波形の初期データをROM1・3よりフェッチし、R
AM100にセットする。CPU4はその最小値をとり
出し(S22,S23)(今それをTFF・102の出
力波形データと考える)、レジスタ2にセットする(S
24)。そのタイミングでCPU4は信号線104を用
いセレクタ101をきりかえ、信号線10をTFF10
2のT入力端子に接続するよう動作する(S25)。そ
してカウンタ1のカウントを開始し(S26)、カウン
タ1とレジスタ2の各ビットの値を比較し(S27)、
全ビットの値が一致して、カウンタ1から一致信号が信
号線10に出力されると(S28,YES)、TFF1
02の信号状態は反転し(S29)、同時にその信号が
CPU4に割込み信号として入力される。割込みをCP
U4が検出すると(S30)、レジスタ2のデータを信
号線9を通してCPU4はフェッチし、ROM3中のT
FF102側の次のデータを加えRAM100中にセッ
トする(S31,S32)。そしてCPU4はRAM1
00中の最小値データを選択し(S33,S34)、レ
ジスタ2にセットし(S24)、再び前述のS24〜の
動作を続ける。その場合セレクタ101は常にレジスタ
2に設定した最小値のデータに対応したTFFを選択す
るよう切りかえられている。なお、(S26)のカウン
タ1のカウンタのカウント開始は、動作開始後の1サイ
クル目のみ有効な処理である。Next, the operation will be described with reference to FIG. After the system is reset (S21), the CPU 4 fetches the initial data of each signal waveform from the ROM 1.3,
Set to AM100. The CPU 4 takes out the minimum value (S22, S23) (now consider it as the output waveform data of the TFF 102) and sets it in the register 2 (S).
24). At that timing, the CPU 4 replaces the selector 101 with the signal line 104 and switches the signal line 10 to the TFF 10.
It operates so as to connect to the T input terminal 2 (S25). Then, the counting of the counter 1 is started (S26), the values of the respective bits of the counter 1 and the register 2 are compared (S27),
When the values of all bits match and the match signal is output from the counter 1 to the signal line 10 (S28, YES), TFF1
The signal state of 02 is inverted (S29), and at the same time, the signal is input to the CPU 4 as an interrupt signal. CP interrupt
When U4 detects (S30), CPU4 fetches the data of register 2 through signal line 9,
The next data on the FF 102 side is added and set in the RAM 100 (S31, S32). And CPU4 is RAM1
The minimum value data in 00 is selected (S33, S34), set in the register 2 (S24), and the above-described operations of S24- are continued again. In that case, the selector 101 is always switched so as to select the TFF corresponding to the minimum value data set in the register 2. Note that the counting of the counter of the counter 1 in (S26) is a process that is valid only in the first cycle after the operation starts.
【0008】また、作成しうる信号波形は、常に用意さ
れているカウンタ1で生成できる周期の信号波形とす
る。また、複数の波形同志は同時に出力反転しない関係
を有した信号波形のものに限る。The signal waveform that can be created has a cycle that can be generated by the counter 1 that is always prepared. Further, the plurality of waveforms are limited to those having a signal waveform having a relationship that the outputs are not inverted at the same time.
【0009】なお、複数の信号波形同志で同時に出力反
転する場合に対処するには、次のように構成すればよ
い。基本的動作は前述の通りであるが、RAM100の
データ値で複数個同値となる場合がその場合であり、そ
の場合セレクタ101はその複数個のデータに対応した
TFFのT信号入力端子に全て信号線10の信号が供給
されるような機能をもたせておけば良い。その指示は信
号線104を通じCPU4が実行する。また、S32で
桁上げが生じる場合は、常にその桁上げ情報(キャリデ
ータ)も考慮して最小値を求める必要がある。具体的に
言えば、桁上げ情報をRAM100に持たせそれを含め
最小値を計算すればよい。(レジスタ2へのセットの際
は、桁上げ情報はきりすてサムデータのみとする。)こ
のようにして、1組のカウンタ,レジスタ,ディジタル
コンパレータを用いながら、容易に2個の任意の信号波
形を生成することができる。同様の手法によりn個の任
意の信号波形を生成することができる。Incidentally, in order to cope with the case where a plurality of signal waveforms are simultaneously output inversion, the following configuration may be adopted. The basic operation is as described above, but this is the case where a plurality of data values in the RAM 100 have the same value. In that case, the selector 101 outputs all signals to the T signal input terminals of the TFF corresponding to the plurality of data. It suffices to have a function such that the signal of the line 10 is supplied. The instruction is executed by the CPU 4 through the signal line 104. If a carry occurs in S32, it is necessary to always take the carry information (carry data) into consideration to obtain the minimum value. Specifically, the carry value may be held in the RAM 100 and the minimum value may be calculated including it. (When setting to the register 2, the carry information is only the chisell sum data.) In this way, two arbitrary signals can be easily used while using one set of counter, register and digital comparator. Waveforms can be generated. By the same method, it is possible to generate n arbitrary signal waveforms.
【0010】(関連技術例3)関連技術例3のブロック
図を図8に示す。本例は、基本回路及び動作は関連技術
例2と同様なので省略し異なっている部分について説明
する。(Related Art Example 3) A block diagram of Related Art Example 3 is shown in FIG. In this example, the basic circuit and the operation are similar to those of the related art example 2, and therefore the description will be omitted and only different parts will be described.
【0011】図8においては、当該装置の出力端子10
5,106が信号線107,108を通じてCPU4の
制御信号入力端子、またはROM2・16のアクセス信
号入力端子に接続されている。またROM2・16は、
CPU4より信号線107,108上にアクセス信号が
きたとき、CPU4にそれぞれのアクセス信号に応じた
ROM情報をとりだせる様、アクセス可能なROMとし
て新たに追加されている。In FIG. 8, the output terminal 10 of the device is shown.
5, 106 are connected to the control signal input terminal of the CPU 4 or the access signal input terminal of the ROM 2.16 through the signal lines 107, 108. In addition, ROM2 ・ 16,
When an access signal is received from the CPU 4 on the signal lines 107 and 108, it is newly added as an accessible ROM so that the CPU 4 can take out ROM information corresponding to each access signal.
【0012】次に動作について説明する。本例は、信号
線107,108が“H”のときは、ハード的にCPU
4はROM1・3のデータのみアクセス可能であり、
“L”のときはROM2・16のデータのみアクセス可
能である様動作する。そのため、CPU4が一致出力を
検出すると、CPU4の過去の制御情報をCPU4が記
憶していなくても確実に出力端子が“H”のときはRO
M1・3のそれぞれの出力専用の“L”レベル情報をア
クセスし、また出力端子が“L”のときはROM2・1
6のそれぞれの出力専用の“H”レベル情報をアクセス
する。Next, the operation will be described. In this example, when the signal lines 107 and 108 are “H”, the CPU is hardware-based.
4 can access only the data of ROM1 and 3,
When it is "L", it operates so that only the data in the ROM2, 16 can be accessed. Therefore, when the CPU 4 detects the coincidence output, RO is surely output when the output terminal is "H" even if the CPU 4 does not store the past control information of the CPU 4.
When the output-only "L" level information of each of M1 and 3 is accessed, and when the output terminal is "L", ROM2.1
6 to access the output-only "H" level information.
【0013】なお、イニシャライズのみ、ハード的にC
PU4は、出力端子が“L”であってもROM1・3の
“L”レベル情報がアクセス可能な構造になっているも
のとする。また、CPU4は、出力端子105,106
のレベルの変化の回数を内部でカウントし、そのカウン
ト条件によってROMデータを切りかえることも可能と
なっている。Incidentally, only the initialization is done by a hardware C
It is assumed that the PU 4 has a structure in which the “L” level information of the ROM 1 and 3 can be accessed even when the output terminal is “L”. The CPU 4 also outputs the output terminals 105 and 106.
It is also possible to internally count the number of changes in the level and change the ROM data according to the counting condition.
【0014】本例によれば、プログラム作成が容易とな
り、TFFの誤動作等の悪影響を最小限にくいとめるこ
とができる。According to this example, the program can be easily created, and the adverse effects such as malfunction of the TFF can be minimized.
【0015】(関連技術例4)図9は関連技術例4のブ
ロック図であり、図10はその動作を示すフローチャー
トである。本例は関連技術例3に対して、コンパレータ
17,信号源19−1,19−2、基準電源20が付加
されているように構成されているため、それらの関連技
術例3と異なる部分について説明し、共通な部分の説明
は省略する。コンパレータ17は出力端子が信号線18
を通しCPU4の制御信号入力端子に接続されている。
また、その+信号入力端子は一端がグランドに接地され
た基準電源Vref・20の出力端子に接続され、−信
号入力端子は、信号源Vin・19−1/19−2の信
号出力端子に接続されている。特に17はチョッパ型の
コンパレータで、CPU4が信号源19−1/19−
2,基準電源20を時分割に切り換え可能となってい
る。(Related Art Example 4) FIG. 9 is a block diagram of Related Art Example 4, and FIG. 10 is a flowchart showing its operation. Since this example is configured such that the comparator 17, the signal sources 19-1 and 19-2, and the reference power supply 20 are added to the related art example 3, only parts different from those of the related art example 3 will be described. However, the description of common parts will be omitted. The output terminal of the comparator 17 is the signal line 18
Is connected to the control signal input terminal of the CPU 4 through.
Further, the + signal input terminal is connected to the output terminal of the reference power supply Vref-20 whose one end is grounded, and the-signal input terminal is connected to the signal output terminal of the signal source Vin-19-1 / 19-2. Has been done. In particular, 17 is a chopper type comparator, and the CPU 4 is a signal source 19-1 / 19-
2. The reference power source 20 can be switched in a time division manner.
【0016】次に動作について説明する。動作は、TF
F102,103の出力データ(αという)の読み込み
までは関連技術例3と同じなので省略し、それ以後の手
続について説明する。CPU4は、αデータを読み込ん
だ後信号源19−1の電圧Vinと基準電源20の電圧
Vrefとの比較結果(以下βという)を信号線18を
通じて読み込む(S51)。今出力端子105に出力さ
れる信号(M1とする)をスイッチング電源の制御等の
PWM信号として用いる場合には、CPU4は19−1
をその被制御対象の電源に切り換え、また20をその制
御用基準電圧に制御する。出力端子105に出力される
信号波形の“H”レベルの時間が長くなると、信号源1
9−1の電圧が増加する系とすると、信号源19−1の
電圧Vinが比較基準電源20の電圧Vrefより大と
なると、出力端子105に出力される信号波形の“H”
レベルの時間が短くなり信号源19−1の電圧Vinを
減少させる方向の信号波形が出力端子105に出力され
るということで負帰還による制御をかけることができ
る。Next, the operation will be described. The operation is TF
Since the process up to reading the output data (referred to as α) of F102 and 103 is the same as that of the related art example 3, the description thereof will be omitted, and the procedure thereafter will be described. After reading the α data, the CPU 4 reads the comparison result (hereinafter referred to as β) between the voltage Vin of the signal source 19-1 and the voltage Vref of the reference power source 20 through the signal line 18 (S51). When the signal (M1) output to the output terminal 105 is used as a PWM signal for controlling the switching power supply, the CPU 4 operates 19-1.
Is switched to the power supply to be controlled, and 20 is controlled to the control reference voltage. If the “H” level time of the signal waveform output to the output terminal 105 becomes long, the signal source 1
Assuming that the voltage of 9-1 increases, if the voltage Vin of the signal source 19-1 becomes higher than the voltage Vref of the comparison reference power source 20, "H" of the signal waveform output to the output terminal 105.
Since the level time is shortened and the signal waveform in the direction of decreasing the voltage Vin of the signal source 19-1 is output to the output terminal 105, it is possible to perform control by negative feedback.
【0017】CPU4はその信号線18上の信号βを出
力端子105のデータαの読み込み後読み込み、αが
“L”のとき(S53,YES)で、βが“L”のとき
(S54,YES)には、αでセレクトしたROM2の
中のオン幅データをROM2から読み込み、そのデータ
とレジスタ2のデータを加えたものから1を加えたデー
タをRAM100に書き込む(S55)。αが“L”の
ときにβが“H”のとき(S54,NO)には、αでセ
レクトしたROM2中のオン幅データをCPU4が読み
込み、そのデータとレジスタ2のデータを加えたものか
ら1を減じたデータをRAM100に書き込む(S5
9)。RAM100中の最小値を判定し(S56)、最
小値のキャリデータを除いたサムデータのみをレジスタ
2にセットする。再びカウンタ1の値とレジスタ2の値
の一致判定ルーチンへはいる。αが“H”のときには、
αでセレクトしたROM1のROMデータをCPU4は
読み込み、そのデータとレジスタ2のデータを加えたも
のをRAM100に書き込み(S58)、RAM100
中の最小値を判定する。The CPU 4 reads the signal β on the signal line 18 after reading the data α of the output terminal 105, and when α is "L" (S53, YES), when β is "L" (S54, YES). ), The on-width data in the ROM 2 selected by α is read from the ROM 2, and the data obtained by adding 1 to the data and the data in the register 2 is written to the RAM 100 (S55). When α is “L” and β is “H” (S54, NO), the CPU 4 reads the ON width data in the ROM 2 selected by α and adds the data and the data of the register 2 from the data. The data obtained by subtracting 1 is written in the RAM 100 (S5
9). The minimum value in the RAM 100 is determined (S56), and only the sum data excluding the carry data having the minimum value is set in the register 2. The routine again enters the coincidence determination routine for the value of the counter 1 and the value of the register 2. When α is “H”,
The CPU 4 reads the ROM data of the ROM 1 selected by α, and the sum of the data and the data of the register 2 is written to the RAM 100 (S58).
Determine the minimum value of
【0018】なお、CPU4は、信号源19−1を信号
源19−2に、また基準電源20の電圧Vrefの値を
変更することによってTFF103に対する制御も同様
に実行することが可能である。また、3信号波形以上に
対しても同様の手法で拡張可能である。なお、S45の
カウンタスタートは、動作開始直後1サイクル目のみに
有効な処理である。The CPU 4 can also control the TFF 103 in the same manner by changing the signal source 19-1 to the signal source 19-2 and changing the value of the voltage Vref of the reference power source 20. Further, the same method can be applied to the extension of three or more signal waveforms. The counter start in S45 is a process that is effective only in the first cycle immediately after the start of operation.
【0019】前述のよう動作することから、a.当該装
置を用いて容易にオフ幅一定等の複数のPWM制御回路
をくむことが可能となる。(周波数一定の複数のPWM
制御回路も同様の手法で容易に可能な事はもちろんであ
る。)b.制御にソフト的判定を用いているため、制御
に問題が生じたときは容易に制御方法を変更し対処が可
能となるというメリットが生じる。Since it operates as described above, a. By using the device, it is possible to easily include a plurality of PWM control circuits having a constant off width. (Multiple PWM with constant frequency
It goes without saying that the control circuit can be easily made by the same method. ) B. Since the soft judgment is used for the control, there is a merit that when a problem occurs in the control, the control method can be easily changed to deal with the problem.
【0020】具体的には、ループの安定性,リップル含
有率を減少させるため、αが“L”のとき、ROM2の
データとレジスタ2のデータとの和からの増減量を1以
外の値に変更することも容易である。Specifically, in order to reduce the loop stability and the ripple content, when α is “L”, the amount of increase / decrease from the sum of the data in ROM 2 and the data in register 2 is set to a value other than 1. It is easy to change.
【0021】(関連技術例5)図11は関連技術例5の
ブロック図であり、図12はその動作を示すフローチャ
ートである。本例は、関連技術例4に対し、カウンタ2
1が加わったものである。基本は関連技術例3であるの
で、共通な部分の説明は省略し、異なる部分について説
明する。なお、今の場合、カウンタ21がTFF102
の出力をカウントする場合について説明するが、CPU
4は容易に信号線22を用いて、TFF103の出力を
カウントするように切り換えることも可能である。カウ
ンタ21は出力端子105の出力信号を信号線107を
通じてそのクロツク入力端子に入力されるよう構成され
ている。(Related Art Example 5) FIG. 11 is a block diagram of Related Art Example 5, and FIG. 12 is a flow chart showing its operation. In this example, the counter 2 is different from the related technology example 4.
1 is added. Since the basic is related art example 3, description of common parts will be omitted and different parts will be described. In the present case, the counter 21 has the TFF 102.
The case of counting the output of the
4 can be easily switched by using the signal line 22 to count the output of the TFF 103. The counter 21 is configured to input the output signal of the output terminal 105 to its clock input terminal through the signal line 107.
【0022】また、そのカウント状況(以下γという)
をCPU4は信号線23を通じて読みとることができる
よう構成されている。同時に信号線108もカウンタ2
1の信号入力端子に接続されており、CPU4の命令で
読み取り可能となっている。同時にCPU4はカウンタ
21を信号線22を通じて任意の初期状態に設定可能で
ある。The counting status (hereinafter referred to as γ)
The CPU 4 is configured so that it can be read through the signal line 23. At the same time, the signal line 108 is also the counter 2
It is connected to the signal input terminal 1 and can be read by a command from the CPU 4. At the same time, the CPU 4 can set the counter 21 to an arbitrary initial state through the signal line 22.
【0023】次に動作について説明する。CPU4はイ
ニシャル時、信号線22を通じカウンタ21に必要な制
御情報、例えばカウンタ21をアップカウンタまたはダ
ウンカウンタにするか等を書き込む。カウンタ21は出
力端子105に出力されるデータが立ち下がるごとにア
ップまたはダウンカウントするよう動作する。CPU4
はその制御情報をもとに、ROM1・3またはROM2
・16のデータとレジスタ2のデータの和にさらに加減
する値の量を自由に設定可能となっている。Next, the operation will be described. At the time of initialization, the CPU 4 writes necessary control information to the counter 21 through the signal line 22, for example, whether the counter 21 is an up counter or a down counter. The counter 21 operates to count up or down each time the data output to the output terminal 105 falls. CPU4
Based on the control information, ROM1 / 3 or ROM2
The amount of value to be added or subtracted to the sum of the data of 16 and the data of register 2 can be freely set.
【0024】[0024]
【発明が解決しようとする課題】前述のように、関連技
術例においては、PWM波形を生成するためのデータの
演算をすべてCPUのALU(Arithmetic and Logic Un
it)に基本的に具備された演算機能を用いてソフトによ
る処理を行っているため次のような問題がある。 a.加算演算において、キャリが生じると、大小比較の
ためにその情報を保存する必要がある。As described above, in the related art example, all arithmetic operations of data for generating the PWM waveform are performed by the CPU's ALU (Arithmetic and Logic Un).
There is the following problem because the processing is performed by software using the arithmetic function that is basically included in it). a. When a carry occurs in the addition operation, it is necessary to save the information for size comparison.
【0025】b.キャリが生じたときの大小演算が非常
に煩雑となり、ソフトのステップが増加する。B. The size calculation when a carry occurs becomes very complicated, and the number of software steps increases.
【0026】c.前記b等から、演算中に割り込みが生
じその次のタイミングの演算結果が要求されたときに、
その演算結果が用意できぬような場合が、生成する波形
によっては生じる。C. When an interrupt occurs during calculation from the above b or the like and a calculation result at the next timing is requested,
In some cases, the calculation result cannot be prepared depending on the generated waveform.
【0027】本発明は、このような事情に鑑みてなされ
たもので、ソフト処理を簡単化でき、ソフト処理時間を
大幅に短縮できる複数信号波形生成装置を提供すること
を目的とするものである。The present invention has been made in view of the above circumstances, and an object of the present invention is to provide a multi-signal waveform generating apparatus capable of simplifying the soft processing and greatly shortening the soft processing time. ..
【0028】[0028]
【課題を解決するための手段】本発明では、前記目的を
達成するため、信号波形生成装置を次の(1),(2)
のとおりに構成する。According to the present invention, in order to achieve the above-mentioned object, a signal waveform generator is provided with the following (1) and (2).
Configure as follows.
【0029】(1) 次のa〜hに示す構成要素を備え
た複数信号波形生成装置。 a.所定のクロックパルスをカウントするカウンタ。 b.当該装置の複数出力信号のうちの一つの出力信号に
かかるデータを設定するレジスタ。 c.前記カウンタと前記レジスタを比較し、一致出力を
出すコンパレータ。 d.前記コンパレータが一致出力を出す毎に、当該装置
の複数出力信号のうち前記レジスタに設定したデータに
かかる出力信号の新たな所要データと、前記レジスタに
設定されているデータとを加算する加算器。 e.前記加算器の出力であるサムデータとキャリデータ
の対を個々に記憶する複数の記憶手段。 f.前記複数の記憶手段に記憶されている、複数のサム
データとキャリデータの対から最小値を判定する判定手
段。 g.前記コンパレータが一致出力を出す毎に、前記判定
手段で判定した最小値にかかるサムデータを前記レジス
タに設定する設定手段。 h.当該装置の複数出力信号のうち、前記レジスタに設
定されているデータにかかる出力信号の状態を、前記コ
ンパレータが一致出力を出す毎に反転する出力反転手
段。(1) A multi-signal waveform generator having the following components a to h. a. A counter that counts predetermined clock pulses. b. A register for setting data relating to one output signal of a plurality of output signals of the device. c. A comparator that compares the counter and the register and outputs a coincidence output. d. An adder that adds new required data of the output signal related to the data set in the register among the plurality of output signals of the device and the data set in the register every time the comparator outputs a coincidence output. e. A plurality of storage means for individually storing a pair of sum data and carry data which is the output of the adder. f. Judging means for judging the minimum value from a plurality of pairs of sum data and carry data stored in the plurality of storage means. g. Setting means for setting, in the register, sum data concerning the minimum value determined by the determining means each time the comparator outputs a coincidence output. h. Output inverting means for inverting the state of the output signal relating to the data set in the register among the plurality of output signals of the device each time the comparator outputs a coincidence output.
【0030】(2)複数の記憶手段に全てキャリデータ
が有ることを検出して、この全てのキャリデータを消去
するリセット回路を備えた前記(1)記載の複数信号波
形生成装置。(2) The multiple signal waveform generator according to (1), further comprising a reset circuit for detecting that all of the carry data are stored in the plurality of storage means and erasing all of the carry data.
【0031】[0031]
【作用】前記(1),(2)の構成により、加算データ
は、サムデータとキャリデータの対で記憶されるので、
最小値はソフトにより簡単に判定できる。 (2)の構成では、更に、複数の記憶手段に全てキャリ
データが有るとき、このキャリデータはリセット回路で
消去されるので、ソフトによる処理が簡単になる。With the configurations (1) and (2), the addition data is stored as a pair of sum data and carry data.
The minimum value can be easily determined by software. In the configuration of (2), further, when the carry data is stored in all of the plurality of storage means, the carry data is erased by the reset circuit, so that the process by software becomes simple.
【0032】[0032]
【実施例】以下本発明を実施例により詳しく説明する。 (実施例1)図1は実施例1である“複数信号波形生成
装置”のブロック図である。本実施例は、説明を簡単に
するため、2個の信号波形生成の例としているが、3個
以上の信号波形生成は本実施例を拡張し容易に実施でき
る。EXAMPLES The present invention will be described in detail below with reference to examples. (Embodiment 1) FIG. 1 is a block diagram of a "plurality of signal waveform generators" according to Embodiment 1. In FIG. In the present embodiment, for simplification of description, an example of generating two signal waveforms is described, but generation of three or more signal waveforms can be easily implemented by expanding the present embodiment.
【0033】本実施例における基本的な構成,動作は、
前述の関連技術例と同様なので、省略し、ここでは演算
時に用いるレジスタ周辺、および大小比較に関する処理
を主にして説明する。The basic structure and operation of this embodiment are as follows.
Since it is the same as the related art example described above, the description thereof is omitted, and here, the description will be focused on the periphery of the register used in the calculation and the processing relating to the magnitude comparison.
【0034】図1に示すように、関連技術例の構成に、
更に、加算データを記憶する専用のレジスタA,Bが追
加されている。レジスタAはレジスタ201と203か
ら構成され、レジスタBはレジスタ202,204から
構成されている。レジスタ201,202は、加算デー
タからキャリデータを除いた、サムデータを記憶するレ
ジスタであり、レジスタ203,204は加算データの
うちキャリデータを記憶するレジスタである。レジスタ
A,Bの類のレジスタを以下“レジスタペア”という。
205はバスラインで、CPU4のI/Oポートとレジ
スタ201〜204のI/O端子とを接続している。C
PU4はこのバスライン205を通じて、加算結果のサ
ムデータ,キャリデータを転送する構造となっている。As shown in FIG. 1, in the configuration of the related art example,
Further, dedicated registers A and B for storing addition data are added. The register A is composed of registers 201 and 203, and the register B is composed of registers 202 and 204. The registers 201 and 202 are registers that store sum data obtained by removing carry data from addition data, and the registers 203 and 204 are registers that store carry data of addition data. Registers A and B are hereinafter referred to as "register pairs".
A bus line 205 connects the I / O port of the CPU 4 and the I / O terminals of the registers 201 to 204. C
The PU 4 has a structure for transferring the sum data and the carry data of the addition result through the bus line 205.
【0035】206,207は、それぞれレジスタペア
A,Bの選択及び制御用信号線である。208はレジス
タ201,202のデータ読み取り用バスである。また
209はキャリフラグ用のデータバスで、異なるレジス
タ203,204上のキャリデータを1命令で読み出す
ためのデータバスである。Reference numerals 206 and 207 are signal lines for selecting and controlling the register pairs A and B, respectively. Reference numeral 208 denotes a data reading bus for the registers 201 and 202. A carry flag data bus 209 is a data bus for reading carry data on different registers 203 and 204 with one instruction.
【0036】次に動作について説明する。CPU4のA
LU部215は、専用レジスタ用転送命令を持ち、CP
U4がその命令を実行するときには、通常の転送命令で
は開かぬゲートも開くためアキュミュレータ2の情報の
みならず演算結果生成されるキャリ情報を保存するキャ
リーフラグレジスタの出力も同時にバス205上に転送
される。そのデータがレジスタペアAの情報の場合に
は、バス205上のデータが、信号線206上への制御
信号によってレジスタ201及びレジスタ203に転送
され、そのデータがレジスタペアBの情報の場合には、
バス205上のデータが、信号線207上への制御信号
によってレジスタ202およびレジスタ204に転送さ
れる。次にCPU4がそれらのデータを読み出す場合に
ついて説明する。読み出し時は、レジスタ201,20
2の情報は、バスライン208よりCPU4は読み出
し、レジスタ203,204の情報はバスライン209
より、キャリ情報読み出し命令で読み出せるようになっ
ている。またALU部215は、キャリフラグ制御専用
命令を有し、この命令で、CPU4はバスライン20
5、信号線206,207を通じて任意にキャリフラグ
の設定を1命令で実行可能である。Next, the operation will be described. CPU4 A
The LU unit 215 has a transfer instruction for a dedicated register, and has a CP
When U4 executes the instruction, the gate that is not opened by a normal transfer instruction is opened, so that not only the information of the accumulator 2 but also the output of the carry flag register that stores the carry information generated as the operation result is transferred to the bus 205 at the same time. To be done. When the data is the information of the register pair A, the data on the bus 205 is transferred to the registers 201 and 203 by the control signal on the signal line 206, and when the data is the information of the register pair B, ,
The data on the bus 205 is transferred to the register 202 and the register 204 by the control signal on the signal line 207. Next, a case where the CPU 4 reads out those data will be described. At the time of reading, the registers 201 and 20
The information of 2 is read by the CPU 4 from the bus line 208, and the information of the registers 203 and 204 is the bus line 209.
Therefore, it can be read by a carry information read command. Further, the ALU unit 215 has a carry flag control-dedicated command, and the CPU 4 uses this command to control the bus line 20.
5. The carry flag can be arbitrarily set by one instruction through the signal lines 206 and 207.
【0037】実際の動作は以下の通りである。CPU4
は、関連技術例でRAM100を一時記憶領域としてい
たものをレジスタ201〜204におきかえHデータ、
Lデータの和演算を実行してゆき、信号線10に割り込
み信号が出力されるその都度、キャリデータを含めたレ
ジスタペアA,Bの値の大小を判定し、その小のサムデ
ータをレジスタ2にセットしPWM波形を生成する。The actual operation is as follows. CPU4
Replaces what was used as the temporary storage area of the RAM 100 in the related art example with the registers 201 to 204, and H data,
The sum operation of L data is executed, and each time an interrupt signal is output to the signal line 10, the size of the value of the register pair A and B including the carry data is judged, and the small sum data is registered in the register 2 To generate a PWM waveform.
【0038】関連技術例の手法では、キャリレジスタが
演算器に付随し通常1個のためキャリ情報は和演算時に
生じるキャリフラグを、その都度キャリレジスタから取
り出し、RAM等のメモリ上に写し代えて保存して置く
必要があった。In the technique of the related art example, since the carry register is attached to the arithmetic unit and normally one, the carry information generated during the sum operation is taken out from the carry register each time, and copied to the memory such as RAM. I had to save and put it.
【0039】それに対して本実施例では、レジスタ(A
CC)2上の和演算結果のデータとレジスタ2上での演
算の結果生じるキャリフラグ情報は、同時に、201と
203、または、202と204のレジスタぺアのどち
らかのペアに一度に保存する命令を用意しており、一命
令で保存可能である。On the other hand, in this embodiment, the register (A
CC) 2 and the carry flag information generated as a result of the operation on the register 2 are simultaneously stored in one of the pair of register pairs 201 and 203 or 202 and 204 at a time. Instructions are prepared and can be saved with one instruction.
【0040】また、大小比較の際、CPU4は、キャリ
フラグ参照命令の1命令で、信号バス209を通じてフ
ラグの状態を判定することが可能である。Further, when comparing the sizes, the CPU 4 can judge the state of the flag through the signal bus 209 with one instruction of the carry flag reference instruction.
【0041】この様な命令及びハード構成を用いれば、
最小値のデータを抽出するのは、関連技術例に比較して
非常に容易となる。With such an instruction and hardware configuration,
Extracting the minimum value data is much easier than the related art example.
【0042】この大小比較の具体的な動作を記述する
と、以下の様になる。CPU4は、キャリフラグ判定を
行い、フラグの立っているものとそうでないものが混ざ
っているときには、フラグの立っていないレジスタペア
の値のみの相互の比較を行い、その内の最小のものが次
のレジスタ2の設定データとなる。フラグが全部“0”
または“1”のときには、全てのレジスタペアのデータ
相互の比較を行い、その最小値のサムデータが次のレジ
スタ2の設定のデータとなる。関連技術例と本実施例は
共に図2に示す制御手順で実行可能であるが、具体的な
手法が異なる。The specific operation of this size comparison will be described below. The CPU 4 determines the carry flag, and when the flagged and non-flagged flags are mixed, only the values of register pairs that are not flagged are compared with each other. It becomes the setting data of the register 2 of. All flags are "0"
Alternatively, when the value is "1", the data of all the register pairs are compared with each other, and the minimum sum data becomes the data for the setting of the next register 2. Both the related technology example and this embodiment can be executed by the control procedure shown in FIG. 2, but the specific method is different.
【0043】すなわち、S102のステップは、本実施
例では、キャリ情報読み出し命令の1命令で情報を読み
出し、更にデータコンペア命令で判定可能である。この
操作は生成するPWM波形が増えても、命令数が増える
心配はない。これに対し関連技術例では、出力信号波形
の数×(セーブ+フェッチ)回のCPU動作が必要であ
る。同様に本実施例ではS102でもS101と同じ命
令で実行可能である。S102の結果、S106に進ん
だ時、CPU4はキャリフラグ制御専用命令の1命令で
全キャリフラグをリセット可能である。That is, in the step S102, in the present embodiment, the information can be read by one instruction of the carry information read instruction, and can be determined by the data compare instruction. In this operation, there is no concern that the number of instructions will increase even if the number of PWM waveforms generated increases. On the other hand, in the related art example, the number of output signal waveforms × (save + fetch) times of CPU operation is required. Similarly, in this embodiment, the same instruction as in S101 can be executed in S102. As a result of S102, when the process proceeds to S106, the CPU 4 can reset all carry flags with one instruction of the carry flag control dedicated instruction.
【0044】S103,S104,S105は関連技術
例と同じ手続きで処理される。このように本実施例によ
れば、関連技術例に比べてキャリフラグ処理がコマンド
で容易に実行可能となっているので、プログラムの作成
が容易となり、ステップ数も短くなり、かつ実行時間も
早くなるメリットがある。その結果、より高周波のPW
M波形を生成できるメリットが生じる。S103, S104, and S105 are processed by the same procedure as the related art example. As described above, according to the present embodiment, since the carry flag processing can be easily executed by the command as compared with the related art example, the program can be easily created, the number of steps can be shortened, and the execution time can be shortened. There is an advantage. As a result, higher frequency PW
There is a merit that an M waveform can be generated.
【0045】(実施例2)本実施例は実施例1に対し
て、図2のS106のキャリフラグリセットをハード回
路で実現した例であり、そのリセット回路を図2に示
す。その他の部分は実施例1と同様であるので省略し、
異なっているハード部分を説明する。実施例1に301
から305のロジック回路が追加になっているので先
ず、この回路の接続について説明する。(Embodiment 2) This embodiment is an example in which the carry flag reset of S106 of FIG. 2 is realized by a hardware circuit in contrast to the embodiment 1, and the reset circuit is shown in FIG. The other parts are similar to those of the first embodiment, and therefore omitted.
Explain the different hard parts. 301 in Example 1
Since the logic circuits No. to 305 are added, the connection of this circuit will be described first.
【0046】図3において301は2入力ノアゲート
で、一方の入力端子が信号線206に他方の入力端子が
信号線207線に接続され、その出力端子は、303,
304の3入力及び2入力ノアゲートで構成されるRS
フリップフロップ(以下FFという)のリセット入力端
子に接続されている。そのFFのSET信号入力端子の
−端子は302の2入力アンドゲートの出力端子に接続
されている。また他の−端子は14の信号線に接続して
いる。2入力アンドゲート302の入力端子の一方は、
レジスタ(Dタイプフリップフロップ)203のQ出力
端子に接続され、他端はレジスタ(Dタイプフリップフ
ロップ)204のQ出力端子に接続されている。3入力
ノアゲート303の出力端子は、305のインバータの
入力端子に接続され、そのインバータ305の出力端子
がレジスタ203,204のリセット端子に接続されて
いる。In FIG. 3, 301 is a two-input NOR gate, one input terminal of which is connected to the signal line 206 and the other input terminal of which is connected to the signal line 207, the output terminals of which are 303,
RS composed of 3-input and 2-input NOR gate 304
It is connected to a reset input terminal of a flip-flop (hereinafter referred to as FF). The-terminal of the SET signal input terminal of the FF is connected to the output terminal of the 2-input AND gate 302. The other-terminal is connected to 14 signal lines. One of the input terminals of the 2-input AND gate 302 is
It is connected to the Q output terminal of the register (D type flip-flop) 203, and the other end is connected to the Q output terminal of the register (D type flip-flop) 204. The output terminal of the 3-input NOR gate 303 is connected to the input terminal of the inverter 305, and the output terminal of the inverter 305 is connected to the reset terminals of the registers 203 and 204.
【0047】次にその動作について説明する。信号線1
4にリセット信号があらかじめ送出され、203,20
4があらかじめリセットされている条件を考える。Next, the operation will be described. Signal line 1
4, a reset signal is sent in advance, 203, 20
Consider the condition that 4 is reset beforehand.
【0048】通常、信号線205−1,205−2上の
フラグ情報が、それぞれ信号線206,207上のセッ
ト信号に同期してそれぞれレジスタ203,204にセ
ットされる。FFは、レジスタ203,204の出力が
共にセットされると、アンドゲート302の出力が
“1”となりセットされ、その情報がインバータ305
を通じてレジスタ203,204のリセット端子に出力
されそのフラグ出力は共にリセットされる。またFF
は、レジスタ203,204のデータセット信号が、フ
ラグの設定が終了し“L”レベルになると、ノアゲート
301の出力信号によってリセットされ、レジスタ20
3,204のフラグを再設定可能な状態になる。なお、
レジスタ203,204のフラグがリセットされるの
は、レジスタ203,204のフラグが共にセットされ
た時または、14の信号線上にリセット信号が送出され
たときのみである。Normally, the flag information on the signal lines 205-1 and 205-2 are set in the registers 203 and 204, respectively, in synchronization with the set signals on the signal lines 206 and 207, respectively. When the outputs of the registers 203 and 204 are both set in the FF, the output of the AND gate 302 is set to "1", and the information is set to the inverter 305.
Through the reset terminals of the registers 203 and 204, and the flag outputs thereof are reset together. Also FF
Is reset by the output signal of the NOR gate 301 when the data set signals of the registers 203 and 204 are set to the “L” level after the flag setting is completed,
The state of 3,204 flags can be reset. In addition,
The flags of the registers 203 and 204 are reset only when the flags of the registers 203 and 204 are both set or when the reset signal is sent out on the 14 signal line.
【0049】この様に、本実施例によれば全てのキャリ
フラグが立った時、フラグの状態判定と、フラグのリセ
ットをソフトでする必要がなくなり、より高周波の任意
パルスをソフトで生成可能となる。As described above, according to the present embodiment, when all the carry flags are set, it is not necessary to determine the state of the flag and reset the flag by software, and a higher frequency arbitrary pulse can be generated by software. Become.
【0050】[0050]
【発明の効果】以上説明したように、本発明によれば、
加算データをサムデータとキャリデータの対で個々に記
憶する複数の記憶手段(レジスタペア)を用いているの
で、キャリフラグのセット,リセットのソフト処理が簡
単化でき、また、請求項2の発明では、更にキャリフラ
グの状態判定と、そのリセットがハードで行われるの
で、ソフト処理が簡単になる。As described above, according to the present invention,
Since a plurality of storage means (register pairs) for individually storing the added data in pairs of sum data and carry data are used, software processing for setting and resetting the carry flag can be simplified, and the invention of claim 2 Then, the carry flag state determination and its resetting are performed by hardware, so that the software processing is simplified.
【0051】このためソフト処理時間が大幅に短縮で
き、より高周波の信号波形を生成することができる。Therefore, the soft processing time can be greatly shortened and a higher frequency signal waveform can be generated.
【図1】 実施例1のブロック図FIG. 1 is a block diagram of a first embodiment.
【図2】 最小値判定のフローチャートFIG. 2 is a flowchart for determining a minimum value.
【図3】 実施例2のブロック図FIG. 3 is a block diagram of a second embodiment.
【図4】 関連技術例1のブロック図FIG. 4 is a block diagram of Related Art Example 1
【図5】 関連技術例1のフローチャートFIG. 5 is a flowchart of related technology example 1.
【図6】 関連技術例2のブロック図FIG. 6 is a block diagram of Related Art Example 2
【図7】 関連技術例2のフローチャートFIG. 7 is a flowchart of Related Technology Example 2
【図8】 関連技術例3のブロック図FIG. 8 is a block diagram of Related Art Example 3
【図9】 関連技術例4のブロック図FIG. 9 is a block diagram of a related technology example 4.
【図10】 関連技術例4のフローチャートFIG. 10 is a flowchart of Related Technology Example 4.
【図11】 関連技術例5のブロック図FIG. 11 is a block diagram of a related technology example 5.
【図12】 関連技術例5のフローチャートFIG. 12 is a flowchart of Related Art Example 5.
1 カウンタ 2 レジスタ(ACC) 4 CPU 5 ディジタルコンパレータ 101 セレクタ 102,103 TFF (201,203)、(202,204) レジスタ 215 ALU部 1 Counter 2 Register (ACC) 4 CPU 5 Digital Comparator 101 Selector 102, 103 TFF (201, 203), (202, 204) Register 215 ALU Unit
Claims (2)
を特徴とする複数信号波形生成装置。 a.所定のクロックパルスをカウントするカウンタ。 b.当該装置の複数出力信号のうちの一つの出力信号に
かかるデータを設定するレジスタ。 c.前記カウンタと前記レジスタを比較し、一致出力を
出すコンパレータ。 d.前記コンパレータが一致出力を出す毎に、当該装置
の複数出力信号のうち前記レジスタに設定したデータに
かかる出力信号の新たな所要データと、前記レジスタに
設定されているデータとを加算する加算器。 e.前記加算器の出力であるサムデータとキャリデータ
の対を個々に記憶する複数の記憶手段。 f.前記複数の記憶手段に記憶されている、複数のサム
データとキャリデータの対から最小値を判定する判定手
段。 g.前記コンパレータが一致出力を出す毎に、前記判定
手段で判定した最小値にかかるサムデータを前記レジス
タに設定する設定手段。 h.当該装置の複数出力信号のうち、前記レジスタに設
定されているデータにかかる出力信号の状態を、前記コ
ンパレータが一致出力を出す毎に反転する出力反転手
段。1. A multi-signal waveform generation apparatus comprising the following components a to h. a. A counter that counts predetermined clock pulses. b. A register for setting data relating to one output signal of a plurality of output signals of the device. c. A comparator that compares the counter and the register and outputs a coincidence output. d. An adder that adds new required data of the output signal related to the data set in the register among the plurality of output signals of the device and the data set in the register every time the comparator outputs a coincidence output. e. A plurality of storage means for individually storing a pair of sum data and carry data which is the output of the adder. f. Judging means for judging the minimum value from a plurality of pairs of sum data and carry data stored in the plurality of storage means. g. Setting means for setting, in the register, sum data concerning the minimum value determined by the determining means each time the comparator outputs a coincidence output. h. Output inverting means for inverting the state of the output signal relating to the data set in the register among the plurality of output signals of the device each time the comparator outputs a coincidence output.
ることを検出して、この全てのキャリデータを消去する
リセット回路を備えたことを特徴とする請求項1記載の
複数信号波形生成装置。2. The multi-signal waveform generation apparatus according to claim 1, further comprising a reset circuit that detects that all of the carry data is stored in the plurality of storage means and erases all of the carry data.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP1043492A JPH05206807A (en) | 1992-01-24 | 1992-01-24 | Multiple signal waveform generator |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP1043492A JPH05206807A (en) | 1992-01-24 | 1992-01-24 | Multiple signal waveform generator |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JPH05206807A true JPH05206807A (en) | 1993-08-13 |
Family
ID=11750055
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP1043492A Withdrawn JPH05206807A (en) | 1992-01-24 | 1992-01-24 | Multiple signal waveform generator |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPH05206807A (en) |
-
1992
- 1992-01-24 JP JP1043492A patent/JPH05206807A/en not_active Withdrawn
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US6226740B1 (en) | Information processing apparatus and method that uses first and second power supplies for reducing booting time | |
| EP0474963A2 (en) | Computer system having sleep mode function | |
| EP0345819A2 (en) | Overflow correction circuit | |
| US6675305B1 (en) | Power saving in a USB peripheral by providing gated clock signal to CSR block in response to a local interrupt generated when an operation is to be performed | |
| EP0132133B1 (en) | Microcomputer | |
| US6487246B1 (en) | Method and apparatus for programmable pulse width modulated signal generation with period and duty cycle values updated with controlled relative timing | |
| US6421382B1 (en) | Pulse width modulation signal generator | |
| US4667285A (en) | Microcomputer unit | |
| JPH0876874A (en) | Clock control device and clock control method for central processing unit | |
| JPH0844594A (en) | Data processor | |
| US6604194B1 (en) | Program updating method and apparatus for communication terminal system | |
| JP2735838B2 (en) | One-chip microcomputer | |
| JP2000322282A (en) | Microcomputer | |
| JP2003288278A (en) | Microcontroller | |
| JPH076155A (en) | Single chip microcomputer | |
| JP3394888B2 (en) | Logic circuit verification device, logic circuit verification method, and computer-readable recording medium storing logic circuit verification program | |
| US7263623B1 (en) | Microprocessor system | |
| KR100476870B1 (en) | Initializing signal generating circuit for control register | |
| JPS62103583A (en) | Judgement for changing condition of input data | |
| CN119602763A (en) | Interrupt control method, device and equipment | |
| JP3917736B2 (en) | Integrated circuit | |
| JPH06259264A (en) | Clock control circuit | |
| JP2002259139A (en) | Microcomputer, program and recording medium | |
| JPH11272642A (en) | 1-chip microcomputer and start address setting method | |
| APPEL | A 16 BIT TTL MINICOMPUTER FOR TELEPROCESSING. |
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: 19990408 |