Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JPH087608B2 - Pulse output device - Google Patents
[go: Go Back, main page]

JPH087608B2 - Pulse output device - Google Patents

Pulse output device

Info

Publication number
JPH087608B2
JPH087608B2 JP1030301A JP3030189A JPH087608B2 JP H087608 B2 JPH087608 B2 JP H087608B2 JP 1030301 A JP1030301 A JP 1030301A JP 3030189 A JP3030189 A JP 3030189A JP H087608 B2 JPH087608 B2 JP H087608B2
Authority
JP
Japan
Prior art keywords
processing
output
coincidence
signal
predetermined
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 - Lifetime
Application number
JP1030301A
Other languages
Japanese (ja)
Other versions
JPH02207304A (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.)
NEC Corp
Original Assignee
NEC Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NEC Corp filed Critical NEC Corp
Priority to JP1030301A priority Critical patent/JPH087608B2/en
Publication of JPH02207304A publication Critical patent/JPH02207304A/en
Publication of JPH087608B2 publication Critical patent/JPH087608B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Control Of Ac Motors In General (AREA)

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明はパルス出力装置に関し、特に、マイクロコン
ピュータを用いて、高速にてパルス幅変調信号を出力す
るパルス出力装置に関する。
The present invention relates to a pulse output device, and more particularly to a pulse output device that outputs a pulse width modulation signal at high speed using a microcomputer.

〔従来の技術〕[Conventional technology]

近年、集積回路技術の発達に伴い、CPUのほかにメモ
リ、割込み制御回路、タイマ等の周辺装置などを同一半
導体基板上に備えたマイクロコンピュータが出現してい
る。このマイクロコンピュータを応用した機器は多種多
様であるが、誘導電動機をパルス幅変調(以下、PWMと
略記する)により駆動するインバータも一つの応用例で
ある。
2. Description of the Related Art In recent years, with the development of integrated circuit technology, a microcomputer equipped with a CPU, a memory, an interrupt control circuit, and peripheral devices such as a timer on the same semiconductor substrate has appeared. There are various types of devices to which this microcomputer is applied, but an inverter that drives an induction motor by pulse width modulation (hereinafter abbreviated as PWM) is also one application example.

一般に、誘導電動機は、直流電動機に比較して構造が
簡単であるが、回転数の制御は周波数を変える必要があ
るため制御装置が複雑となり、装置全体として高価であ
ると言われている。しかし、前述のマイクロコンピュー
タの出現により、近年ではPWMによる誘導電動機駆動が
一般的となっている。
Generally, an induction motor has a simpler structure than a DC motor, but it is said that the control device is complicated because the frequency needs to be changed to control the rotation speed, and the entire device is expensive. However, with the advent of the above-mentioned microcomputer, the induction motor drive by PWM has become common in recent years.

第6図は、従来のマイクロコンピュータを用いたパル
ス出力装置を示すブロック図である。第6図に示される
ように、このパルス出力装置は、データバス108に対応
して、汎用レジスタ(以下、REGと略記する)24と、算
術論理演算ユニット(以下、ALUと略記する)25と、プ
ログラムステータスワード(以下、PSWと略記する)26
と、中央処理装置(以下、CPUと略記する)の制御を行
う実行制御ユニット27と、プログラム実行アドレスを保
持するプログラムカウンタ(以下、PCと略記する)28
と、プログラムを格納するリードオンリーメモリ(以
下、ROMと略記する)29と、各種データを格納するラン
ダムアクセスメモリ(以下、RAMと略記する)30と、タ
イマ31と、入出力要求信号を受けて優先順位制御を行う
割込制御ユニット(以下、INTCと略記する)32と、ポー
ト33と、を備えて構成される。
FIG. 6 is a block diagram showing a pulse output device using a conventional microcomputer. As shown in FIG. 6, this pulse output device includes a general-purpose register (hereinafter abbreviated as REG) 24, an arithmetic logic operation unit (hereinafter abbreviated as ALU) 25, corresponding to the data bus 108. , Program status word (abbreviated as PSW) 26
An execution control unit 27 for controlling a central processing unit (hereinafter abbreviated as CPU) and a program counter (hereinafter abbreviated as PC) 28 for holding a program execution address.
A read-only memory (hereinafter abbreviated as ROM) 29 that stores a program, a random access memory (hereinafter abbreviated as RAM) 30 that stores various data, a timer 31, and an input / output request signal An interrupt control unit (hereinafter abbreviated as INTC) 32 for performing priority control and a port 33 are provided.

