[go: up one dir, main page]

JP2556562B2 - Engine controller - Google Patents

Engine controller

Info

Publication number
JP2556562B2
JP2556562B2 JP63248962A JP24896288A JP2556562B2 JP 2556562 B2 JP2556562 B2 JP 2556562B2 JP 63248962 A JP63248962 A JP 63248962A JP 24896288 A JP24896288 A JP 24896288A JP 2556562 B2 JP2556562 B2 JP 2556562B2
Authority
JP
Japan
Prior art keywords
rom
program
data
address
engine control
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.)
Expired - Fee Related
Application number
JP63248962A
Other languages
Japanese (ja)
Other versions
JPH0299746A (en
Inventor
昭二 佐々木
憲司 田渕
康典 毛利
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.)
Hitachi Ltd
Hitachi Astemo Ltd
Original Assignee
Hitachi Automotive Engineering Co Ltd
Hitachi 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 Hitachi Automotive Engineering Co Ltd, Hitachi Ltd filed Critical Hitachi Automotive Engineering Co Ltd
Priority to JP63248962A priority Critical patent/JP2556562B2/en
Publication of JPH0299746A publication Critical patent/JPH0299746A/en
Application granted granted Critical
Publication of JP2556562B2 publication Critical patent/JP2556562B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Stored Programmes (AREA)
  • Combined Controls Of Internal Combustion Engines (AREA)

Description

【発明の詳細な説明】 [産業上の利用分野] 本発明は、マイクロコンピュータを用いた、ガソリン
エンジンなどの内燃機関の制御装置に係り、特に自動車
用のガソリンエンジンに好適なエンジン制御装置に関す
る。
Description: BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a control device for an internal combustion engine such as a gasoline engine using a microcomputer, and particularly to an engine control device suitable for a gasoline engine for automobiles.

[従来の技術] マイクロコンピュータを用いたエンジン制御装置で
は、それが組合されるエンジンの特性や、それの経年変
化などに応じて、制御用のデータやプログラムを個々に
選択できることが望ましい。
[Prior Art] In an engine control device using a microcomputer, it is desirable to be able to individually select control data and programs according to the characteristics of the engine with which it is combined, the secular change thereof, and the like.

従来のエンジン制御装置では、例えば、特願昭62−33
356号の出願に係る発明で提案されているように、制御
装置自体の検査や、エンジンのマツチングなどに利用す
るため、外部からプログラムを読込み、それをRAM(ラ
ンダムアクセスメモリ)に格納し、制御を実行する方法
が知られている。
In a conventional engine control device, for example, Japanese Patent Application No. 62-33
As proposed in the invention related to the application of No. 356, in order to use it for inspection of the control device itself, matching of the engine, etc., a program is read from the outside, stored in RAM (random access memory), and controlled. There are known ways to perform.

[発明が解決しようとする課題] 車輌に搭載される各種の部品は、温度や振動など厳し
い環境にさらされる。特に、エンジン制御装置に関して
は、耐振動性向上のため、ICの取付けに関しても、ソケ
ツトは使用できない。このことは、ROM(リードオンリ
メモリ)に関しても同様であり、制御装置の組立前に専
用機でプログラムが書き込まれ、基板に直接半田付けさ
れる。
[Problems to be Solved by the Invention] Various parts mounted on a vehicle are exposed to severe environments such as temperature and vibration. In particular, for the engine control device, the socket cannot be used for mounting the IC because the vibration resistance is improved. The same applies to ROM (Read Only Memory), in which a program is written by a dedicated machine before the controller is assembled and soldered directly to the board.

一方、このようなエンジン制御装置では、プログラム
や制御データのアンマツチによる市場での不具合発生に
より、ROM内容を変更しなければならない場合がある。
そのため、従来技術では、一旦ROMを取外した後、再び
新しいROMを半田付けしなければならず、工数がかかる
上、半田付け部の信頼性が低下するという問題があつ
た。
On the other hand, in such an engine control device, there is a case where the ROM content needs to be changed due to a problem in the market caused by unmatching of programs and control data.
Therefore, in the conventional technique, it is necessary to remove the ROM once and then solder a new ROM again, which requires a lot of man-hours and lowers the reliability of the soldered portion.

他方、上記した特願昭62−33356号の発明では、RAMに
プログラムを書き込み、実行するという手法であるた
め、検査やマツチングを目的にした場合は適するが、市
場での不具合によるROM内容変更には適しない。
On the other hand, in the invention of Japanese Patent Application No. 62-33356 mentioned above, since it is a method of writing and executing a program in RAM, it is suitable for the purpose of inspection or matching, but it is not suitable for changing ROM contents due to market problems. Is not suitable.

本発明の目的は、ROM内容変更時、ROMを基板に直接半
田付けしたままで新しいプログラムのROMに対する書込
みが可能がエンジン制御装置を提供することにある。
An object of the present invention is to provide an engine control device capable of writing a new program to the ROM while directly soldering the ROM to the board when the ROM content is changed.

