JPH1011277A - Computer device with electrically rewritable nonvolatile memory and nonvolatile semiconductor memory - Google Patents

Computer device with electrically rewritable nonvolatile memory and nonvolatile semiconductor memory

Info

Publication number
JPH1011277A
JPH1011277A JP8160010A JP16001096A JPH1011277A JP H1011277 A JPH1011277 A JP H1011277A JP 8160010 A JP8160010 A JP 8160010A JP 16001096 A JP16001096 A JP 16001096A JP H1011277 A JPH1011277 A JP H1011277A
Authority
JP
Japan
Prior art keywords
program
stored
nonvolatile memory
ram
computer device
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
JP8160010A
Other languages
Japanese (ja)
Inventor
Yutaka Iizuka
豊 飯塚
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.)
Sharp Corp
Original Assignee
Sharp Corp
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 Sharp Corp filed Critical Sharp Corp
Priority to JP8160010A priority Critical patent/JPH1011277A/en
Priority to EP97110059A priority patent/EP0825530A3/en
Priority to US08/879,885 priority patent/US5933595A/en
Publication of JPH1011277A publication Critical patent/JPH1011277A/en
Pending legal-status Critical Current

Links

Landscapes

  • Stored Programmes (AREA)
  • Storage Device Security (AREA)

Abstract

PROBLEM TO BE SOLVED: To store a program for changing stored contents to be executed in a computer device without increasing the number of the points of parts at the time of rewriting an operation program stored in an electrically rewritable nonvolatile memory. SOLUTION: At the time of changing stored contents in flash ROM 3, an IPL program stored in the flash ROM 3 is transferred to RAM 4. After transferring the IPL program to RAM 4, a switch control circuit 5 switches the mapping of a memory to execute the IPL program stored in RAM 4. The stored contents in flash ROM 3 is erased by the IPL program to write an updated program supplied through an RS-232C interface 12 in flash ROM 3.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明が属する技術分野】本発明は、動作用プログラム
が書込まれる電気的書換え可能な不揮発性メモリを備え
るコンピュータ装置およびコンピュータ装置に好適に用
いられる不揮発性半導体メモリに関する。
[0001] 1. Field of the Invention [0002] The present invention relates to a computer device having an electrically rewritable nonvolatile memory into which an operation program is written, and a nonvolatile semiconductor memory suitably used for the computer device.

【0002】[0002]

【従来の技術】コンピュータ装置では、電気的に書換え
可能な不揮発性半導体メモリや、書換え可能な不揮発性
半導体メモリの一種であるフラッシュEPROMなど
に、書き込まれているアプリケーションプログラムを書
換えるプログラムは、IPLプログラムと称され、専用
のROMに格納されている。
2. Description of the Related Art In a computer, a program for rewriting an application program written in an electrically rewritable nonvolatile semiconductor memory or a flash EPROM which is a kind of rewritable nonvolatile semiconductor memory is an IPL. It is called a program and is stored in a dedicated ROM.

【0003】上述のような装置の一例として、特開平6
−139064号公報に電子機器が示されている。電子
機器では、電気的に書換え可能な不揮発性メモリである
フラッシュROMに、機器の動作制御を行う制御プログ
ラムが格納されており、ROMにはIPLプログラムが
格納されている。IPLプログラムには、電源ON時に
動作するシステム立上げプログラムなどと共にフラッシ
ュROM書換え用のプログラムが含まれている。
[0003] As an example of the above-described apparatus, Japanese Patent Application Laid-Open No.
Japanese Patent Application Publication No. 139064 discloses an electronic apparatus. In an electronic device, a control program for controlling the operation of the device is stored in a flash ROM, which is an electrically rewritable nonvolatile memory, and an IPL program is stored in the ROM. The IPL program includes a flash ROM rewriting program together with a system start-up program that operates when the power is turned on.

【0004】フラッシュROMに記憶されている制御プ
ログラムにバグが発見されると、制御プログラムの書換
えのために、デバック済みの制御プログラムが記憶され
たSRAMメモリカードが、電子機器本体のメモリカー
ド接続部に接続される。SRAMメモリカードが接続さ
れると、ROMのシステム立上げプログラムによって、
前記SRAMメモリカードが制御プログラムを有するも
のと判別され、フラッシュROM書換え用プログラムに
基づいてデバック済みの制御プログラムが内部RAMに
読込まれて格納される。フラッシュROMにデータ書換
え用電源が供給されると、フラッシュROMに記憶され
ている制御プログラムが消去され、内部RAMに格納さ
れたデバック済みの制御プログラムがフラッシュROM
に書込まれる。
When a bug is found in the control program stored in the flash ROM, the SRAM memory card storing the debugged control program is rewritten in order to rewrite the control program. Connected to. When the SRAM memory card is connected, the ROM system start-up program
It is determined that the SRAM memory card has the control program, and the debugged control program is read and stored in the internal RAM based on the flash ROM rewriting program. When power for rewriting data is supplied to the flash ROM, the control program stored in the flash ROM is erased, and the debugged control program stored in the internal RAM is replaced with the flash ROM.
Is written to.

【0005】また、IPLプログラムを格納する専用の
ROMを設けずに、書換え可能な不揮発性半導体メモリ
やフラッシュEPROMにIPLプログラムを格納する
装置も提案されている。IPLプログラムには、アプリ
ケーションプログラム変更用の書換えプログラムが含ま
れており、書換えプログラムをRAMに転送して動作さ
せて、ROMの記憶内容を変更することができる。
There has also been proposed an apparatus for storing an IPL program in a rewritable nonvolatile semiconductor memory or flash EPROM without providing a dedicated ROM for storing the IPL program. The IPL program includes a rewrite program for changing an application program. The rewrite program can be transferred to the RAM and operated to change the storage content of the ROM.

【0006】フラッシュEPROMや書換え可能な不揮
発性半導体メモリなどの電気的に書換え可能なメモリに
アプリケーションプログラムおよびIPLプログラムを
格納している装置では、静電気やノイズなどの外的要因
によってフラッシュEPROMに書込まれている記憶内
容が書換えられる可能性がある。アプリケーションプロ
グラムが異常となった場合には、IPLプログラムを動
作させて再びアプリケーションプログラムをROMに書
込むことができるけれども、IPLプログラムが異常と
なった場合には、装置に正常なプログラムを書込むこと
はできなくなるという不都合がある。
In an apparatus in which an application program and an IPL program are stored in an electrically rewritable memory such as a flash EPROM or a rewritable nonvolatile semiconductor memory, writing to the flash EPROM is performed due to external factors such as static electricity and noise. The stored contents may be rewritten. If the application program becomes abnormal, the IPL program can be operated to write the application program into the ROM again, but if the IPL program becomes abnormal, the normal program must be written to the device. Is no longer possible.

【0007】たとえば、特開平5−342094号公報
に示されるコンピュータ装置では、このような不都合を
解決する技術が用いられている。コンピュータ装置は、
アプリケーションプログラムおよびIPLプログラムを
格納した電気的書換え可能なROMと、装置のリセット
時に前記ROMを選択するためのチップセレクト信号の
出力を抑止する抑止手段とを備えて構成されている。
[0007] For example, in a computer device disclosed in Japanese Patent Application Laid-Open No. 5-342094, a technique for solving such inconvenience is used. Computer equipment
The system comprises an electrically rewritable ROM storing an application program and an IPL program, and a suppressing means for suppressing output of a chip select signal for selecting the ROM when the device is reset.

【0008】コンピュータ装置では、IPLプログラム
が異常となった場合、正常なIPLプログラムが格納さ
れているメモリカードを機器に接続する。メモリカード
の接続後に機器をリセットすると、前記抑止手段からの
出力によってメモリカードが選択され、メモリカードに
格納されているIPLプログラムから正常な記憶内容変
更用プログラムが実行される。記憶内容変更用プログラ
ムによって、アプリケーションプログラムおよびIPL
プログラムがコンピュータ装置のROMに書込まれる。
In the computer, when the IPL program becomes abnormal, a memory card storing a normal IPL program is connected to the device. When the device is reset after the connection of the memory card, the memory card is selected by the output from the inhibiting means, and the normal storage content changing program is executed from the IPL program stored in the memory card. An application program and an IPL by a storage content changing program
The program is written into the ROM of the computer device.

【0009】[0009]

【発明が解決しようとする課題】前記電子機器では、記
憶内容変更用プログラムを記憶するための専用ROMが
設けられることとなり、機器の部品点数が増え、部品コ
ストが上昇するという問題点がある。
In the electronic device, a dedicated ROM for storing a storage content change program is provided, which causes a problem that the number of components of the device increases and the component cost increases.