なお、第7図は、タイマ31のブロック図で、周期信号
Φをカウントするカウンタ34、およびカウンタ34との一
致を検出するコンペアレジスタ35により構成されてい
る。
7. FIG. 7 is a block diagram of the timer 31, which is composed of a counter 34 that counts the periodic signal Φ and a compare register 35 that detects a match with the counter 34.

以下、第5図のPWM信号を示すタイムチャートおよび
第8図のフローチャートを参照し、PWM信号が、P1,P2お
よびP3により形成されて出力される場合について、従来
例の説明を行う。
Hereinafter, with reference to the time chart showing the PWM signal of FIG. 5 and the flowchart of FIG. 8, a conventional example will be described in which the PWM signal is formed and output by P1, P2 and P3.

第7図において、所定の周期信号Φは、カウタ34にお
いて計数され、その出力は、コンペアレジスタ35に送ら
れる。コンペアレジスタ35においては、カウンタ34の出
力との数値比較が行われ、一致した時点(t1)におい
て、一致信号106が出力される。この一致信号106は、カ
ウンタ34に入力されてカウンタ34を初期化するととも
に、入出力要求信号106としてINTC32に送られる。第6
図において、時刻t1において入出力要求信号106が発生
されると、INTC32においては、この入出力要求信号106
を受けて割込要求信号107が生成され、実行制御ユニッ
ト27に送出される。実行制御ユニット27においては、割
込要求信号107の入力を受けて、現時点において実行中
の命令の終了後に、PSW26およびPC28をRAM30に待避させ
る処理が実行され、割込要求信号107に対応するタイマ
割込処理の実行が開始される。
In FIG. 7, the predetermined periodic signal Φ is counted by the counter 34, and its output is sent to the compare register 35. In the compare register 35, a numerical comparison with the output of the counter 34 is performed, and at the time of coincidence (t 1 ), the coincidence signal 106 is output. The coincidence signal 106 is input to the counter 34 to initialize the counter 34 and is also sent to the INTC 32 as the input / output request signal 106. Sixth
In the figure, when the input / output request signal 106 is generated at time t 1 , the INTC32 outputs this input / output request signal 106.
In response to this, an interrupt request signal 107 is generated and sent to the execution control unit 27. In the execution control unit 27, the process of saving the PSW 26 and the PC 28 to the RAM 30 is executed after the input of the interrupt request signal 107 is completed and the instruction currently being executed is completed, and the timer corresponding to the interrupt request signal 107 is executed. The execution of the interrupt process is started.

このタイマ割込処理においては、各種のREG24をRAM30
に待避させた後、ポート33が設定され、復帰までの処理
が実行される。このような処理手段は、時刻t6に至るま
で繰返して実行され、一周期Tに対応する処理が完了さ
れて、所定のPWM信号P1,P2およびP3がポート33より出力
される(第5図参照)。言うまでもなく、時刻をシフト
させることにより、次の周期Tにおいても、同様の手順
によりPWM信号P1,P2およびP3が出力される。
In this timer interrupt processing, various REG24 are
Then, the port 33 is set and the process up to the return is executed. Such processing means are performed repeatedly until the time t 6, is processing corresponding to one period T is completed, a predetermined PWM signals P1, P2 and P3 are output from the port 33 (FIG. 5 reference). Needless to say, by shifting the time, the PWM signals P1, P2 and P3 are output in the same procedure in the next cycle T as well.

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

上述した従来のパルス出力装置においては、割込要求
に要する時間の制約により、出力されるPWM信号の周波
数を高くすることが不可能であるという欠点があり、ま
た、この欠点を解決するために、マイクロコンピュータ
の他に専用LSIを別個に用いてPWM制御を行う場合には、
パルス発生装置自体の価格が高価となり、経済的に見合
わないという欠点がある。
In the above-mentioned conventional pulse output device, there is a drawback that it is impossible to increase the frequency of the PWM signal to be output due to the restriction of the time required for the interrupt request, and in order to solve this drawback. When performing PWM control using a dedicated LSI separately from the microcomputer,
The pulse generator itself has a high price and is economically unfit.

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

