JPH09244707A - Processor - Google Patents

Processor

Info

Publication number
JPH09244707A
JPH09244707A JP4931396A JP4931396A JPH09244707A JP H09244707 A JPH09244707 A JP H09244707A JP 4931396 A JP4931396 A JP 4931396A JP 4931396 A JP4931396 A JP 4931396A JP H09244707 A JPH09244707 A JP H09244707A
Authority
JP
Japan
Prior art keywords
value
predetermined
volatile memory
time
power supply
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.)
Withdrawn
Application number
JP4931396A
Other languages
Japanese (ja)
Inventor
Shohei Miwa
昇平 三輪
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Denso Ten Ltd
Original Assignee
Denso Ten 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 Denso Ten Ltd filed Critical Denso Ten Ltd
Priority to JP4931396A priority Critical patent/JPH09244707A/en
Publication of JPH09244707A publication Critical patent/JPH09244707A/en
Withdrawn legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To provide the processor which can continuously store values, etc., used to control a controlled device and decrease the frequency of writing to a nonvolatile memory. SOLUTION: An ECU(electric control unit) 21 performs operation with values detected by respective sensors, etc., connected to input interfaces 23 and 24 to control respective devices connected to an output interface 26. Learnt values determined by the states of the controlled devices are written in an SRAM 32, and written from the SRAM 32 to a flash PROM 33 at intervals of time determined by a timer 34. While the frequency of writing to the flash PROM 33 is reduced, the learnt values can be stored.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、自動車などの車両
に搭載され、車両におけるエンジンなどの被制御装置に
取付けられたセンサからの情報に基づいて演算を行い、
演算結果によって被制御装置を制御する処理装置に関す
る。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention is mounted on a vehicle such as an automobile and performs calculation based on information from a sensor attached to a controlled device such as an engine in the vehicle.
The present invention relates to a processing device that controls a controlled device according to a calculation result.

【0002】[0002]

【従来の技術】近年、自動車などの車両において、エン
ジンなどの動作制御を行うためにECU(Electric Con
trol Unit)が設けられることが多くなっている。車両
に搭載されるECUの1つであるエンジン制御用ECU
では、たとえば空気を吸入した量およびエンジンの回転
数などの情報に基づいて演算を行い、エンジンに供給す
る燃料量および点火時期などを制御している。前記演算
は、空気の吸入管などに取付けられる検出器などからの
情報と、ECUのROM(リードオンリメモリ)などに
予め格納されている基本値とに基づいて行われる。前記
演算を行うための演算式もROMに予め格納されてい
る。
2. Description of the Related Art In recent years, in vehicles such as automobiles, ECUs (Electric Control) have been used to control the operation of engines.
trol Unit) is often provided. Engine control ECU, which is one of the ECUs mounted on the vehicle
Then, for example, calculation is performed based on information such as the amount of air taken in and the number of revolutions of the engine to control the amount of fuel supplied to the engine and the ignition timing. The calculation is performed based on information from a detector attached to an air intake pipe or the like and a basic value stored in advance in a ROM (Read Only Memory) of the ECU. An arithmetic expression for performing the above calculation is also stored in the ROM in advance.

【0003】前記ECUでは、理論空燃比への制御精度
をさらに向上させるために学習制御が行われている。学
習制御を行うには、まず理論空燃比からの空燃比ずれ量
を求め、空燃比ずれ量から理論空燃比へと修正するため
の補正係数を求め、前記演算を行う際に補正係数を用い
て演算結果を修正する。前記補正係数は、ECUが制御
しようとする、たとえばエンジンの状態には関係なく定
められており、補正係数による修正を行っても実際に制
御しようとするエンジンの理論空燃比とすることができ
ない。したがって、前記補正係数に加えてさらに、制御
しようとするエンジンの状態にあわせて補正を行わなけ
ればならない。前記補正を行うための係数は、前記エン
ジンの状態変化をいわゆる学習して定められる。
In the ECU, learning control is performed in order to further improve the control accuracy to the stoichiometric air-fuel ratio. To perform learning control, first find the air-fuel ratio deviation amount from the stoichiometric air-fuel ratio, find the correction coefficient for correcting the air-fuel ratio deviation amount to the stoichiometric air-fuel ratio, and use the correction coefficient when performing the above calculation. Correct the calculation result. The correction coefficient is determined regardless of the state of the engine that the ECU is trying to control, and cannot be the theoretical air-fuel ratio of the engine that is actually controlled even if the correction coefficient is used for correction. Therefore, in addition to the correction coefficient, the correction must be performed according to the state of the engine to be controlled. The coefficient for performing the correction is determined by what is called learning of the state change of the engine.

【0004】前記学習して定められる補正係数は、エン
ジン・EFI(Electric FuelInjection)部品の使用過
程での特性変化によって起こる空燃比ずれ修正を持続的
に行うために、ECUに電源が供給されない状態でも消
去されないようにする必要がある。
The correction coefficient determined by the above-mentioned learning continuously corrects the air-fuel ratio deviation caused by the characteristic change in the use process of the engine / EFI (Electric Fuel Injection) component, so that the ECU is not supplied with power. It should not be erased.

【0005】前述した学習補正係数をECUに記憶させ
ておく方法として、ECUに揮発性メモリ、たとえばR
AM(ランダムアクセスメモリ)を搭載し、揮発性メモ
リに対して常時電源を供給して記憶内容を保持させてお
く方法と、書換え可能な不揮発性メモリ、たとえばEE
PROM(Electoric Elesable Programable ROM)を搭
載して記憶内容を保持させておく方法とがある。
As a method of storing the learning correction coefficient described above in the ECU, the ECU is provided with a volatile memory, for example, R.
A method of mounting an AM (Random Access Memory) and constantly supplying power to a volatile memory to retain the stored contents, and a rewritable nonvolatile memory such as EE
There is a method in which a PROM (Electoric Elesable Programmable ROM) is installed and the stored contents are retained.

【0006】図23は、第1の先行技術であるECU1
の概略的な構成を示すブロック図である。ECU1は、
CPU(中央演算処理装置)2と、SRAM(Static R
AM)3と、入出力処理回路(以下、「I/O」と称す
る)4と、第1電源回路5と、第2電源回路6とを含ん
で構成される。
FIG. 23 shows a first prior art ECU1.
2 is a block diagram showing a schematic configuration of FIG. ECU1
CPU (Central Processing Unit) 2 and SRAM (Static R
AM) 3, an input / output processing circuit (hereinafter referred to as "I / O") 4, a first power supply circuit 5, and a second power supply circuit 6.

【0007】ECU1において、外部のセンサなどから
の信号は、I/O4を介してCPU2に与えられる。C
PU2は、前記信号に基づいて処理を行って、処理結果
をI/O4を介して出力することによって被制御装置の
制御を行う。バッテリ7は、たとえば12Vの電圧を出
力する。バッテリ7の出力は、第1電源回路5にはイグ
ニッションスイッチ8を介して供給され、第2電源回路
6には直接供給される。CPU2は、第1電源回路5か
ら供給される電力によって動作し、SRAM3は第2電
源回路6から供給される電力によって記憶内容を保持す
る。
In the ECU 1, a signal from an external sensor or the like is given to the CPU 2 via the I / O 4. C
The PU 2 performs processing based on the signal and outputs the processing result via the I / O 4 to control the controlled device. The battery 7 outputs a voltage of 12V, for example. The output of the battery 7 is supplied to the first power supply circuit 5 via the ignition switch 8 and directly to the second power supply circuit 6. The CPU 2 operates by the electric power supplied from the first power supply circuit 5, and the SRAM 3 holds the stored contents by the electric power supplied from the second power supply circuit 6.

【0008】第1および第2電源回路5,6は、バッテ
リ7から与えられる12Vの電圧をたとえば5Vに変換
してCPU2などに供給する。バッテリ7と第1電源回
路5との間には、イグニッションスイッチ8が介挿され
ているので、イグニッションスイッチ8が遮断される
と、CPU2などに電力が供給されなくなり、ECU1
の動作が停止する。バッテリ7と第2電源回路6とは直
接接続されているので、イグニッションスイッチ8の導
通/遮断に関係なく第2電源回路6からは電力がSRA
M3に与えられている。揮発性メモリであるSRAM3
に常に電力が供給されているので、前述のように学習値
などを記憶しておくことができる。
The first and second power supply circuits 5 and 6 convert the voltage of 12V supplied from the battery 7 into, for example, 5V and supply it to the CPU 2 and the like. Since the ignition switch 8 is interposed between the battery 7 and the first power supply circuit 5, when the ignition switch 8 is cut off, the CPU 2 and the like are not supplied with power, and the ECU 1
Stops working. Since the battery 7 and the second power supply circuit 6 are directly connected, the power from the second power supply circuit 6 is SRA regardless of whether the ignition switch 8 is turned on or off.
Given to M3. SRAM3 which is a volatile memory
Since electric power is constantly supplied to, the learning value and the like can be stored as described above.

【0009】図24は、第2の先行技術であるECU1
1の概略的な構成を示すブロック図である。ECU11
において、ECU1と同一の構成要素には同一の参照符
を付して説明を省略する。ECU11の特徴は、SRA
M3に置換えて、EEPROM12が設けられているこ
とである。また、ECU11では、バッテリ7からイグ
ニッションスイッチ8を介して12Vの電圧が供給され
ている電源回路13からCPU2およびEEPROM1
2などにたとえば5Vの電圧が与えられている。EEP
ROM12は、不揮発性のメモリであるので、イグニッ
ションスイッチ8が遮断されて電力が供給されなくなっ
ても前記学習値などを記憶しておくことができる。
FIG. 24 is a second prior art ECU 1
2 is a block diagram showing a schematic configuration of 1. ECU11
In the above, the same components as those of the ECU 1 are designated by the same reference numerals and the description thereof will be omitted. The characteristics of the ECU 11 are SRA
That is, the EEPROM 12 is provided instead of the M3. In the ECU 11, the power supply circuit 13 to which a voltage of 12V is supplied from the battery 7 through the ignition switch 8 is connected to the CPU 2 and the EEPROM 1.
For example, a voltage of 5V is applied to 2 and the like. EEP
Since the ROM 12 is a non-volatile memory, the learned value and the like can be stored even if the ignition switch 8 is cut off and power is not supplied.

【0010】[0010]

【発明が解決しようとする課題】前述の第1の先行技術
では、バッテリ7から供給される12Vの電圧を5Vに
変換して出力する電源回路が2つ必要となるという問題
点がある。また、バッテリ7を取外すと、データが消去
されてしまうという問題点があり、たとえば学習補正係
数による空燃比ずれ修正の持続が不可能となる。
The above-mentioned first prior art has a problem that two power supply circuits for converting the voltage of 12V supplied from the battery 7 into 5V and outputting the voltage are required. Further, when the battery 7 is removed, there is a problem that the data is erased, and it becomes impossible to continue the correction of the air-fuel ratio deviation by the learning correction coefficient, for example.

【0011】前述の第2の先行技術では、第1の先行技
術における2つの問題点は解決されるが、EEPROM
12には、EEPROM12の構成によって定められ
る、たとえば10万回という書込み回数の制限があり、
学習値を頻繁に書換えてそのときの被制御装置の状況に
応じた細かい制御を行うには適していない。
Although the above-mentioned second prior art solves the two problems in the first prior art, it is an EEPROM.
12 has a limit of the number of times of writing, for example, 100,000 times, which is determined by the configuration of the EEPROM 12.
It is not suitable for frequently rewriting the learned value and performing fine control according to the situation of the controlled device at that time.

【0012】本発明の目的は、被制御装置の制御のため
に用いられる値などを記憶することで継続的な制御を可
能とし、かつ前記値が記憶される不揮発性メモリの書込
み回数を削減することができる処理装置を提供すること
である。
An object of the present invention is to enable continuous control by storing a value or the like used for controlling the controlled device, and reduce the number of times of writing in the nonvolatile memory in which the value is stored. It is to provide a processing device capable of performing the above.

【0013】[0013]

