JPH0329067A - Microcomputer - Google Patents

Microcomputer

Info

Publication number
JPH0329067A
JPH0329067A JP1164739A JP16473989A JPH0329067A JP H0329067 A JPH0329067 A JP H0329067A JP 1164739 A JP1164739 A JP 1164739A JP 16473989 A JP16473989 A JP 16473989A JP H0329067 A JPH0329067 A JP H0329067A
Authority
JP
Japan
Prior art keywords
peripheral
peripheral circuit
processing unit
circuit
central processing
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.)
Pending
Application number
JP1164739A
Other languages
Japanese (ja)
Inventor
Yukie Kuroda
幸枝 黒田
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.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric 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 Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP1164739A priority Critical patent/JPH0329067A/en
Publication of JPH0329067A publication Critical patent/JPH0329067A/en
Pending legal-status Critical Current

Links

Landscapes

  • Microcomputers (AREA)

Abstract

(57)【要約】本公報は電子出願前の出願データであるた
め要約のデータは記録されません。
(57) [Summary] This bulletin contains application data before electronic filing, so abstract data is not recorded.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は、中央処理装置から設定されるデータに応じて
動作を開始し、この動作を所定回数反復するタイマ回路
,シリアル転送回路等の周辺回路を備えたマイクロコン
ピュータに関する.〔従来の技術〕 第3図は従来のマイクロコンピュータの構成を示すブロ
ック図であって、図中1は中央処理装置(以下、CPU
と省略する)である。CPUIはアドレスバス4及びデ
ータバス5を介して、それぞれがCPUから独立した周
辺回路2に接続され、周辺回路2の関連レジスタ23及
び開始フラグ24にデータを与える. 次に、CPUIか周辺回l?82の反復動作を制御する
動作につき説明する。CPUIが、周辺回路2の動作モ
ードを決定する値を、その関連レジスタ23に設定した
後、開始フラグ24を設定することにより周辺回路2は
動作を開始する。設定された周辺回路2の動作モードが
、一連の動作を反復する動作モードである場合、CPU
Iは周辺回路2の反復回数を監視し、反復回数が所定回
数に到達すると開始フラグ24をクリアして周辺回路の
動作を停止させる. 〔発明が解決しようとする課題〕 従来のマイクロコンピュータは以上のように構威されて
いるので、CPUは、周辺回路の反復同数をカウントし
て終了時期を判定すべく周辺回路の反復動作を監視して
いなければならないため、その間CPUが占有されて他
の演算,データ処理を行えず、データ処理の効率が低い
という問題があった。
[Detailed Description of the Invention] [Field of Industrial Application] The present invention is applicable to peripherals such as timer circuits and serial transfer circuits that start an operation according to data set from a central processing unit and repeat this operation a predetermined number of times. Concerning microcomputers equipped with circuits. [Prior Art] Fig. 3 is a block diagram showing the configuration of a conventional microcomputer, in which 1 is a central processing unit (hereinafter referred to as CPU).
). The CPUI is connected via an address bus 4 and a data bus 5 to peripheral circuits 2, each independent of the CPU, and provides data to the associated registers 23 and start flags 24 of the peripheral circuits 2. Next, CPU or peripherals? The operation for controlling the repetitive operation of 82 will be explained. After the CPUI sets a value that determines the operating mode of the peripheral circuit 2 in its associated register 23, the peripheral circuit 2 starts operating by setting a start flag 24. If the set operating mode of the peripheral circuit 2 is an operating mode that repeats a series of operations, the CPU
I monitors the number of repetitions of the peripheral circuit 2, and when the number of repetitions reaches a predetermined number, clears the start flag 24 and stops the operation of the peripheral circuit. [Problems to be Solved by the Invention] Since conventional microcomputers are configured as described above, the CPU monitors the repetitive operations of the peripheral circuits in order to count the same number of repetitions of the peripheral circuits and determine the end time. During this time, the CPU is occupied and other calculations and data processing cannot be performed, resulting in a problem of low data processing efficiency.

