JP3271270B2 - Data communication device - Google Patents

Data communication device

Info

Publication number
JP3271270B2
JP3271270B2 JP28667291A JP28667291A JP3271270B2 JP 3271270 B2 JP3271270 B2 JP 3271270B2 JP 28667291 A JP28667291 A JP 28667291A JP 28667291 A JP28667291 A JP 28667291A JP 3271270 B2 JP3271270 B2 JP 3271270B2
Authority
JP
Japan
Prior art keywords
data
communication
reference timing
line
transmission
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 - Fee Related
Application number
JP28667291A
Other languages
Japanese (ja)
Other versions
JPH05128017A (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
Denso 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 Denso Corp filed Critical Denso Corp
Priority to JP28667291A priority Critical patent/JP3271270B2/en
Publication of JPH05128017A publication Critical patent/JPH05128017A/en
Application granted granted Critical
Publication of JP3271270B2 publication Critical patent/JP3271270B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【産業上の利用分野】本発明は、送・受信装置によりデ
ジタルデータの送・受信を行なうデータ通信装置に関す
る。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a data communication device for transmitting and receiving digital data by a transmitting and receiving device.

【0002】[0002]

【従来の技術】従来より、この種のデータ通信装置とし
て、例えば特開平2−62601号公報に開示されてい
る如く、データ通信時に送信データの一致を照合し、不
一致の場合はデータを再送信することによりデータ通信
を復旧するように構成されたデータ通信装置が知られて
いる。
2. Description of the Related Art Conventionally, as a data communication apparatus of this type, for example, as disclosed in Japanese Patent Application Laid-Open No. 2-62601, matching of transmitted data is verified at the time of data communication, and if not, data is retransmitted. 2. Description of the Related Art There is known a data communication device configured to restore data communication by performing a communication.

【0003】[0003]

【発明が解決しようとする課題】しかしこうした従来の
データ通信装置では、異常検出のためのデータを、デー
タ伝送用のデータ線を用いて送信していたため、異常検
出データ伝送に時間がかかり、データ通信を高速に行う
ことができなかった。
However, in such a conventional data communication apparatus, data for abnormality detection is transmitted by using a data transmission data line, so that it takes a long time to transmit the abnormality detection data. Communication could not be performed at high speed.

【0004】つまり例えば複数のCPUを使ってエンジ
ン等を制御する車両用電子制御装置等においては、制御
精度を向上するために、多くのデータを高速で送信でき
るようにすることが要求されているが、上記従来の装置
では、異常検出用のデータと通信データとを同じデータ
線を使って送信しているため、データ線の使用効率が悪
く、送信側で異常を速やかに検出できずに通信の正常復
旧が遅れると共に、データ通信を高速に行うことができ
ないといった問題があった。
That is, for example, in a vehicle electronic control device or the like that controls an engine or the like using a plurality of CPUs, it is required to transmit a large amount of data at high speed in order to improve control accuracy. However, in the above-described conventional device, the data for abnormality detection and the communication data are transmitted using the same data line, so the use efficiency of the data line is poor, and the communication is performed without the abnormality being detected quickly on the transmission side. However, there is a problem that the normal recovery of the communication is delayed and that data communication cannot be performed at high speed.

【0005】本発明は、こうした問題に鑑みなされたも
ので、デジタルデータの送受信を行なうデータ通信装置
において、通信異常発生時に速やかに正常復旧すること
ができ、しかも通信を高速で行うことができるようにす
ることを目的としている。
SUMMARY OF THE INVENTION The present invention has been made in view of the above-mentioned problems, and in a data communication apparatus for transmitting and receiving digital data, it is possible to quickly restore normal operation when a communication error occurs, and to perform high-speed communication. It is intended to be.

【0006】[0006]

【課題を解決するための手段】即ち、上記目的を達成す
るためになされた本発明は、図1に例示する如く、デー
タ伝送を行うためのデータ線と、デジタルデータを上記
データ線上に送信する送信装置と、上記データ線を介し
て上記送信装置からのデジタルデータを受信する受信装
置とを備えたデータ通信装置において、上記送信装置と
受信装置との間に基準タイミング線と基準タイミング要
求線とを設けると共に、上記送信装置を、上記受信装置
に送信すべき複数のデジタルデータを、該各デジタルデ
ータを送信すべき周期に応じて区分した複数のデータ群
毎に、該周期に応じて予め設定されたスケジュールに従
って上記データ線上に送信し、且つ、予め設定された特
定のデータ群の送信時には、基準タイミング通信である
として、その旨を上記基準タイミング線を介して上記受
信装置に通知するよう構成し、更に、上記受信装置に、
上記送信装置から送信されてきたデジタルデータの異常
を検出する異常検出手段と、該異常検出手段にて異常が
検出されると、上記基準タイミング要求線を介して、上
記送信装置に上記基準タイミング通信を要求する基準タ
イミング通信要求手段とを設け、上記送信装置には、上
記基準タイミング要求線を介して上記受信装置から基準
タイミング通信が要求されると、その後のデータ送信
を、上記特定のデータ群から開始することで、データ通
信を復旧させるデータ通信復旧手段を設けたことを特徴
とするデータ通信装置。
That is, according to the present invention, which has been made to achieve the above object, as shown in FIG. 1, a data line for performing data transmission and digital data are transmitted on the data line. In a data communication device comprising a transmitting device and a receiving device for receiving digital data from the transmitting device via the data line, a reference timing line and a reference timing requirement are provided between the transmitting device and the receiving device.
And a transmitting device, wherein the transmitting device is connected to the receiving device.
A plurality of digital data to be transmitted to
Data groups divided according to the data transmission cycle
Every time, according to a schedule set in advance according to the cycle.
On the data line, and
When transmitting a fixed data group, the reference timing communication is used.
The above fact is received via the reference timing line.
To notify the receiving device , further, to the receiving device,
And abnormality detecting means for detecting an abnormality of the digital data transmitted from the transmitting apparatus, the abnormality in the abnormal detection means
When it is detected, the upper
A reference tag for requesting the transmitting device to perform the reference timing communication.
It provided a timing communication request means, to the transmission apparatus, the upper
Reference from the receiver via the reference timing request line
When timing communication is requested, subsequent data transmission
A data communication restoring means for restoring data communication by starting from the specific data group .

【0007】[0007]

【作用及び発明の効果】以上のように構成された本発明
のデータ通信装置においては、送信装置がデータ線を介
して受信装置に送信する複数のデジタルデータが、送信
すべき周期に応じて複数のデータ群に区分されており、
送信装置は、各データ群のデジタルデータを、送信すべ
き周期に応じて予め設定されたスケジュールに従って、
データ線上に送信する。また、送信装置は、予め設定さ
れた特定のデータ群の送信時には、基準タイミング通信
であるとして、その旨を基準タイミング線を介して受信
装置に通知する。この結果、受信装置側では、この基準
タイミング線を介して、現在送信装置から送信されてい
るデータ群が基準タイミング通信による特定のデータ群
であることを検知し、その後送信装置から送信されてく
るデータ群についても上記スケジュールに基づき検知で
きることになる。つまり、本発明では、基準タイミング
線を用いて、受信装置側でのデジタルデータの受信動作
を送信装置側での送信動作に同期させることができる。
一方、受信装置側では、異常検出手段が、送信装置から
送信されてきたデジタルデータの異常を監視しており、
異常検出手段がそのデジタルデータの異常を検出する
と、基準タイミング通信要求手段が、基準タイミング要
求線を介して、送信装置に基準タイミング通信を要求す
る。すると、送信装置側では、データ通信復旧手段が、
その後のデータ送信を、特定のデータ群の送信を行う基
準タイミング通信から開始することで、データ通信を復
旧させる。この結果、受信装置側で送信装置から送信さ
れてきたデジタルデータの異常を検出すると、送信装置
からの次回のデータ送信は、必ず基準タイミング通信用
の特定のデータ群となり、その後は、通常通り、上記ス
ケジュールに従って、各データ群のデジタルデータが送
信装置から受信装置に送信されることになる。そして、
基準タイミング通信では、上記のように、基準タイミン
グ線を介して送信装置から受信装置にその旨が通知され
るので、受信装置側では、基準タイミング線からの通知
によって、デジタルデータの異常検出後、送信装置から
のデジタルデータの送信が正常に復旧したことを速やか
に検知し、通常通りのデータ受 信動作に入ることができ
る。つまり、送信装置−受信装置間でデータ通信の同期
をとる場合、従来では、実際のデータ通信に先だって、
データ線を用いて同期用データを送受信するが、この方
法では、データ通信を開始するまでに時間がかかる。そ
して、この問題は、データ通信の異常検出後、正常に復
旧させる場合も同様に発生する。しかし、本発明では、
基準タイミング要求線を用いて受信装置側から送信装置
側へ通信異常を報知し、送信装置側では、この報知に従
い、その後のデータ通信を基準タイミング通信から開始
し、同時に、受信装置側への基準タイミング通信を通知
することから、異常発生後に、データ通信を速やかに正
常に復旧させることができるようになるのである。
In the data communication apparatus according to the present invention having the above-described structure, the transmitting device is connected to the data line.
Digital data to be transmitted to the receiving device
It is divided into multiple data groups according to the cycle to be
The transmitting device should transmit the digital data of each data group.
According to the schedule set in advance according to the cycle,
Transmit on data line. Also, the transmitting device is set in advance.
When transmitting the specified data group, the reference timing communication
Is received via the reference timing line.
Notify the device. As a result, the receiving device
Currently being transmitted from the transmitter via the timing line
Data group is a specific data group by reference timing communication
Is detected, and then transmitted from the transmitting device.
Data groups can be detected based on the above schedule.
Will be able to. That is, in the present invention, the reference timing
Operation of receiving digital data on the receiving device side using a wire
Can be synchronized with the transmission operation on the transmission device side.
On the other hand, on the receiving device side, the abnormality detecting means
We monitor the abnormalities of the transmitted digital data,
Anomaly detection means detects anomalies in the digital data
And the reference timing communication requesting means
Request reference timing communication from the transmitting device via the line
You. Then, on the transmitting device side, the data communication recovery means
Subsequent data transmission is based on a specific data group transmission.
By starting from the quasi-timing communication, the data communication is restored. As a result, the receiving device transmits the
When an error is detected in the received digital data, the transmission device
The next data transmission from is always for reference timing communication
After that, as usual, the above data
Digital data of each data group is transmitted according to the schedule.
This is transmitted from the transmitting device to the receiving device. And
In the reference timing communication, as described above, the reference timing
The transmitting device notifies the receiving device via the
Therefore, on the receiving device side, the notification from the reference timing line
From the transmitting device after detecting abnormalities in digital data
That the transmission of digital data has been successfully restored
Was detected, it can enter the data reception operation as normal
You. In other words, synchronization of data communication between the transmitting device and the receiving device
Conventionally, prior to actual data communication,
Synchronous data is transmitted and received using the data line.
In the law, it takes time to start data communication. So
This problem can be restored normally after detecting an abnormality in data communication.
The same applies to the old case. However, in the present invention,
Transmitter from receiver side using reference timing request line
Side to notify the communication error, and the transmitting device follows this notification.
Start the subsequent data communication from the reference timing communication
At the same time, inform the receiver of the reference timing communication
Data communication immediately after an error occurs.
They can always be restored.

【0008】[0008]

【実施例】以下に本発明の実施例を図面と共に説明す
る。まず図2は本発明が適用された実施例の車両用エン
ジン制御装置の構成を表すブロック図である。
Embodiments of the present invention will be described below with reference to the drawings. First, FIG. 2 is a block diagram showing a configuration of a vehicle engine control device according to an embodiment to which the present invention is applied.

【0009】図2に示す如く、本実施例の車両用エンジ
ン制御装置は、燃料噴射量制御,アイドル回転制御,燃
料ポンプ制御,バルブ駆動制御,過給圧制御,故障診断
制御等を行なう電子制御回路(ECU)10と、点火時
期制御,ノック制御,過給圧演算等を行なう電子制御回
路(ECU)20とから構成されている。
As shown in FIG. 2, the vehicle engine control apparatus according to the present embodiment includes electronic control for performing fuel injection amount control, idle rotation control, fuel pump control, valve drive control, supercharging pressure control, failure diagnosis control, and the like. A circuit (ECU) 10 and an electronic control circuit (ECU) 20 for performing ignition timing control, knock control, supercharging pressure calculation, and the like.

【0010】ECU10は、スタートスイッチ,クラッ
チスイッチ等の各種スイッチ信号を入力するための入力
バッファ11、回転数センサ,気筒判別センサ等からの
パルス信号を波形整形して入力する波形整形回路12、
吸気管圧力,冷却水温等を検出する各種センサからのア
ナログ信号をデジタル信号に変換して入力するA/D変
換器13、燃料噴射弁,アイドルスピードコントロール
バルブ等の駆動信号を出力する出力ドライバ14、これ
ら各部に接続されたI/Oポート15、I/Oポート1
5を介して上記スイッチ信号やセンサ信号を取り込んで
エンジン制御のための演算処理を行ない、出力ドライバ
14から各種駆動信号を出力させるCPU16、CPU
16にて演算処理を行うためのプログラムや各種データ
が予め格納されたROM17、及びCPU16にて演算
処理を行なう際にデータが一時的に格納されるRAM1
8により構成されており、ECU20も、ECU10と
同様、入力バッファ21、波形整形回路22、A/D変
換器23、出力ドライバ24、I/Oポート25、CP
U26、ROM27、及びRAM28により構成されて
いる。
The ECU 10 includes an input buffer 11 for inputting various switch signals such as a start switch and a clutch switch, a waveform shaping circuit 12 for shaping and inputting pulse signals from a rotation speed sensor, a cylinder discriminating sensor, and the like.
A / D converter 13 for converting analog signals from various sensors for detecting intake pipe pressure, cooling water temperature, etc. into digital signals and inputting them, and output driver 14 for outputting drive signals for fuel injection valves, idle speed control valves, etc. , I / O port 15 and I / O port 1 connected to these components
A CPU 16 which takes in the switch signal and the sensor signal through the CPU 5 to perform arithmetic processing for engine control, and causes the output driver 14 to output various drive signals;
A ROM 17 in which a program and various data for performing arithmetic processing are stored in advance in the RAM 16 and a RAM 1 in which data is temporarily stored when performing arithmetic processing in the CPU 16
The ECU 20 includes an input buffer 21, a waveform shaping circuit 22, an A / D converter 23, an output driver 24, an I / O port 25, and a CP, similarly to the ECU 10.
U26, ROM27, and RAM28.

【0011】ここで上記各CPU16,26は、通信機
能を有し、同期式のシリアル通信により双方向にデータ
通信を行う。即ち、本実施例においては、CPU16が
マスタ、CPU26がスレーブと定義されており、各C
PU16、26間が、マスタ側からスレーブ側に通信用
のクロック信号を供給するための通信専用クロック線
A、マスタ側からスレーブ側にデジタルデータを送信す
るためのデータ線B、スレーブ側からマスタ側にデジタ
ルデータを送信するためのデータ線C、マスタ側からス
レーブ側に現在基準タイミング通信を行っている旨を知
らせるための基準タイミング線D、スレーブ側からマス
タ側に基準タイミング通信を要求するための基準タイミ
ング要求線E、及びスレーブ側からマスタ側にデジタル
データの受信処理を完了した旨を知らせるための受信完
了信号線Fにより接続されている。
Each of the CPUs 16 and 26 has a communication function and performs bidirectional data communication by synchronous serial communication. That is, in the present embodiment, the CPU 16 is defined as a master and the CPU 26 is defined as a slave.
A communication dedicated clock line A for supplying a communication clock signal from the master side to the slave side, a data line B for transmitting digital data from the master side to the slave side, and a slave side to the master side between the PUs 16 and 26. A data line C for transmitting digital data to the master, a reference timing line D for notifying the master side to the slave side that the reference timing communication is currently being performed, and a slave line for requesting the master side for the reference timing communication. It is connected by a reference timing request line E and a reception completion signal line F for notifying that the digital data reception processing has been completed from the slave side to the master side.

【0012】そして各CPU16,26は、図3に示す
如く、一回の通信で8ビットのデジタルデータを同時に
送受信するために、データ線B,Cにより接続された8
ビットのシフトレジスタ16a,26aを備えており、
マスタ側CPU16による通信制御の下で、まず送信す
べきデジタルデータを各シフトレジスタ16a,26a
にストアしておき、通信用のクロック信号により各シフ
トレジスタ16a,26a内の送信データを1ビットづ
つシフトして、各データ線B,C上に送出することによ
り、送信データを他方のシフトレジスタ26a,16a
に転送する、といった手順でデータ送信を行なう。また
データ送信後は、他方のCPUからの送信データがシフ
トレジスタにストアされた状態となるので、そのデータ
(受信データ)を受信バッファに取り込む。
As shown in FIG. 3, the CPUs 16 and 26 are connected by data lines B and C to simultaneously transmit and receive 8-bit digital data in one communication.
Bit shift registers 16a and 26a,
Under communication control by the master CPU 16, first, digital data to be transmitted is stored in each shift register 16a, 26a.
The transmission data in each of the shift registers 16a and 26a is shifted one bit at a time by a communication clock signal and sent out onto each of the data lines B and C, thereby transmitting the transmission data to the other shift register. 26a, 16a
The data is transmitted in such a procedure as to transfer the data. After the data transmission, the transmission data from the other CPU is stored in the shift register, and the data (reception data) is taken into the reception buffer.

【0013】またこのように各CPU16,26は、シ
フトレジスタ16a、26aを用いてデジタルデータを
相互に交換することによりデータ通信を行うため、各E
CU10,20のROM17,27内には、データ交換
を行なうデータの種類,順序,データ量等を表すデータ
リストが、予め設定されたデータ通信の種類毎に記憶さ
れている。
As described above, the CPUs 16 and 26 perform data communication by exchanging digital data with each other using the shift registers 16a and 26a.
In the ROMs 17 and 27 of the CUs 10 and 20, data lists indicating types, orders, data amounts, and the like of data to be exchanged are stored for each type of data communication set in advance.

【0014】即ち、本実施例では、エンジン制御実行時
に、スロットル開度,バッテリ電圧,スイッチ入力等の
高速でデータ交換の必要なデータを8msec.毎のデータ
通信(基準タイミング通信)で、冷却水温や大気圧等の
高速でデータ交換をする必要のないデータを32msec.
毎のデータ通信で、その中間のデータを16msec.毎の
データ通信で、夫々、データ交換するようにされてお
り、このために各ROM17,27内には、これら各デ
ータ通信の種類毎に、データ交換を行なうデータの種
類,順序,データ量等を表すデータリストが格納されて
いるのである。
That is, in this embodiment, when the engine control is executed, the data required for high-speed data exchange such as the throttle opening, the battery voltage, and the switch input is transmitted by data communication (reference timing communication) every 8 msec. 32 msec. For data that does not need to be exchanged at high speed such as air pressure and atmospheric pressure.
In each data communication, the intermediate data is exchanged by the data communication every 16 msec., Respectively. Therefore, in each of the ROMs 17 and 27, for each of these types of data communication, A data list indicating the type, order, data amount, and the like of the data to be exchanged is stored.

【0015】尚本実施例のデータ通信はマスタ側CPU
16の制御の下に行われるため、ECU10のROM1
7内には、データ通信を開始する際にデータ通信の種類
を決定するためのスケジュールデータが格納されてい
る。また各CPU16,26は、エンジン制御のための
データ通信の他、エンジン制御用コンピュータの組立時
や車両点検の際にも、各作業に必要なデータ通信を行え
るようにされており、そのために、エンジン制御のため
の通常通信モード,組立工場内での検査用通信モード,
及び修理のためのサービス通信モード,の3種の通信モ
ードが予め設定されており、これら各通信モード毎に、
上記スケジュールデータ及びデータリストが作成されて
いる。
The data communication of this embodiment is performed by the master CPU.
16 is performed under the control of the ROM 10 of the ECU 10.
7 stores schedule data for determining the type of data communication when starting data communication. In addition, the CPUs 16 and 26 can perform data communication necessary for each work in assembling the engine control computer and in checking the vehicle in addition to data communication for engine control. Normal communication mode for engine control, communication mode for inspection in assembly plant,
And service communication modes for repair are preset, and for each of these communication modes,
The schedule data and the data list have been created.

【0016】以下、上記のようにマスタ側CPU16に
よる制御の下で実行されるデータ通信について、図4〜
図12に示すフローチャートに沿って説明する。まず図
4はマスタCPUにて4msec.毎に実行されるデータ送
信開始処理を表すフローチャートである。
The data communication executed under the control of the master CPU 16 as described above will now be described with reference to FIGS.
This will be described with reference to the flowchart shown in FIG. First, FIG. 4 is a flowchart showing a data transmission start process executed by the master CPU every 4 msec.

【0017】図に示す如くこの処理が開始されるとまず
S10にて、前回の通信より所定時間(例えば4.09
6msec.)以上経過しているかどうかをチェックし、所
定時間以上経過していればS11に移行する。S11で
は、図5に示す如く、基準タイミング要求線EがLow レ
ベルでスレーブ側より基準タイミング通信の要求がある
か否か(S110)、RAM18内に格納されている通
信カウンタの値が設計値以外の異常な値となっているか
否か(S111)、及びRAM18内に格納されている
現在の通信モードを表すデータが前述の3種の通信モー
ド以外のデータとなっているか否か(S112)を夫々
判断し、これら各判断処理のいずれかで肯定判断された
場合には、何等かの異常が発生しているものとして基準
タイミング通信を行うための基準タイミングフラグをセ
ットする(S113)、といった手順でRAM値のチェ
ック処理を行なう。
As shown in the figure, when this process is started, first, in S10, a predetermined time (for example, 4.09) has elapsed since the previous communication.
(6 msec.) Or more is checked, and if it is more than a predetermined time, the process proceeds to S11. In S11, as shown in FIG. 5, whether the reference timing request line E is at the low level and there is a request for reference timing communication from the slave side (S110), the value of the communication counter stored in the RAM 18 is other than the design value. (S112), and whether the data representing the current communication mode stored in the RAM 18 is data other than the above three communication modes (S112). Each procedure is determined, and if an affirmative decision is made in any of these decision processes, a procedure is performed such that it is determined that some abnormality has occurred and a reference timing flag for performing reference timing communication is set (S113). To check the RAM value.

【0018】次に続くS12では、S11にて異常が判
定されたか否かを判断し、異常が判定されていれば後述
のS18に移行し、異常が判定されていなければS13
に移行して、前回の通信は完了しているか否かを判断す
る。そして通信処理が処理遅れ等で、前回の通信が今回
の通信開始タイミングまで影響している場合には、新た
な通信は開始せずにスキップし、S22にてそのスキッ
プ回数をカウントする。そして続くS23にて、そのカ
ウントしたスキップ回数から通信のスキップが連続して
所定回以上起こったか否かを判断し、スキップが連続し
て所定回以上起こっている場合には、CPU間の通信処
理において何等かの異常(例えばスレーブ側CPU26
の暴走で正常な通信ができなくなった)が発生したもの
として、システムリセットをかけ、そうでなければその
まま処理を終了する。
In the following S12, it is determined whether or not an abnormality has been determined in S11. If an abnormality has been determined, the process proceeds to S18 described below.
Then, it is determined whether or not the previous communication has been completed. If the previous communication has affected the current communication start timing due to a processing delay or the like in the communication processing, a new communication is skipped without starting, and the number of skips is counted in S22. Then, in S23, it is determined from the counted number of skips whether or not communication skipping has occurred continuously a predetermined number of times or more. Some error (for example, the slave CPU 26
The system reset is performed assuming that the normal communication has failed due to the runaway of the system), and otherwise the processing is terminated.

【0019】一方S13にて前回の通信が完了している
と判断された場合には、S14に移行して、前回の通信
でスレーブCPU26より転送されてきた受信バッファ
上の受信データを全て加算する周知のチェックサム演算
を行ない、S15にてその演算結果と受信データ内の最
終データであるミラーコードとから、チェックサムエラ
ーをチェックする。そしてチェックサムエラーが発生し
ていなければ、S16にて受信データのRAM18への
書き込み処理を行った後、S18に移行し、チェックサ
ムエラーが発生していれば、S17にてエラー回数のカ
ウント処理を行ない、S18に移行する。
On the other hand, if it is determined in S13 that the previous communication has been completed, the flow shifts to S14 to add all the received data in the reception buffer transferred from the slave CPU 26 in the previous communication. A well-known checksum calculation is performed, and in S15, a checksum error is checked based on the calculation result and the mirror code which is the last data in the received data. If the checksum error has not occurred, the process of writing the received data into the RAM 18 is performed in S16, and then the process proceeds to S18. If the checksum error has occurred, the error count process is performed in S17. Is performed, and the process proceeds to S18.

【0020】尚受信データのRAM18への書き込み
(S16)は、図6に示す如く、ROM17内に格納さ
れているスケジュールデータから前回行ったデータ通信
の種類をチェックし(S160)、その種類に対応した
受信用のデータリストを読み込み(S161)、そのデ
ータリストに基づき受信バッファ内のデータ量が正常か
どうかを判断し(S162)、データ量が正常であれば
データリストに基づき受信バッファ内の受信データをR
AM18に転送する(S163)といった手順で実行さ
れ、またエラー回数のカウント(S17)は、図7に示
す如く、チェックサムエラーの連続回数をカウントして
(S170)、そのカウント数が所定値以上かどうかを
判断し(S171)、所定値以上であれば基準タイミン
グフラグをセットする(S172)、といった手順で実
行される。
As shown in FIG. 6, when the received data is written in the RAM 18 (S16), the type of data communication performed last time is checked from the schedule data stored in the ROM 17 (S160), and the type of the data communication is checked. The received data list is read (S161), and based on the data list, it is determined whether the data amount in the reception buffer is normal (S162). If the data amount is normal, the reception in the reception buffer is performed based on the data list. R data
The transfer is performed to the AM 18 (S163). The error count (S17) is performed by counting the number of consecutive checksum errors (S170) as shown in FIG. 7, and the count is equal to or more than a predetermined value. It is determined whether or not it is (S171), and if it is equal to or more than a predetermined value, a reference timing flag is set (S172).

【0021】次にS18では、通信モードを決定する。
既述したように、本実施例では、3種類の通信モードが
決定されているため、ここでは外部からのモード選択指
令に応じて、このいずれかの通信モードを設定する。そ
して通信モードが設定されると、続くS19に移行し
て、この通信モードに対応したスケジュールデータに基
づきデータ通信の種類を決定するスケジューリング処理
(図8)を行なう。
Next, in S18, the communication mode is determined.
As described above, in the present embodiment, since three types of communication modes are determined, one of these communication modes is set here in response to an external mode selection command. When the communication mode is set, the process proceeds to S19, where a scheduling process (FIG. 8) for determining the type of data communication based on the schedule data corresponding to the communication mode is performed.

【0022】このスケジューリング処理では、図8に示
す如く、まず基準タイミングフラグがセットされている
か否かにより現在通信異常が発生しているか否かを判断
し(S190)、通信異常が発生している場合には、強
制的に基準タイミング通信を行なうために基準タイミン
グのシーケンスコードをセットし(S196)、スレー
ブ側に基準タイミング通信の開始を知らせるために基準
タイミング線DをLowレベルにする(S197)。また
通信異常が発生していない場合には、スケジュールカウ
ンタを更新し(S191)、このカウンタ値とスケジュ
ールデータとに基づき現在データ通信を行なうタイミン
グであるかどうかを判断する(S192)。そしてデー
タ通信を行なうタイミングければそのまま処理を終了
し、データ通信のタイミングであれば、上記カウント値
とスケジュールデータとから求められるデータ通信の種
類が基準タイミング通信であるかどうかを判断し(S1
93)、基準タイミング通信であれば、基準タイミング
のシーケンスコードをセットし(S196)、基準タイ
ミング線DをLow レベルにする(S197)。また今回
のデータ通信が基準タイミング通信でなく、16msec.
通信或は32msec.通信であれば、その種類に対応した
通信タイミングを表すシーケンスコードをセットし(S
194)、基準タイミング線DをHighレベルにする(S
195)。こうして通信タイミングを表すシーケンスコ
ードがセットされ基準タイミング線Dのレベルが設定さ
れると、通信モードを表すコードを上位4ビット、通信
タイミングを表すシーケンスコードを下位4ビットとし
て、8ビットの制御コードを作成し(S198)、処理
を終了する。
In this scheduling process, as shown in FIG. 8, it is first determined whether or not a communication error has occurred based on whether or not the reference timing flag is set (S190), and the communication error has occurred. In this case, the sequence code of the reference timing is set to forcibly perform the reference timing communication (S196), and the reference timing line D is set to the low level to notify the slave side of the start of the reference timing communication (S197). . If no communication abnormality has occurred, the schedule counter is updated (S191), and it is determined whether or not it is time to perform data communication based on the counter value and the schedule data (S192). If the data communication timing is reached, the process is terminated as it is. If the data communication timing is reached, it is determined whether the type of data communication determined from the count value and the schedule data is the reference timing communication (S1).
93) If it is the reference timing communication, the sequence code of the reference timing is set (S196), and the reference timing line D is set to Low level (S197). Also, the data communication this time is not the reference timing communication, but 16 msec.
In the case of communication or 32 msec. Communication, a sequence code indicating communication timing corresponding to the type is set (S
194), the reference timing line D is set to High level (S
195). When the sequence code indicating the communication timing is set and the level of the reference timing line D is set, the code indicating the communication mode is set to the upper 4 bits, the sequence code indicating the communication timing is set to the lower 4 bits, and the 8-bit control code is set. It is created (S198), and the process ends.