【課題を解決するための手段】本発明は、情報を検出し
て出力する1または複数の検出手段からの情報に基づい
て定められる基本値と、基本値を定める情報と同一かも
しくは異なる情報に基づいて定められる補正値とに基づ
いて演算を行い、演算結果に基づいて被制御装置を制御
する処理装置であって、前記基本値と前記補正値に基づ
いて求められる学習値とが記憶されており、書換えを指
示する信号が与えられると学習値が書換えられる書換え
可能な不揮発性メモリと、前記基本値と補正値と学習値
とが一時的に記憶される揮発性メモリと、予め定める電
圧の電力を供給する電源手段と、前記電源手段からの電
圧の供給が開始されると、不揮発性メモリに記憶されて
いる学習値を読出して揮発性メモリに書込み、前記補正
値と基本値と学習値とに基づいて演算を行い、演算結果
に基づいて被制御装置を制御し、補正値に基づいて揮発
性メモリに記憶されている学習値を書換え、1または複
数の予め定める条件のうちの少なくとも1つが満たされ
る度に不揮発性メモリに前記書換えを指示する信号を与
え、揮発性メモリに記憶されている前記学習値を不揮発
性メモリに書込む制御手段とを含むことを特徴とする処
理装置である。 本発明に従えば、制御手段は電源手段からの電圧の供給
が開始されると、不揮発性メモリに記憶されている学習
値を読出して揮発性メモリに書込み、前記補正値と基本
値と学習値とに基づいて演算を行い、演算結果に基づい
て被制御装置を制御する。また、補正値に基づいて揮発
性メモリに記憶されている学習値を書換え、1または複
数の予め定める条件のうちの少なくとも1つが満たされ
た場合には、不揮発性メモリに前記書換えを指示する信
号を与えて、揮発性メモリに記憶されている前記学習値
を不揮発性メモリに書込む。したがって、処理装置が制
御しようとする被制御装置毎に定められる学習値は、1
または複数の条件のうち少なくとも1つが満たされる度
に書換え可能な不揮発性メモリに書込まれるので、学習
値を用いて被制御装置に対して継続的な制御を行うこと
ができ、かつ前記補正値に基づいて変更される学習値を
不揮発性メモリに書込む回数を削減することができる。
The present invention provides a basic value determined based on information from one or a plurality of detecting means for detecting and outputting information, and information which is the same as or different from the information defining the basic value. A processing device that performs a calculation based on a correction value determined based on the calculation result and controls the controlled device based on the calculation result, and stores a learning value obtained based on the basic value and the correction value. A rewritable nonvolatile memory that rewrites a learning value when a signal instructing rewriting is given, a volatile memory that temporarily stores the basic value, the correction value, and the learning value, and a predetermined voltage. When the power supply means for supplying electric power and the supply of the voltage from the power supply means are started, the learning value stored in the nonvolatile memory is read and written in the volatile memory, and the correction value, the basic value and the learning value are learned. Based on the calculation result, the controlled device is controlled based on the calculation result, and the learning value stored in the volatile memory is rewritten based on the correction value. At least one of one or a plurality of predetermined conditions is set. And a control means for writing the learning value stored in the volatile memory to the non-volatile memory when a signal for instructing the rewriting is given to the non-volatile memory each time one of the two is satisfied. . According to the invention, when the supply of the voltage from the power supply means is started, the control means reads the learning value stored in the non-volatile memory and writes the learning value in the volatile memory, and the correction value, the basic value and the learning value. And the controlled device is controlled based on the calculation result. Further, the learning value stored in the volatile memory is rewritten based on the correction value, and when at least one of one or a plurality of predetermined conditions is satisfied, a signal for instructing the rewriting to the non-volatile memory. To write the learning value stored in the volatile memory to the non-volatile memory. Therefore, the learning value determined for each controlled device that the processing device attempts to control is 1
Alternatively, since it is written in the rewritable nonvolatile memory every time at least one of the plurality of conditions is satisfied, the learning value can be used to continuously control the controlled device, and the correction value It is possible to reduce the number of times the learning value changed based on the above is written in the nonvolatile memory.

【0014】本発明は、電源手段からの電力の供給が開
始されると計時を開始する計時手段を備え、前記制御手
段は、計時手段の出力が予め定める時間の経過を示した
ことを前記予め定める条件とすることを特徴とする。 本発明に従えば、制御手段は、計時手段の出力が予め定
める時間が経過したことを示すと、前記予め定める条件
が満たされたとして、揮発性メモリに記憶されている学
習値を不揮発性メモリに書込む。したがって、予め定め
る時間毎に学習値が不揮発性メモリに書き込まれること
となり、不揮発性メモリに書込みを行う回数を削減しつ
つ確実に学習値を不揮発性メモリに記憶させることがで
きる。不揮発性メモリに学習値が記憶されるので、学習
値を用いて被制御装置に対して継続的な制御を行うこと
ができる。
The present invention further comprises a clocking means for starting clocking when power supply from the power source means is started, and the control means indicates in advance that the output of the clocking means indicates the passage of a predetermined time. It is characterized in that the conditions are set. According to the present invention, when the output of the time counting means indicates that a predetermined time has elapsed, the control means determines that the predetermined condition is satisfied, and the learned value stored in the volatile memory is stored in the nonvolatile memory. Write to. Therefore, the learning value is written in the non-volatile memory every predetermined time, and the learning value can be surely stored in the non-volatile memory while reducing the number of times of writing in the non-volatile memory. Since the learning value is stored in the non-volatile memory, it is possible to continuously control the controlled device using the learning value.

【0015】本発明は、前記制御手段は、予め定める時
間よりも充分に長く定められる予め定める期間が経過す
ると、前記予め定める時間に予め定める追加時間を追加
することを特徴とする。 本発明に従えば、制御手段は予め定める期間が経過する
までは予め定める時間毎に学習値を不揮発性メモリに書
込み、予め定める期間が経過した後は予め定める時間に
追加時間を足合わせた時間毎に学習値を不揮発性メモリ
に書込む。したがって、被制御装置の制御を開始したと
きには比較的頻繁に不揮発性メモリに学習値を書込むこ
とによって、被制御装置に応じた学習値へと変更するこ
とができ、予め定める期間の経過後は学習値を不揮発性
メモリに書込む時間間隔を長くすることによって、書込
み回数を削減しつつ学習値を記憶することができる。
The present invention is characterized in that the control means adds a predetermined additional time to the predetermined time when a predetermined period sufficiently longer than the predetermined time has elapsed. According to the present invention, the control means writes the learning value in the nonvolatile memory at each predetermined time until the predetermined period elapses, and after the predetermined period elapses, the time obtained by adding the additional time to the predetermined time. The learning value is written in the non-volatile memory every time. Therefore, when the control of the controlled device is started, the learning value can be changed to the learning value according to the controlled device by writing the learning value to the nonvolatile memory relatively frequently, and after the elapse of the predetermined period, By increasing the time interval for writing the learning value in the nonvolatile memory, it is possible to store the learning value while reducing the number of times of writing.

【0016】本発明は、前記制御手段と電源手段との間
に介挿され、導通/遮断を制御するスイッチング手段を
備え、スイッチング手段によって電源の供給が開始され
るたびに不揮発性メモリに記憶されている起動回数値を
1増加し、起動回数値が予め定める値となると、前記予
め定める時間に予め定める追加時間を追加することを特
徴とする。 本発明に従えば、制御手段は起動回数が予め定める値と
なるまでは予め定める時間毎に学習値を不揮発性メモリ
に書込み、予め定める値となった後は予め定める時間に
追加時間を足合わせた時間毎に学習値を不揮発性メモリ
に書込む。したがって、起動回数が少ないときには比較
的頻繁に不揮発性メモリに学習値を書込むことによっ
て、被制御装置に応じた学習値へと変更することがで
き、起動回数が予め定める値となった後は、学習値を不
揮発性メモリに書込む時間間隔を長くすることによっ
て、書込み回数を削減しつつ学習値を記憶することがで
きる。
The present invention comprises a switching means interposed between the control means and the power supply means for controlling conduction / interruption, and is stored in the non-volatile memory every time the power supply is started by the switching means. The number of activations is increased by 1, and when the number of activations reaches a predetermined value, a predetermined additional time is added to the predetermined time. According to the present invention, the control means writes the learning value in the nonvolatile memory at every predetermined time until the number of times of activation reaches the predetermined value, and after reaching the predetermined value, the additional time is added to the predetermined time. The learning value is written into the non-volatile memory every time. Therefore, when the number of activations is small, the learning value can be changed to a learning value according to the controlled device by writing the learning value to the nonvolatile memory relatively frequently, and after the number of activations reaches a predetermined value, By increasing the time interval for writing the learning value in the nonvolatile memory, it is possible to store the learning value while reducing the number of times of writing.

【0017】本発明は、前記制御手段は、不揮発性メモ
リに記憶されている学習値と、揮発性メモリに記憶され
ている学習値との比較を行い、2つの学習値に予め定め
る値以上の差が生じたことを前記予め定める条件とする
ことを特徴とする。 本発明に従えば、制御手段は、不揮発性メモリに記憶さ
れている学習値と、揮発性メモリに記憶されている学習
値との比較を行い、2つの学習値に予め定める値以上の
差が生じていると予め定める条件を満たしたとして、揮
発性メモリに記憶されている学習値を不揮発性メモリに
書込む。したがって、揮発性メモリに記憶されている学
習値と、不揮発性メモリに記憶されている学習値との差
が予め定める値以上となったときのみ不揮発性メモリに
書込みが行われるので、不揮発性メモリに対する書込み
回数を削減することができる。
In the present invention, the control means compares the learning value stored in the non-volatile memory with the learning value stored in the volatile memory, and the learning value is equal to or larger than a predetermined value of the two learning values. It is characterized in that the occurrence of a difference is the predetermined condition. According to the present invention, the control means compares the learning value stored in the non-volatile memory with the learning value stored in the volatile memory, and the two learning values are equal to or more than a predetermined value. The learning value stored in the volatile memory is written in the non-volatile memory on the assumption that the predetermined condition is satisfied. Therefore, the non-volatile memory is written only when the difference between the learned value stored in the volatile memory and the learned value stored in the non-volatile memory becomes equal to or more than a predetermined value. It is possible to reduce the number of times of writing to.

【0018】本発明は、前記計時手段の出力に基づい
て、予め定める時間間隔毎に前記比較を行うことを特徴
とする。 本発明に従えば、制御手段は予め定める時間間隔毎に揮
発性メモリに記憶されている学習値と不揮発性メモリに
記憶されている学習値との比較を行う。したがって、予
め定める時間間隔毎に行われる比較によって、揮発性メ
モリに記憶されている学習値と、不揮発性メモリに記憶
されている学習値との差が予め定める値以上であると判
断されたときのみ不揮発性メモリに書込みが行われるの
で、不揮発性メモリに対する書込み回数を削減すること
ができる。
The present invention is characterized in that the comparison is performed at predetermined time intervals based on the output of the time measuring means. According to the invention, the control means compares the learning value stored in the volatile memory with the learning value stored in the non-volatile memory at predetermined time intervals. Therefore, when it is determined that the difference between the learning value stored in the volatile memory and the learning value stored in the non-volatile memory is equal to or more than the predetermined value by the comparison performed at predetermined time intervals. Since only the non-volatile memory is written, the number of times of writing to the non-volatile memory can be reduced.

【0019】本発明は、前記制御手段と電源手段との間
に介挿され、導通/遮断を制御するスイッチング手段
と、制御手段と電源手段との間で、かつスイッチング手
段と並列に介挿され、前記スイッチング手段が遮断され
ると、予め定める第1の時間導通して制御手段に電力を
供給する電力供給手段とを備え、前記制御手段は、スイ
ッチング手段によって電源手段からの電力の供給が停止
されたことを前記予め定める条件とし、電力供給手段を
介して供給される電力によって、揮発性メモリに記憶さ
れている学習値を不揮発性メモリに書込むことを特徴と
する。 本発明に従えば、スイッチング手段によって電源手段か
ら制御手段への電力の供給が停止されると、電力供給手
段によって第1の時間だけ制御手段へと電力が供給され
る。制御手段は、スイッチング手段が遮断されたことに
応答して、第1の時間の間に、揮発性メモリに記憶され
ている学習値を不揮発性メモリに書込む。したがって、
不揮発性メモリに書込まれる学習値は、最も最新の学習
値であるスイッチング手段が遮断されたときの学習値で
あるので、次にスイッチング手段が導通されて制御を開
始するときに、最新の学習値を用いて制御を開始するこ
とができる。また、スイッチング手段が遮断されたとき
に書込みを行うので不揮発性メモリに対する書込み回数
を削減することができる。
According to the present invention, the switching means is interposed between the control means and the power supply means to control conduction / interruption, and is interposed between the control means and the power supply means and in parallel with the switching means. A power supply means for supplying power to the control means by conducting for a predetermined first time when the switching means is cut off, and the control means stops the power supply from the power supply means by the switching means. The learning value stored in the volatile memory is written in the non-volatile memory by the electric power supplied through the electric power supply means under the predetermined condition. According to the invention, when the switching means stops the supply of electric power from the power supply means to the control means, the electric power supply means supplies the electric power to the control means for the first time. The control means writes the learned value stored in the volatile memory to the non-volatile memory during the first time period in response to the switching means being turned off. Therefore,
The learning value written in the non-volatile memory is the latest learning value when the switching means is cut off. Therefore, when the switching means is turned on next and control is started, the latest learning value is written. The value can be used to initiate control. Moreover, since the writing is performed when the switching means is cut off, the number of times of writing to the nonvolatile memory can be reduced.

【0020】本発明は、前記検出手段と制御手段との間
に介挿され、検出手段によって検出された情報が予め定
める範囲内の値であるかどうかを判定する判定手段を備
え、前記揮発性および不揮発性メモリは、前記予め定め
る範囲外の値が前記検出手段で検出されたことを示す異
状検出情報が書込まれる異状検出情報記憶領域を含んで
構成され、前記制御手段は、検出手段からの情報が判定
手段によって予め定める範囲内の値ではないと判定され
ると、異状検出情報を揮発性および不揮発性メモリの異
状検出情報記憶領域に書込み、以後は補正値と学習値と
に換えて予め定める範囲内の値である設定値を用いて前
記演算を行うことを特徴とする。 本発明に従えば、制御手段は、検出手段からの情報が判
定手段によって予め定める範囲内の値ではないと判定さ
れると、異状検出情報を揮発性および不揮発性メモリの
異状検出情報記憶領域に書込み、揮発性メモリに記憶さ
れている学習値を不揮発性メモリに書込む。以後の制御
は、補正値と学習値とに置換えて予め定める範囲内の値
である設定値を用いて行う。したがって、前記情報が予
め定める範囲内の値でない場合には、学習値が不揮発性
メモリに記憶され、以後の制御が設定値を用いて行われ
るので、異常な情報を用いて被制御装置の制御を行うこ
とがなく、また異常な情報によって学習値が不所望な値
となることを防止することができる。
The present invention further comprises a judgment means interposed between the detection means and the control means, for judging whether or not the information detected by the detection means is a value within a predetermined range. And the non-volatile memory is configured to include an abnormality detection information storage area in which abnormality detection information indicating that a value outside the predetermined range is detected by the detection means is written, and the control means is configured to operate from the detection means. If the determination means determines that the information is not within the predetermined range, the abnormality detection information is written in the abnormality detection information storage area of the volatile and non-volatile memory, and thereafter the correction value and the learning value are replaced. It is characterized in that the calculation is performed using a set value that is a value within a predetermined range. According to the present invention, the control means, when the information from the detection means is determined not to be a value within the predetermined range by the determination means, stores the abnormality detection information in the abnormality detection information storage area of the volatile and nonvolatile memory. Writing and writing the learned value stored in the volatile memory to the non-volatile memory. Subsequent control is performed using a set value that is a value within a predetermined range by replacing the correction value with the learning value. Therefore, if the information is not within the predetermined range, the learned value is stored in the non-volatile memory, and the subsequent control is performed using the set value. Therefore, the abnormal information is used to control the controlled device. It is possible to prevent the learning value from becoming an undesired value due to abnormal information.

