JPH0447426A - Controller with watch dog timer - Google Patents

Controller with watch dog timer

Info

Publication number
JPH0447426A
JPH0447426A JP2154434A JP15443490A JPH0447426A JP H0447426 A JPH0447426 A JP H0447426A JP 2154434 A JP2154434 A JP 2154434A JP 15443490 A JP15443490 A JP 15443490A JP H0447426 A JPH0447426 A JP H0447426A
Authority
JP
Japan
Prior art keywords
watchdog timer
timer
control device
time
signal
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
JP2154434A
Other languages
Japanese (ja)
Inventor
Takanori Fujimoto
藤本 高徳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP2154434A priority Critical patent/JPH0447426A/en
Publication of JPH0447426A publication Critical patent/JPH0447426A/en
Pending legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

PURPOSE:To shorten the time required for returning to a normal operation even if a microcomputer runs away due to a noise, etc. by setting the data to be set to watch dog timer in accordance with an execution time of a program. CONSTITUTION:The controller is configured so that a value of a W/D timer Tw can be varied in accordance with the speed of revolution Ne of an engine or a load condition of the engine by considering a fact that the processing time of a CPU 1 increases, when the speed of revolution Ne of the engine increases and an interrupting signal from a crank angle sensor 27 arrives frequently, and when a load of the engine increases, and it can be released within a proper time at the time of runaway of the CPU 1. In such a way, by setting the data to be set to a watch dog timer in accordance with an execution time of a program, even if a microcomputer runs away due to an external noise, etc., it is returned to a normal operation within a proper time.

Description

【発明の詳細な説明】 [産業上の利用分野] 本発明は、マイクロコンピュータのプログラムの実行が
異常状態になったときにこのマイクロコンピュータをリ
セットして再スタートさせるつオツチドッグタイマー付
制御装置に関するものである。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a control device with a dog-dog timer that resets and restarts a microcomputer when the program execution of the microcomputer becomes abnormal. It is something.

[従来の技術] 従来のこの種のウォッチドッグタイマー付制御装置を内
燃機関の制御に適用した例に関しては、例えば特公昭6
C)−43536号公報に開示されているものがある。
[Prior Art] Regarding an example in which a conventional control device with a watchdog timer of this kind is applied to control of an internal combustion engine, for example,
There is one disclosed in Japanese Patent No. C)-43536.

すなわち、これは、マイクロコンピュータが正常動作を
しているときに出力される第1の信号が所定時間以上継
続して出力されない場合、つまりウォッチドッグタイマ
ーが所定時間以上経過することにより、異常の発生と判
断され、マイクロコンピュータをリセットする信号を第
1の信号が出力されるまで繰り返して与えるようにして
いる。
In other words, this means that if the first signal that is output when the microcomputer is operating normally is not output for a predetermined period of time or more, that is, if the watchdog timer elapses for a predetermined period of time or more, an abnormality occurs. It is determined that the microcomputer is reset, and the signal for resetting the microcomputer is repeatedly applied until the first signal is output.

[発明が解決しようとする課題] 一般に、内燃機関を制御するプログラムの実行時間は、
エンジン回転数や負荷等の運転条件によって異なるもの
である。従来のウォッチドッグタイマー付制御装置は、
ウォッチドッグタイマーの値がプログラムの実行時間の
最大値よりも太きめの値に固定して設定されているため
に、−旦外来ノイズ等によってマイクロコンピュータが
暴走してから正常動作に復帰するまでの時間が長くなり
、このため、エンジンが動作中で運転状態にある場合は
、エンジンが停止するという問題があった。
[Problem to be solved by the invention] Generally, the execution time of a program that controls an internal combustion engine is
It varies depending on operating conditions such as engine speed and load. The conventional control device with watchdog timer is
Since the value of the watchdog timer is fixed to a value larger than the maximum program execution time, the time it takes for the microcomputer to return to normal operation after the microcomputer goes out of control due to external noise, etc. This takes a long time, and as a result, if the engine is running and in operation, there is a problem that the engine will stop.

