JP2518336B2 - Serial communication controller - Google Patents

Serial communication controller

Info

Publication number
JP2518336B2
JP2518336B2 JP63013178A JP1317888A JP2518336B2 JP 2518336 B2 JP2518336 B2 JP 2518336B2 JP 63013178 A JP63013178 A JP 63013178A JP 1317888 A JP1317888 A JP 1317888A JP 2518336 B2 JP2518336 B2 JP 2518336B2
Authority
JP
Japan
Prior art keywords
data
transmission
communication control
control device
serial communication
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
JP63013178A
Other languages
Japanese (ja)
Other versions
JPH01189256A (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.)
Denso Corp
Original Assignee
NipponDenso Co Ltd
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 NipponDenso Co Ltd filed Critical NipponDenso Co Ltd
Priority to JP63013178A priority Critical patent/JP2518336B2/en
Publication of JPH01189256A publication Critical patent/JPH01189256A/en
Application granted granted Critical
Publication of JP2518336B2 publication Critical patent/JP2518336B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Control By Computers (AREA)
  • Small-Scale Networks (AREA)

Description

【発明の詳細な説明】 発明の目的 [産業上の利用分野] 本発明はシリアル通信制御装置に関し、詳しくは中央
処理装置と随時記憶手段とを接続したバスに接続されて
作動するシリアル通信制御装置に関する。
DETAILED DESCRIPTION OF THE INVENTION [Industrial field of use] The present invention relates to a serial communication control device, and more particularly to a serial communication control device that operates by being connected to a bus connecting a central processing unit and storage means at any time. Regarding

[従来の技術] 近年、電子技術の急速な発展・普及、特にマイクロコ
ンピュータ等を中心とする処理装置の小型化・低価格化
に伴って、大型かつ高機能の中央処理装置に処理を集中
する集中型システムに代えて、制御対象に対する機能や
配置等に応じて複数の処理装置を用意し必要な処理を分
散して行なう分散型システムの研究・開発・利用が進め
られている。こうした分散型システムは、局所的な処理
を高速に行なう迅速性、制御対象の相違に対して最適の
制御系を構成し得る多様性、一部の故障がシステム全体
に波及しない信頼性、システムへの追加・変更に対する
柔軟性といった点で極めて優れたものであるが、複数の
処理装置を接続する通信系と相互の通信を処理する通信
制御装置とを必要とする。
[Prior Art] In recent years, with the rapid development and popularization of electronic technology, and in particular with the downsizing and price reduction of processing devices such as microcomputers, etc., processing is concentrated on large-scale and high-performance central processing units. In place of the centralized system, research, development, and use of a distributed system in which a plurality of processing devices are prepared according to functions and arrangements of control targets and necessary processing is distributed are underway. Such a distributed system can perform local processing at high speed, variety that can configure an optimal control system for differences in controlled objects, reliability that some failures do not spread to the entire system, Although it is extremely excellent in terms of flexibility with respect to addition / change of, it requires a communication system for connecting a plurality of processing devices and a communication control device for processing mutual communication.

そこで従来より、各処理装置間の通信を制御する通信
制御装置が種々提案されており、そのひとつに、シリア
ル通信(1ビット通信)により、各処理装置間の通信を
行なうシリアル通信制御装置がある。
Therefore, various communication control devices for controlling the communication between the processing devices have been conventionally proposed, one of which is a serial communication control device for performing the communication between the processing devices by serial communication (1-bit communication). .

ところが、一般的に、こうしたシリアル通信制御装置
は、マイクロコンピュータを構成する中央処理装置(CP
U)によって、データの送受信を制御するようにされて
いたため、ユーザが用意するソフトウェア(ユーザプロ
グラム)へ過度の負担がかかり、この結果、複数の中央
処理装置をシリアル通信によって接続し互いにデータを
共有する、といった分散型制御システムを構成した場合
に、中央処理装置による制御対象への制御応答性が低下
してしまうという問題があった。
However, in general, such a serial communication controller is a central processing unit (CP) that constitutes a microcomputer.
U) controls the sending and receiving of data, which puts an excessive burden on the software (user program) prepared by the user. As a result, multiple central processing units are connected by serial communication and data is shared with each other. However, when a distributed control system such as the one described above is configured, there is a problem that the control responsiveness to the control target by the central processing unit decreases.

そこで、例えば、本出願人は、こうしたシリアル通信
制御装置の一般的な欠点とされてきたユーザプログラム
への過度の負担、オーバヘッドの増大とこれに伴う主制
御の応答性の低下といった問題を回避するために、ユー
ザプログラムとは切り放してデータの送受信を行なうシ
リアル通信制御装置を提案している(特開昭62−274851
号)。
Therefore, for example, the present applicant avoids problems such as an excessive burden on the user program, which is a general drawback of such a serial communication control device, an increase in overhead, and a decrease in responsiveness of the main control accompanying this. For this reason, a serial communication control device has been proposed that sends and receives data separately from the user program (Japanese Patent Laid-Open No. 62-274851
issue).

[発明が解決しようとする課題] かかるシリアル通信制御装置は、中央処理装置とデー
タを随時読み書きし得る随時記憶手段(RAM)との間で
データのやりとりを仲介するバスに接続されるものであ
り、外部へ送信すべき送信データを格納するための出力
レジスタと、外部から受信された受信データを格納する
ための入力レジスタと、通信実行時にバスを占有して、
RAMと上記各レジスタとの間におけるデータ転送を実行
する通信制御手段と、を備えている。
[Problems to be Solved by the Invention] The serial communication control device is connected to a bus that mediates the exchange of data between the central processing unit and a storage means (RAM) that can read and write data at any time. , Occupy the output register for storing the transmission data to be transmitted to the outside, the input register for storing the reception data received from the outside, and the bus at the time of communication execution,
Communication control means for executing data transfer between the RAM and each of the above registers.

そして、このようなシリアル通信制御装置では、通信
制御手段によって大部分の通信動作が実現されるため、
ユーザプログラムの負担を低減して主制御の応答性を損
ねることなく高速通信を実現できる、といった優れたも
のがあるが、少なくとも通信制御手段によってバスが占
有されるとき(即ち、RAMと出力レジスタ及び入力レジ
スタとの間のデータ転送時)には、中央処理装置が主制
御のための演算処理等を実行できなくなるため、より一
層の改善が望まれていた。
In such a serial communication control device, most communication operations are realized by the communication control means,
There is an excellent thing that the high-speed communication can be realized without reducing the load of the user program and spoiling the responsiveness of the main control, but at least when the bus is occupied by the communication control means (that is, RAM and output register and During the data transfer with the input register), the central processing unit cannot execute the arithmetic processing for the main control and the like, so that further improvement has been desired.

そこで、本発明は、ユーザプログラムの過度の負担や
主制御の応答性の低下を極めて有効に低減することがで
き、分散型制御システムを構成するのに好適なシリアル
通信制御装置を提供することを目的としている。
Therefore, the present invention can extremely effectively reduce an excessive load of a user program and a decrease in responsiveness of main control, and provide a serial communication control device suitable for configuring a distributed control system. Has an aim.

発明の構成 かかる目的を達成する本発明の構成について以下説明
する。
Configuration of the Invention The configuration of the present invention that achieves the above object will be described below.

[課題を解決するための手段] 本発明のシリアル通信制御装置は、 中央処理装置によりデータを随時読み書きし得る随時記
憶手段に対してアドレスおよびデータのやりとりを仲介
するバスに接続され、他の通信制御装置とデータの送受
信を行なうシリアル通信制御装置であって、 送信すべきデータを複数個格納するための送信データ
格納手段と、 前記他の通信制御装置からのデータの送信要求を検出
する送信要求検出手段と、 該送信要求検出手段により前記送信要求が検出される
毎に、前記送信データ格納手段に格納されているデータ
を1個ずつ送信するデータ送信手段と、 前記送信要求検出手段により前記送信要求が検出され
た時に、前記送信データ格納手段にデータが格納されて
いなければ、前記バスを占有して前記随時記憶手段から
送信すべき複数個のデータを読み出し、該データを前記
送信データ格納手段に格納して、前記データ送信手段を
作動させる送信データ準備手段と、 前記他の通信制御装置に対してデータの受信可能を通
知する受信可能通知手段と、 該受信可能通知手段による前記受信可能通知に対応し
て前記他の通信制御装置から送信されるデータを、複数
個単位で蓄積する受信データ蓄積手段と、 該受信データ蓄積手段にデータが前記複数個分だけ蓄
積された時に、前記バスを占有して前記随時記憶手段に
前記受信データ蓄積手段内のデータを転送する受信デー
タ転送手段と、 を備えたことを要旨とする。
[Means for Solving the Problems] A serial communication control device of the present invention is connected to a bus that mediates the exchange of addresses and data with respect to an occasional storage device capable of reading and writing data at any time by a central processing unit, and other communication. A serial communication control device for transmitting and receiving data to and from a control device, the transmission data storage means for storing a plurality of data to be transmitted, and a transmission request for detecting a data transmission request from the other communication control device. Detection means, data transmission means for transmitting the data stored in the transmission data storage means one by one each time the transmission request is detected by the transmission request detection means, and the transmission request detection means for transmitting the data. If no data is stored in the transmission data storage means when the request is detected, the bus is occupied and the data is stored in the storage means at any time. A plurality of data to be transmitted are read out, the data are stored in the transmission data storage means, the transmission data preparation means for operating the data transmission means, and the data reception capability for the other communication control device. Receivable notification means for notifying, reception data accumulating means for accumulating a plurality of units of data transmitted from the other communication control device in response to the receivable notification by the receivable notification means, and the received data Reception data transfer means for occupying the bus and transferring the data in the reception data storage means to the storage means at any time when the storage means stores the plurality of data. To do.

[作用] 上記構成を有する本発明のシリアル通信制御装置は、
他の通信制御装置とデータの送受信を行なうが、データ
の送受信に際して、以下の作用をなす。
[Operation] The serial communication control device of the present invention having the above configuration is
Although data is transmitted / received to / from other communication control devices, the following actions are performed when transmitting / receiving data.