本発明のパルス出力装置は、プログラムおよびデータ
を格納するメモリと、所定の周辺装置から発生される処
理要求(1)に基づく処理と所定のプログラムによる処
理とを選択的に実行する中央処理装置と、を含むマイク
ロコンピュータを用いて形成されるパルス出力装置にお
いて、前記処理要求(1)を受けて前記マイクロコンピ
ュータの処理優先順位を制御する割込制御手段と、所定
の周期信号を計数する計数手段と、前記計数手段の出力
と自己の設定値との一致を検出して生成される一致信号
を出力し、この一致信号を以つて前記計数手段を初期化
するとともに、前記処理要求(1)に含まれる所定の処
理要求(2)を前記割込制御手段に送出する比較手段
と、前記計数手段の出力と個々の自己設定値との一致を
検出して生成される一致信号を個別に出力し、それぞれ
においてこの一致信号を介して前記処理要求(1)に含
まれる所定の処理要求(3)を前記割込制御手段に送出
する2K(K:2以上の整数)個の比較手段群と、前記比較
手段群より出力される一致信号のK個の組合せペア出力
によりセットまたはリセットされ、所定のパルス幅変調
信号を出力するK個のフリップフロップと、を含むパル
ス制御手段を備え、且つ、前記マイクロコンピュータ
が、前記処理要求(1)に対応して、前記中央処理装置
における前記プログラムによる処理の実行を中断し、そ
の中断時点における処理情報を他の格納領域に待避させ
ることなく、予め前記メモリに設定されているデータを
前記比較手段群に転送し、各比較手段群に設定されてい
る個々の周期毎に、逐次、複数の前記パルス幅変調信号
を出力させる制御機能を備えて構成される。
A pulse output device of the present invention includes a memory that stores programs and data, a central processing unit that selectively executes a process based on a process request (1) generated from a predetermined peripheral device and a process by a predetermined program. In a pulse output device formed by using a microcomputer including, an interrupt control means for receiving the processing request (1) and controlling the processing priority of the microcomputer, and a counting means for counting a predetermined periodic signal. And outputs a coincidence signal generated by detecting the coincidence between the output of the counting means and its own set value, initializes the counting means with the coincidence signal, and responds to the processing request (1). One generated by detecting the coincidence between the output of the counting means and the individual self-set value, and the comparing means for sending the included predetermined processing request (2) to the interrupt control means. 2K (K: integer of 2 or more) that individually outputs signals and sends a predetermined processing request (3) included in the processing request (1) to the interrupt control means via the coincidence signal. Pulse control means for outputting a predetermined pulse width modulation signal, which is set or reset by the output of K combination pairs of the coincidence signals output from the comparison means group. In addition, the microcomputer suspends the execution of the processing by the program in the central processing unit in response to the processing request (1), and saves the processing information at the interruption time to another storage area. Without transferring the data set in the memory in advance to the comparison means group, and sequentially, for each cycle set in each comparison means group, a plurality of the pulse widths. It is provided with a control function for outputting a modulated signal.

〔実施例〕〔Example〕

次に、本発明について図面を参照して説明する。第1
図は、本発明の一実施例を示すブロック図、第2図およ
び第3図は、それぞれ本実施例に含まれるREG(汎用レ
ジスタ)およびパルス制御ユニットのブロック図であ
る。第1図に示されるように、本実施例は、バスライン
105に対応して、各種データを一時的に格納するREG1
と、加減乗除算・論理演算を実行するALU2と、プログラ
ム実行状態等を保持するPSW3と、中央処理装置の実行を
制御する実行制御ユニット4と、実行制御ユニット4に
包含されて各命令の実行を制御するマイクロプログラム
ROMとそのシーケンサとを含むマイクロプログラムROM/
シーケンサ10と、プログラムの実行アドレスを保持する
PC5と、プログラムおよびデータが格納されるROM6と、
各種のデータを格納するRAM7と、所定のPWM信号を出力
するためのパルス制御ユニット8と、所定の入出力要求
信号を入力として、優先順位判別および割込み処理形態
指定等の処理を行うINTC9と、を備えている。
Next, the present invention will be described with reference to the drawings. First
1 is a block diagram showing an embodiment of the present invention, and FIGS. 2 and 3 are block diagrams of a REG (general-purpose register) and a pulse control unit included in this embodiment, respectively. As shown in FIG. 1, this embodiment uses a bus line.
Corresponding to 105, REG1 that temporarily stores various data
ALU2 that executes addition, subtraction, multiplication, division, and logical operations, PSW3 that holds the program execution state, etc., execution control unit 4 that controls the execution of the central processing unit, and execution of each instruction included in execution control unit 4 Control microprogram
A microprogram ROM including a ROM and its sequencer /
Holds the sequencer 10 and program execution address
PC5, ROM6 where programs and data are stored,
A RAM 7 for storing various data, a pulse control unit 8 for outputting a predetermined PWM signal, an INTC 9 for receiving a predetermined input / output request signal and performing processing such as priority determination and interrupt processing mode designation, Is equipped with.