[課題を解決するための手段] 上記目的は、プログラム格納用のROMとして、通常用
いられているマスクROMと、この外に、P−ROM(電気的
にデータの消去と書込が可能なROM)とを用い、このと
き、マスクROMには、シリアル通信により外部から読み
込んだ第1のプログラムをRAMに格納するのに必要なプ
ログラムだけを書込んでおき、これにより、P−ROM
に、外部からシリアル通信によって新たなプログラムが
書込めるようにして達成される。
[Means for Solving the Problems] The above-mentioned object is to provide a mask ROM that is usually used as a ROM for storing programs, and a P-ROM (ROM that can electrically erase and write data). ) And at this time, only the program necessary for storing the first program read from the outside by serial communication in the RAM is written in the mask ROM.
In addition, a new program can be written externally by serial communication.

〔作 用〕[Work]

CPU(演算処理装置)に内蔵されたマスクROMには、シ
リアル通信により外部から読み込んだ第1のプログラム
をRAMに格納し、それを実行させるのに必要なプログラ
ムだけが書込まれている。
The mask ROM built in the CPU (arithmetic processing unit) stores only the first program read from the outside by serial communication in the RAM and storing only the program necessary to execute the first program.

そこで、CPUは、マスクROMに格納されているプログラ
ムにより、外部からのアクセスに応じてRAMに第1のプ
ログラムを格納する処理を実行したあと、このRAMに格
納された第1のプログラムを用いてP−ROMに第2のプ
ログラムを格納する処理を実行し、以後、このP−ROM
に格納された第2のプログラムを用いてエンジン制御用
データの作成処理を実行するのである。
Therefore, the CPU uses the program stored in the mask ROM to execute the process of storing the first program in the RAM according to the access from the outside, and then uses the first program stored in this RAM. The process of storing the second program in the P-ROM is executed.
The engine control data creation process is executed by using the second program stored in.

従って、P−ROMを交換することなく、プログラムの
書き換えができ、特性変化などに適切な対応が可能にな
る。
Therefore, the program can be rewritten without exchanging the P-ROM, and it is possible to appropriately deal with a characteristic change and the like.

そして、このとき、本発明では、エンジン制御用デー
タの作成に必要な第2のプログラムをP−ROMに格納す
るのに必要な第1のプログラムは、その都度、RAMに書
込まれるようになっているので、搭載されるP−ROM
が、どのような種類のものであっても、その書込みに必
要なプログラム、つまり第1のプログラムは、搭載され
るP−ROMの種別に応じて任意に変更することができ、
従って、本発明によれば、異なった種別のP−ROMが搭
載されたときでも、マスクROMのプログラムを変えるこ
となく対応が可能になり、搭載されるP−ROMの種別を
問わず、常に容易に対応することができる。
At this time, according to the present invention, the first program necessary for storing the second program required for creating the engine control data in the P-ROM is written in the RAM each time. Since it has a P-ROM
However, no matter what kind of program, the program necessary for writing, that is, the first program, can be arbitrarily changed according to the type of the mounted P-ROM,
Therefore, according to the present invention, even when P-ROMs of different types are mounted, it is possible to deal with them without changing the program of the mask ROM, and it is always easy regardless of the type of P-ROM mounted. Can correspond to.

[実施例] 以下、本発明によるエンジン制御装置について、図示
の実施例により詳細に説明する。
[Embodiment] Hereinafter, an engine control device according to the present invention will be described in detail with reference to an illustrated embodiment.

第1図は本発明の一実施例で、図において、1は各種
の演算,処理を行なうCPUであり、消去及び再書き込み
不可能なマスクROM6を内蔵している。2は上記CPU1が読
み込んで演算,処理を行なうためのプログラムあるいは
データを格納するためのROM。3はCPU1で演算,処理し
たデータを書き込みあるいは読み出しを行なうRAM。4
は各種センサの入力信号の取り込みや各種制御信号の出
力を行なうI/O。5はアドレスに従つて、各素子をアク
セスする信号を出力するデコーダ。上記CPU1,ROM2,RAM
3,I/O4は各々、アドレスバス7,データバス8で接続され
ている。上記構成にて、I/O4にはエンジンの回転を表わ
すための回転信号4a、エンジンに吸入される空気量を検
出するセンサからの入力信号である吸入空気量信号4bが
入力される。これら入力信号に基づいてCPU1では、エン
ジンへの燃料噴射量を演算する。演算結果から燃料噴射
制御信号4cをI/O4から出力する。エンジン制御における
基本制御の動作は上記の通りであるが、さらには入力,
出力を増加し、制御項目を追加することが可能である。
FIG. 1 shows an embodiment of the present invention. In the figure, reference numeral 1 is a CPU for performing various operations and processings, and has a built-in mask ROM 6 which cannot be erased or rewritten. Reference numeral 2 is a ROM for storing a program or data to be read by the CPU 1 to perform calculation and processing. 3 is a RAM for writing or reading the data calculated and processed by the CPU 1. Four
Is an I / O that takes in input signals from various sensors and outputs various control signals. Decoder 5 outputs a signal for accessing each element according to an address. CPU1, ROM2, RAM above
The 3 and I / O 4 are connected by an address bus 7 and a data bus 8, respectively. In the above configuration, the I / O 4 is supplied with the rotation signal 4a representing the rotation of the engine and the intake air amount signal 4b which is an input signal from the sensor that detects the amount of air taken into the engine. The CPU 1 calculates the fuel injection amount to the engine based on these input signals. The fuel injection control signal 4c is output from the I / O 4 based on the calculation result. The operation of the basic control in the engine control is as described above.
It is possible to increase the output and add control items.

