JP2002157139A - Electronic device, image reader, and rewriting method for nonvolatile memory - Google Patents

Electronic device, image reader, and rewriting method for nonvolatile memory

Info

Publication number
JP2002157139A
JP2002157139A JP2000356142A JP2000356142A JP2002157139A JP 2002157139 A JP2002157139 A JP 2002157139A JP 2000356142 A JP2000356142 A JP 2000356142A JP 2000356142 A JP2000356142 A JP 2000356142A JP 2002157139 A JP2002157139 A JP 2002157139A
Authority
JP
Japan
Prior art keywords
nonvolatile memory
electronic device
rewriting
control program
flag
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.)
Withdrawn
Application number
JP2000356142A
Other languages
Japanese (ja)
Inventor
Yoshihiro Wada
義弘 和田
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.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to JP2000356142A priority Critical patent/JP2002157139A/en
Publication of JP2002157139A publication Critical patent/JP2002157139A/en
Withdrawn legal-status Critical Current

Links

Landscapes

  • Techniques For Improving Reliability Of Storages (AREA)
  • Stored Programmes (AREA)

Abstract

PROBLEM TO BE SOLVED: To safely rewrite a control program for an electronic device without mounting another additional program memory in an electronic device using a rewritable nonvolatile memory. SOLUTION: This method is used to rewrite the contents of the nonvolatile memory in the electronic device performing control by executing the control program stored in the rewritable nonvolatile memory. The nonvolatile memory is rewritable independently for each prescribed area. While the contents of the nonvolatile memory are being rewritten (S54 to S57), a flag is set up showing that the contents of the nonvolatile memory are being rewritten (S51 and S58).

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、写真フィルムの光
学画像情報を電気的な画像信号に変換し、ホストコンピ
ュータ等に出力する画像読み取り装置等、書き換え可能
な不揮発性メモリに格納された制御プログラムを実行し
て制御を行う電子装置及び不揮発性メモリの書き換え方
法に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a control program stored in a rewritable nonvolatile memory such as an image reading device for converting optical image information of a photographic film into an electric image signal and outputting the same to a host computer or the like. And a method for rewriting a nonvolatile memory.

【0002】[0002]

【従来の技術】従来、フィルムを画像入力部に給送し、
フィルムに記録された光学画像情報を電気的な画像信号
に変換し、ホストコンピュータ等に出力するフィルムス
キャナがある。このようなフィルムスキャナにおいて、
画像読み取り制御やホストコンピュータとの通信制御は
中央処理装置(CPU)で行われ、CPUは通常、Read
Only Memory(ROM)に固定的に記憶されている制御
プログラムに基づいて動作していた。
2. Description of the Related Art Conventionally, a film is fed to an image input unit,
There is a film scanner that converts optical image information recorded on a film into an electric image signal and outputs the signal to a host computer or the like. In such a film scanner,
Image reading control and communication control with the host computer are performed by a central processing unit (CPU).
It operates based on a control program fixedly stored in a Only Memory (ROM).

【0003】しかしながら、制御プログラムは製品の仕
様変更、機能向上、各種調整や、プログラムの不具合な
どにより変更される可能性があった。このためROMは
ICソケットに装着されており、ICソケットの使用に
よりROMの交換が容易に行えるようになった。
[0003] However, there is a possibility that the control program is changed due to a change in product specifications, an improvement in functions, various adjustments, a defect in the program, or the like. For this reason, the ROM is mounted on the IC socket, and the use of the IC socket makes it easy to replace the ROM.

【0004】ところが、ROMをICソケットに挿入す
るときに、接触不良がしばしば発生し、またICソケッ
トを追加することで製品の価格も上昇していた。さらに
ICソケットを使用するために、より多くのスペースが
プリント基盤上で必要であった。
However, when a ROM is inserted into an IC socket, a contact failure often occurs, and the price of a product has been increased by adding an IC socket. In addition, more space was needed on the printed board to use the IC socket.

【0005】これらの諸問題を解決するために、電気的
消去可能なRead Only Memory(EEPROM)が開発さ
れ、ROMの代わりに使用されるようになった。EEP
ROMは、電源を落としても内容が消去されず、内容の
書き換えも、プリント基盤にはんだ付けで実装した状態
で行えるという長所があった。これでICソケットを使
用する必要がなくなった。中でも、Flash EEP
ROMと呼ばれるものは大容量且つ低価格で、またデー
タの書き換えも付加回路を必要とせず、通常RAMのよ
うに行えるため、制御プログラムを格納するのに一般的
に用いられている。
[0005] In order to solve these problems, an electrically erasable Read Only Memory (EEPROM) has been developed and used instead of a ROM. EEP
The ROM has the advantage that the contents are not erased even when the power is turned off, and the contents can be rewritten while being mounted on the printed board by soldering. This eliminates the need to use an IC socket. Among them, Flash EEP
A so-called ROM is a large-capacity and low-cost device, and does not require an additional circuit to rewrite data, and can be normally performed like a RAM. Therefore, it is generally used for storing a control program.

【0006】[0006]

【発明が解決しようとする課題】ところが、Flash
EEPROMはデータを書き換える前に、一旦書き換
えるべき古いデータ部を消去した後でないと再書き込み
できない。しかし、装置内に電源を落としても内容が消
去されないプログラム記憶装置が、このFlash E
EPROM一つしかない場合、CPUの初期化プログラ
ムや割り込みテーブル、ホストコンピュータとの通信プ
ログラム、データ書き換え制御プログラムもすべて、こ
の一つのFlash EEPROMに記憶しておく必要
があった。
SUMMARY OF THE INVENTION However, Flash
Before rewriting data, the EEPROM can only be rewritten after erasing an old data portion to be rewritten. However, a program storage device in which the contents are not erased even when the power is turned off in the device is a flash E.
If there is only one EPROM, it is necessary to store the CPU initialization program, the interrupt table, the communication program with the host computer, and the data rewrite control program all in this single Flash EEPROM.

【0007】このFlash EEPROMデータ書き
換え作業中に、装置の電源を誤って遮断したり、データ
送信中の通信障害、データファイルそのものの欠落、ホ
ストコンピュータのハングアップ、ホストコンピュータ
の電源遮断等のさまざまな理由で、データ書き換えが中
断した場合、プログラムデータの一部が消去されていた
り、データが不完全だったりするため、再度電源投入し
てもCPUの初期化が正常に行われなかったり、データ
書き換えができなくなったり、さらにはCPUが暴走し
て、データの再書き込みどころかそれ以後、その装置は
まったく動作しなくなるという状態になってしまう。
During the Flash EEPROM data rewriting operation, various powers such as a power off of the device by mistake, a communication failure during data transmission, a loss of the data file itself, a hang of the host computer, a power off of the host computer, etc. If the data rewriting is interrupted for a reason, part of the program data is erased or the data is incomplete, so even if the power is turned on again, the initialization of the CPU is not performed properly, Or the CPU goes out of control, causing the device to stop operating altogether rather than rewriting data.

【0008】これを修復するにはFlash EEPR
OMの半田付けを外し、交換するしか方法がなかった。
[0008] To repair this, Flash EEPR
There was no other way but to remove the OM solder and replace it.