本発明はこのような問題を解決するためになされたもの
であって、周辺回路が動作を開始した後は、周辺回路の
動作の反復回数を中央処理装置の制御から独立してカウ
ントし、同数が所定数に到達した際に、中央処理装置の
制御から独立して周辺回路の動作を停止する手段を設け
ることにより、周辺回路に対する中央処理装置の負荷を
軽減して、より多くの演算,データ処理が行えるマイク
ロコンピュータの提供を目的とする. 〔課題を解決するための手段〕 本発明のマイクロコンピュータは、中央処理装置から周
辺回路の動作開始のデータが設定された後、周辺回路か
ら、その反復動作を終了する都度出力される信号を利用
し、中央処理装置の制御から独立して、周辺回路の動作
の反復回数を酎数する手段と、計数した回数が所定数に
到達した際、周辺制御回路へ信号を出力し、中央処理装
置の制御から独立して周辺回路の反復動作を停止さセる
手段とを備えたことを特徴とする。
The present invention has been made to solve this problem, and after the peripheral circuit starts operating, the number of repetitions of the peripheral circuit's operation is counted independently from the control of the central processing unit, and the number of repetitions of the peripheral circuit is counted independently from the control of the central processing unit. By providing a means to stop the operation of the peripheral circuits independently from the control of the central processing unit when the number reaches a predetermined number, the load on the central processing unit on the peripheral circuits can be reduced and more calculations and data can be processed. The purpose is to provide a microcomputer that can perform processing. [Means for Solving the Problems] The microcomputer of the present invention utilizes a signal output from the peripheral circuit each time the repetitive operation is completed after the central processing unit sets data for starting the operation of the peripheral circuit. and a means for counting the number of repetitions of the operation of the peripheral circuit independently from the control of the central processing unit, and a means for outputting a signal to the peripheral control circuit when the counted number of times reaches a predetermined number, and controlling the central processing unit. The present invention is characterized by comprising means for stopping the repetitive operation of the peripheral circuit independently of the control.

〔作用〕[Effect]

本発明のマイクロコンピュータは、中央処理装置から周
辺回路に対して動作開始のデータが設定されて周辺回路
が動作を開始した後、中央処理装置の制御から独立して
、周辺回路が1回の動作終了の都度出力する信号を計数
し、針数値が所定回数に到達した際、周辺回路へ信号を
出力し、中央処理装置の制御から独立して周辺回路の反
復動作を停止させる。
In the microcomputer of the present invention, after the central processing unit sets operation start data for the peripheral circuit and the peripheral circuit starts operating, the peripheral circuit performs one operation independently from the control of the central processing unit. The signal output each time is counted, and when the needle value reaches a predetermined number of times, a signal is output to the peripheral circuit, and the repetitive operation of the peripheral circuit is stopped independently of the control of the central processing unit.

〔実施例〕〔Example〕

以下、本発明をその実施例を示す図面に基づき詳述する
DESCRIPTION OF THE PREFERRED EMBODIMENTS The present invention will be described in detail below based on drawings showing embodiments thereof.