[課題を解決するための手段] このような課題を解決するために、本発明に係るウォッ
チドッグタイマー付制御装置は、ウォッチドッグタイマ
ーにセットされるデータをプログラムの実行時間に応じ
て設定するようにしたものである。
[Means for Solving the Problems] In order to solve such problems, a control device with a watchdog timer according to the present invention sets data to be set in the watchdog timer according to the execution time of a program. This is what I did.

また、ウォッチドッグタイマーへは内燃機関の回転数に
応じたデータをセットするようにしたものである。
Further, the watchdog timer is set with data corresponding to the rotational speed of the internal combustion engine.

また、ウォッチドッグタイマーへは内燃機関の負荷条件
に応じたデータをセットするようにしたものである。
Further, the watchdog timer is set with data corresponding to the load conditions of the internal combustion engine.

[作用] プログラムの実行時間が増大すると、これに応じたデー
タがウオッチドッグタイマーヘセットされる。
[Operation] When the program execution time increases, corresponding data is set in the watchdog timer.

また、内燃機関の回転数が増大すると、これに応じたデ
ータがウオッチドッグタイマーヘセットされる。
Further, when the rotational speed of the internal combustion engine increases, data corresponding to this increase is set in the watchdog timer.

また、内燃機関の負荷が増大すると、これに応じたデー
タがウオッチドッグタイマーヘセットされる。
Furthermore, when the load on the internal combustion engine increases, data corresponding to this is set in the watchdog timer.

[実施例] 次に、本発明について図面を参照して説明する。[Example] Next, the present invention will be explained with reference to the drawings.

第1図は本発明に係るウォッチドッグタイマー付制御装
置の一実施例を示すブロック図である。
FIG. 1 is a block diagram showing an embodiment of a control device with a watchdog timer according to the present invention.

同図において、1はマイクロコンピュータ(以下、CP
U)、2はウォッチドッグタイマー回路である。そして
、ウォッチドッグタイマー回路2は次のように構成され
ている。すなわち、3は微分回路、4〜6はコンパレー
タ、10はROM、11はRAM、Ql、Q2はトラン
ジスタ、DIはダイオード、E1〜E3はそれぞれV1
〜■3の電圧を発生する電源、C1,C2はコンデンサ
、R1−R7は抵抗である。
In the figure, 1 is a microcomputer (hereinafter referred to as CP).
U), 2 is a watchdog timer circuit. The watchdog timer circuit 2 is configured as follows. That is, 3 is a differential circuit, 4 to 6 are comparators, 10 is a ROM, 11 is a RAM, Ql and Q2 are transistors, DI is a diode, and E1 to E3 are each V1.
-■ A power supply that generates a voltage of 3, C1 and C2 are capacitors, and R1-R7 are resistors.