【0021】[0021]

【発明の実施の形態】図1は本発明の実施の第1の形態
であるECU21の構成を示すブロック図であり、図2
はECU21に関連する構成の一例を示すブロック図で
ある。図2は、水冷式の火花点火内燃機関についての構
造を示している。
1 is a block diagram showing a configuration of an ECU 21 according to a first embodiment of the present invention.
3 is a block diagram showing an example of a configuration related to the ECU 21. FIG. FIG. 2 shows the structure of a water-cooled spark ignition internal combustion engine.

【0022】図2において、吸気口42から導入された
燃焼用空気は、エアクリーナ43で浄化され、吸気管4
4を介して、吸気管44に介在されるスロットル弁45
でその流入量が調整された後、サージタンク46に流入
する。サージタンク46から流出した燃焼用空気は、吸
気管47に介在される燃料噴射弁48から噴射される燃
料と混合され、吸気弁49を介して内燃機関50の燃焼
室51に供給される。燃焼室51には、点火プラグ52
が設けられていて、点火プラグ52からの火花によって
燃焼室51で空気と燃料とが燃焼する。この燃焼室51
からの排気ガスは、排気弁53を介して排出され、排気
管54から三元触媒55を経て大気中に放出される。
In FIG. 2, the combustion air introduced from the intake port 42 is purified by the air cleaner 43, and the intake pipe 4
4, the throttle valve 45 interposed in the intake pipe 44
After the amount of inflow is adjusted by, the flow enters the surge tank 46. The combustion air flowing out from the surge tank 46 is mixed with the fuel injected from the fuel injection valve 48 interposed in the intake pipe 47, and is supplied to the combustion chamber 51 of the internal combustion engine 50 via the intake valve 49. A spark plug 52 is provided in the combustion chamber 51.
Is provided, and air and fuel are burned in the combustion chamber 51 by a spark from the spark plug 52. This combustion chamber 51
The exhaust gas from the exhaust gas is discharged through the exhaust valve 53, and is discharged from the exhaust pipe 54 into the atmosphere through the three-way catalyst 55.

【0023】前記吸気管44には、吸入空気の温度を検
出する吸気温度検出器61が設けられ、前記スロットル
弁45に関連してスロットル弁開度検出器62が設けら
れ、サージタンク46には、吸気管47の圧力を検出す
る吸気圧検出器63が設けられる。また前記燃焼室51
付近には冷却水温度検出器64が設けられる。排気管5
4において、三元触媒55より上流側には、酸素濃度検
出器65が設けられ、三元触媒55より下流側には、排
気温度検出器66が設けられる。内燃機関50における
回転速度、すなわち単位時間当たりの回転数は、クラン
ク角検出器67によって検出される。
An intake air temperature detector 61 for detecting the temperature of intake air is provided in the intake pipe 44, a throttle valve opening detector 62 is provided in association with the throttle valve 45, and a surge tank 46 is provided. An intake pressure detector 63 for detecting the pressure in the intake pipe 47 is provided. In addition, the combustion chamber 51
A cooling water temperature detector 64 is provided in the vicinity. Exhaust pipe 5
4, an oxygen concentration detector 65 is provided upstream of the three-way catalyst 55, and an exhaust temperature detector 66 is provided downstream of the three-way catalyst 55. The rotation speed of the internal combustion engine 50, that is, the number of rotations per unit time is detected by the crank angle detector 67.

【0024】ECU21には、前記各検出器61〜67
とともに、車速検出器68と、内燃機関50を始動させ
るスタータモータ73が起動されているかどうかを検出
するスタート検出器69と、冷房機の使用などを検出す
る空調検出器70と、内燃機関50が搭載される自動車
が自動変速機付きであるときには、その自動変速機の変
則段がニュートラル位置であるか否かを検出するニュー
トラル検出器71とからの検出結果が入力される。
The ECU 21 includes the detectors 61 to 67.
At the same time, the vehicle speed detector 68, the start detector 69 that detects whether or not the starter motor 73 that starts the internal combustion engine 50 is activated, the air conditioning detector 70 that detects the use of the air conditioner, and the internal combustion engine 50 When the mounted vehicle is equipped with an automatic transmission, a detection result from a neutral detector 71 for detecting whether or not the irregular gear of the automatic transmission is in the neutral position is input.

【0025】さらにまた、このECU21は、バッテリ
74によって電力付勢されており、前記各検出器61〜
71の検出結果および電圧検出器60によって検出され
るバッテリ74の電源電圧などに基づいて、燃料噴射量
や点火時期などを演算し、前記燃料噴射弁8および点火
プラグ12などを制御する。ECU21はまた、内燃機
関50が運転されているときには、燃料ポンプ72を駆
動する。
Furthermore, the ECU 21 is energized by a battery 74, and each of the detectors 61 to 61 is energized.
Based on the detection result of 71 and the power supply voltage of the battery 74 detected by the voltage detector 60, the fuel injection amount, the ignition timing, etc. are calculated, and the fuel injection valve 8 and the ignition plug 12 are controlled. The ECU 21 also drives the fuel pump 72 when the internal combustion engine 50 is operating.

【0026】また、吸気管47と排気管54との間は、
側路77によってバイパスされている。この側路77に
は、該側路77を介して再循環される排気ガスの流量を
調整制御するためのEGR弁78が設けられている。
Between the intake pipe 47 and the exhaust pipe 54,
By-pass 77 is bypassed. The side passage 77 is provided with an EGR valve 78 for adjusting and controlling the flow rate of the exhaust gas recirculated through the side passage 77.

【0027】EGR弁78は、たとえばダイヤフラムを
用いて構成されており、ダイヤフラム室に吸気負圧を導
入するバキュームスイッチングバルブを通電/非通電制
御することによって、開度が制御される。このようにE
GR弁78が開度制御されることによって、吸入空気に
混入される排気ガス量が変化され、空燃比を変化させる
ことができる。
The EGR valve 78 is composed of, for example, a diaphragm, and the opening degree is controlled by controlling energization / de-energization of a vacuum switching valve for introducing intake negative pressure into the diaphragm chamber. Thus E
By controlling the opening of the GR valve 78, the amount of exhaust gas mixed in the intake air is changed and the air-fuel ratio can be changed.

【0028】ECU21は、制御回路22と、入力イン
タフェイス回路23,24と、アナログ−デジタル変換
回路(以下、「ADC」と称する)25と、出力インタ
フェイス回路26と、電源回路27とを含んで構成され
る。また、制御回路22は、CPU31と、SRAM3
2と、フラッシュPROM33と、タイマ34と、I/
O(入出力回路)35とを含んで構成される。
The ECU 21 includes a control circuit 22, input interface circuits 23 and 24, an analog-digital conversion circuit (hereinafter referred to as "ADC") 25, an output interface circuit 26, and a power supply circuit 27. Composed of. Further, the control circuit 22 includes a CPU 31 and an SRAM 3
2, a flash PROM 33, a timer 34, and I /
And an O (input / output circuit) 35.

【0029】前記各検出器60〜71などにおいてアナ
ログ値を出力する検出器からの出力は、入力インタフェ
イス回路23からADC25を介してデジタル値へと変
換されて制御回路22に与えられる。また、前記各検出
器60〜71などにおいてデジタル値を出力する検出器
からの出力は入力インタフェイス回路24を介して制御
回路22に与えられる。
The output from the detector that outputs an analog value in each of the detectors 60 to 71 is converted into a digital value from the input interface circuit 23 via the ADC 25, and is given to the control circuit 22. Further, the output from the detector that outputs a digital value in each of the detectors 60 to 71 and the like is given to the control circuit 22 via the input interface circuit 24.

【0030】ECU21には、バッテリ74から供給さ
れる電力がイグニッションスイッチ75を介して与えら
れている。前記供給された電力は、電源回路27で電圧
がたとえば5Vへと変換されて制御回路22などに与え
られる。制御回路22では、ADC25および入力イン
タフェイス回路24を介してI/O35に与えられる信
号に基づいてCPU31が予め定める処理を行う。処理
の結果は、I/O35を介して出力インタフェイス回路
26へと与えられる。出力インタフェイス回路26の出
力が、前記燃料噴射弁48に与えられることによって、
燃料噴射量が制御される。また、前記出力がEGR弁7
8に与えられてEGR量が制御される。さらに、前記出
力によって燃料ポンプ72が駆動される。
The electric power supplied from the battery 74 is applied to the ECU 21 via the ignition switch 75. The power supplied is converted into a voltage of, for example, 5 V by the power supply circuit 27 and is supplied to the control circuit 22 and the like. In the control circuit 22, the CPU 31 performs a predetermined process based on a signal given to the I / O 35 via the ADC 25 and the input interface circuit 24. The result of the processing is given to the output interface circuit 26 via the I / O 35. By providing the output of the output interface circuit 26 to the fuel injection valve 48,
The fuel injection amount is controlled. Further, the output is the EGR valve 7
8 to control the EGR amount. Further, the fuel pump 72 is driven by the output.

【0031】ECU21の制御回路22では、電源投入
時には、電気的に書込み消去可能な不揮発性メモリであ
るフラッシュPROM33から前述した学習値などが読
出されてSRAM32に書込まれる。CPU11は、I
/O35を介して供給される各検出器の出力およびSR
AM32に記憶されている学習値などに基づいて前記処
理を行う。計時手段であるタイマ34は、時間を計時し
ており、プログラムの割り込みタイミングなどをCPU
31に報知する。
In the control circuit 22 of the ECU 21, when the power is turned on, the learning value and the like described above are read from the flash PROM 33 which is an electrically writable and erasable nonvolatile memory and written in the SRAM 32. CPU11 is I
And output of each detector supplied via / O35 and SR
The above process is performed based on the learning value stored in the AM 32. A timer 34, which is a time measuring means, measures time, and CPU interrupt timing such as program interrupt timing is measured.
Notify 31.

【0032】図3は、ECU21によって行われる制御
の一例を説明するためのタイミングチャートである。図
3(1)に示す波形は、酸素センサである前述の酸素濃
度検出器65の出力電圧の波形であり、この出力電圧は
ADC25に与えられる。ADC25の出力である図3
(2)に示す波形は、酸素濃度検出器65の出力電圧が
基準電圧以上となる期間がハイレベルとなり、基準電圧
未満となる期間がローレベルとなる。前記基準電圧は、
理論空燃比であるときの酸素濃度検出器25のとるべき
出力電圧を示す。したがって、ADC25の出力がハイ
レベルであるときには、理論空燃比に対して燃料量が多
いリッチの状態であり、ローレベルであるときには空気
の量が多いリーン状態である。
FIG. 3 is a timing chart for explaining an example of control performed by the ECU 21. The waveform shown in FIG. 3A is the waveform of the output voltage of the oxygen concentration detector 65, which is an oxygen sensor, and this output voltage is given to the ADC 25. The output of the ADC 25 shown in FIG.
The waveform shown in (2) has a high level when the output voltage of the oxygen concentration detector 65 is equal to or higher than the reference voltage, and has a low level when the output voltage is lower than the reference voltage. The reference voltage is
The output voltage to be taken by the oxygen concentration detector 25 at the stoichiometric air-fuel ratio is shown. Therefore, when the output of the ADC 25 is at a high level, it is in a rich state where the fuel amount is large with respect to the stoichiometric air-fuel ratio, and when it is at a low level, it is in a lean state where the amount of air is large.

【0033】図3(3)に示す波形は、前記酸素濃度に
基づいて求められる燃料噴射時間の補正値FAFの値を
示している。補正値FAFは、ADC25の出力がハイ
レベルからローレベルへと切換わるとき、たとえば時刻
t0,t2では、その値が0.1減少され、ローレベル
からハイレベルへと切換わるとき、たとえば時刻t1,
t3ではその値が0.1増加される。
The waveform shown in FIG. 3 (3) shows the value of the correction value FAF of the fuel injection time obtained based on the oxygen concentration. The correction value FAF is decreased by 0.1 when the output of the ADC 25 switches from a high level to a low level, for example, at times t0 and t2, and switches from a low level to a high level, for example, at time t1. ,
At t3, the value is increased by 0.1.

【0034】補正値FAFは、時刻t0,t1,t2,
t3で値が大きく増減しているが、これは酸素濃度検出
器65が内燃機関50の下流側に位置していることによ
って、あるタイミングで酸素濃度検出器65が検出する
酸素濃度と、そのタイミングで内燃機関50に吸入され
る酸素濃度とにずれが生じるのを補正するためであり、
ADC25の出力がリッチとリーンとで切換わるとき
に、補正値FAFの値を0.1ずつ増加もしくは減少さ
せている。
The correction value FAF is the time t0, t1, t2,
Although the value greatly increases and decreases at t3, this is because the oxygen concentration detector 65 is located on the downstream side of the internal combustion engine 50, the oxygen concentration detected by the oxygen concentration detector 65 at a certain timing, and its timing. In order to correct the difference between the oxygen concentration drawn into the internal combustion engine 50 and
When the output of the ADC 25 switches between rich and lean, the value of the correction value FAF is increased or decreased by 0.1.

【0035】たとえば、ADC25の出力がハイレベル
である時刻t0から時刻t1までの期間W1では、時刻
t0における値から後述する図4に示す割り込み処理が
行われる度に0.002ずつ減少する。なお、ADC2
5の出力が、ローレベルとなる時刻t1からt2までの
期間W2では、時刻t1における値から0.002ずつ
増加する。なお、期間W1,W2は、たとえば1秒間で
ある。
For example, in the period W1 from the time t0 to the time t1 when the output of the ADC 25 is at the high level, the value at the time t0 is decreased by 0.002 each time the interrupt processing shown in FIG. 4 described later is performed. In addition, ADC2
In the period W2 from the time t1 to the time t2 when the output of 5 becomes the low level, it increases by 0.002 from the value at the time t1. The periods W1 and W2 are, for example, 1 second.