【0023】このようにスケジューリング処理が実行さ
れると、今度はS20に移行し、図9に示す如く、上記
スケジューリングにて決定した今回のデータ通信の種類
をチェックし(S201)、データ通信の種類に対応し
た送信用のデータリストを読み込み(S202)、デー
タリストに基づき送信データのデータ量をセットアップ
し(S203)、データリストに従いRAM18から送
信すべきデータをピックアップして、送信バッファにセ
ットし(S204)、更にその送信データのチェックサ
ムを計算してミラーコードを作成し、最終の送信データ
として送信バッファにストアする(S205)、といっ
た手順で送信データを送信バッファにセットする。そし
て続くS21では、S19のスケジューリング処理で作
成した制御コードをシフトレジスタ16aに書き込み、
データ通信用のクロック信号を発生することにより、デ
ータ通信を開始し、処理を一旦終了する。
When the scheduling process is executed as described above, the process shifts to S20, and as shown in FIG. 9, the type of the current data communication determined by the scheduling is checked (S201). (S202), sets up the amount of transmission data based on the data list (S203), picks up data to be transmitted from the RAM 18 according to the data list, and sets it in the transmission buffer (S203). In step S204, the transmission data is set in the transmission buffer according to a procedure such as calculating the checksum of the transmission data to create a mirror code and storing it in the transmission buffer as the final transmission data (S205). In S21, the control code created in the scheduling process in S19 is written into the shift register 16a.
By generating a clock signal for data communication, data communication is started, and the process is temporarily terminated.