【0010】前記コンピュータ装置では、内部に記憶さ
れているIPLプログラムが異常となった場合、IPL
プログラムが記憶されているメモリカードを接続し、メ
モリカードからIPLプログラムを読出し、アプリケー
ションプログラムおよびIPLプログラムをROMに書
込んでいるので、装置内部にメモリカード専用のインタ
フェイスおよびメモリカード接続用のコネクタなどを設
ける必要があり、装置の基板サイズの大型化およびコネ
クタなどを設けることによるコストの上昇を招く。
In the computer device, when an IPL program stored therein becomes abnormal, the IPL
Since the memory card storing the program is connected, the IPL program is read from the memory card, and the application program and the IPL program are written in the ROM, an interface dedicated to the memory card and a connector for connecting the memory card are provided inside the apparatus. It is necessary to provide such a device, which results in an increase in the size of the substrate of the device and an increase in cost due to the provision of the connector and the like.

【0011】また、記憶内容変更用プログラムを記憶し
たメモリボードを機器に接続して記憶内容変更用プログ
ラムを書換える方法などがあるけれども、ボードの装着
スペースおよびボードを接続するためのコネクタも必要
となる。
Although there is a method of connecting a memory board storing a storage content change program to a device and rewriting the storage content change program, a space for mounting the board and a connector for connecting the board are also required. Become.

【0012】本発明の目的は、電気的に書換え可能な不
揮発性メモリに記憶されている動作プログラムに従って
動作するコンピュータ装置で、簡単でかつ信頼性が高く
動作プログラムを書換えるための記憶内容変更用プログ
ラムを実行させることができる電気的書換え可能な不揮
発性メモリを備えるコンピュータ装置を提供することで
ある。
An object of the present invention is to provide a computer device which operates in accordance with an operation program stored in an electrically rewritable non-volatile memory, and which has a simple and highly reliable method for changing storage contents for rewriting an operation program. An object of the present invention is to provide a computer device including an electrically rewritable nonvolatile memory capable of executing a program.

【0013】[0013]

【課題を解決するための手段】本発明は、記憶内容変更
用のプログラムを含むコンピュータ装置の動作用プログ
ラムが書込まれ、電気的に書換え可能な不揮発性メモリ
と、記憶内容の書込みおよび読出しが可能なRAMと、
不揮発性メモリから記憶内容変更用のプログラムをRA
Mに転送するプログラム転送手段と、不揮発性メモリに
対する記憶内容の変更動作を指示する変更指示手段と、
変更指示手段からの記憶内容変更指示に応答し、プログ
ラム転送手段によって不揮発性メモリからRAMに転送
された記憶内容変更用プログラムに従って、不揮発性メ
モリの記憶内容を電気的に書換えるように制御する制御
手段とを含むことを特徴とする電気的書換え可能な不揮
発性メモリを備えるコンピュータ装置である。本発明に
従えば、コンピュータ装置の電気的に書換え可能な不揮
発性メモリには、コンピュータ装置を動作させるための
動作プログラムが書込まれている。前記不揮発性メモリ
に記憶されている内容を変更する際には、変更指示手段
によって記憶内容の変更動作の開始を指示する。プログ
ラム転送手段は、記憶内容変更指示が与えられることに
よって、前記不揮発性メモリに記憶されている動作用プ
ログラムから記憶内容変更用のプログラムを読出してR
AMに書込む。制御手段は、RAMに転送された記憶内
容変更用プログラムを実行して、前記不揮発性メモリの
記憶内容を電気的に書換える。したがって、電気的に書
換え可能な不揮発性メモリの記憶内容を変更する際に実
行されるプログラムは、動作用プログラムを書換えると
きに前記不揮発性メモリからRAMに転送されて実行さ
れるので、記憶内容変更用のプログラムを記憶しておく
専用ROMなどをコンピュータ装置に設けなくても動作
用プログラムを書換えることができる。
According to the present invention, there is provided an electrically rewritable nonvolatile memory in which a program for operating a computer including a program for changing storage contents is written, and a method for writing and reading storage contents. Possible RAM,
The program for changing the storage contents from the non-volatile memory
M; a program transfer unit for transferring the data to M;
Control for responding to a storage content change instruction from the change instruction means and electrically rewriting the storage content of the nonvolatile memory in accordance with the storage content change program transferred from the nonvolatile memory to the RAM by the program transfer means. And a computer device comprising an electrically rewritable non-volatile memory. According to the present invention, an operation program for operating the computer device is written in the electrically rewritable nonvolatile memory of the computer device. When changing the contents stored in the non-volatile memory, the change instructing means instructs the start of the operation of changing the stored contents. The program transfer means reads the storage content change program from the operation program stored in the non-volatile memory, and
Write to AM. The control means executes the storage content changing program transferred to the RAM, and electrically rewrites the storage content of the nonvolatile memory. Therefore, the program executed when changing the storage content of the electrically rewritable nonvolatile memory is transferred from the nonvolatile memory to the RAM when the operation program is rewritten, and is executed. The operation program can be rewritten without providing a dedicated ROM or the like for storing the change program in the computer device.

【0014】また本発明は、前記プログラム転送手段に
よって、前記RAMに転送された記憶内容変更用のプロ
グラムに対する書込み保護を行う保護手段を有すること
を特徴とする。本発明に従えば、RAMに転送された記
憶内容変更用のプログラムは、保護手段によって保護さ
れており、書込みが行われない。したがって、不揮発性
メモリの記憶内容を書換えるために、RAMに記憶され
ている記憶内容変更用プログラムを実行しているとき
に、ノイズなどによってRAMに記憶されている記憶内
容変更用プログラムが書換えられると、プログラムが暴
走する恐れがあるけれども、保護手段によってプログラ
ムの書換えが防止されているので、記憶内容変更用プロ
グラムを安定して動作させることができる。
Further, the present invention is characterized in that it has a protection means for performing write protection on the program for changing the stored contents transferred to the RAM by the program transfer means. According to the present invention, the storage content changing program transferred to the RAM is protected by the protection means, and is not written. Therefore, in order to rewrite the storage content of the nonvolatile memory, when the storage content change program stored in the RAM is being executed, the storage content change program stored in the RAM is rewritten due to noise or the like. Although the program may run out of control, the rewriting of the program is prevented by the protection means, so that the storage content changing program can be operated stably.

【0015】本発明の前記制御手段は、前記変更指示手
段によって変更動作が指示されないとき、前記不揮発性
メモリの予め定める記憶領域に書込まれているプログラ
ムに従って動作し、変更指示手段によって変更動作が指
示されるとき、前記プログラム転送手段によって記憶内
容変更用のプログラムが転送される前記RAMの記憶領
域に記憶されているプログラムに従って動作するプログ
ラム処理手段を有することを特徴とする。本発明に従え
ば、制御手段のプログラム処理手段は、変更指示手段に
よって変更動作が指示されていないときは、電気的に書
換え可能な不揮発性メモリの予め定める記憶領域に書込
まれているプログラムに従って動作する。また、変更指
示手段によって変更動作が指示されるときには、プログ
ラム転送手段によって記憶内容変更用のプログラムが転
送されているRAMの記憶内容に従って動作する。した
がって、変更指示手段によって変更動作の指示が行われ
たかどうかによって前記不揮発性メモリの予め定める記
憶領域に書込まれているプログラムか、RAMに記憶さ
れている記憶内容変更用のプログラムかが選択されるの
で、所望の動作に応じて前記不揮発性メモリまたはRA
Mの予め定める領域に記憶されているプログラムを読出
して実行させることができる。
The control means of the present invention operates according to a program written in a predetermined storage area of the nonvolatile memory when the change instruction is not instructed by the change instructing means, and the change operation is performed by the change instructing means. When instructed, there is provided a program processing means which operates in accordance with a program stored in a storage area of the RAM to which a program for changing storage contents is transferred by the program transfer means. According to the present invention, the program processing means of the control means, when the change operation is not instructed by the change instructing means, according to the program written in the predetermined storage area of the electrically rewritable nonvolatile memory. Operate. When a change operation is instructed by the change instructing means, the operation is performed in accordance with the stored contents of the RAM to which the program for changing the stored contents is transferred by the program transferring means. Therefore, depending on whether or not a change operation is instructed by the change instructing means, a program written in a predetermined storage area of the nonvolatile memory or a program for changing storage contents stored in the RAM is selected. Therefore, according to a desired operation, the nonvolatile memory or RA
A program stored in a predetermined area of M can be read and executed.

【0016】本発明の前記不揮発性メモリは、フラッシ
ュEPROMであることを特徴とする。本発明に従え
ば、コンピュータ装置における電気的に書換え可能な不
揮発性メモリは、フラッシュEPROMによって構成さ
れるので、メモリ領域全体あるいはメモリ領域を所定の
大きさに分割したブロック単位に書換えを行う場合であ
っても、確実に書換えを行うことができる。
The nonvolatile memory according to the present invention is a flash EPROM. According to the present invention, the electrically rewritable non-volatile memory in the computer device is constituted by a flash EPROM. Therefore, when the entire memory area or the memory area is rewritten in blocks each having a predetermined size. Even if there is, rewriting can be performed reliably.