第1図において、INTC9より出力され、実行制御ユニ
ット4に入力される割込要求信号102が論理“1"の場合
には、実行制御ユニット4に対して割込要求をしている
ことを示しており、また論理“0"の場合には、実行制御
ユニット4に対して割込要求をしていないことを示して
いる。割込要求信号102が論理“1"で、割込処理形態指
定信号103が論理“0"の場合、実行制御ユニット4にお
いては、現在実行中の命令終了後に、プログラムの実行
が一時中断され、PSW3およびPC5の内容が、REG1の内部
に予め設定されているポインタ(図示されない)により
RAM7に待避された後、入出力要求信号101に応じたベク
タアドレスがPC5に設定され、ROM6の内容に基づいて割
込処理プログラムが実行される。
In FIG. 1, when the interrupt request signal 102 output from INTC9 and input to the execution control unit 4 is logic "1", it indicates that the execution control unit 4 is requested to interrupt. Further, when it is logical "0", it indicates that no interrupt request is issued to the execution control unit 4. When the interrupt request signal 102 is a logic "1" and the interrupt processing mode designation signal 103 is a logic "0", the execution control unit 4 suspends the execution of the program after the end of the instruction currently being executed, The contents of PSW3 and PC5 are set by a pointer (not shown) preset inside REG1.
After being saved in the RAM 7, the vector address according to the input / output request signal 101 is set in the PC 5, and the interrupt processing program is executed based on the contents of the ROM 6.

割込処理プログラムの最後において、割込復帰指令に
より、PC5およびPSW3がRAM7から復元され、割込処理に
より中断されていたプログラムの実行が再開される。こ
の割込処理形態を以下ベクタ処理という。また、割込要
求信号102が論理“1"であり、且つ割込処理形態指定信
号103も論理“1"の場合には、現在実行中の命令終了後
にプログラムの実行が一時中断され、PSW3およびPC5の
内容を保持したまま待避処理を実行することなく、入出
力要求に応じて、予め設定されているRAM7上の特定番地
の内容により、入出力要求のあった周辺装置とRAM7との
間でデータ転送が実行され、転送終了後に直ちに中断さ
れていたプログラムの実行が再開される。この割込処理
形態を以下マクロサービスという。
At the end of the interrupt processing program, the PC5 and PSW3 are restored from the RAM7 by the interrupt return command, and the execution of the program suspended by the interrupt processing is restarted. This interrupt processing form is hereinafter referred to as vector processing. If the interrupt request signal 102 is a logic "1" and the interrupt processing mode designation signal 103 is also a logic "1", the execution of the program is suspended after the end of the instruction currently being executed, and PSW3 and In response to an input / output request, the contents of a specific address on RAM7 are preset according to the input / output request without executing the save process while holding the contents of PC5. The data transfer is executed, and immediately after the end of the transfer, the execution of the interrupted program is resumed. This interrupt processing form is hereinafter referred to as macro service.

第2図および第3図は、それぞれパルス制御ユニット
8およびINTC9の構成を示すブロック図であり、前者の
パルス制御ユニット8は、カウンタ11、コンペアレジス
タ12〜18およびSRフリップフロップ19〜21により構成さ
れ、後者のINTC9は、優先順位判別・割込保留制御ユニ
ット22および複数の処理形態指定レジスタ23a〜23gによ
り構成されている。
2 and 3 are block diagrams showing the configurations of the pulse control unit 8 and INTC9, respectively. The former pulse control unit 8 is constituted by a counter 11, compare registers 12-18 and SR flip-flops 19-21. The latter INTC 9 is composed of a priority order determination / interruption hold control unit 22 and a plurality of processing mode designation registers 23a-23g.

