JPH06249053A - Analog/digital conversion method - Google Patents

Analog/digital conversion method

Info

Publication number
JPH06249053A
JPH06249053A JP3097093A JP3097093A JPH06249053A JP H06249053 A JPH06249053 A JP H06249053A JP 3097093 A JP3097093 A JP 3097093A JP 3097093 A JP3097093 A JP 3097093A JP H06249053 A JPH06249053 A JP H06249053A
Authority
JP
Japan
Prior art keywords
job
conversion
crank
analog
executed
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
JP3097093A
Other languages
Japanese (ja)
Inventor
Masaru Kurihara
優 栗原
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.)
Subaru Corp
Original Assignee
Fuji Heavy Industries 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 Fuji Heavy Industries Ltd filed Critical Fuji Heavy Industries Ltd
Priority to JP3097093A priority Critical patent/JPH06249053A/en
Publication of JPH06249053A publication Critical patent/JPH06249053A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To execute the analog/digital conversion of the crank synchronization to be generated at an irregular period while maintaining the equi-temporal interval of the analog/digital conversion to be executed at a regular period. CONSTITUTION:A request for the crank angle sensor synchronization A/D conversion is checked (S1007), and when no request for the crank angle sensor synchronization A/D conversion is made, the channel of the conversion order table ADC-N value to be indicated by the pointer ADC-I is set (S1008), and the pointer ADC-I is increased by 1 (S1009). When a request for the crank angle sensor synchronization A/D conversion is present, the request for the crank angle sensor synchronization A/D conversion is reduced by 1 (S1010), and the channel for the crank synchronization conversion is set (S1011). Namely, when the request for the crank angle sensor synchronization A/D conversion is made, the crank synchronization conversion is made without increasing the pointer ADC-I, the subsequent A/D conversion order is delayed by 1, and the period of 8 channels are kept by the loop counter ADC-C to maintain the equi-temporal interval.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は、等時間間隔のアナログ
/デジタル変換とクランク同期のアナログ/デジタル変
換とを両立させるアナログ/デジタル変換方法に関す
る。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an analog / digital conversion method for achieving both analog / digital conversion at equal time intervals and crank-synchronized analog / digital conversion.

【0002】[0002]

【従来の技術】近年、自動車などの車輌にマイクロコン
ピュータが導入され、エンジン、パワートレインなどを
高精度に制御することが可能となった。これにより、車
輌制御システムの開発においては、マイクロコンピュー
タのソフトウエア開発が大きな比重を占めるようにな
り、制御アルゴリスム上の処理の効率化が重要な課題と
なっている。
2. Description of the Related Art In recent years, microcomputers have been introduced into vehicles such as automobiles, and it has become possible to control engines, power trains and the like with high precision. Therefore, in the development of the vehicle control system, the software development of the microcomputer has become a major factor, and the efficiency of the processing on the control algorithm has become an important issue.

【0003】上記マイクロコンピュータは、定電圧回路
や各種周辺回路を加えた電子制御装置(ECU)として
車輌に搭載され、例えば、吸入空気量の算出、燃料噴射
量の設定、点火時期の設定などといった所定時間周期毎
のジョブ、所定クランク角毎のジョブを実行するように
なっている。
The microcomputer is mounted on a vehicle as an electronic control unit (ECU) including a constant voltage circuit and various peripheral circuits. For example, the intake air amount is calculated, the fuel injection amount is set, and the ignition timing is set. The job is executed every predetermined time cycle and every predetermined crank angle.

【0004】この場合、上記ECUには、例えば、吸入
空気量センサ、スロットル開度センサ、冷却水温セン
サ、吸入管圧力センサなどからのアナログ信号と、クラ
ンク角センサ、アイドルスイッチなどからのデジタル信
号とが入力されるため、アナログ信号をデジタル信号に
変換するためのアナログ/デジタル(A/D)変換器が
備えられており、通常、エンジン制御においては、この
A/D変換器によるデータのサンプリングは、一定の時
間周期毎のタイミングと、所定クランク角度に同期した
非定周期のタイミングで行なわれる。
In this case, the ECU receives, for example, analog signals from an intake air amount sensor, a throttle opening sensor, a cooling water temperature sensor, an intake pipe pressure sensor, etc., and a digital signal from a crank angle sensor, an idle switch, etc. Is input, an analog / digital (A / D) converter for converting an analog signal into a digital signal is provided. Normally, in engine control, sampling of data by this A / D converter is performed. , At a fixed time cycle and a non-fixed cycle timing synchronized with a predetermined crank angle.

【0005】従って、上記2つのタイミングのA/D変
換が互いに干渉して支障を生じる場合がある。このた
め、例えば特開昭57−109002号公報には、A/
D変換器の動作状態を監視し、一定時間周期のA/D変
換を実行中に、クランク同期のA/D変換要求がかかっ
たときには、実行中のA/D変換を破壊することなく、
いずれか一方を先にA/D変換する技術が開示されてい
る。
Therefore, the A / D conversion of the above two timings may interfere with each other to cause a trouble. Therefore, for example, Japanese Patent Laid-Open No. 57-109002 discloses A /
When the crank-synchronized A / D conversion request is made while monitoring the operating state of the D converter and executing the A / D conversion in a fixed time period, without destroying the A / D conversion being executed,
A technique of A / D converting one of them first is disclosed.

【0006】[0006]

【発明が解決しようとする課題】ところで、一定時間周
期のA/D変換は、その後の計算処理以上に正確な等間
隔性が要求され、例えば、スロットル開度、吸入空気量
などのように変化の速いアナログ信号から、冷却水温、
電圧などのように比較的変化の遅いアナログ信号までの
複数項目のA/D変換が等間隔性を保って実行される必
要があり、一方、非定周期のクランク同期A/D変換
は、変換要求が発生した時点で実行されることが望まし
い。
By the way, in the A / D conversion in a constant time period, more accurate equidistant property is required than the subsequent calculation processing, and for example, the throttle opening, the intake air amount, etc. are changed. From the fast analog signal to the cooling water temperature,
A / D conversion of multiple items up to an analog signal with a relatively slow change such as voltage needs to be executed at equal intervals, while crank-synchronized A / D conversion of a non-constant cycle requires conversion. It should be executed when the request is made.

【0007】しかしながら、等間隔で実行すべき複数項
目のA/D変換に、単にクランク同期変換を変換要求が
発生した時点で割込ませるだけでは、その非定周期性か
ら、その後の各項目のA/D変換の周期性が損なわれ、
等間隔のA/D変換を実現することが困難となる。
However, if the crank synchronous conversion is simply interrupted at the time when the conversion request is generated, the A / D conversion of a plurality of items that should be executed at equal intervals is not possible. The periodicity of A / D conversion is impaired,
It becomes difficult to realize A / D conversion at equal intervals.

【0008】本発明は上記事情に鑑みてなされたもの
で、一定周期で実行すべきアナログ/デジタル変換の等
時間間隔性を維持しつつ、非定周期で発生するクランク
同期のアナログ/デジタル変換を実行することのできる
アナログ/デジタル変換方法を提供することを目的とし
ている。
The present invention has been made in view of the above circumstances, and is capable of performing crank-synchronous analog / digital conversion that occurs in a non-constant cycle while maintaining the equal time interval characteristic of the analog / digital conversion that should be performed in a constant cycle. It is an object to provide an analog / digital conversion method that can be implemented.

【0009】[0009]

【課題を解決するための手段】本発明は、複数の入力チ
ャンネルを有するアナログ/デジタル変換器のチャンネ
ルを順に駆動し、設定時間毎に設定回数のアナログ/デ
ジタル変換を実行するアナログ/デジタル変換方法であ
って、各チャンネルの変換順番を、上記設定時間内で一
定時間毎に変換を行なう等時間間隔アナログ/デジタル
変換に対応するチャンネルから始めて、エンジンの所定
クランク位置で変換を行なうクランク同期アナログ/デ
ジタル変換に対応するチャンネルが最後となるよう予め
設定し、上記設定時間内で、上記等時間間隔アナログ/
デジタル変換に対応するチャンネルでの変換が全て終了
する前に上記クランク同期アナログ/デジタル変換の実
行タイミングとなった場合には、対応するチャンネルで
上記クランク同期アナログ/デジタル変換を実行し、以
後の上記等時間間隔アナログ/デジタル変換に対応する
チャンネルの変換順番を予め設定した変換順番に対して
1つ遅れとすることを特徴とする。
SUMMARY OF THE INVENTION The present invention is an analog / digital conversion method in which the channels of an analog / digital converter having a plurality of input channels are sequentially driven to perform a preset number of analog / digital conversions at preset time intervals. The conversion order of each channel starts from the channel corresponding to the equal time interval analog / digital conversion in which the conversion is performed at regular time intervals within the set time, and the crank synchronous analog / The channel corresponding to digital conversion is set to be the last, and within the set time, the analog / analog
If the timing for executing the crank-synchronized analog / digital conversion is reached before the conversion on all the channels corresponding to the digital conversion is completed, the crank-synchronized analog / digital conversion is executed on the corresponding channel, and It is characterized in that the conversion order of the channels corresponding to the analog / digital conversion at equal time intervals is delayed by one from the preset conversion order.

【0010】[0010]

【作用】本発明では、複数の入力チャンネルを有するア
ナログ/デジタル変換器におけるチャンネルの変換順番
を、設定時間内で一定時間毎に変換を行なう等時間間隔
アナログ/デジタル変換に対応するチャンネルから始め
て、エンジンの所定クランク位置で変換を行なうクラン
ク同期アナログ/デジタル変換に対応するチャンネルが
最後となるよう予め設定しておき、設定時間毎に設定回
数のアナログ/デジタル変換を実行する。そして、設定
時間内で、等時間間隔アナログ/デジタル変換に対応す
るチャンネルでの変換が全て終了する前にクランク同期
アナログ/デジタル変換の実行タイミングとなった場合
には、対応するチャンネルでクランク同期アナログ/デ
ジタル変換を実行し、以後の等時間間隔アナログ/デジ
タル変換に対応するチャンネルの変換順番を予め設定し
た変換順番に対して1つ遅れとして設定時間内における
アナログ/デジタル変換の実行回数を変えないように
し、等時間間隔アナログ/デジタル変換の等間隔性を維
持する。
According to the present invention, the conversion order of the channels in the analog / digital converter having a plurality of input channels is started from the channel corresponding to the analog / digital conversion at equal time intervals in which the conversion is performed at fixed time intervals within the set time. The channel corresponding to the crank-synchronized analog / digital conversion that performs conversion at a predetermined crank position of the engine is preset to be the last, and the analog / digital conversion is performed a set number of times at each set time. If the timing for executing the crank-synchronized analog / digital conversion comes before the conversion on the channel corresponding to the analog / digital conversion at equal time intervals is completed within the set time, the crank-synchronized analog for the corresponding channel is executed. / Digital conversion is executed, and the conversion order of the channels corresponding to subsequent analog / digital conversion at equal time intervals is delayed by one with respect to the preset conversion order, and the number of analog / digital conversion executions within the set time is not changed. In this way, the equality of analog / digital conversion at equal time intervals is maintained.

【0011】[0011]

【実施例】以下、図面を参照して本発明の実施例を説明
する。図面は本発明の一実施例に係り、図1はA/D変
換サブルーチンのフローチャート、図2は0.5ms毎
の定期割込み処理のフローチャート、図3はクラセン割
込み処理のフローチャート、図4はジョブ優先処理のフ
ローチャート、図5はジョブ実行サブルーチンの部分フ
ローチャート1、図6はジョブ実行サブルーチンの部分
フローチャート2、図7はジョブ実行サブルーチンの部
分フローチャート3、図8はジョブ実行サブルーチンの
部分フローチャート4、図9はクランク位置算出サブル
ーチンのフローチャート、図10は半回転時間推定サブ
ルーチンのフローチャート、図11はCCAS・RCA
S判別サブルーチンのフローチャート、図12はクラセ
ンタイマのオーバーフロー割込み処理のフローチャー
ト、図13は読取り及びSSHBへのストア処理サブル
ーチンのフローチャート、図14はジョブの実行状態を
示す説明図、図15はジョブフラグの説明図、図16は
クランク位置変数の説明図、図17はジョブ実行中フラ
グとオーバーラップカウンタの変化を示す説明図、図1
8はクラセン間隔テーブルの説明図、図19は気筒・ク
ランク位置状態マップの説明図、図20は変換順番テー
ブルの説明図、図21はSSHBストア番地テーブルの
説明図、図22はシステムシフトバッファの説明図、図
23はドリームモード変数の説明図、図24はクランク
位置とエンジンの行程を示すタイムチャート、図25は
エンジン系の概略構成図、図26はクランクロータとク
ランク角センサの正面図、図27はカムロータとカム角
センサの正面図、図28は電子制御系の回路構成図であ
る。
Embodiments of the present invention will be described below with reference to the drawings. 1 is a flowchart of an A / D conversion subroutine, FIG. 2 is a flowchart of a periodic interrupt process every 0.5 ms, FIG. 3 is a flowchart of classen interrupt process, and FIG. 4 is a job priority process. 5 is a partial flowchart 1 of the job execution subroutine, FIG. 6 is a partial flowchart 2 of the job execution subroutine, FIG. 7 is a partial flowchart 3 of the job execution subroutine, and FIG. 8 is a partial flowchart 4 of the job execution subroutine. Is a flowchart of a crank position calculation subroutine, FIG. 10 is a flowchart of a half rotation time estimation subroutine, and FIG. 11 is CCAS / RCA.
FIG. 12 is a flowchart of an S determination subroutine, FIG. 12 is a flowchart of a Krasen timer overflow interrupt process, FIG. 13 is a flowchart of a read and SSHB store process subroutine, FIG. 14 is an explanatory diagram showing a job execution state, and FIG. FIG. 16 is an explanatory diagram of crank position variables, FIG. 17 is an explanatory diagram showing changes in a job execution flag and an overlap counter, and FIG.
8 is an explanatory view of a classen interval table, FIG. 19 is an explanatory view of a cylinder / crank position state map, FIG. 20 is an explanatory view of a conversion order table, FIG. 21 is an explanatory view of an SSHB store address table, and FIG. 22 is a system shift buffer. Explanatory diagram, FIG. 23 is an explanatory diagram of dream mode variables, FIG. 24 is a time chart showing a crank position and an engine stroke, FIG. 25 is a schematic configuration diagram of an engine system, FIG. 26 is a front view of a crank rotor and a crank angle sensor, FIG. 27 is a front view of the cam rotor and the cam angle sensor, and FIG. 28 is a circuit configuration diagram of the electronic control system.

【0012】本実施例のエンジン制御システムでは、図
28に示すマイクロコンピュータを中核とした電子制御
装置(ECU)50により図25に示すエンジン系が制
御され、燃料噴射制御、点火時期制御などが行なわれ
る。
In the engine control system of this embodiment, the engine system shown in FIG. 25 is controlled by an electronic control unit (ECU) 50 having a microcomputer shown in FIG. 28 as a core, and fuel injection control, ignition timing control, etc. are performed. Be done.

【0013】上記ECU50のマイクロコンピュータに
は、新しい概念に基づくオペレーティングシステム(O
S)が搭載され、このOSにより、各センサ類からの信
号入力処理、エンジン回転数算出処理、吸入空気量算出
処理、燃料噴射量設定処理、点火時期設定処理などとい
った各制御項目毎のジョブが管理されて効率的に実行さ
れるようになっている。
The microcomputer of the ECU 50 has an operating system (O) based on a new concept.
S) is installed, and a job for each control item such as a signal input process from each sensor, an engine speed calculation process, an intake air amount calculation process, a fuel injection amount setting process, an ignition timing setting process, etc. is executed by this OS. It is managed and executed efficiently.

【0014】まず、上記ECU50によって制御される
エンジン系の機器構成について説明する。
First, the equipment configuration of the engine system controlled by the ECU 50 will be described.

【0015】図25に示すように、エンジン1(図にお
いては水平対向4気筒型エンジンを示す)は、シリンダ
ヘッド2の吸気ポート2aにインテークマニホルド3が
連通され、このインテークマニホルド3の上流にエアチ
ャンバ4を介してスロットル通路5が連通されている。
このスロットル通路5の上流側には、吸気管6を介して
エアクリーナ7が取付けられ、このエアクリーナ7が吸
入空気の取り入れ口であるエアインテークチャンバ8に
連通されている。
As shown in FIG. 25, an engine 1 (a horizontally opposed four-cylinder engine is shown in the figure) has an intake manifold 3 communicated with an intake port 2 a of a cylinder head 2, and an intake manifold 3 is provided upstream of the intake manifold 3. A throttle passage 5 communicates with the chamber 4.
An air cleaner 7 is attached to the upstream side of the throttle passage 5 via an intake pipe 6, and the air cleaner 7 is in communication with an air intake chamber 8 which is an intake port for intake air.

【0016】また、上記排気ポート2bにエキゾースト
マニホルド9を介して排気管10が連通され、この排気
管10に触媒コンバータ11が介装されてマフラ12に
連通されている。一方、上記スロットル通路5にスロッ
トルバルブ5aが設けられ、このスロットル通路5の直
上流の上記吸気管6にインタークーラ13が介装され、
さらに、上記吸気管6の上記エアクリーナ7の下流側に
レゾネータチャンバ14が介装されている。
An exhaust pipe 10 is connected to the exhaust port 2b via an exhaust manifold 9, and a catalytic converter 11 is connected to the exhaust pipe 10 and is connected to a muffler 12. On the other hand, a throttle valve 5a is provided in the throttle passage 5, and an intercooler 13 is provided in the intake pipe 6 immediately upstream of the throttle passage 5,
Further, a resonator chamber 14 is interposed downstream of the air cleaner 7 in the intake pipe 6.

【0017】また、上記レゾネータチャンバ14と上記
インテークマニホルド3とを連通して上記スロットルバ
ルブ5aの上流側と下流側とをバイパスするバイパス通
路15に、アイドルスピードコントロールバルブ(IS
CV)16が介装されている。さらに、このISCV1
6の直下流側に、吸気圧が負圧のとき開弁し、またター
ボチャージャ18によって過給されて吸気圧が正圧にな
ったとき閉弁するチェックバルブ17が介装されてい
る。
Further, an idle speed control valve (IS) is provided in a bypass passage 15 which connects the resonator chamber 14 and the intake manifold 3 and bypasses the upstream side and the downstream side of the throttle valve 5a.
CV) 16 is interposed. Furthermore, this ISCV1
A check valve 17 which is opened immediately downstream of 6 when the intake pressure is a negative pressure and which is closed when the intake pressure becomes a positive pressure by being supercharged by a turbocharger 18 is interposed.