【0036】図3(4)に示す波形は、学習値FAFB
Gの値を示している。学習値FAFBGは、補正値FA
Fに基づいて、後述する図4のフローチャートによって
定められる値である。学習値FAFBGは、ADC25
の出力レベルが切換わる毎に、その値が0.002ずつ
変化する。学習値FAFBGの値の変化については後述
する。
The waveform shown in FIG. 3 (4) is the learning value FAFB.
The value of G is shown. The learning value FAFBG is the correction value FA
It is a value determined based on F by the flowchart of FIG. 4 described later. Learning value FAFBG is ADC25
Each time the output level of is switched, the value changes by 0.002. The change in the learning value FAFBG will be described later.

【0037】図4は、たとえば後述する図7のフローチ
ャートとして示されるメインプログラムに対して予め定
める時間毎に割り込んで行われるプログラムのフローチ
ャートである。この割り込み処理は、メインプログラム
の実行中に、タイマ34によって測定される、たとえば
16ms毎に割り込んで行われる。ステップs1では、
ADC25の出力に基づいて、酸素濃度がリッチである
かリーンであるかを判定する。酸素濃度がリッチである
場合には、ステップs2に進む。
FIG. 4 is a flow chart of a program which is executed by interrupting the main program shown in the flow chart of FIG. 7, which will be described later, at predetermined time intervals. This interrupt processing is performed while the main program is being executed, interrupted by the timer 34, for example, every 16 ms. In step s1,
Based on the output of the ADC 25, it is determined whether the oxygen concentration is rich or lean. If the oxygen concentration is rich, the process proceeds to step s2.

【0038】ステップs2では、前回の割り込み処理時
の判定がリッチであったかどうかをSRAM32を参照
することによって判定する。前回の割り込み処理時の酸
度濃度がリッチである場合にはステップs3に進む。ス
テップs3では、補正値FAFを0.002減少させ
る。ステップs3の処理の終了後、メインプログラムの
処理に戻る。
In step s2, it is determined by referring to the SRAM 32 whether or not the determination at the time of the previous interrupt processing is rich. If the acidity concentration at the time of the previous interruption process is rich, the process proceeds to step s3. In step s3, the correction value FAF is decreased by 0.002. After the processing of step s3 ends, the processing returns to the processing of the main program.

【0039】ステップs2において、前回の割り込み処
理時の酸素濃度がリーンである場合にはステップs4に
進む。ステップs4では、補正値FAFを0.1減少さ
せる。続くステップs5では、ステップs1において判
定した結果を、たとえばSRAM32に書込んで記憶す
る。ステップs6では、前回までの補正値FAFの相加
平均値に対して検出回数を掛けて求めた値と、今回の補
正値FAFとを足し合わせた値を、検出回数を1増加さ
せた値で割ることによって今回までの補正値FAFの相
加平均を求めている。ステップs6において求められた
相加平均は、SRAM32に書込まれて記憶される。前
記検出回数を予め定める回数としてもよい。
In step s2, if the oxygen concentration at the previous interruption process is lean, the process proceeds to step s4. In step s4, the correction value FAF is decreased by 0.1. In the following step s5, the result determined in step s1 is written and stored in the SRAM 32, for example. In step s6, the value obtained by multiplying the arithmetic mean value of the correction value FAF up to the previous time by the number of detection times and the correction value FAF this time is a value obtained by increasing the number of detection times by one. The arithmetic mean of the correction values FAF up to this time is calculated by dividing. The arithmetic mean obtained in step s6 is written and stored in the SRAM 32. The number of detections may be a predetermined number.

【0040】ステップs7では、ステップs6で求めた
相加平均が1.0を超えているか1.0未満であるかに
よってリッチであるかリーンであるかを判定する。相加
平均が1.0を超える値である場合にはステップs8に
進む。ステップs8では、学習値FAFBGを0.00
2減少させる。ステップs8の処理の終了後、メインプ
ログラムの処理に戻る。
In step s7, it is determined whether rich or lean depending on whether the arithmetic mean obtained in step s6 is over 1.0 or under 1.0. If the arithmetic mean is a value exceeding 1.0, the process proceeds to step s8. In step s8, the learning value FAFBG is set to 0.00
Reduce by 2. After the processing of step s8 ends, the processing returns to the processing of the main program.

【0041】ステップs7において、相加平均が1.0
未満であるときには、ステップs9に進む。ステップs
9では、学習値FAFBGを0.002増加させる。ス
テップs9の処理の終了後、メインプログラムの処理に
戻る。
In step s7, the arithmetic mean is 1.0.
When it is less than, it proceeds to step s9. Steps
At 9, the learning value FAFBG is increased by 0.002. After the processing of step s9 ends, the processing returns to the processing of the main program.

【0042】ステップs1において、今回の酸素濃度が
リーンであると判定された場合は、ステップs10に進
む。ステップs10では、SRAM32を参照すること
によって、前回の酸素濃度がリーンであったかどうかを
判定する。前回の酸素濃度がリッチであった場合は、補
正値FAFを0.1増加させる。ステップs11の処理
の終了後、ステップs5以降の処理を行う。また、ステ
ップs10における判定で前回の酸素濃度がリーンであ
ると判定された場合は、補正値FAFを0.002増加
させる。ステップs12の処理の終了後、メインプログ
ラムの処理に戻る。
If it is determined in step s1 that the oxygen concentration this time is lean, the process proceeds to step s10. In step s10, it is determined whether the previous oxygen concentration was lean by referring to the SRAM 32. If the previous oxygen concentration was rich, the correction value FAF is increased by 0.1. After the processing of step s11 ends, the processing of step s5 and thereafter is performed. If it is determined in step s10 that the previous oxygen concentration is lean, the correction value FAF is increased by 0.002. After the processing of step s12 ends, the processing returns to the processing of the main program.

【0043】図5は、燃料の噴射時間を定めるためのフ
ローチャートである。図5に示すフローチャートは、た
とえば図7に示すメインプログラムのフローチャートの
実行中に、割り込み処理として行われる。ステップp1
では、以下に示す式(1)に基づいて燃料噴射弁48か
らの燃料の噴射時間Tcを求める。
FIG. 5 is a flow chart for determining the fuel injection time. The flowchart shown in FIG. 5 is executed as an interrupt process during execution of the flowchart of the main program shown in FIG. 7, for example. Step p1
Then, the fuel injection time Tc from the fuel injection valve 48 is obtained based on the following equation (1).

【0044】 Tc = Tp×FAF×FAFBG+Tb …(1) 式(1)において、Tpは、吸気口42から吸入した空
気量に基づいて定められる燃料噴射時間である。基本値
である燃料噴射時間Tpは、たとえばフラッシュPRO
M33などに前記空気量に対応付けて予め格納されてい
る。燃料噴射時間Tpは、たとえば前述のスロットル弁
開度検出器62によって検出される前記空気量に基づい
て読出される。また、Tbは実際の噴射時間(Tp×F
AF×FAFBG)を求めた時刻に対して、燃料噴射弁
48が実際に燃料を噴射する時刻までの応答遅れを補正
するための時間である。
Tc = Tp × FAF × FAFBG + Tb (1) In the equation (1), Tp is a fuel injection time determined based on the amount of air taken in from the intake port 42. The fuel injection time Tp which is the basic value is, for example, the flash PRO.
It is previously stored in M33 or the like in association with the air amount. The fuel injection time Tp is read based on the air amount detected by the above-mentioned throttle valve opening detector 62, for example. Further, Tb is the actual injection time (Tp × F
AF * FAFBG) is a time for correcting the response delay until the time when the fuel injection valve 48 actually injects the fuel with respect to the calculated time.

【0045】ステップp2では、ECU21から予め定
める信号を出力して噴射時間Tcの間、燃料噴射弁48
から燃料を噴射させる。ステップp2の処理の終了後、
メインプログラムの処理に戻る。
In step p2, a predetermined signal is output from the ECU 21 to output the fuel injection valve 48 during the injection time Tc.
To inject fuel from. After the processing of step p2 ends,
Return to the processing of the main program.

【0046】図6はECU21におけるメインプログラ
ムのフローチャートであり、図7はメインプログラムに
おける初期設定処理についてのフローチャートである。
なお、図6、図7に示すフローチャートでは、特に本発
明の特徴となる処理について示す。
FIG. 6 is a flowchart of the main program in the ECU 21, and FIG. 7 is a flowchart of the initial setting process in the main program.
Note that the flowcharts shown in FIGS. 6 and 7 particularly show the processing that is a feature of the present invention.

【0047】後述する図6に示すメインプログラムのフ
ローチャートで、ステップm1として行われる初期設定
処理として、ステップq1では、フラッシュPROM3
3のアドレス¥2000〜¥2FFFに記憶されている
データをSRAM32のアドレス¥1000〜¥1FF
Fに書込む。なお、本明細書において「¥」は、引続く
数字および記号がアドレスを示す16進数の値であるこ
とを示す。ステップq2では、計時手段であるタイマ3
4を初期化して時間Aを0にする。初期設定処理の終了
後は、図6に示すフローチャートに処理を移す。
In the flow chart of the main program shown in FIG. 6 which will be described later, in step q1, the flash PROM 3 is used as the initial setting process performed in step m1.
The data stored in the address 3 to 2000 yen to 2FFF is stored in the SRAM 32 address 1000 to 1FF.
Write to F. In the present specification, “¥” indicates that the following numbers and symbols are hexadecimal values indicating addresses. At step q2, the timer 3 which is a time measuring means
4 is initialized and the time A is set to 0. After the initialization process is completed, the process is moved to the flowchart shown in FIG.

【0048】図6に示すフローチャートにおいて、ステ
ップm1では、前述の初期設定処理を行う。ステップm
2では、初期設定処理において初期化されたタイマ34
による計時動作を開始する。ステップm3では、タイマ
34によって計時されている時間Aが、予めフラッシュ
PROM33への書込み設定時間として設定されている
時間B以上になったかどうかを判断している。時間B
は、たとえば1時間に定められる。ステップm3におい
て、計数時間Aが設定時間B以上となった場合には、ス
テップm4に進む。
In the flowchart shown in FIG. 6, in step m1, the above-mentioned initial setting process is performed. Step m
2, the timer 34 initialized in the initialization process
To start the timing operation. At step m3, it is judged whether or not the time A measured by the timer 34 is equal to or longer than the time B preset as the write setting time to the flash PROM 33. Time B
Is set to 1 hour, for example. When the counting time A becomes equal to or longer than the set time B in step m3, the process proceeds to step m4.

【0049】ステップm4では、SRAM32のアドレ
ス¥1000〜¥1FFFに記憶されているデータを、
フラッシュPROM33のアドレス¥2000〜¥2F
FFに書込んでデータを保存する。
At step m4, the data stored in the addresses of \ 1000 to \ 1FFF of the SRAM 32 are written as follows.
Flash PROM 33 address \ 2000 to \ 2F
Write to FF and save data.

【0050】ステップm5では、新たに時間を測定する
ために計時時間Aをリセットして0とする。ステップm
5の処理の終了後は、図示しない他の処理を行った後、
ステップm3以降の処理を繰り返し行う。ステップm3
において、計時時間Aが設定時間B未満であると判断さ
れた場合には、ステップm5以降の図示しない他の処理
を行った後、ステップm3以降の処理を行う。
In step m5, the clocking time A is reset to 0 in order to newly measure the time. Step m
After completion of the processing of 5, after performing other processing not shown,
The processes after step m3 are repeated. Step m3
When it is determined that the measured time A is less than the set time B, the other processes (not shown) after step m5 are performed, and then the processes after step m3 are performed.

【0051】以上のように本発明の実施の第1の形態に
よれば、各センサ61〜71などによって検出された値
および検出された値に基づいて求められる値は、ECU
21のSRAM32に書込まれ、演算が行われる。SR
AM32に書込まれている学習値を含む各値は、タイマ
34の計時時間Aが予め設定されている時間B以上とな
ったときに、SRAM32から読出され、フラッシュP
ROM33に書込まれるので、書換え可能な不揮発性メ
モリであるフラッシュPROM33の書込み回数による
制限を受けることなく、かつイグニッションスイッチ7
5がオフされてバッテリ74からの電力の供給が停止し
た場合であっても、学習値などを保存しておくことがで
き、制御を行おうとする装置に対して継続的な制御を行
うことができる。
As described above, according to the first embodiment of the present invention, the value detected by each of the sensors 61 to 71 and the value obtained based on the detected value are ECU
21 is written in the SRAM 32, and the operation is performed. SR
Each value including the learning value written in the AM 32 is read from the SRAM 32 when the measured time A of the timer 34 becomes a preset time B or more, and the flash P
Since it is written in the ROM 33, it is not limited by the number of times of writing in the flash PROM 33, which is a rewritable nonvolatile memory, and the ignition switch 7 is used.
Even when 5 is turned off and the supply of power from the battery 74 is stopped, the learning value and the like can be saved, and continuous control can be performed on the device that is trying to perform control. it can.

【0052】本発明の実施の第2の形態であるECU1
21は、図1に示すECU21と同一の構成要素を含ん
で構成されているので、ECU21と同一の各構成要素
についての説明は省略する。ECU121は、ECU2
1の構成にさらに電源122と、メモリ123とを含ん
で構成される。
ECU 1 according to the second embodiment of the present invention
Since 21 is configured to include the same components as the ECU 21 shown in FIG. 1, description of the same components as the ECU 21 will be omitted. The ECU 121 is the ECU 2
The configuration 1 further includes a power supply 122 and a memory 123.