上記制御に必要なプログラムはROM2に格納されている
が、この実施例では、このROM2として以下のような特性
のものを使用している。すなわち、このROM2は、制御装
置の電源を遮断しても、その内容は消去されない上、動
作時も書き込みは不可能である。それは、通常ROM2のPG
M信号2aを電源電圧VCC(通常5V),VPP信号2bをVCCとす
ることにより、このROM2は読み出し専用となり、書き込
みは出来ないからである。
The program required for the above control is stored in ROM2, but in this embodiment, ROM2 having the following characteristics is used. That is, the contents of the ROM 2 are not erased even when the power supply of the control device is cut off, and the ROM 2 cannot be written during operation. It is usually ROM2 PG
This is because setting the M signal 2a to the power supply voltage V CC (normally 5V) and the V PP signal 2b to V CC makes this ROM 2 read-only and cannot be written.

しかし、PGM信号2aをLowにした上で、VPP信号2bに12.
5V程度の電圧を加えると、このROM2はデータの書込みが
可能になるものである。なお、このような電気的にデー
タの消去と書込みが可能なROMを、ここではP−ROMと呼
ぶ。
However, after setting PGM signal 2a to Low, VPP signal 2b is set to 12.
When a voltage of about 5V is applied, this ROM2 can write data. Incidentally, such an electrically erasable and writable ROM is called a P-ROM here.

5aはROM2をデコーダ5がアクセスするためのデコード
信号となるCS信号で、このCS信号5aは読み出しあるいは
書き込みにかかわらず、ROM2をアクセスするときだけLo
wとなり、それ以外はHighを出力する。
5a is a CS signal which serves as a decode signal for the decoder 5 to access the ROM2. The CS signal 5a is a Lo signal only when the ROM2 is accessed regardless of reading or writing.
It becomes w, and otherwise outputs High.

1aはCPU1から出力されるROM2のモード切換信号であ
る。すなわち、このモード切換信号1aは通常Lowであ
り、NPNトランジスタ10とPNPトランジスタ11は共にOFF
し、VPP信号2bにかかる電圧はプルアツプ抵抗12によりV
CCとなる。また、NAND回路9の出力信号であるPGM信号2
aは、モード切換信号1aがLowであるため、Highとなつて
いる。
1a is a mode switching signal of ROM2 output from CPU1. That is, this mode switching signal 1a is normally Low, and both NPN transistor 10 and PNP transistor 11 are OFF.
However, the voltage applied to V PP signal 2b is
Become CC . In addition, the PGM signal 2 which is the output signal of the NAND circuit 9
The value a is High because the mode switching signal 1a is Low.

一方、ROM2へプログラムの書き込みを行なう場合は、
モード切換信号1aをHighにすれば、NPNトランジスタ10
及びPNPトランジスタ11が共にONし、VPP信号2bにはV
B(≒12.5V)の電圧がかかる。また、NAND回路9の出力
はCS信号5aと同じ出力となる。すなわち、5aはNOT回路1
3を介してNAND回路9に入力されるが、もう一方の入力
であるモード切換信号1aがHighのため、NOT回路13の出
力信号はさらに反転されて出力される。これにより、CS
信号5aがLow、すなわち、ROM2がアクセスされたとき、P
GM信号2aはLowとなり、ROM2は書き込みモードとなる。
書き込みモードでは、アドレスバス7で指定された番地
に、データバス8に出力されたデータが書き込まれる。
On the other hand, when writing a program to ROM2,
If the mode switching signal 1a is set to High, the NPN transistor 10
And PNP transistor 11 are both turned on, and V PP signal 2b is V
A voltage of B (≈12.5V) is applied. The output of the NAND circuit 9 is the same as the CS signal 5a. That is, 5a is NOT circuit 1
Although it is input to the NAND circuit 9 via 3, the output signal of the NOT circuit 13 is further inverted and output because the other input, the mode switching signal 1a, is High. This allows CS
When the signal 5a is Low, that is, when ROM2 is accessed, P
The GM signal 2a becomes Low, and the ROM2 is in the write mode.
In the write mode, the data output to the data bus 8 is written in the address specified by the address bus 7.

CPU1には外部とのシリアル通信を行なうための入出力
信号線が3本ある。1bは送受信のための基本クロツクと
なるSCIクロツク信号、1cは外部からデータが送信さ
れ、CPU1で受信するためのSCI受信信号、1dは外部へ送
信するSCI送信信号である。各々の信号のタイミング
は、上記した特願昭62−33356号の明細書に記載してい
る通りであり、先頭のビツトをスタートビツト、最後の
ビツトをストツプビツトとしている。
The CPU1 has three input / output signal lines for serial communication with the outside. Reference numeral 1b is an SCI clock signal serving as a basic clock for transmission / reception, 1c is an SCI reception signal for data transmission from the outside and is received by the CPU 1, and 1d is an SCI transmission signal for transmission to the outside. The timing of each signal is as described in the specification of Japanese Patent Application No. 62-33356, and the first bit is the start bit and the last bit is the stop bit.