【0018】上記ターボチャージャ18は、上記吸気管
6の上記レゾネータチャンバ14の下流側にコンプレッ
サが介装され、タービンが上記排気管10に介装されて
いる。さらに、上記ターボチャージャ18のタービンハ
ウジング流入口には、ウエストゲート弁19が介装さ
れ、このウエストゲート弁19には、ウエストゲート弁
作動用アクチュエータ20が連設されている。
In the turbocharger 18, a compressor is installed downstream of the resonator chamber 14 of the intake pipe 6, and a turbine is installed in the exhaust pipe 10. Further, a wastegate valve 19 is provided at the turbine housing inlet of the turbocharger 18, and a wastegate valve actuating actuator 20 is connected to the wastegate valve 19.

【0019】上記ウエストゲート弁作動用アクチュエー
タ20は、ダイヤフラムにより2室に仕切られ、一方が
ウエストゲート弁制御用デューティソレノイド弁21に
連通される圧力室を形成し、他方が上記ウエストゲート
弁19を閉方向に付勢するスプリングを収納したスプリ
ング室を形成している。
The waste gate valve actuating actuator 20 is partitioned into two chambers by a diaphragm, one of which forms a pressure chamber communicating with the waste gate valve controlling duty solenoid valve 21, and the other of which forms the waste gate valve 19. A spring chamber is formed that houses a spring that urges in the closing direction.

【0020】上記ウエストゲート弁制御用デューティソ
レノイド弁21は、上記レゾネータチャンバ14と上記
吸気管6の上記ターボチャージャ18のコンプレッサ下
流とを連通する通路に介装されており、ECU50から
出力される制御信号のデューティ比に応じて、上記レゾ
ネータチャンバ14側の圧力と上記コンプレッサ下流側
の圧力とを調圧し、上記ウエストゲート弁作動用アクチ
ュエータ20の圧力室に供給する。
The wastegate valve controlling duty solenoid valve 21 is interposed in a passage that connects the resonator chamber 14 and the compressor downstream of the turbocharger 18 of the intake pipe 6, and is a control output from the ECU 50. The pressure on the resonator chamber 14 side and the pressure on the compressor downstream side are adjusted according to the duty ratio of the signal, and the pressure is supplied to the pressure chamber of the waste gate valve operating actuator 20.

【0021】すなわち、上記ECU50によって上記ウ
エストゲート弁制御用デューティソレノイド弁21を制
御し、上記ウエストゲート弁作動用アクチュエータ20
を作動させて上記ウエストゲート弁19による排気ガス
リリーフを調整することにより、上記ターボチャージャ
18による過給圧を制御するようになっている。
That is, the wastegate valve controlling duty solenoid valve 21 is controlled by the ECU 50, and the wastegate valve operating actuator 20 is controlled.
Is operated to adjust the exhaust gas relief by the waste gate valve 19, so that the supercharging pressure by the turbocharger 18 is controlled.

【0022】また、上記インテークマニホルド3に絶対
圧センサ22が通路23を介して連通され、この通路2
3に、上記絶対圧センサ22と上記インテークマニホル
ド3あるいは大気とを選択的に連通する吸気管圧力/大
気圧切換ソレノイド弁24が介装されている。
An absolute pressure sensor 22 is connected to the intake manifold 3 through a passage 23, and the passage 2
3, an intake pipe pressure / atmospheric pressure switching solenoid valve 24 that selectively communicates the absolute pressure sensor 22 with the intake manifold 3 or the atmosphere is interposed.

【0023】さらに、上記インテークマニホルド3の各
気筒の各吸気ポート2aの直上流側にインジェクタ25
が臨まされ、また、上記シリンダヘッド2の各気筒毎
に、その先端を燃焼室に露呈する点火プラグ26aが取
付けられ、この点火プラグ26aに連設する点火コイル
26bにイグナイタ27が接続されている。
Further, an injector 25 is provided immediately upstream of each intake port 2a of each cylinder of the intake manifold 3.
Further, an ignition plug 26a whose tip is exposed to the combustion chamber is attached to each cylinder of the cylinder head 2, and an igniter 27 is connected to an ignition coil 26b connected to the ignition plug 26a. .

【0024】上記インジェクタ25には、燃料タンク2
8内に設けたインタンク式の燃料ポンプ29から燃料フ
ィルタ30を経て燃料が圧送され、プレッシャレギュレ
ータ31にて調圧される。
The injector 25 includes a fuel tank 2
Fuel is pressure-fed from an in-tank type fuel pump 29 provided inside 8 through a fuel filter 30, and the pressure is regulated by a pressure regulator 31.

【0025】また、上記吸気管6の上記エアークリーナ
7の直下流に、ホットワイヤ式あるいはホットフィルム
式などの吸入空気量センサ32が介装され、上記スロッ
トルバルブ5aに、スロットル開度センサ33aとアイ
ドルスイッチ33bとを内蔵したスロットルセンサ33
が連設されている。
An intake air amount sensor 32 of a hot wire type or a hot film type is provided immediately downstream of the air cleaner 7 of the intake pipe 6, and the throttle valve 5a is connected to a throttle opening sensor 33a. Throttle sensor 33 with built-in idle switch 33b
Are lined up.

【0026】さらに、上記エンジン1のシリンダブロッ
ク1aにノックセンサ34が取付けられるとともに、こ
のシリンダブロック1aの左右両バンクを連通する冷却
水通路35に冷却水温センサ36が臨まされ、上記排気
管10の上記エキゾーストマニホルド9の集合部にO2
センサ37が臨まされている。
Further, a knock sensor 34 is attached to the cylinder block 1a of the engine 1, and a cooling water temperature sensor 36 is exposed to a cooling water passage 35 which connects the left and right banks of the cylinder block 1a to the exhaust pipe 10. O2 at the collecting part of the above exhaust manifold 9
The sensor 37 is exposed.

【0027】また、上記シリンダブロック1aに支承さ
れたクランクシャフト1bにクランクロータ38が軸着
され、このクランクロータ38の外周に、電磁ピックア
ップなどからなるクランク角センサ39が対設されてい
る。さらに、上記エンジン1のカムシャフト1cに連設
するカムロータ40に、電磁ピックアップなどからなる
気筒判別用のカム角センサ41が対設されている。尚、
上記クランク角センサ39及び上記カム角センサ41
は、電磁ピックアップなどの磁気センサに限らず、光セ
ンサなどでも良い。
A crank rotor 38 is rotatably mounted on the crank shaft 1b supported by the cylinder block 1a, and a crank angle sensor 39 including an electromagnetic pickup is provided on the outer periphery of the crank rotor 38. Further, a cam angle sensor 41 for discriminating a cylinder, which is composed of an electromagnetic pickup or the like, is provided opposite to a cam rotor 40 connected to the cam shaft 1c of the engine 1. still,
The crank angle sensor 39 and the cam angle sensor 41
Is not limited to a magnetic sensor such as an electromagnetic pickup, but may be an optical sensor.

【0028】上記クランクロータ38は、図26に示す
ように、その外周に突起38a,38b,38cが形成
され、これらの各突起38a,38b,38cが、各気
筒(#1,#2と#3,#4)の圧縮上死点前(BTD
C)θ1,θ2,θ3 の位置に形成されており、本実施例に
おいては、θ1 =97°CA、θ2 =65°CA、θ3
=10°CAである。
As shown in FIG. 26, the crank rotor 38 has protrusions 38a, 38b and 38c formed on the outer periphery thereof, and these protrusions 38a, 38b and 38c are attached to the cylinders (# 1, # 2 and #). Before # 3, # 4 compression top dead center (BTD
C) It is formed at the positions of θ1, θ2, θ3, and in the present embodiment, θ1 = 97 ° CA, θ2 = 65 ° CA, θ3.
= 10 ° CA.

【0029】上記クランクロータ38の各突起は、上記
クランク角センサ39によって検出され、BTDC97
°,65°,10°のクランクパルスがエンジン1/2
回転毎(180°CA毎)に出力される。そして、各信
号の入力間隔時間がタイマによって計時され、エンジン
回転数が算出される。
The protrusions of the crank rotor 38 are detected by the crank angle sensor 39, and the BTDC 97
Crank pulse of °, 65 °, 10 ° is 1/2 engine
It is output every rotation (every 180 ° CA). Then, the input interval time of each signal is counted by a timer, and the engine speed is calculated.

【0030】尚、突起38bは、点火時期設定の際の基
準クランク角となり、また、突起38cは、始動時噴射
開始時期の基準クランク角となるとともに始動時の固定
点火時期を示すクランク角となる。
The protrusion 38b serves as a reference crank angle when setting the ignition timing, and the protrusion 38c serves as a reference crank angle for the injection start timing at the start and a crank angle indicating the fixed ignition timing at the start. .

【0031】また、図27に示すように、上記カムロー
タ40の外周には、気筒判別用の突起40a,40b,
40cが形成され、突起40aが#3,#4気筒の圧縮
上死点後(ATDC)θ4 の位置に形成され、突起40
bが3個の突起で構成されて最初の突起が#1気筒のA
TDCθ5 の位置に形成されている。さらに、突起40
cが2個の突起で形成され、最初の突起が#2気筒のA
TDCθ6 の位置に形成されている。本実施例において
は、θ4 =20°CA、θ5 =5°CA、θ6=20°
CAである。
Further, as shown in FIG. 27, on the outer circumference of the cam rotor 40, there are protrusions 40a, 40b for cylinder discrimination,
40c is formed, and the protrusion 40a is formed at the position after compression top dead center (ATDC) θ4 of the # 3 and # 4 cylinders.
b is composed of three protrusions, and the first protrusion is A for cylinder # 1.
It is formed at the position of TDCθ5. Furthermore, the protrusion 40
c is formed by two protrusions, and the first protrusion is A for cylinder # 2.
It is formed at the position of TDC θ6. In this embodiment, θ4 = 20 ° CA, θ5 = 5 ° CA, θ6 = 20 °
It is CA.

【0032】そして、上記カムロータ40の各突起が上
記カム角センサ41によって検出され、各気筒の燃焼行
程順を#1→#3→#2→#4とした場合、この燃焼行
程順と、上記カム角センサ41からのカムパルスをカウ
ンタによって計数した値とのパターンに基づいて、気筒
判別がなされる。
When each protrusion of the cam rotor 40 is detected by the cam angle sensor 41 and the combustion stroke sequence of each cylinder is # 1 → # 3 → # 2 → # 4, the combustion stroke sequence and Cylinder discrimination is made based on the pattern of the cam pulse from the cam angle sensor 41 and the value counted by the counter.

【0033】一方、図28に示すECU50は、燃料噴
射制御、点火時期制御などを行なうメインコンピュータ
51と、ノック検出処理を行なう専用のサブコンピュー
タ52との2つのコンピュータを中心として構成され、
各部に所定の安定化電源を供給する定電圧回路53や各
種の周辺回路が組込まれている。
On the other hand, the ECU 50 shown in FIG. 28 is mainly composed of two computers, that is, a main computer 51 for controlling fuel injection and ignition timing, and a dedicated sub computer 52 for performing knock detection processing.
A constant voltage circuit 53 for supplying a predetermined stabilizing power source and various peripheral circuits are incorporated in each unit.

【0034】上記定電圧回路53は、ECUリレー54
のリレー接点を介してバッテリ55に接続され、このバ
ッテリ55に、上記ECUリレー54のリレーコイルが
イグニッションスイッチ56を介して接続されている。
また、上記バッテリ55には、上記定電圧回路53が直
接接続され、さらに、燃料ポンプリレー57のリレー接
点を介して燃料ポンプ29が接続されている。
The constant voltage circuit 53 includes an ECU relay 54.
The relay coil of the ECU relay 54 is connected to the battery 55 via an ignition switch 56.
Further, the constant voltage circuit 53 is directly connected to the battery 55, and further, the fuel pump 29 is connected via a relay contact of a fuel pump relay 57.

【0035】すなわち、上記定電圧回路53は、上記イ
グニッションスイッチ56がONされ、上記ECUリレ
ー54のリレー接点が閉となったとき、制御用電源を供
給し、また、上記イグニッションスイッチ56がOFF
されたとき、バックアップ用の電源を供給する。
That is, the constant voltage circuit 53 supplies control power when the ignition switch 56 is turned on and the relay contact of the ECU relay 54 is closed, and the ignition switch 56 is turned off.
Supply the power for backup when

【0036】上記メインコンピュータ51は、CPU5
8(以下、メインCPU58と称する)、ROM59、
RAM60、上記イグニッションスイッチ56がOFF
されたときにも上記定電圧回路53からバックアップ電
源が供給されてデータを保持するバックアップRAM6
1、カウンタ・タイマ群62、シリアル通信インターフ
ェースであるSCI63、及び、I/Oインターフェー
ス64がバスライン65を介して接続されたマイクロコ
ンピュータである。
The main computer 51 has a CPU 5
8 (hereinafter, referred to as main CPU 58), ROM 59,
RAM 60, the ignition switch 56 is OFF
Backup RAM 6 which holds data by being supplied with backup power from the constant voltage circuit 53 even when
1, a counter / timer group 62, a serial communication interface SCI 63, and an I / O interface 64 are connected to each other via a bus line 65.

【0037】尚、上記カウンタ・タイマ群62は、フリ
ーランカウンタ、カム角センサ(以下、適宜、カムセン
と略記する)信号の入力計数用カムセンカウンタなどの
各種カウンタ、燃料噴射タイマ、点火タイマ、後述する
0.5ms毎の定期割込みを発生させるための定期割込
みタイマ、クランク角センサ(以下、適宜、クラセンと
略記する)信号の入力間隔計時用クラセンタイマ、及
び、システム異常監視用のウオッチドッグタイマなどの
各種タイマを便宜上総称するものであり、上記メインコ
ンピュータ51においては、その他、各種のソフトウエ
アカウンタ・タイマが用いられる。
The counter / timer group 62 includes various counters such as a free-run counter, a cam angle sensor (hereinafter, abbreviated as "CamSens") signal counting counter, a fuel injection timer, an ignition timer, and the like. A periodic interrupt timer for generating a periodic interrupt every 0.5 ms described later, a crank angle timer for inputting a crank angle sensor (hereinafter, abbreviated as "clasen") signal interval, and a watchdog timer for system abnormality monitoring For the sake of convenience, the various types of timers such as the above are collectively referred to, and various other software counters and timers are used in the main computer 51.

【0038】また、上記サブコンピュータ52も、上記
メインコンピュータ51と同様、CPU71(以下、サ
ブCPU71と称する)、ROM72、RAM73、カ
ウンタ・タイマ群74、SCI75、及び、I/Oイン
ターフェース76がバスライン77を介して接続された
マイクロコンピュータであり、上記メインコンピュータ
51とサブコンピュータ52とは、上記SCI63,7
5を介してシリアル通信ラインにより互いに接続されて
いる。
In the sub computer 52, the CPU 71 (hereinafter referred to as the sub CPU 71), the ROM 72, the RAM 73, the counter / timer group 74, the SCI 75, and the I / O interface 76 are connected to the bus line as in the main computer 51. The microcomputer is a microcomputer connected via 77, and the main computer 51 and the sub computer 52 are the SCI 63, 7
They are connected to each other via a serial communication line via 5.

【0039】上記メインコンピュータ51のI/Oイン
ターフェース64には、入力ポートに、吸入空気量セン
サ32、スロットル開度センサ33a、水温センサ3
6、O2 センサ37、絶対圧センサ22、車速センサ4
2、及び、バッテリ55が、8チャンネル入力のA/D
変換器66を介して接続されるとともに、アイドルスイ
ッチ33b、クランク角センサ39、カム角センサ41
が接続されており、さらに、始動状態を検出するために
スタータスイッチ43が接続されている。
The I / O interface 64 of the main computer 51 has an intake port, an intake air amount sensor 32, a throttle opening sensor 33a, and a water temperature sensor 3 at its input ports.
6, O2 sensor 37, absolute pressure sensor 22, vehicle speed sensor 4
2 and battery 55 are A / D of 8 channel input
The idle switch 33b, the crank angle sensor 39, and the cam angle sensor 41 are connected together via the converter 66.
Is connected, and further, a starter switch 43 is connected to detect the starting state.

【0040】尚、本実施例においては、上記A/D変換
器66は、7チャンネル分の入力が使用され、残りの1
チャンネルは予備となっている。
In the present embodiment, the A / D converter 66 uses inputs for 7 channels, and the remaining 1
The channel is reserved.

【0041】また、上記I/Oインターフェース64の
出力ポートには、イグナイタ27が接続され、さらに、
駆動回路67を介して、ISCV16、インジェクタ2
5、燃料ポンプリレー57のリレーコイル、および、ウ
エストゲート弁制御用デューティソレノイド弁21、吸
気管圧力/大気圧切換ソレノイド弁24が接続されてい
る。
An igniter 27 is connected to the output port of the I / O interface 64, and further,
Through the drive circuit 67, the ISCV16, the injector 2
5, the relay coil of the fuel pump relay 57, the waste solenoid valve controlling duty solenoid valve 21, and the intake pipe pressure / atmospheric pressure switching solenoid valve 24 are connected.

【0042】一方、上記サブコンピュータ52のI/O
インターフェース76は、入力ポートに、クランク角セ
ンサ39、カム角センサ41が接続されるとともに、A
/D変換器78、周波数フィルタ79、アンプ80を介
してノックセンサ34が接続されており、上記ノックセ
ンサ34からのノック検出信号が上記アンプ80で所定
のレベルに増幅された後に上記周波数フィルタ79によ
り必要な周波数成分が抽出され、上記A/D変換器78
にてデジタル信号に変換されて入力されるようになって
いる。
On the other hand, the I / O of the sub computer 52
The interface 76 has an input port to which the crank angle sensor 39 and the cam angle sensor 41 are connected, and
The knock sensor 34 is connected via the D / D converter 78, the frequency filter 79, and the amplifier 80. The knock detection signal from the knock sensor 34 is amplified to a predetermined level by the amplifier 80, and then the frequency filter 79. The necessary frequency components are extracted by the A / D converter 78.
At, it is converted into a digital signal and input.

【0043】上記メインコンピュータ51では、各セン
サ類からの検出信号を処理し、燃料噴射パルス幅、点火
時期などを演算する。すなわち、吸入空気量センサ32
の出力信号から吸入空気量を算出し、RAM60及びバ
ックアップRAM61に記憶されている各種データに基
づき、吸入空気量に見合った燃料噴射量を演算し、ま
た、点火時期などを算出する。
The main computer 51 processes the detection signals from the sensors and calculates the fuel injection pulse width, the ignition timing and the like. That is, the intake air amount sensor 32
The intake air amount is calculated from the output signal, and the fuel injection amount corresponding to the intake air amount is calculated based on various data stored in the RAM 60 and the backup RAM 61, and the ignition timing and the like are calculated.

【0044】そして、上記燃料噴射量に相応する駆動パ
ルス幅信号を、駆動回路67を介して所定のタイミング
で該当気筒のインジェクタ25に出力して燃料を噴射
し、また、所定のタイミングでイグナイタ27に点火信
号を出力し、該当気筒の点火プラグ26aを点火する。
Then, a drive pulse width signal corresponding to the fuel injection amount is output to the injector 25 of the corresponding cylinder at a predetermined timing via the drive circuit 67 to inject fuel, and at the predetermined timing, the igniter 27 is also used. To the ignition plug 26a of the corresponding cylinder.

