JPH03276336A - Program controller - Google Patents

Program controller

Info

Publication number
JPH03276336A
JPH03276336A JP2077820A JP7782090A JPH03276336A JP H03276336 A JPH03276336 A JP H03276336A JP 2077820 A JP2077820 A JP 2077820A JP 7782090 A JP7782090 A JP 7782090A JP H03276336 A JPH03276336 A JP H03276336A
Authority
JP
Japan
Prior art keywords
program
rom
mask rom
address
stored
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2077820A
Other languages
Japanese (ja)
Inventor
Mamoru Chiku
守 知久
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.)
Victor Company of Japan Ltd
Original Assignee
Victor Company of Japan 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 Victor Company of Japan Ltd filed Critical Victor Company of Japan Ltd
Priority to JP2077820A priority Critical patent/JPH03276336A/en
Publication of JPH03276336A publication Critical patent/JPH03276336A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To add and change the programs recorded in a mask ROM by pro gramming previously the mask ROM if a program is stored in a prescribed address of a one-time ROM or an E<2>PROM. CONSTITUTION:A one-chip microcomputer consists of a mask ROM and a one-time ROM or an E<2>PROM. Then it is decided whether a program is stored or not in a prescrined address of the one-time ROM or the E<2>PROM. If so, the mask ROM is previously programmed so that the stored program is carried out. If not, the next step of the program stored in the mask ROM is carried out. Thus the programs recorded previously in the mask ROM can be substantial ly added and changed.

Description