第2図において、所定の周期信号Φは、カウンタ11に
おいて計数され、その出力は、コンペアレジスタ12〜18
に送られる。コンペアレジスタ12においては、カウンタ
11の出力との数値比較が行われ、一致した時点におい
て、一致信号101aが出力される。この一致信号101aは、
カウンタ11に入力されてカウンタ11を初期化するととも
に、入出力要求信号101の一つとしてINTC9に送られる。
また、コンペアレジスタ13〜18においても、カウンタ11
との数値比較が行われ、一致時点において、それぞれ一
致信号101b〜101gが出力されて、対応するSRフリップフ
ロップ19〜21に入力されるとともに、これらの一致信号
も、共に入出力要求信号101の一環としてINTC9に送られ
る。
In FIG. 2, the predetermined periodic signal Φ is counted by the counter 11, and its output is the compare registers 12-18.
Sent to In the compare register 12, the counter
Numerical comparison with the output of 11 is performed, and when they match, a match signal 101a is output. This coincidence signal 101a is
It is input to the counter 11 to initialize the counter 11 and is also sent to the INTC 9 as one of the input / output request signals 101.
In addition, the counters 11 are also provided in the compare registers 13 to 18.
Numerical comparison is performed, and at the time of coincidence, coincidence signals 101b to 101g are respectively output and input to the corresponding SR flip-flops 19 to 21, and these coincidence signals are also input / output request signal 101. It is sent to INTC9 as a part.

第3図において、パルス制御ユニット8から送られて
くる複数の入出力要求信号101a〜101gは、優先順位判別
・割込保留制御ユニット22に入力される。優先順位判別
・割込保留制御ユニット22には、前記複数の入出力要求
信号101a〜101gのそれぞれに対応する処理形態指定レジ
スタ23a〜23gから、それぞれ処理形態指定信号にも入力
されており、優先順位ならびに入出力要求保留に関する
制御作用が行われて、割込要求信号102および割込処理
形態信号103が出力され、実行制御ユニット4に送られ
る。
In FIG. 3, a plurality of input / output request signals 101a to 101g sent from the pulse control unit 8 are input to the priority order determination / interruption hold control unit 22. The priority determination / interruption hold control unit 22 is also input to the processing mode designating signals from the processing mode designating registers 23a to 23g corresponding to the plurality of input / output request signals 101a to 101g, respectively. Control operations relating to the order and the input / output request suspension are performed, and the interrupt request signal 102 and the interrupt processing mode signal 103 are output and sent to the execution control unit 4.

第4図は、マクロサービス処理のモードを指定するた
めのマクロサービス・チャンネルの構造を示すアドレス
マップで、アドレスNのマクロサービスモードでデータ
の転送方向、ワード/バイトの区別等が指定され、N+
1番地のチャンネルポインタにより転送データの格納番
地Mが指定される。データがワード指定である場合に
は、図のように、MおよびM+1番地にワードデータが
格納される。マクロサービス・チャンネルは、各入出力
要求に対応して、予め設定すべきRAM7上の番地が決めら
れており、マクロサービス処理を行う入出力要求に対し
ては、これらの番地にマクロサービス・チャンネルが設
定される。
FIG. 4 is an address map showing the structure of the macro service channel for designating the macro service processing mode. In the macro service mode of address N, the data transfer direction, word / byte distinction, etc. are designated, and N +
The storage address M of the transfer data is designated by the channel pointer of the first address. When the data is designated by word, the word data is stored in the addresses M and M + 1 as shown in the figure. The addresses on the RAM7 that should be set in advance are determined for the macro service channels corresponding to each input / output request. For the input / output requests for macro service processing, the macro service channels are set to these addresses. Is set.

次に、PWM信号のタイミングチャートを示す第5図
(a),(b),(c)および(d)を参照して、PWM
信号出力に対する制御作用につき説明する。
Next, referring to FIGS. 5 (a), (b), (c) and (d) showing the timing chart of the PWM signal, the PWM
The control action on the signal output will be described.