[I] データの送信時 外部の他の通信制御装置からデータの送信要求が出力
されると、その要求信号が、送信要求検出手段によって
検出される。そして、この送信要求検出手段によって送
信要求が検出される毎に、データ送信手段が、送信すべ
きデータを複数個格納するための送信データ格納手段に
格納されているデータを1個ずつ送信するのであるが、
送信要求が検出された時に、送信データ格納手段にデー
タが格納されていなければ、送信データ準備手段が、中
央処理装置と随時記憶手段とを結ぶバスを占有して、随
時記憶手段から送信すべき複数個のデータを読み出し、
その複数個のデータを送信データ格納手段に格納して、
データ送信手段を作動させる。
[I] During data transmission When a data transmission request is output from another external communication control device, the request signal is detected by the transmission request detecting means. Then, each time the transmission request is detected by the transmission request detecting means, the data transmitting means transmits the data stored in the transmission data storing means for storing a plurality of data to be transmitted one by one. But
If no data is stored in the transmission data storage means when the transmission request is detected, the transmission data preparation means occupies the bus connecting the central processing unit and the storage means at any time and should be transmitted from the storage means at any time. Read multiple data,
By storing the plurality of data in the transmission data storage means,
Activate the data transmission means.

よって、他の通信制御装置から最初にデータの送信要
求が出力された時には、まず、送信データ準備手段によ
りバスが占有されて、随時記憶手段から送信データ格納
手段に送信すべき複数個のデータが転送されると共に、
そのデータの内の1個が、データ送信手段によって送信
される。そして、その後は、他の通信制御装置からデー
タの送信要求が出力される毎に、データ送信手段が、送
信データ格納手段に既に格納されているデータを1個ず
つ送信し、送信データ格納手段内のデータが空になった
後に、他の通信制御装置からデータの送信要求が出力さ
れた時には、送信データ準備手段が再び作動して、随時
記憶手段から送信データ格納手段に複数個のデータが転
送されると共に、そのデータの内の1個が、データ送信
手段によって送信される。
Therefore, when a data transmission request is first output from another communication control device, first, the bus is occupied by the transmission data preparation means, and a plurality of data to be transmitted from the storage means to the transmission data storage means is stored. As they are transferred
One of the data is transmitted by the data transmitting means. Then, thereafter, each time a data transmission request is output from another communication control device, the data transmission unit transmits the data already stored in the transmission data storage unit one by one, and the data is stored in the transmission data storage unit. When the data transmission request is output from another communication control device after the data is empty, the transmission data preparation means is activated again and a plurality of data is transferred from the storage means to the transmission data storage means at any time. At the same time, one of the data is transmitted by the data transmitting means.

このように、本発明のシリアル通信制御装置におい
て、データの送信時には、他の通信制御装置からデータ
の送信要求が出力される毎に、データを1個ずつ送信す
ると共に、送信データ格納手段内に格納し得るデータの
個数に応じた送信回数に1回の割合でのみ、バスを占有
して、随時記憶手段から送信データ格納手段に送信すべ
きデータを転送する。
As described above, in the serial communication control device of the present invention, at the time of data transmission, each time a data transmission request is output from another communication control device, the data is transmitted one by one and the data is stored in the transmission data storage means. The bus is occupied only at a rate of once per the number of transmissions according to the number of data that can be stored, and the data to be transmitted is transferred from the storage means to the transmission data storage means at any time.

[II] データの受信時 受信可能通知手段によって、他の通信制御装置に対し
てデータの受信が可能であることを通知すると、この受
信可能通知手段による受信可能通知に対応して、他の通
信制御装置からデータが送信される。そこで、受信デー
タ蓄積手段が、他の通信制御装置からのデータを複数個
単位で蓄積し、この受信データ蓄積手段にデータが前記
複数個分だけ蓄積された時に、受信データ転送手段が、
中央処理装置と随時記憶手段とを結ぶバスを占有して、
随時記憶手段に受信データ蓄積手段内のデータを転送す
る。
[II] At the time of receiving data When the receivability notification means notifies the other communication control device that the data can be received, another communication is performed in response to the receivability notification by the receivability notification means. Data is transmitted from the controller. Therefore, the reception data storage means stores the data from another communication control device in a unit of a plurality of units, and when the reception data storage unit stores the plurality of data, the reception data transfer unit,
Occupying a bus connecting the central processing unit and the storage means at any time,
The data in the received data storage means is transferred to the storage means at any time.

このように、本発明のシリアル通信制御装置におい
て、データの受信時には、他の通信制御装置から送信さ
れたデータを、受信データ蓄積手段内に複数個単位で蓄
積し、複数個蓄積される毎に(複数個のデータを受信す
る毎に)、バスを占有して、受信データ蓄積手段から随
時記憶手段に受信データを転送する。
As described above, in the serial communication control device of the present invention, at the time of receiving data, the data transmitted from another communication control device is accumulated in the reception data accumulating means in a plurality of units, and every time a plurality of data is accumulated. Whenever a plurality of data is received, the bus is occupied and the received data is transferred from the received data storage means to the storage means at any time.

以上説明したように、本発明のシリアル通信制御装置
において、データの送信時には、他の通信制御装置から
データの送信要求を受ける毎に、データを1個ずつ送信
すると共に、複数の送信回数に1回の割合でのみ、バス
を占有して、随時記憶手段から送信データ格納手段に送
信すべきデータを転送し、また、データの受信時には、
他の通信制御装置から送信されたデータを複数個受信す
る毎に、バスを占有して、受信データ蓄積手段から随時
記憶手段に受信データを転送するようにしている。
As described above, in the serial communication control device of the present invention, at the time of data transmission, each time a data transmission request is received from another communication control device, the data is transmitted one by one, and the data is transmitted at a plurality of times. Occupy the bus only at the rate of times, transfer the data to be transmitted from the storage means to the transmission data storage means at any time, and when receiving the data,
Each time a plurality of data transmitted from another communication control device are received, the bus is occupied and the received data is transferred from the received data storage means to the storage means at any time.

従って、本発明のシリアル通信制御装置によれば、他
の通信制御装置との間で通信を行う際に、中央処理装置
が実行すべきユーザプログラムに負担をかけることな
く、しかも、バスを占有する期間(即ち、随時記憶手段
と送信データ格納手段及び受信データ蓄積手段との間の
データ転送期間)を極めて小さくすることができるた
め、中央処理装置が主制御用の演算処理等を実行できな
くなる期間を極めて小さくすることができる。よって、
中央処理装置による主制御の応答性の低下を極めて有効
に低減することができる。
Therefore, according to the serial communication control device of the present invention, when communicating with another communication control device, the central processing unit does not burden the user program to be executed and occupies the bus. The period (that is, the data transfer period between the storage unit, the transmission data storage unit, and the reception data storage unit) can be made extremely small, so that the central processing unit cannot execute arithmetic processing for main control. Can be extremely small. Therefore,
It is possible to extremely effectively reduce the deterioration of the response of the main control by the central processing unit.

そして更に、本発明のシリアル通信制御装置によれ
ば、データの受信時においては、受信可能通知に対応し
て他の通信制御装置から送信されて来るデータを、順次
受信するのであるが、データの送信時においては、送信
データ格納手段に格納した複数個のデータを、ただ単に
順次送信するのではなく、他の通信制御装置からの送信
要求を受ける毎に、1個ずつ送信するようにしているた
め、通信相手である他の通信制御装置は、任意のタイミ
ングでデータの送受信を行なうことができ、当該他の通
信制御装置側の処理負担をも低減することができる。
Furthermore, according to the serial communication control device of the present invention, when receiving data, the data transmitted from another communication control device in response to the receivable notification is sequentially received. At the time of transmission, the plurality of data stored in the transmission data storage means are not simply transmitted in sequence but are transmitted one by one each time a transmission request is received from another communication control device. Therefore, the other communication control device that is a communication partner can send and receive data at any timing, and the processing load on the other communication control device can be reduced.

つまり、他の通信制御装置からデータの送信要求を受
けた時に、バスを占有して、随時記憶手段から送信デー
タ格納手段に送信すべき複数個のデータを転送する、と
いった構成を採った場合には、そのデータをただ単に順
次送信することが考えられる。ところが、このように構
成すると、通信相手である他の通信制御装置は、複数個
のデータを連続して受信しなければならず、例えば、当
該他の通信制御装置が中央処理装置(CPU)によってデ
ータの送受信が制御されるものであった場合には、当該
他の通信制御装置側の中央処理装置にて、所定の制御対
象を制御するための本来の制御処理が十分に実行できな
くなる。
That is, when a configuration is adopted in which, when a data transmission request is received from another communication control device, the bus is occupied and a plurality of data to be transmitted is transferred from the storage means to the transmission data storage means at any time. Would simply send its data in sequence. However, with this configuration, the other communication control device that is a communication partner must continuously receive a plurality of data, and, for example, the other communication control device is controlled by the central processing unit (CPU). If the data transmission / reception is controlled, the central processing unit on the side of the other communication control device cannot sufficiently execute the original control process for controlling the predetermined control target.

これに対して、本発明のシリアル通信制御装置によれ
ば、他の通信制御装置からデータの送信要求を受ける毎
に、データを1個ずつ送信するように構成されているた
め、通信相手である他の通信制御装置は、自分の都合が
良い任意のタイミング(例えば、本来の制御処理を行う
必要のないタイミング)で送信要求を出力することによ
り、データを1個ずつ確実に受信することができるよう
になり、制御対象を制御するための処理実行に支障をき
たすことがない。
On the other hand, according to the serial communication control device of the present invention, the data is transmitted one by one each time a data transmission request is received from another communication control device, and therefore it is a communication partner. The other communication control device can surely receive the data one by one by outputting the transmission request at an arbitrary timing that is convenient for itself (for example, a timing at which the original control processing need not be performed). As a result, the execution of the process for controlling the controlled object is not hindered.

このように、本発明のシリアル通信制御装置によれ
ば、当該シリアル通信制御装置を備えた中央処理装置と
他の通信制御装置側の中央処理装置とでデータを共有し
て制御対象を制御する、といった分散型制御システムを
構成した場合において、当該シリアル通信制御装置を備
えた中央処理装置だけではなく、他の通信制御装置側の
中央処理装置における処理負担をも低減することができ
るようになり、延いては、制御応答性に極めて優れた分
散型制御システムを構築することができるようになるの
である。
As described above, according to the serial communication control device of the present invention, the central processing unit including the serial communication control device and the central processing unit on the other communication control device side share data to control the control target, When such a distributed control system is configured, not only the central processing unit having the serial communication control device, but also the processing load on the central processing units of other communication control devices can be reduced. As a result, it becomes possible to construct a distributed control system with extremely excellent control response.

尚、中央処理装置のバスの占有は、サイクルスチール
等の手法によってもよいし、バスリクエスト制御による
ダイレクトメモリアクセス(DMA)の手法等によっても
よい。
The bus of the central processing unit may be occupied by a method such as cycle stealing or a method of direct memory access (DMA) by bus request control.