【0024】この後マスタ側CPU16は、受信完了信
号線Fを介して、スレーブ側CPU26からの受信完了
信号の入力(Low レベルからHighレベルへのエッジ入
力)があるまで、エンジン制御用の処理プログラムを実
行し、スレーブ側CPU26から受信完了信号の入力が
あると、スレーブ側の通信処理が完了したものと判断し
て、図10に示す割込処理を実行する。
Thereafter, the master-side CPU 16 executes a processing program for engine control until a reception completion signal is input (low-level to high-level edge input) from the slave-side CPU 26 via the reception completion signal line F. When the reception completion signal is input from the slave CPU 26, it is determined that the communication processing on the slave side has been completed, and the interruption processing shown in FIG. 10 is executed.

【0025】即ち、この割込処理では、まずS30で基
準タイミング線DをHighレベルにした後、S31に移行
し、通信開始時にセットされる通信継続フラグを用いて
現在通信が継続中であるか否かを判断し、通信が継続中
でなければ、後述のS40に移行する。また通信が継続
中であれば、S32にて前回の処理で制御コードを送信
した直後であるか否かを判断し、制御コードを送信した
直後でなければS33に移行して、シフトレジスタ16
a内の受信データを受信バッファにストアする。そして
続くS34では、S37で更新される通信カウンタの値
から全データを受信したか否かを判断し、全データを受
信していなければ、S35で通信フェイルフラグ及び割
込フラグをリセットし、S36で受信完了信号線Fのレ
ベルが通常のLow レベルとなっているのを確認し、S3
7で通信カウンタを更新した後、S38にて、送信バッ
ファ内に格納されている次に送信すべきデータをシフト
レジスタ16aにセットして、データ通信用のクロック
信号を発生することによりデータ送信を行ない、処理を
終了する。
That is, in this interrupt processing, first, the reference timing line D is set to the high level in S30, and then the flow shifts to S31 to determine whether the communication is currently being continued by using the communication continuation flag set at the start of communication. It is determined whether or not the communication is not ongoing, and the process proceeds to S40 described later. If the communication is ongoing, it is determined in S32 whether or not the control code has just been transmitted in the previous processing, and if not, the process proceeds to S33 and the shift register 16
Store the received data in a in the reception buffer. Then, in S34, it is determined whether or not all data has been received from the value of the communication counter updated in S37. If all data has not been received, the communication fail flag and the interrupt flag are reset in S35 and S36. Confirms that the level of the reception completion signal line F is the normal Low level, and
After the communication counter is updated in step S7, the data to be transmitted next stored in the transmission buffer is set in the shift register 16a in step S38, and the data transmission is performed by generating a clock signal for data communication. And terminate the process.