【0017】本発明の前記不揮発性メモリは、製造時に
保護コードが格納されるレジスタと、記憶内容の変更時
にデータが入力される入力手段と、入力手段に入力され
るデータとレジスタに格納されている保護コードとを比
較し、一致しているときのみ、記憶内容の変更を許容す
る比較保護手段とを有することを特徴とする。本発明に
従えば、電気的に書換え可能な不揮発性メモリの記憶内
容を変更する際には、入力手段から入力されるデータ
と、レジスタに格納されている保護コードとが一致して
いるかどうかを比較保護手段が判断し、一致していると
きのみ書込みが許可され、記憶内容が書換えられる。し
たがって、保護コードと同一のデータを入力手段から入
力することができる場合のみ、前記不揮発性メモリの記
憶内容を変更することができ、前記不揮発性メモリの記
憶内容が不用意に書換えられることを防止することがで
きる。
The nonvolatile memory according to the present invention includes a register in which a protection code is stored at the time of manufacture, input means for inputting data when the storage content is changed, and data input to the input means and stored in the register. And a comparison protection means for permitting a change in the stored content only when the protection codes are matched with each other. According to the present invention, when changing the storage content of the electrically rewritable nonvolatile memory, it is determined whether the data input from the input unit matches the protection code stored in the register. The determination is made by the comparison protection means, and writing is permitted only when they match, and the stored contents are rewritten. Therefore, the storage contents of the nonvolatile memory can be changed only when the same data as the protection code can be input from the input means, thereby preventing the storage contents of the nonvolatile memory from being rewritten carelessly. can do.

【0018】本発明は、電気的書換え可能な不揮発性半
導体メモリにおいて、製造時に保護コードが格納される
レジスタと、記憶内容の変更時にデータが入力される入
力手段と、入力手段に入力されるデータとレジスタに格
納されている保護コードとを比較し、一致しているとき
のみ、記憶内容の変更を許容する比較保護手段とを含む
ことを特徴とする不揮発性半導体メモリである。 本発明に従えば、電気的に書換え可能な不揮発性半導体
メモリの記憶内容を変更する際には、入力手段から入力
されるデータと、レジスタに格納されている保護コード
とが一致しているかどうかを比較保護手段が判断し、一
致しているときのみ書込みが許可され、記憶内容が書換
えられる。したがって、保護コードと同一のデータを入
力手段から入力することができる場合のみ、前記不揮発
性半導体メモリの記憶内容を変更することができ、前記
不揮発性半導体メモリの記憶内容が不用意に書換えられ
ることを防止することができる。
The present invention relates to an electrically rewritable nonvolatile semiconductor memory, a register in which a protection code is stored at the time of manufacture, input means for inputting data when storage contents are changed, and data input to the input means. And a protection code that compares the protection code stored in the register and allows the storage contents to be changed only when they match. According to the present invention, when changing the storage content of the electrically rewritable nonvolatile semiconductor memory, it is determined whether the data input from the input unit matches the protection code stored in the register. Is determined by the comparison protection means, writing is permitted only when they match, and the stored contents are rewritten. Therefore, the storage content of the nonvolatile semiconductor memory can be changed only when the same data as the protection code can be input from the input means, and the storage content of the nonvolatile semiconductor memory can be rewritten carelessly. Can be prevented.

【0019】[0019]

【発明の実施の形態】図1は、本発明の実施の第1の形
態であるリモートプリンタ1の構成を示すブロック図で
ある。リモートプリンタ1は、CPU(中央処理装置)
2と、フラッシュROM3と、RAM4と、切換制御回
路5と、切換スイッチ6と、入力キー群7と、表示パネ
ル8と、ブザー9と、DIPスイッチ10と、プリンタ
11と、RS−232Cインタフェイス12とを含んで
構成される。
FIG. 1 is a block diagram showing a configuration of a remote printer 1 according to a first embodiment of the present invention. The remote printer 1 is a CPU (Central Processing Unit)
2, a flash ROM 3, a RAM 4, a switching control circuit 5, a switching switch 6, an input key group 7, a display panel 8, a buzzer 9, a DIP switch 10, a printer 11, and an RS-232C interface. 12 are included.

【0020】リモートプリンタ1は、電子式金銭登録機
などの情報処理装置の外部接続用プリンタとして使用さ
れるプリンタで、外部接続用インタフェイスであるRS
232−Cインタフェイス12を介して受信したコマン
ドおよびデータに基づいて、印字などの処理を行う。後
述するDIPスイッチ10の設定を切換えることによっ
て、情報処理装置の種類に応じて通信速度および通信デ
ータの様式の設定が可能である。
The remote printer 1 is a printer used as an external connection printer of an information processing apparatus such as an electronic cash register, and an external connection interface RS
Processing such as printing is performed based on the command and data received via the 232-C interface 12. By switching the setting of a DIP switch 10 described later, it is possible to set the communication speed and communication data format according to the type of the information processing apparatus.

【0021】CPU2は、フラッシュROM3、RAM
4、入力キー群7、表示パネル8、ブザー9、プリンタ
11、およびRS−232Cインタフェイス12などに
おける信号の入出力について制御を行う。また、RS−
232Cインタフェイス12を介して、外部のコンピュ
ータ装置などから供給されるデータを処理して印字用の
データとしてプリンタ11に供給する。
The CPU 2 includes a flash ROM 3 and a RAM
4, control of input / output of signals in the input key group 7, the display panel 8, the buzzer 9, the printer 11, the RS-232C interface 12, and the like. Also, RS-
Data supplied from an external computer device or the like is processed through the 232C interface 12 and supplied to the printer 11 as print data.

【0022】フラッシュROM3は、電気的に書換え可
能な不揮発性半導体メモリの一種であり、記憶領域を所
定の大きさに分割したブロック単位での書換えが可能
で、電源OFF時のメモリのバックアップが不要であ
る。またフラッシュROM3は、後述する記憶内容変更
用プログラムを含むIPLプログラムと動作プログラム
とを記憶している。IPLプログラムは、RAM4にお
けるワークエリアの初期化などの初期化プログラムと、
フラッシュROM3の記憶内容を書換える際に実行され
る記憶内容変更用プログラムとを含んで構成される。切
換スイッチ6は、たとえば動作プログラムの書換えを実
行させようとする操作者によって手動でON/OFFの
状態が切換えられ、ON/OFFの状態に応じて出力O
UTの信号レベルが定められる。
The flash ROM 3 is a kind of electrically rewritable nonvolatile semiconductor memory. The flash ROM 3 can be rewritten in units of blocks obtained by dividing a storage area into a predetermined size, and does not require backup of the memory when the power is turned off. It is. The flash ROM 3 stores an IPL program including an after-mentioned storage content changing program and an operation program. The IPL program includes an initialization program for initializing a work area in the RAM 4, and the like.
It is configured to include a storage content changing program executed when the storage content of the flash ROM 3 is rewritten. The ON / OFF state of the changeover switch 6 is manually switched by, for example, an operator who attempts to rewrite the operation program, and the output O is switched according to the ON / OFF state.
The signal level of the UT is determined.

【0023】入力キー群7には、リモートプリンタ1の
状態を設定するためのキーが複数個設けられており、た
とえばジャーナルキー16とレシートキー17とオンラ
インキー18とを含んで構成される。ジャーナルキー1
6は、プリンタ11におけるジャーナル側紙送りを指示
し、レシートキー17はプリンタ11におけるレシート
側紙送りを指示する。オンラインキー18は、RS−2
32Cインタフェイス12を介して外部のコンピュータ
装置と受信するときにはONとされ、非通信時にはOF
Fとされる。
The input key group 7 is provided with a plurality of keys for setting the status of the remote printer 1, and includes, for example, a journal key 16, a receipt key 17, and an online key 18. Journal key 1
Reference numeral 6 designates a journal-side paper feed in the printer 11, and a receipt key 17 instructs a receipt-side paper feed in the printer 11. Online key 18 is RS-2
The signal is turned on when receiving data from an external computer via the 32C interface 12, and is turned off when communication is not performed.
F.

【0024】表示パネル8は、リモートプリンタ1の状
態を表示するためのパネルであり、たとえば複数のLE
D(発光ダイオード)によって構成される。表示パネル
8には、電源オン時には点灯し、オフ時には消灯するパ
ワーランプと、通信回線接続時に点灯し、非接続時には
消灯するオンラインランプと、フラッシュROM3の書
換え時などにエラーが発生したとき点灯するエラーラン
プとを含んで構成される。ブザー9は、リモートプリン
タ1の状態を音によって報知するための装置であり、た
とえばフラッシュROM3の書換え時に、正常に書換え
が終了したときにはブザー音を1回鳴らし、異常が生じ
た場合は間欠ブザー音を鳴らしてエラーが発生したこと
を報知する。
The display panel 8 is a panel for displaying the status of the remote printer 1, and includes, for example, a plurality of LEs.
D (light emitting diode). The display panel 8 has a power lamp that is turned on when the power is turned on and is turned off when the power is off, an online lamp that is turned on when the communication line is connected and turned off when the communication line is not connected, and turned on when an error occurs when the flash ROM 3 is rewritten. And an error lamp. The buzzer 9 is a device for notifying the status of the remote printer 1 by sound. For example, at the time of rewriting the flash ROM 3, the buzzer sounds once when the rewriting is completed normally, and when the abnormality occurs, the intermittent buzzer sounds. To notify that an error has occurred.