【0053】電源回路122は、イグニッションスイッ
チ75を介さずにバッテリ74から直接電力が供給され
ている。電源回路122は、メモリ123に電力を供給
する。メモリ123は、たとえばSRAMなどで構成さ
れる揮発性のメモリである。メモリ123は、I/O3
5を介してデータの書込みおよび読出しが行われる。メ
モリ123には常に電力が供給されることとなり、バッ
テリ74からの電力の供給が停止しない限り記憶内容が
保持される。
The power supply circuit 122 is directly supplied with electric power from the battery 74 without passing through the ignition switch 75. The power supply circuit 122 supplies power to the memory 123. The memory 123 is a volatile memory composed of, for example, SRAM. The memory 123 is I / O3
Writing and reading of data is performed via 5. Electric power is always supplied to the memory 123, and the stored contents are held unless the electric power supply from the battery 74 is stopped.

【0054】ECU121の特徴は、イグニッションス
イッチ75がオンされた回数をフラッシュPROM33
などに記憶しておき、記憶されている前記回数が予め定
める回数以上となると、SRAM32からフラッシュP
ROM33への書込みの時間間隔を変更して長くしてい
ることである。前記イグニッションスイッチ75がオン
された回数を以後起動回数と称する。なお、起動回数を
前記メモリ123に記憶するようにして、予め定める回
数毎にフラッシュPROM33に書込まれている起動回
数を1増加させるようにしてもよい。メモリ123に起
動回数を一時的に書込んでからフラッシュPROM33
に書込むことによって、フラッシュPROM33にデー
タが書込まれる回数を削減することができる。
The characteristic of the ECU 121 is that the number of times the ignition switch 75 is turned on is determined by the flash PROM 33.
When the number of times stored is greater than or equal to a predetermined number of times, the SRAM 32 flashes the flash P
That is, the time interval of writing to the ROM 33 is changed and lengthened. Hereinafter, the number of times the ignition switch 75 is turned on will be referred to as the number of times of activation. The number of activations may be stored in the memory 123, and the number of activations written in the flash PROM 33 may be incremented by 1 for each predetermined number. The flash PROM 33 is written after the startup count is temporarily written in the memory 123.
By writing to the flash PROM 33, the number of times data is written to the flash PROM 33 can be reduced.

【0055】図8は、ECU121の動作を説明するた
めのタイミングチャートである。図8のタイミングチャ
ートにおいて、横軸はイグニッションスイッチ75をオ
ンした累積の回数を示し、縦軸はフラッシュPROM3
3に書込みを行う時間間隔を示す。イグニッションスイ
ッチ75をオンした累積の回数とは、ECU121が製
造され、たとえば車両などに搭載された状態で、最初に
イグニッションスイッチ75をオンしてバッテリ74か
ら電力が供給されたのを1回目として、以降、イグニッ
ションスイッチ75がオンされる度に1ずつ増加させた
ものである。
FIG. 8 is a timing chart for explaining the operation of ECU 121. In the timing chart of FIG. 8, the horizontal axis represents the cumulative number of times the ignition switch 75 is turned on, and the vertical axis represents the flash PROM 3
3 shows a time interval for writing. The cumulative number of times the ignition switch 75 is turned on means that the first time the ignition switch 75 is turned on and power is supplied from the battery 74 in a state where the ECU 121 is manufactured and mounted on, for example, a vehicle, After that, it is incremented by one each time the ignition switch 75 is turned on.

【0056】最初にイグニッションスイッチ75をオン
してから予め定める回数Cまでは、書込み間隔を時間E
1とし、時間E1が経過する度にSRAM32に書込ま
れているデータをフラッシュPROM33に書込む。前
記起動回数が予め定める回数Cとなると書込み間隔を変
更し、時間E1から時間F増加した時間E2とする。以
後の起動時には時間E2が経過する度に前記書込み動作
を行う。
From the first time the ignition switch 75 is turned on to the predetermined number of times C, the writing interval is set to the time E.
The data written in the SRAM 32 is written in the flash PROM 33 every time the time E1 elapses. When the number of times of activation reaches a predetermined number C, the write interval is changed to a time E2 that is the time E1 increased by the time F. At the time of subsequent activation, the write operation is performed every time the time E2 elapses.

【0057】前記予め定める回数Cは、たとえば90回
ぐらいに定められ、およそ1カ月ぐらいは時間E1、た
とえば10分毎に書込み動作を行い、起動回数が90回
となると時間F、たとえば50分を時間E1に足合わせ
て時間E2として、その後は時間E2として1時間毎に
書込み動作を行う。
The predetermined number of times C is set to, for example, about 90 times, and the writing operation is performed at a time E1 of, for example, every 10 minutes for about one month, and when the number of times of activation reaches 90, a time of F, for example, 50 minutes. The writing operation is performed every hour as the time E2 by adding to the time E1 and thereafter as the time E2.

【0058】図9はECU121におけるメインプログ
ラムのフローチャートであり、図10はメインプログラ
ムにおいて電源投入直後に行われる初期設定処理のフロ
ーチャートである。図9および図10のフローチャート
では特に本発明の特徴となる処理について示した。
FIG. 9 is a flowchart of the main program in the ECU 121, and FIG. 10 is a flowchart of the initial setting process performed immediately after the power is turned on in the main program. The flowcharts shown in FIGS. 9 and 10 show the processing which is a feature of the present invention.

【0059】後述する図9に示すメインプログラムのフ
ローチャートで、ステップk1として行われる初期設定
処理として、ステップn1では、フラッシュPROM3
3のアドレス¥2000〜¥2FFFに記憶されている
データをSRAM32のアドレス¥1000〜¥1FF
Fに書込む。ステップn2では、SRAM32のアドレ
ス¥1000に記憶されている累積された起動回数Dを
読出す。ステップn3では、起動回数Dを1増加させて
SRAM32のアドレス¥1000に書込む。ステップ
n4では、タイマ34を初期化して時間Aを0とする。
初期設定処理の終了後は、図9に示すフローチャートに
処理を移す。
In the flowchart of the main program shown in FIG. 9, which will be described later, in step n1, the flash PROM 3 is used as an initialization process performed in step k1.
The data stored in the address 3 to 2000 yen to 2FFF is stored in the SRAM 32 address 1000 to 1FF.
Write to F. At step n2, the cumulative number of times of activation D stored in the SRAM 32 at address \ 1000 is read. At step n3, the number of times of activation D is incremented by 1 and written in the address 32 of the SRAM 32. At step n4, the timer 34 is initialized to set the time A to zero.
After the initialization process is completed, the process is moved to the flowchart shown in FIG.

【0060】図9のフローチャートにおいて、ステップ
k1では前述の初期設定処理を行う。続くステップk2
では、初期設定処理において初期化されたタイマ34に
よる計時動作を開始する。ステップk3では、起動回数
Dが予め定める回数C以上となっているかどうかを判定
する。起動回数Dが、予め定める回数C以上である場合
は、ステップk4に進む。
In the flowchart of FIG. 9, the above-mentioned initial setting process is performed at step k1. Continuing step k2
Then, the time counting operation by the timer 34 initialized in the initialization process is started. At step k3, it is determined whether or not the number of activations D is equal to or greater than a predetermined number C. When the number of times of activation D is equal to or more than the number of times C which is determined in advance, the process proceeds to step k4.

【0061】ステップk4では、時間E1に時間Fを足
し合わせて時間E2を定めている。ステップk5では、
タイマ34によって計時される時間Aと時間Eとを比較
することによって計時動作が開始されてから時間Eが経
過したかどうかを判断している。時間Eは、起動回数D
が回数C未満であるときには、時間E1であり、起動回
数Dが回数C以上であるときには、時間E2である。
At step k4, time E2 is determined by adding time F to time E1. In step k5,
By comparing the time A measured by the timer 34 with the time E, it is determined whether the time E has elapsed since the time counting operation was started. Time E is the number of startups D
Is less than the number of times C, the time is E1, and when the number of activations D is more than the number of times C, the time is E2.

【0062】ステップk5において時間Aが時間E以上
であると判断された場合は、ステップk6に進む。ステ
ップk6では、SRAM32のアドレス¥1000〜¥
1FFFに記憶されているデータをフラッシュPROM
33のアドレス¥2000〜¥2FFFに書込む。ステ
ップk7では、計時時間Aをリセットして0として計時
を再開する。ステップk7の処理の終了後は、図示しな
い他の処理を行い、その後ステップk3以降の処理を行
う。
When it is determined in step k5 that time A is equal to or longer than time E, the process proceeds to step k6. At step k6, the address of the SRAM 32 is from ¥ 1000 to ¥
The data stored in 1FFF is flash PROM
Write to the address 33 to ¥ 2000 to ¥ 2FFF. At step k7, the time measurement time A is reset to 0 and the time measurement is restarted. After the processing of step k7 is completed, other processing not shown is performed, and then the processing of step k3 and thereafter is performed.

【0063】ステップk3において、起動回数Dが予め
定める回数C未満である場合は、ステップk5以降の処
理を行う。また、ステップk5において、計時動作が開
始されてから時間Eが経過していない場合には、図示し
ない他の処理を行い、その後ステップk3以降の処理を
行う。
In step k3, when the number of times of activation D is less than the number of times C which is determined in advance, the processing from step k5 is performed. If the time E has not elapsed since the timekeeping operation was started in step k5, other processing not shown is performed, and then the processing of step k3 and thereafter is performed.

【0064】以上のように本発明の実施の第2の形態に
よれば、各センサ61〜71などによって検出された値
および検出された値に基づいて求められる値は、ECU
21のSRAM32に書込まれ、演算が行われる。SR
AM32に書込まれている学習値を含む各値は、起動回
数Dが予め定める回数C未満であるときには、時間E1
毎にSRAM32に書込まれているデータをフラッシュ
PROM33に書込み、起動回数Dが予め定める回数C
以上であるときには、時間E2毎にSRAM32に書込
まれているデータをフラッシュPROM33に書込むの
で、書換え可能な不揮発性メモリであるフラッシュPR
OM33の書込み回数による制限を受けることなく、か
つイグニッションスイッチ75がオフされてバッテリ7
4からの電力の供給が停止した場合であっても、学習値
などを保存しておくことができ、制御を行おうとする装
置に対して継続的な制御を行うことができる。
As described above, according to the second embodiment of the present invention, the value detected by each sensor 61 to 71 and the value obtained based on the detected value are
21 is written in the SRAM 32, and the operation is performed. SR
Each value including the learning value written in the AM 32 is set to the time E1 when the number of activations D is less than a predetermined number C.
Each time, the data written in the SRAM 32 is written in the flash PROM 33, and the number of times of activation D is a predetermined number C
In the above case, the data written in the SRAM 32 is written in the flash PROM 33 at every time E2, so that the flash PR which is a rewritable nonvolatile memory.
The ignition switch 75 is turned off without being limited by the number of writings of the OM 33, and the battery 7
Even when the power supply from 4 is stopped, the learned value and the like can be stored, and continuous control can be performed on the device to be controlled.

【0065】また、本発明の実施の第2の形態では、起
動回数Dが少ないうちはSRAM32からフラッシュP
ROM33への書込みの時間間隔を短くして、頻繁にフ
ラッシュPROM33の内容を書換えているので、EC
U121が制御しようとする被制御装置の特性のばらつ
きによる影響を補正して制御を行うことができる。ま
た、起動回数Dが予め定める回数C以上となったときに
は特性のばらつきを補正する値の変化が小さくなったと
して、フラッシュPROM33にデータが書込まれる時
間間隔を長くして書込みの回数を削減しているので、フ
ラッシュPROM33の書込み回数制限の影響を受ける
ことなく、かつ被制御装置の経年的な変化に対しても学
習値を書換えることによって、前記変化の影響を補正し
て制御を行うことができる。
Further, in the second embodiment of the present invention, the flash P is transferred from the SRAM 32 while the activation count D is small.
Since the content of the flash PROM 33 is frequently rewritten by shortening the time interval for writing to the ROM 33, the EC
The control can be performed by correcting the influence of the variation in the characteristics of the controlled device that the U121 tries to control. Further, when the number of times of activation D becomes equal to or more than the number of times C which is determined in advance, it is assumed that the change in the value for correcting the characteristic variation becomes small, so that the time interval for writing data in the flash PROM 33 is lengthened to reduce the number of times of writing. Therefore, it is possible to perform control by correcting the influence of the change by rewriting the learning value without being influenced by the write count limit of the flash PROM 33 and with respect to the change over time of the controlled device. You can

【0066】本発明の実施の第3の形態であるECU1
31は、図1に示すECU21と同一の構成であるの
で、構成についての説明を省略する。ECU131の特
徴は、メインプログラムの実行中にSRAM32に記憶
されている第1のデータと、第1のデータと対応するフ
ラッシュPROM33に記憶されている第2のデータと
の比較を行い、予め定める値以上の差があるときには、
前記第1のデータをフラッシュPROM33の第2のデ
ータに置換えて書込むことである。
ECU 1 according to the third embodiment of the present invention
Since 31 has the same configuration as the ECU 21 shown in FIG. 1, description of the configuration will be omitted. The characteristic of the ECU 131 is that the first data stored in the SRAM 32 during the execution of the main program is compared with the second data stored in the flash PROM 33 corresponding to the first data, and the predetermined value is set. When there is a difference above,
That is, the first data is written by replacing it with the second data in the flash PROM 33.

【0067】図11はECU131におけるメインプロ
グラムのフローチャートであり、図12はメインプログ
ラムにおいて電源投入直後に行われる初期設定処理のフ
ローチャートである。図11および図12のフローチャ
ートでは特に本発明の特徴となる処理について示した。
FIG. 11 is a flowchart of the main program in the ECU 131, and FIG. 12 is a flowchart of the initial setting process performed in the main program immediately after the power is turned on. The flowcharts shown in FIGS. 11 and 12 show the processing that is a feature of the present invention.