【0026】一方S32にて前回の処理で制御コードを
送信した直後であると判断された場合には、スレーブ側
CPU26からの送信データは意味のないものである
(スレーブ側CPU26は、制御コードを受信して送信
データの準備を行ない、次回のデータ通信からデータ送
信を開始する)ため、そのままS35に移行し、上記S
35〜S38の一連の送信処理を行なった後、処理を終
了する。またS34にて全データを受信したと判断され
た場合には、S39で通信継続フラグをリセットし、S
40で通信フェイルフラグ及び割込フラグをリセット
し、S41で受信完了信号線Fのレベルが通常のLow レ
ベルであることを確認した後処理を終了する。
On the other hand, if it is determined in S32 that the control code has just been transmitted in the previous process, the transmission data from the slave CPU 26 is meaningless (the slave CPU 26 The data is received and the transmission data is prepared, and the data transmission is started from the next data communication).
After performing a series of transmission processes of 35 to S38, the process ends. If it is determined in S34 that all data has been received, the communication continuation flag is reset in S39,
The communication fail flag and the interrupt flag are reset at 40, and after confirming that the level of the reception completion signal line F is a normal Low level at S41, the process is terminated.

【0027】次に図11はスレーブ側CPU26にて実
行される通信処理を表すフローチャートである。尚この
処理は、マスタ側CPU16からのデータ送信により割
込処理されるものであり、スレーブ側CPU26は、通
常、メインルーチンにてエンジン制御用の処理プログラ
ムを実行している。
Next, FIG. 11 is a flowchart showing a communication process executed by the slave CPU 26. Note that this processing is an interruption processing by data transmission from the master CPU 16, and the slave CPU 26 normally executes a processing program for engine control in a main routine.

