JPH07239777A - Electronic controller with one-chip microcomputer, and its control data storing method - Google Patents

Electronic controller with one-chip microcomputer, and its control data storing method

Info

Publication number
JPH07239777A
JPH07239777A JP2842394A JP2842394A JPH07239777A JP H07239777 A JPH07239777 A JP H07239777A JP 2842394 A JP2842394 A JP 2842394A JP 2842394 A JP2842394 A JP 2842394A JP H07239777 A JPH07239777 A JP H07239777A
Authority
JP
Japan
Prior art keywords
control data
data
area
chip microcomputer
model
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.)
Granted
Application number
JP2842394A
Other languages
Japanese (ja)
Other versions
JP3127703B2 (en
Inventor
Katsuharu Hosoe
克治 細江
Hiroo Utsumi
博雄 慈
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Denso Corp
Original Assignee
NipponDenso Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NipponDenso Co Ltd filed Critical NipponDenso Co Ltd
Priority to JP2842394A priority Critical patent/JP3127703B2/en
Publication of JPH07239777A publication Critical patent/JPH07239777A/en
Application granted granted Critical
Publication of JP3127703B2 publication Critical patent/JP3127703B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Abstract

PURPOSE:To prevent the productivity from deteriorating and data from being misset without spoiling the flexibility of one-chip microcomputer by providing a mask ROM with a storage area wherein 1st control data transferred to a 1st storage area of an EEPROM are previously registered. CONSTITUTION:A ROM 12 is formed as a mask ROM, and common data which are set in its common data area are automatically transferred to the EEPROM 14 at the time of the 1st execution of an initialization routine. The EEPROM 14 is a rewritable nonvolatile memory, and its common data area is an area wherein the common data automatically transferred from the ROM 12 or common data 6 transferred to a microcomputer 10 through an external device 5 at need are stored. Further, a machine-kind distinctive data area is an area where machine-kind distinctive data 7 transferred to the microcomputer 10 through the external device 5 at the time of shipping are stored.

Description

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

【0001】[0001]

【産業上の利用分野】この発明は、例えば自動車等にお
いて、エンジンの燃料噴射量や点火時期等を電子的に制
御する電子制御装置及び同装置への制御データ記憶方法
に関し、特に同電子制御装置としてワンチップマイクロ
コンピュータを具える装置に適用して好適な構成、並び
にその制御データ記憶方法の具現に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an electronic control unit for electronically controlling the fuel injection amount and ignition timing of an engine and a control data storing method for the unit, for example, in an automobile, and more particularly to the electronic control unit. The present invention relates to a configuration suitable for application to a device including a one-chip microcomputer as well as an implementation of a control data storage method thereof.

【0002】[0002]

【従来の技術】近年、自動車のエンジン制御等に使用さ
れる電子制御装置の多くはワンチップのマイクロコンピ
ュータ、すなわちCPUをはじめとして、ROMやRA
M、入出力制御部等を1つのIC(LSI)チップ内に
集積したマイクロコンピュータを使用している。
2. Description of the Related Art In recent years, most of electronic control devices used for engine control of automobiles include one-chip microcomputers, that is, CPUs, ROMs and RAs.
A microcomputer in which M, an input / output control unit, etc. are integrated in one IC (LSI) chip is used.

【0003】ところで、こうしたワンチップのマイクロ
コンピュータにあっては通常、その内部ROMとして、
IC(LSI)製造工程で用いるマスクによってプログ
ラムやデータを固定的に書き込む、いわゆるマスクRO
Mを用いている。このため、ワンチップマイクロコンピ
ュータとしての量産性や経済性は向上されるものの、そ
こに記述(記憶)されたプログラムやデータについての
変更は不可能となり、同マイクロコンピュータとしての
汎用性は逆に損なわれることとなっている。
By the way, in such a one-chip microcomputer, as its internal ROM,
A so-called mask RO in which programs and data are fixedly written by a mask used in an IC (LSI) manufacturing process.
M is used. Therefore, although the mass productivity and the economical efficiency of the one-chip microcomputer are improved, it is impossible to change the programs and data described (stored) therein, and the versatility of the microcomputer is adversely affected. It is supposed to be done.

【0004】そこで昨今は、電気的に書き換え可能で且
つ、不揮発性のメモリであるEEPROM(Electrical
ly Erasable and Programmable ROM:エレクトリカリ・
イレーサブル・アンド・プログラマブルROM)をIC
チップ内に併せ搭載したワンチップマイクロコンピュー
タなども開発されている。
Therefore, in recent years, EEPROM (Electrical), which is a non-volatile memory that is electrically rewritable
ly Erasable and Programmable ROM: Electrical
Erasable and programmable ROM) IC
One-chip microcomputers that are also mounted on the chip have been developed.

【0005】こうしたEEPROMを搭載することによ
り、例えば ・上記エンジン制御等に必要とされる各種データをこの
EEPROMに書き込むようにすることによって、多く
の機種で1つのマイクロコンピュータを共用することが
できるようになる。 ・小規模な仕様変更があったとしても、これに迅速に対
応することができるようになる。 等々、ワンチップマイクロコンピュータとしての汎用性
を大きく向上させることができるようになる。
By mounting such an EEPROM, for example: -By writing various data required for the engine control or the like into the EEPROM, one microcomputer can be shared by many models. become.・ Even if there is a small specification change, it will be possible to quickly respond to this. And so on, the versatility as a one-chip microcomputer can be greatly improved.

【0006】[0006]

【発明が解決しようとする課題】ところで近年は、上記
ワンチップマイクロコンピュータのメモリ容量や、演算
速度等の向上がめざましく、それに伴って制御プログラ
ムとしても、より多くの機能を提供する、より複雑なも
のとなってきている。そしてこのため、上記EEPRO
Mに書き込み、記憶させるべき制御データの数も必然的
に多くなってきている。
By the way, in recent years, the memory capacity of the above-mentioned one-chip microcomputer, the operation speed, etc. have been remarkably improved, and accordingly, the control program is provided with more functions and is more complicated. It is becoming a thing. For this reason, the above EEPRO
The number of control data to be written and stored in M is inevitably increasing.

【0007】したがって、上記EEPROMを搭載する
ことでワンチップマイクロコンピュータとしての汎用性
が向上されるようになったとはいえ、逆に今度は、 ・同EEPROMに制御データを書き込むために長い時
間を要し、その書き込み時間が生産性を悪化させる。 ・同EEPROMに書き込むべき制御データが誤って設
定される可能性も高くなる。 等々、の問題が表面化することともなっている。
Therefore, although the versatility of the one-chip microcomputer has been improved by mounting the above-mentioned EEPROM, on the contrary, this time: It takes a long time to write the control data in the same EEPROM. However, the writing time deteriorates productivity. -There is also a high possibility that the control data to be written in the EEPROM will be set by mistake. And so on, the problem of will come to the surface.

【0008】もっとも、このEEPROMに書き込むべ
き制御データの数を減らすために、同制御データを (A)機種毎に共通に使用することのできる変更不要な
データ (B)機種毎に変更が必要となるデータ の2種類のデータに分類して、(A)の変更不要なデー
タについてはこれを予めマスクROMに設定しておく、
などの方法も考えられなくはない。
However, in order to reduce the number of control data to be written in this EEPROM, it is necessary to change the control data (A) that can be commonly used for each model (B) for each model. It is classified into two types of data, and the data that does not need to be changed in (A) is set in advance in the mask ROM.
Such a method is not inconceivable.

【0009】しかし、こうした制御データは通常、同電
子制御装置としての将来的な共通化を図ろうとした場合
に、開発段階では予想し得なかった変更が要求されるこ
ともある。したがって、制御データを分類することはと
もあれ、機種毎に共通に使用することができると思われ
る制御データを安易にマスクROMに設定してしまうこ
とは危険であり、その後、同制御データに変更の必要が
生じた場合にはこれに対処することができなくなる。そ
して結局は、上記マスクROMへの制御データ設定によ
ってワンチップマイクロコンピュータとしての汎用性が
阻害され、在庫のマイクロコンピュータチップそのもの
を無駄にしてしまうことにもなる。
However, such control data is usually required to be changed unexpectedly at the development stage when trying to standardize the electronic control device in the future. Therefore, it is dangerous to easily set the control data in the mask ROM, which may be commonly used for each model, regardless of the classification of the control data. When it becomes necessary, it cannot be dealt with. Eventually, the control data setting in the mask ROM hinders the versatility of the one-chip microcomputer, and the stock microcomputer chip itself is wasted.