【0025】DIPスイッチ10は、複数の状態設定用
スイッチによって構成されており、通信時の通信速度、
通信データの様式などの設定を行う。プリンタ11は、
CPU2から供給される印字用のデータに基づいて印字
を行う。また、リモートプリンタ1のテスト時、設定確
認時には、フラッシュROM3などから読出される所定
の印字を行う。
The DIP switch 10 is composed of a plurality of state setting switches.
Make settings such as communication data format. The printer 11
Printing is performed based on printing data supplied from the CPU 2. Further, at the time of testing the remote printer 1 and at the time of confirming the settings, predetermined printing read from the flash ROM 3 or the like is performed.

【0026】図2は切換制御回路5の構成を示すブロッ
ク図であり、図3は切換制御回路5による切換え制御を
説明するための図である。切換制御回路5は、デコード
回路21と、マッピング切換回路22と、書込保護回路
23とを含んで構成される。
FIG. 2 is a block diagram showing the configuration of the switching control circuit 5, and FIG. 3 is a diagram for explaining switching control by the switching control circuit 5. The switching control circuit 5 includes a decoding circuit 21, a mapping switching circuit 22, and a write protection circuit 23.

【0027】デコード回路21は、CPU2から与えら
れるアドレス信号に基づいてデコード信号AREA1,
AREA2をマッピング切換回路22に出力する。マッ
ピング切換回路22は、デコード信号AREA1,AR
EA2と、切換スイッチ6の出力OUTとに基づいて、
CPU2のリセット後にフラッシュROM3とRAM4
とのいずれをCPU2が参照するかを示す信号を出力す
る。フラッシュROM3にはフラッシュROM用のチッ
プセレクト信号SELOが与えられ、RAM4にはRA
M用のチップセレクト信号SELAが与えられる。
Decoding circuit 21 decodes signals AREA 1 and AREA 1 based on an address signal given from CPU 2.
AREA2 is output to the mapping switching circuit 22. The mapping switching circuit 22 outputs the decode signals AREA1, AR
Based on EA2 and the output OUT of the changeover switch 6,
Flash ROM 3 and RAM 4 after CPU 2 reset
And outputs a signal indicating which of the above is referred to by the CPU 2. The flash ROM 3 receives a chip select signal SELO for the flash ROM, and the RAM 4
A chip select signal SELA for M is applied.

【0028】チップセレクト信号SELO,SELA
は、いずれか一方のみがハイレベルとなる。フラッシュ
ROM3とRAM4とは、たとえば与えられる信号のレ
ベルがハイレベルであるとエリアAR1に定められ、ロ
ーレベルであるとエリアAR2に定められる。
Chip select signals SELO, SELA
, Only one of them is at the high level. In the flash ROM 3 and the RAM 4, for example, the level of the applied signal is set to the area AR1 when the level is high, and is set to the area AR2 when the level is low.

【0029】マッピング切換回路22は、デコード回路
21から与えられるアドレスデコード信号AREA1,
AREA2に対して、切換スイッチ6がONであるかO
FFであるかに応じて、フラッシュROM3およびRA
M4にチップセレクト信号SELO,SELAを出力す
る。切換スイッチ6がOFFであるときには、図3
(1)に示すようにエリアAR1としてフラッシュRO
M3が割当てられ、エリアAR2としてRAM4が割当
てられる。また、切換スイッチ6がONであるときに
は、図3(2)に示すようにエリアAR1にRAM4が
割当てられ、エリアAR2にフラッシュROM3が割当
てられる。CPU2は、エリアAR1に割当てられてい
るメモリの先頭のアドレスを参照してプログラムを実行
する。
The mapping switching circuit 22 has an address decode signal AREA1,
For AREA2, check if switch 6 is ON
Flash ROM 3 and RA
The chip select signals SELO and SELA are output to M4. When the changeover switch 6 is OFF, FIG.
As shown in (1), flash RO is set as area AR1.
M3 is allocated, and RAM4 is allocated as area AR2. When the changeover switch 6 is ON, the RAM 4 is allocated to the area AR1 and the flash ROM 3 is allocated to the area AR2 as shown in FIG. The CPU 2 executes the program with reference to the head address of the memory allocated to the area AR1.

【0030】書込保護回路23は、CPU2からの書込
み信号WRと、切換スイッチ6の出力OUTとが与えら
れている。CPU2から供給される書込み信号WRがハ
イレベルになってRAM4に対する書込みが要求された
場合、出力OUTがいずれの信号レベルであるかによっ
て、RAM4に対する書込みを許可するか否かが定めら
れ、RAM用書込み信号RWRの信号レベルが定められ
る。
The write protection circuit 23 receives the write signal WR from the CPU 2 and the output OUT of the changeover switch 6. When the write signal WR supplied from the CPU 2 becomes high level and writing to the RAM 4 is requested, whether or not to permit writing to the RAM 4 is determined depending on which signal level of the output OUT is. The signal level of the write signal RWR is determined.

【0031】切換スイッチ6の出力OUTによって、切
換スイッチ6がOFFであると判断されるときには、R
AM4のIPLプログラムがコピーされている領域に対
する書込みを許可しない。また、切換えスイッチ6の出
力OUTによって、切換スイッチ6がONであると判断
されるときには、書込み信号WRがハイレベルとなると
RAM4に対する書込みを許可する。
When it is determined from the output OUT of the changeover switch 6 that the changeover switch 6 is OFF, R
Writing is not permitted in the area where the AM4 IPL program is copied. When it is determined from the output OUT of the changeover switch 6 that the changeover switch 6 is ON, the writing to the RAM 4 is permitted when the write signal WR becomes high level.

【0032】図4は、リモートプリンタ1におけるフラ
ッシュROM3とRAM4とに記憶されているプログラ
ムの配置を示す。図4(1)は、IPLプログラムにお
ける記憶内容変更用のプログラムを実行する前のフラッ
シュROM3とRAM4とを示す。フラッシュROM3
の先頭の番地からの領域R1には、IPLプログラムが
格納されており、領域R2には動作プログラムが格納さ
れている。RAM4の領域R3はすべてワークエリアと
なっている。RAM4のワークエリアには、たとえば入
力キー群7を用いて入力されたキーを示すキーデータが
格納されるキーバッファが設定される。
FIG. 4 shows an arrangement of programs stored in the flash ROM 3 and the RAM 4 in the remote printer 1. FIG. 4A shows the flash ROM 3 and the RAM 4 before executing a program for changing storage contents in the IPL program. Flash ROM3
The IPL program is stored in the area R1 from the first address of the above, and the operation program is stored in the area R2. The region R3 of the RAM 4 is a work area. In the work area of the RAM 4, for example, a key buffer for storing key data indicating a key input using the input key group 7 is set.

【0033】図3(1)に示すように、フラッシュRO
M3がエリアAR1に選択されていると、リセット直後
にはフラッシュROM3の領域R1に格納されているI
PLプログラムが読出されて実行される。IPLプログ
ラムによって、領域R2に記憶されている動作プログラ
ムが読出されて実行される。
As shown in FIG. 3A, the flash RO
If M3 is selected as the area AR1, immediately after the reset, the I stored in the area R1 of the flash ROM 3
The PL program is read and executed. The operation program stored in region R2 is read and executed by the IPL program.

【0034】図4(2)は、記憶内容変更用のプログラ
ムを実行しているときのフラッシュROM3とRAM4
とを示す。記憶内容変更用プログラムが実行されると、
フラッシュROM3の領域R1に格納されているIPL
プログラムが読出されて、RAM4の先頭の番地からの
領域R4に格納される。領域R4に続く領域R5はワー
クエリアとなっている。
FIG. 4B shows the flash ROM 3 and the RAM 4 when the program for changing the stored contents is executed.
And When the memory change program is executed,
IPL stored in area R1 of flash ROM3
The program is read and stored in the area R4 starting from the first address of the RAM4. An area R5 following the area R4 is a work area.

【0035】RAM4の領域R4にIPLプログラムが
格納された後に、切換スイッチ6が切換えられて図3
(2)に示すように各エリアAR1,AR2が定められ
る。エリアAR1,AR2が定められた後に、たとえば
リセットされると、領域R4のIPLプログラムが実行
される。
After the IPL program is stored in the area R4 of the RAM 4, the changeover switch 6 is changed over to the state shown in FIG.
Each area AR1, AR2 is defined as shown in (2). When the areas AR1 and AR2 are determined and then reset, for example, the IPL program of the area R4 is executed.

