JPH03149338A - Electronic controller for vehicle - Google Patents

Electronic controller for vehicle

Info

Publication number
JPH03149338A
JPH03149338A JP1287881A JP28788189A JPH03149338A JP H03149338 A JPH03149338 A JP H03149338A JP 1287881 A JP1287881 A JP 1287881A JP 28788189 A JP28788189 A JP 28788189A JP H03149338 A JPH03149338 A JP H03149338A
Authority
JP
Japan
Prior art keywords
data
stage
bit
microcomputer
knock
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP1287881A
Other languages
Japanese (ja)
Inventor
Taku Kawauchi
卓 川内
Kenji Iwasaki
岩崎 顕司
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.)
Honda Motor Co Ltd
Original Assignee
Honda Motor 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 Honda Motor Co Ltd filed Critical Honda Motor Co Ltd
Priority to JP1287881A priority Critical patent/JPH03149338A/en
Publication of JPH03149338A publication Critical patent/JPH03149338A/en
Pending legal-status Critical Current

Links

Landscapes

  • Combined Controls Of Internal Combustion Engines (AREA)
  • Multi Processors (AREA)
  • Control By Computers (AREA)
  • Electrical Control Of Ignition Timing (AREA)

Abstract

PURPOSE:To execute serial data communication between plural microcomputers in synchronism with the rotation of an engine by making a data transmitting means transmit data and a data receiving means receive them with some phase difference kept between the above actions. CONSTITUTION:At least the first microcomputer 11 of plural computers is provided with a transmitting port 12A, from which data are transmitted by one bit in fixed order according to the rotational angle of a crankshaft. The second microcomputer 21 is provided with a receiving port 22B connected to the transmitting port 12A, and the data are received by one bit according to the rotational angle of the crankshaft from the port 22B. In addition to that, data transmitting and receiving performed by the microcomputers 11 and 21 respectively are executed with some phase difference kept between them. Thus, data communication can be executed between the microcomputers in synchronism with the rotation of an engine without providing special serial ports.

Description