【0045】その結果、該当気筒に供給された混合気が
爆発燃焼し、エキゾーストマニホルド9の集合部に臨ま
されたO2 センサ37により排気ガス中の酸素濃度が検
出され、この検出信号が波形整形された後、上記メイン
CPU58で基準電圧(スライスレベル)と比較され、
エンジンの空燃比状態が目標空燃比に対し、リッチ側に
あるか、リーン側にあるかが判別され、空燃比が目標空
燃比となるようフィードバック制御される。
As a result, the air-fuel mixture supplied to the corresponding cylinder explodes and burns, the oxygen concentration in the exhaust gas is detected by the O2 sensor 37 facing the collecting portion of the exhaust manifold 9, and the waveform of this detection signal is shaped. After that, the main CPU 58 compares the reference voltage (slice level) with
It is determined whether the engine air-fuel ratio state is on the rich side or lean side with respect to the target air-fuel ratio, and feedback control is performed so that the air-fuel ratio becomes the target air-fuel ratio.

【0046】一方、上記サブコンピュータ52では、エ
ンジン回転数とエンジン負荷とに基づいてノックセンサ
34からの信号のサンプル区間を設定し、このサンプル
区間でノックセンサ34からの信号を高速にA/D変換
して振動波形を忠実にデジタルデータに変換し、ノック
発生の有無を判定する。
On the other hand, in the sub computer 52, a sample section of the signal from the knock sensor 34 is set based on the engine speed and the engine load, and the signal from the knock sensor 34 is A / D at high speed in this sample section. Then, the vibration waveform is faithfully converted into digital data to determine whether knock has occurred.

【0047】上記サブコンピュータ52のI/Oインタ
ーフェース76の出力ポートは、上記メインコンピュー
タ51のI/Oインターフェース64の入力ポートに接
続されており、上記サブコンピュータ52でのノック判
定結果がI/Oインターフェース76に出力される。そ
して、上記メインコンピュータ51では、上記サブコン
ピュータ52からノック発生有りの判定結果が出力され
ると、SCI63を介してシリアル通信ラインよりノッ
クデータを読込み、このノックデータに基づいて直ちに
該当気筒の点火時期を遅らせ、ノックを回避する。
The output port of the I / O interface 76 of the sub computer 52 is connected to the input port of the I / O interface 64 of the main computer 51, and the knock determination result of the sub computer 52 is I / O. It is output to the interface 76. Then, in the main computer 51, when the sub computer 52 outputs a determination result indicating that knock has occurred, the knock data is read from the serial communication line via the SCI 63, and the ignition timing of the corresponding cylinder is immediately read based on the knock data. Delay and avoid knocks.

【0048】このようなエンジン制御において、上記メ
インコンピュータ51では、各センサ類からの信号入力
処理、エンジン回転数算出、吸入空気量算出、燃料噴射
量算出、点火時期算出といった各項目毎の各種プログラ
ムが、一つのOSの管理下で効率的に実行される。この
OSは、車輌制御のための各種マネジメント機能、及
び、このマネジメント機能に密着した内部ストラテジー
を有し、各種ジョブを体系的に結合する。
In such engine control, in the main computer 51, various programs for each item such as signal input processing from each sensor, engine speed calculation, intake air amount calculation, fuel injection amount calculation, ignition timing calculation, etc. Is efficiently executed under the control of one OS. This OS has various management functions for vehicle control and an internal strategy closely related to this management function, and systematically combines various jobs.

【0049】上記OSのマネジメント機能としては、 (1-1)ジョブの優先処理 (1ー2)セクション定義による各ジョブの分割ファイル対
応 (1-3)スタックの使用状況モニタ機能 (1-4)異常割込み動作のモニタ機能 (1-5)ジョブ毎に固有の制約を作らない標準マップ・標
準ワークメモリ設定 などの機能があり、制御ストラテジーの開発環境を向上
させるとともに、限られたCPU能力を最大限に発揮さ
せ、デジタル制御理論の基本である等時間間隔処理を可
能な限り達成することができる。
As the management function of the above OS, (1-1) priority processing of jobs (1-2) support for divided files of each job by section definition (1-3) stack usage monitoring function (1-4) Abnormal interrupt operation monitor function (1-5) Functions such as standard map and standard work memory settings that do not create unique restrictions for each job improve the control strategy development environment and maximize the limited CPU power. The same time interval processing which is the basis of digital control theory can be achieved as much as possible.

【0050】等時間間隔処理としては、0.5ms毎の
定期割込みを基本として、2,4,10,50,250
ms毎の5種類の等間隔割込みジョブが用意されてお
り、また、エンジン回転に同期した処理として、クラン
ク角信号入力により即割込み実行される高優先クラセン
ジョブ(以下、単にクラセンジョブと称する)と、より
優先順位が高い他のジョブがないときにクランク角信号
入力により割込み実行される比較的緊急度の低い低優先
クラセンジョブとが用意されている。
The equal time interval processing is based on a periodic interrupt every 0.5 ms, and is 2, 4, 10, 50, 250.
Five types of equally interrupted jobs for every ms are prepared, and a high-priority class job (hereinafter simply referred to as classen job) that is immediately interrupted by crank angle signal input as processing synchronized with engine rotation. , A relatively low-urgency low-priority job that is interrupted by a crank angle signal input when there is no other job with a higher priority.

【0051】これらの各ジョブには、クラセンジョブ>
2msジョブ>4msジョブ>10msジョブ>低優先
クラセンジョブ>50msジョブ>250msジョブの
順で、7〜1の優先レベルが高位側から低位側に向かっ
て付けられており、図14に示すように、高速ジョブに
対し低速ジョブが分割して処理されるとともに、各ジョ
ブの多重待ち処理が行なわれる。
Each of these jobs includes a Krasen job>
In the order of 2 ms job> 4 ms job> 10 ms job> low priority class job> 50 ms job> 250 ms job, priority levels of 7 to 1 are assigned from the high side to the low side, as shown in FIG. The low-speed job is divided into the high-speed job and processed, and the multiplex waiting process of each job is performed.

【0052】また、上記OSの下で働く各プログラム
は、機能別の管理領域すなわちセクション領域毎に順番
に配列されており、各セクション領域には機能毎にセク
ション宣言によって名前が付けられている。各ストラテ
ジーファイル側で使用する主なセクション領域は、 ○変数宣言領域 ○自己ファイル名、ファイル制作時の自動記録領域 ○セッティングデータ領域 ○クラセンジョブ領域 ○2msジョブ領域 ○4msジョブ領域 ○10msジョブ領域 ○低優先クラセンジョブ領域 ○50msジョブ領域 ○250msジョブ領域 ○リセット時初期化ジョブ領域 ○エンスト時初期化ジョブ領域 ○バックグランドジョブ領域 ○プログラム本体の領域 であり、機能毎にファイルを分割してプログラム開発が
可能になるとともに、プログラムの構造化記述を可能に
する。
Further, each program operating under the OS is arranged in order for each function-specific management area, that is, for each section area, and each section area is named by a section declaration for each function. The main section areas used on each strategy file side are: ○ Variable declaration area ○ Self-file name, automatic recording area during file creation ○ Setting data area ○ Class job area ○ 2ms job area ○ 4ms job area ○ 10ms job area ○ Low priority class job area ○ 50ms job area ○ 250ms job area ○ Reset initialization job area ○ Engine stall initialization job area ○ Background job area ○ Program body area, which is a file division for each function and program development It also enables structured description of programs.

【0053】また、上記OSには、以上のマネジメント
機能に密着した内部ストラテジーとして、 (2-1)A/D変換処理 (2-2)クランク位置に係る各種情報の算出 (2-3)デバッグ用シミュレーション機能(エンジン回転
及びA/D変換) (2-4)点火タイマのセット (2-5)燃料噴射タイマのセット などの機能を備えており、さらに、これらの機能に係る
各種サービスルーチンが各ジョブ中に用意されている。
Further, the above-mentioned OS has (2-1) A / D conversion processing (2-2) Calculation of various information related to crank position (2-3) Debug as an internal strategy closely related to the above management function. Simulation function (engine rotation and A / D conversion) (2-4) Ignition timer set (2-5) Fuel injection timer set and other functions are provided. Furthermore, various service routines related to these functions are provided. It is prepared in each job.

【0054】従来、このような機能は各ジョブレベルで
達成するようになっていたが、本システムにおいては、
すべてOS側に用意され、OS側で処理したA/D変換
結果、クランク位置情報、エンジン回転数などに基づい
て、ユーザー側の各ジョブで、燃料噴射量、点火時期な
どを設定すると、これらの指示値がOSによって燃料噴
射タイマ、点火タイマにセットされるようになってい
る。
Conventionally, such a function has been achieved at each job level, but in this system,
If the fuel injection amount, ignition timing, etc. are set for each job on the user side based on the A / D conversion result processed by the OS side, crank position information, engine speed, etc. The instruction value is set by the OS in the fuel injection timer and the ignition timer.

【0055】次に、上記メインコンピュータ51におけ
るジョブ処理の機能を、図1〜図13のフローチャート
に基づいて説明する。尚、サブコンピュータ52はノッ
ク検出処理専用のコンピュータであるため、その動作説
明を省略する。
Next, the function of job processing in the main computer 51 will be described with reference to the flowcharts of FIGS. Since the sub computer 52 is a computer dedicated to knock detection processing, its operation description is omitted.

【0056】まず、イグニッションスイッチ56がON
されてシステムに電源が投入されると、リセットに伴う
リセット割込みが起動し、各種イニシャライズが行なわ
れるとともに、0.5ms毎に定期割込みを起動するた
めの定期割込みタイマが起動され、クランク角センサ3
9からの信号入力毎(BTDC97°,65°,10°
CA毎のエンジン1回転に6回)に起動されるクラセン
割込みが許可され、その後、バックグランドジョブの実
行状態となる。
First, the ignition switch 56 is turned on.
When the power is supplied to the system, a reset interrupt associated with the reset is activated, various initializations are performed, and a periodic interrupt timer for activating the periodic interrupt is activated every 0.5 ms.
Each signal input from 9 (BTDC 97 °, 65 °, 10 °
The classen interrupt that is activated every six engine revolutions per CA) is permitted, and then the background job is executed.

【0057】そして、このバックグランドジョブの上
で、0.5ms毎の定期割込みと、エンジン1回転に6
回のクラセン割込みとにより、7レベルのジョブが優先
処理される。この2つの割込みにおいては、各自の処理
を実行後、共通のアドレスにジャンプし、ジョブ優先処
理を実行する。
Then, on this background job, a periodic interrupt every 0.5 ms and 6 times per engine revolution.
A job of the 7th level is preferentially processed by the number of classen interrupts. In these two interrupts, after executing their own processing, they jump to a common address and execute job priority processing.

【0058】尚、上記リセット割込みは、内部演算にお
いて0による除算を実行した場合や、無限ループが発生
した場合など、正常時には発生しない要因によっても、
起動される。
The reset interrupt may be caused by a factor that does not normally occur, such as when division by 0 is executed in an internal operation or when an infinite loop occurs.
Is activated.

【0059】まず、図2に示す0.5ms毎の定期割込
みについて説明する。この定期割込みでは、ステップS1
00で、OS用ワークエリアを設定し、ステップS101で、
ウオッチドッグタイマを初期化すると、ステップS102へ
進んで、P−RUNフラグを20回に1回すなわち10
ms毎に反転する。このP−RUNフラグは、図示しな
い保護回路によってシステムが自動的にリセットされな
いようにするためのフラグであり、システムが正常に動
作して一定時間毎(10ms毎)に反転される限り、上
記保護回路の作動が阻止される。
First, the periodic interrupt every 0.5 ms shown in FIG. 2 will be described. In this periodic interrupt, step S1
At 00, set the OS work area, and at step S101,
When the watchdog timer is initialized, the process proceeds to step S102, and the P-RUN flag is set once every 20 times, that is, 10 times.
Invert every ms. The P-RUN flag is a flag for preventing the system from being automatically reset by a protection circuit (not shown), and is protected as long as the system operates normally and is inverted at regular time intervals (every 10 ms). The operation of the circuit is blocked.

【0060】次いで、ステップS103へ進み、スイッチ出
力の転写を行なう。このスイッチ出力は、各ジョブ中で
メモリに書き込んだビットのON,OFF値であり、各
ジョブからは直接I/Oインターフェース64の出力ポ
ートに出力せず、OS側で0.5ms毎にメモリの値を
出力ポートに転写する。
Next, in step S103, the switch output is transferred. This switch output is the ON / OFF value of the bit written in the memory in each job. It is not directly output from the output port of the I / O interface 64 from each job, but the OS outputs the memory every 0.5 ms. Transfer the value to the output port.

【0061】次に、ステップS104へ進むと、後述するA
/D変換サブルーチンを実行してA/D変換に係る各種
設定を行ない、ステップS105で、ジョブフラグ作成サブ
ルーチンを実行して、2,4,10,50,250ms
毎の各ジョブ割込み要求を示すジョブフラグJB_FL
Gを作成した後、ステップS106で、A/D変換をスター
トする。
Next, in step S104, the A
A / D conversion subroutine is executed to make various settings related to A / D conversion, and in step S105, a job flag creation subroutine is executed to set 2, 4, 10, 50, 250 ms.
Job flag JB_FL indicating each job interrupt request for each
After creating G, in step S106, A / D conversion is started.

【0062】上記A/D変換は、基本的に、A/D変換
器66の8チャンネル入力が0.5ms毎に所定の変換
順番毎に処理され、4ms周期で全入力の変換が行なわ
れる。但し、特定の1つのチャンネルは、回転脈動が発
生する吸入管圧力などをA/D変換するためクランク角
90°毎に(0.5msの時間精度で)同期し、変換順
番に対して割込んだ形で処理が行なわれ、その後の入力
の順番を1つ遅れにする。
In the A / D conversion, basically, the 8-channel input of the A / D converter 66 is processed every 0.5 ms in a predetermined conversion order, and all the inputs are converted in a cycle of 4 ms. However, one specific channel is synchronized at every crank angle of 90 ° (with time accuracy of 0.5 ms) for A / D conversion of suction pipe pressure that causes rotational pulsation, and interrupts the conversion order. The processing is performed in a dull shape, and the order of subsequent inputs is delayed by one.

【0063】また、図15に示すように、上記ジョブフ
ラグJB_FLGは、1バイト変数の各ビットを各ジョ
ブに対応するフラグとして割当てたものであり、複数の
ジョブ要求が同時に可能なようになっている。この1バ
イト変数のビット1〜ビット7は優先レベル1〜7に対
応し、それぞれ、250msジョブ、50msジョブ、
低優先クラセンジョブ、10msジョブ、4msジョ
ブ、2msジョブ、クラセンジョブのフラグに割当てら
れている。そして、所定のビットが立てられたとき、対
応する優先レベルのジョブ割込み要求がなされる。尚、
ビット0はバックグランドジョブのフラグに割当てられ
て通常は参照されない。
Further, as shown in FIG. 15, the job flag JB_FLG is one in which each bit of the 1-byte variable is assigned as a flag corresponding to each job, and a plurality of job requests can be made simultaneously. There is. Bits 1 to 7 of this 1-byte variable correspond to priority levels 1 to 7, and are respectively 250 ms job, 50 ms job,
It is assigned to flags of low priority class job, 10 ms job, 4 ms job, 2 ms job, and class job. Then, when a predetermined bit is set, a job interruption request of a corresponding priority level is made. still,
Bit 0 is assigned to the flag of the background job and is not normally referred to.

【0064】そして、上記ステップS105でジョブフラグ
作成サブルーチンによりジョブフラグJB_FLGを作
成し、上記ステップS106でA/D変換をスタートした後
は、ステップS107へ進み、ジョブフラグJB_FLGの
いずれかのジョブに対応するビットが立っているか否か
を調べる。
Then, in step S105, the job flag JB_FLG is created by the job flag creation subroutine, and after A / D conversion is started in step S106, the process proceeds to step S107, and any job of the job flag JB_FLG is processed. Check whether the bit to be set is set.

【0065】その結果、ジョブフラグJB_FLGのビ
ットが一つも立っていないときには、どのジョブからも
要求がないため割込みを終了し、ジョブフラグJB_F
LGのいずれかのビットが立っているときには、ステッ
プS108へ進んで、現状レベル(この定期割込みが実行さ
れる時点で所定の優先レベルのジョブが実行されていた
状態)以下のフラグがないか否かを調べる。
As a result, when none of the bits of the job flag JB_FLG is set, there is no request from any job and the interrupt is ended.
If any bit of LG is set, the process proceeds to step S108, and there is no flag below the current level (a state in which a job of a predetermined priority level is being executed at the time when this periodic interrupt is executed). To find out.

【0066】上記ステップS108で、現状レベル以下のフ
ラグがないときには、ラベルWAR_JBで示される図
4のジョブ優先処理にジャンプし、現状レベル以下のフ
ラグがあるときには、ステップS109で、現状レベル以下
のレベルのオーバーラップカウンタOLCを1増加させ
る。
If there is no flag below the current level in step S108, the process jumps to the job priority process shown in label WAR_JB in FIG. 4, and if there is a flag below the current level, in step S109 the level below the current level is reached. The overlap counter OLC of is increased by one.

【0067】上記オーバーラップカウンタOLCは、ジ
ョブ要求を記憶するためのカウンタであり、各優先レベ
ル毎に1バイト割当てられ、上記ジョブフラグJB_F
LGによるジョブ要求時にインクリメント、ジョブ終了
時にデクリメントされる。すなわち、カウンタによって
ジョブ要求を記憶することによりジョブの多重要求に対
応することができるのである。
The overlap counter OLC is a counter for storing a job request, 1 byte is allocated to each priority level, and the job flag JB_F is set.
It is incremented when a job is requested by LG and decremented when the job is completed. That is, by storing the job request by the counter, it is possible to deal with the multiple job request.

【0068】次いで、上記ステップS109からステップS1
10へ進み、現状レベルより高いフラグがないか否かを調
べ、現状レベルより高いフラグがないときには、ルーチ
ンを抜けて割込みを終了し、現状レベルより高いフラグ
があるときには、ラベルWAR_JBのジョブ優先処理
へジャンプする。
Next, from step S109 to step S1
Go to step 10 to check whether there is a flag higher than the current level. If there is no flag higher than the current level, exit the routine and end the interrupt. If there is a flag higher than the current level, the job priority process of label WAR_JB is executed. Jump to.

【0069】一方、この0.5ms毎の定期割込みに対
し、図3のクラセンによる割込みでは、ステップS200
で、OS用ワークエリアを設定すると、ステップS201
で、後述するクランク位置・半回転時間算出のサブルー
チンを実行し、現在のクランク位置を判別するためのク
ランク位置変数、及び、最新の3つのクラセン間隔の和
であるエンジン半回転の経過時間すなわち半回転時間を
算出する。
On the other hand, in contrast to the periodic interrupt every 0.5 ms, the interrupt by the classen in FIG.
Then, when the OS work area is set, step S201
Then, the crank position / half-rotation time calculation subroutine described below is executed, and the crank position variable for determining the current crank position and the half-engine elapsed time which is the sum of the latest three Classen intervals Calculate the rotation time.