【0028】図に示す如くこの処理が開始されると、ま
ずS50にて、上記S11と同様にRAM28内の通信
カウンタ及び通信モードのチェックを行ない、異常時に
は基準タイミング要求フラグをセットする、といった手
順でRAM値のチェック処理を行なった後、S51に
て、マスタ側CPU16に対してエッジ割込をかけれる
ように、受信完了信号線Fをスタンバイ状態(即ち、Lo
w レベル)にし、S52にて、基準タイミング線DがLo
w レベルか否かによって現在基準タイミング通信の開始
タイミングか否かを判断し、基準タイミング通信の開始
タイミングでなければ、S53にてシフトレジスタ26
a内の受信データが制御コードかどうかをチェックす
る。
As shown in the figure, when this process is started, first, in S50, a communication counter and a communication mode in the RAM 28 are checked in the same manner as in S11, and a reference timing request flag is set in the event of an abnormality. After the RAM value is checked in step S51, in step S51, the reception completion signal line F is set to the standby state (i.e., Lo) so that the master CPU 16 can be edge-interrupted.
w level), and in S52, the reference timing line D
It is determined whether the current timing is the start timing of the reference timing communication based on whether it is the w level.
It is checked whether the received data in a is a control code.

【0029】そしてS52にて基準タイミング線DがLo
w レベルであると判断されるか、S53にて受信データ
が制御コードであると判断されると、S59で通信継続
フラグをセットし、S60で通信カウンタを初期化し、
S61にて、受信バッファ内の受信データ(即ち制御コ
ード)から通信モード及びデータ通信の種類を解析する
と共に、制御コードが正常かどうかのチェックを行い、
制御コード異常時には基準タイミング要求フラグをセッ
トする、といった手順で制御コードのチェックを行な
い、S62に移行する。
Then, at S52, the reference timing line D becomes Lo.
If it is determined that the received data is the w level or the received data is a control code in S53, a communication continuation flag is set in S59, and a communication counter is initialized in S60.
In S61, the communication mode and the type of data communication are analyzed from the received data (that is, the control code) in the reception buffer, and it is checked whether the control code is normal.
When the control code is abnormal, the control code is checked in such a procedure that a reference timing request flag is set, and the process proceeds to S62.