【0036】IPLプログラムが実行されている際に、
記憶内容変更用のプログラムの実行が指示されると、フ
ラッシュROM3に格納されているIPLプログラムお
よび動作プログラムが消去される。記憶内容変更用プロ
グラムは、フラッシュROM3の各プログラムの消去
後、RS−232Cインタフェイス12を介して供給さ
れる更新されたIPLプログラムおよび動作プログラム
を、RAM4における領域R5のワークエリアに確保さ
れたプログラムデータ受信バッファに格納する。更新さ
れたIPLプログラムおよび動作プログラムは、記憶内
容変更用プログラムによってプログラムデータ受信バッ
ファから読出され、図4(3)に示すようにフラッシュ
ROM3の領域R6,R7にそれぞれ格納される。
When the IPL program is being executed,
When the execution of the program for changing the storage content is instructed, the IPL program and the operation program stored in the flash ROM 3 are erased. The storage contents changing program is a program that, after erasing each program in the flash ROM 3, updates the updated IPL program and the operation program supplied through the RS-232C interface 12 in the work area of the region R5 in the RAM 4. Store in the data reception buffer. The updated IPL program and operation program are read from the program data reception buffer by the storage content changing program, and are stored in the areas R6 and R7 of the flash ROM 3 as shown in FIG.

【0037】図5は、リモートプリンタ1の動作を説明
するためのフローチャートである。ステップs1では、
電源スイッチなどがオンされて電源の供給が開始され
る。ステップs2では、電源の供給が開始されたことを
示すために表示パネル8のパワーランプを点灯させる。
FIG. 5 is a flowchart for explaining the operation of the remote printer 1. In step s1,
The power switch and the like are turned on to start supplying power. In step s2, the power lamp of the display panel 8 is turned on to indicate that the power supply has started.

【0038】ステップs3では、切換スイッチ6がON
であるかOFFであるかが判断される。切換スイッチ6
がONであるときにはステップs4に進む。切換スイッ
チ6がONであるので、リセット直後にCPU2が読込
みにゆくのはフラッシュROM3の領域R1となる。ス
テップs4では、入力キー群7から入力されたキーデー
タを読取り、RAM4のワークエリアに確保されたキー
バッファにキーデータを格納する。キー処理プログラム
によって、キーデータに基づく処理が行われる。
In step s3, the changeover switch 6 is turned on.
Or OFF. Changeover switch 6
Is ON, the process proceeds to step s4. Since the changeover switch 6 is ON, it is the area R1 of the flash ROM 3 that is read by the CPU 2 immediately after the reset. In step s4, key data input from the input key group 7 is read, and the key data is stored in a key buffer secured in the work area of the RAM 4. The processing based on the key data is performed by the key processing program.

【0039】ステップs5では、入力キー群7から入力
されたキーデータがプログラム変更要求を示しているか
否かが判定される。プログラム変更要求ではない場合に
は、フラッシュROM3の動作プログラムを読出して実
行する。プログラム変更要求である場合にはステップs
6に進む。
At step s5, it is determined whether or not the key data input from the input key group 7 indicates a program change request. If the request is not a program change request, the operation program in the flash ROM 3 is read and executed. Step s if it is a program change request
Proceed to 6.

【0040】ステップs6では、IPLプログラムの記
憶内容変更用プログラムを実行し、フラッシュROM3
の領域R1に格納されているIPLプログラムを読出し
て、RAM4の領域R4に書込む。ステップs7では、
切換スイッチ6がOFFであるか否かを判定する。切換
スイッチ6がOFFであるときにはステップs8に進
む。切換スイッチ6がONであるときにはステップs7
の処理を行う。
In step s6, the program for changing the storage contents of the IPL program is executed, and the flash ROM 3
The IPL program stored in the area R1 is read and written into the area R4 of the RAM 4. In step s7,
It is determined whether or not the changeover switch 6 is OFF. When the changeover switch 6 is OFF, the process proceeds to step s8. Step S7 when the changeover switch 6 is ON.
Is performed.

【0041】ステップs8では、切換スイッチ6がOF
Fであることに基づいて、図3(2)に示すようにメモ
リマップを変更しエリアAR1,AR2に割当てるメモ
リを切換える。ステップs8の処理によって、CPU2
がリセット後に読込みにいくのはRAM4の領域R4と
なる。ステップs9では、RAM4に記憶されているI
PLプログラムのうちの記憶内容変更用プログラムを実
行する。
In step s8, the changeover switch 6 is turned off.
Based on F, the memory map is changed as shown in FIG. 3 (2), and the memory assigned to areas AR1 and AR2 is switched. By the processing in step s8, the CPU 2
It is the region R4 of the RAM 4 that goes to read after reset. In step s9, the I stored in the RAM 4
The storage content changing program of the PL program is executed.

【0042】ステップs10では、実行中の記憶内容変
更用プログラムによって、フラッシュROM3に格納さ
れているIPLプログラムおよび動作プログラムが消去
される。ステップs11では、たとえば外部のコンピュ
ータ装置から供給される更新されたIPLプログラムお
よび動作プログラムを、RS−232Cインタフェイス
12を介してRAM4のワークエリアに確保されたプロ
グラムデータ受信バッファに書込む。ステップs12で
は、プログラムデータ受信バッファに書込まれたIPL
プログラムおよび動作プログラムを読出し、フラッシュ
ROM3に書込む。
In step s10, the IPL program and the operation program stored in the flash ROM 3 are erased by the currently executed storage content changing program. In step s11, for example, the updated IPL program and operation program supplied from the external computer device are written into the program data reception buffer secured in the work area of the RAM 4 via the RS-232C interface 12. In step s12, the IPL written in the program data reception buffer
The program and the operation program are read and written into the flash ROM 3.

【0043】ステップs13では、フラッシュROM3
に正確にIPLプログラムおよび動作プログラムが書込
まれたか否かを判断する。フラッシュROM3に書込ま
れたプログラムデータと、RAM4に記憶されているプ
ログラムデータとを比較することによって、フラッシュ
ROM3に正常に書込まれたか否かが判断される。プロ
グラムデータが正常に書込まれている場合にはステップ
s14に進む。ステップs14では、正常終了処理とし
て、たとえば書換えが正常に終了したことを示すために
表示パネル8の所定の表示ランプを点灯させ、ブザー9
からブザー音を発する。
In step s13, the flash ROM 3
It is determined whether the IPL program and the operation program have been accurately written. By comparing the program data written in the flash ROM 3 with the program data stored in the RAM 4, it is determined whether or not the data has been normally written in the flash ROM 3. If the program data has been normally written, the process proceeds to step s14. In step s14, as a normal end process, for example, a predetermined display lamp of the display panel 8 is turned on to indicate that the rewriting has been normally completed, and the buzzer 9
A buzzer sounds from.

【0044】ステップs15では、次の電源ON時にフ
ラッシュROM3に書込まれた更新されたIPLプログ
ラムを参照するように、切換スイッチ6がONへと切換
えられる。切換スイッチ6がONへと切換えられること
によって、マッピング切換回路22の各出力の信号レベ
ルが切換わり、図3(1)に示すようなメモリマップに
定められて処理が終了する。切換スイッチ6がONに切
換えられるので、次の電源ON時にCPU2が最初に参
照するアドレスはフラッシュROM3の先頭アドレスと
なる。
In step s15, the changeover switch 6 is turned on so as to refer to the updated IPL program written in the flash ROM 3 when the power is turned on next time. When the changeover switch 6 is turned on, the signal level of each output of the mapping changeover circuit 22 is changed, and the process is completed by defining a memory map as shown in FIG. Since the changeover switch 6 is turned ON, the first address to be referred to by the CPU 2 at the next power ON is the head address of the flash ROM 3.

【0045】ステップs13において、プログラムデー
タが正常に書込まれていないと判断されたときには、ス
テップs16に進む。ステップs16では、3回目のプ
ログラムデータの書込みエラーであるか否かを判定す
る。3回目のエラーであると判定された場合にはステッ
プs17に進む。ステップs17では、プログラムデー
タの書換えが正常に行われないとして、表示パネル8の
所定の表示ランプを点灯させ、ブザー9によって間欠的
にブザー音を発し、エラー終了であることを告知して処
理が終了する。ステップs16において、書換えエラー
の回数が3回目未満であると判定された場合にはステッ
プs10以降の処理を行う。
If it is determined in step s13 that the program data has not been correctly written, the flow advances to step s16. In step s16, it is determined whether or not a third program data write error has occurred. If it is determined that this is the third error, the process proceeds to step s17. In step s17, it is determined that the rewriting of the program data is not performed normally, a predetermined display lamp of the display panel 8 is turned on, a buzzer 9 is intermittently sounded by the buzzer 9, and the end of the error is notified. finish. If it is determined in step s16 that the number of rewrite errors is less than the third time, the process from step s10 is performed.