第2図は上記実施例におけるアドレス割付の一例を示
すアドレス割付表で、20はCPU1の内部の機能を切換える
ための各種レジスタのアドレスである。21はRAM3のアド
レス 22はROM2のアドレス 23はCPU1に内蔵されたマスクROM6のアドレス を示す。23aは、リセツトやSCI等の各種割込みが発生し
た時の飛び先アドレスを指定するためのベクターアドレ
スで、例えば、CPU1がリセツトされ、リセツト解除後、
このベクターアドレス から飛び先番地を読み込み、その番地へジヤンプし、所
定のルーチンの処理を行なう。割込み発生時も同様のシ
ーケンスで動作する。一方、22aはROM2に書き込まれた
プログラムを実行するための飛び先番地を指示する第2
のベクターアドレスである。すなわち、ある割込みが発
生し、その割込み処理ルーチンが、ROM2のアドレス22内
に割付けられている場合、マスクROM6内のベクターアド
レス23aに上記割込み処理ルーチンの先頭アドレスを入
れておく必要がある。この場合、プログラムが変つて
も、このルーチンの先頭アドレスは変更できないため、
汎用性に欠けてしまう。そこで、ベクターアドレス23a
にROM2内の第2のベクターアドレス22aの番地を入れて
おき、それから、所定のルーチンへジヤンプするように
すれば良い。第3図は、上記第2のベクターアドレスを
用いた場合の一実施例を示すフローチヤートである。例
えば、S1で最優先割込みであるNMIが発生したとき、S2
でベクターアドレス23a内の から飛び先番地を読み込み、そのアドレスである第2の
ブクターアドレスへジヤンプする。尚、S1,S2はハード
ウエアのシーケンスで決まるものであり、ソフトウエア
では変更できない。S3では第2のベクターアドレスでの
処理内容を示している。ここでは、所定の処理ルーチン
へジヤンプする命令であり、NMIルーチンの先頭番地へ
ジヤンプし、S4でNMIルーチンの処理を実行する。処理
終了後、S5で割込みから復帰し、割込み前の処理を続行
する。
FIG. 2 is an address allocation table showing an example of address allocation in the above embodiment, and 20 is an address of various registers for switching the internal functions of the CPU 1. 21 is the address of RAM3 22 is the address of ROM2 23 is the address of mask ROM6 built in CPU1 Indicates. 23a is a vector address for designating the jump destination address when various interrupts such as reset and SCI occur.For example, CPU1 is reset, and after reset is released,
This vector address The destination address is read from, the jump address is jumped to, and the predetermined routine is performed. When an interrupt occurs, it operates in the same sequence. On the other hand, 22a is a second instruction indicating a jump destination address for executing the program written in ROM2.
Is the vector address of. That is, when an interrupt occurs and the interrupt processing routine is assigned to the address 22 of the ROM 2, it is necessary to put the start address of the interrupt processing routine in the vector address 23a in the mask ROM 6. In this case, even if the program changes, the start address of this routine cannot be changed.
It lacks versatility. So vector address 23a
The address of the second vector address 22a in the ROM 2 may be put in, and then jumping to a predetermined routine may be performed. FIG. 3 is a flow chart showing an embodiment in which the second vector address is used. For example, if the highest priority interrupt NMI occurs in S1, S2
In vector address 23a The jump destination address is read from and jumped to that address, the second vector address. Note that S1 and S2 are determined by the hardware sequence and cannot be changed by software. In S3, the processing content at the second vector address is shown. Here, it is an instruction to jump to a predetermined processing routine, jump to the head address of the NMI routine, and execute the processing of the NMI routine in S4. After the processing is completed, the process returns from the interrupt in S5 and the process before the interrupt is continued.

上記のような構成とすれば、第2のベクターアドレス
22aは書き換え可能であるため、汎用性が保たれる。
With the above configuration, the second vector address
Since 22a is rewritable, versatility is maintained.

次に、ROM2への書き込みを行なう処理について説明す
る。
Next, the process of writing to the ROM 2 will be described.

第4図はリセツトルーチンの処理を示すフローチヤー
トである。S11でSCIのポートの初期設定を行ない、SCI
を可能とする。次にS12でRAM3内の所定のアドレスのデ
ータR1をリセツトする。S13で、第2のベクターアドレ
スへジヤンプする。上記S11〜S13はマスクROM6内のプロ
グラムである。S14では、割込待ちの状態を維持する。
FIG. 4 is a flow chart showing the processing of the reset routine. Initialize the SCI port in S11, and
Is possible. Next, in S12, the data R1 at the predetermined address in the RAM3 is reset. At S13, jump to the second vector address. The above S11 to S13 are programs in the mask ROM 6. In S14, the state of waiting for an interrupt is maintained.