【0030】S62では、S61にて制御コードが正常
と判定されたか否かを判断し、制御コードに異常があれ
ば、後述のS64に移行し、制御コードが正常であれ
ば、S63に移行して、前述のS20と同様に、通信モ
ード及びデータ通信の種類に対応した送信データを作成
して送信バッファにセットする。また続くS56では、
送信バッファ内の送信データの中から今回送信すべきデ
ータを抽出してシフトレジスタ26aにセットし、S5
7にて通信カウンタを更新し、S58にて、受信完了信
号線Fを一旦HighレベルにしてLow レベルに戻すことに
より、マスタ側CPU16にエッジ割込をかけ、S64
に移行する。
In step S62, it is determined whether or not the control code is determined to be normal in step S61. If the control code is abnormal, the process proceeds to step S64 described below. If the control code is normal, the process proceeds to step S63. Then, similarly to the above-described S20, transmission data corresponding to the communication mode and the type of data communication is created and set in the transmission buffer. In the following S56,
The data to be transmitted this time is extracted from the transmission data in the transmission buffer and set in the shift register 26a.
7, the communication counter is updated, and in S58, the reception completion signal line F is once changed to the high level and returned to the low level, so that the master CPU 16 is edge-interrupted.
Move to

【0031】一方S53にて、受信データが制御コード
でないと判断されると、S54に移行してシフトレジス
タ26a内の受信データを受信バッファにストアし、S
55にて全データを受信したか否かを判断する。そして
全データを受信していなければS56に移行して、上記
S56〜S58の処理を実行した後、S64に移行し、
全データを受信していれば、S68に移行して、図12
に示す受信完了処理を実行して処理を終了する。
On the other hand, if it is determined in S53 that the received data is not a control code, the flow shifts to S54, where the received data in the shift register 26a is stored in the reception buffer.
At 55, it is determined whether all data has been received. If all data has not been received, the process proceeds to S56, and after executing the processes of S56 to S58, the process proceeds to S64,
If all data has been received, the flow shifts to S68, and FIG.
The reception completion processing shown in (1) is executed, and the processing ends.

【0032】次にS64では、S50又はS61のチェ
ック処理にてセットされる基準タイミング要求フラグか
ら、RAM値又は受信データの異常によりマスタ側CP
U16に対して基準タイミング通信を要求すべきかどう
かを判断し、基準タイミング通信を要求する場合にはS
65で基準タイミング要求線EをLowレベルに、逆に基
準タイミング通信を要求しない場合にはS66で基準タ
イミング要求線EをHighレベルにして、S67に移行す
る。そしてS67では、通信フェイルフラグ及び割込フ
ラグをリセットし、処理を終了する。
Next, in S64, based on the reference timing request flag set in the check processing in S50 or S61, the master side CP is detected due to an abnormality in the RAM value or received data.
It is determined whether reference timing communication should be requested to U16.
At 65, the reference timing request line E is set to the low level. Conversely, when the reference timing communication is not requested, the reference timing request line E is set to the high level at S66, and the process proceeds to S67. Then, in S67, the communication fail flag and the interrupt flag are reset, and the process ends.

【0033】次に上記S68の受信完了処理では、図1
2に示す如く、まずS681でチェックサム演算を行な
い、S681でチェックサムエラーのチェックを行な
う。尚ここでチェックサムエラーが連続して6回以上発
生していれば、通信異常と判断して基準タイミング要求
フラグをセットする。そしてチェックサムエラーが発生
していなければ、S683に移行して、前述のS16と
同様、受信バッファ内の受信データをRAM18に転送
した後、S684に移行し、チェックサムエラーが発生
していなければそのままS684に移行する。そしてS
684では、前述のS64と同様、基準タイミング要求
フラグがセットされているか否かを判断し、基準タイミ
ング要求フラグがセットされていれば、S685にて基
準タイミング要求線EをLow レベルにした後、S687
で通信フェイルフラグ及び割込フラグをリセットし、基
準タイミング要求フラグがリセットされていれば、S6
86にて基準タイミング要求線EをHighレベルにして、
S687を実行する。そしてS688にて通信継続フラ
グをリセットし、S689にて通信カウンタをクリア
し、処理を終了する。
Next, in the reception completion processing of S68, the processing shown in FIG.
As shown in FIG. 2, first, a checksum calculation is performed in S681, and a checksum error is checked in S681. If a checksum error has occurred six times or more consecutively, it is determined that a communication error has occurred, and a reference timing request flag is set. If a checksum error has not occurred, the flow shifts to step S683 to transfer the received data in the reception buffer to the RAM 18 as in step S16, and then to step S684. If no checksum error has occurred. The process directly proceeds to S684. And S
In step 684, it is determined whether or not the reference timing request flag has been set, as in step S64. If the reference timing request flag has been set, the reference timing request line E is set to low level in step S685. S687
Reset the communication fail flag and the interrupt flag, and if the reference timing request flag is reset,
At 86, the reference timing request line E is set to the High level,
Execute S687. Then, the communication continuation flag is reset in S688, the communication counter is cleared in S689, and the process ends.

【0034】以上説明したように本実施例のエンジン制
御装置においては、図13に示す如く、まずマスタ側C
PU16が4msec.毎の通信開始処理(B)にて、通信
モード及び種類を決定し、それに対応した制御コードC
Oを送信すると、これに伴いスレーブ側CPU26が割
込処理(I)にて通信の準備を行ない、通信準備が終了
すると、受信完了信号線Fを介して、マスタ側CPU1
6に対してエッジ割込をかける。そしてエッジ割込
(I)によりマスタ側CPU16がデータ送信を行なう
と、このデータ送信に伴いスレーブ側CPU26が割込
処理(I)を行ない、受信データを処理し、この処理が
終了すると受信完了信号線Fを介して、マスタ側CPU
16に対して再度エッジ割込をかける、といった手順で
順次デジタルデータDAの交換を行なう。そして最後に
チェックサムエラーチェック用のミラーコードCHの交
換がなされ、データ通信が終了する。
As described above, in the engine control apparatus according to the present embodiment, as shown in FIG.
The PU 16 determines the communication mode and type in the communication start processing (B) every 4 msec.
When O is transmitted, the slave CPU 26 prepares for communication in the interrupt processing (I) accordingly. When the communication preparation is completed, the master CPU 1
6 is subjected to an edge interrupt. When the master CPU 16 performs data transmission by the edge interruption (I), the slave CPU 26 performs the interruption processing (I) in accordance with the data transmission to process the received data. Master F CPU via line F
The digital data DA is sequentially exchanged in such a procedure that the edge interrupt is again applied to the digital data DA. Finally, the mirror code CH for checksum error check is exchanged, and the data communication ends.

【0035】またこうしたデータ通信は、予め設定され
たスケジュールデータに従い、4msec.毎に、基準タイ
ミング通信,16msec.通信,基準タイミング通信,3
2msec.通信…といった順序で実行されるが、各CPU
16,26は、データ通信時にRAM値の異常判定や受
信データの異常判定を行なうようにされており、スレー
ブ側CPU26がこうした通信異常を検出すると、図1
4に示す如く(図はスレーブ側CPU26が受信した制
御コードの異常を検出した場合を示している)基準タイ
ミング要求線EをLow レベルにする。するとマスタ側C
PU16は、この基準タイミング要求線Eからスレーブ
側CPU26での通信異常を検知して、データ通信を正
常にすべく、次の通信を基準タイミング通信に切り替
え、その旨をスレーブ側CPU26に報知するために基
準タイミング線DをLow レベルにする。またマスタ側C
PU16が通信異常を検出した場合にも、マスタ側CP
U16は、次の通信を基準タイミング通信に切り替え、
その旨をスレーブ側CPU26に報知するために基準タ
イミング線DをLow レベルにする。
In addition, such data communication is performed in accordance with preset schedule data every 4 msec., Such as reference timing communication, 16 msec.
2msec. Communication ...
When the slave CPU 26 detects such a communication abnormality, the CPU 16 and 26 perform an abnormality determination of the RAM value and an abnormality of the received data during data communication.
As shown in FIG. 4 (the figure shows a case where the slave CPU 26 detects an abnormality in the received control code), the reference timing request line E is set to Low level. Then master side C
The PU 16 detects a communication abnormality in the slave CPU 26 from the reference timing request line E, switches the next communication to the reference timing communication in order to normalize the data communication, and notifies the slave CPU 26 of the fact. Then, the reference timing line D is set to the low level. Master side C
When the PU 16 detects a communication error, the master side CP
U16 switches the next communication to the reference timing communication,
The reference timing line D is set to Low level to notify the slave CPU 26 of the fact.