第2図において、コンペアレジスタ12には、第5図に
示されるPWM周期Tに対応する値が設定され、コンペア
レジスタ13,14,15,16,17,および18には、それぞれ(t5
−t0),(t2−t0),(t4−t0),(t3−t0),(t6
t0)および(tz−t0)の時間に相当する値が設定され
る。割込処理形態の指定としては、第3図における101a
によりベクタ割込処理が指定され、101b〜101gによりマ
クロサービス処理が指定されて、それぞれRAM7の定めら
れた番地にマクロサービス・チャンネルが設定される。
マクロサービス・チャンネルのワードデータには周期T
で示される次の周期のセット・リセット・タイミングに
相当する値がそれぞれ設定される。
In FIG. 2, a value corresponding to the PWM cycle T shown in FIG. 5 is set in the compare register 12, and the compare registers 13, 14, 15, 16, 17, and 18 are set to (t 5
−t 0 ), (t 2 −t 0 ), (t 4 −t 0 ), (t 3 −t 0 ), (t 6
Values corresponding to the time of t 0 ) and (t z −t 0 ) are set. As the designation of the interrupt processing form, 101a in FIG. 3 is specified.
Specifies the vector interrupt processing, and 101b to 101g specify the macro service processing, and the macro service channel is set to the determined address of the RAM 7, respectively.
Cycle T for word data of macro service channel
A value corresponding to the set / reset timing of the next cycle indicated by is set.

次に、カウンタ11をスタートさせると、時刻t1におい
ては、SRフリップフロップ21がリセットされると同時に
入出力要求信号が発生され、CPUにおいては現在実行中
のプログラムが一時中断されて、PSW3およびPC5を待避
させることなしに、RAM7に設定されている対応するデー
タがコンペアレシスタ18に転送される。この転送が完了
すると、中断されていたプログラムの処理が継続して再
開される。このような動作は、時刻t1〜t6における各時
刻においても、それぞれのコンペアレシスタに対応して
同様に実行されて、周期Tを一周期とするPWM信号P1〜P
3が、SRフリップフロップ19〜21から出力される。第5
図(a)に示されるのは、カウンタ11における周期Tの
信号を示し、第5図(b),(c)および(c)は、そ
れぞれPWM信号P1,P2およびP3を示している。
Next, when the counter 11 is started, at the time t 1 , the SR flip-flop 21 is reset and at the same time an input / output request signal is generated, and the program currently being executed in the CPU is temporarily suspended, and PSW3 and The corresponding data set in the RAM 7 is transferred to the compare resister 18 without saving the PC 5. When this transfer is completed, the processing of the interrupted program continues and resumes. Such an operation is similarly executed at each of the times t 1 to t 6 corresponding to each compare resister, and the PWM signals P 1 to P having the cycle T as one cycle.
3 is output from the SR flip-flops 19 to 21. Fifth
FIG. 5A shows the signal of the cycle T in the counter 11, and FIGS. 5B, 5C and 5C show the PWM signals P1, P2 and P3, respectively.

周期Tの最終時刻t01には、コンペアレジスタ12にお
ける一致信号101aが出力され、カウンタ11が初期化され
るとともに、入出力要求信号も発生されて、ベクタ割込
処理が実行される。このベクタ割込処理においては、次
のPWM信号の周期に必要なセット・リセット・タイミン
グに相当する値が、それぞれのマクロサービス・チャン
ネルのワードデータ格納番地に設定される。
At the final time t 01 of the cycle T, the match signal 101a in the compare register 12 is output, the counter 11 is initialized, the input / output request signal is also generated, and the vector interrupt processing is executed. In this vector interrupt process, the value corresponding to the set / reset timing required for the next PWM signal cycle is set in the word data storage address of each macro service channel.

以上の動作が繰返し実行されることにより、所期のPW
M信号P1,P2およびP3が得られる。従つて、本実施例によ
り明らかなように、マクロサービス処理とパルス制御ユ
ニットとを組合せて使用することにより、PWM信号を変
化させるタイミングがリアルタイムで制御することが可
能となり、PSWおよびPC等における待避処理も不要とな
る。また、マクロサービス・チャンネルのデータ設定処
理がバッファレジスタに代るため、次のPWM信号を事前
に設定することが可能となり、PWM信号の周期が短縮さ
れる。
By repeating the above operation, the desired PW
M signals P1, P2 and P3 are obtained. Therefore, as is apparent from the present embodiment, by using the macro service processing and the pulse control unit in combination, it becomes possible to control the timing of changing the PWM signal in real time, and save in the PSW and PC etc. No processing is required. Further, since the data setting process of the macro service channel replaces the buffer register, the next PWM signal can be set in advance, and the cycle of the PWM signal can be shortened.

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