【0010】なお、上述した自動車のエンジン制御等に
使用される電子制御装置に限らず、ワンチップマイクロ
コンピュータを具えて複数種類の異なる機器を制御する
電子制御装置にあっては、こうした実情も概ね共通した
ものとなっている。
Incidentally, not only the above-mentioned electronic control device used for controlling the engine of an automobile, but also an electronic control device including a one-chip microcomputer for controlling a plurality of different types of equipment, such a situation is generally present. It is common.

【0011】この発明は、これらの実情に鑑みてなされ
たものであり、ワンチップマイクロコンピュータとして
の汎用性を損なうことなく、しかもEEPROMに書き
込むデータ数の増大に伴う生産性の悪化やデータ設定の
誤り等をも良好に防止することのできる電子制御装置、
及びその制御データ記憶方法を提供することを目的とす
る。
The present invention has been made in view of these circumstances, and does not impair the versatility as a one-chip microcomputer, and further, the productivity is deteriorated and the data setting is deteriorated with the increase in the number of data to be written in the EEPROM. An electronic control device capable of satisfactorily preventing errors and the like,
And a control data storage method thereof.

【0012】[0012]

【課題を解決するための手段】こうした目的を達成する
ため、この発明にかかるワンチップマイクロコンピュー
タを具える電子制御装置では、書き換え可能な不揮発性
メモリ(EEPROM)を具え、該EEPROMには、
機種毎に共通に使用することのできる第1の制御データ
が記憶される第1の記憶領域と、機種毎に異なる第2の
制御データが記憶される第2の記憶領域とを設け、マス
クROMには、前記EEPROMの第1の記憶領域に転
送される第1の制御データが予登録された記憶領域を設
けるようにする。
In order to achieve these objects, an electronic control unit including a one-chip microcomputer according to the present invention includes a rewritable nonvolatile memory (EEPROM), and the EEPROM includes:
The mask ROM is provided with a first storage area for storing first control data that can be commonly used for each model and a second storage area for storing second control data different for each model. Is provided with a storage area in which the first control data transferred to the first storage area of the EEPROM is preregistered.

【0013】また、この発明にかかるワンチップマイク
ロコンピュータを具える電子制御装置の制御データ記憶
方法では、各機器の制御データを、機種毎に共通に使用
することのできる第1の制御データと機種毎に異なる第
2の制御データとに分類するとともに、書き換え可能な
不揮発性メモリ(EEPROM)の記憶領域を、前記第
1の制御データが記憶される第1の領域と前記第2の制
御データが記憶される第2の領域とに分割し、前記第1
の制御データはマスクROMに予め記憶したものを前記
EEPROMの第1の領域に転送し、前記第2の制御デ
ータ、及び変更を要する第1の制御データは、別途用意
したものをその必要時に適宜の外部装置を通じて前記E
EPROMのそれぞれ該当する領域に転送するようにす
る。
Further, in the control data storing method of the electronic control device including the one-chip microcomputer according to the present invention, the control data of each device can be commonly used for each model and the first control data and the model. The second control data is classified into the second control data which is different for each, and the storage area of the rewritable nonvolatile memory (EEPROM) is divided into the first area in which the first control data is stored and the second control data. The second area to be stored is divided into the first area and the first area.
The control data stored in the mask ROM is transferred to the first area of the EEPROM, and the second control data and the first control data that need to be changed are separately prepared as needed. E through the external device of
The data is transferred to the corresponding area of the EPROM.

【0014】なお、これら電子制御装置、及びその制御
データ記憶方法において、書き換え可能な不揮発性メモ
リ(EEPROM)は、ワンチップマイクロコンピュー
タにCPUやマスクROMなどと共に内蔵されるもので
あってもよいし、同マイクロコンピュータの外部に別途
配設されるものであってもよい。
In the electronic control device and the control data storage method thereof, the rewritable non-volatile memory (EEPROM) may be built in a one-chip microcomputer together with a CPU, a mask ROM and the like. Alternatively, it may be separately provided outside the microcomputer.

【0015】[0015]

【作用】ワンチップマイクロコンピュータを具える電子
制御装置としての上記構成、或いは上記制御データ記憶
方法によれば、マスクROMには少なくとも上記第1の
制御データがマスク段階で記憶される。そして、例えば
マイクロコンピュータに初めて電源が投入されて初期化
手続きが実行されるときに、マスクROM内の第1の制
御データがEEPROMに自動的に書き込まれ、その
後、例えば出荷段階等で、第2の制御データである上記
機種毎に異なるデータがEEPROMに外部から書き込
まれる。
According to the above configuration as an electronic control device including a one-chip microcomputer or the above control data storage method, at least the first control data is stored in the mask ROM at the mask stage. Then, for example, when the microcomputer is first turned on and the initialization procedure is executed, the first control data in the mask ROM is automatically written in the EEPROM, and then, for example, at the shipping stage, the second control data is written. The control data, which is different for each model, is externally written in the EEPROM.

【0016】このため、少なくとも上記第1の制御デー
タに関しては、前述した ・EEPROMに制御データを書き込むために長い時間
を要して生産性を悪化させる。 ・EEPROMに書き込むべき制御データが誤って設定
される可能性が高い。 などといった問題も自ずと解消されるようになる。
Therefore, as for at least the first control data described above, it takes a long time to write the control data in the EEPROM, which deteriorates the productivity. -There is a high possibility that the control data to be written in the EEPROM will be set incorrectly. Problems such as the above will be resolved by themselves.

【0017】また、こうして第1の制御データについて
の書き込みが簡略化され且つ、その精度が保証されるこ
とにより、残りの制御データである上記第2の制御デー
タをEEPROMに書き込む際の負担も大幅に軽減され
るようになる。このため、該第2の制御データに関して
も、上記問題が表面化する懸念は殆どなくなる。
Further, since the writing of the first control data is simplified and its accuracy is guaranteed, the burden of writing the second control data, which is the remaining control data, in the EEPROM is also large. Will be reduced to. Therefore, there is almost no concern that the above-mentioned problem will be brought to the surface regarding the second control data.

【0018】なお、このワンチップマイクロコンピュー
タにあって、各種制御プログラムの実行時には、上記E
EPROMの第1及び第2の領域(記憶領域)に記憶さ
れた制御データが使用される。
In this one-chip microcomputer, when executing various control programs, the above E
The control data stored in the first and second areas (storage areas) of the EPROM is used.

【0019】一方、機種毎に共通に使用することができ
るとした上記第1の制御データには、将来、機種による
仕様変更等に伴う変更要求が生じることもある。そのよ
うな場合には、EEPROMの第1の領域(記憶領域)
に記憶されている第1の制御データを、例えば出荷段階
等に外部から更新することで対応する。
On the other hand, the first control data, which can be commonly used for each model, may have a change request in the future due to a specification change or the like depending on the model. In such a case, the first area (storage area) of the EEPROM
This is dealt with by externally updating the first control data stored in, for example, at the shipping stage.