[実施例] 以上説明した本発明の構成・作用を一層明らかにする
ために、以下本発明のシリアル通信制御装置の好適な実
施例について説明する。第1図は、内燃機関を制御する
電子制御装置(以下、エンジンECUと呼ぶ)1内に組み
込まれた実施例としてのシリアル通信制御装置3の内部
構成を、これに接続された汎用の通信制御機能を有する
変速機用電子制御装置(以下トランスミッションECUと
呼ぶ)5と共に示すブロック図である。
[Embodiment] In order to further clarify the configuration and operation of the present invention described above, a preferred embodiment of the serial communication control device of the present invention will be described below. FIG. 1 shows an internal configuration of a serial communication control device 3 as an embodiment incorporated in an electronic control device (hereinafter referred to as an engine ECU) 1 for controlling an internal combustion engine, and a general-purpose communication control connected thereto. FIG. 3 is a block diagram shown together with a transmission electronic control unit (hereinafter referred to as a transmission ECU) 5 having a function.

図示するように、シリアル通信制御装置3はエンジン
ECU1の内部バス10に接続されており、この内部バス10に
接続された周知の中央処理装置としてのCPU11,ROM12,随
時記憶手段としてのRAM14,外部からのパルス信号を入力
するパルス入力ポート16,アナログ信号をディジタル信
号に変換して入力するA/D変換入力ポート17,外部のアク
チュエータへの駆動信号を出力する出力ポート19等と共
に、エンジンECU1を構成している。
As shown in the figure, the serial communication control device 3 is an engine.
Connected to the internal bus 10 of the ECU1, CPU11 as a well-known central processing unit connected to the internal bus 10, ROM12, RAM14 as storage means at any time, a pulse input port 16 for inputting a pulse signal from the outside, An engine ECU 1 is configured with an A / D conversion input port 17 for converting an analog signal into a digital signal and inputting the output signal, an output port 19 for outputting a drive signal to an external actuator, and the like.

シリアル通信制御装置3の内部には、内部バス10を占
有してデータのやり取りを制御するDMAコントローラ2
0、DMAコントローラ20によるデータ入出力のアドレスを
保持するDMA入力アドレスレジスタ22およびDMA出力アド
レスレジスタ23,DMA転送によって入出力されるデータの
個数をカウントするDMA入力データカウンタ24およびDMA
出力データカウンタ25,トランスミッションECU5に対し
て入出力されるデータを一旦保持するDMAバッファレジ
スタ28および29が、内部バス10に接続されて設けられて
いる。このほか、シリアル通信制御装置3内には、DMA
コントローラ20に直結されてシリアル通信用の諸信号RQ
TないしRQRをバッファ30a,bを介して取り扱うシリアル
通信コントローラ31、データであるシリアル信号SINを
バッファ30cを介して入力しパラレルデータに変換する
受信用S/P変換レジスタ33、このレジスタ33の出力を保
持する受信データレジスタ34、送信用のデータを保持す
る送信データレジスタ36、このレジスタ36のデータをシ
リアル信号に変換しバッファ30dを介して出力する送信
用P/S変換レジスタ37、更にシリアル通信用のクロック
を生成するクロック回路39等が設けられている。DMAコ
ントローラ20は、上述したCPU11,RAM14あるいはこれら
のカウンタもしくはレジスタ24,25,33,34,36,37に接続
されており、DMA入力データカウンタ24およびDMA出力デ
ータカウンタ25からは、ダイレクトメモリアクセスによ
るデータ転送が完了したことを通知する信号が、一方、
受信データレジスタ34および送信データレジスタ36から
は、通信用のデータのセットがなされたことを通知する
信号が、更に、クロック回路39からは変換用のクロック
信号が、それぞれ入力される。尚、このクロック信号
は、受信用S/P変換レジスタ33と送信用P/S変換レジスタ
37にも入力されている。また、DMAコントローラ20からC
PU11には、CPU11の停止・内部バスの占有の要求を行な
う停止要求信号信号が、一方RAM14には、RAM14
の読出と書込の別を制御する読み書き信号R/が、それ
ぞれ出力される。
Inside the serial communication control device 3, a DMA controller 2 that occupies the internal bus 10 and controls data exchange
0, DMA input address register 22 and DMA output address register 23 for holding data input / output address by DMA controller 20, DMA input data counter 24 and DMA for counting the number of data input / output by DMA transfer
The output data counter 25 and DMA buffer registers 28 and 29 for temporarily holding data input / output to / from the transmission ECU 5 are provided so as to be connected to the internal bus 10. In addition, the serial communication control device 3 has a DMA
Signals RQ for serial communication directly connected to the controller 20
Serial communication controller 31 that handles T or RQR via buffers 30a and 30b, reception S / P conversion register 33 that inputs serial signal SIN that is data via buffer 30c and converts it to parallel data, output of this register 33 , A transmission data register 36 for storing transmission data, a transmission P / S conversion register 37 for converting the data in the register 36 into a serial signal and outputting the serial signal via the buffer 30d, and serial communication. A clock circuit 39 and the like for generating a clock for use is provided. The DMA controller 20 is connected to the above-mentioned CPU 11, RAM 14 or their counters or registers 24, 25, 33, 34, 36, 37, and direct memory access from the DMA input data counter 24 and the DMA output data counter 25. , Which signals that the data transfer by
From the reception data register 34 and the transmission data register 36, a signal notifying that communication data has been set is input, and further, from the clock circuit 39, a conversion clock signal is input. This clock signal is sent to the receiving S / P conversion register 33 and the transmitting P / S conversion register.
It is also entered in 37. Also, DMA controller 20 to C
PU11 receives a stop request signal signal that requests CPU11 to stop and occupy the internal bus.
A read / write signal R / for controlling whether reading or writing is output.

このエンジンECU1のシリアル通信制御装置3に4本の
信号線を介して接続されたトランスミッションECU5は、
汎用のシリアル通信機能を備えたものである。その内部
には、第1図に示すように、内部バス50を介して相互に
接続された周知のCPU51,ROM52,RAM54,入力ポート56,出
力ポート59等が設けられている。更に、汎用のシラル通
信を実現するために、データであるシリアル信号SINを
バッファ60cを介して入力しパラレルデータに変換する
受信用S/P変換レジス63、このレジスタ63の出力を保持
する受信データレジスタ64、受信用S/P変換レジスタ63
を制御する受信コントローラ65、送信用のデータを保持
する送信データレジスタ66、このレジスタ66のデータを
シリアル信号に変換しバッファ60dを介して出力する送
信用P/S変換レジスタ67、更に送信用P/S変換レジスタ67
を制御する送信コントローラ68等が設けられている。送
信コントローラ68には、エンジンECU1のシリアル通信コ
ントローラ31からの信号RQRがバッファ60aを介して入力
されるよう構成されている。また、出力ポート59から、
バッファ60bを介して、信号RQTがシリアル通信コントロ
ーラ31に出力されている。
The transmission ECU 5 connected to the serial communication control device 3 of the engine ECU 1 via four signal lines,
It has a general-purpose serial communication function. As shown in FIG. 1, a well-known CPU 51, ROM 52, RAM 54, input port 56, output port 59, etc., which are mutually connected via an internal bus 50, are provided inside thereof. Further, in order to realize general-purpose serial communication, a serial signal SIN that is data is input via a buffer 60c and converted into parallel data, a reception S / P conversion register 63, reception data that holds the output of this register 63. Register 64, reception S / P conversion register 63
A reception controller 65 that controls the transmission data, a transmission data register 66 that holds transmission data, a transmission P / S conversion register 67 that converts the data in this register 66 into a serial signal and outputs it via the buffer 60d, and a transmission P / S conversion register 67
A transmission controller 68 and the like for controlling the are provided. The transmission controller 68 is configured so that the signal RQR from the serial communication controller 31 of the engine ECU 1 is input via the buffer 60a. Also, from the output port 59,
The signal RQT is output to the serial communication controller 31 via the buffer 60b.

以上説明したエンジンECU1とトランスミッションECU5
は、内燃機関71と自動変速機75とに設けられた種々のセ
ンサおよびアクチュエータに接続されている。これらの
関係を、内燃機関71と自動変速機75との概略構成図であ
る第2図を参照しつつ、以下簡略に説明する。
Engine ECU1 and transmission ECU5 described above
Is connected to various sensors and actuators provided in the internal combustion engine 71 and the automatic transmission 75. These relationships will be briefly described below with reference to FIG. 2 which is a schematic configuration diagram of the internal combustion engine 71 and the automatic transmission 75.

(A) 内燃機関71とエンジンECU1 内燃機関71に設けられた次のセンサ、即ち、吸入空気
量を検出するエアフロメータ76,吸入空気の温度を検出
する吸気温センサ77,スロットルバルブ78の開度等を検
出するスロットルセンサ79,燃焼後の排気中に含まれる
酸素濃度を検出する酸素濃度センサ80,排気温度を検出
する排気温センサ81,内燃機関71の冷却水温を検出する
冷却水温センサ82等は、エンジンECU1のA/D変換入力ポ
ート17に接続されており、ディストリビュータ83内に設
けられて内燃機関1の回転数を検出する回転数センサ8
4,気筒判別センサ85等は、パルス入力ポート16に接続さ
れている。一方、内燃機関71に設けられた燃料噴射弁8
6,アイドル空気量を調整するアイドルスピードコントロ
ールバルブ87,点火プラグ88へ供給される高電圧を発生
するイグナイタ89等のアクチュエータは、エンジンECU1
の出力ポート19に接続されている。
(A) Internal combustion engine 71 and engine ECU1 The following sensors provided in the internal combustion engine 71, that is, an air flow meter 76 that detects the amount of intake air, an intake air temperature sensor 77 that detects the temperature of intake air, and the opening of the throttle valve 78 Etc., a throttle sensor 79 for detecting the like, an oxygen concentration sensor 80 for detecting the oxygen concentration contained in the exhaust gas after combustion, an exhaust temperature sensor 81 for detecting the exhaust temperature, a cooling water temperature sensor 82 for detecting the cooling water temperature of the internal combustion engine 71, etc. Is connected to the A / D conversion input port 17 of the engine ECU 1 and is provided in the distributor 83 to detect the rotation speed of the internal combustion engine 1.
The 4, cylinder discrimination sensor 85 and the like are connected to the pulse input port 16. On the other hand, the fuel injection valve 8 provided in the internal combustion engine 71
6, actuators such as the idle speed control valve 87 that adjusts the idle air amount, the igniter 89 that generates the high voltage supplied to the spark plug 88, and the engine ECU1
Connected to the output port 19 of.