【0009】本発明は上記問題点を鑑みてなされたもの
であり、制御プログラムメモリにFlash EEPR
OM等の書き換え可能な不揮発性メモリを使用した電子
装置において、他の付加プログラムメモリを実装するこ
となく、電子装置の制御プログラムを安全に書き換える
ことを目的とする。
SUMMARY OF THE INVENTION The present invention has been made in view of the above problems, and has a flash EEPROM in a control program memory.
It is an object of the present invention to safely rewrite a control program of an electronic device in an electronic device using a rewritable nonvolatile memory such as an OM without mounting another additional program memory.

【0010】[0010]

【課題を解決するための手段】上記目的を達成するため
に、書き換え可能な不揮発性メモリに格納された制御プ
ログラムを実行して制御を行う本発明の電子装置におい
て、前記不揮発性メモリは所定領域毎に独立して書き換
え可能であり、前記不揮発性メモリの内容を書き換えて
いる間、前記不揮発性メモリの内容を書き換え中である
ことを示すフラグを設定する。
In order to achieve the above object, in an electronic device according to the present invention for performing control by executing a control program stored in a rewritable nonvolatile memory, the nonvolatile memory has a predetermined area. A flag is set which indicates that the content of the nonvolatile memory is being rewritten while the content of the nonvolatile memory is being rewritten.

【0011】本発明の好適な一様態によれば、前記電子
装置は前記フラグが設定されているか否かを判断する判
断手段を更に有し、前記判断手段の判断結果に応じて割
り込み処理の動作を変更し、前記不揮発性メモリの書き
換え方法は前記フラグが設定されているか否かを判断す
る判断工程を更に有し、前記判断工程での判断結果に応
じて前記電子装置における割り込み処理の動作を変更す
る。
According to a preferred aspect of the present invention, the electronic device further includes a judging means for judging whether or not the flag is set, and the operation of the interrupt processing is performed according to the judgment result of the judging means. And the method of rewriting the nonvolatile memory further includes a determining step of determining whether or not the flag is set, and performing an interrupt processing operation in the electronic device according to a determination result in the determining step. change.

【0012】また、本発明の好適な一様態によれば、前
記不揮発性メモリは、書き換えを行わない所定領域を有
し、前記所定領域に少なくとも前記電子装置の起動時に
最低限必要な制御プログラム及び制御プログラムの書き
換えプログラムを保持する。
According to a preferred embodiment of the present invention, the non-volatile memory has a predetermined area in which rewriting is not performed, and the control program and the control program required at least when the electronic device is started up in the predetermined area. Holds a rewrite program for the control program.

【0013】好ましくは、前記フラグが設定されている
と判断されると、前記書き換えプログラムを実行し、前
記フラグが設定されていないと判断されると、前記制御
プログラムを実行する。
Preferably, when it is determined that the flag is set, the rewriting program is executed, and when it is determined that the flag is not set, the control program is executed.

【0014】本発明の好適な一様態によれば、電源投入
時に前記判断手段による判断及び前記判断工程を他の動
作に先立って行う。
According to a preferred aspect of the present invention, when the power is turned on, the judgment by the judgment means and the judgment step are performed prior to other operations.

【0015】また、本発明の好適な一様態によれば、前
記フラグは、前記不揮発性メモリ内に設定される。
According to a preferred aspect of the present invention, the flag is set in the nonvolatile memory.

【0016】また、本発明の好適な別の一様態によれ
ば、前記フラグは、前記不揮発性メモリ以外の不揮発性
メモリに設定される。
According to another preferred embodiment of the present invention, the flag is set in a nonvolatile memory other than the nonvolatile memory.

【0017】また、本発明の好適な一様態によれば、前
記電子装置は、画像読み取り装置である。
According to a preferred aspect of the present invention, the electronic device is an image reading device.

【0018】上記構成によれば、特に、制御プログラム
の書き換えを一般ユーザに開放し、自由にプログラムの
バージョンアップを行えるようにした場合に発生するさ
まざまな障害により、電子装置に致命的なダメージを与
えることを防止することが可能となる。
According to the above configuration, particularly, rewriting of the control program is opened to the general user, and various troubles that occur when the version of the program can be freely upgraded cause fatal damage to the electronic device. It is possible to prevent giving.

【0019】[0019]

【発明の実施の形態】以下、添付図面を参照して本発明
の好適な実施の形態を詳細に説明する。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS Preferred embodiments of the present invention will be described below in detail with reference to the accompanying drawings.

【0020】なお、本実施の形態では、カートリッジに
収納された長尺フィルムを読み取る画像読み取り装置を
例に取り説明するが、本発明はこれに限定されるもので
なく、一般のFlash EEPROM等の書き換え可
能な不揮発性メモリを使用した、種々の用途を目的とす
る電子機器に適用することができる。
In this embodiment, an image reading apparatus for reading a long film housed in a cartridge will be described as an example. However, the present invention is not limited to this, and the present invention is not limited to this. The present invention can be applied to electronic devices that use a rewritable nonvolatile memory for various purposes.

【0021】図1は本発明の画像読み取り装置を制御す
るシステムコントローラ111の一例を説明するための
ブロック図である。
FIG. 1 is a block diagram for explaining an example of a system controller 111 for controlling the image reading apparatus of the present invention.

【0022】1はマイクロコンピュータからなる中央処
理部(CPU)である。2はRAM(ランダムアクセス
メモリ)であって、CPU1のワーキングメモリとして
用いられる。3はCPU1の初期化プログラム、割り込
み処理テーブル、画像読み取り制御プログラム、ホスト
コンピュータとの通信制御プログラム、データ書き換え
制御プログラムなどが格納されているFlash EE
PROMであって、上記制御用のプログラムがあらかじ
め書き込まれており、CPU1はFlashEEPRO
M3のプログラムによって制御動作する。また、Fla
sh EEPROM3はCPU1により書き換え可能に
構成されており、電源を落としても内容が消去されな
い。
Reference numeral 1 denotes a central processing unit (CPU) comprising a microcomputer. A random access memory (RAM) 2 is used as a working memory of the CPU 1. Reference numeral 3 denotes a Flash EE in which an initialization program of the CPU 1, an interrupt processing table, an image reading control program, a communication control program with a host computer, a data rewriting control program, and the like are stored.
A PROM in which the control program is written in advance, and the CPU 1
Control operation is performed by the program of M3. Also, Fla
The sh EEPROM 3 is configured to be rewritable by the CPU 1, and its contents are not erased even when the power is turned off.

【0023】110はインターフェース回路であり、ホ
ストコンピュータ114と通信するためのものである。
ここではSCSIコントローラで実現しているものとす
るが、一般の通信プロトコルに適合するものであればど
のようなものであってもよい。
Reference numeral 110 denotes an interface circuit for communicating with the host computer 114.
Here, it is assumed to be realized by a SCSI controller, but any device that conforms to a general communication protocol may be used.

【0024】図2は本発明の画像読み取り装置を使用し
た画像読み取りシステムの全体構成を説明するためのブ
ロック図である。100は本実施の形態の画像読み取り
装置であるフィルムスキャナであり、図1で説明したシ
ステムコントローラ111を含む。114はホストコン
ピュータ、300はモニタである。
FIG. 2 is a block diagram for explaining the overall configuration of an image reading system using the image reading apparatus of the present invention. Reference numeral 100 denotes a film scanner, which is the image reading apparatus according to the present embodiment, and includes the system controller 111 described with reference to FIG. 114 is a host computer, and 300 is a monitor.