第5図はシリアル通信の受信割込みが発生したときの
処理を示すフローチャートで、特にRAM3へ第1のプログ
ラムを書込む動作を示したものである。
FIG. 5 is a flow chart showing the processing when a reception interrupt of serial communication occurs, and particularly shows the operation of writing the first program into the RAM3.

ここで、この第1のプログラムとは、外部からシリア
ル通信により、エンジン制御用データの作成に使用され
るプログラム(第2のプログラム)をROM2に格納するの
に必要なプログラムのことである。
Here, the first program is a program necessary for storing the program (second program) used for creating the engine control data in the ROM 2 by serial communication from the outside.

SCIの割込みが発生したら、S21でRAM2内のあるアドレ
スの内容R2の所定のビツトであるProg flagが1か否か
を確認する。このフラグは現在プログラムをRAM3へ書き
込むモードか否かの判定に使う。
When the SCI interrupt occurs, it is confirmed in S21 whether the Prog flag, which is a predetermined bit of the content R2 of a certain address in the RAM2, is 1. This flag is used to judge whether it is the mode to write the program to RAM3 at present.

Prog flag=0の場合は、S22で受信データを読込む。
その後、S23でR1内のflag ROMが1か否かの判定を行な
う。flag ROMは、現在ROM2へのプログラム書き込みを行
なつていることを示すフラグである。flag ROMが1の場
合は、RAM3に既にROM2への書き込み用のプログラムが書
き込まれた後とみなし、S29でそのプログラムを実行す
る。S23でflag ROM=0の場合、SCIの割込みが初めてと
見做し、その初めての受信データにはRAM3へのプログラ
ム書き込みモードや、ROM2への書き込みモードであるこ
とを示すデータであるという意味を持たせることにす
る。S24では、その最初の受信データがROM書き込みモー
ドであるか否か確認する。ROM書き込みモードの場合はS
28でflag ROMを1にし、一旦割込み処理を終了する。そ
うでない場合、S25でRAM3へのプログラム書き込みモー
ドか否かの確認を行なう。そうでない場合は、他のモー
ドであるということで、前記第2のベクターアドレスへ
ジヤンプし、所定の処理を行なう。但し、この場合のみ
は、ROM2にすでに所定のプログラムが入つているという
前提がある。S25でプログラム書き込みモードと判定さ
れたら、S27でProg flagを1にして、割込み処理を終了
する。
When Prog flag = 0, the received data is read in S22.
Then, in S23, it is determined whether the flag ROM in R1 is 1 or not. The flag ROM is a flag indicating that a program is currently being written to the ROM2. When the flag ROM is 1, it is considered that the program for writing to the ROM2 has already been written in the RAM3, and the program is executed in S29. If flag ROM = 0 in S23, the SCI interrupt is regarded as the first time, and the first received data means that it is the data indicating the program write mode to RAM3 or the write mode to ROM2. I will have it. In S24, it is confirmed whether the first received data is in the ROM writing mode. S in ROM write mode
At 28, the flag ROM is set to 1, and the interrupt processing is temporarily terminated. If not, it is confirmed in S25 whether or not it is the program write mode to the RAM3. If not, it means that it is in another mode, and therefore jumps to the second vector address and performs a predetermined process. However, only in this case, it is premised that the predetermined program is already stored in the ROM2. If the program writing mode is determined in S25, the Prog flag is set to 1 in S27, and the interrupt processing ends.

S21でProg flag=1が確認されたら、現在RAM3へのプ
ログラム書き込みモードであるから、以下、RAM3へ受信
データを格納していく手順を示している。S30でStart f
lagの状態を確認する。Start flagはRAM3へのプログラ
ム書き込みモードが始まつて、初めての受信データか否
かの判定を行なうためのフラグである。Start flaf=0
の場合、RAM3へ格納する先頭番地をS31で指定し、S32で
Start flagを1にする。尚、プログム書き込みのモード
時、最初のデータは、以後送信されてくるデータの数を
表わすデータであり、一旦、所定の番地へ格納した後、
データを送信してくる度にデクリメントする。S33で
は、その送信データ数のデータを先頭番地に格納し、1
だけデクリメントし、S34でその内容の確認を行なう。
もし、先頭番地の内容が0だつたら、プログラムの送信
は終了したとして、Prog flag及びStart flagを0にす
る(S35)。S36で送信してきたデータを格納する番地を
イクリメントし、S37で受信データを読み込み、上記番
地へデータを格納する(S38)。
If Prog flag = 1 is confirmed in S21, the program write mode to RAM3 is currently in progress, so the procedure for storing the received data in RAM3 is shown below. Start f with S30
Check the lag status. The Start flag is a flag for determining whether or not it is the first received data after the program writing mode to the RAM 3 has started. Start flaf = 0
In case of, specify the start address to be stored in RAM3 in S31, and in S32.
Set Start flag to 1. In the program write mode, the first data is the data representing the number of data transmitted thereafter, and once stored in a predetermined address,
Decrement each time data is sent. In S33, the data of the number of transmission data is stored in the head address and 1
Decrement only and confirm the contents in S34.
If the content of the head address is 0, it is determined that the program transmission is completed, and the Prog flag and Start flag are set to 0 (S35). The address for storing the transmitted data is incremented in S36, the received data is read in S37, and the data is stored in the above address (S38).