従って、エンジンECU1は、これらのセンサ群からの信
号を入力することにより、内燃機関71の運転状態に基づ
いて、燃料噴射制御や点火時期制御あるいはアイドルス
ピードコントロール等を実行することができる。また、
後述するシリアル通信によって、トランスミッションEC
U5にスロットル開度のデータ等を送信し、あるいは、自
動変速機75の変速状態等のデータを受信することができ
る。
Therefore, the engine ECU 1 can execute fuel injection control, ignition timing control, idle speed control, etc. based on the operating state of the internal combustion engine 71 by inputting signals from these sensor groups. Also,
By the serial communication described later, transmission EC
It is possible to transmit data such as the throttle opening degree to U5 or receive data such as the gear shift state of the automatic transmission 75.

(B) 自動変速機75とトランスミッションECU5 内燃機関71のクランク軸90に連結された自動変速機75
には、その出力軸91の回転数によって車速Vを検出する
車速センサ93,自動変速機75のシフトポジションを検出
するシフトポジションセンサ95とが設けられており、自
動変速機75の変速比を1未満とするいわゆるオーバドラ
イブを選択することを禁止するオーバドライブカットス
イッチ96a,変速パターンを選択するパターンセレクトス
イッチ96bと共に、トランスミッションECU5の入力ポー
ト56に接続されている。一方、自動変速機75に設けられ
た変速切換(アップシフト、ダウンシフト)用の2つの
変速用ソレノイドバルブ97,98とロックアップ用ソレノ
イドバルブ99とは、トランスミッションECU5の出力ポー
ト59に接続されている。
(B) Automatic transmission 75 and transmission ECU5 Automatic transmission 75 connected to the crankshaft 90 of the internal combustion engine 71
Is provided with a vehicle speed sensor 93 that detects a vehicle speed V based on the number of revolutions of the output shaft 91 and a shift position sensor 95 that detects a shift position of the automatic transmission 75, and the gear ratio of the automatic transmission 75 is 1 It is connected to the input port 56 of the transmission ECU 5 together with the overdrive cut switch 96a for prohibiting the selection of so-called overdrive which is less than the above and the pattern select switch 96b for selecting the shift pattern. On the other hand, the two shift solenoid valves 97, 98 and the lock-up solenoid valve 99 for shifting (upshift, downshift) provided in the automatic transmission 75 are connected to the output port 59 of the transmission ECU 5. There is.

従って、トランスミッションECU5は、これらのセンサ
群からの信号を入力することにより、自動変速機75の変
速比の制御を実行することができる。また、トランスミ
ッションECU5は、後述するシリアル通信によって、エン
ジンECU1に現在の変速比や車速等のデータを送信し、あ
るいは、エンジンECU1からスロットル開度等のデータを
受信することができる。
Therefore, the transmission ECU 5 can execute the control of the gear ratio of the automatic transmission 75 by inputting the signals from these sensor groups. Further, the transmission ECU 5 can transmit data such as the current gear ratio and vehicle speed to the engine ECU 1 or receive data such as the throttle opening degree from the engine ECU 1 by serial communication described later.

次に、エンジンECU1とトランスミッションECU5との間
で行なわれるシリアル通信について説明する。シリアル
通信において用いられるデータの構成は、第3図に示す
ように、スタートビット1,データビット8,パリティビッ
ト1,ストップビット1の汎用のものであり、アドレスと
データの別やコマンドとデータの別等の付加的な情報は
含まない。
Next, serial communication performed between the engine ECU 1 and the transmission ECU 5 will be described. The structure of data used in serial communication is, as shown in FIG. 3, a general-purpose one including a start bit 1, a data bit 8, a parity bit 1 and a stop bit 1, and distinguishes between an address and data or a command and data. It does not include other additional information.

最近に、エンジンECU1側からデータを送信する場合の
制御について説明する。データの送信に先立って、エン
ジンECU1のCPU1は、第4図に示す出力処理を実行する。
まず、1回の送信処理において送信しようとしたデータ
が総て送信された場合に値1にセットされる出力完了フ
ラグの値をチェックし(ステップ100)、値1でなけれ
ば既にデータの送信処理を開始しているとして、そのま
ま本ルーチンを終了する。一方、出力完了フラグがセッ
トされている場合には、出力許可フラグに値1をセット
する(ステップ110)。ここで、出力許可フラグは、シ
リアル通信制御装置3に電源が投入されて、初期化の処
理が完了するまでの間、データの送信をマスクするため
のものであり、後述するDMAデータ送信処理ルーチンに
おいて、出力完了フラグが初めて値1にセットされるま
で、データの送信を禁止するのに用いられている。
Recently, control when data is transmitted from the engine ECU 1 side will be described. Prior to the data transmission, the CPU 1 of the engine ECU 1 executes the output process shown in FIG.
First, the value of the output completion flag that is set to value 1 is checked when all the data to be transmitted in one transmission process has been transmitted (step 100). Assuming that has started, this routine is finished as it is. On the other hand, if the output completion flag is set, the value 1 is set in the output permission flag (step 110). Here, the output permission flag is for masking the data transmission until the serial communication control device 3 is powered on and the initialization process is completed, and a DMA data transmission process routine described later. , It is used to prohibit the transmission of data until the output completion flag is set to the value 1 for the first time.

続いて、DMA出力アドレスレジスタ23の設定(ステッ
プ120)と、DMA出力データカウンタ25の設定(ステップ
130)とを行なう。これらの処理は、送信しようとする
データが保存されているRAM14の先頭アドレスとそのア
ドレスから何ワードのデータを転送するかというワード
数とを設定するものである。以上の処理を行なった後、
データの送信を開始させるべく、出力完了フラグをリセ
ット(値0に設定)し(ステップ140)、本ルーチンを
終了する。
Subsequently, the DMA output address register 23 is set (step 120) and the DMA output data counter 25 is set (step 120).
130) and These processes are to set the start address of the RAM 14 in which the data to be transmitted is stored and the number of words to be transferred from that address. After performing the above processing,
In order to start data transmission, the output completion flag is reset (set to value 0) (step 140), and this routine ends.

以上説明したステップ110ないしステップ140の処理を
実行することにより、シリアル通信制御装置3は、デー
タを送信することが可能な状態となり、トランスミッシ
ョンECU5からのデータ送信要求信号RQTを受けることに
より、データの送信を開始する。そこで、先に、トラン
スミッションECU5の内部においてデータの送信を受ける
ためになされる処理について、第5図に依拠して説明す
る。
By executing the processing of steps 110 to 140 described above, the serial communication control device 3 becomes in a state in which it can transmit data, and by receiving the data transmission request signal RQT from the transmission ECU 5, Start sending. Therefore, the processing performed to receive data transmission inside the transmission ECU 5 will be described first with reference to FIG.

このデータ受信処理ルーチンは、CUP51により,自動
変速機7を制御する他の制御ルーチンと共に繰り返し実
行される。まず、入力完了フラグが値1にセットされて
いるか否かの判断を行ない(ステップ200)、1回分の
入力が総て完了してこのフラグの値が1になっている場
合には、入力アドレスの設定(ステップ202)、入力デ
ータカウンタの設定(ステップ204)および入力完了フ
ラグのリセット(ステップ206)の処理を実行して、次
のステップ210に進む。ここで、入力アドレスは、次の
通信制御において受信するデータを格納するRAM54の先
頭アドレスを意味し、入力データカウンタは、受信する
データ数を意味し、後者は、通信におけるエラーのチェ
ックにも用いられる。
This data reception processing routine is repeatedly executed by the CUP 51 together with other control routines for controlling the automatic transmission 7. First, it is judged whether or not the input completion flag is set to the value 1 (step 200), and when the input of one time is completed and the value of this flag is 1, the input address Is set (step 202), the input data counter is set (step 204), and the input completion flag is reset (step 206), and the process proceeds to the next step 210. Here, the input address means the start address of the RAM 54 that stores the data to be received in the next communication control, the input data counter means the number of data to be received, and the latter is also used for checking errors in communication. To be

ステップ210以下では、エンジンECU1のシリアル通信
制御装置3にデータ送信要求信号を出力する処理を行な
う。即ち、出力ポート59の一出力P00を一定時間だけロ
ウレベルに保持するのである(ステップ210,212,21
4)。この様子を、第6図のタイミングチャートに、タ
イミングti(i=1,2…)で示す。その後、受信データ
レジスタ(RDR)64が空か否かを判断し(ステップ22
0)、シリアル通信制御装置3からデータが送信されて
このレジスタ64にデータがセットされるまで待機する。
In step 210 and subsequent steps, a process of outputting a data transmission request signal to the serial communication control device 3 of the engine ECU 1 is performed. That is, one output P00 of the output port 59 is held at the low level for a certain period of time (steps 210, 212, 21).
Four). This state is shown by timing ti (i = 1, 2 ...) In the timing chart of FIG. Then, it is judged whether the reception data register (RDR) 64 is empty (step 22).
0), and waits until data is transmitted from the serial communication control device 3 and set in the register 64.

受信データレジスタ64にデータがセットされたとき、
ステップ230以下に進んで、データをRAM54に格納する処
理を行なう。即ち、受信データレジスタ64の内容を読み
込み(ステップ230)、このデータをステップ202で設定
した入力アドレスに格納し(ステップ232)、入力アド
レスを1だけインクリメントし(ステップ234)、更に
入力データカウンタの値を1だけデクリメントする(ス
テップ236)のである。
When data is set in the receive data register 64,
In step 230 and thereafter, the process of storing data in the RAM 54 is performed. That is, the contents of the reception data register 64 are read (step 230), this data is stored in the input address set in step 202 (step 232), the input address is incremented by 1 (step 234), and further the input data counter The value is decremented by 1 (step 236).

続いて、入力データカウンタが0になったか否かの判
断を行ない(ステップ240)、予めステップ204で設定し
た個数のデータが受信されるまでは、そのまま「NEXT」
に抜けて本ルーチンを一旦終了する。一方、設定された
個数のデータが入力されれば、カウンタの値は0となる
から、この場合には、入力完了フラグに値1をセットし
て(ステップ250)、本ルーチンを終了する。
Then, it is judged whether or not the input data counter has reached 0 (step 240), and "NEXT" is kept until the number of data set in advance in step 204 is received.
To end the present routine once. On the other hand, if the set number of data is input, the value of the counter becomes 0. In this case, therefore, the value 1 is set in the input completion flag (step 250), and this routine ends.