【0025】フィルムスキャナ100において、101
は照明光源であり、例えば冷陰極管である。102はフ
ィルムを収納しているカートリッジ141を保持するフ
ィルムアダプタであり、紙面上Y方向へ移動可能になっ
ている。115はフィルムアダプタ102を副走査方向
に移動させるための副走査モータであり、ここではステ
ッピングモータである。116はシステムコントローラ
111からの命令に従って副走査モータ115を駆動さ
せるための副走査モータドライバである。
In the film scanner 100, 101
Is an illumination light source, for example, a cold cathode tube. Reference numeral 102 denotes a film adapter that holds a cartridge 141 containing a film, and is movable in the Y direction on the paper. Reference numeral 115 denotes a sub-scanning motor for moving the film adapter 102 in the sub-scanning direction, and here, a stepping motor. Reference numeral 116 denotes a sub-scanning motor driver for driving the sub-scanning motor 115 according to a command from the system controller 111.

【0026】117は副走査の基準位置を検出するため
の副走査位置検出手段であり、フォトインターラプタを
用いてフィルムアダプタ102の突起形状を検出する。
103は結像レンズ系であり、104はCCDリニアイ
メージセンサ(以下、「リニアイメージセンサ」と呼
ぶ。)である。ここでリニアイメージセンサ104は紙
面上のZ方向が長手方向になるように配置されている。
この位置関係によりリニアイメージセンサ104の長手
方向である主走査方向Zとフィルムアダプタ102の移
動方向である副走査方向Yは直角の関係になる。
Reference numeral 117 denotes a sub-scanning position detecting means for detecting a sub-scanning reference position, and detects a projection shape of the film adapter 102 by using a photo interrupter.
Reference numeral 103 denotes an imaging lens system, and reference numeral 104 denotes a CCD linear image sensor (hereinafter, referred to as a “linear image sensor”). Here, the linear image sensor 104 is arranged so that the Z direction on the paper surface is the longitudinal direction.
Due to this positional relationship, the main scanning direction Z, which is the longitudinal direction of the linear image sensor 104, and the sub-scanning direction Y, which is the moving direction of the film adapter 102, are at right angles.

【0027】画像読み取りは(本スキャン)、フィルム
アダプタ102に保持されたカートリッジ141のフィ
ルムから指定コマを検索したあと、フィルムアダプタ1
02全体を副走査モータ115により副走査方向Yに移
動させることにより行う。
In the image reading (main scan), a specified frame is searched from the film of the cartridge 141 held in the film adapter 102, and then the film adapter 1 is searched.
02 is moved by the sub-scanning motor 115 in the sub-scanning direction Y.

【0028】105は焦点固定部材であり、リニアイメ
ージセンサ104を結像レンズ系103の像面近傍に保
持し、一体化して光学軸方向すなわち紙面上X方向に移
動可能としている。106は黒レベル補正回路であり、
リニアイメージセンサ104から出力されたアナログ画
像信号の黒レベルの調整を行う。107はA/D変換器
であり、黒レベル補正回路106で処理されたアナログ
信号をディジタル信号に変換する。108は画像処理部
であり、画像処理とCCD駆動パルス制御などの処理を
行う。ゲートアレイで構成されており、高速に各種処理
を行うことが可能である。109はラインバッファであ
り、画像データを一時的に記憶する。汎用のランダムア
クセスメモリで実現している。
Reference numeral 105 denotes a focus fixing member which holds the linear image sensor 104 near the image plane of the imaging lens system 103 and integrally moves the linear image sensor 104 in the optical axis direction, that is, in the X direction on the paper. 106 is a black level correction circuit,
The black level of the analog image signal output from the linear image sensor 104 is adjusted. An A / D converter 107 converts an analog signal processed by the black level correction circuit 106 into a digital signal. An image processing unit 108 performs image processing and processing such as CCD drive pulse control. It is composed of a gate array and can perform various processes at high speed. A line buffer 109 temporarily stores image data. It is realized by a general-purpose random access memory.

【0029】110は図1で説明したインターフェース
回路である。111は図1で説明したフィルムスキャナ
100全体の処理シーケンスを制御するシステムコント
ローラ111であり、ホストコンピュータ114からの
命令に従って各種動作を行わせる。112は黒レベル補
正回路106の基準電圧を出力するD/A変換器であ
る。113はシステムコントローラ111と画像処理部
108とラインバッファ109とインターフェース回路
110をつなぐCPUバスであり、アドレスバスとデー
タバスによって構成されている。118は光源101を
点灯するための光源点灯回路であり、いわゆるインバー
タ回路である。120はリニアイメージセンサ104を
駆動するための駆動信号を供給するための信号線、12
1は入力信号をサンプルホールドするためのサンプルホ
ールド制御信号を供給するための信号線である。
Reference numeral 110 denotes the interface circuit described with reference to FIG. Reference numeral 111 denotes a system controller 111 that controls the processing sequence of the entire film scanner 100 described with reference to FIG. Reference numeral 112 denotes a D / A converter that outputs a reference voltage of the black level correction circuit 106. Reference numeral 113 denotes a CPU bus that connects the system controller 111, the image processing unit 108, the line buffer 109, and the interface circuit 110, and is configured by an address bus and a data bus. Reference numeral 118 denotes a light source lighting circuit for lighting the light source 101, which is a so-called inverter circuit. Reference numeral 120 denotes a signal line for supplying a drive signal for driving the linear image sensor 104;
Reference numeral 1 denotes a signal line for supplying a sample and hold control signal for sampling and holding an input signal.

【0030】122は画像処理を行う際のワーキングエ
リアとしてのRAMであるオフセットRAMで、シェー
ディング補正、カラーデータ合成等の各種データや画像
データの一時記憶を行う。123は焦点固定部材105
を光軸方向に移動させるフォーカスモータ、124はフ
ォーカスモータ123へ駆動信号を供給するフォーカス
モータドライバ、125は焦点固定部材105の初期位
置を検出する焦点位置検出手段である。130はガンマ
カーブを記憶し、ガンマ補正を行うためのガンマRAM
である。
Reference numeral 122 denotes an offset RAM, which is a RAM serving as a working area when performing image processing, and temporarily stores various data such as shading correction and color data synthesis and image data. 123 is a focus fixing member 105
Is a focus motor that supplies a drive signal to the focus motor 123, and 125 is a focus position detection unit that detects the initial position of the focus fixing member 105. 130 is a gamma RAM for storing a gamma curve and performing gamma correction
It is.