【0068】後述する図11に示すメインプログラムの
フローチャートで、ステップh1として行われる初期設
定処理として、ステップj1では、フラッシュPROM
33のアドレス¥2000〜¥2FFFに記憶されてい
るデータをSRAM32のアドレス¥1000〜¥1F
FFに書込む。ステップj2では、アドレス値ASを¥
1000とする。続くステップn3では、アドレス値A
Eを¥2000とする。初期設定処理の終了後は、図1
1に示すフローチャートに処理を移す。
In the flow chart of the main program shown in FIG. 11 which will be described later, in step j1, the flash PROM is used as the initialization processing performed in step h1.
The data stored in the 33rd address \ 2000 to \ 2FFF is transferred to the SRAM 32 address \ 1000 to \ 1F.
Write to FF. In step j2, the address value AS is
It is set to 1000. In the following step n3, the address value A
Let E be 2000 yen. After the initial setting process,
The processing moves to the flowchart shown in FIG.

【0069】図11のフローチャートにおいて、ステッ
プh1では前述の初期設定処理を行う。続くステップh
2では、比較データGとしてSRAM32においてアド
レス値ASで示されるアドレスに格納されているデータ
を読込む。ステップh3では、比較データHとしてフラ
ッシュPROM33においてアドレス値AEで示される
アドレスに格納されているデータを読込む。
In the flowchart of FIG. 11, in the step h1, the above-mentioned initial setting process is performed. Subsequent step h
In 2, the data stored in the SRAM 32 at the address indicated by the address value AS is read as the comparison data G. At step h3, the data stored in the address indicated by the address value AE in the flash PROM 33 is read as the comparison data H.

【0070】ステップh4では、比較データGと比較デ
ータHとの差の絶対値と、予め定める値Jとの比較を行
う。前記絶対値が、予め定める値Jよりも大きいときに
はステップh5に進む。ステップh5では、前記比較デ
ータGをアドレス値AEに書込む。
At step h4, the absolute value of the difference between the comparison data G and the comparison data H is compared with a predetermined value J. When the absolute value is larger than the predetermined value J, the process proceeds to step h5. At step h5, the comparison data G is written into the address value AE.

【0071】ステップh6では、アドレス値ASを1増
加させる。ステップh7では、アドレス値ASが¥20
00番地を示す用になったかどうかを判断する。¥20
00番地である場合にはステップh8に進む。ステップ
h8では、アドレス値ASを¥1000番地に定めてい
る。ステップh9では、アドレス値AEをアドレス値A
Sの示すアドレスの番地+¥1000番地と定めてい
る。ステップh9の処理の終了後、図示しない他の処理
を行い、ステップh2以降の処理を再び行う。
At step h6, the address value AS is incremented by 1. At step h7, the address value AS is ¥ 20.
It is determined whether or not the address is 00. ¥ 20
If the address is 00, go to step h8. At step h8, the address value AS is set to the address of \ 1000. At step h9, the address value AE is set to the address value A
It is defined as the address of the address indicated by S + 1000 yen. After the processing of step h9 ends, other processing (not shown) is performed, and the processing of step h2 and subsequent steps is performed again.

【0072】ステップh4において、前記絶対値が予め
定める値Jよりも小さいときには、ステップh6以降の
処理を行う。ステップh7において、アドレス値ASが
¥2000番地を示していない場合にはステップh9以
降の処理を行う。
At step h4, when the absolute value is smaller than the predetermined value J, the processing after step h6 is performed. At step h7, if the address value AS does not indicate the address 2,000 yen, the processing after step h9 is performed.

【0073】以上のように本発明の実施の第3の形態に
よれば、各センサ61〜71などによって検出された値
および検出された値に基づいて求められる値は、ECU
21のSRAM32に書込まれ、演算が行われる。SR
AM32に書込まれているデータとフラッシュPROM
33に書込まれているデータとに予め定める値J以上の
差があるときにはSRAM32のデータをフラッシュP
ROM33に書込むようにしているので、学習値などが
大きく変化したときのみフラッシュPROM33に書込
みを行うようになり、フラッシュPROM33に対する
書込み回数を削減しつつ、フラッシュPROM33の書
込み回数による制限を受けることなく、かつイグニッシ
ョンスイッチ75がオフされてバッテリ74からの電力
の供給が停止した場合であっても、学習値などを保存し
ておくことができ、制御を行おうとする装置に対して継
続的な制御を行うことができる。
As described above, according to the third embodiment of the present invention, the value detected by each of the sensors 61 to 71 and the value obtained based on the detected value are
21 is written in the SRAM 32, and the operation is performed. SR
Data written in AM32 and flash PROM
When there is a difference of at least a predetermined value J from the data written in 33, the data in SRAM 32 is flashed P
Since the writing is performed in the ROM 33, the writing is performed in the flash PROM 33 only when the learning value or the like largely changes, and the number of times of writing in the flash PROM 33 is reduced, without being limited by the number of times of writing in the flash PROM 33, and Even when the ignition switch 75 is turned off and the power supply from the battery 74 is stopped, the learning value and the like can be stored and the control is continuously performed for the device to be controlled. be able to.

【0074】図13は、本発明の実施の第4の形態であ
るECU81の構成を示すブロック図である。ECU8
1において、前述のECU21と同一の構成要素には同
一の参照符を付して説明を省略する。
FIG. 13 is a block diagram showing the structure of the ECU 81 according to the fourth embodiment of the present invention. ECU8
1, the same components as those of the ECU 21 described above are designated by the same reference numerals, and the description thereof will be omitted.

【0075】ECU81の特徴は、リレー回路82と、
ディレイ回路83とが設けられていて、イグニッション
スイッチ75をオフした後、予め定める時間の間に、S
RAM32に記憶されているデータを、フラッシュPR
OM33に書込むようにしていることである。
The ECU 81 is characterized by a relay circuit 82,
A delay circuit 83 is provided, and after the ignition switch 75 is turned off, S
The data stored in the RAM 32 is flash PR
That is to write in OM33.

【0076】リレー回路82は、リレースイッチ84と
リレーコイル85とを含んで構成される。イグニッショ
ンスイッチ75が導通するとディレイ回路83に電力が
供給され、リレーコイル85に所定の電圧が供給され、
リレースイッチ84が導通し、バッテリ74からの電力
が電源回路27に与えられる。イグニッションスイッチ
75が遮断されると、ディレイ回路83によって予め定
める時間はリレーコイル85に前記電圧が供給される。
したがって、前記予め定める時間の間は、バッテリ74
からの電力が電源回路27に与えられることとなる。な
お、ECU81では、イグニッションスイッチ75がオ
ンされたかオフされたかを示す情報が制御回路22に与
えられる。
The relay circuit 82 includes a relay switch 84 and a relay coil 85. When the ignition switch 75 is turned on, power is supplied to the delay circuit 83 and a predetermined voltage is supplied to the relay coil 85,
The relay switch 84 is turned on, and the power from the battery 74 is supplied to the power supply circuit 27. When the ignition switch 75 is cut off, the delay circuit 83 supplies the voltage to the relay coil 85 for a predetermined time.
Therefore, during the predetermined time, the battery 74
The electric power from is supplied to the power supply circuit 27. In the ECU 81, the control circuit 22 is provided with information indicating whether the ignition switch 75 is turned on or off.

【0077】図14は、ECU81の動作を説明するた
めのタイミングチャートである。図14(1)は、イグ
ニッションスイッチ75が導通しているかどうかを示す
信号IGの波形図であり、図14(2)は電源電圧レベ
ルを示す。
FIG. 14 is a timing chart for explaining the operation of the ECU 81. FIG. 14 (1) is a waveform diagram of the signal IG indicating whether or not the ignition switch 75 is conducting, and FIG. 14 (2) shows the power supply voltage level.

【0078】時刻t10でイグニッションスイッチ75
がオフされると信号IGはONレベルからOFFレベル
となる。ディレイ回路83によって、時刻t10から時
刻t11までの期間W11の間リレーコイル85に電圧
が供給され、電源電圧レベルがハイレベルのままとな
る。この期間W11の間に前記書込み動作を行う。
At time t10, the ignition switch 75
When is turned off, the signal IG changes from the ON level to the OFF level. The delay circuit 83 supplies a voltage to the relay coil 85 during the period W11 from time t10 to time t11, and the power supply voltage level remains high. The writing operation is performed during this period W11.

【0079】図15は、ECU81で行われる初期設定
処理のフローチャートである。本発明を説明するために
必要となる部分の処理を示す。ステップc1において、
フラッシュPROM33のアドレス¥2000〜¥2F
FFに記憶されているデータをSRAM32のアドレス
¥1000〜¥1FFFに書込む。ステップc1の処理
の終了後、たとえば図6、図9、図11に示すフローチ
ャートに処理を移す。
FIG. 15 is a flowchart of the initial setting process performed by the ECU 81. The processing of the part necessary for explaining the present invention is shown. In step c1,
Flash PROM 33 address \ 2000 to \ 2F
The data stored in the FF is written into the SRAM 32 at addresses \ 1000 to \ 1FFF. After the processing of step c1 is completed, the processing is shifted to, for example, the flowcharts shown in FIGS. 6, 9, and 11.

【0080】図16は、イグニッションスイッチ75が
オフされたときの処理を示すフローチャートである。た
とえば図6、図9、図11のようなメインプログラムの
実行中に、イグニッションスイッチ75がオフされる
と、ステップd1の処理が行われる。ステップd1で
は、SRAM32のアドレス¥1000〜¥1FFFに
記憶されているデータをフラッシュPROM33のアド
レス¥2000〜¥2FFFに書込む。データの書込み
終了後、処理を終了する。
FIG. 16 is a flow chart showing the processing when the ignition switch 75 is turned off. For example, when the ignition switch 75 is turned off during execution of the main program as shown in FIGS. 6, 9, and 11, the process of step d1 is performed. At step d1, the data stored in the SRAM 32 at the addresses \ 1000 to \ 1FFF are written to the flash PROM 33 at the addresses \ 2000 to \ 2FFF. After the data writing is completed, the processing is ended.

【0081】以上のように本発明の実施の第4の形態に
よれば、イグニッションスイッチ75をオフした後も予
め定める時間、たとえば期間W11の間、電力が供給さ
れるので、イグニッションスイッチ75がオフされたこ
とに応答して、SRAM32に記憶されているデータを
フラッシュPROM33に書込むことができる。フラッ
シュPROM33に書込まれるデータは、イグニッショ
ンスイッチ75がオンである間でSRAM32に最後に
書込まれた値であるので、もっとも最新の学習値を用い
て次にイグニッションスイッチ75がオンしてからの制
御を開始することができる。
As described above, according to the fourth embodiment of the present invention, since the power is supplied for a predetermined time even after the ignition switch 75 is turned off, for example, the period W11, the ignition switch 75 is turned off. In response to this, the data stored in the SRAM 32 can be written in the flash PROM 33. Since the data written in the flash PROM 33 is the value last written in the SRAM 32 while the ignition switch 75 is on, the most recent learned value is used to turn on the ignition switch 75 next time. Control can be initiated.

【0082】図17は、本発明の実施の第5の形態であ
るECU91におけるSRAM92およびフラッシュP
ROM93の構造を示す図である。ECU91は、SR
AM92およびフラッシュPROM93を除いては、図
1に示すECU21と同一の構成要素によって構成され
るので、各構成要素についての説明を省略する。
FIG. 17 shows the SRAM 92 and the flash P in the ECU 91 according to the fifth embodiment of the present invention.
It is a figure which shows the structure of ROM93. ECU91 is SR
Except for the AM 92 and the flash PROM 93, the configuration is the same as that of the ECU 21 shown in FIG. 1, and therefore the description of each component will be omitted.

【0083】ECU91の特徴は、車両各部に取付けら
れているセンサからの出力が異常であると判断すると、
SRAM92の領域94bに記憶されているフラグを異
常が発生したことを示す状態へと書換え、以後の制御を
予め定める正常な値で行うことである。
The characteristic of the ECU 91 is that when it is judged that the outputs from the sensors attached to various parts of the vehicle are abnormal.
That is, the flag stored in the area 94b of the SRAM 92 is rewritten to a state indicating that an abnormality has occurred, and the subsequent control is performed with a predetermined normal value.

【0084】図17(1)に示すSRAM92は、アド
レス¥1000〜¥1F00までの領域94aと、アド
レス¥1F00〜¥1FFFまでの領域94bとを含ん
で構成される。領域94aには、前述の各実施例におけ
るSRAM32と同様に学習値などが書込まれる。領域
94bには、異常を検出したことを示すフラグが記憶さ
れる。前記フラグは、ECU91が制御しようとする装
置において発生すると考えられる異常の種類毎に定めら
れる。
The SRAM 92 shown in FIG. 17 (1) is configured to include an area 94a from address \ 1000 to \ 1F00 and an area 94b from address \ 1F00 to \ 1FFF. In the area 94a, learning values and the like are written as in the SRAM 32 in each of the above-described embodiments. A flag indicating that an abnormality has been detected is stored in area 94b. The flag is set for each type of abnormality considered to occur in the device that the ECU 91 attempts to control.

【0085】図17(2)に示すフラッシュPROM9
3は、アドレス¥2000〜¥2F00までの領域95
aと、アドレス¥2F00〜¥2FFFまでの領域95
bとを含んで構成される。領域95aには、前述の領域
94aに記憶されている学習値などが書込まれる。領域
95bには、前述の領域94bに記憶されているフラグ
が記憶される。
Flash PROM 9 shown in FIG. 17 (2)
3 is the area 95 from address \ 2000 to \ 2F00
a and area 95 from address \ 2F00 to \ 2FFF
and b. The learning value and the like stored in the area 94a described above are written in the area 95a. The area 95b stores the flag stored in the area 94b.