【0046】エラー終了であるときには、フラッシュR
OM3にはIPLプログラムは書込まれていないので、
再びRAM4に記憶されているIPLプログラムを起動
するためにCPU2をリセットする。エラー終了時に
は、切換スイッチ6はOFFのまま切換えられないの
で、CPU2のリセット後はステップs18以降の処理
が行われる。
If an error has occurred, the flash R
Since the IPL program is not written in OM3,
The CPU 2 is reset to start the IPL program stored in the RAM 4 again. At the end of the error, the changeover switch 6 remains OFF and cannot be changed over. Therefore, after the CPU 2 is reset, the processes after step s18 are performed.

【0047】ステップs3において、切換スイッチ6が
OFFであると判断された場合にはステップs18に進
む。ステップs18では、切換スイッチ6の状態に基づ
いてメモリマップを変更する。ステップs18における
処理によって、リセット時にCPU2はRAM4の領域
R4を参照するようになる。ステップs19では、領域
R4に記憶されているIPLプログラムにおける記憶内
容変更用プログラムを実行する。
If it is determined in step s3 that the changeover switch 6 is OFF, the flow advances to step s18. In step s18, the memory map is changed based on the state of the changeover switch 6. By the processing in step s18, the CPU 2 comes to refer to the area R4 of the RAM 4 at the time of reset. In step s19, a storage content changing program in the IPL program stored in the area R4 is executed.

【0048】ステップs20では、実行中の記憶内容変
更用プログラムによって、フラッシュROM3に記憶さ
れているIPLプログラムおよび動作プログラムが消去
される。エラー終了後にリセットされて再び記憶内容変
更用プログラムが実行されている場合であってもフラッ
シュROM3の消去動作は行われる。
In step s20, the IPL program and the operation program stored in the flash ROM 3 are erased by the currently executed storage content changing program. Even when the program is reset after the end of the error and the storage content changing program is executed again, the erasing operation of the flash ROM 3 is performed.

【0049】ステップs21では、たとえば外部のコン
ピュータ装置から供給される更新されたIPLプログラ
ムおよび動作プログラムを、RS−232Cインタフェ
イス12を介してRAM4のワークエリアに確保された
プログラムデータ受信バッファに書込む。RAM4にI
PLプログラムおよび動作プログラムを書込んだ後はス
テップs12以降の処理を行う。
At step s21, the updated IPL program and operation program supplied from, for example, an external computer device are written to the program data reception buffer secured in the work area of the RAM 4 via the RS-232C interface 12. . I in RAM4
After the PL program and the operation program have been written, the processing after step s12 is performed.

【0050】以上のように本実施の形態によれば、リモ
ートプリンタ1において、フラッシュROM3に記憶さ
れているIPLプログラムおよび動作プログラムを書換
える際には、入力キー群7における所定のキーを操作す
ることによって、記憶内容変更用のプログラムを含んで
いるIPLプログラムがRAM4に書込まれる。RAM
4に書込まれたIPLプログラムから記憶内容変更用プ
ログラムを実行して、フラッシュROM3の内容を消去
し、RS−232Cインタフェイス12を介して与えら
れるプログラムをフラッシュROM3に書込む。フラッ
シュROM3の記憶内容を書換えるための記憶内容変更
用プログラムは、動作用プログラムが記憶されているフ
ラッシュROM3に記憶されているので、記憶内容変更
用プログラムを記憶しておく専用ROMなどをリモート
プリンタ1に設けなくても動作用プログラムを書換える
ことができ、部品点数を削減することができる。
As described above, according to the present embodiment, when rewriting the IPL program and the operation program stored in the flash ROM 3 in the remote printer 1, a predetermined key in the input key group 7 is operated. As a result, the IPL program including the program for changing the stored contents is written into the RAM 4. RAM
The program for changing the stored contents is executed from the IPL program written in 4 to erase the contents of the flash ROM 3, and the program given via the RS-232C interface 12 is written to the flash ROM 3. Since the storage content changing program for rewriting the storage content of the flash ROM 3 is stored in the flash ROM 3 in which the operation program is stored, a dedicated ROM for storing the storage content changing program is stored in a remote printer. 1, the operation program can be rewritten, and the number of components can be reduced.

【0051】また、RAM4に書込まれた記憶内容変更
用プログラムを実行する際には、書込み保護回路23に
よって、IPLプログラムが格納されたRAM4の領域
に対する書込みは行われないので、プログラムが書換え
られて暴走することがなく、安定して書換え動作を行う
ことができる。
When executing the storage content changing program written in the RAM 4, the write protection circuit 23 does not perform writing to the area of the RAM 4 in which the IPL program is stored. The rewriting operation can be performed stably without runaway.

【0052】また、リセット後にCPU2が参照するメ
モリは、切換スイッチ6の状態に基づいてマッピング切
換回路22の出力によって定められるので、記憶内容変
更用プログラムを実行している際に、エラーが生じても
リセットしてもう一度書換え処理を行うことができる。
Since the memory referred to by the CPU 2 after the reset is determined by the output of the mapping switching circuit 22 based on the state of the changeover switch 6, an error occurs during execution of the storage content change program. Can be reset and the rewriting process can be performed again.

【0053】図6は、本発明の実施の第2の形態である
リモートプリンタ31に含まれるフラッシュROM33
の構成を示すブロック図である。リモートプリンタ31
は、フラッシュROM3がフラッシュROM33と置換
わったことを除いてはリモートプリンタ1と同一である
ので、同一の構成要素に同一の参照符を付して説明を省
略する。
FIG. 6 shows a flash ROM 33 included in a remote printer 31 according to a second embodiment of the present invention.
FIG. 3 is a block diagram showing the configuration of FIG. Remote printer 31
Is the same as the remote printer 1 except that the flash ROM 3 is replaced with the flash ROM 33, so that the same components are denoted by the same reference numerals and description thereof is omitted.

【0054】フラッシュROM33は、フラッシュメモ
リセル41とID格納レジスタ42と、ID参照レジス
タ43と、比較回路44と、データ保護回路45とを含
んで構成される。フラッシュメモリセル41は、電気的
に書換えが可能となっており、データ保護回路45から
供給される書込み許可信号WRAが、たとえばハイレベ
ルであるときのみデータバス13から供給されるデータ
が書込まれる。
The flash ROM 33 includes a flash memory cell 41, an ID storage register 42, an ID reference register 43, a comparison circuit 44, and a data protection circuit 45. The flash memory cell 41 is electrically rewritable, and data supplied from the data bus 13 is written only when the write enable signal WRA supplied from the data protection circuit 45 is at a high level, for example. .

【0055】ID格納レジスタ42は、PROMなどの
不揮発性メモリで構成され、一度だけデータの書込みを
行うことができる。ID格納レジスタ42には、たとえ
ばフラッシュROM33を製造するメーカが予め定める
ID情報を書込む。メーカによって書込まれるID情報
を、以下「メーカID情報」と称する。
The ID storage register 42 is composed of a non-volatile memory such as a PROM, and can write data only once. In the ID storage register 42, for example, ID information predetermined by a manufacturer of the flash ROM 33 is written. The ID information written by the manufacturer is hereinafter referred to as “maker ID information”.

【0056】ID参照レジスタ43は、ユーザによって
入力されるID情報が書込まれるレジスタであり、たと
えばRAMなどの揮発性メモリで構成される。ユーザに
よって書込まれるID情報を、以下「ユーザID情報」
と称する。ユーザID情報は、ユーザがフラッシュメモ
リセル41にデータを書込もうとする際に、入力キー群
7として設けられるたとえば数値キーを用いて入力され
る。
The ID reference register 43 is a register in which ID information input by a user is written, and is formed of, for example, a volatile memory such as a RAM. The ID information written by the user is hereinafter referred to as “user ID information”.
Called. The user ID information is input by using, for example, numerical keys provided as input key group 7 when a user attempts to write data in flash memory cell 41.

【0057】比較回路44は、ID格納レジスタ42と
ID参照レジスタ43とに格納されている各ID情報を
比較する。各レジスタ42,43に格納されている各I
D情報が一致しているときは、一致検出信号SAをデー
タ保護回路45に供給する。データ保護回路45は、一
致検出信号SAが供給されている状態で、CPU2から
書込み信号WRが供給されると書込み許可信号WRAを
フラッシュメモリセル41に出力する。
The comparison circuit 44 compares each piece of ID information stored in the ID storage register 42 and the ID reference register 43. Each I stored in each register 42, 43
When the D information matches, the match detection signal SA is supplied to the data protection circuit 45. The data protection circuit 45 outputs the write enable signal WRA to the flash memory cell 41 when the write signal WR is supplied from the CPU 2 while the match detection signal SA is being supplied.