【0031】図2のフィルムアダプタ102ついて更に
詳細に説明する。140はフィルムカートリッジに収納
されているフィルムを巻き上げたり巻き戻したりするた
めのモータであり、フィルムカートリッジ141のスプ
ール200に係合し、収納してあるフィルムを正転、逆
転駆動する。モータ140は指定コマ出しや、全コマ縮
小読み取りや磁気情報、光学情報の読み取りでフィルム
を高速駆動したり、コマ画像の読み取り条件を求めるた
めのプレスキャン処理に使用される。142はコントロ
ーラであり、システムコントローラ111から通信線1
43を介してコマンドの受信、ステータスの送信を行
い、コマンドの内容に応じてモータ140を制御する。
また、144はフィルムのパーフォレーション穴を光学
的に検出する光センサー、145はフィルムの縁部に書
き込まれている光情報等の光情報を検出する光センサー
である。146はフィルム縁部に書き込まれている磁気
情報を検出したり、磁気情報を記録するための磁気情報
記録検出部であり、具体的には記録再生用磁気ヘッドで
ある。143はシステムコントローラ111とフィルム
アダプタ102のコントローラ142との情報の授受を
行う通信線であり、ここではシリアル通信である。
The film adapter 102 shown in FIG. 2 will be described in more detail. Reference numeral 140 denotes a motor for winding and rewinding the film stored in the film cartridge. The motor 140 is engaged with the spool 200 of the film cartridge 141, and drives the stored film forward and reverse. The motor 140 is used for high-speed driving of the film for designated frame advancement, reduction reading of all frames, reading of magnetic information and optical information, and prescan processing for obtaining reading conditions of frame images. Reference numeral 142 denotes a controller, which is a communication line 1 from the system controller 111.
A command is received and a status is transmitted via 43, and the motor 140 is controlled according to the content of the command.
Reference numeral 144 denotes an optical sensor that optically detects a perforation hole in the film, and reference numeral 145 denotes an optical sensor that detects optical information such as optical information written on an edge of the film. Reference numeral 146 denotes a magnetic information recording / detecting unit for detecting magnetic information written on the edge of the film or recording magnetic information, and more specifically, a magnetic head for recording / reproducing. Reference numeral 143 denotes a communication line for exchanging information between the system controller 111 and the controller 142 of the film adapter 102, and here is serial communication.

【0032】図2においては、Aを巻き上げ方向、すな
わちフィルム201をカートリッジ141から繰り出す
方向とする。またBを巻き戻し方向、すなわちフィルム
201をカートリッジ141に収納する方向とする。フ
ィルム201はカートリッジ141からスプール200
の回転により送出される。フィルムは、送出されたフィ
ルムを巻き取るフィルム巻き取り部と、フィルムカート
リッジと巻き取り部の間のフィルム搬送路に配置された
キャプスタンとピンチローラ等で保持され、一定速度で
給送される。これらの動作はフィルムアダプタ102の
コントローラ142で処理される。
In FIG. 2, A is a winding direction, that is, a direction in which the film 201 is unwound from the cartridge 141. B is the rewind direction, that is, the direction in which the film 201 is stored in the cartridge 141. The film 201 is transferred from the cartridge 141 to the spool 200.
Is sent by the rotation of. The film is held at a film take-up unit for taking up the delivered film, a capstan and a pinch roller arranged in a film transport path between the film cartridge and the take-up unit, and fed at a constant speed. These operations are processed by the controller 142 of the film adapter 102.

【0033】次に、図3を参照してFlash EEP
ROM3の構成を説明する。図3に示すように、全体を
大きく4部分に分類されている。
Next, referring to FIG. 3, Flash EEP
The configuration of the ROM 3 will be described. As shown in FIG. 3, the whole is roughly classified into four parts.

【0034】31は割り込みベクターテーブルが格納さ
れる領域で、各種割り込み処理アドレスが記述されてい
る。リセット信号や割り込み信号がCPU1に入力され
たとき、このテーブルに記述されたアドレスを参照して
ジャンプする。FlashEEPROM3の容量が例え
ば4Mビットであるとすると、8KByteの容量を使
用する。
An area 31 stores an interrupt vector table, in which various interrupt processing addresses are described. When a reset signal or an interrupt signal is input to the CPU 1, a jump is made with reference to the address described in this table. Assuming that the capacity of the Flash EEPROM 3 is, for example, 4 Mbits, a capacity of 8 KB is used.

【0035】32は書き換えモードフラグが格納される
領域で、Flash EEPROM3の容量が例えば4
Mビットであるとすると、8KByteの容量を使用す
る。書き換えモードフラグ自体は2Byteからなり、
値が65535(16進数でFFFF)のときには書き
換えモード中、0のときは通常動作モード中であること
を示す。
An area 32 stores a rewrite mode flag. The capacity of the flash EEPROM 3 is, for example, 4
Assuming M bits, a capacity of 8 KB is used. The rewrite mode flag itself is composed of 2 bytes,
When the value is 65535 (FFFF in hexadecimal), it indicates that it is in the rewrite mode, and when it is 0, it indicates that it is in the normal operation mode.

【0036】33は書き換え制御プログラムが格納され
る領域である。ここには最小限のCPU初期化プログラ
ム、最小限のSCSIインターフェース初期化プログラ
ム、最小限のホストコンピュータとのダウンロード通信
プログラム、書き換えモード中の割り込み処理プログラ
ムと、Flash EEPROM書き換えプログラムと
が含まれる。Flash EEPROM3の容量が例え
ば4Mビットであるとすると、48KByteの容量を
使用する。
An area 33 stores a rewrite control program. Here, a minimum CPU initialization program, a minimum SCSI interface initialization program, a minimum download communication program with a host computer, an interrupt processing program in a rewrite mode, and a Flash EEPROM rewrite program are included. Assuming that the capacity of the Flash EEPROM 3 is, for example, 4 Mbits, a capacity of 48 KBytes is used.

【0037】領域31及び33は、書き換えを行わない
固定領域である。
The areas 31 and 33 are fixed areas where no rewriting is performed.

【0038】34はスキャナ制御プログラムが格納され
る領域で、ブロック1からブロック7まで64KByt
e(65536Byte)単位で分割されいる。スキャ
ナの動作制御プログラム、ホストコンピュータとの通信
プログラム等が格納され、本実施の形態で書き換えの対
象となる領域である。
Reference numeral 34 denotes an area for storing a scanner control program.
e (65536 Bytes). An operation control program of the scanner, a communication program with the host computer, and the like are stored therein, and are areas to be rewritten in the present embodiment.

【0039】領域31、32、33と、34のブロック
1からブロック7はそれぞれ独立して消去、書き換えが
可能である。また、領域31と33のように予め電気的
にプロテクトをかけて、所望の領域の消去や書き込みが
できなくすることも可能である。
Blocks 1 to 7 in the areas 31, 32, 33 and 34 can be independently erased and rewritten. It is also possible to electrically protect the area in advance like the areas 31 and 33 so that the desired area cannot be erased or written.

【0040】以下、本実施の形態におけるFlash
EEPROM3のプログラム書き換え動作について説明
する。
Hereinafter, the flash according to the present embodiment will be described.
The program rewriting operation of the EEPROM 3 will be described.

【0041】まず図4を参照して書き換えモードフラグ
32をセットするシーケンスについて説明する。
First, a sequence for setting the rewrite mode flag 32 will be described with reference to FIG.

【0042】一般的に、Flash EEPROMに書
き込みを行うためには、まず書き換えたいブロック全体
を消去しなければない。また、消去、書込み処理中は、
プログラムの読み出しをすることができないため、消
去、書込みプログラムはFlash EEPROM以外
のプログラムメモリで動作させなくてはならない。本実
施の形態では、RAM2をFlash EEPROM以
外のプログラムメモリとして使用する。
Generally, in order to write data into a Flash EEPROM, first, the entire block to be rewritten must be erased. Also, during the erasing and writing process,
Since the program cannot be read, the erase / write program must be operated in a program memory other than the Flash EEPROM. In the present embodiment, the RAM 2 is used as a program memory other than the Flash EEPROM.

