JPH03242776A - Microcomputer - Google Patents

Microcomputer

Info

Publication number
JPH03242776A
JPH03242776A JP2040658A JP4065890A JPH03242776A JP H03242776 A JPH03242776 A JP H03242776A JP 2040658 A JP2040658 A JP 2040658A JP 4065890 A JP4065890 A JP 4065890A JP H03242776 A JPH03242776 A JP H03242776A
Authority
JP
Japan
Prior art keywords
cpu
output
data
switching
timer
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.)
Granted
Application number
JP2040658A
Other languages
Japanese (ja)
Other versions
JP2597729B2 (en
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 JP2040658A priority Critical patent/JP2597729B2/en
Publication of JPH03242776A publication Critical patent/JPH03242776A/en
Application granted granted Critical
Publication of JP2597729B2 publication Critical patent/JP2597729B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Microcomputers (AREA)

Abstract

PURPOSE:To improve the processing efficiency of a CPU by providing a microcomputer with a means for switching the contents of data to be outputted to the external at an optional timing independently of the control of a central processing unit(CPU) after setting up output data by the CPU. CONSTITUTION:The CPU 1 sets up data in a polarity setting buffer 8 through buses 3, 4 and instructs timers A, B to start counting. When the timer B starts counting, initial data are set up in a toggle flip flop(FF) 7 and then the output Q and the polarity of the outputs Q of the FF 7 is inverted in each overflow of the timer A. Thereby, the polarity of a port output can be switched at real time in response to each overflow of the timer A independently of the CPU 1. Since it is unnecessary for the CPU 1 to always set up the switching timing of port output data, delay time for switching the port output data can be removed.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は、出力装置からの出力データにより、外部の様
々な回路を操作するマイクロコンピュータに関するもの
である。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a microcomputer that operates various external circuits using output data from an output device.

〔従来の技術〕[Conventional technology]

第3図は従来のマイクロコンピュータの入出力機能を示
すブロック図であって、図中、1は中央演算処理装置(
以下、CPUと省略する)、2は出力語!(以下ポート
と呼ぶ)の機能ブロックで、CPUIとはアドレスバス
3およびデータバス4を介して接続されている。5は周
辺回路であり、タイマ、シリアルI10.A/D変換器
等のいくつかの周辺機能を示している。
FIG. 3 is a block diagram showing the input/output functions of a conventional microcomputer, in which 1 is the central processing unit (
(hereinafter abbreviated as CPU), 2 is the output word! (hereinafter referred to as a port), which is connected to the CPU via an address bus 3 and a data bus 4. 5 is a peripheral circuit including a timer, serial I10. Some peripheral functions such as an A/D converter are shown.

次に、ボートを介して出力を行なう場合の動作を説明す
る。ポート出力はボート入出力方向レジスタとポートデ
ータレジスタの設定により決まる。
Next, the operation when outputting via the boat will be explained. Port output is determined by the settings of the port input/output direction register and port data register.

CPUIはバス3,4を介してボート2内の出力方向レ
ジスタとデータレジスタを設定する。このCPUからの
書き込みのタイミングでボートの出力データが切り替わ
る。なお、ポート入出力方向レジスタはデータの入出力
方向を切り換えるためのものであり、またデータレジス
タは外部回路を制御するためのデータを設定するための
ものである。
The CPUI sets the output direction register and data register in boat 2 via buses 3 and 4. The output data of the boat is switched at the timing of this write from the CPU. Note that the port input/output direction register is for switching the input/output direction of data, and the data register is for setting data for controlling the external circuit.

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

従来のマイクロコンピュータのポート出力機能は以上の
ように構成されているので、ポートの出力データの切替
えはCPUによってのみ可能であるため、cpuは常に
他の周辺機能の操作と監視を行いながら、ボート出力の
設定処理を行なう負担を負う、また、ある周辺機能の動
作終了時にポート出力を切替えるような場合、動作終了
を感知した後、ポートの出力データ切り替えの処理が完
了するまでに無視できない時間を要するという問題があ
った。
Since the port output function of conventional microcomputers is configured as described above, port output data can only be switched by the CPU, so the CPU always operates and monitors other peripheral functions while switching the port output data. If you are responsible for performing output setting processing, or if you are switching port output when a certain peripheral function completes its operation, it will take a non-negligible amount of time to complete the port output data switching process after sensing the end of the operation. There was a problem that it was necessary.

本発明はこのような問題を解決するためになされたもの
で、CPUはポートの出力データ切替えタイミングを始
終図る必要がなくなり、また、ポートの出力データ切替
えの遅延時間も解消することができるマイクロコンピュ
ータを提供することを目的とする。
The present invention has been made to solve these problems, and provides a microcomputer that eliminates the need for the CPU to constantly plan the timing for switching port output data, and also eliminates the delay time in switching port output data. The purpose is to provide

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

本発明に係るマイクロコンピュータは、CPUが出力デ
ータの出力設定を出力設定バッファに対して行った後は
CPUの介入を受けずに、周辺回路から送られる割り込
み要求信号などの起動信号で、ポート出力ランチにバッ
ファのデータが転送され、次からの制御信号でボート出
力が即時に反転を繰り返すように構成したものである。
In the microcomputer according to the present invention, after the CPU sets the output data to the output setting buffer, the port output is performed using a startup signal such as an interrupt request signal sent from a peripheral circuit without any intervention from the CPU. The configuration is such that the data in the buffer is transferred to the launch, and the port output is immediately and repeatedly inverted by the next control signal.

〔作用〕[Effect]

本発明においては、上述のように構成したので、CPU
が一旦、ポート出力データの初期値設定を行うと、以降
はCPUの制御から独立して他の周辺機能の起動により
ボート出力が切り替わるように動作することで、CPU
を介することなく、周辺回路の発する信号だけでボート
出力を反転させることができる。
In the present invention, since the configuration is as described above, the CPU
However, once the initial value of the port output data is set, the port output is switched by starting other peripheral functions independently from the CPU control.
It is possible to invert the boat output using only the signal generated by the peripheral circuit without going through it.

〔実施例〕〔Example〕

以下、本発明の一実施例を図について説明する。 Hereinafter, one embodiment of the present invention will be described with reference to the drawings.

第1図は本発明の一実施例によるマイクロコンピュータ
の構成を示す図であって、図中、1はCPU、2は従来
例と同様のポート出力回路(入出力回路)で、本実施例
はこれに周辺回路5からの制御信号によって動作する第
2出力制御回路6を付加し、第2出力制御回路6の出力
とポート出力回路2の出力とはCPUIの制御によるス
イッチ9a、9bでその一方を選択できるように構成に
したものである。
FIG. 1 is a diagram showing the configuration of a microcomputer according to an embodiment of the present invention. In the figure, 1 is a CPU, 2 is a port output circuit (input/output circuit) similar to the conventional example, and the present embodiment is A second output control circuit 6 operated by a control signal from the peripheral circuit 5 is added to this, and the output of the second output control circuit 6 and the output of the port output circuit 2 are connected to one of them by switches 9a and 9b controlled by the CPU. It is structured so that you can select.

第2図は第2出力制御回路の一構成例である。FIG. 2 shows an example of the configuration of the second output control circuit.

ここでは周辺回路としての2つのタイマA、Bから制御
信号を受は取り、これによりポート制御回路2出力の極
性(HIGH/LOW)を決定するトグルフリップフロ
ップ7を制御する場合を例にとって説明する。
Here, an example will be explained in which control signals are received from two timers A and B as peripheral circuits, and the toggle flip-flop 7, which determines the polarity (HIGH/LOW) of the output of the port control circuit 2, is controlled by the control signals. .

まず、CPUIがバス3.4を介して極性設定バッファ
8にデータを設定し、かつタイマA、  Hに対してカ
ウントの開始を命令する。タイマBがカウントを開始す
ると、初期データがトグルフリップフロップ7にセット
され、以降はタイマAがオーバーフローするごとにトグ
ルフリップフロップの出力Q、 ciの極性が反転する
。従って、ボート出力はCPUから独立して、しかもタ
イマAがオーバーフローするごとにリアルタイムに反応
し、極性を切り替えることができるようになる。
First, the CPUI sets data in the polarity setting buffer 8 via the bus 3.4, and instructs the timers A and H to start counting. When timer B starts counting, initial data is set in toggle flip-flop 7, and thereafter, the polarity of outputs Q and ci of the toggle flip-flop are inverted every time timer A overflows. Therefore, the boat output is independent of the CPU, and reacts in real time every time timer A overflows, making it possible to switch polarity.

このように、本実施例によれば、CPUはポートの出力
データ切り替えタイミングを始終図る必要がなくなり、
またボート出力の切り替えにおいても、周辺回路の動作
にリアルタイムに反応するので、外部回路(例えばモー
タ駆動制御回路など)に対してもより簡単なソフトウェ
アの処理で、より高精度に制御できるという優れた効果
が得られる。
In this way, according to this embodiment, the CPU does not need to constantly plan the timing for switching the output data of the port.
In addition, when switching the boat output, it reacts in real time to the operation of peripheral circuits, making it possible to control external circuits (such as motor drive control circuits) with higher precision through simpler software processing. Effects can be obtained.

なお、タイマA、タイマBのカウント値を適当に替える
ことにより、本マイクロコンピュータは正弦波形成に優
れた効果をもち、このようにカウント値を設定した第2
出力制御回路を3つ備えることにより、インバータモー
タの制御装置として有効に利用できる。
By changing the count values of timer A and timer B appropriately, this microcomputer has an excellent effect on forming a sine wave.
By providing three output control circuits, it can be effectively used as an inverter motor control device.

また、上記実施例では制御信号源の一例として2つのタ
イマ人、Bをとりあげたが、制御信号はこれに限られる
ものではなく、他の周辺機能の信号を利用してもよく、
上記実施例と全く同様の効果が得られる。
Further, in the above embodiment, two timers B are taken as an example of the control signal source, but the control signal is not limited to this, and signals of other peripheral functions may be used.
Exactly the same effects as in the above embodiment can be obtained.

〔発明の効果〕〔Effect of the invention〕

以上のように、本発明に係るマイクロコンビュ−夕によ
れば、第2出力制御回路を設けることにより、CPtJ
を介することなく周辺回路の発する信号でボート出力切
替えを制御できるようにしたので、cpuはポート出力
の初期値を設定し、周辺回路の動作開始命令を送った後
は、周辺回路の操作、監視やポート出力の制御処理を行
う必要はなくなり、この時間を他の演算やデータ処理な
どにあてることができるので、CPUの処理効率の向上
が図れる効果がある。
As described above, according to the microcomputer according to the present invention, by providing the second output control circuit, CPtJ
Since port output switching can be controlled using signals issued by peripheral circuits without going through It is no longer necessary to perform control processing for port output and port output, and this time can be used for other calculations, data processing, etc., which has the effect of improving the processing efficiency of the CPU.

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

第1図は本発明に係るマイクロコンピュータの構成を示
すブロック図、第2図は本発明に係るマイクロコンピュ
ータの実施例を示す図、第3図は従来のマイクロコンピ
ュータの構成を示すブロック図である。 図において、1はCPU、2は入出力回路、3はアドレ
スバス、4はデータバス、5は周辺回路、6は第2出力
制御回路、7はトグルフリップフロップ、8は出力デー
タ設定バッファである。 なお図中同一符号は同−又は相当部分を示す。 4jテニタ力オ 平底 3年 3月lLf″日 第 図 事件の表示 特願平2−40658号 発明の名称 マイクロコンピュータ 3、補正をする者 事件との関係
FIG. 1 is a block diagram showing the configuration of a microcomputer according to the present invention, FIG. 2 is a diagram showing an embodiment of the microcomputer according to the present invention, and FIG. 3 is a block diagram showing the configuration of a conventional microcomputer. . In the figure, 1 is a CPU, 2 is an input/output circuit, 3 is an address bus, 4 is a data bus, 5 is a peripheral circuit, 6 is a second output control circuit, 7 is a toggle flip-flop, and 8 is an output data setting buffer. . Note that the same reference numerals in the figures indicate the same or equivalent parts. 4j Tenita Rikio Flat Soo March 3, 1993 ILf'' Date of the Case Patent Application No. 2-40658 Name of the Invention Microcomputer 3, Relationship with the Amendment Person Case

Claims (1)

【特許請求の範囲】[Claims] (1)中央演算処理装置、周辺回路、出力装置により構
成され、 中央演算処理装置から設定されたデータを出力装置を介
して出力するマイクロコンピュータにおいて、 中央演算処理装置が出力データを設定した後、中央演算
処理装置の制御から独立して、外部へ出力するデータの
内容を任意のタイミングで切替える手段を備えたことを
特徴とするマイクロコンピュータ。
(1) In a microcomputer that is composed of a central processing unit, peripheral circuits, and an output device, and outputs data set by the central processing unit via the output device, after the central processing unit sets the output data, A microcomputer characterized by having means for switching the content of data to be output to the outside at any timing, independent of the control of a central processing unit.
JP2040658A 1990-02-20 1990-02-20 Microcomputer Expired - Fee Related JP2597729B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2040658A JP2597729B2 (en) 1990-02-20 1990-02-20 Microcomputer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2040658A JP2597729B2 (en) 1990-02-20 1990-02-20 Microcomputer

Publications (2)

Publication Number Publication Date
JPH03242776A true JPH03242776A (en) 1991-10-29
JP2597729B2 JP2597729B2 (en) 1997-04-09

Family

ID=12586642

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2040658A Expired - Fee Related JP2597729B2 (en) 1990-02-20 1990-02-20 Microcomputer

Country Status (1)

Country Link
JP (1) JP2597729B2 (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH022444A (en) * 1988-06-10 1990-01-08 Sanyo Electric Co Ltd Microcomputer

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH022444A (en) * 1988-06-10 1990-01-08 Sanyo Electric Co Ltd Microcomputer

Also Published As

Publication number Publication date
JP2597729B2 (en) 1997-04-09

Similar Documents

Publication Publication Date Title
JPH0337715A (en) Bit order inverting circuit
JPH03242776A (en) Microcomputer
JPH04123217A (en) Switching circuit for state of external terminal
JPH0267665A (en) Interface circuit
JPS59191647A (en) Serial i/o of data processing system
JPH01128152A (en) Serial i/o circuit
JPH0616304B2 (en) Alternative method of CPU function at low power consumption
JPS6043757A (en) Microcomputer of one chip
JPS6133721Y2 (en)
JPH1173332A (en) Method and mechanism for controlling interruption
JPH063471Y2 (en) Micro computer
JPH0210478A (en) Program table interface circuit
JP2664109B2 (en) Real-time port
JPH02130020A (en) Delay circuit
JPH04175937A (en) Microcomputer
JPH027125A (en) Adder circuit
JPS6370450A (en) Semiconductor integrated circuit
JPS61166631A (en) Microprogram control processor
JPH04205118A (en) Data processing system
JPS58134341A (en) External interrupting device
JPS62189537A (en) Context switching device
JPH01231103A (en) Programmable controller
JPH0749793A (en) Interrupt controller
JPH0191528A (en) High speed prescaler circuit
JPS6278626A (en) Memory circuit of microprocessor

Legal Events

Date Code Title Description
S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313111

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

LAPS Cancellation because of no payment of annual fees