【0020】したがって、ワンチップマイクロコンピュ
ータとしての汎用性が損なわれることもない。なお、上
記EEPROM自体が不揮発性メモリであることに鑑
み、同電子制御装置としての上記構成において、 ・書き換え可能な不揮発性メモリ(EEPROM)は、
前記マスクROMからの第1の制御データの転送に際し
て同データが転送済みであることを示すチェックコード
が書き込まれる第3の記憶領域を有し、前記初期化手続
きは、この第3の記憶領域にチェックコードが存在しな
いことを条件に前記マスクROMからの第1の制御デー
タの転送を実行する。 ものとすれば、或いは上記制御データ記憶方法におい
て、 ・前記マスクROMに予め記憶した第1の制御データを
前記書き換え可能な不揮発性メモリ(EEPROM)の
第1の領域に転送するとき、該第1の制御データが転送
済みであることを示すチェックコードを同EEPROM
の所定の番地に併せて書き込み、例えばマイクロコンピ
ュータの電源投入時における前記マスクROMからの第
1の制御データの転送は、このチェックコードが前記E
EPROMの前記所定の番地に存在しないことを条件に
実行する。 こととすれば、1度だけ実行すべきマスクROMからE
EPROMへの第1の制御データの転送を安定して、し
かも確実に行うことができるようになる。また、同第1
の制御データが上述のように更新されていたとしても、
これがマスクROMに設定されている古い制御データに
よって上書きされるようなこともない。
Therefore, the versatility of the one-chip microcomputer is not impaired. In view of the fact that the EEPROM itself is a non-volatile memory, the rewritable non-volatile memory (EEPROM) is:
When the first control data is transferred from the mask ROM, it has a third storage area in which a check code indicating that the same data has been transferred is written, and the initialization procedure is stored in the third storage area. The transfer of the first control data from the mask ROM is executed on condition that the check code does not exist. Alternatively, in the above control data storage method, when transferring the first control data stored in advance in the mask ROM to the first area of the rewritable nonvolatile memory (EEPROM), Check code indicating that the control data of the above has been transferred to the EEPROM
This check code is written to the predetermined address of E, for example, when the control data is transferred from the mask ROM when the microcomputer is powered on.
It is executed on condition that it does not exist in the predetermined address of the EPROM. In that case, E from the mask ROM that should be executed only once
The transfer of the first control data to the EPROM can be performed stably and reliably. Also, the first
Even if the control data of is updated as above,
This will not be overwritten by the old control data set in the mask ROM.

【0021】また、同電子制御装置としては基本的に、 ・書き換え可能な不揮発性メモリ(EEPROM)を具
え、該EEPROMに、機種毎に共通に使用することの
できる第1の制御データが記憶される第1の記憶領域
と、機種毎に異なる第2の制御データが記憶される第2
の記憶領域とを設ける。 といった構成を採用し、或いは上記制御データ記憶方法
においても基本的に ・書き換え可能な不揮発性メモリ(EEPROM)の記
憶領域を第1及び第2の2つの領域に分割し、そのうち
の第1の領域には、機種毎に共通に使用することのでき
る第1の制御データを記憶し、第2の領域には、機種毎
に異なる第2の制御データを記憶する。 といった方法を採用することでも、ワンチップマイクロ
コンピュータとしての汎用性は好適に維持される。しか
も、制御データを上記第1及び第2の制御データに分類
してEEPROMの各該当する領域に記憶することで、
それらデータの保守性も大幅に向上されるようになる。
The electronic control unit basically comprises: a rewritable non-volatile memory (EEPROM), in which the first control data which can be commonly used for each model is stored. And a second storage area for storing second control data that is different for each model.
And a storage area of. In the control data storage method, the rewritable nonvolatile memory (EEPROM) storage area is divided into two areas, a first area and a first area. Stores the first control data that can be commonly used for each model, and stores the second control data that is different for each model in the second area. Even if such a method is adopted, the versatility as a one-chip microcomputer is preferably maintained. Moreover, by classifying the control data into the above-mentioned first and second control data and storing them in the corresponding areas of the EEPROM,
The maintainability of those data will also be greatly improved.

【0022】[0022]

【実施例】図1に、この発明にかかるワンチップマイク
ロコンピュータを具える電子制御装置の一実施例を示
す。
FIG. 1 shows an embodiment of an electronic control unit having a one-chip microcomputer according to the present invention.

【0023】この実施例の装置において、電子制御装置
本体1は、例えば自動車等においてエンジンの燃料噴射
量や点火時期などを電子的に制御する装置であり、その
内部には、ワンチップマイクロコンピュータ10が設け
られている。
In the apparatus of this embodiment, the electronic control unit body 1 is an apparatus for electronically controlling the fuel injection amount and ignition timing of the engine in, for example, an automobile, and the one-chip microcomputer 10 is provided therein. Is provided.

【0024】また、この電子制御装置本体1には併せ
て、入出力インターフェース(I/O)2、及び外部装
置接続インターフェース(I/F)4が設けられてお
り、これらインターフェース2及び4を通じて、 ・各種センサ・アクチュエータ等3とワンチップマイク
ロコンピュータ10との間でのデータ授受、及び ・外部装置5とワンチップマイクロコンピュータ10と
の間でのデータ授受、がそれぞれ実現されるようになっ
ている。
The electronic control unit body 1 is also provided with an input / output interface (I / O) 2 and an external device connection interface (I / F) 4. Through these interfaces 2 and 4, The data transfer between the various sensors / actuators 3 and the one-chip microcomputer 10 and the data transfer between the external device 5 and the one-chip microcomputer 10 are realized. .

【0025】ここで、上記外部装置5は、データ通信機
能を備えたパーソナルコンピュータ等からなる装置であ
って、ここでは特に、該実施例の装置が制御対象とする
機種の制御データについて、(a)それら機種毎に共通
に使用することのできるデータ、すなわち共通データ
6、及び(b)それら機種毎に変更が必要となるデー
タ、すなわち機種別データ7、の2種類のデータに分類
し、これら分類した制御データを必要に応じて上記ワン
チップマイクロコンピュータ10に転送する装置として
利用される。
Here, the external device 5 is a device such as a personal computer having a data communication function. Here, in particular, regarding the control data of the model to be controlled by the device of the embodiment, (a) ) Data that can be commonly used for each model, that is, common data 6, and (b) Data that needs to be changed for each model, that is, model-specific data 7, are classified into two types of data. It is used as a device for transferring the classified control data to the one-chip microcomputer 10 as needed.

【0026】なお、上記共通データ6としては、例え
ば、点火装置のイグニションコイルの特性により決まる
通電時間や、燃料噴射装置に用いるインジェクタの特
性、また或いはエンジンの水温や油圧等を検出するセン
サの特性などがある。これらアクチュエータやセンサは
一般に、機種に関係なく共通して使用されることが多
く、機種が異なっても、それらの特性を示す制御データ
は変更不要である。ただし、将来的に見た場合には、コ
ストダウン等により、それらアクチュエータやセンサの
一部を変更することも往々にしてある。この共通データ
6は、そのような場合に、それらアクチュエータやセン
サの特性に合わせて作成され、上記外部装置5を通じて
ワンチップマイクロコンピュータ10に転送されるよう
になる。
The common data 6 is, for example, the energization time determined by the characteristics of the ignition coil of the ignition device, the characteristics of the injector used in the fuel injection device, or the characteristics of the sensor for detecting the water temperature or oil pressure of the engine. and so on. In general, these actuators and sensors are commonly used regardless of the model, and even if the model is different, the control data indicating their characteristics need not be changed. However, in the future, some of these actuators and sensors are often changed due to cost reduction and the like. In such a case, the common data 6 is created according to the characteristics of those actuators and sensors and transferred to the one-chip microcomputer 10 through the external device 5.

【0027】他方、上記機種別データ7としては、例え
ばエンジンの点火時期や燃料噴射量等のデータがある。
これらデータは何れも、制御対象となる機種に応じて各
別の値が設定される必要がある。そこでこれら機種別デ
ータ7は、例えば出荷時等に各制御対象とする機種に応
じた内容のデータとして作成され、上記外部装置5を通
じてワンチップマイクロコンピュータ10に転送され
る。
On the other hand, the model-specific data 7 includes data such as engine ignition timing and fuel injection amount.
For each of these data, it is necessary to set different values according to the model to be controlled. Therefore, these model-specific data 7 are created as data according to the model to be controlled at the time of shipping, for example, and transferred to the one-chip microcomputer 10 through the external device 5.

【0028】さて、これら制御データの転送先であるワ
ンチップマイクロコンピュータ10は、図1に併せ示さ
れるように、CPU11、ROM12、RAM13、E
EPROM14、そしてこれら各要素と上記インターフ
ェース2及び4とを電気的に接続するアドレスデータバ
ス15が1つのIC(LSI)チップ内に集積された構
成となっている。
Now, as shown in FIG. 1, the one-chip microcomputer 10 to which these control data are transferred has a CPU 11, a ROM 12, a RAM 13 and an E.
The EPROM 14 and the address data bus 15 for electrically connecting these elements and the interfaces 2 and 4 are integrated in one IC (LSI) chip.