【0043】まず、システムコントローラ111のCP
U1がプログラムの書き換えコマンドをホストコンピュ
ータ114から受信すると、CPU1はFlash E
EPROM3の書き換えスキャナ制御プログラム領域3
3の中の書き換えプログラムをRAM2にコピーする
(ステップS41)。
First, the CP of the system controller 111
When U1 receives a program rewrite command from the host computer 114, the CPU 1 sends the Flash E
Rewrite scanner control program area 3 in EPROM 3
3 is copied to the RAM 2 (step S41).

【0044】コピー後、CPU1は割り込みを禁止し
(ステップS42)、RAM2にコピーされた書き換え
プログラムの先頭にジャンプしてプログラムを実行す
る。書き換えプログラムは、まず書き換えモードフラグ
のある領域32全体を消去させる(ステップS43)。
次に、書き換えモード中であることを示す65535
(16進数でFFFF)を領域32に書き込む(ステッ
プS44)。さらにCPU1は書き換えモードフラグが
領域32に正しく書き込まれたかどうかチェックする
(ステップS45)。正しく書き込まれていれば、CP
U1は、割り込み禁止を解除する(ステップS46)。
これ以後、スキャナは書き換えモードになる。
After the copying, the CPU 1 disables the interrupt (step S42), jumps to the top of the rewriting program copied to the RAM 2, and executes the program. The rewrite program first erases the entire area 32 with the rewrite mode flag (step S43).
Next, 65535 indicating that it is in the rewrite mode
(FFFF in hexadecimal) is written in the area 32 (step S44). Further, the CPU 1 checks whether the rewrite mode flag has been correctly written in the area 32 (step S45). If written correctly, CP
U1 releases the interrupt prohibition (step S46).
Thereafter, the scanner enters the rewrite mode.

【0045】一方、ステップS45で正しく書き込まれ
ていないと判断されたときは、モニタ300にエラーメ
ッセージを表示するなどのエラー処理を行ってから(ス
テップS47)、ステップS46に進む。
On the other hand, if it is determined in step S45 that the data has not been correctly written, error processing such as displaying an error message on the monitor 300 is performed (step S47), and the process proceeds to step S46.

【0046】各割り込み処理ルーチンでは、プログラム
の先頭で書き換えモードフラグをチェックし、値がFF
FFであれば、書き換え制御プログラム33の割り込み
処理ルーチンにジャンプし、0であればスキャナ制御プ
ログラム34の割り込み処理ルーチンにジャンプするよ
うに構成されている。
In each interrupt processing routine, the rewrite mode flag is checked at the beginning of the program, and the value is set to FF.
If it is FF, it jumps to the interrupt processing routine of the rewrite control program 33, and if it is 0, it jumps to the interrupt processing routine of the scanner control program 34.

【0047】よって、以後の割り込みは、すべて書き換
え制御プログラム33内の割り込み処理ルーチンで処理
される。また、RAM2にコピーした、書き換え制御プ
ログラムは、そのまま以下の処理でも用いる。
Therefore, all subsequent interrupts are processed by the interrupt processing routine in the rewrite control program 33. The rewrite control program copied to the RAM 2 is also used in the following processing as it is.

【0048】次に、図5のフローチャートを用いて、ス
キャナ制御プログラムの書き換えシーケンスの説明をす
る。
Next, the rewriting sequence of the scanner control program will be described with reference to the flowchart of FIG.

【0049】先ず、図4のフローチャートで説明したよ
うに、領域32の書き換えモードフラグを書き換え中
(FFFF)にする(ステップS51)。
First, as described in the flowchart of FIG. 4, the rewrite mode flag in the area 32 is set to rewrite (FFFF) (step S51).

【0050】次にホストコンピュータ114は、ブロッ
ク1に書き込む新しいスキャナ制御プログラムをスキャ
ナ100のインターフェース110を介して、オフセッ
トRAM122にダウンロードする(ステップS5
2)。スキャナ制御プログラムは大容量なため、通常は
画像バッファとして使用しているオフセットRAM12
2を一時的にスキャナ制御プログラムのダウンロードに
使用する。
Next, the host computer 114 downloads a new scanner control program to be written into the block 1 to the offset RAM 122 via the interface 110 of the scanner 100 (step S5).
2). Since the scanner control program has a large capacity, the offset RAM 12 normally used as an image buffer is used.
2 is temporarily used for downloading the scanner control program.

【0051】次にCPU1はオフセットRAMl22に
ダウンロードされたスキャナ制御プログラムのチェック
サムを求め、ホストコンピュータ114からスキャナ制
御プログラムと共に送信されてきたチェックサム値と比
較する(ステップS53)。これらが一致したら、CP
U1はFlash EEPROM3のブロック1全体の
内容を消去する(ステップS54)。一方、一致しない
場合には(ステップS53でNO)、モニタ300にエ
ラーメッセージを表示するなどのエラー処理を行い(ス
テップS59)、ステップS58に進む。
Next, the CPU 1 obtains the checksum of the scanner control program downloaded to the offset RAM 122 and compares it with the checksum value transmitted together with the scanner control program from the host computer 114 (step S53). If these match, CP
U1 erases the entire contents of the block 1 of the Flash EEPROM 3 (step S54). On the other hand, if they do not match (NO in step S53), an error process such as displaying an error message on monitor 300 is performed (step S59), and the process proceeds to step S58.

【0052】ステップS55において、CPU1は、R
AM2にコピーした書き換え制御プログラムに基づい
て、オフセットRAM122にダウンロードされたスキ
ャナ制御プログラムをFlash EEPROM3の対
応するブロックにそれぞれ書き込んでいく。まず、ブロ
ック1に書き込む(ステップS55)。CPU1は書込
みが終了したら、Flash EEPROM3のブロッ
ク1に書き込んだ新しいスキャナ制御プログラムのチェ
ックサムを求め、再びホストコンピュータ114からス
キャナ制御プログラムと共に送られてきたチェックサム
値と比較する(ステップS56)。これらが一致した
ら、ブロック1の書き換えは終了であり、ステップS5
7に進む。一方、ステップ56でチェックサムが不一致
となったら、モニタにエラーメッセージを表示するなど
のエラー処理を行い(ステップS59)、ステップS5
8に進む。
In step S55, the CPU 1 sets R
Based on the rewrite control program copied to AM2, the scanner control program downloaded to the offset RAM 122 is written to the corresponding block of the Flash EEPROM3. First, the data is written into the block 1 (step S55). When the writing is completed, the CPU 1 obtains the checksum of the new scanner control program written in the block 1 of the Flash EEPROM 3 and compares it again with the checksum value sent together with the scanner control program from the host computer 114 (step S56). If they match, rewriting of block 1 is completed, and step S5
Go to 7. On the other hand, if the checksums do not match in step 56, error processing such as displaying an error message on the monitor is performed (step S59), and step S5 is performed.
Proceed to 8.

【0053】ステップS57では、全ブロックの書き込
みが終了したかを調べ、まだ残っている場合にはステッ
プS52に戻り、次のブロックの書き込みを行う。
In step S57, it is checked whether or not the writing of all blocks has been completed, and if there are any remaining blocks, the flow returns to step S52 to write the next block.