以上の処理により、RAM3に対する第1のプログラムの
書込を得ることができる。
With the above processing, the writing of the first program to the RAM 3 can be obtained.

なお、このときに必要なプログラムは、CPU1内のマス
クROM6に格納してある。
The programs required at this time are stored in the mask ROM 6 in the CPU 1.

次に、第6図は、以上のようにして、RAM6に書込まれ
た第1のプログラムを用いて、CPU1により実行され、外
部からシリアル通信により第2のプログラム、すなわ
ち、エンジン制御用データの作成に使用されるプログラ
ムをROM2に格納するのに必要な処理を示すフローチャー
トである。
Next, FIG. 6 is executed by the CPU 1 using the first program written in the RAM 6 as described above, and the second program, that is, engine control data, is externally serially communicated. 7 is a flowchart showing a process required to store a program used for creation in ROM2.

まず、この第6図でも、上記したRAM3への第1のプロ
グラムの書込みの場合と同様、最初の送信データは、以
後送信されてくるデータ数を示している。S40でROM書き
込みモードとして最初のデータか否かの判定を行なうfl
ag Sの状態を確認し、0の場合、最初のデータとして、
S41で受信データをRAM3内のR2の番地へ格納し、S42でRO
Mの先頭番地を指定し、S43でflag Sを1にして、割込み
処理を終了する。S40で2回目以降のデータであること
を確認したら、S44でR2の内容をデクリメントして、S45
でR2が0か否かを確認する。R2=0の場合はROM書き込
みのデータの受信が終了したことを示すため、S46でfla
g ROMとflag Sを0にする。S47ではROM2への格納番地を
インクリメントし、S48でモード切換信号1aをHighにす
る。これにより、前記したように、ROM2は書き込みモー
ドになる。S49では受信データを格納番地へ書き込み、S
50で、所定時間書き込みを繰り返す。書き込み終了後、
S51でモード切換信号1aをLowにして、ROM2のモードを通
常モードとする。S52では、正常に書き込まれたことを
確認するため、格納した番地のデータを読み込み、受信
データと同じであることを確認する。異なる場合は、S4
8に戻つて再び書き込みを行う。S53でデータが同じであ
ることを確認したら、S54で外部機器へ受信データの書
き込みが終了したことを送信し、処理を終了する。外部
機器では、ROM書き込み終了のデータが送信されてきた
ら、次の書き込みデータを送信する。
First, also in FIG. 6, as in the case of writing the first program in the RAM 3 described above, the first transmission data indicates the number of data transmitted thereafter. In S40, determine whether it is the first data in ROM write mode fl
Check the status of ag S, and if 0, as the first data,
Store the received data in the address of R2 in RAM3 in S41 and RO in S42.
The head address of M is specified, flag S is set to 1 in S43, and the interrupt processing ends. After confirming that it is the second and subsequent data in S40, decrement the contents of R2 in S44, and then in S45
Check whether R2 is 0 or not. If R2 = 0, it means that the reception of the ROM writing data has been completed.
Set g ROM and flag S to 0. In S47, the address stored in ROM2 is incremented, and in S48, the mode switching signal 1a is set to High. As a result, the ROM 2 is in the write mode as described above. In S49, the received data is written to the storage address, and S
At 50, writing is repeated for a predetermined time. After writing,
At S51, the mode switching signal 1a is set to Low to set the ROM2 mode to the normal mode. In S52, in order to confirm that the data has been written normally, the data of the stored address is read and it is confirmed that it is the same as the received data. If different, S4
Return to 8 and write again. When it is confirmed in S53 that the data is the same, in S54, the fact that the writing of the reception data has been completed is transmitted to the external device, and the process ends. The external device transmits the next write data when the ROM write end data is transmitted.

従つて、この実施例によれば、シリアル通信を使つ
て、ROM2へプログラムを書き込むことが可能になり、市
場などでプログラムやデータにアンマツチングを生じな
いときでも容易に、しかも充分に対応することができ
る。
Therefore, according to this embodiment, it is possible to write the program to the ROM2 by using the serial communication, and it is possible to easily and sufficiently cope with the situation where the program or the data does not unmatch in the market. it can.

[発明の効果] 本発明によれば、エンジン制御における市場での不具
合対策としてROM内容を変更する際、新しいROMに交換す
ることなく、ROMを基板に直接半田付けしたままROM書き
込みが可能となるため、ROM内容変更時の工数を大幅に
低減できる効果がある。さらには、再度半田付けをする
必要がないため、再半田付けによる信頼性の低下をなく
すことができるという効果がある。
[Advantages of the Invention] According to the present invention, when changing the contents of a ROM as a countermeasure against a market problem in engine control, it is possible to write the ROM directly to the board without replacing the ROM with a new ROM. Therefore, there is an effect that the number of man-hours when changing the ROM contents can be significantly reduced. Furthermore, since there is no need to re-solder, there is an effect that reliability deterioration due to re-soldering can be eliminated.

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