【0029】ここで、上記ROM12は前述したマスク
ROMとして形成されており、そのメモリ構造は、図2
(a)に模式的に示される態様となっている。すなわち
図2(a)に示すROM12のメモリ構造において、イ
ニシャライズルーチン領域121は、当該マイクロコン
ピュータ10への電源投入時に最初に実行されるイニシ
ャライズルーチンが設定登録された領域であり、制御プ
ログラム領域122は、該電子制御装置としての各種制
御プログラムが設定登録された領域である。
Here, the ROM 12 is formed as the mask ROM described above, and its memory structure is shown in FIG.
The mode is shown schematically in (a). That is, in the memory structure of the ROM 12 shown in FIG. 2A, the initialization routine area 121 is an area in which the initialization routine to be executed first when the microcomputer 10 is powered on is set and registered, and the control program area 122 is An area in which various control programs as the electronic control device are set and registered.

【0030】また、同ROM12において、共通データ
領域123は、上述した共通データ6に相当する制御デ
ータとして、制御対象とする各機種に共通に使用するこ
とのできる当該電子制御装置の開発時点でのデータが設
定登録された領域である。該領域123に設定された共
通データは後述するように、上記イニシャライズルーチ
ンの最初の実行時にEEPROM14に対して自動転送
されるようになる。
Further, in the ROM 12, the common data area 123 is used as control data corresponding to the above-mentioned common data 6 at the time of development of the electronic control device which can be commonly used for each model to be controlled. This is an area where data is set and registered. The common data set in the area 123 will be automatically transferred to the EEPROM 14 at the first execution of the initialization routine, as described later.

【0031】また、上記EEPROM14は前述したよ
うに、書き換え可能な不揮発性メモリであり、ここでは
特に、図2(b)に示されるようなメモリ構造を有して
いるとする。
The EEPROM 14 is a rewritable non-volatile memory as described above, and particularly has a memory structure as shown in FIG. 2B.

【0032】すなわち図2(b)に示されるように、同
EEPROM14は、共通データ領域141と機種別デ
ータ領域142との、大きくは2つの制御データ記憶領
域を有している。このうち、共通データ領域141は、
上記ROM12から自動転送される共通データ、若しく
は必要時に上記外部装置5を通じて当該マイクロコンピ
ュータ10に転送される共通データ6が記憶される領域
である。また、機種別データ領域142は、出荷時等に
上記外部装置5を通じて当該マイクロコンピュータ10
に転送される機種別データ7が記憶される領域である。
That is, as shown in FIG. 2B, the EEPROM 14 has two control data storage areas, a common data area 141 and a model-specific data area 142. Of these, the common data area 141 is
This is an area for storing common data automatically transferred from the ROM 12 or common data 6 transferred to the microcomputer 10 through the external device 5 when necessary. The model-specific data area 142 is used for the microcomputer 10 via the external device 5 at the time of shipment.
This is an area for storing the model-specific data 7 transferred to.

【0033】なおこの実施例の装置では、共通データ及
び機種別データのそれぞれのデータ数に応じて、EEP
ROM14の ・「Hx0000(Hxは16進数を示す)」番地〜
「Hx1000」番地 に共通データ領域141を割り当て、同EEPROM1
4の ・「Hx1001」番地〜「Hx2FFF」番地 に機種別データ領域142を割り当てている。また特
に、「Hx1000」番地についてはこれをチェックコ
ード領域143に定め、該「Hx1000」番地に、R
OM12からの共通データが転送済みであることを示す
チェックコードが書き込まれるようにしている。
In the apparatus of this embodiment, the EEP is set according to the number of each of the common data and the model-specific data.
Address "Hx0000 (Hx indicates hexadecimal number)" of ROM 14 ~
The common data area 141 is allocated to the address "Hx1000", and the same EEPROM1
4. The model-specific data area 142 is allocated to the addresses “Hx1001” to “Hx2FFF”. Further, in particular, regarding the address “Hx1000”, this is set in the check code area 143, and the R is added to the address “Hx1000”.
A check code indicating that the common data from the OM 12 has been transferred is written.

【0034】図3及び図4は、該実施例の装置の電源投
入時に実行される上記イニシャライズルーチンについて
その処理手順の一例を示したものであり、次に、これら
図3及び図4を併せ参照して、同実施例の装置の特に電
源投入時おける動作態様を更に詳述する。
FIGS. 3 and 4 show an example of the processing procedure of the above initialization routine executed when the power of the apparatus of the embodiment is turned on. Next, please refer to FIGS. 3 and 4 together. The operation mode of the apparatus of the embodiment, particularly when the power is turned on, will be described in more detail.

【0035】すなわちいま、この実施例の電子制御装置
に電源が投入されたとすると、上記ワンチップマイクロ
コンピュータ10内のCPU11はまず、ROM12の
上記領域121に格納されているイニシャライズルーチ
ン100を読み込み、以下に列記する手順にて、同ルー
チン100を実行する。
That is, if the electronic control unit of this embodiment is powered on, the CPU 11 in the one-chip microcomputer 10 first reads the initialization routine 100 stored in the area 121 of the ROM 12, and The routine 100 is executed in the procedure listed in.

【0036】ステップ101として、当該マイクロコン
ピュータ10内部に設けられたレジスタ等の周辺装置や
同マイクロコンピュータ10の各入出力ポートを所定の
状態に定義する。
In step 101, peripheral devices such as registers provided inside the microcomputer 10 and each input / output port of the microcomputer 10 are defined in a predetermined state.

【0037】次いでステップ102として、上記ROM
12に異常がないかを同ROM12内の特定番地に設定
したチェックサムデータによりチェックする。また、ス
テップ103では、上記RAM13が正常に書き込み或
いは読み出しできるか否かをチェックするとともに、次
のステップ104として、以降の制御にRAM13を使
用するために同RAM13内のデータを全てクリアす
る。
Then, in step 102, the ROM
The checksum data set in the specific address in the same ROM 12 is used to check whether or not 12 is abnormal. Further, in step 103, it is checked whether or not the RAM 13 can be normally written or read, and in the next step 104, all the data in the RAM 13 is cleared in order to use the RAM 13 for subsequent control.

【0038】なお、上記ステップ102或いはステップ
103において、ROM12或いはRAM13に異常が
ある旨判断される場合には、ステップ105に移行す
る。このステップ105は無限ループになっており、上
記ROM12或いはRAM13に異常があった場合に
は、当該マイクロコンピュータ10自身が使用不可能で
あるとして、以降の処理が停止されるようになる。
If it is determined in step 102 or step 103 that the ROM 12 or RAM 13 is abnormal, the process proceeds to step 105. This step 105 is an infinite loop, and when there is an abnormality in the ROM 12 or the RAM 13, it is determined that the microcomputer 10 itself cannot be used and the subsequent processing is stopped.

【0039】また、ステップ106では、EEPROM
14の上記共通データ領域141にデータが既に記憶さ
れているかを確認する。このEEPROM14は、デー
タが記憶される以前は、その全ての領域にデータHxF
F、若しくはHx00が書き込まれた状態となってい
る。
In step 106, the EEPROM
It is confirmed whether data is already stored in the common data area 141 of 14. This EEPROM 14 stores data HxF in all the areas before the data is stored.
F or Hx00 has been written.

【0040】なおここで、EEPROM14に上記共通
データが記憶されているか否かは、同EEPROM14
の上記チェックコード領域143(「Hx1000」番
地)に所定のチェックコードが登録されているか否かに
よって判断する。
Here, whether or not the common data is stored in the EEPROM 14 depends on whether the EEPROM 14 is the same or not.
It is determined whether or not a predetermined check code is registered in the above check code area 143 (address “Hx1000”).

【0041】因みに該実施例の装置では、このチェック
コードとしてHxA5といったコードを採用しており、
上記チェックコード領域143にこのコードHxA5が
記憶されていれば、共通データが既に書き込まれている
ものと判断して、ステップ110(図4)に移行する。
Incidentally, in the apparatus of the embodiment, a code such as HxA5 is adopted as this check code,
If the code HxA5 is stored in the check code area 143, it is determined that the common data has already been written, and the process proceeds to step 110 (FIG. 4).