以上、詳細に説明したように、本発明は、マクロサー
ビス処理とパルス制御処理とを組合せて運用動作させる
ことにより、PWM信号の変化タイミングをリアルタイム
で制御することができるとともに、PSWおよびPC等の待
避処理が不要となるため、入出力処理が高速にて実現さ
れるという効果がある。また、PWM周期が短縮化され
て、PWM信号の周波数を高くすることが容易であるとと
もに、専用LSIを別個に設ける必要がなく、安価で高速
のPWM信号制御ができるという効果がある。
As described above in detail, the present invention, by operating the macro service process and the pulse control process in combination, the change timing of the PWM signal can be controlled in real time, and PSW, PC, etc. Since the save processing is unnecessary, there is an effect that the input / output processing is realized at high speed. In addition, the PWM cycle is shortened, it is easy to increase the frequency of the PWM signal, and it is not necessary to separately provide a dedicated LSI, and inexpensive and high-speed PWM signal control can be performed.

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

第1図は、本発明の一実施例を示すブロック図、第2図
は、前記一実施例に含まれるパルス制御ユニットのブロ
ック図、第3図は、前記一実施例に含まれるINTC(割込
み制御ユニット)のブロック図、第4図は、マクロサー
ビス・チャンネルを示す図、第5図は、PWM信号のタイ
ミングチャートを示す図、第6図は、従来のマイクロコ
ンピュータを用いるパルス出力回路のブロック図、第7
図は、前記従来のパルス出力回路に含まれるタイマのブ
ロック図、第8図は、従来のPWM制御におけるフローチ
ャートを示す図である。 図において、1,24……REG(汎用レジスタ)、2,25……A
LU(算術論理演算ユニット),3,26……PSW(プログラム
ステータスワード)、4,27……実行制御ユニット、5,28
……PC(プログラムカウンタ)、6,29……ROM(リード
オンリーメモリ)、7,30……RAM(ランダムアクセスメ
モリ)、8……パルス制御ユニット、9,32……INTC(割
込み制御ユニット)、10……マイクロプログラムROM/シ
ーケンサ、11,34……カウンタ、12〜18,35……コンペア
レジスタ、19〜21……SRフリップフロップ、22……優先
順位判別・割込保留制御ユニット、23a〜23g……処理形
態指定レジスタ、31……タイマ、33……ポート。
FIG. 1 is a block diagram showing an embodiment of the present invention, FIG. 2 is a block diagram of a pulse control unit included in the one embodiment, and FIG. 3 is an INTC (interruption) included in the one embodiment. Control unit), FIG. 4 is a diagram showing a macro service channel, FIG. 5 is a diagram showing a timing chart of a PWM signal, and FIG. 6 is a block of a pulse output circuit using a conventional microcomputer. Figure, 7th
FIG. 8 is a block diagram of a timer included in the conventional pulse output circuit, and FIG. 8 is a diagram showing a flowchart in conventional PWM control. In the figure, 1,24 …… REG (general-purpose register), 2,25 …… A
LU (arithmetic logic operation unit), 3,26 …… PSW (program status word), 4,27 …… Execution control unit, 5,28
...... PC (program counter), 6,29 …… ROM (read only memory), 7,30 …… RAM (random access memory), 8 …… pulse control unit, 9,32 …… INTC (interrupt control unit) , 10 ... Micro program ROM / sequencer, 11,34 ... Counter, 12-18, 35 ... Compare register, 19-21 ... SR flip-flop, 22 ... Priority determination / interruption hold control unit, 23a ~ 23g …… Processing mode specification register, 31 …… Timer, 33 …… Port.

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】プログラムおよびデータを格納するメモリ
と、所定の周辺装置から発生される処理要求(1)に基
づく処理と所定のプログラムによる処理とを選択的に実
行する中央処理装置と、を含むマイクロコンピュータを
用いて形成されるパルス出力装置において、前記処理要
求(1)を受けて前記マイクロコンピュータの処理優先
順位を制御する割込制御手段と、所定の周期信号を計数
する計数手段と、前記計数手段の出力と自己の設定値と
の一致を検出して生成される一致信号を出力し、この一
致信号を以つて前記計数手段を初期化するとともに、前
記処理要求(1)に含まれる所定の処理要求(2)を前
記割込制御手段に送出する比較手段と、前記計数手段の
出力と個々の自己設定値との一致を検出して生成される
一致信号を個別に出力し、それぞれにおいてこの一致信
号を介して前記処理要求(1)に含まれる所定の処理要
求(3)を前記割込制御手段に送出する2K(K:2以上の
整数)個の比較手段群と、前記比較手段群より出力され
る一致信号のK個の組合せペア出力によりセットまたは
リセットされ、所定のパルス幅変調信号を出力するK個
のフリップフロップと、を含むパルス制御手段を備え、
且つ、前記マイクロコンピュータが、前記処理要求
(1)に対応して、前記中央処理装置における前記プロ
グラムによる処理の実行を中断し、その中断時点におけ
る処理情報を他の格納領域に待避させることなく、予め
前記メモリに設定されているデータを前記比較手段群に
転送し、各比較手段群に設定されている個々の周期毎
に、逐次、複数の前記パルス幅変調信号を出力させる制
御機能を有することを特徴とするパルス出力装置。
1. A central processing unit for storing a program and data, and a central processing unit for selectively executing processing based on a processing request (1) generated from a predetermined peripheral device and processing by a predetermined program. In a pulse output device formed by using a microcomputer, an interrupt control means for receiving the processing request (1) and controlling the processing priority of the microcomputer, a counting means for counting a predetermined periodic signal, and A coincidence signal generated by detecting the coincidence between the output of the counting means and its own set value is output, the counting means is initialized by the coincidence signal, and a predetermined value included in the processing request (1). Of the processing request (2) to the interrupt control means, and the coincidence signal generated by detecting the coincidence between the output of the counting means and each self-set value individually. 2K (K: integer of 2 or more) comparison means groups each of which outputs a predetermined processing request (3) included in the processing request (1) to the interrupt control means via the coincidence signal. And K flip-flops which are set or reset by the K combination pair outputs of the coincidence signals output from the comparison means group and which output a predetermined pulse width modulation signal, and pulse control means.
In addition, the microcomputer interrupts the execution of the processing by the program in the central processing unit in response to the processing request (1) and saves the processing information at the time of the interruption in another storage area, It has a control function of transferring the data set in the memory in advance to the comparison means group and sequentially outputting a plurality of the pulse width modulation signals for each individual cycle set in each comparison means group. Pulse output device characterized by.
JP1030301A 1989-02-08 1989-02-08 Pulse output device Expired - Lifetime JPH087608B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP1030301A JPH087608B2 (en) 1989-02-08 1989-02-08 Pulse output device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP1030301A JPH087608B2 (en) 1989-02-08 1989-02-08 Pulse output device