【0070】上記クランク位置変数は、OS中で用意さ
れるシステム変数であり、図16に示すように、#1〜
#4気筒に対するクランク位置を、97°,65°,1
0°CAによって12の状態に区分し、現在のクランク
位置を表わす。
The crank position variables are system variables prepared in the OS, and as shown in FIG.
Crank position for # 4 cylinder is 97 °, 65 °, 1
It is divided into 12 states by 0 ° CA and represents the current crank position.

【0071】すなわち、各気筒毎に、0,1,2の数値
でクラセン入力順を示すクランク位置情報変数S_CC
AS、#1気筒を0、#3気筒を1、#2気筒を2、#
4気筒を3として気筒の燃焼順を示す気筒情報変数S_
RCAS、及び、0〜11の数値でクラセン順序及び気
筒順序を総合的に表わす総合位置変数S_ACASの3
変数によって現在のクランク位置を表わし、さらに、ク
ランク位置が確証をもって正常に判別されたときを0、
判別結果がつじつまが合わず不安の残る推定状態を1、
不明な状態を2とするエラーレベルS_ECASによ
り、クランク位置の判別状況を表わすようになってい
る。尚、図16においては、システム変数であることを
示すS_を省略している。
That is, for each cylinder, the crank position information variable S_CC indicating the Krasen input order by the numerical value of 0, 1, 2
AS, # 1 cylinder is 0, # 3 cylinder is 1, # 2 cylinder is 2, #
Cylinder information variable S_ indicating the combustion order of cylinders with 4 cylinders as 3
RCAS and 3 of the total position variable S_ACAS that comprehensively represent the Krasen order and the cylinder order with numerical values of 0 to 11
The current crank position is represented by a variable, and when the crank position is normally determined with certainty, it is set to 0,
The estimated state where the determination result does not match and the anxiety remains 1,
An error level S_ECAS that sets the unknown state to 2 indicates the determination situation of the crank position. In FIG. 16, S_ indicating a system variable is omitted.

【0072】次いで、上記ステップS201からステップS2
02へ進むと、クランク位置・半回転時間算出のサブルー
チンにおいてクランク位置判定が正常に終了したかある
いは判定不能であったかを、アキュムレータAにストア
されているコードを読み出すことにより調べる(エラー
コード1、正常終了コード0)。
Next, from step S201 to step S2
When the process proceeds to 02, it is checked by reading the code stored in the accumulator A whether or not the crank position determination in the crank position / half-rotation time calculation subroutine has ended normally or cannot be determined (error code 1, normal Exit code 0).

【0073】そして、上記ステップS202で、アキュムレ
ータAの値が1であり、クランク位置が判定不能であっ
たときには、割込みを終了し、アキュムレータAの値が
0であり、クランク位置が正常に判定されているときに
は、ステップS203へ進み、エンストフラグを解除する。
Then, in step S202, when the value of the accumulator A is 1 and the crank position cannot be determined, the interrupt is ended, the value of the accumulator A is 0, and the crank position is determined normally. If so, the process proceeds to step S203, and the engine stall flag is cleared.

【0074】尚、上記エンストフラグは、エンジンがエ
ンスト状態であることを示すフラグであり、クラセン間
隔が0.5sec以上の時間(約30rpm以下)のと
き、50msジョブに用意されているエンスト処理ルー
チンによりセットされ、このクラセン割込みによりクリ
アされてエンスト状態が解除される。
The engine stall flag is a flag indicating that the engine is in an engine stall state. When the classen interval is 0.5 sec or more (about 30 rpm or less), an engine stall processing routine prepared for a 50 ms job is provided. Is set by, and is cleared by this classen interrupt to release the stalled state.

【0075】次に、ステップS204へ進むと、点火タイマ
セットのサブルーチンを実行し、ユーザージョブ側で設
定した点火時期の指示値に基づいて作成された点火スケ
ジュールに従って点火タイマをセットする。この点火ス
ケジュールは、ドエル開始時期、ドエルオン待ち時間、
ドエルオフ待ち時間などをメンバーとする構造体変数で
あり、10msジョブ中に作成ルーチンが用意され、こ
の点火スケジュールに従って点火シーケンスが決定され
る。
Next, in step S204, the ignition timer setting subroutine is executed, and the ignition timer is set according to the ignition schedule created based on the instruction value of the ignition timing set on the user job side. This ignition schedule is for dwell start time, dwell on waiting time,
This is a structure variable whose members are the dwell off waiting time and the like. A creation routine is prepared during the 10 ms job, and the ignition sequence is determined according to this ignition schedule.

【0076】次いで、スップS205で、燃料噴射タイマセ
ットのサブルーチンを実行し、ユーザージョブ側で設定
した燃料噴射量の指示値(各気筒毎の噴射幅)に対し、
燃料噴射開始時期などを燃料噴射タイマにセットしてス
テップS206へ進む。
Next, at S205, a fuel injection timer set subroutine is executed, and the fuel injection amount instruction value (injection width for each cylinder) set on the user job side is set to
The fuel injection start timing is set in the fuel injection timer, and the process proceeds to step S206.

【0077】ステップS206では、このクラセンが実行さ
れた現状のジョブレベルが自身のジョブレベルであるか
否かを判別し、現状がクラセンジョブ自身のレベルであ
るときには、ステップS207、S208で、クラセンジョブ、
低優先クラセンジョブのオーバーラップカウンタ OL
Cを、それぞれ1増加させて割込みを終了し、現状のジ
ョブレベルがクラセンジョブのレベルでないときには、
ステップS209で、現状のジョブレベルが低優先クラセン
ジョブのレベル以上であるか否かを調べる。
In step S206, it is determined whether or not the current job level at which this class is executed is the own job level. If the current status is the level of the class job itself, then in steps S207 and S208 the class job ,
Overlap counter OL for low priority class job
When C is incremented by 1 and the interruption is ended, and the current job level is not the level of the class job,
In step S209, it is checked whether the current job level is equal to or higher than the low priority class job level.

【0078】そして、現状のジョブレベルが低優先クラ
センジョブ以上であるときには、上記ステップS209から
ステップS210へ進んで、低優先クラセンジョブのオーバ
ーラップカウンタOLCを1増加させると、ステップS2
11で、クラセンジョブのジョブフラグをセットし、ラベ
ルWAR_JBのジョブ優先処理へジャンプする。
When the current job level is equal to or higher than the low-priority class job, the process proceeds from step S209 to step S210, and if the overlap counter OLC of the low-priority class job is incremented by 1, step S2
At 11, the job flag of the class job is set, and the process jumps to the job priority process of the label WAR_JB.

【0079】一方、上記ステップS209で、現状のジョブ
レベルが低優先クラセンジョブ以上でないときには、上
記ステップS209からステップS212へ進み、クラセンジョ
ブのジョブフラグをセットすると、ステップS213で、低
優先クラセンジョブのジョブフラグをセットし、ラベル
WAR_JBのジョブ優先処理へジャンプする。
On the other hand, in step S209, when the current job level is not lower than the low priority class job, the process proceeds from step S209 to step S212 to set the job flag of the class job. The job flag is set, and the process jumps to the job priority process with the label WAR_JB.

【0080】このジョブ優先処理では、ステップS300
で、ジョブの優先レベルを示す1バイト変数であるジョ
ブレベルJB_LEVを1つ上げると、ステップS301へ
進んで、この優先レベルに対応するジョブフラグが立っ
ていないか調べる。そして、ジョブフラグが立っていな
いときには、ステップS300へ戻ってさらにジョブレベル
JB_LEVを1つ上げ、ジョブフラグが立っていると
きには、ステップS302へ進み、ジョブフラグの立ってい
るジョブのオーバーラップカウンタOLCを初期値の0
から1にし、ステップS303へ進む。
In this job priority process, step S300
Then, if the job level JB_LEV, which is a 1-byte variable indicating the priority level of the job, is increased by one, the process proceeds to step S301, and it is checked whether or not the job flag corresponding to this priority level is set. If the job flag is not set, the process returns to step S300 to further increase the job level JB_LEV by one, and if the job flag is set, the process proceeds to step S302 to set the overlap counter OLC of the job for which the job flag is set. Initial value 0
Is set to 1 and the process proceeds to step S303.

【0081】ステップS303では、より上のジョブフラグ
があるか否かを調べ、より上のジョブがあるときには、
ステップS300へ戻って前述の処理を繰り返し、より上の
ジョブがないときには、ステップS304へ進んで、ジョブ
実行中フラグJB_RUNをセットすると、ステップS3
05で、後述するジョブ実行サブルーチンにより最上位の
ジョブを実行する。
In step S303, it is checked whether or not there is a higher job flag, and when there is a higher job,
Returning to step S300, the above processing is repeated. If there is no higher job, the process proceeds to step S304 to set the job executing flag JB_RUN, and then step S3
At 05, the highest-level job is executed by the job execution subroutine described later.

【0082】上記ジョブ実行中フラグJB_RUNは、
ジョブの実行開始時にセットされ、終了時にクリアされ
るフラグであり、このフラグにより、処理の途中で、よ
り優先度の高いジョブによって割込まれたジョブを識別
することができる。
The job executing flag JB_RUN is
It is a flag that is set at the start of job execution and cleared at the end. By this flag, a job interrupted by a job with a higher priority can be identified during processing.

【0083】例えば、図17に示すように、JB_LE
V=4の10msジョブを実行中、JB_LEV=6の
2msジョブの割込み要求がなされると、10msジョ
ブの処理が中断され、より優先度の高い2msジョブ
が、JB_RUN=1、OLC=1にセットされ、実行
される。そして、この2msジョブの処理中に、JB_
LEV=5の4msジョブの割込み要求が発生すると、
この4msジョブは、JB_RUN=0、OLC=1と
されて割込みが受付けられるが、実行はされず待機状態
となる。
For example, as shown in FIG. 17, JB_LE
When an interrupt request for a 2ms job with JB_LEV = 6 is made during execution of a 10ms job with V = 4, the processing of the 10ms job is interrupted, and the higher priority 2ms job is set to JB_RUN = 1 and OLC = 1. Is executed. Then, during the processing of this 2 ms job, JB_
When an interrupt request for a 4 ms job with LEV = 5 occurs,
This 4 ms job is set to JB_RUN = 0 and OLC = 1 to accept an interrupt, but is not executed and is in a standby state.

【0084】その後、ジョブ実行サブルーチンによるジ
ョブの実行が終了すると、上記ステップS305からステッ
プS306へ進んでオーバーラップカウンタOLCを1減ら
し、ステップS307で、オーバーラップカウンタOLCが
ゼロになったか否かを調べる。その結果、オーバラップ
カウンタOLCがゼロになっておらず、同じ優先レベル
でジョブ割込み要求が複数回あるときには、ステップS3
05へ戻ってジョブを繰返し実行し、オーバラップカウン
タOLCがゼロになったとき、ステップS307からステッ
プS308へ進んで、ジョブ実行中フラグJB_RUNをク
リアする。
After that, when the execution of the job by the job execution subroutine is completed, the process proceeds from step S305 to step S306, the overlap counter OLC is decremented by 1, and it is checked in step S307 whether the overlap counter OLC has become zero. . As a result, when the overlap counter OLC is not zero and there are multiple job interrupt requests at the same priority level, step S3
Returning to 05, the job is repeatedly executed, and when the overlap counter OLC becomes zero, the process proceeds from step S307 to step S308 to clear the job executing flag JB_RUN.

【0085】次に、ステップS309へ進み、ジョブレベル
JB_LEVを1つ下げて次のジョブレベルに移ると、
ステップS310で、このジョブレベルJB_LEVがゼロ
になったか否かを調べる。そして、ジョブレベルJB_
LEVがゼロのときには、この割込みを終了し、ジョブ
レベルJB_LEVがゼロでないときには、ステップS3
11へ進んで、オーバーラップカウンタOLCがゼロか否
かを調べる。
Next, in step S309, when the job level JB_LEV is lowered by 1 and the job level is moved to the next job level,
In step S310, it is checked whether this job level JB_LEV has become zero. Then, the job level JB_
When LEV is zero, this interrupt is ended, and when job level JB_LEV is not zero, step S3
Proceed to 11 and check whether the overlap counter OLC is zero.

【0086】上記ステップS311で、オーバーラップカウ
ンタOLCがゼロのときには、このレベルではジョブ要
求はないため、上記ステップS311からステップS309へ戻
って、ジョブレベルJB_LEVをさらに1つ下げて同
様の処理を繰返し、オーバーラップカウンタOLCがゼ
ロでないときには、ステップS312へ進んで、このジョブ
レベルにおいて、ジョブ実行中フラグJB_RUNがセ
ットされているか否かを調べる。
When the overlap counter OLC is zero in step S311, there is no job request at this level. Therefore, the process returns from step S311 to step S309, the job level JB_LEV is further lowered by one, and the same processing is repeated. If the overlap counter OLC is not zero, the flow advances to step S312 to check if the job executing flag JB_RUN is set at this job level.

【0087】上記ステップS312で、ジョブ実行中フラグ
JB_RUNがセットされているときには、割込み前に
ジョブを実行中であったため、割込みを終了して割込み
前のジョブへ戻り、ジョブ実行中フラグJB_RUNが
セットされていなければ、ステップS304へ戻って、この
レベルのジョブを実行し、同様の処理を繰返す。
When the job executing flag JB_RUN is set in step S312, the job was being executed before the interruption, so the interruption is terminated and the process returns to the job before the interruption, and the job executing flag JB_RUN is set. If not, the process returns to step S304, the job of this level is executed, and the same processing is repeated.

【0088】すなわち、図17において、JB_LEV
=6の2msジョブが終了し、OLC=0、JB_RU
N=0になると、ジョブレベルが1つ下げられ、JB_
LEV=5の4msジョブが、JB_RUN=0、OL
C=1の待機状態からJB_RUN=1にセットされ、
実行される。さらに、4msジョブが終了すると、JB
_LEV=4に移り、JB_RUN=1(ジョブ実行
中)の状態から、2msジョブ及び4msジョブによっ
て中断されていた10msジョブの処理が再開される。
That is, in FIG. 17, JB_LEV
= 6 ms 2ms job is completed, OLC = 0, JB_RU
When N = 0, the job level is lowered by 1 and JB_
4ms job with LEV = 5, JB_RUN = 0, OL
JB_RUN = 1 is set from the standby state of C = 1,
To be executed. Furthermore, when the 4ms job is completed, JB
Moving to _LEV = 4, the processing of the 10 ms job suspended by the 2 ms job and the 4 ms job is resumed from the state of JB_RUN = 1 (job is being executed).

【0089】このように、0.5ms毎の定期割込み、
クラセン割込みを基本タイミングとして、各ジョブの優
先レベル及び実行タイミングを知らせるジョブフラグJ
B_FLGを作成するため、可能な限り正確に、等時間
間隔処理、エンジン回転同期処理を実現し、各ジョブを
効率良く処理することができる。さらに、基本タイミン
グとなる各割込み毎に更新されるジョブフラグJB_F
LGによらず、オーバーラップカウンタOLCによって
ジョブの多重要求を記憶するため、あるジョブの処理時
間が長引き、再度、同じジョブを実行すべきタイミング
となった場合においても、処理を途中で放棄することな
く、可能な限り最後まで処理を継続することができる。
In this way, the periodic interrupt every 0.5 ms,
A job flag J for notifying the priority level and execution timing of each job with the classen interrupt as the basic timing.
Since B_FLG is created, equal time interval processing and engine rotation synchronization processing can be realized as accurately as possible, and each job can be processed efficiently. Further, the job flag JB_F updated for each interrupt which is the basic timing
Since the overlap counter OLC stores the job multiplex request regardless of LG, even if the processing time of a certain job is prolonged and it is time to execute the same job again, the processing is abandoned midway. No, the process can be continued to the end as much as possible.

【0090】この際、クランク位置を常に的確に把握し
ておく必要があり、クラセン割込み毎に、図9に示すク
ランク位置算出サブルーチンが実行されて前述したクラ
ンク位置変数S_CCAS,S_RCAS,S_ACA
S,S_ECASが算出される。尚、以下の説明におい
ては、システム変数であることを示すS_をクランク位
置変数から省略する。
At this time, it is necessary to always know the crank position accurately, and the crank position calculation subroutine shown in FIG. 9 is executed for each classen interrupt to execute the crank position variables S_CCAS, S_RCAS, S_ACA.
S and S_ECAS are calculated. In the following description, S_ indicating a system variable will be omitted from the crank position variable.

【0091】このクランク位置算出サブルーチンでは、
まず、ステップS600で、クラセンタイマの下2バイトを
ソフトタイマの下2バイトにストアする。このクラセン
タイマはECU50に備えられたハードウエアタイマで
あり、本実施例においては、16ビットタイマで最大2
55msまで計数が可能であるが、メモリ上に3バイト
の連続した領域を確保して下2バイトにクラセンタイマ
の2バイトを転写し、クラセンタイマのオーバーフロー
により発生する割込みで3バイト目をカウントアップす
ることによりソフトタイマとして使用する。
In this crank position calculation subroutine,
First, in step S600, the lower 2 bytes of the class timer are stored in the lower 2 bytes of the soft timer. This classen timer is a hardware timer provided in the ECU 50, and in the present embodiment, a maximum of two 16-bit timers.
Counting is possible up to 55 ms, but a continuous area of 3 bytes is secured in the memory, 2 bytes of the Classen timer are transferred to the lower 2 bytes, and the 3rd byte is counted up by the interrupt generated by the overflow of the Classen timer. It is used as a soft timer.

【0092】すなわち、クラセンタイマにオーバーフロ
ーが発生したとき、図12のオーバーフロー割込みが発
生し、ステップS900で、ソフトタイマの3バイト目を1
増やすと、ステップS901で、ソフトタイマの3バイト目
が255を越えていないかを判別する。そして、255
を越えていないときには、ステップS901からステップS9
03へジャンプし、255を越えているときには、ステッ
プS901からステップS902へ進んでソフトタイマの3バイ
ト目を255で止め、ステップS903へ進む。
That is, when an overflow occurs in the classen timer, the overflow interrupt shown in FIG. 12 occurs, and the third byte of the soft timer is set to 1 in step S900.
When the number is increased, it is determined in step S901 whether the third byte of the soft timer exceeds 255. And 255
If it does not exceed step S901, step S901 to step S9
When it jumps to 03 and exceeds 255, it proceeds from step S901 to step S902, stops the third byte of the soft timer at 255, and proceeds to step S903.