【発明の詳細な説明】 [産業上の利用分野コ 本発明は、マスクROMを有する1デツプマイクロコン
ピユータにおいて、プログラムを追加書き込みできるよ
うにしたプログラム制御MI装置に関する。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a program-controlled MI device in which a program can be additionally written in a 1-deep microcomputer having a mask ROM.

[従来の技術] 本出願人は、1チップマイクロコンピュータをシングル
デツプモードで使用する場合に、プログラムを追加する
ことができる装置を、特願平2−35867号として先
に提案した。
[Prior Art] The present applicant previously proposed in Japanese Patent Application No. 2-35867 a device that allows programs to be added when a 1-chip microcomputer is used in single-deep mode.

この装置においては、ワンタイムROMにより、所定の
プログラムが予め記憶された第1のメモリ領域と、新た
にプログラムが書き込まれる第2のメモリ領域とを形成
し、予め記憶されるプログラムに、第2のメモリ領域に
プログラムが書き込まれているか否かを判定するステッ
プを、用意させておくようにした。
In this device, a one-time ROM forms a first memory area in which a predetermined program is stored in advance and a second memory area in which a new program is written. A step for determining whether a program has been written to the memory area is prepared.

[発明が解決しようとする課題] しかしながら、この先に提案した装置は、ワンタイムR
OMにプログラムを記憶させるものであるため、量産に
適するマスクROMを用いた1チツブマイクロコンピュ
ータには適用することができなかった。
[Problem to be solved by the invention] However, the device proposed earlier is one-time R
Since the program is stored in the OM, it cannot be applied to a one-chip microcomputer using a mask ROM suitable for mass production.

本発明は、上記の問題点に鑑みてなされたもので、マス
クROMを用いた1デツプマイクロコンピユータにおい
ても、プログラムが追加できるようにするものである。
The present invention has been made in view of the above problems, and is intended to enable programs to be added even to a 1-deep microcomputer using a mask ROM.

[課題を解決するための手段] この目的を達成するために、本発明のプログラム制御装
置は、プログラムを収納するマスクROMと、新たなプ
ログラムが追加書き込み可能なワンタイムROM!−た
はE2FROMをメモリとして有する1チップマイクロ
コンピュータのプログラム制御装置において、マスクR
OMには、ワンタイムROMまたはE2FROMの所定
番地にプログラムが収納されているか否かを判断する第
1のステップと、所定番地にプログラムが収納されてい
るときはそのプログラムを実行する第2のステップと、
所定番地にプログラムが収納されていないときは、マス
クROMのプログラムの次のステップに移行させる第3
のステップとを有するプログラムが記録されている。
[Means for Solving the Problems] In order to achieve this object, the program control device of the present invention includes a mask ROM that stores programs and a one-time ROM that can be additionally written with new programs! In a program control device for a one-chip microcomputer having - or E2FROM as memory, the mask R
The OM includes a first step of determining whether a program is stored in a predetermined location in the one-time ROM or E2FROM, and a second step of executing the program if the program is stored in the predetermined location. and,
If the program is not stored in the predetermined location, the third step moves to the next step of the program in the mask ROM.
A program is recorded having the following steps.

[作用] 上記構成のプログラム制御装置においては、1チップマ
イクロコンピュータを、マスクROMと、ワンタイムR
OMまたはE”FROMにより構成し、ワンタイムRO
MまたはE”FROMの所定番地にプログラムが収納さ
れているか否かを判断して、プログラムが収納されてい
る場合には、そのプログラムが実行されるように、マス
クROMに予めプログラムするようにしたので、マスク
ROMに予め記録したプログラムを実質的に追加、変更
することができる。
[Function] In the program control device having the above configuration, a one-chip microcomputer is connected to a mask ROM and a one-time R
Configure with OM or E"FROM, one-time RO
It is determined whether a program is stored in a predetermined location of M or E"FROM, and if the program is stored, the mask ROM is programmed in advance so that the program is executed. Therefore, it is possible to substantially add to or change the program recorded in advance in the mask ROM.

[実施例] 以下、本発明の実施例を図面に基づいて説明する。[Example] Embodiments of the present invention will be described below based on the drawings.

第1図は、本発明によるプログラム制御装置の一実施例
におけるメモリの構成を示す図である。
FIG. 1 is a diagram showing the configuration of a memory in an embodiment of a program control device according to the present invention.

同図に示すように、本発明の1チップマイクロコンピュ
ータは、マスクROMとして形成されたアドレスがDO
OO(16進数)番地からFFFF番地までの領域と、
ワンタイムROMまたはE2FROMとして形成された
アドレスがcooo番地からCFFF番地までの領域と
を有している。この他、アドレスがoooo番地から0
OFF番地までの領域は、−時的にデータを格納するR
AMとして形成されている。
As shown in the figure, in the one-chip microcomputer of the present invention, the address formed as a mask ROM is DO
The area from OO (hexadecimal number) address to FFFF address,
The address formed as a one-time ROM or E2FROM has an area from address cooo to address CFFF. In addition, the address is 0 from address oooo
The area up to the OFF address is R for temporarily storing data.
It is formed as AM.

マスクROMには予め所定のプログラムAが書き込まれ
、ワンタイムROMまたはE2FROMは、後に他のプ
ログラムを追加、書き込みすることができるように、未
使用領域とされる。
A predetermined program A is written in the mask ROM in advance, and the one-time ROM or E2FROM is set as an unused area so that other programs can be added and written later.

マスクROMに書き込まれているプログラムAは、例え
ば第2図にフローチャートで示すステップを少なくとも
含んでいる。
The program A written in the mask ROM includes at least the steps shown in the flowchart of FIG. 2, for example.

これらのステップは、プログラムの追加が必要となりそ
うな箇所に挿入されている。すなわち、cooo番地が
F F (16進数)であるか否かを判断しくステップ
10)(第1のステップ)、FFであったときは、次の
処理に移る(ステップ12)(第3のステップ)。FF
でないときは、C00O番地にジャンプし、そのプログ
ラムを実行する(ステップ11)(第2のステップ)。
These steps are inserted where additional programming is likely to be required. That is, it is determined whether the cooo address is FF (hexadecimal number) (step 10) (first step), and if it is FF, the process moves to the next process (step 12) (third step). ). FF
If not, jump to address C000 and execute the program (step 11) (second step).