【0042】他方、同チェックコード領域143にこの
コードHxA5が記憶されていなければ、共通データが
未だ書き込まれていないものと判断して、ステップ10
7〜ステップ109の共通データ自動転送処理を実行す
る。
On the other hand, if this code HxA5 is not stored in the check code area 143, it is judged that the common data has not been written yet, and step 10
The common data automatic transfer process from 7 to step 109 is executed.

【0043】すなわちこの共通データ自動転送処理で
は、まずステップ107として、上記EEPROM14
を1度全てクリアする。すなわち、同EEPROM14
の全ての記憶領域にデータHxFF若しくはHx00を
書き込んでバルク消去を行う。そして次に、ステップ1
08として、マスク段階でROM12に設定、記憶した
上記共通データをEEPROM14の共通データ領域1
41に転送する。そして該共通データ自動転送処理の最
後にステップ109として、上記チェックコードHxA
5を同EEPROM14のチェックコード領域143
(「Hx1000」番地)に書き込む。こうして一旦書
き込まれたチェックコードHxA5は、再びバルク消去
が行われない限り、消去若しくは上書きされることはな
い。
That is, in this common data automatic transfer processing, first, in step 107, the EEPROM 14 is used.
Clear all once. That is, the EEPROM 14
Bulk erase is performed by writing the data HxFF or Hx00 in all the storage areas. And then step 1
08, the common data set and stored in the ROM 12 at the mask stage is stored in the common data area 1 of the EEPROM 14.
41 to 41. At the end of the common data automatic transfer processing, the check code HxA
5 is the check code area 143 of the EEPROM 14
Write in (address "Hx1000"). The check code HxA5 once written in this way is not erased or overwritten unless bulk erase is performed again.

【0044】さて、こうして共通データ自動転送処理を
終えた、若しくは上記ステップ106において共通デー
タが既に書き込まれている旨判断した当該マイクロコン
ピュータ10(CPU11)は次いで、ステップ110
(図4)以降のヴェリファイチェックにかかる処理を実
行する。
Now, the microcomputer 10 (CPU 11) that has completed the automatic common data transfer process or determined in step 106 that the common data has already been written, then proceeds to step 110.
(FIG. 4) The subsequent verification check processing is executed.

【0045】この処理ではまず、ステップ110とし
て、EEPROM14の上記共通データ領域141に格
納されている共通データに異常がないか否かをその特定
の番地に設定したチェックサムデータによりチェックす
る。
In this process, first, at step 110, it is checked whether or not there is any abnormality in the common data stored in the common data area 141 of the EEPROM 14 by the checksum data set in the specific address.

【0046】このステップ110でのチェックにおい
て、異常ありと判断された場合には、ステップ113に
おいてチェックサムエラーフラグがセットされる。一
方、同ステップ110でのチェックにおいて、異常なし
と判断された場合には、次にステップ111及びステッ
プ112として、EEPROM14の機種別データ領域
142に機種別データが存在することを条件に、上記共
通データと同様のヴェリファイチェックを実行する。
If it is determined that there is an abnormality in the check in step 110, the checksum error flag is set in step 113. On the other hand, when it is determined that there is no abnormality in the check in the same step 110, next, in step 111 and step 112, the above common condition is provided on the condition that the model-specific data exists in the model-specific data area 142 of the EEPROM 14. Perform a verify check similar to the data.

【0047】このステップ112でのヴェリファイチェ
ックにおいても、機種別データに異常ありと判断された
場合には、ステップ113においてチェックサムエラー
フラグがセットされる。
In the verify check in step 112 also, if it is determined that the model-specific data is abnormal, the checksum error flag is set in step 113.

【0048】また、上記ステップ110において共通デ
ータに異常がない旨判断されて且つ、上記機種別データ
が存在しない旨判断される場合(ステップ111)、若
しくは機種別データが存在していても同機種別データに
異常がない旨判断される場合(ステップ112)には次
に、ステップ114に移行する。
If it is determined in step 110 that the common data is normal and that the model-specific data does not exist (step 111), or if the model-specific data exists, the same model-specific data exists. When it is determined that there is no abnormality in the data (step 112), the process proceeds to step 114.

【0049】ステップ114では、後に実施される各種
制御に必要な初期値をRAM13にセットし、次いでス
テップ115では、同制御に使用するマイクロコンピュ
ータ10内部のタイマーや、割り込み時のフラグ、入出
力レベル等を設定する。
At step 114, initial values required for various controls to be performed later are set in the RAM 13, and then at step 115, a timer inside the microcomputer 10 used for the control, a flag at the time of interruption, an input / output level. Etc. are set.

【0050】そして、ステップ116として、上記チェ
ックサムエラーフラグがセットされているか否かをチェ
ックし、同エラーフラグがセットされていた場合、すな
わちEEPROM14に異常があった場合には、ステッ
プ117に移行して、その後の割り込み要求を禁止する
設定を行う。
Then, in step 116, it is checked whether or not the checksum error flag is set. If the checksum error flag is set, that is, if the EEPROM 14 is abnormal, the process proceeds to step 117. Then, the subsequent interrupt request is prohibited.

【0051】なお、ここで禁止される処理は、例えばエ
ンジンの回転に同期した信号として発生される回転信号
等による割り込み処理だけであり、その他の各種データ
処理は正常に実行される。すなわち、上記EEPROM
14に異常があったとしてもそれは、そこに記憶された
制御データの異常によるものであり、それら制御データ
の異常が回避されさえすれば、上記ステップ113を通
じてチェックサムエラーフラグがセットされるようなこ
ともなくなる。そこで、上記割り込み処理のみを禁止
し、その他の処理は能動とすることによって、上記記憶
される制御データを訂正できるようにしている。
Note that the processing prohibited here is only interrupt processing by a rotation signal or the like generated as a signal synchronized with the rotation of the engine, for example, and other various data processing is normally executed. That is, the above-mentioned EEPROM
Even if there is an abnormality in 14, it is due to an abnormality in the control data stored therein, and if the abnormality in the control data is avoided, the checksum error flag is set through the above step 113. Things will disappear. Therefore, by prohibiting only the interrupt processing and activating the other processing, the stored control data can be corrected.

【0052】他方、上記ステップ116において、チェ
ックサムエラーフラグがセットされていない旨判断され
る場合、すなわちEEPROM14に異常がなかった場
合には、ステップ118において、割り込みを発生させ
る条件を設定する。こうした条件が設定されることによ
り、割り込みに基づく以降の制御は正常に実行されるよ
うになる。
On the other hand, if it is determined in step 116 that the checksum error flag is not set, that is, if the EEPROM 14 has no abnormality, the condition for generating an interrupt is set in step 118. By setting these conditions, the subsequent control based on the interrupt will be normally executed.

【0053】なお、上記制御の実行に際し、同実施例の
装置では、上記EEPROM14に記憶されている制御
データのみが使用されるものとする。すなわち、ROM
12にも共通データが同様に格納されているとはいえ、
それが直接使用されることはない。
It should be noted that, when executing the above control, it is assumed that only the control data stored in the EEPROM 14 is used in the apparatus of the embodiment. Ie ROM
Although common data is stored in 12 as well,
It is never used directly.

【0054】以上のように、この実施例の装置によれ
ば、上記イニシャライズルーチンを通じて、予めROM
12に記憶した共通データが1度だけ、自動的にEEP
ROM14に転送記憶される。
As described above, according to the apparatus of this embodiment, the ROM is previously stored through the initialization routine.
Common data stored in 12 is automatically EEP only once
It is transferred and stored in the ROM 14.

【0055】しかも、このEEPROM14に記憶され
たデータは、それが共通データであれ、または機種別デ
ータであれ、前記外部装置5を通じて必要なときに変更
することができる。
Moreover, the data stored in the EEPROM 14, whether it is common data or model-specific data, can be changed through the external device 5 when necessary.

【0056】また、特に共通データに関しては、上記チ
ェックコード(HxA5)によってROM12からの転
送の要否が判断されることから、その内容が外部装置5
を通じて更新されていたとしても、該更新された内容が
ROM12に設定されている古い共通データの内容によ
って上書きされるようなこともない。
Further, especially regarding the common data, since the necessity of the transfer from the ROM 12 is judged by the check code (HxA5), the contents thereof are determined by the external device 5.
Even if it has been updated through, the updated contents will not be overwritten by the contents of the old common data set in the ROM 12.