第1図は本発明に係るマイクロコンピュータの構威を示
すブロンク図であって、図中lはCPUである,CPU
Iはアドレスバス4及びデータバス5を介して、それぞ
れがCPUIから独立したタイマ回路,シリアル転送回
路.アナログ/デジタル(A/D)変換同路等の周辺回
路2及び周辺制御カウンタ3に接続され、周辺回路2の
関連レジスタ23,開始フラグ24及び周辺制御カウン
タ3のカウントレジスタ31にデータを与える.周辺回
路2はl同の動作が終了する都度割込み信号を発生し、
この割込みfB号を信号線6を介して周辺制御カウンタ
3へ出力する.周辺制御カウンタ3は制御fB号を信号
線7を介して周辺回路2の開始フラグ24へ出力する. 以上のようなf1戒のマイクロプロセッサによる周辺回
路の反復動作の制御手順について説明する.CPUIは
、周辺回路2の動作モード,各[選沢フラグ等の値を関
連レジスタ23に設定するとともに、周辺制御カウンタ
3のカウントレジスタ3lに、動作の反復回数nを設定
する.次にCPU1が開始フラグ24を設定すると、周
辺動作2が動作を開始する。
FIG. 1 is a block diagram showing the structure of a microcomputer according to the present invention, in which l is a CPU.
I connect a timer circuit, a serial transfer circuit, . It is connected to the peripheral circuit 2 such as an analog/digital (A/D) conversion circuit and the peripheral control counter 3, and provides data to the related register 23 and start flag 24 of the peripheral circuit 2 and the count register 31 of the peripheral control counter 3. The peripheral circuit 2 generates an interrupt signal every time the same operation is completed,
This interrupt number fB is output to the peripheral control counter 3 via the signal line 6. The peripheral control counter 3 outputs the control fB number to the start flag 24 of the peripheral circuit 2 via the signal line 7. The procedure for controlling the repetitive operations of peripheral circuits by the microprocessor of the f1 precept as described above will be explained. The CPU sets the operation mode of the peripheral circuit 2, the values of each selection flag, etc. in the related register 23, and also sets the number of repetitions n of the operation in the count register 3l of the peripheral control counter 3. Next, when the CPU 1 sets the start flag 24, the peripheral operation 2 starts operating.

周辺回路2は一連の動作、例えば夕・イマ回路における
1回のオーバフロー,シリアル転送回路におけるlデー
タの転送,A/D変換回路における1回のA/D変換等
を終了する都度、割込み要求のパルス信号を発生し、こ
の割込み信号を信号線6を介して周辺制御カウンタ3へ
出力するや周辺制御カウンタ3は与えられる割込み信号
をカウントし、カウント数が当初設定された所定数nに
到達すると、制m(δ号を信号線7を介して周辺回路2
へ出力し、開始フラグ24をクリアする。開始フラグ2
4がクリアされた周辺回路2は動作を終了する。
The peripheral circuit 2 issues an interrupt request each time a series of operations, such as one overflow in the evening/time circuit, one data transfer in the serial transfer circuit, one A/D conversion in the A/D conversion circuit, etc. When a pulse signal is generated and this interrupt signal is output to the peripheral control counter 3 via the signal line 6, the peripheral control counter 3 counts the given interrupt signal, and when the count reaches a predetermined number n that was initially set, , control m(δ) is connected to the peripheral circuit 2 via the signal line 7.
and clears the start flag 24. Start flag 2
The peripheral circuit 2 with 4 cleared ends its operation.

従って、CPUIは周辺回路2に初期設定を行った後、
周辺回路2が反復動作を行っている間にも他の演算,デ
ータ処理をjテえる. また、第2図は、複数の周辺同vPf2.  2.・・
・を1つの周辺制御カウンタ3で制御するマイクロコン
ピュータの要部構威を示すブロック図である.なお、図
中、同一符号は前述の実施例と同一、又は相当部分を示
しており、その説明を省略する.3つの周辺回路2a,
2b,2cは、割込み信号を伝送するfB号線6,6.
6がそれぞれに接続される3つの可動接点及び1つの固
定接点からなるリレーl1を介して周辺制御カウンタ3
に接続される.また周辺制御カウンタ3は、制御信号を
伝送する信号1817がそれぞれに接続される3つの可
動接点及び開始フラグ24a,24b,24cとそれぞ
れ接続される3つの固定接点からなるリレー12を介し
て周辺回路2a,2b,2cと接続される。
Therefore, after the CPUI initializes the peripheral circuit 2,
While the peripheral circuit 2 is performing repetitive operations, other calculations and data processing are performed. Further, FIG. 2 shows a plurality of peripheral same vPf2. 2.・・・
1 is a block diagram showing the main structure of a microcomputer that controls . In the drawings, the same reference numerals indicate the same or corresponding parts as in the above-described embodiment, and the explanation thereof will be omitted. three peripheral circuits 2a,
2b, 2c are fB lines 6, 6 . . . which transmit interrupt signals.
6 is connected to the peripheral control counter 3 through a relay l1 consisting of three movable contacts and one fixed contact connected to each
connected to. Further, the peripheral control counter 3 is connected to the peripheral circuit via a relay 12 consisting of three movable contacts connected to each and three fixed contacts connected to the start flags 24a, 24b, and 24c, respectively. Connected to 2a, 2b, and 2c.

次に、以上のような構威のマイクロコンピュータにおけ
る周辺回路の反復動作の制御手順についてその概略を説
明する.例えば、周辺回路2aが反fjF動作を行う場
合、リレー1)によって周辺回路2aを周辺制御カウン
タ3に接続し、周辺回路2aが反1夏動作を終了する都
度、信号線6を介して出力する割込み信号をカウントす
る.周辺回路2aが所定回数の反復動作を終了した際、
リレー12によって周辺回路2aに接続された周辺制御
カウンタ3から信号線7を介して制御信号を与え、開始
フラグ24aをクリアすると周辺回路2が動作を終了す
る.また、リレー12によって周辺制御カウンク3と他
の周辺回路2b,2cのいずれか又は両方とを接続した
場合、周辺回路2aの開始フラグ24aをクリアすると
同特に、その制御信号によって他の周辺回路2b,2c
の開始フラグ24b,24cのいずれか又は両方をクリ
アすれば、周辺回路2aの反復動作終了と同時に、{t
の周辺回路2b,2eのいずれか又は両方の動作を終了
させることが可能である.なお、本実施例では周辺制御
カウンク3を新たに設ける構成としたが、既存のタイマ
を周辺制御カウンタ3として用いても同様の効果が得ら
れる.また、本実施例では周辺回路2の反復動作が終了
する都度、割込み信号を出力し、この割込み信号をカウ
ントする構成としたが、反復動作のカウント源は割込み
信号に限るものではなく、伯の信号であっても同様の効
果が得られる。
Next, we will outline the control procedure for repetitive operations of peripheral circuits in a microcomputer configured as above. For example, when the peripheral circuit 2a performs the anti-fjF operation, the peripheral circuit 2a is connected to the peripheral control counter 3 by the relay 1), and each time the peripheral circuit 2a completes the anti-fjF operation, it is output via the signal line 6. Count interrupt signals. When the peripheral circuit 2a completes a predetermined number of repetitive operations,
A control signal is applied via the signal line 7 from the peripheral control counter 3 connected to the peripheral circuit 2a by the relay 12, and when the start flag 24a is cleared, the peripheral circuit 2 ends its operation. Furthermore, when the peripheral control count 3 and either or both of the other peripheral circuits 2b and 2c are connected by the relay 12, when the start flag 24a of the peripheral circuit 2a is cleared, the control signal causes the other peripheral circuit 2b to be connected. ,2c
If either or both of the start flags 24b and 24c of {t
It is possible to terminate the operation of either or both of the peripheral circuits 2b and 2e. In this embodiment, the peripheral control counter 3 is newly provided, but the same effect can be obtained even if an existing timer is used as the peripheral control counter 3. Furthermore, in this embodiment, an interrupt signal is output every time the repetitive operation of the peripheral circuit 2 is completed, and this interrupt signal is counted. However, the count source for the repetitive operation is not limited to the interrupt signal; A similar effect can be obtained with signals.

(発明の効果) 本発明のマイクロコンピュータは、CPUは周辺同路に
対してその初期設定を行った後は、周辺回路の反復動作
を監視する必要がなくなり、周辺回路が反復動作をして
いる間にも他の演算,データ処理を行うことができてデ
ータ処理の効率が向上ずるという優れた効果を奏する.
(Effects of the Invention) In the microcomputer of the present invention, after the CPU performs initial settings for the peripheral circuits, there is no need to monitor the repetitive operations of the peripheral circuits, and the peripheral circuits perform repetitive operations. This has the excellent effect of improving data processing efficiency by allowing other calculations and data processing to be performed in the meantime.

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

第1図は本発明に係るマイクロコンピュータの構戒を示
すブロック図、第2FI!Jは本発明に係るマイクロコ
ンピュータの他の実施例構戒を示すブロック図、第3図
は従来のマイクロコンピュータの構成を示すブロック図
である. l・・・CPU2・・・周辺回路 3・・・周辺制御カ
ウンタ 4・・・アドレスバス 5・・・データパス6
・・・信号線 7・・・信号線 1).12・・・リレ
ー23・・・関連レジスク 24・・・開始フラグなお
、図中、同一符号は同一、又は相当部分を示す. 弔 図
FIG. 1 is a block diagram showing the structure of a microcomputer according to the present invention, and the second FI! J is a block diagram showing the structure of another embodiment of the microcomputer according to the present invention, and FIG. 3 is a block diagram showing the structure of a conventional microcomputer. l...CPU2...Peripheral circuit 3...Peripheral control counter 4...Address bus 5...Data path 6
...Signal line 7...Signal line 1). 12...Relay 23...Related resistor 24...Start flag In the figures, the same reference numerals indicate the same or corresponding parts. Funeral map