Publications (2)

Publication Number Publication Date
JPH02207304A JPH02207304A (en) 1990-08-17
JPH087608B2 true JPH087608B2 (en) 1996-01-29

Family

ID=12299927

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1030301A Expired - Lifetime JPH087608B2 (en) 1989-02-08 1989-02-08 Pulse output device

Country Status (1)

Country Link
JP (1) JPH087608B2 (en)

Also Published As

Publication number Publication date
JPH02207304A (en) 1990-08-17

Similar Documents

Publication Publication Date Title
US5608881A (en) Microcomputer system for accessing hierarchical buses
EP0203304B1 (en) Data processor controller
JPS5841538B2 (en) Multiprocessor system instructions
JPH0376496B2 (en)
US20020138156A1 (en) System of connecting multiple processors in cascade
JPS61229133A (en) Emulator for single-chip microcomputer
KR970003321B1 (en) System using microprocessor address lines coprocessor selection within a multi-coprocessor apparatus
US5410721A (en) System and method for incrementing a program counter
US5117387A (en) Microprogrammed timer processor
JPH087608B2 (en) Pulse output device
US5115513A (en) Microprogrammed timer processor
JPS6243734A (en) Microprocessor
EP0335502A2 (en) Microcontroller and associated method
JPS62120542A (en) Information processor
JPH02252047A (en) Microprocessor
JP2591211B2 (en) High-speed interrupt processing device
JPS5942331B2 (en) Prosetsusasouchinoseigiohoshiki
JPS63153634A (en) Data processor
JPS61166631A (en) Microprogram control processor
JPS6230452B2 (en)
JPH0812561B2 (en) Pulse interval measuring device
JPS62147545A (en) Transfer command processing method in information processing equipment
JPS62296236A (en) Interruption processor for microprocessor
JPH0584545B2 (en)
JPH04195316A (en) power saving circuit