【0057】このため、同実施例の装置では、上記ワン
チップマイクロコンピュータ10について、例えば (1)開発段階では、上記イニシャライズルーチンも含
め、当該電子制御装置に要求される制御プログラムと上
記共通データとはROM(マスクROM)12に記憶さ
せる。 (2)機種別データ7については、製品の出荷段階まで
にその仕様を確定し、該確定したデータを外部装置5を
通じてEEPROM14に記憶させる。すなわちこの段
階で、制御対象とする機種に特定した制御特性を設定す
る。 (3)開発段階では共通データと判断したデータに仕様
の変更が生じた場合も、機種別データ7と同様、例えば
出荷段階等に、外部装置5を通じて共通データ6として
EEPROM14に記憶する。すなわち、上記ROM1
2から自動転送されている古い共通データをこの共通デ
ータ6によって更新する。勿論この場合、ROM12に
記憶されているデータ自体を変更する必要はない。 といったような、柔軟且つ汎用性ある利用を図ることが
できるようになる。
For this reason, in the apparatus of the embodiment, for example, in the (1) development stage of the one-chip microcomputer 10, the control program and the common data required for the electronic control apparatus including the initialization routine are stored. Are stored in the ROM (mask ROM) 12. (2) The specifications of the model-specific data 7 are fixed by the shipping stage of the product, and the fixed data is stored in the EEPROM 14 through the external device 5. That is, at this stage, the control characteristic specified for the model to be controlled is set. (3) Even when the specification is changed in the data determined to be common data at the development stage, like the model-specific data 7, the data is stored in the EEPROM 14 as the common data 6 through the external device 5 at the shipping stage, for example. That is, the ROM 1
The old common data automatically transferred from 2 is updated by this common data 6. Of course, in this case, it is not necessary to change the data itself stored in the ROM 12. It becomes possible to achieve flexible and versatile use such as.

【0058】そして、同実施例の装置によれば、EEP
ROM14に記憶させる制御データを、上記共通データ
と機種別データとに分類し、基本的には、このうちの機
種別データのみを出荷時等に実際に書き込むデータとし
ている。このため、書き込むべきデータ数が大幅に削減
され、前述した ・EEPROMに制御データを書き込むために長い時間
を要して生産性を悪化させる。 ・EEPROMに書き込むべき制御データが誤って設定
される可能性が高い。 などといった問題も自ずと解消されるようになる。
According to the apparatus of the same embodiment, the EEP
The control data to be stored in the ROM 14 is classified into the common data and the model-specific data, and basically, only the model-specific data among these is the data to be actually written at the time of shipping. Therefore, the number of data to be written is greatly reduced, and as described above: It takes a long time to write the control data in the EEPROM, which deteriorates the productivity. -There is a high possibility that the control data to be written in the EEPROM will be set incorrectly. Problems such as the above will be resolved by themselves.

【0059】なお、この実施例の装置では、上記EEP
ROM14が、ワンチップマイクロコンピュータ10に
内蔵されているとしているが、このEEPROMは必ず
しも同マイクロコンピュータ10内にある必要はなく、
その外部に別途に配設されるものであってもよい。
In the apparatus of this embodiment, the EEP
The ROM 14 is said to be built in the one-chip microcomputer 10, but this EEPROM does not necessarily have to be in the same microcomputer 10.
It may be separately provided outside thereof.

【0060】このように、ワンチップマイクロコンピュ
ータ10の外部にEEPROM14が設けられる場合で
あっても、電気的に図1に示される構成が満たされ、且
つ、上記同等のイニシャライズルーチンが実行されるも
のであれば、自ずと上記同等の効果が得られるようにな
る。
As described above, even when the EEPROM 14 is provided outside the one-chip microcomputer 10, the configuration shown in FIG. 1 is electrically satisfied, and the equivalent initialization routine is executed. In that case, the same effect as above can be naturally obtained.

【0061】また、同実施例の装置では、上記イニシャ
ライズルーチンを通じて、ROM12からEEPROM
14への共通データの転送が自動実行されるようにして
いるが、必ずしもこうしたデータ転送手続きがイニシャ
ライズルーチンに定義されている必要もない。
Further, in the apparatus of the embodiment, the ROM 12 to the EEPROM is passed through the initialization routine.
Although the transfer of the common data to 14 is automatically executed, such a data transfer procedure does not necessarily have to be defined in the initialization routine.

【0062】すなわち、図3のステップ107〜ステッ
プ109にかかる共通データの自動転送処理に相当する
処理手続きは、少なくとも同共通データが外部から更新
される以前の何れかの段階で1度だけ実行されればよ
い。
That is, the processing procedure corresponding to the automatic transfer processing of common data in steps 107 to 109 of FIG. 3 is executed at least once at any stage before the common data is updated from the outside. Just do it.

【0063】また、こうした共通データの自動転送処理
が1度だけしか実行されないものとすれば、EEPRO
Mに前記チェックコード領域143を設ける必要も、ま
た同領域143にチェックコードを書き込む必要もなく
なる。
If the automatic transfer processing of the common data is executed only once, EEPRO
It is not necessary to provide the check code area 143 in M and to write the check code in the area 143.

【0064】イニシャライズルーチンで共通データ自動
転送処理を行わないこれらの場合であっても、同電子制
御装置としての上述した作用並びに効果は同様に達成さ
れるようになる。
Even in those cases where the common data automatic transfer process is not performed in the initialization routine, the above-described operation and effect of the electronic control unit can be achieved similarly.

【0065】また、同実施例の装置では、EEPROM
14の共通データ領域141に記憶する共通データがR
OM12から、若しくは外部装置5を通じて転送される
ものとしているが、同電子制御装置としては基本的に、 ・上記共通データが記憶される共通データ領域と上記機
種別データが記憶される機種別データ領域とを各別に有
するEEPROMを具えることでも、ワンチップマイク
ロコンピュータ10としての汎用性は好適に維持され
る。しかも、制御データを上記共通データと機種別デー
タとに分類してEEPROMの各該当する領域に記憶す
ることで、それらデータの保守性も大幅に向上されるよ
うになる。
Further, in the apparatus of the embodiment, the EEPROM is
The common data stored in the 14 common data areas 141 is R
It is supposed that the data is transferred from the OM 12 or through the external device 5, but the electronic control device basically has: -A common data area in which the common data is stored and a model-specific data area in which the model-specific data is stored. The versatility of the one-chip microcomputer 10 can be preferably maintained even by providing the EEPROM having the respective and. Moreover, by classifying the control data into the common data and the model-specific data and storing them in the corresponding areas of the EEPROM, the maintainability of these data can be greatly improved.

【0066】また、上記実施例においては便宜上、例え
ば自動車等においてエンジンの燃料噴射量や点火時期な
どを電子的に制御する装置にこの発明にかかる電子制御
装置及びその制御データ記憶方法を適用した場合につい
て説明したが、この発明は、ワンチップマイクロコンピ
ュータを具えて複数種類の異なる機器を制御する電子制
御装置であれば、他の如何なる電子制御装置についても
同様に適用することができる。
Further, in the above embodiment, for the sake of convenience, when the electronic control device and the control data storing method according to the present invention are applied to a device for electronically controlling the fuel injection amount and ignition timing of an engine in, for example, an automobile, etc. However, the present invention can be similarly applied to any other electronic control device as long as the electronic control device includes a one-chip microcomputer and controls a plurality of types of different devices.

【0067】なお、この明細書においてEEPROMと
は、電気的に書き換え可能な不揮発性メモリの全てを意
味し、具体的には、EAROM(Electrically Alterab
le ROM:エレクトリカリ・オルタエイブルROM)やF
EEPROM(Flash Electrical Erasable and Progra
mmable ROM:フラッシュ・エレクトリカル・イレーサブ
ル・アンド・プログラマブルROM)なども全て含むも
のとする。
In this specification, the EEPROM means all electrically rewritable non-volatile memories, specifically, EAROM (Electrically Alterab).
le ROM: Electrically Alterable ROM) or F
EEPROM (Flash Electrical Erasable and Progra
mmable ROM: Flash, electrical, erasable, and programmable ROM) are all included.