Claims (1)

【特許請求の範囲】[Claims] (1)中央処理装置から設定されたデータに応じて動作
を開始し、該動作を所定回数反復する周辺回路を備えた
マイクロコンピュータにおいて、 中央処理装置から周辺回路の動作開始のデータが設定さ
れた後、周辺回路の動作の反復回数を、中央処理装置の
制御から独立して計数する手段と、 計数した回数が所定数に到達した際、中央処理装置の制
御から独立して、周辺回路の前記反復動作を停止させる
手段と を備えたことを特徴とするマイクロコンピュータ。
(1) In a microcomputer equipped with a peripheral circuit that starts an operation according to data set from the central processing unit and repeats the operation a predetermined number of times, data for starting the operation of the peripheral circuit is set from the central processing unit. a means for counting the number of repetitions of the operation of the peripheral circuit independently from the control of the central processing unit; A microcomputer comprising means for stopping repetitive operations.
JP1164739A 1989-06-27 1989-06-27 Microcomputer Pending JPH0329067A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP1164739A JPH0329067A (en) 1989-06-27 1989-06-27 Microcomputer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP1164739A JPH0329067A (en) 1989-06-27 1989-06-27 Microcomputer

Publications (1)

Publication Number Publication Date
JPH0329067A true JPH0329067A (en) 1991-02-07