【0054】このように、ステップS52乃至S57を
繰り返して、ブロック2から7の書き換え処理を行う。
As described above, steps S52 to S57 are repeated, and the rewriting process of blocks 2 to 7 is performed.

【0055】全てのブロックが正常に書き込めたら(ス
テップS57でYES)、CPU1は、領域32の書き
換えモードフラグを通常モードを示す0に書き換え(ス
テップS58)、処理を終了する。
If all blocks can be normally written (YES in step S57), CPU 1 rewrites the rewrite mode flag in area 32 to 0 indicating the normal mode (step S58), and ends the processing.

【0056】なお、ステップS58の書き換え処理は、
図4の書き換えモードフラグを書き換えモード中に変更
する方法のうち、ステップS44において、領域32に
書き換えモードフラグとして0を書き込めばよい。
The rewriting process in step S58 is performed in the following manner.
In the method of changing the rewrite mode flag in FIG. 4 during the rewrite mode, 0 may be written to the area 32 as the rewrite mode flag in step S44.

【0057】なお、新しく書き換えた割り込み処理ルー
チンで、すぐに、割り込み処理を実行するように切り替
えると、スタックの状態によっては動作が異常になる。
If the newly rewritten interrupt processing routine is switched to immediately execute the interrupt processing, the operation becomes abnormal depending on the state of the stack.

【0058】そこで、ホストコンピュータ114は、書
き換えが終了したというメッセージ及びスキャナ100
の再起動を促すメッセージをモニタ300に表示する。
オペレータはこれを見て、スキャナ100の電源を一旦
切り、再投入する。スキャナ100は、電源が投入され
たときに始めて、書き換えモードフラグが通常モードに
なったのを認識し、新しいスキャナ制御プログラムで、
通常モードで起動する。
Then, the host computer 114 sends a message indicating that the rewriting has been completed and the scanner 100
Is displayed on the monitor 300, prompting the user to restart.
The operator sees this and once turns off the power of the scanner 100 and turns it on again. Only when the power is turned on, the scanner 100 recognizes that the rewrite mode flag has been set to the normal mode.
Start in normal mode.

【0059】以下、図6のフローチャートを参照して、
電源投入時の処理シーケンスを説明する。
Hereinafter, referring to the flowchart of FIG.
The processing sequence at the time of turning on the power will be described.

【0060】まず、スキャナ100は電源投入時やリセ
ットによる初期化において、書き換えモードフラグをF
lash EEPROM3から読み出し(ステップS6
1)、読込んだ書き換えモードフラグを不図示の内部変
数“Run_Mode”に書き込む(ステップS6
2)。ステップS63で、書き換えモードフラグが書き
換え中(FFFF)かどうか調べる。各割り込み処理ル
ーチンは、この内部変数“Run_Mode”の値がF
FFFであれば、書き換え制御プログラム33の割り込
み処理ルーチンにジャンプして書き換え制御プログラム
内の初期化処理を実行し(ステップS64)、0であれ
ばスキャナ制御プログラム34の割り込み処理ルーチン
にジャンプしてスキャナ制御プログラム内の初期化処理
を実行する(ステップS65)ように構成する。
First, the scanner 100 sets the rewrite mode flag to F at power-on or initialization by reset.
Read from the flash EEPROM 3 (step S6).
1) Write the read rewrite mode flag into an internal variable “Run_Mode” (not shown) (step S6)
2). In step S63, it is checked whether the rewrite mode flag is being rewritten (FFFF). Each interrupt processing routine sets the value of this internal variable “Run_Mode” to F
If it is FFF, it jumps to the interrupt processing routine of the rewrite control program 33 to execute initialization processing in the rewrite control program (step S64). It is configured to execute an initialization process in the control program (Step S65).

【0061】Flash EEPROM3の書き換えを
するため、通常モードから書き換えモードに移行すると
きは、スタック上の問題がないため、書き換えモードフ
ラグ32と内部変数“Run_Mode”の両方にFF
FFを書き込み、すぐに書き換えモードに移行する。し
かし、書き換えモードから通常モードに移行するとき
は、書き換えモードフラグ32だけ0にセットする。こ
のため、割り込み処理は、この段階では、書き換え制御
プログラム33内の割り込みルーチンを実行する。
When the flash EEPROM 3 is rewritten, when transitioning from the normal mode to the rewrite mode, there is no problem on the stack. Therefore, FF is set in both the rewrite mode flag 32 and the internal variable “Run_Mode”.
The FF is written, and the mode immediately shifts to the rewrite mode. However, when shifting from the rewrite mode to the normal mode, only the rewrite mode flag 32 is set to 0. Therefore, at this stage, the interrupt process executes the interrupt routine in the rewrite control program 33.

【0062】スキャナ100の再起動時に始めて書き換
えモードフラグ32の0が内部変数“Run_Mod
e”にセットされ、これ以後、スキャナ制御プログラム
34内の割り込み処理ルーチンを実行することができ
る。
When the scanner 100 is restarted, 0 of the rewrite mode flag 32 is set to the internal variable “Run_Mod” for the first time.
e ", and thereafter, the interrupt processing routine in the scanner control program 34 can be executed.

【0063】Flash EEPROM3のデータ書き
換え中、スキャナの電源を誤って速断したり、データ送
信中の通信障害、データファイルそのものの欠落、ホス
トコンピュータ114のハングアップ、ホストコンピュ
ータ114の電源遮断等のさまざまな理由で、書き換え
作業が中断することがある。次に、この場合の処理を説
明する。
While rewriting the data in the Flash EEPROM 3, various errors such as erroneous shutting down of the power supply of the scanner, communication failure during data transmission, loss of the data file itself, hang-up of the host computer 114, power-off of the host computer 114, etc. For that reason, the rewriting operation may be interrupted. Next, processing in this case will be described.

【0064】スキャナの電源を誤って遮断し、データ書
き換え中に作業が中断された場合は、領域32の書き換
えモードフラグが書き換えモードのままである。従っ
て、電源の再投入時のCPU1の初期化時には、内部変
数“Run_Mode”にも、書き換えモードのFFF
Fが書き込まれる。書き換えモードのまま立ち上がった
場合は、破壊されていない書き換え制御プログラムが実
行されるので、それ以後、図6を参照して説明した書き
換えシーケンスを再度実行することで、新しいスキャナ
制御プログラムを領域34に書き込むことができる。
If the power of the scanner is cut off by mistake and the operation is interrupted during data rewriting, the rewriting mode flag in the area 32 remains in the rewriting mode. Therefore, when the CPU 1 is initialized when the power is turned on again, the internal variable “Run_Mode” is also stored in the FFF in the rewrite mode.
F is written. If the program is started up in the rewrite mode, the rewrite control program that has not been destroyed is executed. Thereafter, the rewrite sequence described with reference to FIG. Can write.

【0065】次に図7のフローチャートにより、割り込
み処理時の処理シーケンスを説明する。
Next, a processing sequence at the time of interrupt processing will be described with reference to the flowchart of FIG.

【0066】ここではSCSI割り込みの処理を例にと
り説明する。
Here, a description will be given of a SCSI interrupt process as an example.

【0067】先ず、内部変数“Run_Mode”を読
込み(ステップS71)、この値が書き換えモードかど
うか調べる(ステップS72)。
First, an internal variable "Run_Mode" is read (step S71), and it is checked whether or not this value is a rewrite mode (step S72).