【0036】このため、本実施例では、通信異常発生時
には、基準タイミング通信により各CPU16,26間
でのデータ通信の同期とって、データ通信を速やかに正
常状態に復旧させることが可能となる。つまりこうした
シリアル通信にて同期をとる場合、従来では、実際のデ
ータ通信に先だって、データ線を用いて、同期用のコー
ドデータをマスタ−スレーブ間で転送し合うようにされ
ているが、この方法では、データ通信を開始するまでに
時間がかかり、本実施例のように短い周期で多量のデー
タ交換をする場合には、制御処理遅れの問題を引き起こ
すことがある。しかし、本実施例では、基準タイミング
要求線Eと基準タイミング線Dとを用いて、スレーブ側
からマスタ側への通信異常の報知及びマスタ側からスレ
ーブ側への基準タイミング通信の実行指令を行なうよう
にされており、データ線はデータ通信のみに使用してい
るので、こうした問題を解決して、データ通信を高速に
行ない、かつ通信異常が発生しても速やかに復旧させる
ことができるようになるのである。
Therefore, in this embodiment, when a communication error occurs, the data communication between the CPUs 16 and 26 can be synchronized by the reference timing communication to quickly restore the data communication to the normal state. In other words, when synchronization is performed by such serial communication, conventionally, code data for synchronization is transferred between a master and a slave using a data line prior to actual data communication. In such a case, it takes time to start data communication, and when a large amount of data is exchanged in a short cycle as in the present embodiment, a problem of control processing delay may be caused. However, in the present embodiment, using the reference timing request line E and the reference timing line D, a notification of a communication abnormality from the slave side to the master side and an instruction to execute the reference timing communication from the master side to the slave side are performed. Since the data line is used only for data communication, it is possible to solve such a problem, perform data communication at high speed, and quickly recover even if a communication error occurs. It is.

【0037】また本実施例では、マスタ側CPU16が
図4に示すS13,S12,S23の処理によってスレ
ーブ側CPU26の動作状況(例えば暴走していないか
どうか)をチェックし、システムリセットにより復旧さ
せるようにされているので、データ通信の信頼性をより
向上することができる。また更に各CPU16,26に
て、チェックサムエラーを検出した場合には、受信デー
タを破棄するだけで、システムリセットをかけないの
で、他のエンジン制御系への影響を少なくすることが可
能となる。
In this embodiment, the master CPU 16 checks the operation status of the slave CPU 26 (for example, whether there is a runaway) by the processing of S13, S12 and S23 shown in FIG. Therefore, the reliability of data communication can be further improved. Further, when a checksum error is detected in each of the CPUs 16 and 26, the received data is only discarded, and the system is not reset. Therefore, the influence on other engine control systems can be reduced. .

【0038】尚本実施例においては、マスタ側CPU1
6が本発明の送信装置に相当し、スレーブ側CPU26
が本発明の受信装置に相当する。また、スレーブ側CP
U26にて実行される処理の内、RAM値、制御コー
ド、及びチェックサムエラーのチェックを行うS50、
S61、S682のチェック処理が、本発明の異常検出
手段に相当し、これらのチェック結果に従い基準タイミ
ング要求線EをLow レベルに設定するS65及びS68
5の処理が、本発明の基準タイミング通信要求手段に相
当する。また、マスタ側CPU16にて実行される処理
の内、基準タイミング要求線EがLow レベルでスレーブ
側より基準タイミング通信の要求があるか否かを判定し
て(S110)、基準タイミング通信の要求があれば基
準タイミングフラグをセットし(S113)、基準タイ
ミングフラグがセットされている場合に、強制的に基準
タイミング通信を行なうために基準タイミングのシーケ
ンスコードをセットして(S196)、スレーブ側に基
準タイミング通信の開始を知らせるために基準タイミン
グ線DをLow レベルにする(S197)、一連の処理
が、本発明のデータ通信復旧手段に相当する。そして、
本実施例では、2つのCPU間で双方向にデータ通信を
行なうシステムについて説明したが、本発明は、一方向
のデータ通信を行なうシステムに応用することもでき
る。
In this embodiment, the master CPU 1
6 corresponds to the transmission device of the present invention,
Corresponds to the receiving device of the present invention. Also, the slave side CP
The RAM value and the control code
S50, which checks for checksum errors and checksum errors.
The check processing of S61 and S682 is the abnormality detection of the present invention.
Means, and according to the results of these checks,
S65 and S68 to set the signaling request line E to Low level
5 corresponds to the reference timing communication request means of the present invention.
Hit. Processing executed by the master CPU 16
Out of the slaves when the reference timing request line E is Low level
Side to determine whether there is a request for reference timing communication from the
(S110), if there is a request for reference timing communication,
The quasi-timing flag is set (S113),
If the flag is set, the
Sequence of reference timing to perform timing communication
The slave code (S196), and
Reference timing to signal the start of quasi-timing communication
Line D is set to Low level (S197), a series of processing
Corresponds to the data communication recovery means of the present invention. And
In the present embodiment, a system for performing bidirectional data communication between two CPUs has been described. However, the present invention can also be applied to a system for performing one-way data communication.

【0039】また更に本実施例では、2回目以降のデー
タ通信を割込ルーチンにて行なうようにしているが、処
理遅れや高速にデータ通信をする必要がなければ、全て
のデータをベースルーチンで処理することもできる。ま
た本実施例では、マスタ側CPU16での基準タイミン
グ要求線Eによる異常判定を、基準タイミング要求線E
のレベルチェックにより行っているが、検出信号のエッ
ジをチェックすることにより異常判定を行なうようにし
てもよい。
Further, in the present embodiment, the second and subsequent data communications are performed in the interrupt routine. However, if there is no processing delay or high-speed data communication is required, all data is transmitted in the base routine. It can also be processed. In the present embodiment, the abnormality determination by the reference timing request line E in the master CPU 16 is performed by the reference timing request line E.
However, the abnormality may be determined by checking the edge of the detection signal.

【0040】[0040]

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

【図1】 本発明の構成を例示するブロック図である。FIG. 1 is a block diagram illustrating the configuration of the present invention.

【図2】 実施例の車両用エンジン制御装置の構成を表
すブロック図である。
FIG. 2 is a block diagram illustrating a configuration of a vehicle engine control device according to the embodiment.

【図3】 CPU間でのデジタルデータの交換動作を説
明する説明図である。
FIG. 3 is an explanatory diagram illustrating an operation of exchanging digital data between CPUs.

【図4】 マスタCPUにて実行されるデータ送信開始
処理を表すフローチャートである。
FIG. 4 is a flowchart illustrating a data transmission start process executed by a master CPU.

【図5】 図4のS11にて実行されるRAM値のチェ
ック処理を表すフローチャートである。
FIG. 5 is a flowchart showing a RAM value check process executed in S11 of FIG. 4;