Family

ID=15798987

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1164739A Pending JPH0329067A (en) 1989-06-27 1989-06-27 Microcomputer

Country Status (1)

Country Link
JP (1) JPH0329067A (en)

Similar Documents

Publication Publication Date Title
JPH0351002B2 (en)
US5287486A (en) DMA controller using a programmable timer, a transfer counter and an or logic gate to control data transfer interrupts
JPS629418A (en) Timer control system
JPS62266625A (en) Programmable controller
JPH04323755A (en) Dma device
JP3206910B2 (en) DMA transfer method
JP2560476B2 (en) Communication control device
JP2597729B2 (en) Microcomputer
JP2566139B2 (en) Bus interface circuit
JPS6269352A (en) microprocessor
JPS60189037A (en) Special unit of programmable controller
JPH03226854A (en) Information processing peripheral equipment
JPS62202255A (en) Dma transfer controller
JP2821176B2 (en) Information processing device
JPH0298743A (en) Semiconductor integrated circuit
JPH0462093B2 (en)
JPS61288252A (en) Data transfer system
JPS63153635A (en) Specification system for data transfer speed
JPS5988711U (en) programmable controller
JPH0778123A (en) I/o interruption processing system
JPH0150927B2 (en)
JPH01219942A (en) Buffer control system
JPH04308955A (en) Multiprocessor device
JPH02201680A (en) Dma data transfer circuit
JPS63300346A (en) Dma control system