【0086】図18はECU91の動作を説明するため
のECU91と冷却水温度検出器64との接続関係を示
す図であり、図19は冷却水温度検出器64の出力が有
効となる範囲を説明するためのグラフである。
FIG. 18 is a diagram showing a connection relationship between the ECU 91 and the cooling water temperature detector 64 for explaining the operation of the ECU 91, and FIG. 19 shows a range in which the output of the cooling water temperature detector 64 is effective. It is a graph for doing.

【0087】入力バッファ回路23は、たとえば予め定
める抵抗値を有する抵抗96,97を含んで構成され
る。冷却水温度検出器64から端子98を介してECU
21に与えられたアナログの信号は、入力バッファ回路
23において抵抗97を介してADC25に与えられ
る。前記信号は、ADC25でデジタルの信号へと変換
され、制御回路22へと与えられる。入力バッファ回路
23においては、電源回路27から供給される電源電圧
が抵抗96を介して所定の電流値の電流として抵抗92
に与えられる。抵抗96およびADC25には、電源回
路27から、たとえば5Vの電圧が与えられる。
Input buffer circuit 23 includes resistors 96 and 97 each having a predetermined resistance value, for example. ECU from the cooling water temperature detector 64 via the terminal 98
The analog signal given to 21 is given to the ADC 25 via the resistor 97 in the input buffer circuit 23. The signal is converted into a digital signal by the ADC 25 and given to the control circuit 22. In the input buffer circuit 23, the power supply voltage supplied from the power supply circuit 27 is passed through the resistor 96 as a current of a predetermined current value to the resistor 92.
Given to. A voltage of, for example, 5V is applied from power supply circuit 27 to resistor 96 and ADC 25.

【0088】図19において、縦軸はADC25に入力
される電圧を示し、横軸は水温を示す。冷却水温度検出
器64から出力される電圧に基づいて内燃機関50にお
ける冷却媒体である冷却水の温度を算出することができ
る。ECU21では、水温が−30度未満となった場合
と、120度を超えた場合とを異常である状態としてい
る。ADC25に入力される電圧値は、水温が−30度
である場合には4.7Vであり、120度である場合に
は0.3Vである。冷却水温度検出器64の誤差などを
考慮して±0.2V分正常と認める範囲を広げている。
したがって、電圧値が4.9Vを超える場合と、0.1
V未満である場合とが異常状態であると判断される。
In FIG. 19, the vertical axis represents the voltage input to the ADC 25, and the horizontal axis represents the water temperature. The temperature of the cooling water that is the cooling medium in the internal combustion engine 50 can be calculated based on the voltage output from the cooling water temperature detector 64. The ECU 21 determines that the case where the water temperature is below -30 degrees and the case where the water temperature exceeds 120 degrees are abnormal. The voltage value input to the ADC 25 is 4.7 V when the water temperature is -30 degrees and 0.3 V when the water temperature is 120 degrees. In consideration of the error of the cooling water temperature detector 64 and the like, the range recognized as normal is expanded by ± 0.2V.
Therefore, if the voltage value exceeds 4.9 V,
When it is less than V, it is determined to be an abnormal state.

【0089】図20は、冷却水温度検出器64について
の制御回路22における処理を示すフローチャートであ
る。本フローチャートは、たとえば図6などに示すメイ
ンプログラムのフローチャートの実行中に、たとえば1
6ms毎に割込んで行われる。
FIG. 20 is a flow chart showing the processing in the control circuit 22 for the cooling water temperature detector 64. This flowchart is executed while the main program flowchart shown in FIG.
It is performed by interrupting every 6 ms.

【0090】ステップg1では、冷却水温度検出器64
の出力を読込む。ステップg2では、冷却水温度検出器
64の出力である電圧が、0.1Vから4.9Vまでの
範囲にあるかどうかを判断する。ステップg2におい
て、検出された値が前記範囲内の値であると判断された
場合には、ステップg3に進む。ステップg3では冷却
水温度検出器64からの出力を実際の温度に換算する。
ステップg3の処理の終了後メインプログラムの処理に
戻る。
In step g1, the cooling water temperature detector 64
Read the output of. In step g2, it is determined whether the voltage output from the cooling water temperature detector 64 is in the range of 0.1V to 4.9V. If it is determined in step g2 that the detected value is within the above range, the process proceeds to step g3. At step g3, the output from the cooling water temperature detector 64 is converted into the actual temperature.
After the processing of step g3 ends, the processing returns to the processing of the main program.

【0091】ステップg2において、前記電圧が0.1
V未満であるか、4.9Vを超えていると判断されたと
きにはステップg4に進む。ステップg4では、冷却水
の温度が異常である判定する。続くステップg5では、
異常である冷却水温度検出器64の出力に換えて、予め
定める設定値を冷却水の温度として定める。以後のメイ
ンプログラムの処理では、設定値に基づいて演算が行わ
れる。ECU91では、たとえば前記設定値として示さ
れる温度を80度とする。
In step g2, the voltage is set to 0.1.
When it is determined that the voltage is less than V or exceeds 4.9V, the process proceeds to step g4. At step g4, it is determined that the temperature of the cooling water is abnormal. In the following step g5,
Instead of the abnormal output of the cooling water temperature detector 64, a preset value is set as the cooling water temperature. In the subsequent processing of the main program, the calculation is performed based on the set value. In the ECU 91, for example, the temperature indicated as the set value is set to 80 degrees.

【0092】ステップg6では、SRAM32における
冷却水の温度に異常が発生したことを示すフラグを変化
させて、異常が発生したことを記憶する。ステップg7
では、フラッシュPROM33における冷却水の温度に
異常が発生したことを示すフラグを変化させて、異常が
発生したことを記憶する。ステップg7の処理の終了後
メインプログラムの処理に戻る。
At step g6, a flag indicating that an abnormality has occurred in the temperature of the cooling water in the SRAM 32 is changed to store the occurrence of the abnormality. Step g7
Then, the flag indicating that an abnormality has occurred in the temperature of the cooling water in the flash PROM 33 is changed to store the occurrence of the abnormality. After the processing of step g7 ends, the processing returns to the processing of the main program.

【0093】ECU91におけるメインプログラムの処
理および初期設定処理としては、前述の図6および図7
に示すフローチャートの処理が行われる。
The main program process and the initial setting process in the ECU 91 are the same as those shown in FIGS.
The process of the flowchart shown in FIG.

【0094】以上のように本発明の実施の第5の形態に
よれば、各センサ61〜71などによって検出された値
が予め定める範囲内の値であるかどうかによって検出さ
れた値が正常であるかどうかを判断し、正常である場合
には検出された値を用いて演算を行い、異常である場合
には予め定める設定値を用いて演算を行うようにし、異
常を検出したことをSRAM32の領域94bおよびフ
ラッシュPROM33の領域95bにそれぞれ記憶する
ので、異常を検出したことを示す情報を継続的に記憶し
ておくことができ、点検などを行う際に参照して整備を
行うことができる。
As described above, according to the fifth embodiment of the present invention, the value detected by each of the sensors 61 to 71 and the like is normal and the detected value is normal. It is determined whether or not there is any, and if it is normal, the detected value is used for calculation, and if it is abnormal, the calculation is performed using a preset set value. Area 94b of the flash PROM 33 and the area 95b of the flash PROM 33, information indicating that an abnormality has been detected can be continuously stored, and can be referred to for maintenance when performing inspection or the like. .

【0095】なお、上述の第1〜第5の各実施の形態に
ついて、それぞれ単独で実施した場合について示した
が、それぞれ1または複数の実施の形態を組合わせて行
うようにしてもよい。
Although each of the above-described first to fifth embodiments is described as being carried out independently, one or a plurality of embodiments may be combined.

【0096】[0096]

【発明の効果】以上のように本発明によれば、処理装置
が制御しようとする被制御装置毎に定められる学習値
は、1または複数の条件のうち少なくとも1つが満たさ
れるごとに書換え可能な不揮発性メモリに書込まれるの
で、学習値を用いて被制御装置に対して継続的な制御を
行うことができ、かつ前記補正値に基づいて変更される
学習値を不揮発性メモリに書込む回数を削減することが
できる。
As described above, according to the present invention, the learning value determined for each controlled device to be controlled by the processing device can be rewritten every time at least one of one or a plurality of conditions is satisfied. Since it is written in the non-volatile memory, the controlled value can be continuously controlled using the learned value, and the learning value changed based on the correction value can be written in the non-volatile memory. Can be reduced.

【0097】また本発明によれば、予め定める時間毎に
学習値が不揮発性メモリに書き込まれることとなり、不
揮発性メモリに書込みを行う回数を削減しつつ確実に学
習値を不揮発性メモリに記憶させることができる。ま
た、不揮発性メモリに学習値が記憶されるので、学習値
を用いて被制御装置に対して継続的な制御を行うことが
できる。
Further, according to the present invention, the learning value is written in the non-volatile memory at every predetermined time, and the learning value is surely stored in the non-volatile memory while reducing the number of times of writing in the non-volatile memory. be able to. Further, since the learning value is stored in the non-volatile memory, it is possible to continuously control the controlled device using the learning value.

【0098】さらに本発明によれば、制御手段は予め定
める期間が経過するまでは予め定める時間毎に学習値を
不揮発性メモリに書込むことによって、被制御装置に応
じた学習値へと変更することができ、予め定める期間が
経過した後は予め定める時間に追加時間を足合わせた時
間毎に学習値を不揮発性メモリに書込むことによって、
書込み回数を削減しつつ学習値を記憶することができ
る。
Further, according to the present invention, the control means writes the learning value into the non-volatile memory at each predetermined time until the predetermined period elapses, thereby changing the learning value to the learning value according to the controlled device. It is possible to write the learning value to the non-volatile memory every time when the predetermined time has elapsed and the additional time is added to the predetermined time.
The learning value can be stored while reducing the number of times of writing.

【0099】さらに本発明によれば、制御手段は起動回
数が予め定める値となるまでは予め定める時間毎に学習
値を不揮発性メモリに書込むことによって、被制御装置
に応じた学習値へと変更することができ、起動回数が予
め定める値となった後は予め定める時間に追加時間を足
合わせた時間毎に学習値を不揮発性メモリに書込むこと
によって、書込み回数を削減しつつ学習値を記憶するこ
とができる。
Further, according to the present invention, the control means writes the learning value in the non-volatile memory at each predetermined time until the number of times of activation reaches the predetermined value, thereby obtaining the learning value according to the controlled device. It can be changed, and after the number of activations reaches a predetermined value, the learning value is written to the non-volatile memory every time the additional time is added to the predetermined time, thereby reducing the number of writings and learning value. Can be memorized.

【0100】さらに本発明によれば、揮発性メモリに記
憶されている学習値と、不揮発性メモリに記憶されてい
る学習値との差が予め定める値以上となったときのみ不
揮発性メモリに書込みが行われるので、学習値を不揮発
性メモリに記憶しつつ不揮発性メモリに対する書込み回
数を削減することができる。
Further, according to the present invention, only when the difference between the learning value stored in the volatile memory and the learning value stored in the non-volatile memory becomes equal to or more than a predetermined value, the data is written in the non-volatile memory. Since the learning value is stored in the non-volatile memory, the number of writings to the non-volatile memory can be reduced.

【0101】さらに本発明によれば、予め定める時間間
隔毎に行われる比較によって、揮発性メモリに記憶され
ている学習値と、不揮発性メモリに記憶されている学習
値との差が予め定める値以上であると判断されたときの
み不揮発性メモリに書込みが行われるので、学習値を不
揮発性メモリに記憶しつつ不揮発性メモリに対する書込
み回数を削減することができる。
Further, according to the present invention, the difference between the learning value stored in the volatile memory and the learning value stored in the non-volatile memory is a predetermined value by comparison performed at predetermined time intervals. Since the writing is performed in the non-volatile memory only when it is determined that the above is the case, it is possible to reduce the number of times of writing in the non-volatile memory while storing the learning value in the non-volatile memory.

【0102】さらに本発明によれば、不揮発性メモリに
書込まれる学習値は、最も最新の学習値であるスイッチ
ング手段が遮断されたときの学習値であるので、次にス
イッチング手段が導通されて制御を開始するときに、最
新の学習値を用いて制御を開始することができる。ま
た、スイッチング手段が遮断されたときに書込みを行う
ので不揮発性メモリに対する書込み回数を削減すること
ができる。
Further, according to the present invention, the learning value written in the non-volatile memory is the learning value when the switching means, which is the latest learning value, is cut off. When starting the control, the latest learned value can be used to start the control. Moreover, since the writing is performed when the switching means is cut off, the number of times of writing to the nonvolatile memory can be reduced.

【0103】さらに本発明によれば、前記情報が予め定
める範囲内の値でない場合には、学習値が不揮発性メモ
リに記憶され、以後の制御が設定値を用いて行われるの
で、異常な情報を用いて被制御装置の制御を行うことが
なく、また異常な情報によって学習値が不所望な値とな
ることを防止することができる。
Further, according to the present invention, when the information is not a value within a predetermined range, the learned value is stored in the non-volatile memory and the subsequent control is performed using the set value, so that the abnormal information It is possible to prevent the controlled device from being controlled by using, and to prevent the learning value from becoming an undesired value due to abnormal information.

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

【図1】本発明の実施の第1の形態であるECU21お
よびECU81,121の構成を示すブロック図であ
る。
FIG. 1 is a block diagram showing a configuration of an ECU 21 and ECUs 81, 121 according to a first embodiment of the present invention.

【図2】ECU21に関連する構成の一例を示すブロッ
ク図である。
FIG. 2 is a block diagram showing an example of a configuration related to an ECU 21.

【図3】ECU21によって行われる制御の一例を説明
するためのタイミングチャートである。
FIG. 3 is a timing chart for explaining an example of control performed by the ECU 21.

【図4】酸素濃度についての処理を示すフローチャート
である。
FIG. 4 is a flowchart showing a process for oxygen concentration.