【図6】 図4のS16にて実行される受信データのR
AMへの書き込み処理を表すフローチャートである。
FIG. 6 is a diagram illustrating an example of R of the received data executed in S16 of FIG.
It is a flowchart showing the writing process to AM.

【図7】 図4のS17にて実行されるチェックサムエ
ラーのカウント処理を表すフローチャートである。
FIG. 7 is a flowchart showing a checksum error counting process executed in S17 of FIG. 4;

【図8】 図4のS19にて実行される通信のスケシュ
ーリング処理を表すフローチャートである。
FIG. 8 is a flowchart showing a communication scheduling process executed in S19 of FIG. 4;

【図9】 図4のS20で実行される送信データの送信
バッファへのセット処理を表すフローチャートである。
FIG. 9 is a flowchart illustrating a process of setting transmission data in a transmission buffer, which is performed in S20 of FIG. 4;

【図10】 マスタCPUにて実行されるデータ送信割
込処理を表すフローチャートである。
FIG. 10 is a flowchart illustrating a data transmission interruption process executed by a master CPU.

【図11】 スレーブCPUにて実行されるデータ受信
割込処理を表すフローチャートである。
FIG. 11 is a flowchart illustrating a data reception interrupt process executed by a slave CPU.

【図12】 図11のS68にて実行される受信完了処
理を表すフローチャートである。
FIG. 12 is a flowchart illustrating a reception completion process executed in S68 of FIG. 11;

【図13】 通信正常時の通信動作の一例を表すタイム
チャートである。
FIG. 13 is a time chart illustrating an example of a communication operation when communication is normal.

【図14】 通信異常時の通信動作の一例を表すタイム
チャートである。
FIG. 14 is a time chart illustrating an example of a communication operation when a communication error occurs.

【符号の説明】[Explanation of symbols]

10,20…電子制御回路(ECU) 11,21…入
力バッファ 12,22…波形整形回路 13,23…A/D変換
器 14,24…出力ドライバ 15,25…I/Oポー
ト 16…CPU(マスタ) 26…CPU(スレーブ) 17,27…ROM 18,28…RAM 16a,26a…シフトレジスタ A…通信専用クロ
ック線 B,C…データ線 D…基準タイミング線 E…基準タイミング要求線 F…受信完了信号線
10, 20 ... electronic control circuit (ECU) 11, 21 ... input buffer 12, 22 ... waveform shaping circuit 13, 23 ... A / D converter 14, 24 ... output driver 15, 25 ... I / O port 16 ... CPU ( Master) 26 CPU (slave) 17, 27 ROM 18, 28 RAM 16a, 26a Shift register A Communication clock line B, C Data line D Reference timing line E Reference timing request line F Reception Completion signal line

Claims (1)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 データ伝送を行うためのデータ線と、デ
ジタルデータを上記データ線上に送信する送信装置と、
上記データ線を介して上記送信装置からのデジタルデー
タを受信する受信装置とを備えたデータ通信装置におい
て、 上記送信装置と受信装置との間に基準タイミング線と基
準タイミング要求線とを設けると共に、 上記送信装置を、上記受信装置に送信すべき複数のデジ
タルデータを、該各デジタルデータを送信すべき周期に
応じて区分した複数のデータ群毎に、該周期に応じて予
め設定されたスケジュールに従って上記データ線上に送
信し、且つ、予め設定された特定のデータ群の送信時に
は、基準タイミング通信であるとして、その旨を上記基
準タイミング線を介して上記受信装置に通知するよう構
成し、 更に、 上記受信装置に、上記送信装置から送信されてき
たデジタルデータの異常を検出する異常検出手段と、
異常検出手段にて異常が検出されると、上記基準タイミ
ング要求線を介して、上記送信装置に上記基準タイミン
グ通信を要求する基準タイミング通信要求手段とを設
け、上記 送信装置には、上記基準タイミング要求線を介して
上記受信装置から基準タイミング通信が要求されると、
その後のデータ送信を、上記特定のデータ群から開始す
ることで、データ通信を復旧させるデータ通信復旧手段
を設けたことを特徴とするデータ通信装置。
1. A data line for performing data transmission, a transmission device for transmitting digital data onto the data line,
A data communication device comprising: a receiving device that receives digital data from the transmitting device via the data line; and a reference timing line and a base between the transmitting device and the receiving device.
A quasi-timing request line, and a plurality of digital signals to be transmitted to the receiving device by the transmitting device.
Data to the period in which each digital data should be transmitted.
For each of a plurality of data groups divided according to the cycle,
According to the set schedule.
At the time of transmission of a specific set of data
Indicates that it is a reference timing communication.
It is configured to notify the receiving device via the quasi-timing line.
Form, further, in the receiving apparatus, and the abnormality detecting means for detecting an abnormality of the digital data transmitted from said transmitting apparatus, said
When an abnormality is detected by the abnormality detection means,
The reference timing is sent to the transmitting device via a signaling request line.
Provided with a reference timing communication request means for requesting grayed communication, to the transmission device, via the reference timing request line
When the reference timing communication is requested from the receiving device,
Subsequent data transmission is started from the specific data group.
In Rukoto, data communication apparatus is characterized by providing a data communication recovery means to recover the data communication.
JP28667291A 1991-10-31 1991-10-31 Data communication device Expired - Fee Related JP3271270B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP28667291A JP3271270B2 (en) 1991-10-31 1991-10-31 Data communication device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP28667291A JP3271270B2 (en) 1991-10-31 1991-10-31 Data communication device

Publications (2)

Publication Number Publication Date
JPH05128017A JPH05128017A (en) 1993-05-25
JP3271270B2 true JP3271270B2 (en) 2002-04-02

Family

ID=17707471

Family Applications (1)

Application Number Title Priority Date Filing Date
JP28667291A Expired - Fee Related JP3271270B2 (en) 1991-10-31 1991-10-31 Data communication device

Country Status (1)

Country Link
JP (1) JP3271270B2 (en)

Also Published As

Publication number Publication date
JPH05128017A (en) 1993-05-25

Similar Documents

Publication Publication Date Title
US5726638A (en) Method and device for serial communication
US6820000B2 (en) Electronic control device having control and monitoring cpus
US4287508A (en) Information transmitting and receiving apparatus
US8493927B2 (en) Control apparatus, control method and control program
JP3271270B2 (en) Data communication device
US5737630A (en) Communication device for synchronized serial communication
JP3267646B2 (en) Data communication device
JPH0381862A (en) Equipment and method for communication of vehicle-mounted network
US4807231A (en) Multiplex communication method
JP2001350735A (en) Method for mutual monitoring among plural data processors
JPH06213063A (en) Electronic control unit for vehicle
JP4073184B2 (en) Engine control device
JP3031050B2 (en) Fault diagnosis device
JP3381756B2 (en) Parallel processor system
JPH06290160A (en) Data communication method between microcomputers and multi-microcomputer system
JP3255957B2 (en) Automotive electronic control unit
Takai et al. Development of Diagnostic Data Link Protocol
JPS59200365A (en) Transfer system of control information
JPH04203344A (en) Data communication between electronic devices installed on vehicle
CN116185936A (en) SPI communication data receiving and transmitting abnormity detection control system and detection method
JP3361919B2 (en) Programmable controller
JPH06291745A (en) Method and system for detecting errors of transfer data
JPH07175736A (en) Inter-cpu data transfer device
JPH0684343U (en) Failure diagnosis device for vehicle control device
JPH1174893A (en) Data communication equipment and its communication method

Legal Events

Date Code Title Description
FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110125

Year of fee payment: 9

LAPS Cancellation because of no payment of annual fees