次に、シリアル通信制御装置3のDMAコントローラ20
における処理について説明する。DMAコントローラ20も
内部には算術論理演算を逐次実行するプロセッサを備
え、電源投入後の初期化の処理を実行した後、第7図に
示すDMAデータ送信処理ルーチンを実行する。このルー
チンが起動されると、まず、出力許可フラグが値1であ
るか否かの判断を行なう(ステップ300)。先に説明し
たCPU11による出力処理により(ステップ110)出力許可
フラグの設定がなされるまで、その値は0である。従っ
て、初めてこのルーチンが実行された場合には、判断は
「NO」となり、出力完了フラグを値1にセットし(ステ
ップ305)、DMA出力データカウンタ25に値0をセットし
(ステップ310)、更にDMAバッファレジスタ29や送信デ
ータレジスタ(TDR)36の内容をクリアする(ステップ3
15)といった処理を行なう。
Next, the DMA controller 20 of the serial communication control device 3
The processing in will be described. The DMA controller 20 also has a processor for sequentially executing arithmetic and logic operations therein, and after executing initialization processing after power-on, executes the DMA data transmission processing routine shown in FIG. When this routine is started, it is first determined whether or not the output permission flag has a value of 1 (step 300). The value is 0 until the output permission flag is set by the output processing by the CPU 11 described above (step 110). Therefore, when this routine is executed for the first time, the determination is “NO”, the output completion flag is set to the value 1 (step 305), and the DMA output data counter 25 is set to the value 0 (step 310). Furthermore, the contents of the DMA buffer register 29 and the transmission data register (TDR) 36 are cleared (step 3
Perform processing such as 15).

第4図に示したCPU11による出力処理により出力許可
フラグがセットされると(=1)、次に出力完了フラグ
セットされているか否かの判断を行ない(ステップ32
0)、データの送信が総て完了してこのフラグの値が1
に設定されていれば、ステップ300に戻って、次のデー
タの送信がCPU11によって指示されるまで待機する。
When the output permission flag is set (= 1) by the output processing by the CPU 11 shown in FIG. 4, it is next judged whether or not the output completion flag is set (step 32).
0), the value of this flag is 1 when all data transmission is completed.
If it is set to, the process returns to step 300 and waits until the CPU 11 instructs the transmission of the next data.

出力完了フラグが第4図に示したステップ140におい
て値0に設定された後では、処理はステップ320からス
テップ325へと移行し、DMA出力データカウンタ25が0に
なっているか否か、即ち全データの送信が完了したか否
かの判断を行なう。データ送信の途中では、DMA出力デ
ータカウンタ25は0になっていないから、続いて、シリ
アル通信コントローラ31を介してトランスミッションEC
U5からのデータ送信要求信号RQTがロウレベルに立ち下
がるエッジの検出がなされたか否かの判断を行なう(ス
テップ330)。データ送信要求信号RQTは、既に説明した
ように(第6図タイミングt1)、トランスミッションEC
U5によって、データの送信を要求する際に出力されるも
のである。
After the output completion flag is set to the value 0 in step 140 shown in FIG. 4, the process proceeds from step 320 to step 325, and whether or not the DMA output data counter 25 is 0, that is, all It is determined whether or not the data transmission is completed. Since the DMA output data counter 25 is not 0 during the data transmission, the transmission EC is continuously transmitted via the serial communication controller 31.
It is determined whether or not an edge in which the data transmission request signal RQT from U5 falls to low level is detected (step 330). The data transmission request signal RQT, as described above (timing t1 in FIG. 6), is transmitted by the transmission EC.
It is output when U5 requests transmission of data.

データ送信要求信号RQTの立ち下がりが検出されたと
き、DMAコントローラ20は、ワード単位で行なわれる通
信において2バイト目の転送を行なうタイミングか否か
を判断する(ステップ335)。尚、このタイミングの判
定は、後述するステップ375の処理によって2バイト目
のデータが送信データレジスタ(TDR)36に保管されて
いるか否かを検出することで行われ、データが保管され
ていれば、2バイト目の転送を行なうタイミングである
と判断する。まず、1バイト目の送信を行なう場合に
は、CPU11に対してその実行の中断を要求する信号
を出力する(ステップ340)。信号を受け
付けると、CPU11は、現在実行中の命令を終了した後、
内部バス10を解放して停止する。そこで、CPU11の実行
中の命令が終了するのを検出し(ステップ345)、解放
された内部バス10を利用してDMAコントローラ20は、以
下の処理を実行する。
When the falling edge of the data transmission request signal RQT is detected, the DMA controller 20 determines whether or not it is the timing to transfer the second byte in the communication performed in word units (step 335). The determination of this timing is performed by detecting whether or not the second byte data is stored in the transmission data register (TDR) 36 by the process of step 375 described later, and if the data is stored, It is determined that it is time to transfer the second byte. First, when transmitting the first byte, a signal requesting interruption of the execution is output to the CPU 11 (step 340). Upon receiving the signal, the CPU 11 finishes the instruction currently being executed, and then
Release internal bus 10 and stop. Therefore, it is detected that the instruction being executed by the CPU 11 is completed (step 345), and the DMA controller 20 uses the released internal bus 10 to execute the following processing.

即ち、DMA出力アドレスレジスタ23の値を1だけイン
クリメントし(ステップ350)、このレジスタ23が指し
示すRAM14のアドレスのデータ(ワードの1バイト目)
を、DMAバッファレジスタ29にまずロードする(ステッ
プ355)。次に、このバッファレジスタ29のデータを送
信データレジスタ(TDR)36を介して送信用P/S変換レジ
スタ(TSR)37にロードする(ステップ360)。この結
果、ワードデータの1バイト目が、バッファ30dから送
信信号線SOUTを介して、トランスミッションECU5に出力
される。続いて、DMA出力アドレスレジスタ23の値を1
だけインクリメントして(ステップ365)、そのアドレ
スのデータ、即ちワードデータの2バイト目をDMAバッ
ファレジスタ29に転送し(ステップ370)、更にそのデ
ータを送信データレジスタ(TDR)36に保管する(ステ
ップ375)。こうして2バイト目のデータの送信の準備
を完了してから、ステップ380において、CPU11に対する
停止要求信号を解除し(第6図参照)。ステッ
プ300から処理を繰り返す。
That is, the value of the DMA output address register 23 is incremented by 1 (step 350), and the data of the address of the RAM 14 pointed to by this register 23 (first byte of word)
Is first loaded into the DMA buffer register 29 (step 355). Next, the data in the buffer register 29 is loaded into the transmission P / S conversion register (TSR) 37 via the transmission data register (TDR) 36 (step 360). As a result, the first byte of the word data is output from the buffer 30d to the transmission ECU 5 via the transmission signal line SOUT. Then, set the value of DMA output address register 23 to 1
By incrementing only (step 365), the data of the address, that is, the second byte of the word data is transferred to the DMA buffer register 29 (step 370), and the data is further stored in the transmission data register (TDR) 36 (step). 375). After the preparation for the transmission of the second byte data is completed in this way, the stop request signal to the CPU 11 is released in step 380 (see FIG. 6). The process is repeated from step 300.

次にトランスミッションECU5からデータ送信要求信号
RQTが入力されたときには(第6図タイミングt2)、ワ
ードデータの2バイト目を送信するものとして(ステッ
プ330,335)、既に送信データレジスタ(TDR)36に保管
された2バイト目に相当するデータを、送信用P/S変換
レジスタ(TSR)37に転送する処理を行なう(ステップ3
85)。この結果、2バイト目に相当するデータは、シリ
アルデータに変換され、トランスミッションECU5に出力
される。その後、DMA出力データカンウンタ25の値を1
だけデクリメントし(ステップ390)、1ワード分のデ
ータの送信が終了したとして、ステップ300からの処理
を繰り返す。
Next, a data transmission request signal from the transmission ECU 5
When RQT is input (timing t2 in FIG. 6), it is assumed that the second byte of word data is transmitted (steps 330 and 335), and the data corresponding to the second byte already stored in the transmission data register (TDR) 36 is transmitted. , Transfer to the transmission P / S conversion register (TSR) 37 (step 3
85). As a result, the data corresponding to the second byte is converted into serial data and output to the transmission ECU 5. After that, set the value of DMA output data counter 25 to 1
However, it is decremented (step 390), and the processing from step 300 is repeated assuming that the transmission of the data for one word is completed.

こうしてワード単位で次々にデータの送信が行なわ
れ、予めDMA出力データカウンタ25に設定したワード数
だけ送信が行なわれた場合には、ステップ325における
判断は「YES」となるので、データは総て送信されたと
して、出力完了フラグに値1をセットし(ステップ39
5)、再びステップ300からその処理を繰り返す。
In this way, data is sequentially transmitted in units of words, and when the number of words set in the DMA output data counter 25 is transmitted in advance, the determination in step 325 is “YES”, so that all data is transmitted. Assuming that the data has been transmitted, the value 1 is set in the output completion flag (step 39
5) Then, the process is repeated from step 300.

尚、本実施例においては、DMAバッファレジスタ29及
び送信データレジスタ36が送信データ格納手段に相当
し、ステップ330の処理が送信要求検出手段に相当し、
ステップ360及び385の処理がデータ送信手段に相当し、
ステップ335〜355,365〜380の処理が送信データ準備手
段に相当している。
In the present embodiment, the DMA buffer register 29 and the transmission data register 36 correspond to the transmission data storage means, the process of step 330 corresponds to the transmission request detection means,
The processing of steps 360 and 385 corresponds to data transmission means,
The processes of steps 335 to 355 and 365 to 380 correspond to the transmission data preparation means.

以上のように本実施例のシリアル通信制御装置3で
は、第6図に示した如く、トラスミッションECU5からの
データ送信要求信号RQTが2回立ち下がる毎に、CPU11の
処理実行を停止させてRAM14からDMAバッファレジスタ29
及び送信データレジスタ36へ1ワード(2バイト)のデ
ータを転送すると共に、上記データ送信要求信号RQTが
立ち下がる毎に、そのデータを1バイトずつ送信するよ
うにしている。これにより、CPU11をDMAコントローラ20
の6ステップ分(第7図参照、本実施例ではおよそ2
「μsec」)停止するだけで、1ワード単位の送信を実
行することができる。
As described above, in the serial communication control device 3 of the present embodiment, as shown in FIG. 6, every time the data transmission request signal RQT from the truss mission ECU 5 falls twice, the processing execution of the CPU 11 is stopped and the RAM 14 is executed. To DMA buffer register 29
Also, one word (2 bytes) of data is transferred to the transmission data register 36, and each time the data transmission request signal RQT falls, the data is transmitted one byte at a time. As a result, the CPU 11 is transferred to the DMA controller 20.
6 steps (see FIG. 7, about 2 in this embodiment)
"Μsec") It is possible to execute transmission in 1-word units simply by stopping.