【0093】ステップS903では、ソフトタイマの3バイ
ト目が2でないか否か、すなわち、クラセン間隔が0.
5sec(255ms×2)を越えてエンスト状態であ
るか否かを調べる。そして、ソフトタイマの3バイト目
が2でないときには割込みを終了し、ソフトタイマの3
バイト目が2のときには、上記ステップS903からステッ
プS904へ進んで、エンストフラグが立っているか否かを
調べる。
In step S903, it is determined whether the third byte of the soft timer is not 2, that is, the class interval is 0.
It is checked whether the engine is in the stalled state for more than 5 seconds (255 ms × 2). If the 3rd byte of the soft timer is not 2, the interrupt is terminated and the 3
When the byte is 2, the process proceeds from step S903 to step S904 to check whether the engine stall flag is set.

【0094】上記ステップS904では、エンストフラグが
立っているときには割込みを終了し、エンストフラグが
立っていないときには、ステップS905で、前述した50
msジョブに用意されているエンスト処理ルーチンを起
動させるエンスト処理要求フラグを立てて割込みを終了
する。
In the above step S904, the interrupt is ended when the engine stall flag is set, and when the engine stall flag is not set, the above-mentioned 50 is executed in step S905.
The stalling processing request flag for activating the stalling processing routine prepared for the ms job is set and the interruption is ended.

【0095】これにより、クラセン間隔を最大64se
c(255ms×256)まで計数することが可能とな
り、16ビット以上の特別なハードウエアタイマを使用
することなく、クランキング時などクラセン間隔が極め
て長い場合にも容易に対応することができる。
As a result, the classen interval can be up to 64 se.
It is possible to count up to c (255 ms × 256), and it is possible to easily cope with extremely long Krasen intervals such as cranking without using a special hardware timer of 16 bits or more.

【0096】一方、クランク位置算出のサブルーチンで
は、ステップS600からステップS601へ進むと、クラセン
間隔が設定時間以下か否かを調べる。この設定時間は、
最大エンジン回転数に対応するクラセン間隔としての時
間、例えば0.3msであり、上記ステップS601でクラ
セン間隔が設定時間以下のときには、ノイズの混入など
によるクラセンタイマの計数エラーとしてステップS602
でアキュムレータAにエラーコード1を格納し、上記ス
テップS601で、クラセン間隔が設定時間より長いときに
は、クラセンタイマの計数が正常であるとしてステップ
S603へ進む。
On the other hand, in the crank position calculation subroutine, when the process proceeds from step S600 to step S601, it is checked whether the classen interval is equal to or shorter than the set time. This set time is
The time as a classen interval corresponding to the maximum engine speed is, for example, 0.3 ms, and when the classen interval is less than or equal to the set time in the above step S601, it is determined as a counting error of the classen timer due to mixing of noise or the like in step S602.
Error code 1 is stored in accumulator A, and in step S601, when the classen interval is longer than the set time, it is determined that the classen timer count is normal, and the step
Proceed to S603.

【0097】ステップS603では、後述するCCAS・R
CAS判別サブルーチンを実行してクランク位置を判別
し、ステップS604で、エラーレベルECASが2である
か否か、すなわち、クランキング時などのように気筒判
別がなされていない状態であるか否かを調べ、ECAS
=2のときには、ステップS605へ分岐してアキュムレー
タAにエラーコード1を格納し、ルーチンを抜ける。
At step S603, CCAS.R to be described later is performed.
The CAS determination subroutine is executed to determine the crank position, and in step S604, it is determined whether or not the error level ECAS is 2, that is, whether or not the cylinder is not determined, such as during cranking. Examine, ECAS
= 2, the process branches to step S605, the error code 1 is stored in the accumulator A, and the routine exits.

【0098】一方、上記ステップS604で、ECAS≠2
のときには、ステップS606へ進み、ソフトタイマの3バ
イト目を0とする。そしてステップS607へ進み、クラン
ク位置情報変数CCASが1であるか否か、すなわち、
現在のクランク位置がBTDC65°CA〜10°CA
の間(図16参照)であるか否かを調べ、CCAS=1
のときには、ステップS607からステップS609へジャンプ
し、CCAS≠1のときには、ステップS607からステッ
プS608へ進んで、A/D変換リクエストを1増加させ、
ステップS609へ進む。
On the other hand, in the above step S604, ECAS ≠ 2
In case of, the process proceeds to step S606, and the third byte of the soft timer is set to 0. Then, the process proceeds to step S607, whether or not the crank position information variable CCAS is 1, that is,
Current crank position is BTDC 65 ° CA-10 ° CA
During the period (see FIG. 16), CCAS = 1
In case of, it jumps from step S607 to step S609, and in case of CCAS ≠ 1, it advances from step S607 to step S608 and increments the A / D conversion request by 1,
Proceed to step S609.

【0099】このA/D変換リクエストは、クランク角
90°毎にクランク同期A/D変換を指示するためのフ
ラグ的な変数であり、0、1の値をとり、値が1のとき
クランク同期A/D変換を指示する。すなわち、前述し
たように、8チャンネルのA/D変換のうち1チャンネ
ルのA/D変換はクランク角90°毎に行なわれるが、
CCASが0になったとき(BTDC97°)と、CC
ASが2になったとき(BTDC10°)、クランク同
期のA/D変換リクエストをセットし、0.5ms毎の
A/D変換順番に対してクランク角90°毎のA/D変
換を割込ませるのである。
This A / D conversion request is a flag-like variable for instructing crank synchronization A / D conversion for each 90 ° crank angle, and takes a value of 0 or 1, and when the value is 1, crank synchronization is performed. Instruct A / D conversion. That is, as described above, of the 8-channel A / D conversion, the 1-channel A / D conversion is performed at every crank angle of 90 °.
When CCAS becomes 0 (BTDC 97 °), CC
When AS becomes 2 (BTDC 10 °), the crank-synchronized A / D conversion request is set, and the A / D conversion for every 90 ° crank angle is interrupted for the A / D conversion order every 0.5 ms. It does.

【0100】その後、ステップS609では、気筒情報変数
RCASを3倍してクランク位置情報変数CCASを加
算することにより総合位置変数ACASを算出すると
(ACAS=RCAS×3+CCAS)、ステップS610
で、ソフトタイマを2バイトでリミットし、クラセンタ
イマがオーバーフローしている場合には下2バイトをF
FFF(255ms)としてステップS611へ進む。
Then, in step S609, the total position variable ACAS is calculated by multiplying the cylinder information variable RCAS by 3 and adding the crank position information variable CCAS (ACAS = RCAS × 3 + CCAS), and step S610
Then, the soft timer is limited by 2 bytes, and if the classen timer overflows, the lower 2 bytes are F
The processing proceeds to step S611 as FFF (255 ms).

【0101】ステップS611では、総合位置変数ACAS
=0,1,2,…,11を添字とする配列TCAS[A
CAS](配列の要素)にクラセン間隔データをストア
し、ステップS612で、クランク位置情報変数CCAS=
0,1,2を添字とする配列MTCSX[CCAS]
(配列の要素)にクラセン間隔データをストアする。
In step S611, the total position variable ACAS
Array TCAS [A with subscripts = 0, 1, 2, ..., 11
CAS] (element of array) to store the classen interval data, and in step S612, crank position information variable CCAS =
Array MTCSX [CCAS] with subscripts 0, 1, 2
Store Classen interval data in (array element).

【0102】配列TCASは、図18(a)に示すよう
に、ACAS=0,1,2,…、11に対応するエンジ
ン2回転分のクラセン間隔データがストアされた12ワ
ードのクラセン間隔テーブルであり、配列MTCSX
は、図18(b)に示すように、CCAS=0,1,2
に対応する3ヶのクラセン間隔データがストアされた3
ワードのクラセン間隔テーブルである。
As shown in FIG. 18A, the array TCAS is a 12-word classen interval table in which classen interval data for two engine revolutions corresponding to ACAS = 0, 1, 2, ... Yes, array MTCSX
As shown in FIG. 18B, CCAS = 0,1,2
3 pieces of Classen interval data corresponding to
It is a word classen interval table.

【0103】すなわち、配列TCASを参照することに
より、各気筒の各クランク位置におけるクラセン間隔の
変化(回転速度の変化)を知ることができ、各気筒の失
火の有無、燃焼状態などを判断することができ、全気筒
の運転状況を把握することができる。また、配列MTC
SXを参照することにより、常に最新のクラセン間隔を
得ることができ、現在の運転状況を迅速に把握すること
ができる。
That is, by referring to the array TCAS, it is possible to know the change in the Krasen interval (change in rotational speed) at each crank position of each cylinder, and to determine the presence or absence of misfire in each cylinder, the combustion state, and the like. The operation status of all cylinders can be grasped. Also, the array MTC
By referring to SX, the latest Classen interval can always be obtained, and the current operating condition can be quickly grasped.

【0104】次いで、ステップS613へ進むと、再び、エ
ラーレベルECASの値を調べる。ここでは、前述のス
テップS604においてECAS≠2であることを既に確認
してあるため、エラーレベルECASが1か否か、すな
わち、クランク位置の判別が不安の残る推定状態である
か否かを調べる。
Next, in step S613, the value of the error level ECAS is checked again. Here, since it has already been confirmed in step S604 that ECAS ≠ 2, it is checked whether or not the error level ECAS is 1, that is, whether or not the determination of the crank position is an estimation state in which anxiety remains. .

