JPH03238526A - Program controller - Google Patents

Program controller

Info

Publication number
JPH03238526A
JPH03238526A JP2035867A JP3586790A JPH03238526A JP H03238526 A JPH03238526 A JP H03238526A JP 2035867 A JP2035867 A JP 2035867A JP 3586790 A JP3586790 A JP 3586790A JP H03238526 A JPH03238526 A JP H03238526A
Authority
JP
Japan
Prior art keywords
program
address
hexadecimal
memory
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
JP2035867A
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 JP2035867A priority Critical patent/JPH03238526A/en
Publication of JPH03238526A publication Critical patent/JPH03238526A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To add or change the program preliminarily written in a memory by discriminating whether the program is stored in a prescribed address of the memory or not and preliminarily programming the jump to the prescribed address at the time of discriminating that the program is stored in the prescribed address of the memory. CONSTITUTION:The memory incorporated in a CPU circuit 1 has the area from address '0000' (hexadecimal) to address '00FF' (hexadecimal) used as a RAM and has the area from address 00FF (hexadecimal) to address '10FF' (hexadecimal) used as a ROM, and a program A is preliminarily stored in this ROM area. The area from address 'C000' (hexadecimal) to address 'FFFF' (hexadecimal) is used for future storage of an additional program B. It is discriminated whether the program is stored in the prescribed address of the memory or not, and the jump to this prescribed address is preliminarily programmed when the program is stored there. Thus, the program recorded in the memory can be added or changed.

Description

【発明の詳細な説明】 [産業上の利用分野] 本発明は、EPROM内にプログラムを追加書き込みで
きるようにしたプログラム制御装置に関する。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a program control device that allows additional programs to be written into an EPROM.

[従来の技術] CPU回路で、プログラムを収納するROMとしては、
E P ROM (electrically pro
grammableread−only memory
)が一般的である。このEPROMは、未使用状態では
全てFF (16進数)が記憶された消去状態となって
おり、プログラムを書き込むとその内容に応じて”1”
(2進数)が”O”(2進数)に書き換えられる。例え
ば、FF(16進数)をA5 (16進数)に書き換え
る場合は、 FF (16進数)    11111111(2進数
) A5 (16進数)   10100101 (2進数
) のように、2.4.5.7桁目のが”1”(2進数)が
”0”(2進数)に書き換えられる。
[Prior art] As a ROM that stores programs in a CPU circuit,
E P ROM (electrically pro
grammable read-only memory
) is common. When this EPROM is not in use, it is in an erased state where all FF (hexadecimal numbers) are stored, and when a program is written, it becomes "1" depending on the contents.
(binary number) is rewritten to "O" (binary number). For example, when rewriting FF (hexadecimal number) to A5 (hexadecimal number), 2.4.5.7 digits, such as FF (hexadecimal number) 11111111 (binary number) A5 (hexadecimal number) 10100101 (binary number) The "1" (binary number) in the eye is rewritten to "0" (binary number).

[発明が解決しようとする課題] EPROMのうち、消去用の窓をモールドでふさいだワ
ンタイムプログラミングROMは、消去することができ
ない。従って、上述したようにして一度書き込みが行わ
れたワンタイムプログラミングROMは、仕様変更等が
あってもプログラムを追加変更することができず、従来
は廃棄処分されていた。
[Problems to be Solved by the Invention] Among EPROMs, one-time programming ROMs whose erasure windows are covered with mold cannot be erased. Therefore, in the one-time programming ROM once written as described above, the program cannot be added or changed even if the specifications are changed, and conventionally, the one-time programming ROM has been discarded.

本発明は、上記の問題点に鑑みてなされたもので、ワン
タイムプログラミングROMにプログラムが追加できる
ようにすることを目的とする。
The present invention has been made in view of the above problems, and an object of the present invention is to enable programs to be added to a one-time programming ROM.