よって、CPU11が実行するユーザプログラムにおける
通信制御の負荷はほとんどなく、トランスミッションEC
U5からのデータ送信要求に対して高速に応答してデータ
を出力することができる。
Therefore, there is almost no communication control load in the user program executed by the CPU 11, and the transmission EC
Data can be output in response to a data transmission request from U5 at high speed.

そして更に、本実施例のシリアル通信制御装置3で
は、データ送信要求信号RQTが立ち下がる毎に、データ
を1バイトずつ送信するようにしているため、通信相手
であるトランスミッションECU5は、任意のタイミングで
シリアルデータの受信処理を実行することができる。よ
って、トランスミッションECU5においても、CPU51が実
行するプログラムの負担が軽減され、且つ高速にデータ
を入力することができる。そして、この結果、制御応答
性に極めて優れた分散型制御システムを構築することが
できる。
Furthermore, in the serial communication control device 3 of the present embodiment, each time the data transmission request signal RQT falls, one byte of data is transmitted, so that the transmission ECU 5, which is the communication partner, can transmit at any timing. The serial data reception process can be executed. Therefore, also in the transmission ECU 5, the load of the program executed by the CPU 51 is reduced, and the data can be input at high speed. As a result, it is possible to construct a distributed control system having extremely excellent control responsiveness.

次に、トランスミッションECU5からエンジンECU1にデ
ータを送信する場合の処理について説明する。この場
合、エンジンECU1のCPU11は、第8図に示す入力処理を
実行する。まず、1回の受信処理において受信しようと
したデータが総て受信された場合に値1にセットされる
入力完了フラグの値をチェックし(ステップ400)、値
1でなければ既にデータの受信処理を開始しているとし
て、そのまま本ルーチンを終了する。一方、入力完了フ
ラグがセットされている場合には、入力許可フラグに値
1をセットする(ステップ410)。ここで、入力許可フ
ラグは、シリアル通信制御装置3に電源が投入されて、
初期化の処理が完了するまでの間、データの受信をマス
クするためのものであり、後述するDMAデータ受信処理
ルーチンにおいて、入力完了フラグが初めて値1にセッ
トされるまで、データの受信を禁止するのに用いられて
いる。
Next, a process of transmitting data from the transmission ECU 5 to the engine ECU 1 will be described. In this case, the CPU 11 of the engine ECU 1 executes the input process shown in FIG. First, the value of the input completion flag that is set to the value 1 is checked when all the data to be received in one reception process is received (step 400). If the value is not 1, the data reception process has already been performed. Assuming that has started, this routine is finished as it is. On the other hand, if the input completion flag is set, the value 1 is set in the input permission flag (step 410). Here, the input permission flag indicates that the serial communication control device 3 is powered on,
This is for masking data reception until the initialization process is completed. In the DMA data reception process routine described below, data reception is prohibited until the input completion flag is set to the value 1 for the first time. It is used to

続いて、DMA入力アドレスレジスタ22の設定(ステッ
プ420)と、DMA入力データカウンタ24の設定(ステップ
430)とを行なう。これらの処理は、受信しようとする
データが保存されるRAM14の先頭アドレスとそのアドレ
スから何ワード分、データを受信するかというワード数
とを設定するものである。以上の処理を行なった後、デ
ータの受信を開始させるべく、入力完了フラグをリセッ
ト(値0に設定)し(ステップ440)、本ルーチンを終
了する。
Then, set the DMA input address register 22 (step 420) and the DMA input data counter 24 (step
430) and do. These processes set the start address of the RAM 14 in which the data to be received is stored and the number of words from the address to receive the data. After performing the above processing, the input completion flag is reset (value is set to 0) to start data reception (step 440), and this routine is ended.

以上説明したステップ410ないしステップ440の処理を
実行することにより、シリアル通信制御装置3は、トラ
ンスミッションECU5からデータを受信することが可能な
状態となる。そこで、先に、トランスミッションECU5の
内部においてデータの送信のためになされる処理につい
て、第9図に依拠して説明する。
By executing the processing of steps 410 to 440 described above, the serial communication control device 3 becomes in a state capable of receiving data from the transmission ECU 5. Therefore, the processing performed for the transmission of data inside the transmission ECU 5 will be described first with reference to FIG.

このデータ送信処理ルーチンは、CPU51により、既に
説明したデータ受信処理ルーチンのほか、自動変速機75
を制御する他の制御ルーチンと共に繰り返し実行され
る。まず、出力完了フラグが値1にセットされているか
否かの判断を行ない(ステップ500)、1回分の出力が
完了してこのフラグの値が1になっている場合には、出
力アドレスの設定(ステップ502)、出力データカンウ
ンタの設定(ステップ504)及び出力完了フラグのリセ
ット(ステップ506)の処理を実行して、次のステップ5
10に進む。ここで、出力アドレスは、次の通信制御にお
いて送信するデータを格納したRAM54の先頭アドレスを
意味し、出力データカウンタは、送信するデータ数を意
味する。
This data transmission processing routine is executed by the CPU 51 in addition to the data reception processing routine already described and the automatic transmission 75
Is repeatedly executed together with other control routines for controlling. First, it is judged whether or not the output completion flag is set to the value 1 (step 500), and when one output is completed and the value of this flag is 1, the output address is set. (Step 502), output data counter setting (step 504) and output completion flag resetting (step 506) are executed, and the next step 5
Go to 10. Here, the output address means the head address of the RAM 54 that stores the data to be transmitted in the next communication control, and the output data counter means the number of data to be transmitted.

ステップ510以下では、エンジンECU1のシリアル通信
制御装置3からのデータ受付信号RQRをチェックする処
理を行なう。即ち、送信コントローラ68の受け取ったデ
ータがロウレベルであるか否かの判断を行なうの
である。データ受付信号RQRは、後述するDMAデータ受信
処理において、シリアル通信制御装置3がデータを受信
できる状態となるロウレベルに制御されるが、この様子
を、第10図のタイミングチャートに示す。その後、送信
データレジスタ(TDR)66が空か否かを判断し(ステッ
プ520)、空でなければ、既に1バイトのデータ送信の
実行中であるとしてそのまま処理を終了する。一方、こ
のデータレジスタ66が空であれば、既に設定された出力
アドレスのデータを読み出し(ステップ525)、このデ
ータを送信データレジスタ(TDR)66に書き込む処理を
行なって(ステップ530)、送信処理を開始する(ステ
ップ532)。その後、出力アドレスを1だけインクリメ
ントし(ステップ534)、更に出力データカウンタの値
を1だけデクリメントする(ステップ536)のである。
In step 510 and subsequent steps, a process of checking the data reception signal RQR from the serial communication control device 3 of the engine ECU 1 is performed. That is, it is determined whether or not the data received by the transmission controller 68 is low level. The data reception signal RQR is controlled to a low level that allows the serial communication control device 3 to receive data in the DMA data reception process described later. This is shown in the timing chart of FIG. After that, it is judged whether or not the transmission data register (TDR) 66 is empty (step 520), and if it is not empty, it is determined that the 1-byte data transmission is already being executed, and the process is terminated. On the other hand, if the data register 66 is empty, the data of the output address that has already been set is read (step 525), the data is written to the transmission data register (TDR) 66 (step 530), and the transmission processing is performed. Is started (step 532). After that, the output address is incremented by 1 (step 534), and the value of the output data counter is decremented by 1 (step 536).

続いて、出力データカウンタが0になったか否かの判
断を行ない(ステップ540)、予めステップ504で設定し
た個数のデータが送信されるまでは、そのまま「NEXT」
に抜けて本ルーチンを一旦終了する。一方、設定された
個数のデータが出力されれば、カウンタの値は0となる
から、その場合には、出力完了フラグに値1をセットし
て、本ルーチンを終了する。
Subsequently, it is judged whether or not the output data counter has reached 0 (step 540), and “NEXT” is kept until the number of data set in advance in step 504 is transmitted.
To end the present routine once. On the other hand, if the set number of data is output, the counter value becomes 0. In that case, therefore, the value 1 is set in the output completion flag, and this routine is ended.

次に、DMAコントローラ20における受信処理について
説明する。DMAコントローラ20は、データの受信を行な
う際には、初期化の処理を実行した後、第11図に示すDM
Aデータ受信処理ルーチンを実行する。このルーチンが
起動されると、まず、入力許可フラグが値1であるか否
かの判断を行なう(ステップ600)。先に説明したCPU11
による入力処理により(ステップ410)入力許可フラグ
の設定がなされるまで、その値は0である。従って、初
めてこのルーチンが実行された場合には、判断は「NO」
となり、入力完了フラグを値1にセットし(ステップ60
5)、シリアル通信コントローラ31を介してデータ受付
信号RQRをハイレベルに設定し、DMA入力データカウンタ
24に値0をセットし(ステップ610)、更にDMAバッファ
レジスタ28や受信データレジスタ(RDR)34の内容をク
リアする(ステップ615)といった処理を行なう。
Next, the reception process in the DMA controller 20 will be described. When receiving data, the DMA controller 20 executes the initialization process and then the DM shown in FIG.
A Data reception processing routine is executed. When this routine is started, it is first determined whether the input permission flag is 1 (step 600). CPU 11 described above
The value is 0 until the input permission flag is set by the input processing (step 410). Therefore, when this routine is executed for the first time, the judgment is "NO".
And the input completion flag is set to the value 1 (step 60
5) Set the data reception signal RQR to high level via the serial communication controller 31, and set the DMA input data counter.
The value 0 is set in 24 (step 610), and the contents of the DMA buffer register 28 and the reception data register (RDR) 34 are cleared (step 615).

第8図に示したCPU11による入力処理により入力許可
フラグがセットされると(=1)、次に入力完了フラグ
セットされているか否かの判断(ステップ620)に進
み、データの受信が総て完了してこのフラグの値が1に
設定されていれば、ステップ600に戻って、次のデータ
の受信がCPU11によって指示されるまで待機する。
When the input permission flag is set by the input processing by the CPU 11 shown in FIG. 8 (= 1), the process proceeds to the judgment whether or not the input completion flag is set (step 620), and all the data is received. If completed and the value of this flag is set to 1, the process returns to step 600 and waits until the CPU 11 instructs the reception of the next data.