【0068】[0068]

【発明の効果】以上説明したように、この発明によれ
ば、ワンチップマイクロコンピュータとしての汎用性を
何ら損なうことなく、EEPROMに書き込むデータ数
の増大に伴う生産性の悪化やデータ設定の誤り等を良好
に防止することができるようになる。
As described above, according to the present invention, the productivity is deteriorated due to the increase in the number of data to be written in the EEPROM, the data setting error, etc., without impairing the versatility of the one-chip microcomputer. Can be effectively prevented.

【0069】またこの発明によれば、それらデータの保
守性も大幅に向上され、制御仕様の変更等に対しても迅
速に対処できるようになる。
Further, according to the present invention, the maintainability of the data is also greatly improved, and it becomes possible to promptly deal with the change of the control specifications.

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

【図1】この発明にかかるワンチップマイクロコンピュ
ータを具える電子制御装置についてその一実施例を示す
ブロック図である。
FIG. 1 is a block diagram showing an embodiment of an electronic control device including a one-chip microcomputer according to the present invention.

【図2】同実施例の電子制御装置に採用されるマスクR
OMとEEPROMとの各メモリ構造を模式的に示す略
図である。
FIG. 2 is a mask R used in the electronic control unit of the embodiment.
3 is a schematic diagram schematically showing each memory structure of an OM and an EEPROM.

【図3】同実施例の電子制御装置においてその電源投入
時に実行されるイニシャライズルーチンのうち、主にE
EPROMのチェックコード確認並びにマスクROMか
らEEPROMへの制御データ転送にかかる処理手順を
示すフローチャートである。
FIG. 3 is a flowchart illustrating a main routine of an initialization routine executed when the power is turned on in the electronic control unit of the embodiment.
6 is a flowchart showing a processing procedure for checking a check code of the EPROM and transferring control data from the mask ROM to the EEPROM.

【図4】同実施例の電子制御装置においてその電源投入
時に実行されるイニシャライズルーチンのうち、主にE
EPROMのヴェリファイチェックにかかる処理手順を
示すフローチャートである。
FIG. 4 is a flowchart showing a main routine of an initialization routine executed when the power is turned on in the electronic control unit of the embodiment.
6 is a flowchart showing a processing procedure for a verify check of an EPROM.

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

1…電子制御装置本体、2…入出力インターフェース、
3…センサ・アクチュエータ等、4…外部装置接続イン
ターフェース、5…外部装置、6…共通データ、7…機
種別データ、10…ワンチップマイクロコンピュータ、
11…CPU、12…ROM(マスクROM)、13…
RAM、14…EEPROM、15…アドレスデータバ
ス、121…イニシャライズルーチン領域、122…制
御プログラム領域、123…共通データ領域、141…
共通データ領域、142…機種別データ領域、143…
チェックコード領域。
1 ... Electronic control unit main body, 2 ... Input / output interface,
3 ... Sensor / actuator, etc., 4 ... External device connection interface, 5 ... External device, 6 ... Common data, 7 ... Model-specific data, 10 ... One-chip microcomputer,
11 ... CPU, 12 ... ROM (mask ROM), 13 ...
RAM, 14 ... EEPROM, 15 ... Address data bus, 121 ... Initialization routine area, 122 ... Control program area, 123 ... Common data area, 141 ...
Common data area, 142 ... Model-specific data area, 143 ...
Check code area.

───────────────────────────────────────────────────── フロントページの続き (51)Int.Cl.6 識別記号 庁内整理番号 FI 技術表示箇所 F02D 45/00 376 B G11C 16/06 ─────────────────────────────────────────────────── ─── Continuation of the front page (51) Int.Cl. 6 Identification code Internal reference number FI technical display location F02D 45/00 376 B G11C 16/06

Claims (6)

【特許請求の範囲】[Claims] 【請求項1】CPUとマスクROMとを有するマイクロ
コンピュータが1つのチップに実装されたワンチップマ
イクロコンピュータを具えて複数種類の異なる機器を制
御する電子制御装置において、 書き換え可能な不揮発性メモリを具え、 前記書き換え可能な不揮発性メモリは、機種毎に共通に
使用することのできる第1の制御データが記憶される第
1の記憶領域と、機種毎に異なる第2の制御データが記
憶される第2の記憶領域とを有し、 前記マスクROMは、前記書き換え可能な不揮発性メモ
リの第1の記憶領域に転送される第1の制御データが予
登録された記憶領域を有することを特徴とするワンチッ
プマイクロコンピュータを具える電子制御装置。
1. An electronic control unit for controlling a plurality of types of different devices, comprising a one-chip microcomputer in which a microcomputer having a CPU and a mask ROM is mounted on one chip, and comprising a rewritable nonvolatile memory. The rewritable nonvolatile memory has a first storage area for storing first control data that can be commonly used for each model and a second storage area for storing second control data that is different for each model. 2 storage areas, and the mask ROM has a storage area in which the first control data transferred to the first storage area of the rewritable nonvolatile memory is preregistered. An electronic control unit with a one-chip microcomputer.
【請求項2】請求項1に記載の電子制御装置において更
に、 前記マスクROMは、前記マイクロコンピュータへの電
源投入時に実行されて前記予登録された第1の制御デー
タを1度だけ前記書き換え可能な不揮発性メモリの第1
の記憶領域に転送する初期化手続きが記述された記憶領
域を有し、 前記書き換え可能な不揮発性メモリは、前記マスクRO
Mからの第1の制御データの転送に際して同データが転
送済みであることを示すチェックコードが書き込まれる
第3の記憶領域を有し、 前記マスクROMに記述された初期化手続きは、この第
3の記憶領域にチェックコードが存在しないことを条件
に前記第1の制御データの転送を実行することを特徴と
するワンチップマイクロコンピュータを具える電子制御
装置。
2. The electronic control device according to claim 1, wherein the mask ROM is rewritable only once, the first control data being pre-registered by being executed when power is supplied to the microcomputer. First non-volatile memory
Of the mask RO, the rewritable non-volatile memory has a storage area in which an initialization procedure to be transferred to the storage area is written.
At the time of transferring the first control data from M, it has a third storage area in which a check code indicating that the same data has been transferred is written, and the initialization procedure described in the mask ROM is An electronic control device comprising a one-chip microcomputer, wherein the transfer of the first control data is executed on condition that a check code does not exist in the storage area.
【請求項3】CPUとマスクROMとを有するマイクロ
コンピュータが1つのチップに実装されたワンチップマ
イクロコンピュータを具えて複数種類の異なる機器を制
御する電子制御装置において、 書き換え可能な不揮発性メモリを具え、 前記書き換え可能な不揮発性メモリは、機種毎に共通に
使用することのできる第1の制御データが記憶される第
1の記憶領域と、機種毎に異なる第2の制御データが記
憶される第2の記憶領域とを有することを特徴とするワ
ンチップマイクロコンピュータを具える電子制御装置。
3. An electronic control device for controlling a plurality of types of different devices, comprising a one-chip microcomputer in which a microcomputer having a CPU and a mask ROM is mounted on one chip, and comprising a rewritable nonvolatile memory. The rewritable nonvolatile memory has a first storage area for storing first control data that can be commonly used for each model and a second storage area for storing second control data that is different for each model. An electronic control unit comprising a one-chip microcomputer having two storage areas.
【請求項4】CPUとマスクROMとを有するマイクロ
コンピュータが1つのチップに実装されたワンチップマ
イクロコンピュータと、同ワンチップマイクロコンピュ
ータの内部若しくは外部に実装される書き換え可能な不
揮発性メモリとを具えて、複数種類の異なる機器を制御
する電子制御装置にあって、 前記各機器の制御データを、機種毎に共通に使用するこ
とのできる第1の制御データと機種毎に異なる第2の制
御データとに分類するとともに、前記書き換え可能な不
揮発性メモリの記憶領域を、前記第1の制御データが記
憶される第1の領域と前記第2の制御データが記憶され
る第2の領域とに分割し、 前記第1の制御データは前記マスクROMに予め記憶し
たものを前記書き換え可能な不揮発性メモリの第1の領
域に転送し、 前記第2の制御データ、及び変更を要する第1の制御デ
ータは、別途用意したものをその必要時に適宜の外部装
置を通じて前記書き換え可能な不揮発性メモリのそれぞ
れ該当する領域に転送することを特徴とするワンチップ
マイクロコンピュータを具える電子制御装置の制御デー
タ記憶方法。
4. A one-chip microcomputer in which a microcomputer having a CPU and a mask ROM is mounted on one chip, and a rewritable nonvolatile memory mounted inside or outside the one-chip microcomputer. In addition, in an electronic control device for controlling a plurality of types of different devices, the control data of each of the devices can be commonly used for each model, and the second control data can be used for each model. And the storage area of the rewritable nonvolatile memory is divided into a first area in which the first control data is stored and a second area in which the second control data is stored. Then, the first control data stored in the mask ROM in advance is transferred to the first area of the rewritable nonvolatile memory, The second control data and the first control data that need to be changed are separately prepared and transferred to corresponding areas of the rewritable nonvolatile memory through an appropriate external device when necessary. A method for storing control data of an electronic control device comprising a one-chip microcomputer.
【請求項5】前記マスクROMに予め記憶した第1の制
御データを前記書き換え可能な不揮発性メモリの第1の
領域に転送するとき、該第1の制御データが転送済みで
あることを示すチェックコードを同不揮発性メモリの所
定の番地に併せて書き込み、 前記マスクROMからの前記第1の制御データの転送
は、このチェックコードが前記書き換え可能な不揮発性
メモリの前記所定の番地に存在しないことを条件に実行
する請求項4に記載のワンチップマイクロコンピュータ
を具える電子制御装置の制御データ記憶方法。
5. A check indicating that the first control data has been transferred when the first control data stored in advance in the mask ROM is transferred to the first area of the rewritable nonvolatile memory. The code is written together with a predetermined address of the non-volatile memory, and the transfer of the first control data from the mask ROM is such that the check code does not exist at the predetermined address of the rewritable non-volatile memory. 5. A control data storage method for an electronic control device comprising the one-chip microcomputer according to claim 4, which is executed under the condition of.
【請求項6】CPUとマスクROMとを有するマイクロ
コンピュータが1つのチップに実装されたワンチップマ
イクロコンピュータと、同ワンチップマイクロコンピュ
ータの内部若しくは外部に実装される書き換え可能な不
揮発性メモリとを具えて、複数種類の異なる機器を制御
する電子制御装置にあって、 前記書き換え可能な不揮発性メモリの記憶領域を第1及
び第2の2つの領域に分割し、そのうちの第1の領域に
は、機種毎に共通に使用することのできる第1の制御デ
ータを記憶し、第2の領域には、機種毎に異なる第2の
制御データを記憶することを特徴とするワンチップマイ
クロコンピュータを具える電子制御装置の制御データ記
憶方法。
6. A one-chip microcomputer in which a microcomputer having a CPU and a mask ROM is mounted on one chip, and a rewritable nonvolatile memory mounted inside or outside the one-chip microcomputer. In an electronic control device for controlling a plurality of different devices, the rewritable non-volatile memory storage area is divided into two areas, a first area and a second area. A one-chip microcomputer characterized by storing first control data that can be commonly used for each model and storing second control data that is different for each model in the second area. Control data storage method for electronic control unit.
JP2842394A 1994-02-25 1994-02-25 Electronic control device including one-chip microcomputer and control data storage method thereof Expired - Fee Related JP3127703B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2842394A JP3127703B2 (en) 1994-02-25 1994-02-25 Electronic control device including one-chip microcomputer and control data storage method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2842394A JP3127703B2 (en) 1994-02-25 1994-02-25 Electronic control device including one-chip microcomputer and control data storage method thereof