[課題を解決するための手段] この目的を達成するために、本発明のプログラム制御装
置は、プログラムを収納するワンタイムプログラミング
ROMをメモリとして有するプログラム制御装置におい
て、メモリには、メモリの所定番地にプログラムを収納
しているか否かを判断する第1のステップと、所定番地
にプログラムが収納されているときは所定番地にジャン
プする第2のステップと、所定番地にプログラムが収納
されていないときは次のステップに移行する第3のステ
ップとを有するプログラムが記録されている。
[Means for Solving the Problems] In order to achieve this object, the program control device of the present invention has a one-time programming ROM as a memory that stores a program. The first step is to determine whether the program is stored in the specified location, the second step is to jump to the specified location if the program is stored in the specified location, and the second step is to jump to the specified location when the program is not stored in the specified location. A program is recorded that has a third step that moves on to the next step.

[作用] 上記構成のプログラム制御装置においては、メモリの所
定番地にプログラムを収納しているか否かを判断して、
メモリの所定番地にプログラムが収納されている場合に
は、その所定番地にジャンプするように予めプログラム
するようにしたので、メモリに記録したプログラムを追
加、変更することができる。
[Operation] In the program control device having the above configuration, it is determined whether a program is stored at a predetermined location in the memory, and
If a program is stored in a predetermined location in the memory, it is programmed in advance to jump to that predetermined location, so that the program recorded in the memory can be added or changed.

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

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

第1図において、CPU回路1(ワンチップマイクロコ
ンピュータ)はその内部に記憶されているプログラムに
従って、パスライン2を介してキーボード3やセレクト
スイッチ33から信号の入力を受け、出力装置4やLE
D31および32を制御する。
In FIG. 1, a CPU circuit 1 (one-chip microcomputer) receives signal input from a keyboard 3 and a select switch 33 via a path line 2 according to a program stored therein, and outputs signals from an output device 4 and a select switch 33.
Controls D31 and 32.