【0058】図7は、フラッシュROM33に書込みを
行う際の処理を説明するためのフローチャートである。
フラッシュROM33に書込みを行う際には、ユーザは
ユーザID情報を入力する。入力されたユーザID情報
は、データバス13を介してID参照レジスタ43に格
納される。ステップa1では、ID参照レジスタ43に
ユーザID情報が格納される。比較回路44は、ユーザ
ID情報と、ID格納レジスタ42に格納されているメ
ーカID情報とを照合する。
FIG. 7 is a flowchart for explaining a process when writing to the flash ROM 33.
When writing to the flash ROM 33, the user inputs user ID information. The input user ID information is stored in the ID reference register 43 via the data bus 13. In step a1, user ID information is stored in the ID reference register 43. The comparison circuit 44 compares the user ID information with the maker ID information stored in the ID storage register 42.

【0059】ステップa2では、ステップa1における
照合の結果、ユーザID情報とメーカID情報とが一致
しているかどうかが判断される。ユーザID情報とメー
カID情報とが一致しているときにはステップa3に進
む。ステップa3では、比較回路44からデータ保護回
路45へと一致検出信号SAが供給され、フラッシュメ
モリセル41への書込みが許可されるようになる。
In step a2, as a result of the comparison in step a1, it is determined whether or not the user ID information and the maker ID information match. When the user ID information and the maker ID information match, the process proceeds to step a3. In step a3, the match detection signal SA is supplied from the comparison circuit 44 to the data protection circuit 45, and writing to the flash memory cell 41 is permitted.

【0060】ステップa4では、データ保護回路45に
は一致検出信号SAが与えられており、CPU2から書
込み信号WRが供給されると、フラッシュメモリセル4
1に書込み許可信号WRAが供給され、フラッシュメモ
リセル41の書込みが可能となる。
At step a4, the coincidence detection signal SA is supplied to the data protection circuit 45, and when the write signal WR is supplied from the CPU 2, the flash memory cell 4
1 is supplied with a write enable signal WRA, and writing to the flash memory cell 41 becomes possible.

【0061】以上のように本実施の形態によれば、ID
格納レジスタ42に格納されているメーカID情報と等
しいデータを入力しなければ、フラッシュメモリセル4
1にデータの書込みを行うことができないので、不用意
にフラッシュメモリセル41の内容が書換えられること
を防止することができる。
As described above, according to the present embodiment, the ID
If data equal to the manufacturer ID information stored in the storage register 42 is not input, the flash memory cell 4
Since data cannot be written in the flash memory cell 1, the contents of the flash memory cell 41 can be prevented from being rewritten carelessly.

【0062】[0062]

【発明の効果】以上のように本発明によれば、不揮発性
メモリの記憶内容を変更する際に実行される記憶内容変
更用のプログラムは、動作用プログラムを書換えるとき
に不揮発性メモリからRAMに転送されて実行されるの
で、記憶内容変更用のプログラムを記憶する専用の不揮
発性メモリをコンピュータ装置に設ける必要がなく、コ
ンピュータ装置の部品点数を削減し、製品のコストを抑
えることができる。
As described above, according to the present invention, the program for changing the storage contents executed when changing the storage contents of the nonvolatile memory is changed from the nonvolatile memory to the RAM when the operation program is rewritten. Since the program is transferred and executed, it is not necessary to provide a dedicated non-volatile memory for storing a program for changing storage contents in the computer device, so that the number of parts of the computer device can be reduced and the cost of the product can be suppressed.

【0063】また本発明によれば、前記RAMに転送さ
れた記憶内容変更用のプログラムは、保護手段によって
保護されており、書込みが行われないので、RAMに記
憶されている記憶内容変更用プログラムを実行している
ときに、ノイズなどによってRAMに記憶されている記
憶内容変更用プログラムが書換えられて、プログラムが
暴走することを防止することができる。
Further, according to the present invention, the storage content changing program transferred to the RAM is protected by the protection means and is not written, so that the storage content changing program stored in the RAM is not written. When the program is executed, it is possible to prevent the program for changing the storage content stored in the RAM from being rewritten due to noise or the like, thereby preventing the program from running away.

【0064】さらに本発明によれば、変更指示手段によ
って変更動作の指示が行われたか否かで不揮発性メモリ
の予め定める記憶領域に書込まれているプログラムか、
RAMの記憶領域に記憶されている記憶内容変更用のプ
ログラムかが選択されるので、所望の動作に応じて不揮
発性メモリまたはRAMの予め定める領域のプログラム
を読出して実行させることができる。
Further, according to the present invention, whether a program is written in a predetermined storage area of the nonvolatile memory is determined by whether or not a change operation is instructed by the change instructing means.
Since a program for changing stored contents stored in the storage area of the RAM is selected, a program in a predetermined area of the nonvolatile memory or the RAM can be read and executed according to a desired operation.

【0065】またさらに本発明によれば、コンピュータ
装置における電気的に書換え可能な不揮発性メモリは、
フラッシュEPROMによって構成されるので、メモリ
領域全体あるいは所定の大きさに分割したブロック単位
に書換えを行う場合であっても、確実に書換えを行うこ
とができる。
According to the present invention, the electrically rewritable nonvolatile memory in the computer device is
Since the flash EPROM is used, rewriting can be reliably performed even when rewriting is performed in the entire memory area or in units of blocks divided into a predetermined size.

【0066】またさらに本発明によれば、不揮発性メモ
リの記憶内容を変更する際には、入力手段から入力され
るデータと、レジスタに格納されている保護コードとが
一致しているかどうかを比較保護手段が判断して、一致
しているときのみ書込みを許可しているので、保護コー
ドと同一のデータを入力手段から入力することができる
場合のみ不揮発性メモリの記憶内容を変更することがで
き、記憶内容が不用意に書換えられることを防止するこ
とができる。
Furthermore, according to the present invention, when changing the storage content of the nonvolatile memory, it is determined whether the data input from the input means matches the protection code stored in the register. Since the protection means determines and permits writing only when the password matches, the storage contents of the nonvolatile memory can be changed only when the same data as the protection code can be input from the input means. In addition, careless rewriting of the stored contents can be prevented.

【0067】またさらに本発明によれば、不揮発性半導
体メモリの記憶内容を変更する際には、入力手段から入
力されるデータと、レジスタに格納されている保護コー
ドとが一致しているかどうかを比較保護手段が判断し
て、一致しているときのみ書込みを許可しているので、
保護コードと同一のデータを入力手段から入力すること
ができる場合のみ不揮発性半導体メモリの記憶内容を変
更することができ、記憶内容が不用意に書換えられるこ
とを防止することができる。
Further, according to the present invention, when changing the storage content of the nonvolatile semiconductor memory, it is determined whether or not the data input from the input means matches the protection code stored in the register. Since the comparison and protection means judge and allow writing only when they match,
Only when the same data as the protection code can be input from the input means, the storage content of the nonvolatile semiconductor memory can be changed, and the storage content can be prevented from being rewritten carelessly.

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

【図1】本発明の実施の第1の形態であるリモートプリ
ンタ1の構成を示すブロック図である。
FIG. 1 is a block diagram showing a configuration of a remote printer 1 according to a first embodiment of the present invention.

【図2】切換制御回路5の構成を示すブロック図であ
る。
FIG. 2 is a block diagram showing a configuration of a switching control circuit 5.

【図3】切換制御回路5による切換え制御を説明するた
めの図である。
FIG. 3 is a diagram for explaining switching control by a switching control circuit 5;

【図4】リモートプリンタ1におけるフラッシュROM
3とRAM4とに記憶されているプログラムの配置を示
す図である。
FIG. 4 is a flash ROM in the remote printer 1.
FIG. 3 is a diagram showing an arrangement of programs stored in a RAM 3 and a RAM 4.

【図5】リモートプリンタ1の動作を説明するためのフ
ローチャートである。
FIG. 5 is a flowchart for explaining the operation of the remote printer 1.

【図6】本発明の実施の第2の形態であるリモートプリ
ンタ31に含まれるフラッシュROM33の構成を示す
ブロック図である。
FIG. 6 is a block diagram showing a configuration of a flash ROM 33 included in a remote printer 31 according to a second embodiment of the present invention.

【図7】フラッシュROM33に書込みを行う際の処理
を説明するためのフローチャートである。
FIG. 7 is a flowchart for explaining processing when writing to a flash ROM 33;

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

1,31 リモートプリンタ 2 CPU 3,33 フラッシュROM 4 RAM 5 切換制御回路 6 切換スイッチ 7 入力キー群 8 表示パネル 9 ブザー 10 DIPスイッチ 11 プリンタ 12 RS−232Cインタフェイス 13 データバス 1, 31 Remote printer 2 CPU 3, 33 Flash ROM 4 RAM 5 Switching control circuit 6 Switching switch 7 Input key group 8 Display panel 9 Buzzer 10 DIP switch 11 Printer 12 RS-232C interface 13 Data bus

Claims (6)