次に、第2図は、このウォッチドッグタイマー回路2の
各部の信号のタイミングを示すタイミングチャートであ
る。同図に基づきウオッチド・リグタイマー回路の動作
を説明する。まず、(a>図に示すようなタイミングで
電源VCが立ち上がると、CPUIに電源VCが供給さ
れるとともに、CPUIはリセットされる。一方、この
とき、コンパレータ6の一入力端子への入力信号Aは、
(b)図に示すように次第に上昇する。そして、この入
力信号Aによる電位が+入力端子の電源E、による電位
V工よりも高くなったときに、このコンパレータ6の出
力信号Bは、(c)図に示すように、r L Jレベル
に反転する。
Next, FIG. 2 is a timing chart showing the timing of signals of each part of this watchdog timer circuit 2. The operation of the watched rig timer circuit will be explained based on the figure. First, (a> When the power supply VC rises at the timing shown in the figure, the power supply VC is supplied to the CPUI and the CPUI is reset. At this time, the input signal A to one input terminal of the comparator 6 teeth,
(b) Gradually rises as shown in the figure. Then, when the potential due to this input signal A becomes higher than the potential V due to the power supply E of the + input terminal, the output signal B of the comparator 6 becomes r L J level as shown in figure (c). to be reversed.

そして、このときこのコンパレータ6の出力と抵抗R7
を介して接続されるトランジスタQ2のベースに送出さ
れる信号Gは、(i)図に示されるような波形となり、
従って、トランジスタQ2のコレクタからの出力信号R
3T (リセット信号)は、(j>図に示すように「L
」レベルからrH,レベルに変化し、CPUIはこのと
きリセットが解除され処理の実行を開始する。
At this time, the output of this comparator 6 and the resistor R7
The signal G sent to the base of the transistor Q2 connected through (i) has a waveform as shown in the figure,
Therefore, the output signal R from the collector of transistor Q2
3T (reset signal) is (j>L as shown in the figure)
'' level to rH level, and at this time, the CPUI is released from reset and starts executing the process.

こうして、CPUが処理を開始すると(d)図に示すよ
うなタイミングでウォッチドッグ信号(W/D信号)を
定期的に交互に反転出力して微分回路3に送出し、この
結果、微分回路3からは(e)図に示すように、W/D
信号の立ち上がりおよび立ち下がりの双方のタイミング
で出力信号Cが生成される。この出力信号Cは抵抗R1
を介してトランジスタQ1のベースに送出され、この結
果、トランジスタQ1のコレクタ出力信号りは(f)図
に示すようなものとなる。すなわち、常時は、コンデン
サC1が電源VCにより充電され、微分回路3からの出
力信号Cの到来によりトランジスタQ1がオンして放電
されるような波形となる。
In this way, when the CPU starts processing, the watchdog signal (W/D signal) is periodically and alternately inverted and outputted to the differentiating circuit 3 at the timing shown in FIG. From (e) as shown in the figure, W/D
The output signal C is generated at both the rising and falling timings of the signal. This output signal C is resistor R1
As a result, the collector output signal of transistor Q1 becomes as shown in FIG. That is, the waveform is such that the capacitor C1 is normally charged by the power supply VC, and when the output signal C from the differentiating circuit 3 arrives, the transistor Q1 is turned on and discharged.

こうして、CPUIが正常動作を行っている間は、定期
的にW/D信号が送出されているので、出力信号りが送
出されるコンパレータ4の十入力端子の電位は、−入力
端子の電源E2による電位V2よりも低い電位となって
いるが、CPUIが外来ノイズ等で暴走したときには、
W/D信号が送出されなくなってコンデンサC1への充
電状態が続行し、この結果、(f)図に示すように、コ
ンパレータ4の十入力端子の電位は、−入力端子の電位
V2よりも高い電位となり、このコンパレータ4の出力
からは、(g>図に示されるようなパルス状の出力信号
Eが発生する。そして、この信号Eが抵抗R4を介して
トランジスタQ2のベースに送出され、この結果、リセ
ット信号RSTがCPUIに送出されCPUIがリセッ
トされる。
In this way, while the CPU is operating normally, the W/D signal is sent out periodically, so the potential of the + input terminal of the comparator 4, from which the output signal is sent out, is the - input terminal power supply E2. However, when the CPU goes out of control due to external noise, etc.
The W/D signal is no longer sent and the capacitor C1 continues to be charged, and as a result, the potential at the 10 input terminal of the comparator 4 is higher than the potential at the - input terminal V2, as shown in figure (f). The output of the comparator 4 generates a pulse-like output signal E as shown in the figure.Then, this signal E is sent to the base of the transistor Q2 via the resistor R4, and this As a result, a reset signal RST is sent to the CPUI, and the CPUI is reset.

一方、コンパレータ4の出力信号Eは抵抗3を介してコ
ンパレータ5の一入力端子への信号Fとして送出されて
コンデンサC2を充電することになり、この充電電圧が
十入力端子の電源E3による電位V3よりも高くなった
時点で、このコンパレータ5の出力が「L」レベルとな
り、この結果、コンデンサC1が放電され、コンパレー
タ4の出力信号Eは「L」レベル状態となる。こうして
、リセット信号R3TがrH,レベル状態になることに
より、CPUIがリセット解除され、CPUIの処理が
再開される。
On the other hand, the output signal E of the comparator 4 is sent as a signal F to one input terminal of the comparator 5 via the resistor 3, and charges the capacitor C2. When the voltage becomes higher than , the output of the comparator 5 becomes "L" level, and as a result, the capacitor C1 is discharged, and the output signal E of the comparator 4 becomes "L" level. In this way, when the reset signal R3T becomes rH, the reset of the CPU is canceled and the processing of the CPU is restarted.

次に、第3図は、本発明のウォッチドッグタイマー付制
御装置を内燃機関に適用をした例を示すブロック図であ
る。同図において、2oはエンジン、21はエアクリー
ナ、22はエアフローセンサ、23はスロットルバルブ
、24は吸気管、25は水温センサ、26はインジェク
タ、27はクランク角センサ、28は排気管、29は排
気ガスセンサである。
Next, FIG. 3 is a block diagram showing an example in which the control device with a watchdog timer of the present invention is applied to an internal combustion engine. In the figure, 2o is the engine, 21 is the air cleaner, 22 is the air flow sensor, 23 is the throttle valve, 24 is the intake pipe, 25 is the water temperature sensor, 26 is the injector, 27 is the crank angle sensor, 28 is the exhaust pipe, and 29 is the exhaust gas. It is a gas sensor.

そして、CPUIは、エンジンの回転数に応じたウォッ
チドッグタイマーの値をメインルーチンの一巡毎に設定
するとともに、各センサからの情報を入力して燃料噴射
量の演算を行い、エンジン20の回転数に同期したクラ
ンク角センサ27がらの割込信号による割込処理におい
てこの演算された燃料噴射量に基づくインジェクタ26
の駆動時間を算出し、この時間に応じてインジェクタ2
6を駆動して燃料を噴射する。また、Sms毎のタイマ
ー割込処理の中で、ウォッチドッグタイマーの値を減算
するとともに、この値が「0」ではないときに、ウォッ
チドッグタイマー回路2に対してW/D信号を送出する
ものとなっている。
Then, the CPU sets the value of the watchdog timer according to the engine rotation speed for each round of the main routine, inputs information from each sensor, calculates the fuel injection amount, and calculates the fuel injection amount. Injector 26 based on this calculated fuel injection amount in an interrupt process by an interrupt signal from crank angle sensor 27 synchronized with
The drive time of injector 2 is calculated and the drive time of injector 2 is calculated according to this time.
6 to inject fuel. Also, in the timer interrupt processing for each SMS, the value of the watchdog timer is subtracted, and when this value is not "0", a W/D signal is sent to the watchdog timer circuit 2. It becomes.

次に、第4図は、この装置のエンジン回転数とCPUI
の処理時間の関係を示す図である。同図は、エンジン回
転数が上昇するにつれて、これと同期するクランク角セ
ンサ27からの割込信号が頻繁にCPUIに到来し、そ
の結果、CPUIが実行するメインルーチンの一巡当た
りの処理実行時間が増大することを示している。本発明
はこのことに鑑み、エンジン回転数が成る値以上になる
と、ウォッチドッグタイマー値(W/Dタイマー値)を
大きく設定するようにしたものである。
Next, Figure 4 shows the engine speed and CPU
FIG. 3 is a diagram showing the relationship between processing times. The figure shows that as the engine speed increases, interrupt signals from the crank angle sensor 27 that synchronize with it frequently arrive at the CPUI, and as a result, the processing execution time per round of the main routine executed by the CPU It shows that it increases. In view of this, the present invention is designed to set a large watchdog timer value (W/D timer value) when the engine speed exceeds a certain value.

また、本発明は、このエンジン回転数以外に他の負荷条
件、ずなわち吸入空気量を計測しこの値に応じてW/D
タイマー値を設定するようにしたものである。
In addition, the present invention measures other load conditions other than the engine rotational speed, that is, the amount of intake air, and adjusts the W/D according to this value.
This allows you to set a timer value.

以下、第5図〜第7図に示すフローチャートに基づいて
このウォッチドッグタイマー付制御装置のCPUIの動
作を詳細に説明する。なお、第5図はこの装置のメイン
ルーチン、第6図はクランク角センサ27からの割込信
号による外部割込ルーチンを示し、また、第7図はS 
m s毎のタイマー割込ルーチンを示している。
Hereinafter, the operation of the CPU of this control device with a watchdog timer will be explained in detail based on the flowcharts shown in FIGS. 5 to 7. 5 shows the main routine of this device, FIG. 6 shows the external interrupt routine based on the interrupt signal from the crank angle sensor 27, and FIG. 7 shows the S
The timer interrupt routine every ms is shown.

まず、第5図のメインルーチンから説明する。First, the main routine shown in FIG. 5 will be explained.

電源が投入されると、ステップ50で初期化処理が行わ
れ、このとき、外部割込およびタイマー割込が解除され
る。こうして、外部割込やタイマー割込が解除されると
、クランク角センサ27からの割込信号が到来し後述す
る外部割込処理の中でエンジン回転数N、が計測される
ことになる。ステップ51ではこの計測されたエンジン
回転数N。が所定の値αより大であるか否かが判断され
る。そして、エンジン回転数がαより大であればステッ
プ52でタイマー値としてtlが設定され、また、αよ
り小であればステップ53でタイマー値としてtz(t
z<tt)がそれぞれ設定される。
When the power is turned on, initialization processing is performed in step 50, and at this time, external interrupts and timer interrupts are canceled. In this way, when the external interrupt or timer interrupt is canceled, an interrupt signal from the crank angle sensor 27 arrives, and the engine rotation speed N is measured in the external interrupt processing described later. In step 51, the measured engine rotation speed N is determined. It is determined whether or not is greater than a predetermined value α. If the engine speed is greater than α, tl is set as the timer value in step 52, and if it is smaller than α, tz(t
z<tt) are respectively set.

こうして設定されたタイマー値t1またはtzは、ステ
ップ54においてウォッチドッグタイマー、すなわちW
/DタイマーTwとしてセットされる。その後、ステッ
プ55で水温センサ25の値を読み込み、ステップ56
で水温補正演算処理を行ってその補正値KWTを求める
とともに、ステップ57で各種の補正演算を行ってその
係数Kを求め、これら求められた値をもとにステップ5
8で燃料の補正演算(KI←KWTXK)を行いインジ
ェクタ26から噴射される燃料噴射値が算出されてメイ
ンルーチンが一巡し、再びステ・7プ51に戻ってエン
ジン回転数に基づくウオ・7チド・yグタイマー値が設
定される。なお、このメインルーチンが実行されている
間にもクランク角センサ27による外部割込信号および
Sms毎のタイマー割込信号が発生すると、このメイン
ルーチンの実行は中断されてこれらの割込処理が実行さ
れる。
The timer value t1 or tz set in this way is set as a watchdog timer, ie, W in step 54.
/D is set as timer Tw. After that, in step 55, the value of the water temperature sensor 25 is read, and in step 56
At step 57, water temperature correction calculation processing is performed to obtain the correction value KWT, and at step 57, various correction calculations are performed to obtain the coefficient K. Based on these obtained values, step 5
In step 8, the fuel correction calculation (KI←KWTXK) is performed to calculate the fuel injection value injected from the injector 26, and the main routine goes through the cycle.The process returns to step 7 and step 51 again, and the fuel injection value is calculated based on the engine speed.・Yg timer value is set. Note that if an external interrupt signal from the crank angle sensor 27 and a timer interrupt signal for each SMS are generated while this main routine is being executed, the execution of this main routine is interrupted and these interrupt processes are executed. be done.

次に、第6図のクランク角センサ信号による外部割込処
理について説明する。
Next, the external interrupt processing using the crank angle sensor signal shown in FIG. 6 will be explained.

クランク角センサ27からの割込信号が到来すると、メ
インルーチンの実行が中断され、ステップ60でエンジ
ン回転数N、の計測処理が行われ、続いて、ステップ6
1で吸入空気量(A/N)が計測される。そして、ステ
ップ62においてエンジン20に燃料を噴射するインジ
ェクタ駆動時間の演算が行われて(T−A/N X K
 I )、駆動時間Tの値が算出され、ステップ63で
このインジェクタ駆動時間Tの値がタイマー割込信号さ
れ、ステップ64でタイマートリガ、すなわちタイマー
が起動されてこの駆動時間Tだけインジェクタ26から
燃料が噴射されることになる。
When the interrupt signal from the crank angle sensor 27 arrives, execution of the main routine is interrupted, and the engine rotation speed N is measured in step 60, followed by step 6.
1, the intake air amount (A/N) is measured. Then, in step 62, the injector driving time for injecting fuel into the engine 20 is calculated (TA/N
I), the value of the drive time T is calculated, the value of this injector drive time T is sent as a timer interrupt signal in step 63, and the timer is triggered in step 64, that is, the timer is started to supply fuel from the injector 26 for this drive time T. will be injected.

こうして、タイマーが起動されると、RTI命令を実行
して割込処理から復帰してメインルーチンに戻る。
When the timer is activated in this manner, the RTI command is executed, the interrupt processing is returned, and the main routine is returned.

次に、第7図の5ms毎に実行されるタイマー割込ルー
チンについて説明す、る。
Next, the timer interrupt routine executed every 5 ms in FIG. 7 will be explained.

タイマー割込信号によりメインルーチンが中断され、ス
テップ70でW/DタイマーTVの値がダウンカウント
される(Tw +−Tw  1 ) 、そしてステップ
71でこのW/DタイマーTwの値が「0」になったか
否かが判定され、この値が「0」ではなくステップ71
で「N」と判定されると、ステップ72でW/D信号が
出力される。なお、このW/D信号は、W/Dタイマー
T、の値が「0」にならない間は、5ms毎に交互に反
転して微分回路3に出力されるものであり、CPU1か
らこのような信号が定期的に出力されている間は、CP
UIが正常動作を行っているというこトチ、CPUIは
リセットされない。
The main routine is interrupted by the timer interrupt signal, and in step 70 the value of the W/D timer TV is counted down (Tw + - Tw 1 ), and in step 71 the value of this W/D timer Tw is set to "0". It is determined whether this value is not "0" and step 71
If the determination is "N" in step 72, a W/D signal is output. Note that this W/D signal is alternately inverted every 5 ms and output to the differentiating circuit 3 while the value of the W/D timer T does not become "0". While the signal is being output periodically, the CP
As long as the UI is operating normally, the CPU UI will not be reset.

また、W/DタイマーTwの値が「O」となり、ステッ
プ71で「Y」と判定された場合は、W/D信号の出力
を行わずにRTI命令を実行してメインルーチンに戻る
。そして、W/D信号が出力されなくなると、上記した
ようにCPU1の異常動作と判定され、この回路2のリ
セット信号R3TによりCPUIはリセットされる。
If the value of the W/D timer Tw becomes "O" and the determination is "Y" in step 71, the RTI command is executed without outputting the W/D signal and the process returns to the main routine. When the W/D signal is no longer output, it is determined that the CPU 1 is operating abnormally as described above, and the CPU 1 is reset by the reset signal R3T of the circuit 2.

以上説明したように、本発明は、エンジン回転数Neが
増加し、クランク角センサ27からの割込信号が頻繁に
到来することにより、また、エンジンの負荷が増大する
ことにより、CPUIの処埋時間が増大することを考慮
してW/DタイマーTwの値をエンジン回転数Neまた
はエンジンの負荷条件に応じて可変できるように構成し
、CPU1の暴走時に際して適正な時間内で復旧できる
ようにしたものである。また、W/D信号の出力をタイ
マー割込の中で実行しているので、信号の処理が容易と
なり、ウォッチドッグタイマー回路2が簡単な回路で構
成できる。
As explained above, in the present invention, as the engine speed Ne increases and interrupt signals from the crank angle sensor 27 arrive frequently, and as the engine load increases, the CPU Considering the increase in time, the value of the W/D timer Tw is configured to be variable according to the engine rotation speed Ne or the engine load condition, so that it can be restored within an appropriate time when the CPU 1 goes out of control. This is what I did. Furthermore, since the output of the W/D signal is executed during a timer interrupt, signal processing becomes easy and the watchdog timer circuit 2 can be constructed with a simple circuit.

[発明の効果] 以上説明したことから明らかなように、本発明に係るウ
ォッチドッグタイマー付制御装置は、ウオッチドッグタ
イマーヘセットされるデータをプログラムの実行時間に
応じて設定するようにしたので、外来ノイズ等によって
マイクロコンピュータが暴走しても適正時間内に正常動
作に復帰できるという効果がある。
[Effects of the Invention] As is clear from the above explanation, the control device with a watchdog timer according to the present invention sets the data set to the watchdog timer according to the execution time of the program. Even if the microcomputer goes out of control due to external noise or the like, it can return to normal operation within an appropriate amount of time.

また、ウォッチドッグタイマーへは内燃機関の回転数に
応じたデータまたは負荷条件に応じたデータをセットす
るようにしたので、エンジンが動作中で運転状態にある
場合にマイクロコンピュータが暴走しても、エンジンの
停止を防止できるという効果がある。
In addition, the watchdog timer is set with data that corresponds to the rotational speed of the internal combustion engine or data that corresponds to the load conditions, so even if the microcomputer goes out of control while the engine is running, This has the effect of preventing the engine from stopping.

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

第1図は本発明に係るウォッチドッグタイマー付制御装
置の一実施例を示すブロック図、第2図はこの装置のタ
イミングチャート、第3図はこの装置を内燃機関に適用
した例を示すブロック図、第4図はこの装置のエンジン
回転数と処理時間の関係を示す説明図、第5図〜第7図
はこの装置の動作を説明するフローチャートである。 1・・・・マイクロコンピュータ、2 ウオツチドツグタイマ一回路、3・・・・微分回路、4
〜6・・・・コンパレータ、Ql、Q2・・・・トラン
ジスタ、DI・・・・ダイオード、E1〜E3・・・・
電源、C1,C2・・・・コンデンサ、R1−R7・・
・・抵抗。
Fig. 1 is a block diagram showing an embodiment of a control device with a watchdog timer according to the present invention, Fig. 2 is a timing chart of this device, and Fig. 3 is a block diagram showing an example in which this device is applied to an internal combustion engine. , FIG. 4 is an explanatory diagram showing the relationship between engine speed and processing time of this device, and FIGS. 5 to 7 are flow charts explaining the operation of this device. 1... Microcomputer, 2 Watchdog timer circuit, 3... Differential circuit, 4
~6...Comparator, Ql, Q2...Transistor, DI...Diode, E1-E3...
Power supply, C1, C2...Capacitor, R1-R7...
··resistance.

Claims (3)

【特許請求の範囲】[Claims] (1)所定のプログラム演算を繰り返し実行するメイン
ルーチンと、このメインルーチンの実行を所定時間毎に
中断して実行するタイマー割込ルーチンと、前記メイン
ルーチンの実行毎に所定のデータがセットされタイマー
割込毎にカウントダウンされるウォッチドッグタイマー
と、前記タイマーの割込毎に前記ウォッチドッグタイマ
ーの値が零ではない場合該ウォッチドッグタイマーの出
力を反転させるマイクロコンピュータと、このウォッチ
ドッグタイマーの出力信号が所定時間以上出力されない
場合に異常信号を前記マイクロコンピュータに出力して
該マイクロコンピュータを再スタートさせるリセット回
路とを備えた制御装置において、 前記ウオッチドッグタイマーへセットされるデータをプ
ログラムの実行時間に応じて設定するようにしたことを
特徴とするウォッチドッグタイマー付制御装置。
(1) A main routine that repeatedly executes a predetermined program operation, a timer interrupt routine that interrupts and executes the main routine at predetermined intervals, and a timer that sets predetermined data each time the main routine is executed. A watchdog timer that counts down every time an interrupt occurs, a microcomputer that inverts the output of the watchdog timer if the value of the watchdog timer is not zero every time the timer interrupts, and an output signal of the watchdog timer. A control device comprising a reset circuit that outputs an abnormal signal to the microcomputer to restart the microcomputer when the watchdog timer is not output for a predetermined period of time, the data set to the watchdog timer is set at the program execution time. A control device with a watchdog timer, characterized in that settings can be made according to the user's needs.
(2)請求項(1)記載のウォッチドッグタイマー付制
御装置において、 前記制御装置は内燃機関の制御装置であって前記ウオッ
チドッグタイマーへは該内燃機関の回転数に応じたデー
タをセットするようにしたことを特徴とするウォッチド
ッグタイマー付制御装置。
(2) In the control device with a watchdog timer according to claim (1), the control device is a control device for an internal combustion engine, and the watchdog timer is configured to set data according to the rotation speed of the internal combustion engine. A control device with a watchdog timer.
(3)請求項(1)記載のウォッチドッグタイマー付制
御装置において、 前記制御装置は内燃機関の制御装置であって前記ウオッ
チドッグタイマーへは該内燃機関の負荷条件に応じたデ
ータをセットするようにしたことを特徴とするウォッチ
ドッグタイマー付制御装置。
(3) In the control device with a watchdog timer according to claim (1), the control device is a control device for an internal combustion engine, and the watchdog timer is configured to set data according to a load condition of the internal combustion engine. A control device with a watchdog timer.
JP2154434A 1990-06-13 1990-06-13 Controller with watch dog timer Pending JPH0447426A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2154434A JPH0447426A (en) 1990-06-13 1990-06-13 Controller with watch dog timer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2154434A JPH0447426A (en) 1990-06-13 1990-06-13 Controller with watch dog timer

Publications (1)

Publication Number Publication Date
JPH0447426A true JPH0447426A (en) 1992-02-17

Family

ID=15584107

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2154434A Pending JPH0447426A (en) 1990-06-13 1990-06-13 Controller with watch dog timer

Country Status (1)

Country Link
JP (1) JPH0447426A (en)

Similar Documents

Publication Publication Date Title
JP3323974B2 (en) Control device for internal combustion engine
JPS6352225B2 (en)
KR900000151B1 (en) Fuel control device for internal combustion engine
JPS6060022B2 (en) Internal combustion engine control device
JPH0575902B2 (en)
KR900006873B1 (en) Fuel controlling system for internal combustion engine
JPH01211647A (en) Fuel controller of internal combustion engine
US4495923A (en) Fuel injection control system
JPS648354A (en) Electronic ignition controller for internal combustion engine
JP2813665B2 (en) Ignition timing control device
JPH0464099B2 (en)
JPS6287648A (en) Intake-air pressure detecting device for internal combustion engine
JPH09264169A (en) In-cylinder direct injection engine
JPH0299735A (en) Fuel control device for internal combustion engine
JPH0730925Y2 (en) Malfunction prevention device for electronically controlled fuel injection device
JPS5968530A (en) Control method of internal-combustion engine
JP7841441B2 (en) Engine control unit
JP2002371904A (en) Internal combustion engine control system
JPS61272448A (en) Fuel injection controller for internal-combustion engine
JPS6035156A (en) Fuel injection device for internal-combustion engine
JPH0248728B2 (en)
JPS6146442A (en) Fuel injection control device
JP2753251B2 (en) Engine control device
JP2546368B2 (en) Internal combustion engine speed control device
JPS5949331A (en) Fuel injection quantity controller