第1図は本発明の一実施例を示す構成図、第2図はアド
レス割付図、第3図は第2図のベクターアドレスを用い
た実施例の動作を示すフローチヤート、第4図はリセツ
ト時の処理を示すフローチヤート、第5図はシリアル通
信を用いてRAM3へプログラムを書き込む処理を示すフロ
ーチヤート、第6図はROM2へプログラムを書き込む処理
を示すフローチヤートである。 1……CPU、2……ROM、3……RAM、4……I/O、5……
デコーダ、6……マスクROM、7……アドレスバス、8
……データバス、9……NAND回路、10……NPNトランジ
スタ、11……PNPトランジスタ、12……プルアツプ抵
抗、13……NOT回路、1a……モード切換信号、2a……PGM
信号、2b……VPP信号、5a……CS信号、1b……SCIクロツ
ク信号、1c……SCI受信信号、1d……SCI送信信号、20…
…各種レジスタのアドレス、21……RAM3のアドレス、22
……ROM2のアドレス、23……マスクROM6のアドレス、22
a……第2のベクターアドレス、23a……ベクターアドレ
ス、4a……回転信号、4b……吸入空気量信号、4c……燃
料噴射制御信号。
FIG. 1 is a block diagram showing an embodiment of the present invention, FIG. 2 is an address allocation diagram, FIG. 3 is a flow chart showing the operation of the embodiment using the vector address of FIG. 2, and FIG. 4 is a reset. FIG. 5 is a flow chart showing a process of writing a program to the RAM3 using serial communication, and FIG. 6 is a flow chart showing a process of writing a program to the ROM2. 1 ... CPU, 2 ... ROM, 3 ... RAM, 4 ... I / O, 5 ...
Decoder, 6 ... Mask ROM, 7 ... Address bus, 8
...... Data bus, 9 …… NAND circuit, 10 …… NPN transistor, 11 …… PNP transistor, 12 …… Pull-up resistor, 13 …… NOT circuit, 1a …… Mode switching signal, 2a …… PGM
Signal, 2b ... VPP signal, 5a ... CS signal, 1b ... SCI clock signal, 1c ... SCI reception signal, 1d ... SCI transmission signal, 20 ...
… Addresses of various registers, 21 …… RAM3 addresses, 22
...... ROM2 address, 23 …… Mask ROM6 address, 22
a: second vector address, 23a: vector address, 4a: rotation signal, 4b: intake air amount signal, 4c: fuel injection control signal.

───────────────────────────────────────────────────── フロントページの続き (72)発明者 毛利 康典 茨城県勝田市大字高場2520番地 株式会 社日立製作所佐和工場内 (56)参考文献 特開 昭55−157004(JP,A) 特開 昭60−244650(JP,A) 特開 昭61−16302(JP,A) 特開 昭63−195357(JP,A) ─────────────────────────────────────────────────── ─── Continuation of the front page (72) Inventor Yasunori Mohri 2520 Takaba, Katsuta City, Ibaraki Prefecture Sawa Plant, Hitachi Ltd. (56) Reference JP-A-55-157004 (JP, A) JP-A-SHO 60-244650 (JP, A) JP 61-16302 (JP, A) JP 63-195357 (JP, A)

Claims (3)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】データ格納用のRAMと、プログラム格納用
のROMと、このROMに格納されたプログラムに従ってデー
タの演算処理を行なう演算処理装置とを備え、エンジン
の運転状態を表わす少なくとも1のデータを上記プログ
ラムに従って演算処理し、エンジン制御用のデータを作
成する方式のエンジン制御装置において、 上記プログラム格納用ROMとして、マスクROMと、電気的
にデータの書込が可能になるP−ROMとを設け、 上記マスクROMには、外部から第1のプログラムを読み
込んで上記RAMに格納する処理に必要なプログラムを格
納しておき、 上記演算処理装置は、 外部からのアクセスに応じて、まず、上記マスクROMに
格納されているプログラムを用い、外部から第1のプロ
グラムを読み込んで上記RAMに格納する処理を実行し、 次いで、上記RAMに格納された第1のプログラムを用
い、外部から第2のプログラムを読み込んで上記P−RO
Mに格納する処理を実行し、 以後、このP−ROMに格納された第2のプログラムを用
い、上記エンジン制御用データの作成処理を実行するよ
うに構成されていることを特徴とするエンジン制御装
置。
1. A data storage RAM, a program storage ROM, and an arithmetic processing unit for arithmetically processing data according to a program stored in the ROM, and at least one data representing an operating state of an engine. In the engine control device of the method of performing arithmetic processing according to the above program to create data for engine control, a mask ROM and a P-ROM capable of electrically writing data are used as the ROM for storing the program. A program necessary for the process of reading the first program from the outside and storing it in the RAM is stored in the mask ROM, and the arithmetic processing unit first responds to the access from the outside by Using the program stored in the mask ROM, execute the process of reading the first program from the outside and storing it in the RAM. Using a first program stored, the P-RO reads the second program from the outside
Engine control characterized by being configured to execute processing to be stored in M, and thereafter to execute processing for creating the engine control data using the second program stored in this P-ROM. apparatus.
【請求項2】請求項1の発明において、上記P−ROMの
読出しと書込みのモードの切換えが、上記演算処理装置
の命令で制御されるように構成したことを特徴とするエ
ンジン制御装置。
2. The engine control device according to claim 1, wherein the switching of the reading and writing modes of the P-ROM is controlled by an instruction of the arithmetic processing unit.
【請求項3】請求項1の発明において、上記P−ROMの
所定のアドレスに、第2のベクターアドレスが設けられ
ていることを特徴とするエンジン制御装置。
3. The engine control device according to claim 1, wherein a second vector address is provided at a predetermined address of the P-ROM.
JP63248962A 1988-10-04 1988-10-04 Engine controller Expired - Fee Related JP2556562B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP63248962A JP2556562B2 (en) 1988-10-04 1988-10-04 Engine controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP63248962A JP2556562B2 (en) 1988-10-04 1988-10-04 Engine controller