【0105】上記ステップS613でECAS≠1(すなわ
ちECAS=0)であり、クランク位置が確証をもって
判別されているときには、上記ステップS613からステッ
プS614へ進んで、最新3ヶのクラセン間隔データの和
(配列MTCSXの和)を、3バイトの半回転時間MT
CS18として算出する(MTCS18=ΣMTCS
X)。すなわち、半回転時間MTCS18は、クラセン
割込み毎にクランク位置情報変数CCASが更新されて
配列MTCSX内のデータが更新される毎に算出され、
BTDC97°,65°,10°の各位置毎にクラセン
間隔の移動和を取ることにより常に最新のデータが得ら
れるようになっている。
When ECAS ≠ 1 (that is, ECAS = 0) in step S613 and the crank position is determined with certainty, the process proceeds from step S613 to step S614, and the sum of the latest three classen interval data ( (Sum of array MTCSX), 3 bytes half rotation time MT
Calculate as CS18 (MTCS18 = ΣMTCS
X). That is, the half rotation time MTCS18 is calculated each time the crank position information variable CCAS is updated for each classen interrupt and the data in the array MTCSX is updated,
The latest data can always be obtained by taking the moving sum of the Krasen intervals for each position of BTDC 97 °, 65 °, 10 °.

【0106】一方、上記ステップS613で、ECAS=1
であり、クランク位置の判別が不安の残る推定状態であ
るときには、配列MTCSXから半回転時間MTCS1
8を算出せず、ステップS615で半回転時間推定のサブル
ーチンを実行して半回転時間MTCS18を推定する。
On the other hand, in the above step S613, ECAS = 1
When the crank position is in an estimated state in which the determination of the crank position remains uncertain, the half rotation time MTCS1 is calculated from the array MTCSX.
8 is not calculated, but the half rotation time estimation subroutine is executed in step S615 to estimate the half rotation time MTCS18.

【0107】この半回転時間MTCS18の推定につい
て説明すると、まず、図10のステップS700で、クラン
ク位置情報変数CCASが1か否か、すなわち、現在の
クランク位置がBTDC65°〜10°の間か否かを調
べ、CCAS=1のときには、ステップS701で、BTD
C97°〜65°間の角度32°から、前回のクラセン
間隔×180/32を半回転時間MTCS18と推定し
てリターンする。
The estimation of the half rotation time MTCS 18 will be described. First, in step S700 of FIG. 10, whether or not the crank position information variable CCAS is 1, that is, whether or not the current crank position is between BTDC 65 ° and 10 °. If CCAS = 1, then in step S701, BTD
From the angle 32 ° between C97 ° and 65 °, the previous Krasen interval × 180/32 is estimated as the half rotation time MTCS18 and the process returns.

【0108】一方、上記ステップS700で、CCAS≠1
のときには、上記ステップS700からステップS702へ進ん
で、クランク位置情報変数CCASが2か否か、すなわ
ち、現在のクランク位置がBTDC10°からATDC
83°(次の気筒のBTDC97°)の間か否かを調
べ、CCAS≠2のとき(CCAS=0のとき)には、
ステップS703へ進んで、BTDC10°〜ATDC83
°間の角度93°から前回のクラセン間隔×180/9
3を半回転時間MTCS18と推定してリターンする。
On the other hand, in the above step S700, CCAS ≠ 1
If it is, the routine proceeds from step S700 to step S702, and whether or not the crank position information variable CCAS is 2, that is, the current crank position is from BTDC10 ° to ATDC.
Whether or not it is between 83 ° (BTDC97 ° of the next cylinder) is checked, and when CCAS ≠ 2 (when CCAS = 0),
Progressing to step S703, BTDC10 ° to ATDC83
The angle between 93 ° and the previous Krasen distance x 180/9
3 is estimated as the half rotation time MTCS 18 and the process returns.

【0109】また、上記ステップS702で、CCAS=2
のときには、上記ステップS702からステップS704へ分岐
し、BTDC65°〜10°間の角度55°から前回の
クラセン間隔×180/55を半回転時間MTCS18
と推定してリターンする。
In step S702, CCAS = 2
In the case of, the process branches from the above step S702 to step S704, and from the angle 55 ° between BTDC 65 ° to 10 °, the previous classen interval × 180/55 is set as the half rotation time MTCS18.
And return.

【0110】そして、クランク位置算出サブルーチンで
は、ステップS614で半回転時間MTCS18を算出した
後、あるいは、以上説明したステップS615のサブルーチ
ンにより半回転時間MTCS18を推定した後は、ステ
ップS616へ進み、3バイトの半回転時間MTCS18を
2バイトにリミットして所定の変数MTCSKにストア
すると、ステップS617で、この変数MTCSKを2倍し
て変数MTCSK4にストアし、ステップS618で、正常
終了コード0をアキュムレータAに格納してルーチンを
抜ける。
In the crank position calculation subroutine, after the half rotation time MTCS18 is calculated in step S614 or after the half rotation time MTCS18 is estimated by the subroutine of step S615 described above, the process proceeds to step S616 and 3 bytes. When the half rotation time MTCS18 of the above is limited to 2 bytes and stored in a predetermined variable MTCSK, this variable MTCSK is doubled and stored in the variable MTCSK4 in step S617, and the normal end code 0 is stored in the accumulator A in step S618. Store and exit the routine.

【0111】次に、図11に示されるCCAS・RCA
S判別サブルーチンについて説明する。このサブルーチ
ンでは、まず最初に、ステップS800で、カムセンカウン
タを0〜4にリミットする。このカムセンカウンタで計
数されるカム角センサ41からのカムパルスの数は、図
24に示すように、正常状態の場合0〜3であるが、ノ
イズなどの影響により4以上の異常な計数値となるおそ
れがあるため、カムセンカウンタを0〜4にリミットし
て異常な状態を4で代表するのである。
Next, the CCAS / RCA shown in FIG.
The S determination subroutine will be described. In this subroutine, first, in step S800, the CamSen counter is limited to 0-4. The number of cam pulses from the cam angle sensor 41 counted by the cam sensor counter is 0 to 3 in the normal state as shown in FIG. 24, but is 4 or more abnormal count values due to the influence of noise or the like. Therefore, the camsen counter is limited to 0 to 4 and an abnormal state is represented by 4.

【0112】次に、ステップS801へ進み、カムセンカウ
ンタ(の計数値)、気筒情報変数RCAS、クランク位
置情報変数CCASから、5×4×2の組合わせ(カム
センカウンタが0〜4の5種類、気筒情報変数RCAS
が0〜3の4種類、クランク位置情報変数CCASが
0,1と2の場合の2種類)に対する状態データがスト
アされている気筒・クランク位置状態マップCCHMA
Pを読む。
Next, in step S801, a combination of 5 × 4 × 2 (the number of cam sens counters 0 to 4 is 5) is obtained from (the count value of) the cam sen counter, the cylinder information variable RCAS, and the crank position information variable CCAS. Type, cylinder information variable RCAS
Of the cylinder / crank position state CCHMA in which the state data for four types of 0 to 3 and two types of the crank position information variable CCAS of 0, 1 and 2 are stored.
Read P.

【0113】この気筒・クランク位置状態マップCCH
MAPには、図19(a)及び(b)に示すように、ク
ランク位置情報変数CCASが0あるいは1の場合と、
気筒情報変数RCASの変化点であるクランク位置情報
変数CCASが2の場合とで、カムセンカウンタと気筒
情報変数RCASの各組合わせの起こり得る全ての状態
に対し、正常か異常か、確定して良いか推定すべきかを
示す状態データがストアされており、現在の状態を評価
し、次にとるべき状態を知ることができる。
This cylinder / crank position state map CCH
In the MAP, as shown in FIGS. 19 (a) and 19 (b), when the crank position information variable CCAS is 0 or 1,
When the crank position information variable CCAS, which is the change point of the cylinder information variable RCAS, is 2, it is determined whether normal or abnormal for all possible states of each combination of the Camsen counter and the cylinder information variable RCAS. The state data indicating whether to be good or to be estimated is stored, so that the current state can be evaluated and the next state to be taken can be known.

【0114】すなわち、通常の条件判断による処理に比
較して大幅にプログラムを簡略化することができ、メモ
リ容量の節約、処理速度の向上を図ることができるとと
もに、仕様変更に対しても柔軟に対処することができ
る。
That is, the program can be greatly simplified, the memory capacity can be saved, the processing speed can be improved, and the specification can be flexibly changed as compared with the normal condition judgment processing. Can be dealt with.

【0115】上記状態データは2ビットのデータであ
り、ビット0の値により確定か推定かを表わし、ビット
1の値により正常か異常かを表わす。ビット0の値は、
0のとき確定、1のとき推定を示し、図24からわかる
ように、カムセンカウンタが2,3の場合にのみ確定で
あって、それ以外は推定せざるを得ない状態である。ま
た、ビット1の値は、0のとき正常、1のとき異常を示
し、カムセンカウンタが3以下で、且つ、図16及び図
24による組合せに合致する場合のみ正常であって、そ
れ以外は異常な状態である。
The above-mentioned status data is 2-bit data, and the value of bit 0 indicates whether it is definite or estimated, and the value of bit 1 indicates whether it is normal or abnormal. The value of bit 0 is
When the value is 0, the determination is made, and when the value is 1, the estimation is shown, and as can be seen from FIG. The value of bit 1 is normal when 0, abnormal when 1, and normal only when the camsen counter is 3 or less and matches the combination shown in FIGS. 16 and 24, and otherwise. It is in an abnormal state.

【0116】例えば、CCAS=0あるいは1、すなわ
ち、ある気筒のBTDC97°〜10°に対し、カムセ
ンカウンタが0で気筒情報変数RCASが0となる組合
せは、図16及び図24からもわかるように、クランク
位置を正常に推定すれば良い状態であるため、気筒・ク
ランク位置状態マップCCHMAPの該当領域に2進数
で01(正常推定)の状態データがストアされており、
さらに、カムセンカウンタが1で気筒情報変数RCAS
が0となる組合せは、明らかに異常であって推定するし
かない状態であるため、気筒・クランク位置状態マップ
CCHMAPの該当領域に2進数で11(異常推定)の
状態データがストアされている。
For example, as shown in FIGS. 16 and 24, CCAS = 0 or 1, that is, a combination in which the CAMDC counter is 0 and the cylinder information variable RCAS is 0 for BTDC 97 ° to 10 ° of a certain cylinder. In addition, since it is a state in which the crank position can be estimated normally, the state data of 01 (normal estimation) in binary is stored in the corresponding region of the cylinder / crank position state map CCHMAP.
Furthermore, when the cam sen counter is 1 and the cylinder information variable RCAS is
Since the combination in which is 0 is obviously abnormal and is a state that can only be estimated, state data of 11 (abnormality estimation) in binary is stored in the corresponding region of the cylinder / crank position state map CCHMAP.

【0117】また、CCAS=2、すなわち、ある気筒
のBTDC10°〜ATDC83°に対し、カムセンカ
ウンタが3で気筒情報変数RCASが0となる組合せ
は、#1気筒のTDCを挟んだクランク位置と正常に確
定できるため、気筒・クランク位置状態マップCCHM
APの該当領域に2進数で00(正常確定)の状態デー
タがストアされており、さらに、カムセンカウンタが2
で気筒情報変数RCASが0となる組合せは、明らかに
異常ではあるがカムセン入力が2ヶある以上確定せざる
を得ない状態であるため、気筒・クランク位置状態マッ
プCCHMAPの該当領域に2進数で10(異常確定)
の状態データがストアされている。
Further, CCAS = 2, that is, a combination in which the CAMDC counter is 3 and the cylinder information variable RCAS is 0 with respect to BTDC10 ° to ATDC83 ° of a certain cylinder, the crank position sandwiching the TDC of the # 1 cylinder is used. Cylinder / crank position status map CCHM because it can be confirmed normally
Binary number 00 (normally confirmed) status data is stored in the corresponding area of the AP, and further, the Kamsen counter is set to 2
Since the combination in which the cylinder information variable RCAS is 0 is obviously abnormal, it is in a state in which there is no choice but to confirm if there are two or more Camsen inputs. Therefore, in the corresponding region of the cylinder / crank position state map CCHMAP, a binary number 10 (abnormality confirmed)
The status data of is stored.

【0118】そして、上記ステップS801で気筒・クラン
ク位置状態マップCCHMAPから状態データを読込む
と、ステップS802へ進み、エラーレベルECASが2で
ないか否か、すなわち、現在の状態が気筒判別のなされ
ていない不明な状態であるか否かを調べ、ECAS=2
のときには、ステップS803で気筒・クランク位置状態マ
ップCCHMAPから読込んだ状態データのビット0が
0か否か、すなわち確定状態か否かを調べ、確定状態の
ときにはステップS804へ進み、確定状態でなく推定状態
であるときにはルーチンを抜けて確定状態となるまで待
つ。
When the status data is read from the cylinder / crank position status map CCHMAP in step S801, the process proceeds to step S802, and it is determined whether or not the error level ECAS is 2, that is, the current status is not cylinder-determined. Check whether it is in an unknown state, ECAS = 2
If it is, it is checked whether or not bit 0 of the state data read from the cylinder / crank position state map CCHMAP in step S803 is 0, that is, whether it is the confirmed state. If it is the confirmed state, the process proceeds to step S804, and the state is not the confirmed state. When it is in the estimated state, it exits the routine and waits until it becomes the confirmed state.

【0119】一方、上記ステップS802でECAS≠2の
ときにはステップS804へ進んで、推定状態か否かを調
べ、確定状態、推定状態に応じてステップS805以降の処
理あるいはステップS812以降の処理へ進む。また、上記
ステップS803において確定状態でステップS804へ進んだ
ときには、ステップS805以降の処理へ進む。
On the other hand, when ECAS ≠ 2 in step S802, the process proceeds to step S804 to check whether the state is the estimated state or not, and depending on the confirmed state or the estimated state, the process proceeds to step S805 and subsequent steps or step S812 and subsequent steps. If the process proceeds to step S804 in the confirmed state at step S803, the process proceeds to step S805 and subsequent steps.

【0120】まず、ステップS805以降の処理について説
明すると、このステップS805へ進んだときには、正常、
異常に拘らず気筒判別がなされた確定状態であるため、
図24のタイムチャートからもわかるように、今回のク
ラセン割込みはカムパルスが3ヶあるいは2ヶ入力され
た後のBTDC97°の割込みであるため、クランク位
置情報変数CCASを0にする。
First, the processing after step S805 will be described. When the processing proceeds to step S805,
Since it is in the confirmed state that the cylinder discrimination is made regardless of abnormality,
As can be seen from the time chart of FIG. 24, the crank position information variable CCAS is set to 0 because the present classen interrupt is a BTDC 97 ° interrupt after three or two cam pulses are input.

【0121】次いで、ステップS806へ進んでカムセンカ
ウンタが3でないか否かを調べ、カムセンカウンタが3
でないとき、すなわちカムセンカウンタが2のときに
は、#2気筒の点火後であるため、ステップS807で気筒
情報変数RCASを3にしてステップS809へ進み、カム
センカウンタが3のときには、#1気筒の点火後である
ため、ステップS808で気筒情報変数RCASを1にして
ステップS809へ進む。
Next, in step S806, it is checked whether the Camcen counter is 3 or not, and the Camcen counter is 3c.
If it is not, that is, when the CamSen counter is 2, it is after ignition of the # 2 cylinder, so the cylinder information variable RCAS is set to 3 in Step S807 and the process proceeds to Step S809. Since it is after ignition, the cylinder information variable RCAS is set to 1 in step S808, and the flow proceeds to step S809.

【0122】ステップS809では、更新したクランク位置
情報変数CCAS、気筒情報変数RCAS、及び、カム
センカウンタをパラメータとして再び気筒・クランク位
置状態マップCCHMAPから状態データを読込み、こ
の状態データのビット1が1であるか、すなわち異常状
態であるか否かを調べる。
In step S809, the status data is read again from the cylinder / crank position status map CCHMAP using the updated crank position information variable CCAS, cylinder information variable RCAS, and Camsen counter as parameters, and bit 1 of this status data is 1 , That is, whether or not it is in an abnormal state.

【0123】その結果、上記ステップS809において、状
態データのビット1が1で異常状態と判定されるときに
は、クランク位置情報変数CCAS、気筒情報変数RC
ASの更新結果は不安の残る推定であるとしてステップ
S810でエラーレベルECASを1にしてルーチンを抜
け、状態データのビット1が0であり正常状態であると
きには、ステップS811でエラーレベルECASを0とし
てルーチンを抜ける。
As a result, when it is determined in step S809 that the bit 1 of the state data is 1 and the state is abnormal, the crank position information variable CCAS and the cylinder information variable RC
Assuming that the AS update result is an uneasy estimate
In step S810, the error level ECAS is set to 1, and the routine exits. When bit 1 of the status data is 0, indicating a normal state, the error level ECAS is set to 0 in step S811, and the routine exits.

【0124】一方、ステップS812以降の処理では、ステ
ップS812で、現在のクランク位置情報変数CCAS(前
回のクラセン割込みで算出されたクランク位置情報変数
CCAS)が2、すなわち、気筒情報変数RCASの変
化点であるか否かを調べ、CCAS=2のときには、ス
テップS812からステップS813へ進んで、気筒情報変数R
CASを1増加させ、ステップS814でクランク位置情報
変数CCAS=0にしてステップS817へ進む。
On the other hand, in the processing after step S812, the current crank position information variable CCAS (crank position information variable CCAS calculated by the previous Krasen interrupt) is 2 in step S812, that is, the change point of the cylinder information variable RCAS. If CCAS = 2, the process proceeds from step S812 to step S813, and the cylinder information variable R
CAS is incremented by 1, the crank position information variable CCAS = 0 is set in step S814, and the flow proceeds to step S817.

【0125】一方、上記ステップS812で、CCAS≠2
のときには、上記ステップS812からからステップS815へ
進んでカムセンカウンタが0でないか否かを調べ、カム
センカウンタが0でないときには、前述のステップS813
へ分岐し、カムセンカウンタが0のときには、ステップ
S816でクランク位置情報変数CCASを1増加させ、ス
テップS817へ進む。
On the other hand, in the step S812, CCAS ≠ 2
If it is, the process proceeds from step S812 to step S815 to check whether the Camcen counter is not 0. If the Camcen counter is not 0, the above step S813 is executed.
When the cam sen counter is 0,
In S816, the crank position information variable CCAS is incremented by 1, and the process proceeds to step S817.

【0126】ステップS817では、更新したクランク位置
情報変数CCAS、気筒情報変数RCAS、及び、カム
センカウンタをパラメータとして再び気筒・クランク位
置状態マップCCHMAPから状態データを読込んで異
常状態であるか否かを調べ、状態データのビット1が0
であり、正常状態であるときには、そのまま(現在のエ
ラーレベルECAS=0のまま)ルーチンを抜ける。ま
た、上記ステップS817で、状態データのビット1が1で
異常状態のときには、ステップS818へ進み、クランク位
置情報変数CCAS、気筒情報変数RCASの更新結果
は不安の残る推定であるとしてエラーレベルECASを
1にし、ルーチンを抜ける。
In step S817, the status data is read again from the cylinder / crank position status map CCHMAP using the updated crank position information variable CCAS, cylinder information variable RCAS, and Camsen counter as parameters to determine whether or not there is an abnormal status. Check, bit 1 of status data is 0
In the normal state, the routine is exited as it is (the current error level ECAS = 0 remains). If the bit 1 of the status data is 1 and the status is abnormal in step S817, the process proceeds to step S818, and the error level ECAS is set as the estimation result of the crank position information variable CCAS and the cylinder information variable RCAS is an uneasy estimation. Set to 1 and exit the routine.

【0127】前述のクランク位置算出サブルーチンのス
テップS608におけるA/D変換リクエストは、図1のA
/D変換サブルーチン中で参照され、等時間間隔A/D
変換とクランク同期A/D変換とが所定のタイミングで
実行される。以下、図1のフローチャートに従って説明
する。
The A / D conversion request in step S608 of the above crank position calculation subroutine is A in FIG.
Referenced in the A / D conversion subroutine, equal time interval A / D
The conversion and the crank synchronization A / D conversion are executed at a predetermined timing. Hereinafter, a description will be given according to the flowchart of FIG.

【0128】このA/D変換サブルーチンでは、ステッ
プS1000で、第1回目のA/D変換処理であるか否かを
調べ、第1回目の処理であるときには、ステップS1001
で、A/D変換器66に対し、変換順番テーブルADC
_Nの先頭データADC_N[0]で示される入力チャ
ンネルにおけるA/D変換をセットし、ステップS1002
で、変換順番テーブルADC_NのポインタADC_I
(初期値は0)を1増やしてルーチンを抜ける。
In this A / D conversion subroutine, it is checked in step S1000 if it is the first A / D conversion process. If it is the first process, step S1001
Then, the conversion order table ADC is sent to the A / D converter 66.
The A / D conversion in the input channel indicated by the head data ADC_N [0] of _N is set, and step S1002
Then, the pointer ADC_I of the conversion order table ADC_N
(Initial value is 0) Increases 1 and exits the routine.

【0129】上記変換順番テーブルADC_Nは、図2
0に示すように、A/D変換器66の0番〜7番の8チ
ャンネル入力に対し、A/D変換順番をストアしたテー
ブルであり、ポインタADC_Iによって指示されるテ
ーブル内データに従って該当入力チャンネルのA/D変
換が行なわれる。本実施例においては、基本的に、6,
7,1,4,0,2,3,5番の順にA/D変換が行な
われ、例えば、スロットル開度、吸入空気量など変化の
速いものを先として、冷却水温、電圧など比較的変化の
遅いものが後になるように設定し、最後の5番の入力チ
ャンネルをクランク同期入力に設定してある(但し、前
述したように、最後の5番の入力チャンネルはクランク
同期のタイミングによって順番が変わる)。
The conversion order table ADC_N shown in FIG.
As shown in 0, it is a table in which the A / D conversion order is stored for the 8th channel input to the 0th to 7th channels of the A / D converter 66, and the corresponding input channel is stored according to the data in the table indicated by the pointer ADC_I A / D conversion is performed. In this embodiment, basically 6,
A / D conversion is performed in the order of 7, 1, 4, 0, 2, 3, 5 and, for example, the cooling water temperature, the voltage, etc. are relatively changed, with the throttle opening, intake air amount, etc. having the fastest change as the first. The slowest one is set later, and the last 5th input channel is set to the crank sync input (however, as mentioned above, the last 5th input channel is ordered by the crank sync timing. change).

【0130】一方、上記ステップS1000で第1回目の処
理でないときには、上記ステップS1000からステップS10
03へ進んで、後述する読取り及びシステムシフトバッフ
ァSSHBへのストア処理サブルーチンを実行し、前回
のA/D変換データを、A/D変換器66の該当 する
チャンネルから読取り、読取ったデータをシステムシフ
トバッファSSHBへストアする。
On the other hand, when it is not the first time processing in step S1000, the processing from step S1000 to step S10 is performed.
Proceed to 03, execute the read and store processing subroutine to the system shift buffer SSHB, which will be described later, read the previous A / D converted data from the corresponding channel of the A / D converter 66, and shift the read data to the system shift. Store in buffer SSHB.

【0131】上記システムシフトバッファSSHBは、
図22に示すように、8チャンネルの各A/D変換結果
がストアされる先頭オフセットアドレス0,+8,+1
6,+24,+32,+34,+36,+38番の各メ
モリ、及び、4ms毎のクランク同期のA/D変換結果
がストアされる先頭オフセットアドレス−2番地の1ワ
ードのメモリからなり、0.5ms毎に実行される1回
のA/D変換結果が1ワード(2バイト)でストアされ
る。
The system shift buffer SSHB is
As shown in FIG. 22, the head offset addresses 0, +8, +1 in which the respective A / D conversion results of 8 channels are stored
It consists of memories of Nos. 6, +24, +32, +34, +36, and +38, and a 1-word memory at the start offset address -2 where the A / D conversion result of crank synchronization at every 4 ms is stored. One A / D conversion result executed each time is stored in one word (2 bytes).

【0132】先頭オフセットアドレス0番地からは、4
段のシフトメモリとなっており、90°CA毎のA/D
変換結果がストアされ、最新4データ(1回転分)をジ
ョブから参照することができる。また、先頭オフセット
アドレス+32,+34,+36,+38番地は、各1
ワードのメモリであり、なまし処理機能が選択されたと
き、A/D変換結果を加重平均した値がストアされてノ
イズ除去と精度向上を図ることができるようになってお
り、これらのメモリのデータは、低速ジョブで利用でき
る。
4 from the start offset address 0
It is a multi-stage shift memory, and A / D every 90 ° CA.
The conversion result is stored and the latest 4 data (1 rotation) can be referred to from the job. The head offset addresses +32, +34, +36, and +38 are each 1
This is a word memory, and when the smoothing function is selected, a weighted average value of the A / D conversion results is stored to enable noise removal and accuracy improvement. The data is available for slow jobs.

【0133】また、各先頭オフセットアドレス+8,+
16,+24番地からは、各4ワードのメモリであり、
4msジョブで利用するようになっている。これらの各
メモリは、最新のA/D変換結果が先頭から数えて、4
msジョブのオーバーラップカウンタOLCの値だけ後
のワードにストアされ、4msジョブ実行に際し先頭ワ
ードからデータが読出され、ジョブの終了に伴って後の
各ワードのデータが順に先頭方向のワードにシフトされ
るので、先にストアしたデータから読出されるFIFO
バッファとなっている。
Further, each head offset address + 8, +
From addresses 16 and 24, each is a 4-word memory,
It is designed to be used in 4ms jobs. In each of these memories, the latest A / D conversion result is counted from the beginning,
The value of the overlap counter OLC of the ms job is stored in the subsequent word, the data is read from the first word when the 4 ms job is executed, and the data of each subsequent word is sequentially shifted to the word in the first direction as the job ends. FIFO that is read from the previously stored data.
It is a buffer.

【0134】その後、ステップS1003からステップS1004
へ進むと、4ms毎の一連のA/D変換周期を保つため
のループカウンタADC_C(初期値は8)を1減ら
し、ステップS1005で、ループカウンタADC_Cが0
でないか否かを調べ、ADC_C≠0のときには、 ス
テップS1007へジャンプし、ADC_C=0のとき、す
なわち4ms周期の一連のA/D変換が終了したときに
は、ステップS1006で、ポインタADC_I、ループカ
ウンタADC_Cを、それぞれ、初期値である0、8に
してステップS1007へ進む。
Thereafter, steps S1003 to S1004
In step S1005, the loop counter ADC_C (initial value is 8) for keeping a series of A / D conversion cycles every 4 ms is decremented by 1, and the loop counter ADC_C is set to 0 in step S1005.
If ADC_C ≠ 0, the process jumps to step S1007. When ADC_C = 0, that is, when a series of A / D conversions of 4 ms period is completed, in step S1006, pointer ADC_I and loop counter ADC_C are determined. Are respectively set to 0 and 8 which are initial values, and the process proceeds to step S1007.

【0135】ステップS1007では、クラセン同期A/D
変換リクエストがあるか否かを調べる。このクラセン同
期A/D変換リクエストは、クランク角90°毎にクラ
ンク同期A/D変換を指示するためのフラグ的な変数で
あり、0、1の値をとり、クラセン割込みにおけ るク
ランク位置算出サブルーチンにおいて、クランク位置情
報変数S_CCASがS_CCAS≠1のとき、値1に
セットされ、クランク同期A/D変換を指示する。
At step S1007, Classen synchronization A / D
Check if there is a conversion request. This Classen synchronous A / D conversion request is a flag-like variable for instructing the crank synchronous A / D conversion for each 90 ° crank angle, and takes a value of 0 or 1 to calculate the crank position in the Classen interrupt. In the subroutine, when the crank position information variable S_CCAS is S_CCAS ≠ 1, it is set to the value 1 to instruct the crank synchronous A / D conversion.

【0136】すなわち、前述したように、8チャンネル
のA/D変換のうち1チャンネルのA/D変換はクラン
ク角90°毎に行なわれるが、S_CCASが0になっ
たとき(BTDC97°)と、S_CCASが2になっ
たとき(BTDC10°)、クランク同期のA/D変換
リクエストを1にセットし、0.5ms毎のA/D変換
順番に対してクランク角90°毎のA/D変換を割込ま
せるのである。
That is, as described above, the A / D conversion of one channel out of the A / D conversion of eight channels is performed at every crank angle of 90 °, but when S_CCAS becomes 0 (BTDC97 °), When S_CCAS becomes 2 (BTDC 10 °), the crank-synchronized A / D conversion request is set to 1, and the A / D conversion is performed at every 90 ° crank angle for the A / D conversion order at every 0.5 ms. Make it interrupt.

【0137】そして、上記ステップS1007で、クラセン
同期A/D変換リクエストがない場合には、上記ステッ
プS1007からステップS1008へ進んで、ポインタADC_
Iの示す変換順番テーブルADC_N値に対応する該当
チャンネルをセットし、ステップS1009で、ポインタA
DC_Iを1増やしてルーチンを抜ける。一方、上記ス
テップS1007で、クラセン同期A/D変換リクエストが
ある場合には、上記ステップS1007からステップS1010へ
分岐し、クラセン同期A/D変換リクエストを1減らす
と、ステップS1011で、A/D変換器66の5番目のチ
ャンネルであるクランク同期入力チャンネルをセットし
てルーチンを抜ける。
If it is determined in step S1007 that there is no Krasen synchronization A / D conversion request, the flow advances from step S1007 to step S1008 to move the pointer ADC_
The corresponding channel corresponding to the conversion order table ADC_N value indicated by I is set, and the pointer A is set in step S1009.
Increase DC_I by 1 and exit the routine. On the other hand, if there is a classen synchronous A / D conversion request in step S1007, the process branches from step S1007 to step S1010, and the classen synchronous A / D conversion request is decremented by 1, and in step S1011, A / D conversion is performed. The crank synchronization input channel, which is the fifth channel of the device 66, is set and the routine exits.

【0138】すなわち、クラセン同期A/D変換リクエ
ストがなされた場合には、ポインタADC_Iは増やさ
ずに、クランク同期変換を行ない、ループカウンタAD
C_Cによって8チャンネル分の周期を保ちつつ、その
後のA/D変換順番を1つ遅れにするため、クランク同
期A/D変換によって等時間間隔性が損なわれることが
なく、必要なデータを適切なタイミングで得ることがで
きる。
That is, when a Krasen synchronization A / D conversion request is made, crank synchronization conversion is performed without increasing the pointer ADC_I, and the loop counter AD
Since C_C keeps the cycle of 8 channels and delays the subsequent A / D conversion order by 1, the crank-synchronized A / D conversion does not impair the equal time interval property, and the necessary data can be properly converted. Can be obtained at the timing.

【0139】尚、この場合、エンジン回転数3750r
pm以上では、A/D変換の最後の順番の入力が完全に
停止し、7500rpm以上では、最後から2番目の入
力も停止するが、A/D変換の順番が、スロットル開
度、吸入空気量など変化の速いものを先として、冷却水
温、電圧など比較的変化の遅いものが後になるように
し、且つ、最後のA/D変換順番をクランク同期入力に
設定してあるため、特に支障は生じない。
In this case, the engine speed is 3750r.
At pm or higher, the last input of A / D conversion is completely stopped, and at 7500 rpm or higher, the second input from the last is stopped, but the order of A / D conversion is throttle opening, intake air amount. As the cooling water temperature and voltage are changed relatively slowly, the cooling water temperature and voltage are changed later, and the last A / D conversion order is set to the crank synchronization input. Absent.

【0140】次に、上記ステップS1003における読取り
及びSSHBへのストア処理サブルーチンについて図1
3のフローチャートに従って説明する。まず、ステップ
S1100で、ドリームモードへの移行を指示するドリーム
モード変数DRM_ADがゼロであるか否かを調べる。
Next, FIG. 1 shows the read and SSHB store processing subroutine in step S1003.
A description will be given according to the flowchart of No. 3. First, the step
In S1100, it is checked whether or not the dream mode variable DRM_AD that instructs the transition to the dream mode is zero.

【0141】上記ドリームモードは、エンジン系のハー
ドウエアと完全に分離した状態でソフトウエアの実行デ
バッグを行なうためのシミュレーションモードであり、
A/D変換のドリームモードへの移行を指示する上記ド
リームモード変数DRM_ADは、図23に示すよう
に、A/D変換器66の8チャンネル入力に対応して各
1バイトの変数DRM_AD+nが設けられている。
The dream mode is a simulation mode for executing and debugging software while completely separated from the engine hardware.
As shown in FIG. 23, the dream mode variable DRM_AD for instructing the transition of the A / D conversion to the dream mode is provided with a 1-byte variable DRM_AD + n corresponding to the 8-channel input of the A / D converter 66. ing.

【0142】尚、上記ドリームモードには、A/D変換
シミュレーションモードの他、クラセン・カムセンの入
力シミュレーションモードがあり、カムセン・クラセン
のドリームモードへの移行は、バックグランドジョブ中
で調べられる。
The dream mode includes an A / D conversion simulation mode and a Krasen / Kamsen input simulation mode. Transition to the dream mode of Kamsen / Krasen is checked in a background job.

【0143】そして、上記ステップS1100で、DRM_
AD≠0であり、ドリームモード変数DRM_ADにゼ
ロ以外の数値が書き込まれてドリームモードへの移行が
指示されているときには、上記ステップS1100からステ
ップS1101へ進んで、ドリームモード変数DRM_ AD
の値を4倍した擬似的なA/D変換の数値をアキュムレ
ータAにロードし、ステップS1103へ進む。
Then, in step S1100, DRM_
When AD ≠ 0, a value other than zero is written in the dream mode variable DRM_AD, and the transition to the dream mode is instructed, the process proceeds from step S1100 to step S1101, and the dream mode variable DRM_AD is entered.
The value of the pseudo A / D conversion that is four times the value of is loaded into the accumulator A, and the process proceeds to step S1103.

【0144】一方、上記ステップS1100で、DRM_A
D=0のときには、上記ステップS1100からステップS11
02へ進んで、前回A/D変換を行なったチャンネルから
の変換結果を読取ってアキュムレータAにロードする
と、ステップS1103で、前回A/D変換を行なったチャ
ンネルがクラセン同期A/D変換のチャンネルであるか
否かを調べ、クラセン同期A/D変換のチャンネルであ
った場合には、ステップS1114以降の処理へ進み、クラ
セン同期A/D変換のチャンネルでない場合(一定時間
毎のA/D変換チャンネル)には、 ステップS1104以降
の処理へ進む。
On the other hand, in step S1100, DRM_A
When D = 0, the above steps S1100 to S11
Proceed to 02 to read the conversion result from the channel that was previously A / D converted and load it into accumulator A. In step S1103, the channel that was previously A / D converted is the Classen synchronous A / D conversion channel If it is a channel for Classen synchronous A / D conversion, the process proceeds to step S1114 and thereafter, and if it is not a channel for Classen synchronous A / D conversion (A / D conversion channel at fixed time intervals). ), The process proceeds to step S1104 and subsequent steps.