E2FROMの場合には、ステップ10の判定にFF以
外のデータを用いることもできる。
In the case of E2FROM, data other than FF can also be used for the determination in step 10.

マスクROMに書き込まれているプログラムAにプログ
ラムの追加または変更が必要になった場合、追加変更さ
れるプログラムBが、ワンタイムROMまたはE2PR
OMのcooo番地からCFFF番地までに書き込まれ
る。
If it becomes necessary to add or change a program to program A written in the mask ROM, the program B to be added or changed will be added to the one-time ROM or E2PR.
It is written from address cooo to address CFFF in OM.

このプログラムBが、C00O番地からCFFF番地ま
でに追加、書き込みされされたとき、0000番地のデ
ータがFFから他のデータに変更されることになる。
When this program B is added and written from address C000 to address CFFF, the data at address 0000 will be changed from FF to other data.

ワンタイムROMまたはE”FROMにプログラムBが
追加、書き込みされていない場合、C00O番地はFF
が記憶された消去状態のままとなっているので、ステッ
プ10でcooo番地がFFであるか否かを判断したと
き、直ちにステップ12に移行する。従って、ステップ
10からステップ12までがプログラムAにおいて悪影
響を与えることはない。
If program B is not added or written to one-time ROM or E”FROM, address C00O is FF.
remains in the stored erased state, so when it is determined in step 10 whether address cooo is FF, the process immediately moves to step 12. Therefore, steps 10 to 12 do not have an adverse effect on program A.

ワンタイムROMの場合、FFをオペレーションコード
として使用し、かつ、FFが追加のプログラムの先頭に
くる場合には、先頭アドレスのデータを例えばNOP命
令(何もしないことを指示する命令)とし、次のアドレ
スをFFとすれば、プログラムが追加されていることを
判定できる。
In the case of a one-time ROM, if the FF is used as an operation code and the FF comes at the beginning of an additional program, the data at the beginning address should be, for example, a NOP instruction (instruction to do nothing), and the next If the address is set as FF, it can be determined that the program has been added.

プログラムAは、例えば、第3図に示すように構成され
ている。このプログラムAにおいて、C00O番地がF
Fであるか否かを判断しくステップ40)、FFであっ
たとぎは次の処理に移る(ステップ42)。FFでない
ときは、C00O番地にジャンプし、例えば第4図に示
すプログラムBが実行される(ステップ41)。
Program A is configured as shown in FIG. 3, for example. In this program A, address C00O is F
It is determined whether or not it is F (step 40), and if it is FF, the process moves to the next step (step 42). If it is not FF, a jump is made to address C000, and, for example, program B shown in FIG. 4 is executed (step 41).

プログラムBがまだ追加されていない場合、この1チッ
プマイクロコンピュータが組み込まれた装置(この実施
例の場合オーディオ装置)が再生モードか否かが判断さ
れる(ステップ43)。再生モードでないと判断された
とき、LED32が点灯され、再生モード以外の処理が
実行される(ステップ44)。再生モードと判断された
とき、LED32が消灯され、再生モードとしての処理
が実行される(ステップ45)。
If program B has not been added yet, it is determined whether the device (in this embodiment, the audio device) in which this one-chip microcomputer is incorporated is in the playback mode (step 43). When it is determined that the mode is not the playback mode, the LED 32 is turned on and processing other than the playback mode is executed (step 44). When it is determined that the mode is playback mode, the LED 32 is turned off, and processing for playback mode is executed (step 45).

第4図は、第3図に示した追加変更前のプログラムAで
は、LED31および32を独立して、相互に無関係に
点灯する仕様であったものを、LED32が消灯してい
る間はLED31′tJ消灯するように仕様変更する場
合に追加するプログラムBの一実施例を示している。
FIG. 4 shows that in program A before the addition and change shown in FIG. 3, LEDs 31 and 32 were lit independently and independently of each other; This shows an example of program B that is added when changing the specifications so that the tJ light is turned off.