【0068】書き換えモードのとき(FFFF)、書き
換え制御プログラム内のSCSI割り込み処理を実行す
る(ステップS73)。一方、ステップS72で、書き
換えモードでなければ、スキャナ制御プログラム内のS
CSI割り込み処理を実行する(ステップS74)。
In the rewrite mode (FFFF), a SCSI interrupt process in the rewrite control program is executed (step S73). On the other hand, if the mode is not the rewrite mode in step S72, S in the scanner control program
A CSI interrupt process is executed (step S74).

【0069】その他のタイマー割り込み、ボートの割り
込みなども同様なシーケンスで実行される。
Other timer interrupts, port interrupts, etc. are executed in a similar sequence.

【0070】上記実施の形態では、書き換えモードフラ
グ32をFlash EEPROM3内に構成したが、
このフラグは2byteという小さなサイズがあれば十
分なため、Flash EEPROM3とは別の小容量
で安価で小型な電気的に書き換え可能な不揮発性メモリ
(EEPROM)を使用してもよい。このようなEEP
ROMは装置の製造番号や各種調整パラメータを記憶す
るために以前からしばしば用いられている。データはC
PUのシリアルポートからシリアルデータとしてワード
単位で書き込まれる。
In the above embodiment, the rewrite mode flag 32 is configured in the flash EEPROM 3,
Since a small size of 2 bytes is sufficient for this flag, a small-capacity, inexpensive, small, electrically rewritable non-volatile memory (EEPROM) other than the Flash EEPROM 3 may be used. Such EEP
The ROM has been often used for a long time to store a device serial number and various adjustment parameters. The data is C
The data is written from the serial port of the PU as serial data in word units.

【0071】以上説明したように、本実施の形態によれ
ば、制御プログラムメモリにFlash EEPROM
を使用したフィルムスキャナに、プログラムデータの書
き換え中を示す不揮発性のフラグ領域を設けることで、
他の付加プログラムメモリを実装することなく、フィル
ムスキャナの制御プログラムを安全に書き換えることが
可能になる。
As described above, according to the present embodiment, the flash EEPROM is stored in the control program memory.
By providing a non-volatile flag area to indicate that the program data is being rewritten,
It is possible to safely rewrite the control program of the film scanner without mounting any additional program memory.

【0072】[0072]

【発明の効果】以上説明したように、本発明によれば、
制御プログラムメモリにFlashEEPROM等の書
き換え可能な不揮発性メモリを使用したフィルムスキャ
ナ等の電子装置において、他の付加プログラムメモリを
実装することなく、電子装置の制御プログラムを安全に
書き換えることが可能になる。
As described above, according to the present invention,
In an electronic device such as a film scanner using a rewritable nonvolatile memory such as a flash EEPROM as a control program memory, a control program of the electronic device can be safely rewritten without mounting any additional program memory.

【0073】特に、制御プログラムの書き換えを一般ユ
ーザに開放し、自由にプログラムのバージョンアップを
行えるようにした場合に発生するさまざまな障害によ
り、電子装置に致命的なダメージを与えることを防止す
ることが可能となる。
In particular, it is possible to prevent a serious damage to an electronic device due to various troubles that occur when a control program is rewritten to a general user and a program can be freely upgraded. Becomes possible.

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

【図1】本発明の実施の形態におけるシステムコントロ
ーラの構成を示すブロック図である。
FIG. 1 is a block diagram illustrating a configuration of a system controller according to an embodiment of the present invention.

【図2】本発明の実施の形態における画像読み取り装置
を使用した画像読み取りシステムの全体構成を示すブロ
ック図である。
FIG. 2 is a block diagram illustrating an overall configuration of an image reading system using the image reading device according to the embodiment of the present invention.

【図3】本発明の実施の形態におけるFlash EE
PROMの構成を説明する図である。
FIG. 3 shows Flash EE according to the embodiment of the present invention.
FIG. 3 is a diagram illustrating a configuration of a PROM.

【図4】本発明の実施の形態における書き換えモードフ
ラグをセットするシーケンスを説明するフローチャート
である。
FIG. 4 is a flowchart illustrating a sequence for setting a rewrite mode flag according to the embodiment of the present invention.

【図5】本発明の実施の形態におけるスキャナ制御プロ
グラムの書き換えシーケンスを説明するフローチャート
である。
FIG. 5 is a flowchart illustrating a rewrite sequence of a scanner control program according to the embodiment of the present invention.

【図6】本発明の実施の形態における電源投入時の処理
シーケンスを説明するフローチャートである。
FIG. 6 is a flowchart illustrating a processing sequence when power is turned on in the embodiment of the present invention.

【図7】本発明の実施の形態における割り込み処理時の
処理シーケンスを説明するフローチャートである。
FIG. 7 is a flowchart illustrating a processing sequence at the time of interrupt processing according to the embodiment of the present invention.

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

1 中央処理部 2 ランダムアクセスメモリ 3 Flash EEPROM 110 インターフェース回路 111 システムコントローラ 114 ホストコンピュータ 300 モニタ DESCRIPTION OF SYMBOLS 1 Central processing part 2 Random access memory 3 Flash EEPROM 110 Interface circuit 111 System controller 114 Host computer 300 Monitor

Claims (15)