入力完了フラグが第8図に示したステップ440におい
て値0に設定された後では、処理はステップ320からス
テップ623へと移行し、シリアル通信コントローラ31を
介してデータ受付信号RQRをロウレベル(=0)に設定
する。このデータ受付信号RQRは、これがロウレベルに
保持されている間、シリアル通信制御装置3がデータを
受信できる状態にあることを示す信号であり、第10図に
示すように、受信の完了までロウレベルに保持される。
次に、DMA入力データカウンタ24が0になっているか否
か、即ち全データの受信が完了したか否かの判断を行な
う(ステップ625)。データ受信の途中ではDMA入力デー
タカウンタ24は値0になっていないから、この場合に
は、受信用S/P変換レジスタ(RSR)33にデータが入力さ
れたか否かの判断を行なう(ステップ630)。
After the input completion flag is set to the value 0 in step 440 shown in FIG. 8, the process proceeds from step 320 to step 623, and the data reception signal RQR is set to the low level (= 0) via the serial communication controller 31. ). The data reception signal RQR is a signal indicating that the serial communication control device 3 is ready to receive data while it is held at the low level. As shown in FIG. 10, the data reception signal RQR remains at the low level until the reception is completed. Retained.
Next, it is judged whether or not the DMA input data counter 24 is 0, that is, whether or not the reception of all data is completed (step 625). Since the value of the DMA input data counter 24 is not 0 during the data reception, in this case, it is determined whether or not the data is input to the reception S / P conversion register (RSR) 33 (step 630). ).

データ受付信号RQRをチェックしてこれがロウレベル
であれば、トランスミッションECU5は、第9図に示した
データ送信処理ルーチンに従い、所定のタイミングでデ
ータを送信する。送信されたシリアル信号は、バッファ
30cを介して受信用S/P変換レジスタ(RSR)33に入力さ
れ、ここでパラレルデータに変換される。
If the data reception signal RQR is checked and if it is low level, the transmission ECU 5 transmits data at a predetermined timing according to the data transmission processing routine shown in FIG. The transmitted serial signal is buffered
The data is input to the reception S / P conversion register (RSR) 33 via 30c and converted into parallel data here.

受信用S/P変換レジスタ(RSR)33にデータが入力され
たことが検出されたとき、DMAコントローラ20は、ワー
ド単位で行なわれる通信において2バイト目を受信する
タイミングか否かを判断する(ステップ635)。まず、
1バイト目の受信を行なう場合には、このレジスタ(RS
R)33のデータを受信データレジスタ(RDR)34に移し
(ステップ636)、更にそのデータDMAバッファレジスタ
28に保存した上で(ステップ637)、ステップ600に戻っ
て上述した処理を再び繰り返す。
When it is detected that data is input to the reception S / P conversion register (RSR) 33, the DMA controller 20 determines whether or not it is the timing to receive the second byte in the communication performed in word units ( Step 635). First,
When receiving the first byte, this register (RS
R) 33 data is transferred to the receive data register (RDR) 34 (step 636), and the data DMA buffer register
After saving in 28 (step 637), the process returns to step 600 to repeat the above-mentioned processing again.

次に、トランスミッションECU5からデータが送信され
た場合には、ワード単位のデータの2バイト目に当たる
ので、ステップ635での判断は「YES」となり、受信用S/
P変換レジスタ33に取り込まれた入力データを、受信デ
ータレジスタ34に転送する(ステップ639)。この結
果、1バイト目のデータがDMAバッファレジスタ28に、
2バイト目のデータが受信データレジスタ(RDR)34
に、各々保管された状態となる。
Next, when data is transmitted from the transmission ECU 5, it corresponds to the second byte of the data in word units, so the determination in step 635 becomes “YES”, and the reception S /
The input data taken into the P conversion register 33 is transferred to the reception data register 34 (step 639). As a result, the data of the first byte is stored in the DMA buffer register 28,
The second byte of data is the receive data register (RDR) 34
It will be in the state of being stored respectively.

続いて、CPU11に対してその実行の中断を要求する信
号を入力する(ステップ640)。信号
を受け付けると、CPU11は、現在実行中の命令を終了し
た後、内部バス10を解放して停止する。そこで、CPU11
の実行中の命令が終了するのを検出し(ステップ64
5)、解放された内部バス10を利用してDMAコントローラ
20は、以下の処理を実行する。
Then, a signal requesting interruption of the execution is input to the CPU 11 (step 640). Upon receiving the signal, the CPU 11 releases the internal bus 10 and stops after finishing the instruction currently being executed. So CPU11
Detected that the executing instruction of
5), utilizing the released internal bus 10 DMA controller
20 executes the following processing.

即ち、DMA入力アドレスレジスタ22の値を1だけイン
クリメントし(ステップ650)、このレジスタ22が指し
示すRAM14のアドレスに、DMAバッファレジスタ28のデー
タ(ワードデータの1バイト目)をまずロードする(ス
テップ655)。次に、このバッファレジスタ28に、受信
データレジスタ(RDR)34のデータ、即ち、ワードデー
タの2バイト目をロードする(ステップ660)。
That is, the value of the DMA input address register 22 is incremented by 1 (step 650), and the data of the DMA buffer register 28 (first byte of word data) is first loaded into the address of the RAM 14 pointed to by this register 22 (step 655). ). Next, the data in the reception data register (RDR) 34, that is, the second byte of the word data is loaded into the buffer register 28 (step 660).

続いて、DMA入力アドレスレジスタ22の値を1だけイ
ンクリメントして(ステップ665)、そのアドレスに、D
MAバッファレジスタ28のデータ、即ちワードデータの2
バイト目を転送する(ステップ670)。こうして2バイ
ト分のデータの受信を完了してから、ステップ680にお
いてCPU11に対する停止要求信号を解除し(第1
0図参照)、その後、DMA入力データカウンタ24の値を1
だけデクリメントし(ステップ690)、ステップ600から
処理を繰り返す。この結果、1ワード2バイト分のデー
タがトランスミッションECU5から出力される毎に、CPU1
1を停止して、データのRAM14への転送がなされることに
なる。
Then, the value of the DMA input address register 22 is incremented by 1 (step 665), and D
Data of MA buffer register 28, that is, 2 of word data
The byte is transferred (step 670). In this way, after the reception of the data of 2 bytes is completed, the stop request signal to the CPU 11 is released in step 680 (first
(See Fig. 0), then set the value of DMA input data counter 24 to 1
Decrement only (step 690) and repeat the process from step 600. As a result, every time 1 word and 2 bytes of data is output from the transmission ECU 5, the CPU 1
Stop 1 and transfer data to RAM14.

こうしてワード単位で次々にデータの受信が行なわ
れ、予めDMA入力データカウンタ24に設定したワード数
だけ受信が行なわれた場合には、ステップ625における
判断は「YES」となるので、データは総て受信されたと
して、入力完了フラグに値1をセットし(ステップ69
5)、シリアル通信コントローラ31を介してデータ受付
信号RQRをハイレベル(=1)に設定し(ステップ69
8)、その後、再びステップ600から上述した処理を繰り
返す。
In this way, data is sequentially received word by word, and when the number of words set in the DMA input data counter 24 is received in advance, the determination in step 625 is “YES”, so that all data is received. The value 1 is set to the input completion flag on the assumption that it has been received (step 69).
5) Set the data reception signal RQR to high level (= 1) via the serial communication controller 31 (step 69).
8) After that, the above-mentioned processing is repeated from step 600 again.

尚、本実施例においては、ステップ623の処理が受信
可能通知手段に相当し、DMAバッファレジスタ28及び受
信データレジスタ34と、ステップ635,636637,及び639の
処理とが受信データ蓄積手段に相当し、ステップ640〜6
80の処理が受信データ転送手段に相当している。
In the present embodiment, the processing of step 623 corresponds to the receivable notification means, the DMA buffer register 28 and the reception data register 34, and the processing of steps 635, 636637, and 639 correspond to the reception data storage means. , Steps 640-6
The processing of 80 corresponds to the reception data transfer means.

以上説明したように、本実施例のシリアル通信制御装
置3によるデータの受信は、トランスミッションECU5が
データ受信信号RQRを受けてデータを出力すると1ワー
ド毎に、CPU11をDMAコントローラ20の5ステップ分(第
11図参照、本実施例ではおよそ2[μsec]弱)停止す
るだけで、データを受信することができる。従って、ユ
ーザプログラムにおける通信制御の負荷はほとんどな
く、任意のタイミングで高速にデータを受信することが
できる。この結果、トランスミッションECU5にとって、
任意のタイミングでシリアルデータの送信処理が可能と
なり、プログラムの負担が軽減され、かつ高速にデータ
を出力することができる。
As described above, when the transmission ECU 5 receives the data reception signal RQR and outputs the data, the CPU 11 sends the data to the CPU 11 for the five steps of the DMA controller 20 for each step of the data reception by the serial communication control device 3 of the present embodiment. First
The data can be received only by stopping the operation (see FIG. 11, about 2 [μsec] in this embodiment). Therefore, there is almost no communication control load on the user program, and data can be received at high speed at any timing. As a result, for the transmission ECU5,
The serial data transmission process can be performed at an arbitrary timing, the load on the program can be reduced, and the data can be output at high speed.

以上説明したように、本実施例のシリアル通信制御装
置3によれば、トランスミッションECU5とのシリアル通
信を、極めて高速かつCPU11の負担を極めて小さくして
実行することができる。しかも、通信相手でありCPU51
によってデータの送受信が制御されるトランスミッショ
ンECU5は、任意のタイミングでシリアルデータの受信処
理及び送信処理を実行することができるため、トランス
ミッションECU5においても、CUP51が実行するプログラ
ムの負担が軽減され、この結果、制御応答性に極めて優
れた分散型制御システムを構築することができる。
As described above, according to the serial communication control device 3 of the present embodiment, serial communication with the transmission ECU 5 can be executed at an extremely high speed and with an extremely small load on the CPU 11. Moreover, the communication partner, CPU51
The transmission ECU 5 whose transmission and reception of data is controlled by the transmission ECU 5 can execute the serial data reception process and the transmission process at any timing, so that the transmission ECU 5 also reduces the load on the program executed by the CUP 51. Thus, it is possible to construct a distributed control system with extremely excellent control response.