第4図において、プログラムBがスタートすると、先ず
LED31が点灯しているか否かか判断される(ステッ
プ21)。LED31が点灯している場合、次にLED
32が点灯しているか否かが判断される(ステップ25
)。LED32が点灯している場合、プログラムAのス
テップ42に戻る。
In FIG. 4, when program B starts, it is first determined whether the LED 31 is lit (step 21). If LED 31 is lit, then
32 is lit (step 25).
). If the LED 32 is lit, the program returns to step 42 of program A.

LED32が消灯している場合、LEDメモリ変数が”
1゛にセットされ、LED31が消灯された後(ステッ
プ26)、プログラムAのステップ42に戻る。
If LED 32 is off, the LED memory variable is
After the LED 31 is set to 1 and the LED 31 is turned off (step 26), the process returns to step 42 of program A.

ステップ21でLED31が消灯していると判断された
場合、LED32が点灯しているか否かが判断される(
ステップ22)。LED32が消灯している場合、プロ
グラムAのステップ42に戻る。LED32が点灯して
いる場合、LEDメモリ変数が”1゛°であるか否かが
判断される(ステップ23)。LEDメモリ変数が”1
°°でないとき、プログラムAのステップ42に戻る。
If it is determined in step 21 that the LED 31 is off, it is determined whether the LED 32 is on (
Step 22). If the LED 32 is off, the program returns to step 42 of program A. If the LED 32 is lit, it is determined whether the LED memory variable is "1" (step 23).
If not, return to step 42 of program A.

LEDメモリ変数が”1゛のとき、LEDメモリ変数が
0゛にセットされ、LED31が点灯されてから(ステ
ップ24)、プログラムAのステップ42に戻る。
When the LED memory variable is "1", the LED memory variable is set to 0" and the LED 31 is turned on (step 24), and then the process returns to step 42 of program A.

このように、プログラムBが追加された後は、プログラ
ムへのステップ40.41においてC000番地へのジ
ャンプが行なわれ、プログラムBを実行した後、プログ
ラムAのステップ42に戻る。
After program B has been added in this way, a jump to address C000 is made in step 40.41 of the program, and after executing program B, the process returns to step 42 of program A.

以上、本発明を実施例により説明したが、本発明の技術
的思想によれば、種々の変形が可能である。例えば、上
述した実施例においては、追加プログラムBは、1個で
あるものとして説明したが、追加プログラム用のワンタ
イムROMまたはE”FROMを複数個(領域)設け、
第2図に示すステップをプログラムAに複数個挿入する
ことで、複数個のプログラムを追加することもできる。
Although the present invention has been described above using examples, various modifications are possible according to the technical idea of the present invention. For example, in the above-mentioned embodiment, the explanation has been made assuming that there is only one additional program B, but if a plurality of one-time ROMs or E"FROMs (areas) for additional programs are provided,
A plurality of programs can be added by inserting a plurality of steps shown in FIG. 2 into the program A.

[発明の効果] 以上のように、本発明のプログラム制御装置によれば、
lチップマイクロコンピュータを、マスクROMとワン
タイムROMまたはE”FROMにより構成し、ワンタ
イムROMまたはE2FROMの所定番地にプログラム
が収納されている場合には、そのプログラムが実行され
るように、マスクROMに予めプログラムするようにし
たので、マスクROMに予め記録したプログラムを後に
実質的に追加、変更することができる。
[Effects of the Invention] As described above, according to the program control device of the present invention,
The l-chip microcomputer is composed of a mask ROM and a one-time ROM or E''FROM, and when a program is stored in a predetermined location of the one-time ROM or E2FROM, the mask ROM is used to execute the program. Since the program is programmed in advance, the program recorded in advance in the mask ROM can be substantially added to or changed later.

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