【特許請求の範囲】[Claims] 【請求項1】 書き換え可能な不揮発性メモリに格納さ
れた制御プログラムを実行して制御を行う電子装置であ
って、前記不揮発性メモリは所定領域毎に独立して書き
換え可能であり、前記不揮発性メモリの内容を書き換え
ている間、前記不揮発性メモリの内容を書き換え中であ
ることを示すフラグを設定することを特徴とする電子装
置。
1. An electronic device for performing control by executing a control program stored in a rewritable nonvolatile memory, wherein the nonvolatile memory is independently rewritable for each predetermined area, and An electronic device, wherein a flag indicating that the content of the nonvolatile memory is being rewritten is set while the content of the memory is being rewritten.
【請求項2】 前記フラグが設定されているか否かを判
断する判断手段を更に有し、前記判断手段の判断結果に
応じて割り込み処理の動作を変更することを特徴とする
請求項1に記載の電子装置。
2. The apparatus according to claim 1, further comprising: a determination unit configured to determine whether the flag is set, wherein an operation of an interrupt process is changed according to a determination result of the determination unit. Electronic devices.
【請求項3】 前記不揮発性メモリは、書き換えを行わ
ない所定領域を有し、前記所定領域に少なくとも前記電
子装置の起動時に最低限必要な制御プログラム及び制御
プログラムの書き換えプログラムを保持することを特徴
とする請求項2に記載の電子装置。
3. The non-volatile memory has a predetermined area in which rewriting is not performed, and the predetermined area holds at least a control program and a control program rewriting program that are required at least when the electronic device is started. The electronic device according to claim 2, wherein
【請求項4】 前記判断手段により前記フラグが設定さ
れていると判断されると、前記書き換えプログラムを実
行し、前記フラグが設定されていないと判断されると、
前記制御プログラムを実行することを特徴とする請求項
3に記載の電子装置。
4. When the determining means determines that the flag is set, the rewriting program is executed, and when it is determined that the flag is not set,
The electronic device according to claim 3, wherein the control program is executed.
【請求項5】 電源投入時に前記判断手段による判断を
他の動作に先立って行うことを特徴とする請求項2乃至
4のいずれかに記載の電子装置。
5. The electronic device according to claim 2, wherein when the power is turned on, the determination by the determination unit is performed prior to another operation.
【請求項6】 前記フラグは、前記不揮発性メモリ内に
設定されることを特徴とする請求項1乃至5のいずれか
に記載の電子装置。
6. The electronic device according to claim 1, wherein the flag is set in the nonvolatile memory.
【請求項7】 前記フラグは、前記不揮発性メモリ以外
の不揮発性メモリに設定されることを特徴とする請求項
1乃至5のいずれかに記載の電子装置。
7. The electronic device according to claim 1, wherein the flag is set in a nonvolatile memory other than the nonvolatile memory.
【請求項8】 前記電子装置は、画像読み取り装置であ
ることを特徴とする請求項1乃至7のいずれかに記載の
電子装置。
8. The electronic device according to claim 1, wherein the electronic device is an image reading device.
【請求項9】 書き換え可能な不揮発性メモリに格納さ
れた制御プログラムを実行して制御を行う電子装置にお
ける前記不揮発性メモリの書き換え方法であって、前記
不揮発性メモリは所定領域毎に独立して書き換え可能で
あり、前記不揮発性メモリの内容を書き換えている間、
前記不揮発性メモリの内容を書き換え中であることを示
すフラグを設定することを特徴とする不揮発性メモリの
書き換え方法。
9. A method for rewriting a nonvolatile memory in an electronic device which performs control by executing a control program stored in a rewritable nonvolatile memory, wherein the nonvolatile memory is independently provided for each predetermined area. Rewritable, while rewriting the contents of the non-volatile memory,
A method for rewriting a nonvolatile memory, comprising setting a flag indicating that the content of the nonvolatile memory is being rewritten.
【請求項10】 前記フラグが設定されているか否かを
判断する判断工程を更に有し、前記判断工程での判断結
果に応じて前記電子装置における割り込み処理の動作を
変更することを特徴とする請求項9に記載の不揮発性メ
モリの書き換え方法。
10. The electronic apparatus according to claim 1, further comprising a determining step of determining whether or not the flag is set, wherein an operation of interrupt processing in the electronic device is changed according to a result of the determination in the determining step. A method for rewriting a nonvolatile memory according to claim 9.
【請求項11】 前記不揮発性メモリは書き換えを行わ
ない所定領域を有し、前記所定領域に少なくとも前記電
子装置の起動時に最低限必要な制御プログラム及び制御
プログラムの書き換えプログラムを保持し、前記判断工
程において前記フラグが設定されていると判断される
と、前記書き換えプログラムを実行し、前記フラグが設
定されていないと判断されると、前記制御プログラムを
実行することを特徴とする請求項10に記載の不揮発性
メモリの書き換え方法。
11. The non-volatile memory has a predetermined area in which rewriting is not performed. The predetermined area holds at least a control program and a rewriting program of a control program which are required at least at the time of starting the electronic device. 11. The method according to claim 10, wherein the rewriting program is executed when it is determined that the flag is set, and the control program is executed when it is determined that the flag is not set. Non-volatile memory rewriting method.
【請求項12】 電源投入時に前記判断工程を他の動作
に先立って実行することを特徴とする請求項10または
11に記載の不揮発性メモリの書き換え方法。
12. The method according to claim 10, wherein the determining step is performed prior to another operation when the power is turned on.
【請求項13】 前記フラグは、前記不揮発性メモリ内
に設定されることを特徴とする請求項9乃至12のいず
れかに記載の不揮発性メモリの書き換え方法。
13. The non-volatile memory rewriting method according to claim 9, wherein the flag is set in the non-volatile memory.
【請求項14】 前記フラグは、前記不揮発性メモリ以
外の不揮発性メモリに設定されることを特徴とする請求
項9乃至12のいずれかに記載の不揮発性メモリの書き
換え方法。
14. The method according to claim 9, wherein the flag is set in a nonvolatile memory other than the nonvolatile memory.
【請求項15】 前記電子装置は、画像読み取り装置で
あることを特徴とする請求項9乃至14のいずれかに記
載の不揮発性メモリの書き換え方法。
15. The method according to claim 9, wherein the electronic device is an image reading device.
JP2000356142A 2000-11-22 2000-11-22 Electronic device, image reader, and rewriting method for nonvolatile memory Withdrawn JP2002157139A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2000356142A JP2002157139A (en) 2000-11-22 2000-11-22 Electronic device, image reader, and rewriting method for nonvolatile memory

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2000356142A JP2002157139A (en) 2000-11-22 2000-11-22 Electronic device, image reader, and rewriting method for nonvolatile memory

Publications (1)

Publication Number Publication Date
JP2002157139A true JP2002157139A (en) 2002-05-31

Family

ID=18828440

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2000356142A Withdrawn JP2002157139A (en) 2000-11-22 2000-11-22 Electronic device, image reader, and rewriting method for nonvolatile memory

Country Status (1)

Country Link
JP (1) JP2002157139A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008047112A (en) * 2006-08-17 2008-02-28 Hewlett-Packard Development Co Lp Method and system for arbitrating error handling and firmware updates
US7650499B2 (en) 2004-07-27 2010-01-19 Canon Kabushiki Kaisha Encryption apparatus and decryption apparatus
JP2012159965A (en) * 2011-01-31 2012-08-23 Kyocera Document Solutions Inc Image formation apparatus

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7650499B2 (en) 2004-07-27 2010-01-19 Canon Kabushiki Kaisha Encryption apparatus and decryption apparatus
JP2008047112A (en) * 2006-08-17 2008-02-28 Hewlett-Packard Development Co Lp Method and system for arbitrating error handling and firmware updates
JP2012159965A (en) * 2011-01-31 2012-08-23 Kyocera Document Solutions Inc Image formation apparatus

Similar Documents

Publication Publication Date Title
US6311322B1 (en) Program rewriting apparatus
US5697004A (en) Camera capable of storing photographing data and display device connectable thereto
US7577766B2 (en) Method for controlling electronic apparatus, program for controlling electronic apparatus, electronic apparatus, and recording apparatus
JP2002157139A (en) Electronic device, image reader, and rewriting method for nonvolatile memory
JP4258579B2 (en) Program rewriting device
JP4282460B2 (en) Data rewrite device
JP2011164827A (en) Electronic apparatus including flash memory and method for updating program stored in flash memory
JP2001117745A (en) Multifunctional device
US7119844B2 (en) Digital camera
JP2000263897A (en) Image-forming apparatus and method for updating control program of image-forming apparatus
JP2002007152A (en) Download method and download device
USRE39674E1 (en) Peripheral and camera system using the same, for rewriting programs stored in a camera
JP2007069514A (en) Ink-jet recording device
JP2004341783A (en) Data storage method and data storage device
JP2004112341A (en) Image processor
JP4366148B2 (en) Information processing apparatus and control program update method for information processing apparatus
JP2009020697A (en) Image forming apparatus
JP2001273143A (en) Electronic controller
JP2005174232A (en) Data rewriting device
JPH05307471A (en) Electronic equipment
JP4785778B2 (en) Imaging device, control method thereof, and program
JP3945406B2 (en) Camera and camera system
JP2004355310A (en) Image processing device
JPH0496122A (en) Information processor
JP2003345616A (en) Controller

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20080205