CPU回路1が内蔵するメモリは、第2図のメモリマツ
プで示すように構成されている。oOoO(16進数)
番地から○OFF (16進数)番地までは、RAMと
して使用される。0OFF (16進数)番地からl0
FF (16進数)番地までは、ROMとして使用され
、プログラムAが予め記憶されている。C00O(16
進数)番地からFFFF (16進数)番地までは、将
来、追加プログラムBを記憶するために使用される。す
なわち、l0FF (16進数)番地からFFFF(1
6進数)番地までは、未使用状態であり、そこは当初は
全てFF (16進数)が記憶された消去状態となって
いる。
The memory built into the CPU circuit 1 is configured as shown in the memory map of FIG. oOoO (hexadecimal)
The area from address to ○OFF (hexadecimal) address is used as RAM. 0OFF (hexadecimal number) from address l0
The area up to address FF (hexadecimal number) is used as a ROM, and program A is stored in advance. C00O(16
The addresses from FFFF (hexadecimal) to FFFF (hexadecimal) will be used to store additional program B in the future. That is, from address l0FF (hexadecimal number) to FFFF (1
The addresses up to (hex) addresses are unused, and are initially in an erased state with all FFs (hexadecimal) stored therein.

プログラムAは、例えば第3図にフローチャートで示す
ステップを少なくとも含んでいる。
Program A includes at least the steps shown in the flowchart of FIG. 3, for example.

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

プログラムが追加されなかった場合には、C000(1
6進数)番地はFF (16進数)が記憶された消去状
態のままとなっているので、ステップ10でC00O(
16進数)番地がFF (16進数)であるか否かを判
断したときに、直ちにステップ12に移行する。従って
、ステップ10からステップ12までがプログラムAに
おいて悪影響を与えることはない。
If no program is added, C000(1
Since the address (hexadecimal number) remains in the erased state where FF (hexadecimal number) is stored, the C00O (
When it is determined whether the address (hexadecimal number) is FF (hexadecimal number), the process immediately moves to step 12. Therefore, steps 10 to 12 do not have an adverse effect on program A.

プログラムAは、例えば、第4図および第5図に示すよ
うに構成されている。このプログラム八において、C0
0O(16進数)番地がFF (16進数)であるか否
かを判断しくステップ40)、FF (16進数)であ
ったときは次の処理に移る(ステップ42)。FF (
16進数)でないときは、C00O(16進数)番地に
ジャンプする(ステップ41)。
Program A is configured as shown in FIGS. 4 and 5, for example. In this program 8, C0
It is determined whether the address 0O (hexadecimal number) is FF (hexadecimal number) (step 40), and if it is FF (hexadecimal number), the process moves to the next step (step 42). FF (
If the address is not (hexadecimal), it jumps to address C00O (hexadecimal) (step 41).

プログラムBが追加されていない場合には、C000(
16進数)番地はFF (16進数)が記憶された消去
状態のままとなっているので、ステップ40でC00O
(16進数)番地がFF (16進数)であるか否かを
判断したときに、直ちにステップ42に移行する。その
後、第1図に示す回路が組込まれた装置(例えばオーデ
ィオ装置)が再生モードか否かを判断する(ステップ4
3)。
If program B has not been added, C000(
Since the address (hexadecimal number) remains in the erased state where FF (hexadecimal number) is stored, C00O is stored in step 40.
(Hexadecimal) When it is determined whether the address is FF (hexadecimal), the process immediately moves to step 42. Thereafter, it is determined whether the device (for example, an audio device) incorporating the circuit shown in FIG. 1 is in the playback mode (step 4).
3).

再生モードでないと判断したときには、LED32を点
灯して再生モード以外の処理を行う(ステップ44)。
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 performed (step 44).

再生モードと判断したとぎには、LED32を消灯して
再生モードとしての処理を行う(ステップ45)。
Once it is determined that the mode is the playback mode, the LED 32 is turned off and processing is performed as the playback mode (step 45).

第5図はプログラムAにおける割り込みもしくはサブル
ーチンのプログラムである。
FIG. 5 shows an interrupt or subroutine program in program A.

第5図において、割り込みもしくはサブルーチンがスタ
ートすると、キーボード3のキースキャン(ステ・ジブ
50)を行って再生モードであるか否かを判断する(ス
テップ51)。再生モードである場合は、別のキーの取
り込みを行って(ステップ56)、プログラムAのステ
ップ42に戻る(ステップ57)。
In FIG. 5, when an interrupt or a subroutine starts, a key scan of the keyboard 3 (step 50) is performed to determine whether or not the mode is playback mode (step 51). If the mode is playback mode, another key is captured (step 56) and the process returns to step 42 of program A (step 57).

再生モードでない場合は、セレクトスイッチ33が押さ
れたか否かを判断する(ステップ52)。
If it is not the playback mode, it is determined whether the select switch 33 has been pressed (step 52).

セレクトスイッチ33が押されていない場合は、別のキ
ーの取り込みを行って(ステップ56)、プログラムA
のステップ42に戻る(ステップ57)。セレクトスイ
ッチ33が押されていた場合は、LED31が点灯して
いるか否かを判断する(ステップ53)。
If the select switch 33 is not pressed, another key is imported (step 56) and program A is selected.
The process returns to step 42 (step 57). If the select switch 33 has been pressed, it is determined whether the LED 31 is lit (step 53).

LED31が点灯していない場合は、LED31を点灯
(ステップ54)してから別のキーの取り込みを行い(
ステップ56)、プログラムAのステップ42に戻る(
ステップ57)。LED31が点灯していた場合は、L
ED31を消灯(ステップ55)してから別のキーの取
り込みを行い(ステップ56)、プログラムAのステッ
プ42に戻る(ステップ57)。
If the LED 31 is not lit, turn on the LED 31 (step 54) and then import another key (
step 56), return to step 42 of program A (
Step 57). If LED31 is lit, L
After turning off the ED 31 (step 55), another key is read (step 56), and the process returns to step 42 of program A (step 57).

プログラムAにプログラムの追加または変更が必要にな
った場合には、追加変更されるプログラムBが、C00
O(16進数)番地からFFFF(16進数)番地まで
に書き込みされる。
If it becomes necessary to add or change a program to program A, the program B to be added or changed will be C00
It is written from address O (hexadecimal number) to address FFFF (hexadecimal number).

このプログラムBが、C00O(16進数)番地からF
FFF (16進数)番地までに追加書き込みされされ
たときには、C00O(16進数)番地がFF (16
進数)から他のオペレーションコードに変更されること
になる。もしも、CPU回路1のオペレーションコード
としてFF (16進数)が存在する場合には、FF 
(16進数)以外のNOP命令(何もしないことを指示
する命令)のオペレーションコードを書き込むようにす
る。
This program B starts from address C00O (hexadecimal) to F
When additional writing is performed up to address FFF (hexadecimal number), address C00O (hexadecimal number) becomes FF (16
(base number) will be changed to another operation code. If FF (hexadecimal number) exists as the operation code of CPU circuit 1, FF
An operation code other than (hexadecimal number) for a NOP instruction (instruction to do nothing) is written.

第6図は、第4図および第5図に示した追加変更前のプ
ログラムAでは、LED31および32を独立して、相
互に無関係に点灯する仕様であったものを、LED32
が消灯している間はLED31も消灯するように仕様変
更する場合のフローに追加するプログラムBの実施例を
示している。
FIG. 6 shows that in Program A before the additions and changes shown in FIGS. 4 and 5, LEDs 31 and 32 were lit independently and independently of each other;
This shows an example of program B added to the flow when the specifications are changed so that the LED 31 is also turned off while the LED 31 is turned off.

第6図において、プログラムBがスタートすると、LE
D31が点灯しているか否かを判断する(ステップ21
)。LED31が点灯している場合は、LED32が点
灯しているか否かを判断する(ステップ25)。LE’
D32が点灯している場合は、プログラムAのステップ
12に戻る。LED32が消灯している場合は、RAM
4内に設けられるLEDメモリ変数をn1ppにセット
し、LED31を消灯(ステップ26)してから、プロ
グラムAのステップ42に戻る。
In FIG. 6, when program B starts, LE
Determine whether D31 is lit (step 21
). If the LED 31 is lit, it is determined whether the LED 32 is lit (step 25). LE'
If D32 is lit, the process returns to step 12 of program A. If LED 32 is off, the RAM
After setting the LED memory variable provided in program A to n1pp and turning off the LED 31 (step 26), the process returns to step 42 of program A.

ステップ21でLED31が消灯していると判断した場
合は、LED32が点灯しているか否かを判断する(ス
テップ22)。LED32が消灯している場合は、プロ
グラムAのステップ42に戻る。LED32が点灯して
いる場合は、RAM4内に設けられるLEDメモリ変数
が1′″であるか否かを判断する(ステップ23)。L
EDメモリ変数がppVpでないときは、プログラムA
のステップ42に戻る。LEDメモリ変数が#11##
のときは、LEDメモリ変数をII O##にセットし
、LED31を点灯(ステップ24)してから、プログ
ラムへのステップ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 provided in the RAM 4 is 1''' (step 23).
If the ED memory variable is not ppVp, program A
Return to step 42. LED memory variable is #11##
If so, set the LED memory variable to II O##, turn on the LED 31 (step 24), and then return to step 42 of the program.

このように、プログラムBが追加変更された後は、プロ
グラムAでは必ずステップ40からステップ41でC0
0O(16進数)番地にジャンプして、プログラムBを
実行した後にステップ42に戻る。
In this way, after program B is added and changed, program A always changes C0 from step 40 to step 41.
After jumping to address 0O (hexadecimal number) and executing program B, the process returns to step 42.

第3図に示すプログラムは、CPU回路1の割込み処理
に挿入したり、キー人力の取り込み等のコントローラ部
の処理の前後に挿入したりすることもできる。
The program shown in FIG. 3 can be inserted into the interrupt processing of the CPU circuit 1, or can be inserted before or after the processing of the controller unit, such as inputting key human power.

以上、本発明を実施例により説明したが、本発明の技術
的思想によれば、種々の変形が可能である。例えば、上
述した実施例においては、追加プログラムBは、↓個で
あるものとして説明したが、追加プログラム用のメモリ
領域を複数個(例えば、AOOO乃至AFFF (16
進数)番地、BOOO乃至BFFF (16進数)番地
、cooo乃至CFFF (16進数)番地等)設け、
第3図に示すステップをプログラム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 embodiment, the number of additional programs B is ↓, but there are multiple memory areas for additional programs (for example, AOOO to AFFF (16
(hexadecimal) addresses, BOOO to BFFF (hexadecimal) addresses, cooo to CFFF (hexadecimal) addresses, etc.),
By inserting a plurality of steps shown in FIG. 3 into program A, it is possible to add a plurality of programs.

[発明の効果] 以上のように、本発明のプログラム制御装置によれば、
メモリの所定番地にプログラムを収納しているか否かを
判断して、メモリの所定番地にプログラムが収納されて
いる場合には、その所定番地にジャンプするように予め
プログラムするようにしたので、メモリに予め書き込ん
であるプログラムを追加、変更することが可能となる。
[Effects of the Invention] As described above, according to the program control device of the present invention,
We decided whether or not a program is stored in a specified memory location, and if a program is stored in a specific memory location, we pre-programmed the program to jump to that location. It becomes possible to add or change programs that have been written in advance.

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

第1図は、本発明によるプログラム制御装置の一実施例
の構成を示すブロック図、第2図は、本発明によるプロ
グラム制御装置の一実施例の構成を示すメモリマツプ、
第3図乃至第6図は、本発明によるプログラム制御装置
の一実施例の動作を説明するフローチャートである。 1・CPU回路、2・−・パスライン、3・・・キーボ
ード、6・・出力装置。
FIG. 1 is a block diagram showing the configuration of an embodiment of a program control device according to the present invention, and FIG. 2 is a memory map showing the structure of an embodiment of the program control device according to the present invention.
3 to 6 are flowcharts illustrating the operation of one embodiment of the program control device according to the present invention. 1. CPU circuit, 2.--pass line, 3.. keyboard, 6.. output device.

Claims (1)

【特許請求の範囲】[Claims] プログラムを収納するワンタイムプログラミングROM
をメモリとして有するプログラム制御装置において、前
記メモリには、前記メモリの所定番地にプログラムを収
納しているか否かを判断する第1のステップと、前記所
定番地にプログラムが収納されているときは前記所定番
地にジャンプする第2のステップと、前記所定番地にプ
ログラムが収納されていないときは次のステップに移行
する第3のステップとを有するプログラムが記録されて
いるプログラム制御装置。
One-time programming ROM that stores programs
In a program control device having a program controller as a memory, the memory includes a first step of determining whether or not a program is stored in a predetermined location of the memory, and a first step of determining whether a program is stored in a predetermined location of the memory; A program control device in which a program is recorded, which has a second step of jumping to a predetermined location, and a third step of moving to the next step when no program is stored in the predetermined location.
JP2035867A 1990-02-15 1990-02-15 Program controller Pending JPH03238526A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2035867A JPH03238526A (en) 1990-02-15 1990-02-15 Program controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2035867A JPH03238526A (en) 1990-02-15 1990-02-15 Program controller

Publications (1)

Publication Number Publication Date
JPH03238526A true JPH03238526A (en) 1991-10-24

Family

ID=12453941

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2035867A Pending JPH03238526A (en) 1990-02-15 1990-02-15 Program controller

Country Status (1)

Country Link
JP (1) JPH03238526A (en)

Similar Documents

Publication Publication Date Title
KR100425371B1 (en) Method of generating and storing a user programme consisting of instructions for a stored-programme control unit and method of operating the stored-programme control unit
JPH03238526A (en) Program controller
KR19980054349A (en) Optional automatic setting circuit
KR920010469A (en) Single Chip Microcomputers and Multifunction Memory
JPH0333926A (en) Microcomputer
KR100199477B1 (en) Memory saving method and system
JPS6252635A (en) Data converting system
JP2659147B2 (en) Evaluation microcomputer
JPH11259357A (en) Semiconductor integrated device and nonvolatile memory writing system
KR950014087B1 (en) Rom flash circuit and method
JPH0313766Y2 (en)
JPS63184858A (en) One-chip microcomputer
JPH0381185B2 (en)
JPH05241853A (en) Programmable controller
JPS6348698A (en) Memory storage control device
JPH11259308A (en) Programmable controller
JPS62224854A (en) Microcomputer
JPH0610401Y2 (en) Program timer
JPH03276336A (en) Program controller
JPS60169906A (en) Programmable controller
JPS60243760A (en) Setting method of system parameter
JPS63307502A (en) Programmable logic controller device
JPS60231246A (en) Memory protection method
JPH01224853A (en) Memory controller
KR910001550A (en) Data processing device and method