Publications (2)

Publication Number Publication Date
JPH0299746A JPH0299746A (en) 1990-04-11
JP2556562B2 true JP2556562B2 (en) 1996-11-20

Family

ID=17185990

Family Applications (1)

Application Number Title Priority Date Filing Date
JP63248962A Expired - Fee Related JP2556562B2 (en) 1988-10-04 1988-10-04 Engine controller

Country Status (1)

Country Link
JP (1) JP2556562B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE19755958B4 (en) * 1997-07-24 2008-06-19 Mitsubishi Denki K.K. Method for updating a motor vehicle control program and updating device for a motor vehicle control
DE19755977B4 (en) * 1997-07-24 2008-10-16 Mitsubishi Denki K.K. Updating apparatus and method for a vehicle control device

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3109413B2 (en) * 1995-07-31 2000-11-13 株式会社デンソー Machine control device
US6275911B1 (en) 1996-09-20 2001-08-14 Denso Corporation Memory writing device for an electronic device
US6144887A (en) 1996-12-09 2000-11-07 Denso Corporation Electronic control unit with reset blocking during loading
JPH1115668A (en) * 1997-06-23 1999-01-22 Brother Ind Ltd Data storage method and device
JP6148838B2 (en) * 2012-09-21 2017-06-14 株式会社ケーヒン Vehicle electronic control unit and data adjustment system thereof

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS55157004A (en) * 1979-05-25 1980-12-06 Hitachi Ltd Digital control unit for automobile
JPS60244650A (en) * 1984-05-17 1985-12-04 Japan Electronic Control Syst Co Ltd Control device for automobile
DE3419559A1 (en) * 1984-05-25 1985-11-28 Robert Bosch Gmbh, 7000 Stuttgart CONTROL DEVICE FOR FUNCTIONS IN THE MOTOR VEHICLE
JPS63195357A (en) * 1987-02-07 1988-08-12 Diesel Kiki Co Ltd Electronic control type fuel injection unit

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE19755958B4 (en) * 1997-07-24 2008-06-19 Mitsubishi Denki K.K. Method for updating a motor vehicle control program and updating device for a motor vehicle control
DE19755977B4 (en) * 1997-07-24 2008-10-16 Mitsubishi Denki K.K. Updating apparatus and method for a vehicle control device

Also Published As

Publication number Publication date
JPH0299746A (en) 1990-04-11

Similar Documents

Publication Publication Date Title
KR100317593B1 (en) Vehicle control device
JP2556562B2 (en) Engine controller
US4095268A (en) System for stopping and restarting the operation of a data processor
JP4311067B2 (en) Data rewriting method and electronic control device
JPH06187143A (en) Electronic device
KR100317594B1 (en) Vehicle Control
US6490663B1 (en) Electronic control apparatus having rewritable nonvolatile memory
US6182190B1 (en) Automobile controller
CN114816273B (en) Norflash-oriented adaptive optimal configuration method, device and medium
JPH07239777A (en) Electronic controller with one-chip microcomputer, and its control data storing method
JPH08319880A (en) Vehicle control method
JP2004287712A (en) Electronic device
JPH0430060B2 (en)
JPH1097419A (en) Memory write device for electronic device
JP2001147863A (en) Flash memory rewrite device
JP2572083B2 (en) Material testing machine
JP2001265601A (en) Electronic control device and memory rewriting method
JPH05143315A (en) Version up method for firmware
JPH06266537A (en) Controller
JPH11229953A (en) Engine control device
JP2001318907A (en) Microcomputer incorporating flash memory
JP2000097141A (en) Engine ignition timing control device
EP0333213B1 (en) Microcomputer producing pulses at outout ports in sequence in response to request signal
JPH07119538A (en) Engine controller
JPH07287606A (en) Engine controller

Legal Events

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

Free format text: PAYMENT UNTIL: 20080905

Year of fee payment: 12

LAPS Cancellation because of no payment of annual fees