【図5】ECU21における燃料の噴射時間を定めるた
めのフローチャートである。
FIG. 5 is a flowchart for determining a fuel injection time in the ECU 21.

【図6】ECU21におけるメインプログラムのフロー
チャートである。
FIG. 6 is a flowchart of a main program in the ECU 21.

【図7】ECU21における初期設定処理のフローチャ
ートである。
FIG. 7 is a flowchart of an initial setting process in the ECU 21.

【図8】本発明の実施の第2の形態であるECU121
の動作を説明するためのタイミングチャートである。
FIG. 8 is an ECU 121 that is a second embodiment of the present invention.
3 is a timing chart for explaining the operation of FIG.

【図9】ECU121におけるメインプログラムのフロ
ーチャートである。
FIG. 9 is a flowchart of a main program in the ECU 121.

【図10】ECU121における初期設定処理のフロー
チャートである。
FIG. 10 is a flowchart of an initial setting process in the ECU 121.

【図11】本発明の実施の第3の形態であるECU13
1におけるメインプログラムのフローチャートである。
FIG. 11 is an ECU 13 that is a third embodiment of the present invention.
3 is a flowchart of a main program in FIG.

【図12】ECU131における初期設定処理のフロー
チャートである。
FIG. 12 is a flowchart of an initial setting process in the ECU 131.

【図13】本発明の実施の第4の形態であるECU81
の構成を示すブロック図である。
FIG. 13 is an ECU 81 according to a fourth embodiment of the present invention.
FIG. 3 is a block diagram showing the configuration of FIG.

【図14】ECU81の動作を説明するためのタイミン
グチャートである。
FIG. 14 is a timing chart for explaining the operation of the ECU 81.

【図15】ECU81における初期設定処理のフローチ
ャートである。
FIG. 15 is a flowchart of an initial setting process in the ECU 81.

【図16】ECU81においてイグニッションスイッチ
75がオフされたときの処理を示すフローチャートであ
る。
FIG. 16 is a flowchart showing a process when the ignition switch 75 is turned off in the ECU 81.

【図17】本発明の実施の第5の形態であるECU91
におけるSRAM32およびフラッシュPROM33の
構造を示す図である。
FIG. 17 is an ECU 91 that is a fifth embodiment of the present invention.
FIG. 3 is a diagram showing structures of an SRAM 32 and a flash PROM 33 in FIG.

【図18】ECU91と冷却水温度検出器64との接続
関係を示す図である。
FIG. 18 is a diagram showing a connection relationship between an ECU 91 and a cooling water temperature detector 64.

【図19】冷却水温度検出器64の出力が有効となる範
囲を説明するためのグラフである。
FIG. 19 is a graph for explaining a range in which the output of the cooling water temperature detector 64 is effective.

【図20】冷却水温度検出器64についての制御回路2
2における処理を示すフローチャートである。
FIG. 20 is a control circuit 2 for the cooling water temperature detector 64.
6 is a flowchart showing a process in 2.

【図21】第1の先行技術であるECU1の構造を示す
ブロック図である。
FIG. 21 is a block diagram showing the structure of an ECU 1 as a first prior art.

【図22】第2の先行技術であるECU11の構造を示
すブロック図である。
FIG. 22 is a block diagram showing the structure of an ECU 11 that is second prior art.

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

21,81,91,121,131 ECU 22 制御回路 23,24 入力インタフェイス 25 ADC 26 出力インタフェイス 27 電源回路 31 I/O 32 SRAM 33 フラッシュPROM 34 タイマ 74 バッテリ 75 イグニッションキー 21, 81, 91, 121, 131 ECU 22 Control circuit 23, 24 Input interface 25 ADC 26 Output interface 27 Power supply circuit 31 I / O 32 SRAM 33 Flash PROM 34 Timer 74 Battery 75 Ignition key

Claims (8)

【特許請求の範囲】[Claims] 【請求項1】 情報を検出して出力する1または複数の
検出手段からの情報に基づいて定められる基本値と、基
本値を定める情報と同一かもしくは異なる情報に基づい
て定められる補正値とに基づいて演算を行い、演算結果
に基づいて被制御装置を制御する処理装置であって、 前記基本値と前記補正値に基づいて求められる学習値と
が記憶されており、書換えを指示する信号が与えられる
と学習値が書換えられる書換え可能な不揮発性メモリ
と、 前記基本値と補正値と学習値とが一時的に記憶される揮
発性メモリと、 予め定める電圧の電力を供給する電源手段と、 前記電源手段からの電圧の供給が開始されると、不揮発
性メモリに記憶されている学習値を読出して揮発性メモ
リに書込み、前記補正値と基本値と学習値とに基づいて
演算を行い、演算結果に基づいて被制御装置を制御し、
補正値に基づいて揮発性メモリに記憶されている学習値
を書換え、1または複数の予め定める条件のうちの少な
くとも1つが満たされる度に不揮発性メモリに前記書換
えを指示する信号を与え、揮発性メモリに記憶されてい
る前記学習値を不揮発性メモリに書込む制御手段とを含
むことを特徴とする処理装置。
1. A basic value determined based on information from one or a plurality of detecting means for detecting and outputting information, and a correction value determined based on information that is the same as or different from the information that determines the basic value. A processing device that performs a calculation based on the calculation result and controls the controlled device based on the calculation result, in which a learning value obtained based on the basic value and the correction value is stored, and a signal instructing rewriting is A rewritable non-volatile memory in which the learned value is rewritten when given, a volatile memory in which the basic value, the correction value, and the learned value are temporarily stored, and a power supply unit that supplies electric power of a predetermined voltage, When the supply of the voltage from the power supply means is started, the learning value stored in the non-volatile memory is read and written in the volatile memory, and the calculation is performed based on the correction value, the basic value and the learning value. Controls the controlled device based on the calculation results,
The learning value stored in the volatile memory is rewritten based on the correction value, and a signal for instructing the rewriting is given to the nonvolatile memory every time at least one of one or a plurality of predetermined conditions is satisfied, And a control unit that writes the learned value stored in the memory into a non-volatile memory.
【請求項2】 電源手段からの電力の供給が開始される
と計時を開始する計時手段を備え、 前記制御手段は、計時手段の出力が予め定める時間の経
過を示したことを前記予め定める条件とすることを特徴
とする請求項1記載の処理装置。
2. The pre-determined condition is that the control means includes timing means for starting timing when power supply from the power source means is started, and the control means indicates that the output of the timing means has passed a predetermined time. The processing apparatus according to claim 1, wherein:
【請求項3】 前記制御手段は、予め定める時間よりも
充分に長く定められる予め定める期間が経過すると、前
記予め定める時間に予め定める追加時間を追加すること
を特徴とする請求項2記載の処理装置。
3. The process according to claim 2, wherein the control unit adds a predetermined additional time to the predetermined time when a predetermined period that is sufficiently longer than the predetermined time has elapsed. apparatus.
【請求項4】 前記制御手段と電源手段との間に介挿さ
れ、導通/遮断を制御するスイッチング手段を備え、ス
イッチング手段によって電源の供給が開始されるたびに
不揮発性メモリに記憶されている起動回数値を1増加
し、起動回数値が予め定める値となると、前記予め定め
る時間に予め定める追加時間を追加することを特徴とす
る請求項2記載の処理装置。
4. A switching means interposed between the control means and the power supply means for controlling conduction / interruption is provided, and is stored in the non-volatile memory each time the power supply is started by the switching means. 3. The processing device according to claim 2, wherein when the value of the number of activations is incremented by 1 and the value of the number of activations reaches a predetermined value, a predetermined additional time is added to the predetermined time.
【請求項5】 前記制御手段は、不揮発性メモリに記憶
されている学習値と、揮発性メモリに記憶されている学
習値との比較を行い、2つの学習値に予め定める値以上
の差が生じたことを前記予め定める条件とすることを特
徴とする請求項1〜4のいずれか1つに記載の処理装
置。
5. The control means compares the learning value stored in the non-volatile memory with the learning value stored in the volatile memory, and the two learning values are equal to or more than a predetermined value. The processing apparatus according to any one of claims 1 to 4, wherein the occurrence is set as the predetermined condition.
【請求項6】 前記計時手段の出力に基づいて、予め定
める時間間隔毎に前記比較を行うことを特徴とする請求
項5記載の処理装置。
6. The processing apparatus according to claim 5, wherein the comparison is performed at predetermined time intervals based on the output of the time measuring means.
【請求項7】 前記制御手段と電源手段との間に介挿さ
れ、導通/遮断を制御するスイッチング手段と、 制御手段と電源手段との間で、かつスイッチング手段と
並列に介挿され、前記スイッチング手段が遮断される
と、予め定める第1の時間導通して制御手段に電力を供
給する電力供給手段とを備え、 前記制御手段は、スイッチング手段によって電源手段か
らの電力の供給が停止されたことを前記予め定める条件
とし、電力供給手段を介して供給される電力によって、
揮発性メモリに記憶されている学習値を不揮発性メモリ
に書込むことを特徴とする請求項1〜6のいずれか1つ
に記載の処理装置。
7. A switching means interposed between the control means and the power supply means for controlling conduction / interruption; and a switching means interposed between the control means and the power supply means and in parallel with the switching means, When the switching means is cut off, there is provided a power supply means for conducting for a predetermined first time to supply power to the control means, wherein the control means stops the power supply from the power supply means by the switching means. With the above-mentioned predetermined condition, by the power supplied through the power supply means,
7. The processing device according to claim 1, wherein the learning value stored in the volatile memory is written in the non-volatile memory.
【請求項8】 前記検出手段と制御手段との間に介挿さ
れ、検出手段によって検出された情報が予め定める範囲
内の値であるかどうかを判定する判定手段を備え、 前記揮発性および不揮発性メモリは、前記予め定める範
囲外の値が前記検出手段で検出されたことを示す異状検
出情報が書込まれる異状検出情報記憶領域を含んで構成
され、 前記制御手段は、検出手段からの情報が判定手段によっ
て予め定める範囲内の値ではないと判定されると、異状
検出情報を揮発性および不揮発性メモリの異状検出情報
記憶領域に書込み、以後は補正値と学習値とに換えて予
め定める範囲内の値である設定値を用いて前記演算を行
うことを特徴とする請求項1〜7のいずれか1つに記載
の処理装置。
8. The volatile and non-volatile means is provided between the detection means and the control means, and comprises determination means for determining whether or not the information detected by the detection means is a value within a predetermined range. The memory is configured to include an abnormality detection information storage area in which abnormality detection information indicating that a value outside the predetermined range is detected by the detection means is written, and the control means includes information from the detection means. If the determination means determines that the value is not within the predetermined range, the abnormality detection information is written in the abnormality detection information storage area of the volatile and non-volatile memory, and thereafter, the correction value and the learning value are replaced with the predetermined value. The processing apparatus according to claim 1, wherein the calculation is performed using a set value that is a value within a range.
JP4931396A 1996-03-06 1996-03-06 Processor Withdrawn JPH09244707A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP4931396A JPH09244707A (en) 1996-03-06 1996-03-06 Processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP4931396A JPH09244707A (en) 1996-03-06 1996-03-06 Processor

Publications (1)

Publication Number Publication Date
JPH09244707A true JPH09244707A (en) 1997-09-19

Family

ID=12827480

Family Applications (1)

Application Number Title Priority Date Filing Date
JP4931396A Withdrawn JPH09244707A (en) 1996-03-06 1996-03-06 Processor

Country Status (1)

Country Link
JP (1) JPH09244707A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7003382B2 (en) 2003-04-11 2006-02-21 Denso Corporation Electronic control unit for a vehicle
US7369926B2 (en) 2004-08-31 2008-05-06 Mitsubishi Denki Kabushiki Kaisha On-vehicle electronic control unit
JP2009199219A (en) * 2008-02-20 2009-09-03 Yamatake Corp Pid control device, and method for protecting nonvolatile memory
CN104599708A (en) * 2015-01-16 2015-05-06 珠海格力电器股份有限公司 Display data storage method

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7003382B2 (en) 2003-04-11 2006-02-21 Denso Corporation Electronic control unit for a vehicle
US7369926B2 (en) 2004-08-31 2008-05-06 Mitsubishi Denki Kabushiki Kaisha On-vehicle electronic control unit
CN100425817C (en) * 2004-08-31 2008-10-15 三菱电机株式会社 On-vehicle electronic control unit
JP2009199219A (en) * 2008-02-20 2009-09-03 Yamatake Corp Pid control device, and method for protecting nonvolatile memory
CN104599708A (en) * 2015-01-16 2015-05-06 珠海格力电器股份有限公司 Display data storage method

Similar Documents

Publication Publication Date Title
JPS6336408B2 (en)
JP2007262945A (en) Abnormality diagnosis device for exhaust gas sensor
JP4873378B2 (en) Abnormality diagnosis device for intake air volume sensor
JPS6335825B2 (en)
JP2554854B2 (en) Learning control method for automobile engine
JP3454182B2 (en) Control device for internal combustion engine
JP5208680B2 (en) Control apparatus and control method
JPH09244707A (en) Processor
WO2006008975A1 (en) Method and device for controlling fuel injection of engine
JPH04292545A (en) Electronic control device for automobile
JP4492802B2 (en) Air-fuel ratio control device
JP3991963B2 (en) Vehicle control device
JPS6313013B2 (en)
JPH0437260B2 (en)
JP2004232460A (en) Misfire detection device for internal combustion engine
JPH051373B2 (en)
JPS6054005A (en) On-vehicle electronic feedback controller
JP3046475B2 (en) Starting fuel control method
JPH0214534B2 (en)
JPH0615840B2 (en) Vehicle control device
JP2500946Y2 (en) Electronically controlled fuel supply system for internal combustion engine
JPH0248728B2 (en)
JPH0733799B2 (en) Idle speed control method for internal combustion engine
JPH06272604A (en) Controller of engine
JPH0478828B2 (en)

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20030506