【発明の詳細な説明】 (産業上の荊用分野) 本発明は車両用電子制御装置に関するものであり、特に
、複数のマイクロコンピュータを有する車両用電子制御
装置において、各マイクロコンピュータ間で直接各種デ
ータ通信を行う車両用電子制御装置に関するものである
。 (従来の技術) 自動車、自動二輪車等(以下、車両という)におけるエ
ンジンの点火時期制御、あるいはインジェクタを用いた
燃料噴射制御等は、マイクロコンピュータを備えた電子
制御装置を用いて行われている。 ところで、近年、ノッキングコントロール(ノッキング
防止のための車両制御)等が行われるようになり、この
ためのノッキング検出手法が各種提案されているが、こ
のノッキング検出は、比較的複雑な処理を必要とするた
めに、前述したような点火時期制御、燃料噴射制御等を
行うためのマイクロコンピュータとは別のマイクロコン
ピュータを用いる場合がある。 ここで、これら各マイクロコンピュータにおいて、それ
ぞれ他方のマイクロコンピュータより出力、あるいは演
算されたデータを用いて、各種データの演算を行う場合
には、各マイクロコンピュータ間でのデータ通信が必要
となる。 このため、従来においては、第18図に示されるように
、複数のマイクロコンピュータ間(第1及び第2マイク
ロコンピュータ1及び2間)に、1ビットのデータを送
受信するための通信ライン3を、通信に必要なビット数
だけ設けてパラレル通信を行うか、あるいは第19図に
示されるように、データ送信用及び受信用の通信ライン
4を2本設けると共に、それぞれのライン4の送信端及
び受信端に汎用のシリアルポート5を設けて、各マイク
ロコンピュータ内の基準クロックを用いたシリアル通信
を行うようになっている。 (発明が解決しようとする課題) 上記した従来の技術は、次のような問題点を有していた
。 (1)前述したパラレル通信においては、通信すべきデ
ータ数が増えると、その分だけ通信ラインか増えるので
、当該車両用電子制御装置の構成が大形、複雑化し、ま
た製造コストが上昇する。 また、通信ラインが増えただけ当該車両用電子制御装置
の故障の確率が高くなり、信頼性が低下する。 (2)シリアル通信においては、データ送受信のために
シリアルポートが必要であり、当該車両用電子制御装置
が大形化する。 また、データの送受信先が複数にまたがる場合には、シ
リアルポートを増設したり、あるいは切替回路が必要と
なるので、当該車両用電子制御装置の構成がさらに複雑
、大形化する。 さらに、データ通信がマイクロコンピュータのクロック
に同期して行われるので、エンジンの回転に同期したデ
ータ通信が行えない。すなわち、車両の制御においては
、エンジン回転数に応じて各種制御機器の制御(例えば
点火時期制御、燃料噴射制御、ノッキング制御等)を行
う必要があるが、エンジンの回転に同期したデータ通信
が行えないと、前記各種制御機器の制御を正確に行うこ
とができない。 本発明は、前述の問題点を解決するためになされたもの
であり、その目的は、特別なシリアルポートを必要とす
ることなく、かつエンジン回転に同期して、複数のマイ
クロコンピュータ間でシリアルデータ通信を行うことが
できる車両用電子制御装置を提供することにある。 (課題を解決するための手段及び作用)前記の問題点を
解決するために、本発明は、当該車両用電子制御装置を
構成する複数のマイクロコンピュータのうちの少なくと
も一のマイクロコンピュータに、送信ポートを設け、ク
ランク軸回転角に応じて、前記送信ポートから所定の順
番で1ビットずつデータを送信するようにし、また、前
記複数のマイクロコンピュータのうちの少なくとも他の
マイクロコンピュータに、前記送信ポートに接続される
受信ポートを設け、クランク軸回転角に応じて、前記受
信ポートから1ビットずつデータを受信するようにし、
さらに、前記の−のマイクロコンピュータによるデータ
の送信、及び前記の他のマイクロコンピュータによるデ
ータの受信を、位相差をもって行うようにした点に特徴
がある。 また、前記−のマイクロコンピュータのバッファ内に、
さらに、前記データ送信手段より所定のタイミングごと
に送信されるべき全データを一時記憶すると共に、クラ
ンク軸回転角に応じて、前記バッファ内データを1ビッ
トずつ送信ポートに送出するようにした点にも特徴があ
る。これにより、クランク軸回転角に応じたデータの送
信が、前記バッファ内からのデータの読出しだけで済む
ようになる。 (実施例) 以下に、図面を参照して、本発明を詳細に説明する。 第2図は本発明の一実施例のブロック図である。 第2図において、当該車両のエンジン回転に応じて、公
知の手法により取り出されるシリンダパルス、TDCパ
ルス及びクランクパルスは、波形整形回路31を介して
、第1マイクロコンピュータ11に入力される。 当該エンジンが、4気筒4サイクルエンジンであるもの
とすると、シリンダパルスはクランク軸が2回転(72
0度)するたびに1パルス出力、TDCパルスは各気筒
のピストンが上死点に達するごとに1パルス出力、すな
わちクランク軸が2回転するごとに4パルス出力、そし
てクランクパルスは、この例においてはTDCパルスが
1パルス出力されるたびに6パルス出力される。このシ
リンダパルス及びクランクパルスは、後述する第2マイ
クロコンピュータ21にも入力される。 前記第1マイクロコンピュータ11は、当該車両の主要
制御、例えば点火時期制御、燃料噴射制御等を行うもの
であり、CPU12 (以下、メインCPU12という
)、並びにROMSRAM及び入出力インターフェース
等(いずれも図示せず)を備えている。 吸気管内負圧(絶対圧)Pbaを検出するPbaセンサ
32、エンジン冷却水温度Tvを検出するTwセンサ3
3、大気圧Paを検出するPaセンサ34、及びスロッ
トル弁開度を検出するThセンサ35等は、A/D変換
器31を介して前記第1マイクロコンピュータ11に接
続されている。 また、この第1マイクロコンピュータ11は、イグナイ
タ41及びイグニションコイル42を介して点火プラグ
43に、またドライバ44を介してインジェクタ45に
、それぞれ接続されている。 前記第1マイクロコンピュータ11による点火時期制御
、燃料噴射制御は、公知の手法によるも−フ  − のである。燃料噴射制御は、例えば特公昭62−862
5号公報に記載されている。 また、当該エンジンの吸排気弁駆動用のカム(図示せず
)は複数種有り、例えば当該エンジンの回転数及び負荷
に応じてそれらが選択される。 このカム選択のための信号(以下、バルブタイミングV
/Tという)は、当該エンジンの回転数及びエンジンの
負荷状態信号を用いて、第1マイクロコンピュータ11
で演算される。このバルブタイミングV/Tはドライバ
46に出力され、そして、前記カムを選択するソレノイ
ド47が駆動される。 前記第2マイクロコンピュータ21は、当該エンジンの
ノブキングを検出するものであり、前記第1マイクロコ
ンピュータ11と同様にCPU22(以下、ノックCP
U22”という)、並びにROMSRAM及び入出力イ
ンターフェース等(いずれも図示せず)を備えている。 エンジンのシリンダヘッドに設けられるノックセンサ(
圧力センサ)38は、波形整形回路39を介して、前記
第2マイクロコンピュータ21に接続されている。 さて、前述のように、第2マイクロコンピュータ21は
、ノッキングを検出するが、このノッキング検出のため
には、ノックセンサ38の出力信号のみならず、Pba
センサ32及びTvセンサ33の出力信号、並びにバル
ブタイミングV/Tをも必要とする。 前記Pbaセンサ32及びTwセンサ33の出力信号、
並びにバルブタイミングV/Tは、後述する手法により
、メインCPU12の汎用送信ポート12Aからノック
CPU22の汎用受信ポート22Bに直接送信される。 また、前記第1マイクロコンピュータ11は、第2マイ
クロコンピュータ21で判別された、ノッキングしてい
るか否かを示す情報(以下、ノック(K nock)フ
ラグという)、及びノックセンサ38が正常に動作して
いるか否かを示す信号(フェールセーフ信号、以下、F
/Sフラグという)を用いて、ノッキングを防止するた
めの点火時期制御(以下、ノックコントロールという)
を行う。このノックコントロールは、当該エンジンがノ
ッキングしている場合には点火時期を遅角し、ノッキン
グがなくなった場合には、点火時期を元に戻す(点火時
期を進角する)ものである。このようなノックコントロ
ールの手法は、例えば特開昭63−29061号公報に
記載されている。 前記ノックフラグ及びF/Sフラグは、後述する手法に
より、ノックCPU22の汎用送信ポート22Aからメ
インCPU12の汎用受信ポート12Bに直接送信され
る。 なお、第2図においては、同図に示された各構成要素に
電力を供給する電R(バッテリ)の図示は省略されてい
る。 さて、このような構成を有する車両用電子制御装置の動
作のうち、メインCPU12及びノックCPU22間の
データ通信の手法を、以下に詳細に説明する。 メインCPU12の送信ポート12AからノックCPU
22に対して送信されるデータは、■バルブタイミング
V/T :  L/H”情報(1ビット) ■吸気管内負圧P ba :ゾーン情報 4段階(2ビ
ット) ■冷却水温度Tν:ゾーン情報 8段階(3ビット) の合計6ビットのデータである。 また、ノックCPU22の送信ポート22Aからメイン
CPU12に対して送信されるデータは、■ノックフラ
グ: 有”/無”情報(1ビット)■F/Sフラグ: 
有”/無”情報(1ビット)の合計2ビットのデータで
ある。 まず、メインCPU12からノックCPU22にデータ
を送信する場合のデータ通信手法を説明する。 第3図はメインCPU12からノックCPU22ヘデー
タ送信を行う場合の主要動作を示すタイムチャート、第
4図及び第5図はこの場合にメインCPU12により行
われる主要処理動作を示すフローチャート、同様に第7
図はこの場合にノックCPU22により行われる主要処
理動作を示すフローチャートである。 また、第6図及び第8図はメインCPU12及びノック
CPU22により実行されるバックグラウンド処理を示
すフローチャートである。 なお、第3図の下方に示されたR xbufは、第7図
のステップS34に関して後述する、第2マイクロコン
ピュータ21内の8ビットバッファ(レジスタ)を示し
ている。 また、第3図に示されるように、TDCパルスの立ち上
がりの直後に発生するクランクパルスの発生ステージを
、第0ステージとし、以下、次のT D Cパルスか発
生するまで、クランクパルスの発生毎にステージ番号が
インクリメントされる。 すなわち、ステージ番号はOから5までである。 このステージは、換言すれば、当該エンジンのクランク
軸回転角を示すものである。 メインCPU12により行われるクランク処理(クラン
クパルスに同期した処理)は、各ステージの開始時に発
生する割込み信号により行われる。 第4図には、このクランク処理のうち、メインCPU1
2からノックCPU22へデータ送信を行う場合の主要
処理のみが示されている。また、第0ステージにおいて
クランク処理か終了した直後に、第5図に示される点火
時期/燃料量演算処理が行われる。 この点火時期/燃料瓜演算処理が終了する前に、第1ス
テージとなった場合には、第3図に示されるように、ク
ランク処理が割り込みにより優先的に行われ、該クラン
ク処理が終了した後、再び点火時期/燃料量演算処理の
続きが実行される。なお、図示されていないが、高エン
ジン回転状態となった場合には、第2、第3・・・ステ
ージに、点火時期/燃料量演算処理の続きが実行される
場合もある。 また、この第5図には、点火時期/燃料量演算処理のう
ち、メインCPU12からノックCPU22ヘデータ通
信を行う場合の主要処理のみが示されている。 また、メインCPU12は、演算等の負荷が軽くなった
場合に、第6図に示されるバックグラウンド処理を行う
。 ノックCPU22により行われるクランク処理も、各ス
テージの開始時に発生する割込み信号により行われる。 第7図には、このクランク処理のうち、メインCPU1
2からノックCPU22ヘデータ送信を行う場合の主要
処理のみが示されている。 また、ノックCPU22は、演算等の負荷が軽くなった
場合に、第8図に示されるバックグラウンド処理を行う
。 まず、メインCPU12の動作から説明する。 第5図の点火時期/燃料量演算処理において、まずステ
ップSllにおいては、pbBセンサ32より出力され
る吸気管内負圧Pba信号を、読み込む。 ステップS12においては、読み込まれたPbaを、4
段階に区分された領域(ゾーン)のうちのいずれに入る
かを決定する。すなわち、この処理では、読み込まれた
Pbaを2ビットのデジタルデータに変換する。この変
換された2ビットデータは、第1マイクロコンピュータ
11内の8ビットバッファ(レジスタ) Txbuf 
(第0ピットル第7ビット)のうちの第1及び第2ビッ
ト目に記憶される(第9図C参照、同図において、Pb
aデータは符号Xで示されている)。 ステップS13においては、後述する第6図のステップ
S22において判別、記憶された冷却水温度Tvの領域
(ゾーン)を読み出す。この冷却水温度ゾーンは、前述
のように8段階に区分されており、TVデータは3ビッ
トである。また、前記ステップS22においては、TV
データは、8ビットレジスタの第3〜第5ビット目に記
憶されている(第9図8参照、同図において、TVデー
タは符号Yで示されている)。 ステップS14においては、ステップS13において読
み出された8ビットレジスタの内容を、バッファT x
buf内に合成する(第9図C参照)。 ステップS15においては、当該第1マイクロコンピュ
ータ11で演算、設定されたバルブタイミングV/T(
1ビットデータ)が読み込まれ、そして、ステップ81
6において、前記データがバッファT xbufの第0
ビット目に記憶される(第9図り参照、同図において、
バルブタイミングV/Tデータは符号2で示されている
。)以下の説明においては、このようにバッファT x
buf内に記憶が完了された6ビットのデータ(Pbl
、Tw及びV/T)を、フレームデータという。 ステップ81gにおいては、点火時期(角度)、燃料噴
射量等の演算、エンジンの負荷判別、バルブタイミング
V/Tの設定等が行われる。その後、図示されない他の
処理が行われて、当該処理は終了する。 つぎに、努4図に示されたクランク処理において、まず
ステップS1では、当該ステージが何番目のステージで
あるか、すなわちステージ番号が判別される。そして、
ステップS2においては、各ステージに応じた各種処理
(例えば、前記した第5図において演算された点火時期
の、角度−時間変換、点火のためのタイマスタート等)
が実行される。 つぎに、ステップS5においては、判別されたステージ
番号がnに設定される。 ステップS6においては、前述した第5図のステップ3
16においてバッファT xbufに構成されたフレー
ムデータのうちのnビット目のデータを、送信ポート1
2Aに出力する。すなわち、第3−に示された点火時期
/燃料量演算処理において、符号Aで示された時点でス
テップS16で示された処理が完了した場合には、該ス
テップ316において合成されたバッファT xbuf
の第1及び第2ビット目のデータ(P ba)が、それ
ぞれ第1及び第2ステージで送信ポート12Aに出力さ
れ、同様にバッファT xbufの第3〜第5ビット目
のデータ(Tw )が、それぞれ第3〜第5ステージで
出力され、そして、バッファT xburの第0ビット
目のデータ(バルブタイミングV/T)が、第Oステー
ジで出力される。 その後、図示されない他の処理が行われて、当該処理は
終了する。 第6図のバックグラウンド処理においては、ステップS
21でTwセンサ33の出力信号を読み込む。 そして、ステップS22においては、読み込まれたTv
が、8段階に区分されたゾーンのうちのいずれに入るか
を判別する。すなわち、この処理では、TVを3ビット
のデジタルデータに変換する。この変換された3ビット
データは、前記ステップS13において前述したように
、第1マイクロコンピュータ11内の8ビットレジスタ
(第0ピットル第7ビット)のうちの第3〜第5ビット
目に記憶される(第9図8参照)。 つぎに、ノックCPU22の動作を説明する。 第7図のクランク処理において、まずステップS31に
おいては、ステージ番号が判別される。 そして、ステップS32においては、各ステージに応じ
た各種処理(例えば、ノッキング判別等)が実行される
。 ステップS33においては、判別されたステージ番号が
nに設定される。 このステップS33に引き続いて、ステップS34の処
理が行われるが、このステップS34の処理は、第4図
に示されたメインCPU12のステップS6の処理が開
始されるまでに完了されるようになっている。すなわち
、第4図に示された、メインCPU12により実行され
るクランク処理、及び第7図に示された、ノックCPU
22により実行されるクランク処理は、各ステージの開
始と同時に実行されるが、第7図のステップS34の処
理は該クランク処理開始直後に行われるのに対し、第4
図のステップS6の処理は、該クランク処理開始からし
ばらくたってから(すなわち、ステップS2の処理、及
び第11図に関して後述するステップS3,34等の処
理が実行されてから)行われる。 後述するように、ステップS34の処理は、送信ポート
12Aに発生するデータをノックCPU22に読み込む
処理であるが、前記したステップS34及びS6の処理
のずれにより、換言すれば、ステップS34及びS6の
位相差により、第3図に示されたように、各ステージ開
始直後に、送信ポート12Aに発生するデータがノック
CPU22に読み込まれ、その後に、前記送信ポート1
2Aに発生するデータが更新される。 ステップS34においては、メインCPU12の送信ポ
ート12Aに発生されているデータを、第2のマイクロ
コンピュータ21内の8ビットバッファRχbuf (
第Oビット〜第7ビット)のうちの第(n−2)ビット
目に読み込み、記憶される。 すなわち、第3図に示されるように、バッファRxbu
fの第O〜第5ビット目に、メインCPU12の送信ポ
ート12Aに発生されたP bas T v及びバルブ
タイミングV/Tの各データが記憶される。 その後、図示されない他の処理が行われて、当該処理は
終了する。 第8図のバックグラウンド処理においては、ステップS
41で当該第2マイクロコンピュータ21により、ノッ
クセンサ38が正常に機能しているか否かが判別され、
F/Sフラグか発生される。 つぎに、ノックCPU22からメインCP リ12にデ
ータを送信する場合のデータ通信手法を説明する。 第10図はノックCPU22からメインCP U12ヘ
データ送信を行う場合の主要動作を示すタイムチャート
、第11図及び第12図はこの場合にメインCPU12
により行われる主要処理動作を示すフローチャート、同
様に第13図はこの場合にノックCPU22により行わ
れる主要処理動作を示すフローチャートである。 第11図及び第12図には、メインCPU12により行
われるクランク処理及び点火時期/燃料量演算処理のう
ち、ノックCPU22からメインCPU12へデータ送
信を行う場合の主要処理のみが示されている。 また、第13図には、ノックCPU22により行われる
クランク処理のうち、ノックCPU22からメインCP
U12へデータ送信を行う場合の主要処理のみが示され
ている。 まず、ノックCPU22により実行される第13図のク
ランク処理では、ステージ判別等が行われた後(第7図
のステップ831等の後)、ステップS35において、
当該ステージが第Oステージであるか否かが判別される
。第Oステージであれば、ステップ836において、当
該第2マイクロコンピュータ21で演算されたノックフ
ラグが、ノックCPU22の送信ポート22Aに出力さ
れる。 前記ステップS35において当該ステージが第Oステー
ジでないことが判別されると、ステップS37において
、当該ステージが第3ステージであるか否かが判別され
る。第3ステージであれば、ステップ53Bにおいて、
F/SフラグがノックCPU22Q送信ポート22Aに
出力される。 ステップ836若しくは83gを終了した後、又は当該
ステージが第Oステージでも第3ステージでもない場合
には、その後、図示されない他の処理が行われて、当該
処理は終了する。 つぎに、メインCPU12により実行される第11図の
クランク処理では、所定のステージ判別(第4図のステ
ップSl)等が実行された後、ステップS3において、
当該ステージが第4ステージであるか否かが判別される
。第4ステージであれば、ステップS4において、メイ
ンCPU12の受信ポート12Bに生じたデータくすな
わち、ノックCPU22の送信ポート22Aに発生した
データ)を、F/Sフラグとして読み込む。 ステップS4が終了した後、又は前記ステップS3にお
いて、当該ステージが第4ステージでない場合には、そ
の後、図示されない他の処理が行われて、当該処理は終
了する。 メインCPU12により実行される第12図の点火時期
/燃料量演算処理では、ステップSITにおいて、メイ
ンCPU12の受信ポート12Bに生じたデータ(すな
わち、ノックCPU22の送信ポート22Aに発生した
データ)を、ノックフラグとして読み込む。このステッ
プS17の処理は、バッファTxbu丁の合成が終了し
た後(第5図のステップ816の処理が終了した後)に
行われる。 このように、第2マイクロコンピュータ21で演算され
たノックフラグ及びF/Sフラグが、第1マイクロコン
ピュータ11に転送される。 さて、このように第1マイクロコンピュータ11から第
2マイクロコンピュータ21に対してデータの送信が行
われ、逆に、第2マイクロコンピュータ21から第1マ
イクロコンピュータ11に対してもデータの送信が行わ
れる。そして、このデータ過信は、ステージごとに、す
なわちエンジンの回転(クランク軸回転角)に応じて、
行われる。 ところで、第1マイクロコンピュータ11から第2マイ
クロコンピュータ21に対して行われるデータ送信、及
び第2マイクロコンピュータ21から第1マイクロコン
ピュータ11に対して行われるデータ送信を、それぞれ
異なるタイムチャート及びフローチャートを用いて説明
したが、これらの通信は、同時進行的に行われる。 すなわち、第4図及び第11図に示された、メインCP
U12により実行されるクランク処理、第5図及び第1
2図に示された、メインCPU12により実行される点
火時期/燃料量演算処理、第7図及び第13図に示され
た、ノックCPU22により実行されるクランク処理は
、それぞれ同一のクランク処理プログラム、点火時期/
燃料量演算処理プログラムとして、各マイクロコンピュ
ータ11及び12に記憶されている。 第14図は本発明の一実施例のタイムチャートであり、
前掲した第3図及び第10図に示されたタイムチャート
を合成したものである。 また、第15図はメインCPU12により実行されるク
ランク処理を示すフローチャートであり、前掲した第4
図及び第11図に示されたフローチャートを合成したも
のである。 同様に、第16図はメインCPU12により実行される
点火時期/燃料量演算処理を示すフローチャート、第1
1図はノックCPU22により実行されるクランク処理
を示すフローチャートであり、それぞれ前掲した第5図
及び第12図、並びに第7図及び第13図に示されたフ
ローチャートを合成したものである。 第14図〜第1フ図において、それぞれの図を作成(合
成)するために用いられた各図と同一の符号は、同一又
は同等部分をあられしているので、その説明は省略する
。 なお、第16図(第5図)に示されたステップ816の
処理は、高エンジン回転時も、第Oステージの間に実行
される必要があり、また第16図(第12図)のステッ
プS17の処理は、高エンジン回転時も第0ステージか
ら第2ステージの間に実行される必要がある。このステ
ップS17の処理は、第1ステージ又は第2ステージの
クランク処理において実行されても良いし、また第Oス
テージにおいてノックフラグが送信ポート22Aに出力
された後であれば、該ステージのクランク処理で行われ
ても良い。 さらに、第15図(第11図)のステップS3及びS4
において説明したように、メインCPU12によるF/
Sフラグの読み込みは、第4ステージに行われるものと
したか、送信ポート22AにF/Sフラグが出力された
後であれば、第3ステージであっても良いし、また第5
ステージであっても良い。 さて、第5図及び第16図に示されたように、メインC
PU12により実行される点火時期/燃料量演算処理に
おいて、Pbaの読み込み及びゾーン判別(A/D変換
)、バックグラウンド処理で読み込み及びゾーン判別さ
れたTwの読出し、並びにバルブタイミングV/Tの読
み込みが行われ、そして、それらデータを用いてバッフ
ァTxbuf内に6ビットのフレームデータが構成され
るので、各ステージにおいて実行されるメインCPU1
2のクランク処理(第4図及び第15図)においては、
単にバッファT xburから1ビットずつデーター 
 2 フ  − を読み出すだけで良い。 この結果、メインCPU12により実行されるクランク