【0145】ステップS1104以降の処理は、等時間A/
D変換結果をシステムシフトバッファSSHBの+8番
地以上にストアする処理であり、ステップS1104で、A
/D変換器66の0〜8番のチャンネルに対応して各変
換結果をストアすべきシステムシフトバッファSSHB
の番地が格納されている図21のSSHBストア番地テ
ーブルADC_Mを参照し、A/D変換結果のストア番
地が32以上であるか否かを調べる。
The processing after step S1104 is the same time A /
This is a process of storing the D conversion result at +8 or more addresses of the system shift buffer SSHB, and at step S1104, A
System shift buffer SSHB for storing each conversion result corresponding to channels 0 to 8 of the / D converter 66
21 in which the address of is stored is referred to, it is checked whether or not the store address of the A / D conversion result is 32 or more by referring to the SSHB store address table ADC_M.

【0146】上記ステップS1104で、A/D変換結果の
ストア番地が32以上ではなく、4mSジョブで利用す
るストア番地+8,+16,+24のFIFOバッファ
であるときには、上記ステップS1104からステップS1105
へ進み、4msジョブのオーバラップカウンタO LC
を3でリミットすると、ステップS1106で、このオーバ
ラップカウンタOLCを2倍してストア番地を加えた番
地、すなわち、ジョブの実行状態に応じて2バイト単位
でシフトしたFIFOバッファの番地に、アキュムレー
タAにロードされたA/D変換結果をストアし、ルーチ
ンを抜ける。
In step S1104, when the store address of the A / D conversion result is not 32 or more, but the FIFO buffer of store address +8, +16, +24 used in the 4 mS job, the steps S1104 to S1105.
Proceed to step 4 ms job overlap counter O LC
Is limited to 3, the accumulator A is added to the address obtained by doubling the overlap counter OLC and adding the store address in step S1106, that is, the address of the FIFO buffer shifted in units of 2 bytes according to the job execution status. Stores the A / D conversion result loaded in, and exits the routine.

【0147】一方、上記ステップS1104で、A/D変換
結果のストア番地が32以上であるときには、上記ステ
ップS1104からステップS1107へ分岐し、A/D変換結果
を加重平均によりなましてストアする機能を使用しない
ことを示すなまし処理キャンセルフラグがあるか 否か
を調べる。
On the other hand, in step S1104, when the store address of the A / D conversion result is 32 or more, the function of branching from step S1104 to step S1107 and memorizing the A / D conversion result by weighted averaging Check whether there is a moderation cancel flag indicating that it is not used.

【0148】そして、なまし処理キャンセルフラグがあ
るときには、上記ステップS1107からステップS1108へ進
んで、A/D変換結果をそのまま該当するストア番地に
ストアしてルーチンを抜け、なまし処理キャンセルフラ
グがないときには、上記ステップS1107からステ ップS1
109へ進んでA/D変換結果を16倍し、ステップS1110
で、2度目以降のなまし処理であるか否かを調べる。
If there is a smoothing process cancel flag, the flow advances from step S1107 to step S1108 to store the A / D conversion result as it is in the corresponding store address and exit the routine, and there is no smoothing process cancel flag. From step S1107 above to step S1
Go to 109 and multiply the A / D conversion result by 16, then step S1110.
Then, it is checked whether or not it is the second round of smoothing processing.

【0149】2度目以降のなまし処理であるときには、
上記ステップS1110からステップS1111へ進んで、今回の
A/D変換結果に対して1/16の加重平均なまし処理
を行ない、ステップS1112で、その結果を該当するスト
ア番地にストアしてルーチンを抜け、2度目以降 のな
まし処理でなく、第1回目の処理であるときには、上記
ステップS1110からステップS1113へ進んで、アキュムレ
ータAにロードされたA/D変換結果を該当するストア
番地に初期値としてストアし、ルーチンを抜ける。
In the case of the second round of smoothing processing,
The procedure advances from step S1110 to step S1111 to perform a 1/16 weighted average smoothing process on the current A / D conversion result, and in step S1112, the result is stored in the corresponding store address and the routine exits. When the process is the first process, not the second and subsequent annealing processes, the process proceeds from step S1110 to step S1113, and the A / D conversion result loaded in the accumulator A is set as the initial value in the corresponding store address. Store and exit the routine.

【0150】一方、前回のA/D変換チャンネルがクラ
セン同期A/D変換のチャンネルであり、上記ステップ
S1103からステップS1114以降の処理へ進んだ場合には、
まず、ステップS1114でポインタADC_Iが8でない
か否か、すなわち、等時間A/D変換の順番に割 込ん
だクラセン同期A/D変換なのか、予め最後に設定され
ているクラセン同期A/D変換なのかを調べる。
On the other hand, the previous A / D conversion channel is the Krasen synchronization A / D conversion channel, and
If the process proceeds from step S1103 to step S1114 and thereafter,
First, in step S1114, it is determined whether or not the pointer ADC_I is 8, that is, whether it is the Classen synchronous A / D conversion interrupted in the order of the isochronous A / D conversion, or the Classen synchronous A / D conversion set in advance at the end. Find out what.

【0151】そして、ADC_I≠8であり、予め設定
された変換順番に対して割込んだクラセン同期A/D変
換であるときには、上記ステップS1114からステップS11
15へ進んで、システムシフトバッファSSHBの+0番
地から+6番地までの内容を順に後のワードにシフトす
ると、ステップS1116で、システムシフトバッファSS
HBの0番地に、アキュムレータAにロードされたA/
D変換結果をストアしてルーチンを抜ける。これによ
り、システムシフトバッファSSHBの0番地からの4
ワードのシフトメモリに、90°CA毎の1回転分のデ
ータがストアされる(図22参照)。
If ADC_I ≠ 8 and the class-synchronous A / D conversion interrupts the preset conversion order, the steps S1114 to S11 are executed.
Proceeding to 15, the contents of the system shift buffer SSHB from addresses +0 to +6 are sequentially shifted to the subsequent words, and in step S1116, the system shift buffer SS
A / loaded in accumulator A at address 0 of HB
Store the D conversion result and exit the routine. As a result, 4 from the address 0 of the system shift buffer SSHB
Data for one rotation every 90 ° CA is stored in the word shift memory (see FIG. 22).

【0152】また、上記ステップS1114で、ADC_I
=8であり、予め最後に設定されているクラセン同期A
/D変換であるときには、上記ステップS1114からステ
ップS1117へ進み、システムシフトバッファSSHBの
−2番地に、アキュムレータAにロードされたA/ D
変換結果を、予め設定されたA/D変換順番上のクラセ
ン同期A/D変換結果としてストアし、ルーチンを抜け
る。
In step S1114, ADC_I
= 8, and the Classen synchronization A set at the end in advance
In the case of A / D conversion, the process proceeds from step S1114 to step S1117, and the A / D loaded in the accumulator A is loaded at address -2 of the system shift buffer SSHB.
The conversion result is stored as the Classen synchronization A / D conversion result in the preset A / D conversion order, and the routine exits.

【0153】以上のようにしてシステムシフトバッファ
SSHBにストアされたA/D変換結果は、各ジョブで
利用される。次に、ジョブ実行サブルーチンについて図
5〜図8のフローチャートに従って説明する。
The A / D conversion result stored in the system shift buffer SSHB as described above is used in each job. Next, the job execution subroutine will be described with reference to the flowcharts of FIGS.

【0154】まず、ステップS500で、ジョブフラグJB
_FLGを参照して実行すべきジョブがクラセンジョブ
でないか否かを調べ、クラセンジョブでないときには、
ラベルALJ10へ分岐し、クラセンジョブのときに
は、ステップS501へ進んで、気筒判別がついているか否
かを調べる。
First, in step S500, the job flag JB
By referring to _FLG, it is checked whether the job to be executed is not a class job. If it is not a class job,
The processing branches to label ALJ10, and if it is a class job, the process proceeds to step S501 to check whether or not cylinder discrimination is provided.

【0155】そして、気筒判別がついていないときに
は、そのままルーチンを抜けてジョブを実行せず、気筒
判別がついているとき、上記ステップS501からステップ
S502へ進んで、オーバーラップカウンタOLCの値を参
照して多重待ち状態であるか否かを調べる。
When the cylinder is not discriminated, the routine is not executed and the job is not executed. When the cylinder is discriminated, the steps from the step S501
In step S502, the value of the overlap counter OLC is referenced to check whether or not the multiplex wait state is set.

【0156】上記ステップS502では、多重待ち状態でな
いとき、ステップS503へ進んで、クラセン割込み毎に算
出されるシステム変数S_ACAS(クランク総合位置
変数)をユーザー変数ACASとし、一方、多重待ち状
態のときには、ステップS504へ分岐し、ユーザー変数A
CASを一つ増やして12で割った剰余をとって新たな
ユーザー変数ACASとし、このユーザー変数ACAS
を0,1,2,…,11,0,1,…とソフトウエア的
に更新してゆく。
In step S502, when the multiplex waiting state is not set, the process proceeds to step S503, and the system variable S_ACAS (crank total position variable) calculated for each classen interrupt is set as the user variable ACAS, while in the multiplex waiting state, The process branches to step S504 and the user variable A
The new user variable ACAS is obtained by taking the remainder obtained by increasing CAS by 1 and dividing by 12, and this user variable ACAS
, 0, 1, 2, ..., 11, 0, 1 ,.

【0157】すなわち、クラセンジョブ及び低優先クラ
センジョブは、自身または優先度の高いジョブに邪魔さ
れて遅れることがあるが、クラセン割込みは正確にクラ
ンク角センサ信号に同期して実行され、システム変数S
_ACASはジョブの遅れに関係なく更新される。
That is, the classen job and the low-priority classen job may be delayed by being disturbed by the job itself or a job with a high priority, but the classen interrupt is executed exactly in synchronization with the crank angle sensor signal, and the system variable S
_ACAS is updated regardless of job delay.

【0158】従って、ジョブ中でシステム変数S_AC
ASを参照してクランク位置を知り、このクランク位置
に応じた仕事を行なおうとしても、自身が他のジョブに
邪魔されて遅れた場合には、自身の仕事に対応したクラ
ンク位置を知ることができなくなる。このため、クラセ
ンジョブ及び低優先クラセンジョブ中では、多重待ち状
態でないときにOS用のシステム変数S_ACASをユ
ーザー用変数ACASとして取込み、このユーザー変数
ACASをジョブ実行毎に更新して多重要求の場合にも
クランク位置に対応した適正な処理がなされるようにす
るのである。
Therefore, the system variable S_AC is set in the job.
Knowing the crank position by referring to AS, and trying to perform work according to this crank position, but if you are delayed because of being disturbed by another job, know the crank position that corresponds to your work Can not be. Therefore, in the class job and the low-priority class job, the system variable S_ACAS for the OS is taken in as the user variable ACAS when not in the multiplex waiting state, and this user variable ACAS is updated each time the job is executed, and in the case of multiple request. Also, the appropriate processing corresponding to the crank position is performed.

【0159】その後、上記ステップS503あるいは上記ス
テップS504からステップS505へ進み、ジョブのワークエ
リアを設定すると、ステップS506で、レベルゼロの割込
みを許可し、ステップS507で、クラセンジョブのセクシ
ョンに移る。そして、このクラセンジョブセクションに
リンクされた処理を実行し、ステップS508で、割込みを
禁止してルーチンを抜ける。
Thereafter, the process proceeds from step S503 or step S504 to step S505 to set the work area of the job. In step S506, the level 0 interrupt is permitted. In step S507, the classen job section is entered. Then, the processing linked to this class job section is executed, and in step S508, the interrupt is prohibited and the routine exits.

【0160】次に、ステップS500で、これから実行すべ
きジョブがクラセンジョブでないときには、ラベルAL
J10のステップS510で、2msジョブでないか否か調
べ、2msジョブのとき、ステップS511で、ジョブのワ
ークエリアを設定すると、ステップS512で、レベルゼロ
の割込みを許可し、ステップS513で、2msジョブのセ
クションに移る。そして、このセクションにリンクされ
ているジョブ本体(ユーザー側の制御ストラテジーに基
づくルーチン、あるいは、OS側で用意したサービスル
ーチン)を実行し、ステップS514で、割込みを禁止して
ルーチンを抜ける。
Next, in step S500, when the job to be executed is not the class job, the label AL
In step S510 of J10, it is checked whether or not the job is a 2 ms job. When the job is a 2 ms job, the work area of the job is set in step S511. In step S512, the level 0 interrupt is permitted, and in step S513, the 2 ms job Go to section. Then, the job main body (a routine based on the control strategy on the user side or a service routine prepared on the OS side) linked to this section is executed, and in step S514, interrupt is prohibited and the routine exits.