【特許請求の範囲】[Claims] 【請求項1】 記憶内容変更用のプログラムを含むコン
ピュータ装置の動作用プログラムが書込まれ、電気的に
書換え可能な不揮発性メモリと、 記憶内容の書込みおよび読出しが可能なRAMと、 不揮発性メモリから記憶内容変更用のプログラムをRA
Mに転送するプログラム転送手段と、 不揮発性メモリに対する記憶内容の変更動作を指示する
変更指示手段と、 変更指示手段からの記憶内容変更指示に応答し、プログ
ラム転送手段によって不揮発性メモリからRAMに転送
された記憶内容変更用プログラムに従って、不揮発性メ
モリの記憶内容を電気的に書換えるように制御する制御
手段とを含むことを特徴とする電気的書換え可能な不揮
発性メモリを備えるコンピュータ装置。
An electrically rewritable nonvolatile memory in which an operation program of a computer device including a storage content changing program is written, a RAM capable of writing and reading storage content, and a nonvolatile memory From RA to RA
M: a program transfer unit for transferring data to M; a change instructing unit for instructing a change operation of the storage content in the nonvolatile memory; Control means for controlling the storage contents of the nonvolatile memory to be electrically rewritten in accordance with the stored contents changing program. A computer device comprising an electrically rewritable nonvolatile memory.
【請求項2】 前記プログラム転送手段によって、前記
RAMに転送された記憶内容変更用のプログラムに対す
る書込み保護を行う保護手段を有することを特徴とする
請求項1記載の電気的書換え可能な不揮発性メモリを備
えるコンピュータ装置。
2. The electrically rewritable nonvolatile memory according to claim 1, further comprising a protection unit that performs write protection on the program for changing storage contents transferred to the RAM by the program transfer unit. A computer device comprising:
【請求項3】 前記制御手段は、 前記変更指示手段によって変更動作が指示されないと
き、前記不揮発性メモリの予め定める記憶領域に書込ま
れているプログラムに従って動作し、 変更指示手段によって変更動作が指示されるとき、前記
プログラム転送手段によって記憶内容変更用のプログラ
ムが転送される前記RAMの記憶領域に記憶されている
プログラムに従って動作するプログラム処理手段を有す
ることを特徴とする請求項1または2記載の電気的書換
え可能な不揮発性メモリを備えるコンピュータ装置。
3. The control means operates according to a program written in a predetermined storage area of the nonvolatile memory when the change instruction is not instructed by the change instructing means, and the change instruction is instructed by the change instructing means. 3. A program processing means according to claim 1, further comprising a program processing means which operates according to a program stored in a storage area of said RAM to which a program for changing storage contents is transferred by said program transfer means. A computer device including an electrically rewritable nonvolatile memory.
【請求項4】 前記不揮発性メモリは、フラッシュEP
ROMであることを特徴とする請求項1〜3のいずれか
に記載の電気的書換え可能な不揮発性メモリを備えるコ
ンピュータ装置。
4. The nonvolatile memory according to claim 1, wherein said nonvolatile memory is a flash EP.
4. A computer device comprising an electrically rewritable nonvolatile memory according to claim 1, wherein the computer device is a ROM.
【請求項5】 前記不揮発性メモリは、 製造時に保護コードが格納されるレジスタと、 記憶内容の変更時にデータが入力される入力手段と、 入力手段に入力されるデータとレジスタに格納されてい
る保護コードとを比較し、一致しているときのみ、記憶
内容の変更を許容する比較保護手段とを有することを特
徴とする請求項1〜4のいずれかに記載の電気的書換え
可能な不揮発性メモリを備えるコンピュータ装置。
5. The non-volatile memory includes a register in which a protection code is stored at the time of manufacture, input means for inputting data when the storage content is changed, and data input to the input means and stored in the register. The electrically rewritable nonvolatile memory according to any one of claims 1 to 4, further comprising a comparison protection means for comparing the protection code with the protection code and permitting change of the stored content only when the protection code matches. A computer device having a memory.
【請求項6】 電気的書換え可能な不揮発性半導体メモ
リにおいて、 製造時に保護コードが格納されるレジスタと、 記憶内容の変更時にデータが入力される入力手段と、 入力手段に入力されるデータとレジスタに格納されてい
る保護コードとを比較し、一致しているときのみ、記憶
内容の変更を許容する比較保護手段とを含むことを特徴
とする不揮発性半導体メモリ。
6. An electrically rewritable nonvolatile semiconductor memory, a register in which a protection code is stored at the time of manufacture, input means for inputting data when storage contents are changed, and data and register input to the input means. A non-volatile semiconductor memory including a comparison protection unit that compares a protection code stored in a storage device and allows only a change in the stored content when the two match.
JP8160010A 1996-06-20 1996-06-20 Computer device with electrically rewritable nonvolatile memory and nonvolatile semiconductor memory Pending JPH1011277A (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
JP8160010A JPH1011277A (en) 1996-06-20 1996-06-20 Computer device with electrically rewritable nonvolatile memory and nonvolatile semiconductor memory
EP97110059A EP0825530A3 (en) 1996-06-20 1997-06-19 Computer apparatus having electrically rewritable nonvolatile memory, and nonvolatile semiconductor memory
US08/879,885 US5933595A (en) 1996-06-20 1997-06-20 Computer apparatus having electrically rewritable nonvolatile memory, and nonvolatile semiconductor memory

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP8160010A JPH1011277A (en) 1996-06-20 1996-06-20 Computer device with electrically rewritable nonvolatile memory and nonvolatile semiconductor memory

Publications (1)

Publication Number Publication Date
JPH1011277A true JPH1011277A (en) 1998-01-16

Family

ID=15706033

Family Applications (1)

Application Number Title Priority Date Filing Date
JP8160010A Pending JPH1011277A (en) 1996-06-20 1996-06-20 Computer device with electrically rewritable nonvolatile memory and nonvolatile semiconductor memory

Country Status (1)

Country Link
JP (1) JPH1011277A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20000000888A (en) * 1998-06-05 2000-01-15 윤종용 Memory program changing and reading method
JP2000105694A (en) * 1998-09-28 2000-04-11 Nec Ic Microcomput Syst Ltd Flash memory, microcomputer equipped with flash memory, and method for storing program in flash memory
KR100441171B1 (en) * 1998-02-20 2004-10-14 삼성전자주식회사 Firmware composing method using flash rom and ram
JP2006285587A (en) * 2005-03-31 2006-10-19 Fujitsu Ltd Information processor, and program preparing method
JP2011029919A (en) * 2009-07-24 2011-02-10 Sharp Corp Information terminal, household appliance control method using information terminal, control program
JP2011187073A (en) * 2011-04-27 2011-09-22 Renesas Electronics Corp Semiconductor processor

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100441171B1 (en) * 1998-02-20 2004-10-14 삼성전자주식회사 Firmware composing method using flash rom and ram
KR20000000888A (en) * 1998-06-05 2000-01-15 윤종용 Memory program changing and reading method
JP2000105694A (en) * 1998-09-28 2000-04-11 Nec Ic Microcomput Syst Ltd Flash memory, microcomputer equipped with flash memory, and method for storing program in flash memory
US6883060B1 (en) 1998-09-28 2005-04-19 Nec Electronics Corporation Microcomputer provided with flash memory and method of storing program into flash memory
JP2006285587A (en) * 2005-03-31 2006-10-19 Fujitsu Ltd Information processor, and program preparing method
JP2011029919A (en) * 2009-07-24 2011-02-10 Sharp Corp Information terminal, household appliance control method using information terminal, control program
JP2011187073A (en) * 2011-04-27 2011-09-22 Renesas Electronics Corp Semiconductor processor

Similar Documents

Publication Publication Date Title
US5933595A (en) Computer apparatus having electrically rewritable nonvolatile memory, and nonvolatile semiconductor memory
KR0172001B1 (en) Re-programming apparatus of bios memory
JPH1011277A (en) Computer device with electrically rewritable nonvolatile memory and nonvolatile semiconductor memory
JPH07141277A (en) Terminal device for managing version number of program and data and on-line system therefor
JP4375857B2 (en) Computer with program rewrite function
JP2001344156A (en) Device with flash memory and data rewriting method
US20050060484A1 (en) Control device
JP3572861B2 (en) Printing equipment
JPH05324305A (en) Program change method
JPH09305394A (en) Electronic equipment
JPH11327911A (en) Image forming device
JPH0520050A (en) Information storage device
JP2023020590A (en) Information processing apparatus and monitoring method
JPH04291421A (en) Microprogram code installing system
JPH1011278A (en) Microcomputer device with rewritable nonvolatile memory
JP2000047896A (en) Device for setting information characteristic of device
JPH06259982A (en) Method and device for rewriting flash rom
JP2004348546A (en) Device and method for switching control program
JPH11110207A (en) Information processor
JP2004302631A (en) Information processor
JP2001047694A (en) Printer and image processing device with the printer
JP2002007157A (en) Device for protecting control program
JP2004038374A (en) Boot system
JPH05204654A (en) Start-up program updating system for cpu incorrorating device
JPH09231032A (en) Network interface card for printer