処理の負荷が軽減され、その処理時間があまり長くなら
ないので、エンジン回転数が高くなっても、エンジンの
制御が良好に行われることができる。 第1図は本発明の一実施例の機能ブロック図である。第
1図において、第2図と同一の符号は、同一又は同等部
分をあらわしている。 第1図において、破線の左側は第1マイクロコンピュー
タ11の構成を、そして、破線の右側は第2マイクロコ
ンピュータ21の構成を示している。 まず、第1マイクロコンピュータ11側において、シリ
ンダパルス、TDcパルス及びクランクパルスハ、ステ
ージ判別手段51及びエンジン回転数判別手段52に入
力される。前記ステージ判別手段51においては、ステ
ージ番号が判別され、エンジン回転数判別手段52にお
いては、エンジン回転数が判別される。 燃料噴射制御手段58は、エンジン回転数信号、並びに
Pbaセンサ32、Tvセンサ33、Paセンサ34及
びThセンサ35の出力信号等を用いて、公知の適宜の
手法により、インジェクタ45より噴射される燃料の噴
射量、燃料噴射タイミ/グ等を演算する。この燃料噴射
制御手段58の出力信号は、ドライバ44に人力され、
これによりインジェクタ45が駆動される。 点火時期制御手段59は、エンジン回転数信号及びTh
センサ35の出力信号等を用いて、点火時期を演算する
。この点火時期制御手段59の出力信号は、イグナイタ
41に人力される。このイグナイタ41は、イグニショ
ンコイル42を介して、点火プラグ43に接続されてい
る。 負荷判別手段54は、Pbaセンサ32及び/あるいは
Thセンサ35の出力信号、あるいはその他の信号を用
いて、公知の手法により、当該エンジンの負荷を検出す
る。 V/T演算手段53は、エンジン回転数信号及びエンジ
ンの負荷信号(負荷判別手段54の出力信号)を用いて
、バルブタイミングV/Tを演算する。この演算された
バルブタイミングV/Tは、ドライバ46に入力され、
これにより、複数設けられた吸排気弁駆動用のカム選択
用のソレノイド47が駆動される。 ゾーン判別手段55及び56は、pbHセンサ32及び
Tvセンサ33の出力信号が、それぞれ4段階及び8段
階は区分されたゾーンのいずれに属するかを判別し、そ
れぞれ2ビット及び3ビットの信号に変換する。そして
、判別、変換されたゾーン情報は、第0ステージにおい
て、バッファTxbuf57に出力される。 同様に、V/T演算手段53の出力信号、すなわちバル
ブタイミングV/T(1ビットデータ)も、第Oステー
ジにおいて、前記バッファT xbuf57に出力され
る。 との第0ステージにおいては、バッファTxbul57
内に第9図りで示されたような6ビットのフレームデー
タが完成する。 バッファTxbuf57内のフレームデータは、各ステ
ージごとに1ビットずつ送信ポート12Aに出力される
。詳しくは、第3図(又は第14図)に示されるように
、第1及び第2ステージにおいではPbaの2ビットデ
ータが、第3〜第5ステージにおいてはTvの3ビット
データが、そして第0ステージにおいてはパルプタイミ
ングV/Tの1ビットデータが、それぞれ送信ポート1
2Aに出力される。 一方、第2マイクロコンピュータ21側においでは、シ
リンダパルス及びクランクパルスがステージ判別手段8
1に人力される。このステージ判別手段81は、前記ス
テージ判別手段51と同    様に、ステージ番号を
判別する。 バッファRxbuf82は、送信ポート12Aから受信
ポート22Bに転送されたデータを、各ステージごとに
1ビットずつ取り込む。詳しくは、第3図(第14図)
に示されるように、第2及び第3ステージにおいてはP
baの2ビットデータが、第4、第5及び第Oステージ
においてはTvの3ビットデータが、そして、第1ステ
ージにおいではバルブタイミングV/Tの1ビットデー
タが、それぞれバッファIjxbuf82の第O〜第5
ビット目に取り込まれる。 バッファRxbuf82内にデータが取り込まれると、
該データは、データ判別手段83に転送され、そしてデ
ータの内容が判別される。このデータの内容(すなわち
、PbalTw及びバルブタイミングV/Tの各データ
)は、ノッキング判別手段84に入力される。 前記ノッキング判別手段84は、前記各データ、及びノ
ックセンサ38より出力された信号を用いて、ノッキン
グの有無を判別し、ノックフラグを出力する。このノッ
クフラグは、第10図(第14図)に示されるように、
第Oステージにおいて送信ポート22Aに出力される。 F/S判別手段85は、ノックセンサ38が 正常であ
るか否かを判別し、F/Sフラグを発生する。     このF/Sフラグは、第10図(第14図)に示される
ように、第3ステージにおいて送信ポート22人に出力
される。 再び第1マイクロコンピュータ11側に戻り、第Oステ
ージにおいては、送信ポート22Aより受信ポート12
Bに転送されたデータがノックフラグとしてノッキング
制御手段60に取り込まれる。 また、第4ステージにおいては、送信ポート22Aより
受信ポート12Bに転送されたデータがF/Sフラグと
してノッキング制御手段60に取り込まれる。 前記ノッキング制御手段60は、ノックフラグに応じて
、点火時期制御手段59よりイグナイタ41へ出力され
る点火時期データを修正する。 さて、前述の説明においては、当該車両の主な制御を行
う第1マイクロコンピュータ11は、ノッキングの判定
を行う第2マイクロコンピュータ21と通信を行うもの
としたが、ブレーキのロック防止制御や、発進、加速時
の車両の空転を抑えるトラクション制御、あるいはその
他の制御を前記第1マイクロコンピュータ11と別のマ
イクロコンピユータで行う場合には、該マイクロコンピ
ュータと第1マイクロコンピュータ11との通信を行う
場合においても、本願発明は適用可能であることは当然
である。 また、データ通信を行うマイクロコンピュータは、3つ
以上であっても本発明の適用が可能である。 さらに、第1マイクロコンピュータ11から第2マイク
ロコンピュータ21にデータの送信を行う場合において
は、メインCPU12の点火時期/燃料量演算処理で、
所定の1フレーム(隣接するステージ6個分)で送信さ
れるべき全データ、換言すれば、所定のタイミングごと
に送信されるべき全データを用いてバッファT xbu
f内にフレームデータを作成し、該フレームデータを、
各ステージ毎に行われるメインCPU12のクランク処
理において1ビットずつ第2マイクロコンピュータ21
に送信するものとして説明したが、該クランク処理の処
理時間遅延を許容するならば、バッファTxbul内で
のフレームデータの作成を省略し、各データの送信ステ
ージで行われる各クランク処理において、各データの読
出し及びA/D変換を行い、該データの送信を行うよう
にしても良い。 すなわち、例えばPbaの送信に関しては、第5図(第
16図)のステップSll及びS12の処理を、メイン
CPU12の、第1ステージのクランク処理で行い、A
/D変換された2ビットのPbaデータの送信を、第1
及び第2ステージのクランク処理において1ビットずつ
行うようにしても良い。 また、逆に、第2マイクロコンピュータ21から第1マ
イクロコンピュータ11にデータの送信を行う場合に、
前述したフレームデータと同様のものを、該第2マイク
ロコンピュータ21のバッファ内に一旦形成し、その後
、ノックCPU22により各ステージ毎に実行されるク
ランク処理において、該バッファ内データを1ビットす
つ第1マイクロコンピュータ11に対して出力するよう
にしても良いことは当然である。 (発明の効果) 以上の説明から明らかなように、本発明によれば、次の
ような効果か達成される。 (1)請求項1記載の車両用電子制御装置によれば、特
別なシリアルポートを必要とすることなく、かつエンジ
ン回転に同期して、複数のマイクロコンピュータ間でデ
ータ通信を行うことができる。 (2)請求項2記載の車両用電子制御装置によれば、ク
ランク軸回転角に応じたデータの送信か、バッファ内か
らのデータの読出しだけで済むようになるので、クラン
ク軸回転角に応じた、データ送信のためのデータ処理以
外のデータ処理(クランク処理)に要する時間が遅延さ
れることがない。この結果、エンジン回転数が高くなっ
ても、車両制御のための各種制御も遅延されず、良好に
行われることができる。
DETAILED DESCRIPTION OF THE INVENTION (Industrial field) The present invention relates to a vehicle electronic control device, and in particular, in a vehicle electronic control device having a plurality of microcomputers, various types of control are directly performed between each microcomputer. The present invention relates to a vehicle electronic control device that performs data communication. (Prior Art) Engine ignition timing control, fuel injection control using an injector, etc. in automobiles, motorcycles, etc. (hereinafter referred to as vehicles) are performed using an electronic control device equipped with a microcomputer. Incidentally, in recent years, knocking control (vehicle control to prevent knocking) has been implemented, and various knocking detection methods have been proposed for this purpose, but this knocking detection requires relatively complicated processing. In order to do this, a microcomputer other than the one for performing ignition timing control, fuel injection control, etc. as described above may be used. Here, when each of these microcomputers performs calculations on various data using data output or calculated from the other microcomputer, data communication between the microcomputers is required. For this reason, conventionally, as shown in FIG. 18, a communication line 3 for transmitting and receiving 1-bit data is provided between a plurality of microcomputers (between the first and second microcomputers 1 and 2). Parallel communication can be performed by providing only the number of bits necessary for communication, or as shown in FIG. A general-purpose serial port 5 is provided at the end to perform serial communication using a reference clock within each microcomputer. (Problems to be Solved by the Invention) The above-described conventional technology had the following problems. (1) In the above-mentioned parallel communication, as the amount of data to be communicated increases, the number of communication lines increases accordingly, which increases the size and complexity of the configuration of the vehicle electronic control device and increases manufacturing costs. Furthermore, as the number of communication lines increases, the probability of failure of the vehicle electronic control device increases, and reliability decreases. (2) Serial communication requires a serial port for data transmission and reception, which increases the size of the vehicle electronic control device. Furthermore, when data is sent to and received from multiple destinations, additional serial ports or switching circuits are required, making the configuration of the vehicle electronic control device more complex and larger. Furthermore, since data communication is performed in synchronization with the microcomputer's clock, data communication cannot be performed in synchronization with the rotation of the engine. In other words, when controlling a vehicle, it is necessary to control various control devices (for example, ignition timing control, fuel injection control, knocking control, etc.) according to the engine rotation speed, but data communication that is synchronized with the engine rotation is not possible. Otherwise, the various control devices described above cannot be accurately controlled. The present invention was made to solve the above-mentioned problems, and its purpose is to transfer serial data between multiple microcomputers without the need for a special serial port and in synchronization with engine rotation. An object of the present invention is to provide a vehicle electronic control device that can communicate. (Means and Effects for Solving the Problems) In order to solve the above-mentioned problems, the present invention provides a transmission port for at least one of the plurality of microcomputers constituting the vehicle electronic control device. is provided, and transmits data one bit at a time from the transmission port in a predetermined order according to the rotation angle of the crankshaft, and transmits data to at least another microcomputer among the plurality of microcomputers to the transmission port. A receiving port is provided to be connected, and data is received bit by bit from the receiving port according to the rotation angle of the crankshaft,
Furthermore, the present invention is characterized in that data transmission by the above-mentioned microcomputer and data reception by the above-mentioned other microcomputer are performed with a phase difference. Moreover, in the buffer of the microcomputer mentioned above,
Further, all the data to be transmitted from the data transmitting means at predetermined timings are temporarily stored, and the data in the buffer is transmitted bit by bit to the transmitting port in accordance with the crankshaft rotation angle. It also has its own characteristics. As a result, data transmission corresponding to the crankshaft rotation angle can be performed by simply reading data from the buffer. (Example) The present invention will be described in detail below with reference to the drawings. FIG. 2 is a block diagram of one embodiment of the present invention. In FIG. 2, cylinder pulses, TDC pulses, and crank pulses extracted by a known method according to the engine rotation of the vehicle are input to the first microcomputer 11 via a waveform shaping circuit 31. Assuming that the engine is a 4-cylinder, 4-cycle engine, the cylinder pulse is generated when the crankshaft rotates 2 times (72
In this example, the TDC pulse outputs 1 pulse each time the piston of each cylinder reaches top dead center, that is, 4 pulses are output every 2 revolutions of the crankshaft. Six pulses are output every time one TDC pulse is output. These cylinder pulses and crank pulses are also input to a second microcomputer 21, which will be described later. The first microcomputer 11 performs main control of the vehicle, such as ignition timing control and fuel injection control, and includes a CPU 12 (hereinafter referred to as main CPU 12), a ROMSRAM, an input/output interface, etc. (none of which are shown in the figure). ). Pba sensor 32 that detects intake pipe internal negative pressure (absolute pressure) Pba; Tw sensor 3 that detects engine coolant temperature Tv
3. A Pa sensor 34 that detects atmospheric pressure Pa, a Th sensor 35 that detects throttle valve opening, and the like are connected to the first microcomputer 11 via an A/D converter 31. The first microcomputer 11 is also connected to a spark plug 43 via an igniter 41 and an ignition coil 42, and to an injector 45 via a driver 44. Ignition timing control and fuel injection control by the first microcomputer 11 may be performed using known methods. Fuel injection control is, for example, disclosed in Japanese Patent Publication No. 62-862
It is described in Publication No. 5. Further, there are multiple types of cams (not shown) for driving the intake and exhaust valves of the engine, and one of them is selected depending on, for example, the rotational speed and load of the engine. This signal for cam selection (hereinafter referred to as valve timing V
/T) uses the rotational speed of the engine and the engine load state signal to control the first microcomputer 11.
It is calculated by This valve timing V/T is output to a driver 46, and a solenoid 47 for selecting the cam is driven. The second microcomputer 21 detects the knob king of the engine, and similarly to the first microcomputer 11, the second microcomputer 21 has a CPU 22 (hereinafter referred to as a knock CP).
U22''), ROMSRAM, input/output interface, etc. (none of which are shown).A knock sensor installed in the engine cylinder head (
The pressure sensor) 38 is connected to the second microcomputer 21 via a waveform shaping circuit 39. Now, as mentioned above, the second microcomputer 21 detects knocking, but in order to detect this knocking, not only the output signal of the knock sensor 38 but also the Pba
The output signals of the sensor 32 and Tv sensor 33 as well as the valve timing V/T are also required. Output signals of the Pba sensor 32 and Tw sensor 33,
Further, the valve timing V/T is directly transmitted from the general-purpose transmission port 12A of the main CPU 12 to the general-purpose reception port 22B of the knock CPU 22 by a method described later. The first microcomputer 11 also uses information indicating whether or not knocking is occurring (hereinafter referred to as a knock flag) determined by the second microcomputer 21, and whether the knock sensor 38 is operating normally. Failsafe signal (hereinafter referred to as F)
/S flag) to prevent ignition timing control (hereinafter referred to as knock control) to prevent knocking.
I do. This knock control retards the ignition timing when the engine is knocking, and returns the ignition timing to its original state (advances the ignition timing) when the knocking stops. Such a knock control method is described in, for example, Japanese Patent Laid-Open No. 63-29061. The knock flag and F/S flag are directly transmitted from the general-purpose transmission port 22A of the knock CPU 22 to the general-purpose reception port 12B of the main CPU 12 by a method described later. Note that, in FIG. 2, illustration of a battery R (battery) that supplies power to each component shown in the figure is omitted. Now, among the operations of the vehicle electronic control device having such a configuration, a method of data communication between the main CPU 12 and the knock CPU 22 will be described in detail below. Knock CPU from transmission port 12A of main CPU 12
The data sent to 22 is: ■Valve timing V/T: L/H” information (1 bit) ■Intake pipe negative pressure Pba: Zone information 4 stages (2 bits) ■Cooling water temperature Tν: Zone information The data is 8 stages (3 bits), totaling 6 bits. Also, the data sent from the transmission port 22A of the knock CPU 22 to the main CPU 12 is: ■Knock flag: present/absent information (1 bit)■ F/S flag:
It is a total of 2 bits of data including presence/absence information (1 bit). First, a data communication method for transmitting data from the main CPU 12 to the knock CPU 22 will be described. FIG. 3 is a time chart showing the main operations when transmitting data from the main CPU 12 to the knock CPU 22, FIGS. 4 and 5 are flow charts showing the main processing operations performed by the main CPU 12 in this case, and similarly
The figure is a flowchart showing the main processing operations performed by the knock CPU 22 in this case. Further, FIGS. 6 and 8 are flowcharts showing background processing executed by the main CPU 12 and the knock CPU 22. Note that R xbuf shown in the lower part of FIG. 3 indicates an 8-bit buffer (register) in the second microcomputer 21, which will be described later regarding step S34 in FIG. Furthermore, as shown in Fig. 3, the generation stage of the crank pulse that occurs immediately after the rising edge of the TDC pulse is referred to as the 0th stage, and thereafter, the generation stage of the crank pulse that occurs immediately after the rise of the TDC pulse is the 0th stage. The stage number is incremented. That is, the stage numbers are from O to 5. In other words, this stage indicates the crankshaft rotation angle of the engine. Crank processing (processing synchronized with crank pulses) performed by the main CPU 12 is performed by an interrupt signal generated at the start of each stage. In Fig. 4, the main CPU 1 performs the crank processing.
Only the main processing when data is transmitted from No. 2 to the knock CPU 22 is shown. Further, immediately after the cranking process is completed in the 0th stage, the ignition timing/fuel amount calculation process shown in FIG. 5 is performed. If the first stage is reached before this ignition timing/fuel melon calculation processing is completed, the crank processing is performed preferentially by an interrupt, as shown in Fig. 3, and the crank processing is completed. After that, the continuation of the ignition timing/fuel amount calculation process is executed again. Although not shown, when the engine is in a high rotational speed state, the ignition timing/fuel amount calculation process may be continued in the second, third, and so on stages. Further, in FIG. 5, only the main processing in the case of data communication from the main CPU 12 to the knock CPU 22 among the ignition timing/fuel amount calculation processing is shown. Further, the main CPU 12 performs the background processing shown in FIG. 6 when the load of calculations and the like is lightened. The cranking process performed by the knock CPU 22 is also performed by an interrupt signal generated at the start of each stage. FIG. 7 shows that the main CPU 1 performs this cranking process.
Only the main processing when data is transmitted from No. 2 to the knock CPU 22 is shown. Further, the knock CPU 22 performs the background processing shown in FIG. 8 when the load of calculations and the like is lightened. First, the operation of the main CPU 12 will be explained. In the ignition timing/fuel amount calculation process shown in FIG. 5, first in step Sll, the intake pipe negative pressure Pba signal output from the pbB sensor 32 is read. In step S12, the read Pba is set to 4
Determine which of the zones (zones) you want to enter. That is, in this process, the read Pba is converted into 2-bit digital data. This converted 2-bit data is sent to an 8-bit buffer (register) Txbuf in the first microcomputer 11.
(Pb
a data is indicated by symbol X). In step S13, the region (zone) of the cooling water temperature Tv determined and stored in step S22 in FIG. 6, which will be described later, is read out. This cooling water temperature zone is divided into 8 stages as described above, and the TV data is 3 bits. Furthermore, in step S22, the TV
The data is stored in the third to fifth bits of the 8-bit register (see FIG. 9, in which TV data is indicated by the symbol Y). In step S14, the contents of the 8-bit register read in step S13 are transferred to the buffer T x
buf (see FIG. 9C). In step S15, the valve timing V/T (
1 bit data) is read, and step 81
6, the data is stored in the 0th buffer Txbuf.
It is stored in the bit-th bit (see figure 9, in the same figure,
Valve timing V/T data is indicated by numeral 2. ) In the following explanation, the buffer T x
6-bit data (Pbl
, Tw and V/T) are called frame data. In step 81g, calculations of ignition timing (angle), fuel injection amount, etc., engine load determination, valve timing V/T setting, etc. are performed. After that, other processing (not shown) is performed, and the processing ends. Next, in the cranking process shown in Figure 4, first in step S1, it is determined what stage the stage in question is, that is, the stage number. and,
In step S2, various processes are performed according to each stage (for example, angle-time conversion of the ignition timing calculated in FIG. 5 described above, timer start for ignition, etc.)
is executed. Next, in step S5, the determined stage number is set to n. In step S6, step 3 in FIG.
16, the n-th bit data of the frame data configured in the buffer T xbuf is sent to the transmission port 1.
Output to 2A. That is, in the ignition timing/fuel amount calculation process shown in No. 3-, if the process shown in step S16 is completed at the time point shown by the symbol A, the buffer T xbuf synthesized in step 316 is
The first and second bit data (Pba) of the buffer Txbuf are output to the transmission port 12A in the first and second stages, respectively, and the third to fifth bit data (Tw) of the buffer T , respectively, are output at the third to fifth stages, and the 0th bit data (valve timing V/T) of the buffer Txbur is output at the O-th stage. After that, other processing (not shown) is performed, and the processing ends. In the background processing of FIG. 6, step S
At step 21, the output signal of the Tw sensor 33 is read. Then, in step S22, the read Tv
It is determined which of eight zones it falls into. That is, in this process, TV is converted into 3-bit digital data. This converted 3-bit data is stored in the 3rd to 5th bits of the 8-bit register (0th pitle 7th bit) in the first microcomputer 11, as described above in step S13. (See Figure 9-8). Next, the operation of the knock CPU 22 will be explained. In the cranking process shown in FIG. 7, first in step S31, the stage number is determined. Then, in step S32, various processes (for example, knocking determination, etc.) according to each stage are executed. In step S33, the determined stage number is set to n. Following this step S33, the process of step S34 is performed, but the process of this step S34 is completed by the time the process of step S6 of the main CPU 12 shown in FIG. 4 is started. There is. That is, the cranking process executed by the main CPU 12 shown in FIG. 4, and the knocking CPU shown in FIG.
The cranking process executed by 22 is executed at the same time as the start of each stage, but the process of step S34 in FIG.
The process of step S6 in the figure is performed some time after the start of the cranking process (that is, after the process of step S2 and the processes of steps S3, 34, etc. described later with reference to FIG. 11 have been executed). As will be described later, the process of step S34 is a process of reading data generated at the transmission port 12A into the knock CPU 22, but due to the difference in the processes of steps S34 and S6 described above, in other words, the position of steps S34 and S6 is Due to the phase difference, as shown in FIG. 3, data generated at the transmission port 12A is read into the knock CPU 22 immediately after the start of each stage, and thereafter
The data occurring in 2A is updated. In step S34, the data generated at the transmission port 12A of the main CPU 12 is transferred to the 8-bit buffer Rχbuf (
The (n-2)th bit of the (Oth bit to seventh bit) is read and stored. That is, as shown in FIG.
The data of P bas T v and valve timing V/T generated at the transmission port 12A of the main CPU 12 are stored in the Oth to fifth bits of f. After that, other processing (not shown) is performed, and the processing ends. In the background processing of FIG.
At 41, the second microcomputer 21 determines whether the knock sensor 38 is functioning normally.
F/S flag is generated. Next, a data communication method for transmitting data from the knock CPU 22 to the main CPU 12 will be explained. FIG. 10 is a time chart showing the main operations when data is transmitted from the knock CPU 22 to the main CPU 12, and FIGS.
Similarly, FIG. 13 is a flowchart showing the main processing operations performed by the knock CPU 22 in this case. Of the crank processing and ignition timing/fuel amount calculation processing performed by the main CPU 12, only the main processing when transmitting data from the knock CPU 22 to the main CPU 12 is shown in FIGS. 11 and 12. Also, in FIG. 13, among the crank processing performed by the knock CPU 22, the main CPU is
Only the main processing when transmitting data to U12 is shown. First, in the cranking process of FIG. 13 executed by the knock CPU 22, after stage determination etc. are performed (after step 831 etc. of FIG. 7), in step S35,
It is determined whether the stage in question is the Oth stage. If it is the O-th stage, the knock flag calculated by the second microcomputer 21 is outputted to the transmission port 22A of the knock CPU 22 in step 836. If it is determined in step S35 that the stage is not the O-th stage, then it is determined in step S37 whether or not the stage is the third stage. If it is the third stage, in step 53B,
The F/S flag is output to the knock CPU 22Q transmission port 22A. After completing step 836 or 83g, or if the stage is neither the Oth stage nor the third stage, other processing (not shown) is then performed, and the processing ends. Next, in the cranking process shown in FIG. 11 executed by the main CPU 12, after a predetermined stage determination (step Sl in FIG. 4), etc. is performed, in step S3,
It is determined whether the stage in question is the fourth stage. If it is the fourth stage, in step S4, data generated at the reception port 12B of the main CPU 12 (that is, data generated at the transmission port 22A of the knock CPU 22) is read as an F/S flag. After step S4 is completed, or in step S3, if the stage is not the fourth stage, then other processes not shown are performed, and the process ends. In the ignition timing/fuel amount calculation process shown in FIG. 12 executed by the main CPU 12, in step SIT, the data generated at the reception port 12B of the main CPU 12 (that is, the data generated at the transmission port 22A of the knock CPU 22) is converted into a knock signal. Read as a flag. The process of step S17 is performed after the synthesis of the buffers Txbu is completed (after the process of step 816 in FIG. 5 is completed). In this way, the knock flag and F/S flag calculated by the second microcomputer 21 are transferred to the first microcomputer 11. Now, in this way, data is transmitted from the first microcomputer 11 to the second microcomputer 21, and conversely, data is also transmitted from the second microcomputer 21 to the first microcomputer 11. . And, this data overconfidence changes for each stage, that is, depending on the engine rotation (crankshaft rotation angle).
It will be done. By the way, data transmission from the first microcomputer 11 to the second microcomputer 21 and data transmission from the second microcomputer 21 to the first microcomputer 11 are performed using different time charts and flowcharts. However, these communications are performed simultaneously. That is, the main CP shown in FIGS. 4 and 11
Crank processing executed by U12, Fig. 5 and Fig. 1
The ignition timing/fuel amount calculation process executed by the main CPU 12 shown in FIG. 2 and the crank process executed by the knock CPU 22 shown in FIGS. 7 and 13 are the same crank process program, Ignition timing/
It is stored in each microcomputer 11 and 12 as a fuel amount calculation processing program. FIG. 14 is a time chart of an embodiment of the present invention,
This is a composite of the time charts shown in FIG. 3 and FIG. 10 mentioned above. Further, FIG. 15 is a flowchart showing the cranking process executed by the main CPU 12, and is a flow chart showing the cranking process executed by the main CPU 12.
This is a composite of the flowcharts shown in FIG. 1 and FIG. Similarly, FIG. 16 is a flowchart showing the ignition timing/fuel amount calculation process executed by the main CPU 12.
FIG. 1 is a flowchart showing the cranking process executed by the knock CPU 22, and is a composite of the flowcharts shown in FIGS. 5 and 12, and FIGS. 7 and 13, respectively, shown above. In FIGS. 14 to 1F, the same reference numerals used to create (synthesize) each figure represent the same or equivalent parts, so the explanation thereof will be omitted. Note that the process of step 816 shown in FIG. 16 (FIG. 5) needs to be executed during the O-th stage even when the engine speed is high, and the process of step 816 shown in FIG. 16 (FIG. 12) The process of S17 needs to be executed between the 0th stage and the 2nd stage even when the engine speed is high. The process of step S17 may be executed during the cranking process of the first stage or the second stage, or after the knock flag is output to the transmission port 22A in the O-th stage, the process of the cranking process of the stage It may be done in Furthermore, steps S3 and S4 in FIG. 15 (FIG. 11)
As explained in , F/
Reading of the S flag is assumed to be carried out in the fourth stage, or may be carried out in the third stage after the F/S flag is output to the transmission port 22A, or may be carried out in the fifth stage.
It may be a stage. Now, as shown in Figures 5 and 16, the main C
In the ignition timing/fuel amount calculation process executed by the PU 12, reading of Pba and zone discrimination (A/D conversion), reading of Tw read and zone discriminated in background processing, and reading of valve timing V/T are performed. The data is used to configure 6-bit frame data in the buffer Txbuf, so the main CPU 1 executed in each stage
In the cranking process in step 2 (Figures 4 and 15),
Simply data bit by bit from buffer Txbur
2 All you have to do is read out F -. As a result, the load on the cranking process executed by the main CPU 12 is reduced, and the processing time does not become too long, so that even if the engine speed becomes high, the engine can be well controlled. FIG. 1 is a functional block diagram of an embodiment of the present invention. In FIG. 1, the same reference numerals as in FIG. 2 represent the same or equivalent parts. In FIG. 1, the left side of the broken line shows the configuration of the first microcomputer 11, and the right side of the broken line shows the configuration of the second microcomputer 21. First, on the first microcomputer 11 side, a cylinder pulse, a TDc pulse, and a crank pulse are input to the stage discrimination means 51 and the engine rotation speed discrimination means 52. The stage discrimination means 51 discriminates the stage number, and the engine rotation speed discrimination means 52 discriminates the engine rotation speed. The fuel injection control means 58 controls the fuel injected from the injector 45 by a known appropriate method using the engine rotational speed signal and the output signals of the Pba sensor 32, Tv sensor 33, Pa sensor 34, Th sensor 35, etc. calculates the injection amount, fuel injection timing, etc. The output signal of this fuel injection control means 58 is manually inputted to the driver 44,
This drives the injector 45. The ignition timing control means 59 receives the engine rotation speed signal and Th
The ignition timing is calculated using the output signal of the sensor 35 and the like. The output signal of this ignition timing control means 59 is manually input to the igniter 41. This igniter 41 is connected to a spark plug 43 via an ignition coil 42. The load determining means 54 detects the load of the engine using the output signal of the Pba sensor 32 and/or the Th sensor 35, or other signals by a known method. The V/T calculating means 53 calculates the valve timing V/T using the engine rotation speed signal and the engine load signal (output signal of the load determining means 54). This calculated valve timing V/T is input to the driver 46,
As a result, the plurality of cam selection solenoids 47 for driving the intake and exhaust valves are driven. Zone determining means 55 and 56 determine which of the four-stage and eight-stage zones the output signals of the pbH sensor 32 and the Tv sensor 33 belong to, respectively, and convert them into 2-bit and 3-bit signals, respectively. do. Then, the determined and converted zone information is output to the buffer Txbuf57 at the 0th stage. Similarly, the output signal of the V/T calculating means 53, that is, the valve timing V/T (1-bit data) is also output to the buffer Txbuf 57 in the O-th stage. In the 0th stage with the buffer Txbul57
Within this time, 6-bit frame data as shown in Figure 9 is completed. The frame data in the buffer Txbuf 57 is output to the transmission port 12A one bit at each stage. Specifically, as shown in FIG. 3 (or FIG. 14), 2-bit data of Pba is used in the first and second stages, 3-bit data of Tv is used in the third to fifth stages, and In stage 0, 1-bit data of pulp timing V/T is sent to each transmission port 1.
Output to 2A. On the other hand, on the second microcomputer 21 side, the cylinder pulse and the crank pulse are detected by the stage discriminating means 8.
1 is man-powered. This stage discrimination means 81 discriminates the stage number similarly to the stage discrimination means 51 described above. The buffer Rxbuf 82 takes in data transferred from the transmission port 12A to the reception port 22B, one bit at each stage. For details, see Figure 3 (Figure 14)
As shown in , in the second and third stages P
The 2-bit data of ba, the 3-bit data of Tv in the 4th, 5th and O-th stages, and the 1-bit data of valve timing V/T in the 1st stage are respectively stored in the O-th to O-th buffers Ijxbuf82. Fifth
Incorporated into the bit. When data is taken into the buffer Rxbuf82,
The data is transferred to data determining means 83, and the content of the data is determined. The contents of this data (that is, each data of PbalTw and valve timing V/T) are input to the knocking determination means 84. The knocking determination means 84 determines whether or not knocking occurs using the respective data and the signal output from the knock sensor 38, and outputs a knock flag. This knock flag, as shown in FIG. 10 (FIG. 14),
At the O-th stage, the signal is output to the transmission port 22A. The F/S determining means 85 determines whether the knock sensor 38 is normal or not, and generates an F/S flag. This F/S flag is output to 22 transmission ports in the third stage, as shown in FIG. 10 (FIG. 14). Returning to the first microcomputer 11 side again, in the O-th stage, the transmission port 22A is connected to the reception port 12.
The data transferred to B is taken into the knocking control means 60 as a knocking flag. Furthermore, in the fourth stage, the data transferred from the transmission port 22A to the reception port 12B is taken into the knocking control means 60 as an F/S flag. The knocking control means 60 corrects the ignition timing data output from the ignition timing control means 59 to the igniter 41 in accordance with the knock flag. Now, in the above explanation, it was assumed that the first microcomputer 11, which performs the main control of the vehicle, communicates with the second microcomputer 21, which determines knocking. , when performing traction control to suppress vehicle slippage during acceleration or other controls using a microcomputer different from the first microcomputer 11, and when communicating between the microcomputer and the first microcomputer 11; It goes without saying that the present invention is also applicable. Further, the present invention can be applied even if there are three or more microcomputers that perform data communication. Furthermore, when transmitting data from the first microcomputer 11 to the second microcomputer 21, the main CPU 12 performs ignition timing/fuel amount calculation processing.
The buffer T
Create frame data in f, and convert the frame data into
In the cranking process of the main CPU 12 performed for each stage, the second microcomputer 21
However, if the processing time delay of the crank processing is allowed, the creation of frame data in the buffer Txbul can be omitted, and each data The data may be read out and A/D converted, and then transmitted. That is, for example, regarding the transmission of Pba, the processes of steps Sll and S12 in FIG. 5 (FIG. 16) are performed by the first stage crank process of the main CPU 12, and A
/D converted 2-bit Pba data is transmitted in the first
The second stage cranking process may be performed bit by bit. Conversely, when transmitting data from the second microcomputer 21 to the first microcomputer 11,
Frame data similar to the above-mentioned frame data is once formed in the buffer of the second microcomputer 21, and then, in the cranking process executed by the knock CPU 22 at each stage, the data in the buffer is converted into 1-bit data. Of course, the output may be made to one microcomputer 11. (Effects of the Invention) As is clear from the above description, according to the present invention, the following effects are achieved. (1) According to the electronic control device for a vehicle according to the first aspect, data communication can be performed between a plurality of microcomputers in synchronization with engine rotation without requiring a special serial port. (2) According to the electronic control device for a vehicle according to claim 2, since it is only necessary to transmit data according to the crankshaft rotation angle or read data from the buffer, Further, the time required for data processing (crank processing) other than data processing for data transmission is not delayed. As a result, even when the engine speed increases, various controls for vehicle control are not delayed and can be performed satisfactorily.

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

第1図は本発明の一実施例の機能ブロック図である。 第2図は本発明の一実施例のブロック図である。 第3図はメインCPU12からノックCPU22ヘデー
タ送信を行う場合の主要動作を示すタイムチャートであ
る。 第4図及び第5図はメインCPU12により行われる処
理動作のうちの、メインCPU12からノックCPU2
2へデータ送信を行う場合の主要処理動作を示すフロー
チャートである。 第6図はメインCPU12により行われるバックグラウ
ンド処理を示すフローチャートである。 第7図はノックCPU22により行われる処理動作のう
ちの、メインCPU12からノックCPU22へデータ
送信を?Tう場合の主要処理動作を示すフローチャート
である。 第8図はノックCPU22により行われるバックグラウ
ンド処理を示すフローチャートである。 第9図は8ビットバッファTxbuf、及び該バッファ
内にデータが構成される様子を説明するための図である
。 第10図はノックCPU22からメインCPU12ヘデ
ータ送信を行う場合の主要動作を示すタイムチャートで
ある。 第11図及び第12図はメインCPU12により行われ
る処理動作のうちの、ノックCPU22からメインCP
U12ヘデータ送信を行う場合の主要処理動作を示すフ
ローチャートである。 第13図はノックCPU22により行われる処理動作の
うちの、ノックCPU22からメインCPU12ヘデー
タ送信を行う場合の主要処理動作を示すフローチャート
である。 第14図は本発明の一実施例のタイムチャートである。 第15図はメインCPU12により実行されるクランク
処理を示すフローチャートである。 第16図はメインCPU12により実行される点火時期
/燃料量演算処理を示すフローチャートである。 第11図はノックCPU22により実行されるクランク
処理を示すフローチャートである。 第18図及び第19図は複数のマイクロコンピュータ間
で行われる従来のデータ通信手法を説明するための図で
ある。 11・・・第1マイクロコンピュータ、12・・・メイ
ンCPU、12A・・・送信ポート、12B・・・受信
ポート、21・・・第2マイクロコンピュータ、22・
・クランクCPU、22A・・・送信ポート、22 B
−・・受信ポート、32−Pbaセンサ、33・・・T
wセンサ、38・・クランクセンサ、43・・・点火プ
ラグ、45・・−インジェクタ、47・・ツレノイド、
51・・・ステージ判別手段、52・・・エンジン回転
数判別手段、53・・・V/T演算手段、54・・・負
荷判別手段、55.5ロー・・ゾーン判別手段、57・
・・バツフアTxbuf、 5 B・・・燃料噴射制御
手段、59・・・点火時期制御手段、60・・ツッキン
グ制御手段、81・・・ステージ判別手段、82−−・
バッファ Rxbufs 83−データ判別手段、84
・・−ノッキング判別手段、85・・・F/S判別手段
FIG. 1 is a functional block diagram of an embodiment of the present invention. FIG. 2 is a block diagram of one embodiment of the present invention. FIG. 3 is a time chart showing the main operations when transmitting data from the main CPU 12 to the knock CPU 22. FIG. 4 and FIG. 5 show the processing operations performed by the main CPU 12 from the main CPU 12 to the knock CPU 2.
2 is a flowchart illustrating main processing operations when transmitting data to No. 2. FIG. FIG. 6 is a flowchart showing background processing performed by the main CPU 12. FIG. 7 shows data transmission from the main CPU 12 to the knock CPU 22, which is one of the processing operations performed by the knock CPU 22. 12 is a flowchart showing main processing operations in the case of T. FIG. 8 is a flowchart showing background processing performed by the knock CPU 22. FIG. 9 is a diagram for explaining the 8-bit buffer Txbuf and how data is structured within the buffer. FIG. 10 is a time chart showing the main operations when transmitting data from the knock CPU 22 to the main CPU 12. FIG. 11 and FIG. 12 show the processing operations from the knock CPU 22 to the main CPU among the processing operations performed by the main CPU 12.
It is a flowchart which shows the main processing operation when transmitting data to U12. FIG. 13 is a flowchart showing the main processing operations when transmitting data from the knock CPU 22 to the main CPU 12, among the processing operations performed by the knock CPU 22. FIG. 14 is a time chart of one embodiment of the present invention. FIG. 15 is a flowchart showing the cranking process executed by the main CPU 12. FIG. 16 is a flowchart showing the ignition timing/fuel amount calculation process executed by the main CPU 12. FIG. 11 is a flowchart showing the cranking process executed by the knock CPU 22. FIGS. 18 and 19 are diagrams for explaining a conventional data communication method performed between a plurality of microcomputers. DESCRIPTION OF SYMBOLS 11... First microcomputer, 12... Main CPU, 12A... Transmission port, 12B... Receiving port, 21... Second microcomputer, 22...
・Crank CPU, 22A...Sending port, 22B
--...Reception port, 32-Pba sensor, 33...T
w sensor, 38... crank sensor, 43... spark plug, 45...-injector, 47... turenoid,
51... Stage discrimination means, 52... Engine speed discrimination means, 53... V/T calculation means, 54... Load discrimination means, 55.5 Low... Zone discrimination means, 57.
... Buffer Txbuf, 5 B... Fuel injection control means, 59... Ignition timing control means, 60... Picking control means, 81... Stage discrimination means, 82--...
Buffer Rxbufs 83-data discrimination means, 84
...-knocking discrimination means, 85...F/S discrimination means

Claims (2)

【特許請求の範囲】[Claims] (1)クランク軸の回転角に応じて各種処理を行う複数
のマイクロコンピュータを備え、該回転角に応じて、前
記各マイクロコンピュータ間でシリアルデータ通信を行
う車両用電子制御装置において、前記複数のマイクロコ
ンピュータのうちの少なくとも一のマイクロコンピュー
タは、送信ポートと、クランク軸回転角に応じて、前記
送信ポートに所定の順番で1ビットずつデータを送出す
るデータ送信手段とを具備し、 前記複数のマイクロコンピュータのうちの少なくとも他
のマイクロコンピュータは、前記送信ポートに接続され
る受信ポートと、クランク軸回転角に応じて、前記受信
ポートから1ビットずつデータを受信するデータ受信手
段とを具備し、前記データ送信手段及びデータ受信手段
は、位相差をもってデータの送信及び受信を行うことを
特徴とする車両用電子制御装置。
(1) A vehicle electronic control device comprising a plurality of microcomputers that perform various processes according to the rotation angle of a crankshaft, and performing serial data communication between the microcomputers according to the rotation angle. At least one of the microcomputers includes a transmission port and data transmission means for transmitting data one bit at a time in a predetermined order to the transmission port in accordance with a crankshaft rotation angle, At least another of the microcomputers includes a reception port connected to the transmission port, and data reception means for receiving data bit by bit from the reception port in accordance with a crankshaft rotation angle, An electronic control device for a vehicle, wherein the data transmitting means and the data receiving means transmit and receive data with a phase difference.
(2)前記一のマイクロコンピュータは、さらに、前記
データ送信手段より送信されるべき全データをバッファ
内に一時記憶すると共に、前記データ送出手段は、クラ
ンク軸回転角に応じて、前記バッファ内データを1ビッ
トずつ前記送信ポートに送出することを特徴とする請求
項1記載の車両用電子制御装置。
(2) The first microcomputer further temporarily stores all data to be transmitted from the data transmitting means in a buffer, and the data transmitting means transmits the data in the buffer according to the crankshaft rotation angle. 2. The vehicle electronic control device according to claim 1, wherein the vehicular electronic control device transmits one bit at a time to the transmission port.
JP1287881A 1989-11-07 1989-11-07 Electronic controller for vehicle Pending JPH03149338A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP1287881A JPH03149338A (en) 1989-11-07 1989-11-07 Electronic controller for vehicle

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP1287881A JPH03149338A (en) 1989-11-07 1989-11-07 Electronic controller for vehicle

Publications (1)

Publication Number Publication Date
JPH03149338A true JPH03149338A (en) 1991-06-25

Family

ID=17722937

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1287881A Pending JPH03149338A (en) 1989-11-07 1989-11-07 Electronic controller for vehicle

Country Status (1)

Country Link
JP (1) JPH03149338A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0571410A (en) * 1991-09-09 1993-03-23 Honda Motor Co Ltd Electronic control unit for vehicle
WO2012105540A1 (en) * 2011-02-03 2012-08-09 株式会社豊田自動織機 Fuel injection control device
JP2016173091A (en) * 2015-03-18 2016-09-29 日立オートモティブシステムズ株式会社 Control device and control method of internal combustion engine

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0571410A (en) * 1991-09-09 1993-03-23 Honda Motor Co Ltd Electronic control unit for vehicle
WO2012105540A1 (en) * 2011-02-03 2012-08-09 株式会社豊田自動織機 Fuel injection control device
JP2016173091A (en) * 2015-03-18 2016-09-29 日立オートモティブシステムズ株式会社 Control device and control method of internal combustion engine

Similar Documents

Publication Publication Date Title
US20050065691A1 (en) Torque control method for an internal combustion engine
EP0058561B1 (en) Fuel injection control method
CN100447391C (en) Engine torque control device
US7438665B2 (en) Control system for internal combustion engine
US5991686A (en) Vehicle electronic control using one A/D converter for time-synchronous and time-asynchronous A/D converter
JPH03149338A (en) Electronic controller for vehicle
JPH06236352A (en) Data communication device
US5509389A (en) Ignition timing control system for internal combustion engines
US6588258B2 (en) Method for providing engine torque information
JPH08246933A (en) Fuel supply device of engine
JP3952634B2 (en) Electronic control unit
JPH0571410A (en) Electronic control unit for vehicle
EP1439299B1 (en) Engine control device
JPH0275760A (en) Ignition timing control device for internal combustion engine
JP3517951B2 (en) Control device for internal combustion engine for vehicle
EP1101920B1 (en) Shift control method for automatic transmission
US20070095314A1 (en) Control apparatus and control method for internal combustion engine
JP3938858B2 (en) Electronic control device for vehicle
JP3339763B2 (en) Analog / digital converter
JP3498802B2 (en) Control device for data communication
JP3255957B2 (en) Automotive electronic control unit
JPH06213063A (en) Electronic control unit for vehicle
US6932740B2 (en) Method for controlling ignition of an internal combustion engine
EP0884474B1 (en) Communication control device
JP2000059403A (en) Data destruction preventing method in multiplex communication device