【0161】一方、上記ステップS510で、実行すべきジ
ョブが2msジョブでないときには、ステップS510から
ステップS520へ分岐し、実行すべきジョブが4msジョ
ブか否かを調べる。そして、4msジョブでないときに
は、ラベルALJ30へ分岐し、4msジョブのときに
は、ステップS521で、ジョブのワークエリアを設定する
と、ステップS522へ進む。
On the other hand, if the job to be executed is not a 2 ms job in step S510, the process branches from step S510 to step S520 to check whether or not the job to be executed is a 4 ms job. If it is not a 4 ms job, the process branches to label ALJ30. If it is a 4 ms job, the work area of the job is set in step S521, and the process proceeds to step S522.

【0162】ステップS522では、レベルゼロの割込みを
許可し、次いで、ステップS523へ進むと、スイッチ入力
を読み込み、ステップS524で、4msジョブのセクショ
ンに移って、リンクされているジョブ本体を実行する。
その後、4msジョブのセクションから抜けると、ステ
ップS525で、割込みを禁止し、ステップS526へ進んで、
システムシフトバッファSSHBをシフトしてルーチン
を抜ける。
In step S522, the interrupt of level zero is permitted, and then in step S523, the switch input is read, and in step S524, the section of the 4 ms job is executed and the linked job main body is executed.
After that, when the section of the 4 ms job is exited, the interrupt is prohibited in step S525, the process proceeds to step S526,
The system shift buffer SSHB is shifted to exit the routine.

【0163】この4msジョブは、システムシフトバッ
ファSSHBを介してA/D変換データを受け取るA/
D変換利用ジョブであるが、A/D変換が0.5ms毎
の定期割込みにより4ms周期で正確に行なわれるのに
対し、4msジョブは優先度の高いジョブに邪魔されて
遅れることがある。
This 4 ms job receives A / D conversion data via the system shift buffer SSHB.
Although it is a D conversion use job, A / D conversion is accurately performed in a 4 ms cycle by a periodic interrupt every 0.5 ms, whereas a 4 ms job may be delayed by being interrupted by a high priority job.

【0164】従って、上記ステップS524の4msジョブ
実行に際して、FIFOバッファである+8〜,+16
〜,+24〜番地のシステムシフトバッファSSHBか
らオーバーラップカウンタOLCの値に応じたアドレ
ス、すなわち、割込みの発生順にストアされたA/D変
換結果の中で、次の4msジョブで用いるA/D変換結
果が先頭に来るように、4msジョブの終了後、上記ス
テップS526で、FIFOバッファのデータを順に先頭方
向へシフトするのである。
Therefore, when executing the 4 ms job in step S524, the FIFO buffers +8 to +16 are used.
From the system shift buffer SSHB of addresses ~, +24 to, the address corresponding to the value of the overlap counter OLC, that is, the A / D conversion used in the next 4 ms job among the A / D conversion results stored in the interrupt generation order. After the 4 ms job is finished, the data in the FIFO buffer is sequentially shifted toward the beginning so that the result comes to the beginning at the step S526.

【0165】これにより、4msジョブが多重割込みの
状態になった場合でも、実行段階でシステムシフトバッ
ファSSHBを介して適正なA/D変換結果を受取るこ
とができ、等時間間隔処理の処理結果に矛盾を生じるこ
ともなく、正確な制御を実現することができる。
As a result, even when the 4 ms job is in the multiple interrupt state, the proper A / D conversion result can be received via the system shift buffer SSHB at the execution stage, and the processing result of the equal time interval processing can be obtained. Accurate control can be realized without causing contradiction.

【0166】一方、上記ステップS520で、実行すべきジ
ョブが4msジョブでなく、ラベルALJ30へ分岐し
たときには、ステップS530で、実行すべきジョブが10
msジョブか否かを調べ、10msジョブのとき、ステ
ップS531で、ジョブのワークエリアを設定し、ステップ
S532で、レベルゼロの割込みを許可すると、ステップS5
33で、10msジョブのセクションに移って、ジョブ本
体を実行し、ステップS534で割込みを禁止してルーチン
を抜ける。
On the other hand, when the job to be executed is not the 4 ms job in step S520 and the processing branches to the label ALJ30, the number of jobs to be executed is 10 in step S530.
It is checked whether the job is ms job or not, and if it is 10 ms job, the work area of the job is set in step S531,
If the level 0 interrupt is enabled in S532, step S5
At 33, the section moves to the 10 ms job section, the job main body is executed, and at step S534, interruption is prohibited and the routine exits.

【0167】尚、上記10msジョブのセクションに
は、半回転時間からエンジン回転数を算出するサービス
ルーチン、前述した点火スケジュールを作成するサービ
スルーチンなどがOS側で用意されている。
In the 10 ms job section, a service routine for calculating the engine speed from the half rotation time, a service routine for creating the above-mentioned ignition schedule, etc. are prepared on the OS side.

【0168】また、上記ステップS530で、実行すべきジ
ョブが10msジョブでないときには、上記ステップS5
30からステップS540へ分岐し、実行すべきジョブが低優
先クラセンジョブであるか否かを調べる。そして、低優
先クラセンジョブでないときには、上記ステップS540か
らラベルALJ50へ分岐し、実行すべきジョブが低優
先クラセンジョブのときは、上記ステップS540からステ
ップS541へ進んで、現在の状態が多重待ち状態であるか
否かを調べる。
If it is determined in step S530 that the job to be executed is not a 10 ms job, then step S5 is executed.
The process branches from 30 to step S540 to check whether the job to be executed is a low priority class job. If the job is not the low priority class job, the process branches from step S540 to the label ALJ50. If the job to be executed is the low priority class job, the process proceeds from step S540 to step S541, and the current state is the multiplex waiting state. Check if there is.

【0169】そして、現在の状態が多重待ち状態でない
ときには、上記ステップS541からステップS542へ進ん
で、システム変数S_ACAS(クランク総合位置変
数)をユーザー変数ACASとしてステップS544へ進
み、多重待ち状態のときには、上記ステップS541からス
テップS543へ分岐し、ユーザー変数ACASを一つ増や
して12で割った剰余をとった後、ステップS544へ進
む。
When the current state is not the multiplex wait state, the process proceeds from step S541 to step S542, the system variable S_ACAS (crank total position variable) is set as the user variable ACAS, and the process proceeds to step S544. After branching from step S541 to step S543 and incrementing the user variable ACAS by 1 to obtain the remainder, the process proceeds to step S544.

【0170】ステップS544では、ジョブのワークエリア
を設定し、ステップS545で、レベルゼロの割込みを許可
すると、ステップS546で、低優先クラセンジョブのセク
ションに移り、ジョブ本体を実行した後、ステップS547
で割込みを禁止し、ルーチンを抜ける。
In step S544, the work area of the job is set, and in step S545, when the level 0 interrupt is permitted, in step S546, the section moves to the low priority class job, the job body is executed, and then step S547.
Disable the interrupt and exit the routine.

【0171】さらに、ラベルALJ50では、ステップ
S550で実行すべきジョブが50msジョブであるか否か
を調べ、50msジョブのときには、ステップS551へ進
んでジョブのワークエリアを設定し、ステップS552へ進
む。
Further, in the label ALJ50, the step
In S550, it is checked whether or not the job to be executed is a 50 ms job. If the job is a 50 ms job, the process proceeds to step S551 to set the work area of the job, and the process proceeds to step S552.

【0172】ステップS552では、レベルゼロの割込みを
許可すると、ステップS553で、50msジョブのセクシ
ョンに移り、OS側で用意したエンスト処理ルーチン、
気筒別の点火時期リタードルーチン、燃料噴射開始時期
設定ルーチンなどを実行し、また、ユーザ側の制御スト
ラテジーに基づくルーチンを実行する。そして、ジョブ
の終了後、ステップS554で割込みを禁止し、ルーチンを
抜ける。
If the level 0 interrupt is permitted in step S552, the process moves to the 50 ms job section in step S553, and the stalling processing routine prepared on the OS side,
The ignition timing retard routine for each cylinder, the fuel injection start timing setting routine, etc. are executed, and the routine based on the control strategy on the user side is executed. After the job is completed, the interrupt is prohibited in step S554, and the routine is exited.

【0173】一方、上記ステップS550で実行すべきジョ
ブが50msジョブではないときには、上記ステップS5
50からステップS560へ分岐し、ジョブのワークエリアを
設定すると、ステップS561で、レベルゼロの割込みを許
可し、ステップS562へ進んで、250msジョブのセク
ション領域へ移行し、ジョブ本体を実行後、ステップS5
63で割込みを禁止してルーチンを抜ける。
On the other hand, if the job to be executed in step S550 is not a 50 ms job, then step S5
After branching from step 50 to step S560 and setting the work area of the job, in step S561 the level 0 interrupt is permitted, the process proceeds to step S562, the section area of the 250 ms job is entered, the job body is executed, and then step S5
Disable interrupt at 63 and exit the routine.

【0174】[0174]

【発明の効果】以上説明したように本発明によれば、ア
ナログ/デジタル変換器における複数の入力チャンネル
の変換順番を、設定時間内で一定時間毎に変換を行なう
等時間間隔アナログ/デジタル変換に対応するチャンネ
ルから始めて、エンジンの所定クランク位置で変換を行
なうクランク同期アナログ/デジタル変換に対応するチ
ャンネルが最後となるよう予め設定しておき、設定時間
内で、等時間間隔アナログ/デジタル変換に対応するチ
ャンネルでの変換が全て終了する前にクランク同期アナ
ログ/デジタル変換の実行タイミングとなった場合に
は、対応するチャンネルでクランク同期アナログ/デジ
タル変換を実行し、以後の等時間間隔アナログ/デジタ
ル変換に対応するチャンネルの変換順番を予め設定した
変換順番に対して1つ遅れとして設定時間内におけるア
ナログ/デジタル変換の実行回数を変えないようにする
ため、一定周期で実行すべきアナログ/デジタル変換の
等時間間隔性を維持しつつ、非定周期で発生するクラン
ク同期のアナログ/デジタル変換を実行することがで
き、必要なデータが適切なタイミングで得られ、制御性
を向上することができるなど優れた効果が得られる。
As described above, according to the present invention, the conversion order of a plurality of input channels in the analog / digital converter is converted into an equal time interval analog / digital conversion in which the conversion is performed at regular intervals within a set time. The channel corresponding to crank-synchronized analog / digital conversion that performs conversion at a predetermined crank position of the engine is set in advance so that it starts at the corresponding channel, and corresponds to analog / digital conversion at equal time intervals within the set time. If the timing of crank-synchronized analog / digital conversion is reached before the conversion on all channels is completed, the crank-synchronized analog / digital conversion is performed on the corresponding channel, and the analog / digital conversion is performed at equal time intervals thereafter. 1 for the conversion order of the channel corresponding to In order not to change the number of analog / digital conversion executions within a set time as a delay, the crank synchronization of non-constant cycle is performed while maintaining the equal time interval property of analog / digital conversion that should be executed in a constant cycle. The analog / digital conversion can be executed, necessary data can be obtained at an appropriate timing, and the controllability can be improved.

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

【図1】A/D変換サブルーチンのフローチャートFIG. 1 is a flowchart of an A / D conversion subroutine.

【図2】0.5ms毎の定期割込み処理のフローチャー
FIG. 2 is a flowchart of periodic interrupt processing every 0.5 ms.

【図3】クラセン割込み処理のフローチャートFIG. 3 is a flowchart of classen interrupt processing.

【図4】ジョブ優先処理のフローチャートFIG. 4 is a flowchart of job priority processing.

【図5】ジョブ実行サブルーチンの部分フローチャート
FIG. 5 is a partial flowchart 1 of a job execution subroutine.

【図6】ジョブ実行サブルーチンの部分フローチャート
FIG. 6 is a partial flowchart 2 of a job execution subroutine.

【図7】ジョブ実行サブルーチンの部分フローチャート
FIG. 7 is a partial flowchart 3 of a job execution subroutine.

【図8】ジョブ実行サブルーチンの部分フローチャート
FIG. 8 is a partial flowchart 4 of a job execution subroutine.

【図9】クランク位置算出サブルーチンのフローチャー
FIG. 9 is a flowchart of a crank position calculation subroutine.

【図10】半回転時間推定サブルーチンのフローチャー
FIG. 10 is a flowchart of a half rotation time estimation subroutine.

【図11】CCAS・RCAS判別サブルーチンのフロ
ーチャート
FIG. 11 is a flowchart of a CCAS / RCAS discrimination subroutine.

【図12】クラセンタイマのオーバーフロー割込み処理
のフローチャート
FIG. 12: Flowchart of Classen timer overflow interrupt processing

【図13】読取り及びSSHBへのストア処理サブルー
チンのフローチャート
FIG. 13 is a flowchart of a read and store process subroutine to SSHB.

【図14】ジョブの実行状態を示す説明図FIG. 14 is an explanatory diagram showing a job execution state.

【図15】ジョブフラグの説明図FIG. 15 is an explanatory diagram of a job flag.

【図16】クランク位置変数の説明図FIG. 16 is an explanatory diagram of crank position variables.

【図17】ジョブ実行中フラグとオーバーラップカウン
タの変化を示す説明図
FIG. 17 is an explanatory diagram showing changes in a job execution flag and an overlap counter.

【図18】クラセン間隔テーブルの説明図FIG. 18 is an explanatory diagram of a classen interval table.

【図19】気筒・クランク位置状態マップの説明図FIG. 19 is an explanatory diagram of a cylinder / crank position state map.

【図20】変換順番テーブルの説明図FIG. 20 is an explanatory diagram of a conversion order table.

【図21】SSHBストア番地テーブルの説明図FIG. 21 is an explanatory diagram of an SSHB store address table.

【図22】システムシフトバッファの説明図FIG. 22 is an explanatory diagram of a system shift buffer.

【図23】ドリームモード変数の説明図FIG. 23 is an explanatory diagram of dream mode variables.

【図24】クランク位置とエンジンの行程を示すタイム
チャート
FIG. 24 is a time chart showing a crank position and an engine stroke.

【図25】エンジン系の概略構成図FIG. 25 is a schematic configuration diagram of an engine system.

【図26】クランクロータとクランク角センサの正面図FIG. 26 is a front view of a crank rotor and a crank angle sensor.

【図27】カムロータとカム角センサの正面図FIG. 27 is a front view of a cam rotor and a cam angle sensor.

【図28】電子制御系の回路構成図FIG. 28 is a circuit configuration diagram of an electronic control system.

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

50 ECU 66 アナログ/デジタル変換器 ADC_N 変換順番テーブル 50 ECU 66 analog / digital converter ADC_N conversion order table

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】 複数の入力チャンネルを有するアナログ
/デジタル変換器のチャンネルを順に駆動し、設定時間
毎に設定回数のアナログ/デジタル変換を実行するアナ
ログ/デジタル変換方法であって、 各チャンネルの変換順番を、上記設定時間内で一定時間
毎に変換を行なう等時間間隔アナログ/デジタル変換に
対応するチャンネルから始めて、エンジンの所定クラン
ク位置で変換を行なうクランク同期アナログ/デジタル
変換に対応するチャンネルが最後となるよう予め設定
し、 上記設定時間内で、上記等時間間隔アナログ/デジタル
変換に対応するチャンネルでの変換が全て終了する前に
上記クランク同期アナログ/デジタル変換の実行タイミ
ングとなった場合には、対応するチャンネルで上記クラ
ンク同期アナログ/デジタル変換を実行し、以後の上記
等時間間隔アナログ/デジタル変換に対応するチャンネ
ルの変換順番を予め設定した変換順番に対して1つ遅れ
とすることを特徴とするアナログ/デジタル変換方法。
1. An analog / digital conversion method in which channels of an analog / digital converter having a plurality of input channels are sequentially driven, and analog / digital conversion is performed a set number of times at each set time, the conversion of each channel. The order starts from the channel corresponding to the equal time interval analog / digital conversion which performs conversion at regular intervals within the above set time, and the last channel corresponding to the crank synchronous analog / digital conversion which performs conversion at a predetermined crank position of the engine. If the execution timing of the crank-synchronized analog / digital conversion comes before the conversion on all channels corresponding to the equal time interval analog / digital conversion is completed within the set time, , The above-mentioned crank sync analog / digital conversion on the corresponding channel Line, and an analog / digital conversion method which is characterized in that one delay and the converted order set in advance the conversion sequence of channels corresponding to the subsequent the isochronous analog / digital converter.
JP3097093A 1993-02-19 1993-02-19 Analog/digital conversion method Pending JPH06249053A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP3097093A JPH06249053A (en) 1993-02-19 1993-02-19 Analog/digital conversion method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP3097093A JPH06249053A (en) 1993-02-19 1993-02-19 Analog/digital conversion method

Publications (1)

Publication Number Publication Date
JPH06249053A true JPH06249053A (en) 1994-09-06

Family

ID=12318531

Family Applications (1)

Application Number Title Priority Date Filing Date
JP3097093A Pending JPH06249053A (en) 1993-02-19 1993-02-19 Analog/digital conversion method

Country Status (1)

Country Link
JP (1) JPH06249053A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011169268A (en) * 2010-02-19 2011-09-01 Toyota Motor Corp Device for control of internal combustion engine

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011169268A (en) * 2010-02-19 2011-09-01 Toyota Motor Corp Device for control of internal combustion engine

Similar Documents

Publication Publication Date Title
JP3191676B2 (en) Ignition timing control device for internal combustion engine
JP3455243B2 (en) How to use analog / digital conversion results
JPH06249053A (en) Analog/digital conversion method
JP3337149B2 (en) Engine crank position determination method
US4690122A (en) Ignition control system for internal combustion engines
JP3645576B2 (en) Calculation method of engine rotation time
JP3324818B2 (en) How to use engine crank position information
JPH06231004A (en) Simulating method for analog/digital conversion
JP3530549B2 (en) Fuel injection control method for multi-cylinder engine
JP3555689B2 (en) Fuel injection control method for multi-cylinder engine
JPH06257500A (en) Grasping method for engine operation condition
JP3294366B2 (en) Method for discriminating energization state of ignition coil in engine ignition control
JPH06257501A (en) Engine half rotation time estimating method
JP3294365B2 (en) Engine ignition control method
JP3331237B2 (en) Injection start section setting method for each cylinder of a multi-cylinder engine
JPH06257502A (en) Calculation of engine speed
JP3530551B2 (en) Fuel injection control method for multi-cylinder engine
JPH06272650A (en) Processing-delay elimination method in ignition controlling for engine
JP3442806B2 (en) Job priority processing method
JP3617847B2 (en) How to integrate jobs
JPH07103052A (en) Fuel injection control method for multicylinder engine
JPH0719100A (en) Method for setting injection starting internal for each cylinder of multi-cylinder engine
JPH06272651A (en) Current-carrying sequence setting method in ignition control for engine
JP3530550B2 (en) Fuel injection control method for multi-cylinder engine
JPH06249054A (en) Method to read switch input data in vehicle control computer