Publications (2)

Publication Number Publication Date
JPH07239777A true JPH07239777A (en) 1995-09-12
JP3127703B2 JP3127703B2 (en) 2001-01-29

Family

ID=12248258

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2842394A Expired - Fee Related JP3127703B2 (en) 1994-02-25 1994-02-25 Electronic control device including one-chip microcomputer and control data storage method thereof

Country Status (1)

Country Link
JP (1) JP3127703B2 (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002055826A (en) * 2000-08-11 2002-02-20 Sega Corp Server device, portable terminal equipment and method for providing contents
JP2006178746A (en) * 2004-12-22 2006-07-06 Rinnai Corp Electronic substrate
JP2008044610A (en) * 1997-10-31 2008-02-28 Hitachi Ltd Vehicle control device
DE19755977B4 (en) * 1997-07-24 2008-10-16 Mitsubishi Denki K.K. Updating apparatus and method for a vehicle control device
JP2009264828A (en) * 2008-04-23 2009-11-12 Denso Corp Electronic control device
WO2019064644A1 (en) * 2017-09-27 2019-04-04 日立オートモティブシステムズ株式会社 Electronic control device and control program verification method

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE19755977B4 (en) * 1997-07-24 2008-10-16 Mitsubishi Denki K.K. Updating apparatus and method for a vehicle control device
JP2008044610A (en) * 1997-10-31 2008-02-28 Hitachi Ltd Vehicle control device
JP2002055826A (en) * 2000-08-11 2002-02-20 Sega Corp Server device, portable terminal equipment and method for providing contents
JP2006178746A (en) * 2004-12-22 2006-07-06 Rinnai Corp Electronic substrate
JP4699021B2 (en) * 2004-12-22 2011-06-08 リンナイ株式会社 Electronic substrate
JP2009264828A (en) * 2008-04-23 2009-11-12 Denso Corp Electronic control device
JP4506868B2 (en) * 2008-04-23 2010-07-21 株式会社デンソー Electronic control unit
US8180521B2 (en) 2008-04-23 2012-05-15 Denso Corporation Electronic control system for vehicle
WO2019064644A1 (en) * 2017-09-27 2019-04-04 日立オートモティブシステムズ株式会社 Electronic control device and control program verification method
US11169828B2 (en) 2017-09-27 2021-11-09 Hitachi Astemo, Ltd. Electronic control unit and method for verifying control program

Also Published As

Publication number Publication date
JP3127703B2 (en) 2001-01-29

Similar Documents

Publication Publication Date Title
US5826211A (en) Electronic controller having excellent control program and control data overwriting capabilities
US6081755A (en) Vehicle control device
JP3770905B2 (en) Full reprogramming method for erasable non-volatile memory
US20030163664A1 (en) Method and apparatus for updating a distributed program
US8140216B2 (en) Method of detecting manipulation of a programmable memory device of a digital controller
CN102124447A (en) Control appliance for a vehicle, and method for updating data for a control appliance for a vehicle
JPH07117920B2 (en) Method and apparatus for updating firmware resident in electrically erasable programmable read-only memory
US6401163B1 (en) Apparatus and method for rewriting data from volatile memory to nonvolatile memory
JP4005124B2 (en) Microcomputer
JPH07239777A (en) Electronic controller with one-chip microcomputer, and its control data storing method
JP3376306B2 (en) Data processing apparatus and data processing method
JP3137012B2 (en) Electronic control unit
KR20000068300A (en) Process for the protection of stored program controls from overwriting
US6125309A (en) Vehicle control device
JP2830302B2 (en) Automotive control device
US6766425B2 (en) Calibration method implementing segmented flash memory and RAM overlay
JP2002323902A (en) Electronic controller
JP3937598B2 (en) Electronic control unit
US6973530B2 (en) Method for writing and erasing a non-volatile memory area
JP2556562B2 (en) Engine controller
US7110830B2 (en) Microprocessor system and method for protecting the system from the exchange of modules
JP2000321332A (en) Evaluation method and evaluation device of semiconductor device
US6295589B1 (en) Apparatus and method prohibiting RAM diagnosis when other units may access RAM
JPH0436048A (en) Electronic controller for vehicle
JPH08147186A (en) Microcomputer with built-in flash memory

Legal Events

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

Free format text: PAYMENT UNTIL: 20101110

Year of fee payment: 10

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20111110

Year of fee payment: 11

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20111110

Year of fee payment: 11

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20121110

Year of fee payment: 12

LAPS Cancellation because of no payment of annual fees