第1図は、本発明によるプログラム制御装置の一実施例
のメモリの構成を示す図、第2図乃至第4図は、本発明
によるプログラム制御装置の一実施例の動作を説明する
フローチャートである。 10乃至12.21乃至26.40乃至45−・−ステ
ップ。 第2図 第 図 第3 図 第4 図
FIG. 1 is a diagram showing a memory configuration of an embodiment of a program control device according to the present invention, and FIGS. 2 to 4 are flowcharts explaining the operation of an embodiment of the program control device according to the present invention. . 10 to 12.21 to 26.40 to 45--steps. Figure 2 Figure 3 Figure 4

Claims (1)

【特許請求の範囲】  プログラムを収納するマスクROMと、新たなプログ
ラムが追加書き込み可能なワンタイムROMまたはE^
2PROMをメモリとして有する1チップマイクロコン
ピュータのプログラム制御装置において、 前記マスクROMには、前記ワンタイムROMまたはE
^2PROMの所定番地にプログラムが収納されている
か否かを判断する第1のステップと、前記所定番地にプ
ログラムが収納されているときはそのプログラムを実行
する第2のステップと、前記所定番地にプログラムが収
納されていないときは、前記マスクROMのプログラム
の次のステップに移行させる第3のステップとを有する
プログラムが記録されているプログラム制御装置。
[Claims] A mask ROM that stores programs and a one-time ROM or E^ in which new programs can be additionally written.
In a program control device for a one-chip microcomputer having a 2PROM as a memory, the mask ROM includes the one-time ROM or E
^2 A first step of determining whether or not a program is stored in a predetermined location of the PROM, a second step of executing the program if the program is stored in the predetermined location, and and a third step for moving to the next step of the program in the mask ROM when the program is not stored.
JP2077820A 1990-03-26 1990-03-26 Program controller Pending JPH03276336A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2077820A JPH03276336A (en) 1990-03-26 1990-03-26 Program controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2077820A JPH03276336A (en) 1990-03-26 1990-03-26 Program controller

Publications (1)

Publication Number Publication Date
JPH03276336A true JPH03276336A (en) 1991-12-06

Family

ID=13644675

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2077820A Pending JPH03276336A (en) 1990-03-26 1990-03-26 Program controller

Country Status (1)

Country Link
JP (1) JPH03276336A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH08328844A (en) * 1995-05-29 1996-12-13 Nec Shizuoka Ltd Program alternation method

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS55118149A (en) * 1979-03-05 1980-09-10 Nec Corp Computer circuit
JPS5663650A (en) * 1979-10-25 1981-05-30 Sharp Corp Program change system of electronic apparatus

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS55118149A (en) * 1979-03-05 1980-09-10 Nec Corp Computer circuit
JPS5663650A (en) * 1979-10-25 1981-05-30 Sharp Corp Program change system of electronic apparatus

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH08328844A (en) * 1995-05-29 1996-12-13 Nec Shizuoka Ltd Program alternation method

Similar Documents

Publication Publication Date Title
JP3563768B2 (en) ROM program change device
JPS63101931A (en) Program control system
JPH03276336A (en) Program controller
CN100375029C (en) Memory disposition methods and systems
JP2001256118A (en) Method for protecting microcomputer system, memory device and microcomputer system
JP2005141435A (en) Tool
JPS63273101A (en) Programmable controller
EP3584697B1 (en) Information processing device
JPH11242509A (en) Programmable logic controller
JP2689660B2 (en) One-chip microcomputer
JPH08305561A (en) Method and device for down-loading firmware
JPS63311436A (en) Program patch system
JP3575052B2 (en) Electronic equipment
JPH0312198A (en) Automatic washing machine
JP2002532802A (en) How to change the sequence of a program stored in read-only memory
JPH03238526A (en) Program controller
KR20030007647A (en) A software architecture optimizing modularity
KR100288209B1 (en) Device and method for changing control logic of ecu
JPH07287606A (en) Engine controller
JPH02199535A (en) Microprogram control
JPH11259308A (en) Programmable controller
JP2004280306A (en) Device for programmable controller, method for changing program, and method for changing content to be controlled
JPH06161780A (en) Memory and its control system
JPH0490032A (en) Microcomputer
JP2000267864A (en) Microcomputer