尚、本実施例のシリアル通信制御装置3は、同様の構
成を有するシリアル通信制御装置3と接続して、より高
速な通信を実現することもできる。第12図は、この場合
の接続状態を示すブロック図である。シリアル通信制御
装置3は、互いにデータ送信要求信号RQTがロウレベル
である間、相手方のシリアル通信制御装置3に所定のイ
ンターバルTでデータを送信し、自分のデータ受付信号
RQRをロウレベルに保持している間、相手方からのシリ
アルデータを受信する。そのタイミングチャートを第13
図に示す。尚、信号CLKは、クロックであり、シリアル
データはこのクロックCLKに同期して出力される。
The serial communication control device 3 of the present embodiment can also be connected to the serial communication control device 3 having the same configuration to realize higher speed communication. FIG. 12 is a block diagram showing a connection state in this case. The serial communication control device 3 transmits data to the serial communication control device 3 of the other party at a predetermined interval T while the data transmission request signal RQT is at a low level, and the serial communication control device 3 receives its own data acceptance signal.
Receives serial data from the other party while holding RQR low. The 13th timing chart
Shown in the figure. The signal CLK is a clock, and the serial data is output in synchronization with this clock CLK.

以上本発明の実施例について説明したが、本発明はこ
うした実施例に何等限定されるのではなく、例えば複数
のシリアル通信制御装置をネットワーク化した構成等、
本発明の要旨を逸脱しない範囲において、種々なる態様
で実施し得ることは勿論である。
Although the embodiments of the present invention have been described above, the present invention is not limited to these embodiments. For example, a configuration in which a plurality of serial communication control devices are networked,
Needless to say, the present invention can be implemented in various modes without departing from the scope of the present invention.

発明の効果 以上詳述したように、本発明のシリアル通信制御装置
によれば、中央処理装置の負荷を最小限に押さえて、高
速なシリアル通信を実現することができるという優れた
効果を奏する。しかも、通信相手である他の通信制御装
置は、自分の都合が良い任意のタイミングでデータの送
受信を行なうことができるため、当該他の通信制御装置
側においても、制御対象を制御するため処理実行に支障
をきたすことがない。
Effects of the Invention As described in detail above, according to the serial communication control device of the present invention, there is an excellent effect that the load on the central processing unit can be minimized and high-speed serial communication can be realized. Moreover, since the other communication control device, which is a communication partner, can send and receive data at an arbitrary timing convenient for itself, the other communication control device also executes processing for controlling the controlled object. It does not hinder the operation.

従って、本発明のシリアル通信制御装置によれば、制
御応答性に極めて優れた分散型制御システムを構築する
ことができるようになる。
Therefore, according to the serial communication control device of the present invention, it is possible to construct a distributed control system having extremely excellent control response.

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

第1図は実施例としてのシリアル通信制御装置3を組み
込んだエンジンECU1とトランスミッションECU5との内部
構成を示すブロック図、第2図は内燃機関71と自動変速
機75との概略構成図、第3図はシリアル通信において用
いられるデータの構成を説明する説明図、第4図はエン
ジンECU1のCPU11が実行する出力処理を示すフローチャ
ート、第5図はトランスミッションECU5のCPU51が実行
するデータ受信処理ルーチンを示すフローチャート、第
6図は通信の状態を示すタイミングチャート、第7図は
シリアル通信制御装置3のDMAコントローラ20が実行す
るDMAデータ送信処理ルーチンを示すフローチャート、
第8図はエンジンECU1のCPU11が実行する入力処理を示
すフローチャート、第9図はトランスミッションECU5の
CPU51が実行するデータ送信処理ルーチンを示すフロー
チャート、第10図は通信の状態を示すタイミングチャー
ト、第11図はシリアル通信制御装置3のDMAコントロー
ラ20が実行するDMAデータ受信処理ルーチンを示すフロ
ーチャート、第12図はシリアル通信制御装置3同士の接
続状態を示すブロック図、第13図はその場合の通信の様
子を示すタイミングチャート、である。 1……エンジンECU 3……シリアル通信制御装置 5……トランスミッションECU 10……内部バス 11……CPU 14……RAM 20……DMAコントローラ 22……DMA入力アドレスレジスタ 23……DMA出力アドレスレジスタ 24……DMA入力データカウンタ 25……DMA出力データカウンタ 28,29……DMAバッファレジスタ 31……シリアル通信コントローラ 33……受信用S/P変換レジスタ 34……受信データレジスタ 36……送信データレジスタ 37……送信用P/S変換レジスタ 51……CPU
FIG. 1 is a block diagram showing an internal configuration of an engine ECU 1 and a transmission ECU 5 incorporating a serial communication control device 3 as an embodiment, and FIG. 2 is a schematic configuration diagram of an internal combustion engine 71 and an automatic transmission 75. FIG. 4 is an explanatory diagram for explaining the configuration of data used in serial communication, FIG. 4 is a flowchart showing an output process executed by the CPU 11 of the engine ECU 1, and FIG. 5 is a data reception process routine executed by the CPU 51 of the transmission ECU 5. A flow chart, FIG. 6 is a timing chart showing a communication state, FIG. 7 is a flow chart showing a DMA data transmission processing routine executed by the DMA controller 20 of the serial communication control device 3,
FIG. 8 is a flow chart showing an input process executed by the CPU 11 of the engine ECU 1, and FIG. 9 is a flow chart of the transmission ECU 5.
10 is a flowchart showing a data transmission processing routine executed by the CPU 51, FIG. 10 is a timing chart showing a communication state, and FIG. 11 is a flowchart showing a DMA data reception processing routine executed by the DMA controller 20 of the serial communication control device 3. FIG. 12 is a block diagram showing a connection state between the serial communication control devices 3, and FIG. 13 is a timing chart showing a communication state in that case. 1 …… Engine ECU 3 …… Serial communication control device 5 …… Transmission ECU 10 …… Internal bus 11 …… CPU 14 …… RAM 20 …… DMA controller 22 …… DMA input address register 23 …… DMA output address register 24 ...... DMA input data counter 25 …… DMA output data counter 28,29 …… DMA buffer register 31 …… Serial communication controller 33 …… Reception S / P conversion register 34 …… Reception data register 36 …… Transmission data register 37 ...... Sending P / S conversion register 51 …… CPU

Claims (1)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】中央処理装置によりデータを随時読み書き
し得る随時記憶手段に対してアドレスおよびデータのや
りとりを仲介するバスに接続され、他の通信制御装置と
データの送受信を行なうシリアル通信制御装置であっ
て、 送信すべきデータを複数個格納するための送信データ格
納手段と、 前記他の通信制御装置からのデータの送信要求を検出す
る送信要求検出手段と、 該送信要求検出手段により前記送信要求が検出される毎
に、前記送信データ格納手段に格納されているデータを
1個ずつ送信するデータ送信手段と、 前記送信要求検出手段により前記送信要求が検出された
時に、前記送信データ格納手段にデータが格納されてい
なければ、前記バスを占有して前記随時記憶手段から送
信すべき複数個のデータを読み出し、該データを前記送
信データ格納手段に格納して、前記データ送信手段を作
動させる送信データ準備手段と、 前記他の通信制御装置に対してデータの受信可能を通知
する受信可能通知手段と、 該受信可能通知手段による前記受信可能通知に対応して
前記他の通信制御装置から送信されるデータを、複数個
単位で蓄積する受信データ蓄積手段と、 該受信データ蓄積手段にデータが前記複数個分だけ蓄積
された時に、前記バスを占有して前記随時記憶手段に前
記受信データ蓄積手段内のデータを転送する受信データ
転送手段と、 を備えたことを特徴とするシリアル通信制御装置。
1. A serial communication control device, which is connected to a bus that mediates the exchange of addresses and data with respect to an occasional storage means capable of reading and writing data at any time by a central processing unit, and which transmits and receives data to and from other communication control devices. Transmission data storage means for storing a plurality of data to be transmitted, transmission request detection means for detecting a data transmission request from the other communication control device, and the transmission request detection means for transmitting the transmission request. Data transmission means for transmitting the data stored in the transmission data storage means one by one each time when the transmission request is detected by the transmission request detection means. If no data is stored, the bus is occupied and a plurality of data to be transmitted are read out from the storage means at any time, and the data are stored in advance. Transmission data preparation means for operating the data transmission means by storing it in the transmission data storage means, receivable notification means for notifying the other communication control device that data can be received, and the receivable notification means And a reception data accumulating unit for accumulating data transmitted from the other communication control device in units of a plurality of units in response to the receivable notification by A serial communication control device comprising: a reception data transfer means for occupying the bus and transferring the data in the reception data storage means to the storage means at any time.
JP63013178A 1988-01-22 1988-01-22 Serial communication controller Expired - Lifetime JP2518336B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP63013178A JP2518336B2 (en) 1988-01-22 1988-01-22 Serial communication controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP63013178A JP2518336B2 (en) 1988-01-22 1988-01-22 Serial communication controller

Publications (2)

Publication Number Publication Date
JPH01189256A JPH01189256A (en) 1989-07-28
JP2518336B2 true JP2518336B2 (en) 1996-07-24

Family

ID=11825931

Family Applications (1)

Application Number Title Priority Date Filing Date
JP63013178A Expired - Lifetime JP2518336B2 (en) 1988-01-22 1988-01-22 Serial communication controller

Country Status (1)

Country Link
JP (1) JP2518336B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5895434B2 (en) * 2011-10-07 2016-03-30 スズキ株式会社 Internal combustion engine operating state detection device

Also Published As

Publication number Publication date
JPH01189256A (en) 1989-07-28

Similar Documents

Publication Publication Date Title
US5490064A (en) Control unit for vehicle and total control system therefor
US6591167B1 (en) Control unit for vehicle and total control system therefor
US4371924A (en) Computer system apparatus for prefetching data requested by a peripheral device from memory
JP3538867B2 (en) A / D conversion control device for internal combustion engine
US5586034A (en) Data communication equipment for transferring data
US6334080B1 (en) Vehicle control apparatus and method sharing control data
EP1063594A2 (en) An interrupt controller and a microcomputer incorporating this controller
JPH08249021A (en) Data input and output processor for multi-cpu system
JPS6158841B2 (en)
US7930523B2 (en) Inter-CPU data transfer device
JP2518336B2 (en) Serial communication controller
EP1022657B1 (en) Electronic control apparatus operable on object-oriented program
JP2993270B2 (en) Data transmitting device and receiving device
US5586336A (en) Microcomputer capable of monitoring internal resources from external
US5678036A (en) Graphics system and method for minimizing idle time of a controller of the graphics system
JP3186150B2 (en) Data transfer device
US5677859A (en) Central processing unit and an arithmetic operation processing unit
JP3562126B2 (en) DMA controller
JP3050337B2 (en) Electronic control unit for internal combustion engine
JPS62274851A (en) Serial communication control equipment
JPH07312627A (en) Data transfer method for serial communication between two cpus
JPH08180031A (en) Data communication equipment
JP2671768B2 (en) DMA data transfer method
JPS6118002A (en) Concentrated controller using microcomputer
JPH06242964A (en) Interruption processing system and microcomputer