JP2001027954A - Computer with program rewriting function - Google Patents

Computer with program rewriting function

Info

Publication number
JP2001027954A
JP2001027954A JP11349315A JP34931599A JP2001027954A JP 2001027954 A JP2001027954 A JP 2001027954A JP 11349315 A JP11349315 A JP 11349315A JP 34931599 A JP34931599 A JP 34931599A JP 2001027954 A JP2001027954 A JP 2001027954A
Authority
JP
Japan
Prior art keywords
main processor
program
area
memory
coprocessor
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.)
Granted
Application number
JP11349315A
Other languages
Japanese (ja)
Other versions
JP4375857B2 (en
Inventor
Hideyuki Yamaji
秀幸 山路
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.)
Nagano Fujitsu Component Ltd
Original Assignee
Nagano Fujitsu Component Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nagano Fujitsu Component Ltd filed Critical Nagano Fujitsu Component Ltd
Priority to JP34931599A priority Critical patent/JP4375857B2/en
Publication of JP2001027954A publication Critical patent/JP2001027954A/en
Application granted granted Critical
Publication of JP4375857B2 publication Critical patent/JP4375857B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To provide a computer with program rewriting function, which can rewrite a program when the writing of the program that is down-loaded from a host computer is failed. SOLUTION: A main processor 100 down-loads a program on a flash memory 104 from a host computer 12 usually in cooperation with a communication coprocessor. When a power monitor circuit 109 detects the abnormality of power during down loading and down loading is interrupted, for example, the communication coprocessor compulsorily resets the main processor, sets a bus connecting the communication coprocessor and a flash memory to be an active state and down-loads the program on the flash memory 104 without the aid of the main processor.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明はプログラム再書き込
み機能付コンピュータに係り、特に、ホストコンピュー
タからダウンロードされるプログラムの書き込みが失敗
したときにプログラムを再書き込みすることの可能なプ
ログラム再書き込み機能付コンピュータに関する。
The present invention relates to a computer with a program rewriting function, and more particularly to a computer with a program rewriting function capable of rewriting a program downloaded from a host computer when the writing of the program fails. About.

【0002】[0002]

【従来の技術】例えばプリンタである周辺機器の制御装
置としては、バージョンアップ等への対応を容易とする
ために、マイクロプロセッサとメモリを主体とするマイ
クロプロセッサシステムが適用される場合が多い。マイ
クロプロセッサは、メモリ内に記憶されているプログラ
ムの実行形式であるプログラムコードを順次読み込み、
プログラムコードを解析して所定の動作を実行する。
2. Description of the Related Art As a control device for a peripheral device such as a printer, a microprocessor system mainly including a microprocessor and a memory is often used in order to easily cope with an upgrade or the like. The microprocessor sequentially reads the program code, which is the execution form of the program stored in the memory,
The program code is analyzed to execute a predetermined operation.

【0003】従来マイクロプロセッサシステムで使用す
るメモリとしては、EPROM(Erasable and Program
mable Read-Only Memory)を適用していた。しかし、E
PROMに記憶されているプログラムコードを変更する
ためには、いったんEPROMをマイクロプロセッサシ
ステムから取り外し、ROMライタを使用して修正され
たプログラムコードをEPROMに書き込むことが必要
となるので、プログラムコードの変更のたびに周辺装置
を分解してEPROMを取り外すという煩雑さを回避す
ることはできない。
As a memory used in a conventional microprocessor system, an EPROM (Erasable and Programmable Memory) is used.
mable Read-Only Memory). But E
In order to change the program code stored in the PROM, it is necessary to temporarily remove the EPROM from the microprocessor system and write the corrected program code into the EPROM using a ROM writer. In each case, the trouble of disassembling the peripheral device and removing the EPROM cannot be avoided.

【0004】この課題を解決するために、近年マイクロ
プロセッサシステムで使用するメモリとしてEPROM
に代えてフラッシュメモリが使用されるようになってき
ている。即ち、フラッシュメモリは消去信号を印加する
ことにより記憶内容をクリアし、ダウンロードされてき
た修正されたプログラムコードを改めて記憶することが
可能となるため、プログラムコード変更の際に周辺装置
を分解してメモリを取り外す必要はなくなる。
In order to solve this problem, an EPROM has recently been used as a memory used in a microprocessor system.
Instead, flash memories have been used. That is, the flash memory clears the stored contents by applying an erasing signal, and it becomes possible to store the downloaded modified program code again. There is no need to remove memory.

【0005】しかし、フラッシュメモリは予め定められ
た大きさのセクタごとに書き換えが可能な構成であり、
セクタ内の記憶セルをいったんすべて消去した後に改め
てプログラムコードをダウンロードする必要がある。こ
のため、プログラムコードのダウンロード中に電源断等
に異常が発生した場合には、ダウンロードは中断される
ためフラッシュメモリは正しいプログラムコードを記憶
することはできない。この結果、異常が解消された後も
メインプロセッサは正しいプログラムをフラッシュメモ
リから取り出すことはできず、マイクロプロセッサシス
テムの制御対象である周辺機器を正しく制御することは
不可能となる。
[0005] However, the flash memory has a configuration in which data can be rewritten for each sector of a predetermined size.
It is necessary to download the program code again after erasing all the memory cells in the sector. For this reason, if an abnormality such as a power failure occurs during the download of the program code, the download is interrupted and the flash memory cannot store the correct program code. As a result, the main processor cannot retrieve the correct program from the flash memory even after the abnormality has been resolved, and it is impossible to correctly control the peripheral device to be controlled by the microprocessor system.

【0006】この課題の解決方法としては、例えば、 1.フラッシュメモリのベクタ領域(ブートプログラム
が記憶されている領域)の書き換えを禁止して、少なく
とも異常解除後の再ロードは可能なシステムとする。 2.少なくともプログラムコードのダウンロード中は電
源維持が可能なように、いわゆるシーケンス電源を使用
する。 等が提案されている。
[0006] To solve this problem, for example, It is assumed that the rewriting of the vector area of the flash memory (the area where the boot program is stored) is prohibited, and the system can be reloaded at least after the abnormality is cleared. 2. A so-called sequence power supply is used so that the power supply can be maintained at least during the download of the program code. Etc. have been proposed.

【0007】[0007]

【発明が解決しようとする課題】しかしながら、ベクタ
領域の書き換えを禁止した場合には、ベクタ領域自体に
記憶されるプログラム・コードの修正、バージョンアッ
プのためには、メモリ素子自体の交換が必要となるとい
う課題が生じる。また、シーケンス電源を使用する場合
には、電源自体が高価であるため、システムが高価とな
るという課題を生じる。
However, if the rewriting of the vector area is prohibited, it is necessary to replace the memory element itself in order to correct or upgrade the program code stored in the vector area itself. The problem arises. Further, when a sequence power supply is used, the power supply itself is expensive, so that there is a problem that the system becomes expensive.

【0008】本発明は上記課題に鑑みなされたものであ
って、ホストコンピュータからダウンロードされるプロ
グラムの書き込みが失敗したときにプログラムを再書き
込みすることの可能なプログラム再書き込み機能付コン
ピュータを提供することを目的とする。
The present invention has been made in view of the above problems, and provides a computer with a program rewriting function capable of rewriting a program when writing of a program downloaded from a host computer fails. With the goal.

【0009】[0009]

【課題を解決するための手段】第1の発明に係るプログ
ラム再書き込み機能付コンピュータは、メインプロセッ
サと、メインプロセッサがホストコンピュータと交信を
実行する場合にメインプロセッサを補助するとともにメ
インプロセッサをリセット状態に設定するためのリセッ
ト信号を出力するコプロセッサと、メインプロセッサが
実行するプログラムを記憶する再書き込み可能なメモリ
と、メインプロセッサとメモリとを接続するメインバス
と、コプロセッサとメモリとを接続する補助バスと、メ
インバス中に設置されコプロセッサがメインプロセッサ
をリセット状態としたときにメインバスを非活性状態と
するとともに、補助バス中に設置され通信コプロセッサ
がメインプロセッサをリセット状態としたときに補助バ
スを活性状態とするバストランシーバと、を具備する。
According to a first aspect of the present invention, a computer with a program rewriting function assists a main processor when the main processor communicates with a host computer and resets the main processor. A coprocessor that outputs a reset signal for setting the main processor, a rewritable memory that stores a program to be executed by the main processor, a main bus that connects the main processor to the memory, and a connection between the coprocessor and the memory When the auxiliary bus and the coprocessor installed in the main bus reset the main processor, the main bus is deactivated, and the communication coprocessor installed in the auxiliary bus resets the main processor. Make the auxiliary bus active It includes a bus transceiver, a.

【0010】本発明にあっては、ホストコンピュータか
らメインプロセッサを介するメモリへのプログラムのダ
ウンロード中にメインプロセッサに異常が発生してメイ
ンプロセッサがリセットされる状態になった場合に、プ
ログラムはコプロセッサからメモリに直接ダウンロード
される。第2の発明に係るプログラム再書き込み機能付
コンピュータは、少なくとも1つのメインプロセッサ
と、メインプロセッサがホストコンピュータと交信を実
行する場合にメインプロセッサを補助するとともにメイ
ンプロセッサをリセット状態に設定するためのリセット
信号を出力する少なくとも1つのコプロセッサと、メイ
ンプロセッサが実行するプログラムを記憶するための少
なくとも2つの領域を有する再書き込み可能なメモリ
と、少なくとも1つのメインプロセッサと少なくとも1
つのコプロセッサの間での双方向通信を許容するインタ
ーフェイス手段と、少なくとも1つのメインプロセッサ
のそれぞれ内に設置されメモリ内のプログラムの書換え
が必要となったときにメモリの第1の領域に記憶された
プログラムをメモリの第2の領域に複写する複写手段
と、少なくとも1つのメインプロセッサのそれぞれ内に
設置されメモリの第1の領域に新たなプログラムをダウ
ンロードするダウンロード手段と、少なくとも1つのメ
インプロセッサ内に新たにダウンロードされたプログラ
ムが正常であるかについてのインターフェイスを介して
のコプロセッサの質問に対し異常である旨の応答があっ
たときあるいは応答が無かったときにメインプロセッサ
がアクセス可能なフラッシュメモリの領域を領域1から
領域2に移行させるアドレス信号制御手段と、少なくと
も1つのメインプロセッサのそれぞれ内に設置されアド
レス信号制御手段によりメインプロセッサがアクセス可
能なフラッシュメモリの領域が領域1から領域2に移行
したときにプログラムを再度ダウンロードする再ダウン
ロード手段と、を具備する。
According to the present invention, when an abnormality occurs in the main processor during the download of the program from the host computer to the memory via the main processor and the main processor is reset, the program is stored in the coprocessor. Is downloaded directly to memory. According to a second aspect of the present invention, there is provided a computer with a program rewriting function, which includes at least one main processor and a reset for setting the main processor in a reset state while assisting the main processor when the main processor executes communication with the host computer. At least one coprocessor for outputting a signal, a rewritable memory having at least two areas for storing a program executed by the main processor, at least one main processor and at least one
Interface means for permitting two-way communication between the two coprocessors, and stored in a first area of the memory when a program in the memory is installed in each of the at least one main processor and needs to be rewritten. Copying means for copying the program to a second area of the memory, download means installed in each of the at least one main processor and downloading a new program to the first area of the memory, A flash memory accessible by the main processor when there is a response to the coprocessor via the interface as to whether the newly downloaded program is normal or not, or when there is no response Region from region 1 to region 2 Re-downloading a program again when the area of the flash memory installed in each of the dress signal control means and the at least one main processor and accessible by the main processor by the address signal control means shifts from area 1 to area 2 Means.

【0011】本発明にあっては、メモリ内の新たなプロ
グラムのダウンロードが正常に行われなかったときは、
コプロセッサによりメインプロセッサがアクセス可能な
メモリ領域を切り換えた後再度ダウンロードが実行され
る。第3の発明に係るプログラム再書き込み機能付コン
ピュータは、メインプロセッサと、メインプロセッサが
実行するプログラムを記憶するための少なくとも2つの
領域を有する再書き込み可能なメモリと、メインプロセ
ッサ内に設置されメモリ内のプログラムの書換えが必要
となったときにメモリの第1の領域に記憶されたプログ
ラムを前記メモリの第2の領域に複写する複写手段と、
メインプロセッサ内に設置されメモリの第1の領域に新
たなプログラムをダウンロードするダウンロード手段
と、メインプロセッサが正常に動作しているかをウオッ
チドッグ信号が所定周期毎に変化しているかにより監視
する時間監視手段と、時間監視手段によりメインプロセ
ッサが異常であると判定されたときにメインプロセッサ
がアクセス可能なフラッシュメモリの領域を領域1から
領域2に移行させるアドレス信号制御手段と、アドレス
信号制御手段によりメインプロセッサがアクセス可能な
フラッシュメモリの領域が領域1から領域2に移行した
ときにメインプロセッサをリセットするリセット制御手
段と、を具備する。
In the present invention, when a new program in the memory is not normally downloaded,
After the coprocessor switches the memory area accessible by the main processor, the download is executed again. A computer with a program rewriting function according to a third aspect of the present invention includes a main processor, a rewritable memory having at least two areas for storing a program to be executed by the main processor, and a memory installed in the main processor. Copying means for copying the program stored in the first area of the memory to the second area of the memory when the program needs to be rewritten;
Download means installed in the main processor for downloading a new program to a first area of the memory, and time monitoring for monitoring whether the main processor is operating normally based on whether a watchdog signal changes at predetermined intervals. Means, an address signal control means for shifting the area of the flash memory accessible by the main processor from area 1 to area 2 when the time monitoring means determines that the main processor is abnormal, and an address signal control means. Reset control means for resetting the main processor when the area of the flash memory accessible to the processor shifts from area 1 to area 2.

【0012】本発明にあっては、メモリ内の新たなプロ
グラムのダウンロードが正常に行われなかったときは、
アドレス信号制御手段によりメインプロセッサがアクセ
ス可能なメモリ領域を切り換えた後再度ダウンロードが
実行される。
According to the present invention, when a new program in the memory is not normally downloaded,
After switching the memory area accessible by the main processor by the address signal control means, the download is executed again.

【0013】[0013]

【発明の実施の形態】図1は本発明に係るプログラム再
書き込み機能付コンピュータを適用したプリンタの第1
の実施形態の構成図であって、プリンタ1は制御部10
とプリント部11とから構成される。制御部10のメイ
ンプロセッサ100は、インターフェイス101を介し
て通信コプロセッサ102とバスによって接続される。
メインプロセッサ100は、また、アドレスデコーダ1
03、フラッシュメモリ104、RAM(Random Acces
s Memory)105ともバスによって接続される。アドレ
スデコーダ103は、メインプロセッサ100が出力す
るアドレスがフラッシュメモリ104またはRAM10
5を指しているかを判断し、フラッシュメモリ104ま
たはRAM105に対してイネーブル信号を出力する。
FIG. 1 shows a first embodiment of a printer to which a computer with a program rewriting function according to the present invention is applied.
FIG. 2 is a configuration diagram of the embodiment, wherein the printer 1 includes a control unit 10.
And a print unit 11. The main processor 100 of the control unit 10 is connected to a communication coprocessor 102 via an interface 101 by a bus.
The main processor 100 also includes an address decoder 1
03, flash memory 104, RAM (Random Acces
s Memory) 105 is also connected by a bus. The address decoder 103 stores the address output from the main processor 100 in the flash memory 104 or the RAM 10
5 is determined, and an enable signal is output to the flash memory 104 or the RAM 105.

【0014】制御部10は、また、アドレスバストラン
シーバ106、データバストランシーバ107、および
コントロールトランシーバ108を具備するが、具体的
構成ならびに機能については後述する。制御部10は、
さらに、電源監視回路109を具備しており、電源監視
回路109は制御部10に供給される電源の電圧が正常
であるときは、第1のダイオード1091を介してメイ
ンプロセッサ100のリセット端子に "H" レベルのリ
セット信号を供給する。そして、電源電圧が異常となる
とリセット信号を "L"レベルとしてメインプロセッサ
100をリセット状態とする。
The control unit 10 further includes an address bus transceiver 106, a data bus transceiver 107, and a control transceiver 108, and specific configurations and functions will be described later. The control unit 10
Further, the power supply monitoring circuit 109 includes a power supply monitoring circuit 109. When the power supply voltage supplied to the control unit 10 is normal, the power supply monitoring circuit 109 connects to the reset terminal of the main processor 100 via the first diode 1091. An H-level reset signal is supplied. Then, when the power supply voltage becomes abnormal, the reset signal is set to the “L” level, and the main processor 100 is reset.

【0015】また、メインプロセッサ100のリセット
端子は第2のダイオード1092を介して通信コプロセ
ッサ102のリセット信号出力端子と接続されており、
通信コプロセッサ102からメインプロセッサ100の
動作を制御可能な構成としている。プリンタ1のプリン
ト部11は、印刷を実行するサーマルヘッド110、お
よび印刷紙を送るプラテン111を具備するが、サーマ
ルヘッド110は直接メインプロセッサ100によって
制御され、プラテン111は駆動回路112を介してメ
インプロセッサ100によって制御されるモータ113
によって駆動される。
A reset terminal of the main processor 100 is connected to a reset signal output terminal of the communication coprocessor 102 via a second diode 1092.
The operation of the main processor 100 can be controlled from the communication coprocessor 102. The printing unit 11 of the printer 1 includes a thermal head 110 for executing printing and a platen 111 for feeding printing paper. The thermal head 110 is directly controlled by the main processor 100, and the platen 111 is Motor 113 controlled by processor 100
Driven by

【0016】さらに、制御部10の通信コプロセッサ1
02はケーブル13を介してホストコンピュータ12に
接続されており、ホストコンピュータ12はメインプロ
セッサ100が実行するプログラムコードをフラッシュ
メモリ104にダウンロードすることができる。図2
は、メインプロセッサ100、アドレスデコーダ10
3、アドレストランシーバ106周辺の詳細回路図であ
って、アドレスバス30はn本の線(301、302
・・30n )で構成されている。なお、アドレスバス3
0はメインプロセッサ100がリセット状態となると、
高インピーダンス状態になるものとする。
Further, the communication coprocessor 1 of the control unit 10
Reference numeral 02 is connected to the host computer 12 via the cable 13, and the host computer 12 can download the program code executed by the main processor 100 to the flash memory 104. FIG.
Are the main processor 100 and the address decoder 10
3 is a detailed circuit diagram around the address transceiver 106, in which the address bus 30 has n lines (30 1 , 30 2.
.. 30 n ). Address bus 3
0 indicates that when the main processor 100 is in a reset state,
It shall be in a high impedance state.

【0017】このアドレスバス30には通信コプロセッ
サ102のアドレスバス31がアドレストランシーバ1
06を介してOR接続されている。アドレストランシー
バ106はn個の制御端子付ゲート(1061 、106
2 ・・・106n )から構成される。なお、各制御端子
付ゲート106i は、制御入力32である通信コプロセ
ッサ102が出力するメインプロセッサ100のリセッ
ト信号が "H" レベルであるときには、それぞれの出力
は高インピーダンスに維持されて、アドレスデコーダ1
03は通信コプロセッサ102から絶縁される。
The address bus 30 is connected to the address bus 31 of the communication coprocessor 102.
OR connection is made through the line 06. The address transceiver 106 has n gates with control terminals (106 1 , 106
2 ... 106 n ). The gate 106 i is with respective control terminals, when the control input 32 the reset signal of the main processor 100 CC 102 outputs a is "H" level, each output is maintained at a high impedance, address Decoder 1
03 is insulated from the communication coprocessor 102.

【0018】逆に、制御入力32が "L" レベルである
ときには、制御端子付ゲート106 i は導通状態とな
る。制御入力が "L" レベルであることは、通信コプロ
セッサ102がメインプロセッサ100をリセット状態
としてることを意味しており、メインプロセッサ100
がリセット状態にあれば、アドレスバス30は高インピ
ーダンスとなる。従って、通信コプロセッサ102がメ
インプロセッサ100をリセットしているときは、アド
レスデコーダ103は通信コプロセッサ102から送出
されるアドレスをデコードする。
Conversely, the control input 32 is at "L" level.
Sometimes, the gate 106 with the control terminal iBecomes conductive
You. The fact that the control input is "L" level indicates that the communication
The processor 102 resets the main processor 100
Means that the main processor 100
Is in the reset state, the address bus 30 goes high.
-Dance. Therefore, the communication coprocessor 102
When the in-processor 100 is reset,
The decoder 103 sends out from the communication coprocessor 102.
Decodes the address to be used.

【0019】データバスおよびコントロールバスについ
ても同様であり、通信コプロセッサ102がメインプロ
セッサ100をリセットしているときは、通信コプロセ
ッサ102から送出されるデータがフラッシュメモリ1
04およびRAM105に送られる。図3および4は、
通信コプロセッサ102で実行されるプログラム再書き
込みルーチンのフローチャートであって、メインプロセ
ッサ100がリセットされるたび、および、電源投入さ
れるたびに実行される。
The same applies to the data bus and the control bus. When the communication coprocessor 102 is resetting the main processor 100, data sent from the communication coprocessor 102 is stored in the flash memory 1
04 and the RAM 105. Figures 3 and 4
9 is a flowchart of a program rewriting routine executed by the communication coprocessor 102, which is executed each time the main processor 100 is reset and each time the power is turned on.

【0020】まず、ステップ30で再書き込み回数を表
すインデックスnを初期値 "1" に設定し、ステップ3
1でメインプロセッサ100に対してフラッシュメモリ
104の検査を要求する。メインプロセッサ100がリ
セット状態でなければ、この要求に応じてメインプロセ
ッサ100は、例えば、フラッシュメモリ104のパリ
ティ・チェックを実行し、異常の有無を通信コプロセッ
サ102に返答する。メインプロセッサ100がリセッ
ト状態であれば、通信コプロセッサ102の要求に対し
て応答しない。
First, in step 30, an index n indicating the number of rewrites is set to an initial value "1".
In step 1, the main processor 100 is requested to inspect the flash memory 104. If the main processor 100 is not in the reset state, the main processor 100 executes, for example, a parity check of the flash memory 104 in response to this request, and returns a communication coprocessor 102 as to whether or not there is an abnormality. If the main processor 100 is in the reset state, it does not respond to the request of the communication coprocessor 102.

【0021】ステップ32で返答の内容、あるいは、返
答の有無を判定するが、正常である旨の返答があった場
合は、プログラムコードは正しくロードされたものとし
て、このルーチンを終了する。逆に、異常である旨の返
答があった場合、または、返答自体がない場合は、プロ
グラムコードは正しくロードされなかったものとしてス
テップ33に進み、リセット信号を "L" レベルとす
る。
At step 32, the contents of the reply or the presence or absence of the reply is determined. If there is a reply indicating that the reply is normal, the program code is regarded as correctly loaded, and this routine is terminated. Conversely, if there is a response to the effect that there is an abnormality, or if there is no response itself, it is determined that the program code has not been correctly loaded, and the routine proceeds to step 33, where the reset signal is set to the "L" level.

【0022】これにより、メインプロセッサ100はリ
セット状態となる。また、アドレストランシーバ10
6、データトランシーバ107およびコントロールトラ
ンシーバ108は活性状態となり、通信コプロセッサ1
02のアドレスバス、データバスおよびコントロールバ
スがアドレスデコーダ103、フラッシュメモリ104
およびRAM105に接続された状態となる。
As a result, the main processor 100 is reset. The address transceiver 10
6. The data transceiver 107 and the control transceiver 108 are activated, and the communication coprocessor 1
02, an address bus, a data bus and a control bus correspond to an address decoder 103 and a flash memory
And connected to the RAM 105.

【0023】そして、ステップ34でホストコンピュー
タ12に対してプログラムコードの再送を要求する。ホ
ストコンピュータ12がプログラムコードの再送を開始
すると、ステップ35で通信コプロセッサ102はプロ
グラムコードを受信し、直接フラッシュメモリ104に
転送する。ステップ36で全プログラムコードのロード
が完了したかを判定し、完了していない場合はステップ
35に戻ってプログラムコードのロードを続行する。ス
テップで全プログラムコードのロードが完了したと判定
されたときには、ステップ37に進み、リセット信号を
"H" レベルとして通信コプロセッサ102のアドレス
バス、データバスおよびコントロールバスとアドレスデ
コーダ103、フラッシュメモリ104およびRAM1
05との接続を断とする。
In step 34, the host computer 12 is requested to retransmit the program code. When the host computer 12 starts resending the program code, the communication coprocessor 102 receives the program code and transfers it directly to the flash memory 104 in step 35. At step 36, it is determined whether or not the loading of all the program codes has been completed. If the loading has not been completed, the process returns to step 35 to continue loading the program codes. If it is determined in step that the loading of all the program codes has been completed, the process proceeds to step 37, where a reset signal is output.
As the "H" level, the address bus, data bus and control bus of the communication coprocessor 102, the address decoder 103, the flash memory 104 and the RAM 1
05 is disconnected.

【0024】続いて、ステップ38でメインプロセッサ
100に対してフラッシュメモリ104の検査を要求す
る。ステップ39で、メインプロセッサ100からの返
答の内容、あるいは、返答の有無を判定するが、正常で
ある旨の返答があった場合は、プログラムコードは正し
く再ロードされたものとして、このルーチンを終了す
る。
Subsequently, at step 38, the main processor 100 is requested to inspect the flash memory 104. In step 39, the contents of the response from the main processor 100 or the presence or absence of the response is determined. If there is a response indicating that the response is normal, the program code is regarded as correctly reloaded, and this routine is terminated. I do.

【0025】逆に、異常である旨の返答があった場合、
または、返答自体がない場合は、プログラムコードは正
しく再ロードされなかったものとしてステップ40に進
み、再書き込み回数を表すインデックスnが閾値N以上
となっているかを判定する。ステップ40で否定判定さ
れた場合、即ち、再書き込みが閾値N回以上繰り返され
た場合には、ステップ41でこれ以上再書き込みを行っ
ても、プログラムコードを正しくロードできないものと
して警報を出力して、このルーチンを終了する。
Conversely, if there is a response indicating that something is abnormal,
Alternatively, if there is no response itself, it is determined that the program code has not been correctly reloaded, and the process proceeds to step 40, where it is determined whether or not the index n indicating the number of rewrites is equal to or larger than the threshold N. If a negative determination is made in step 40, that is, if the rewrite is repeated N times or more, an alarm is output assuming that the program code cannot be correctly loaded even if the rewrite is further performed in step 41. This routine is terminated.

【0026】逆に、ステップ40で肯定判定された場
合、即ち、再書き込みが閾値N回以上繰り返されていな
い場合には、プログラムコードを再ロードするために、
ステップ42でインデックスnをインクリメントした後
に、ステップ33に戻る。なお、上記実施例において
は、メインプロセッサは、リセットされると各バスはハ
イインピーダンスとなる構造であるため、メインプロセ
ッサとアドレスデコーダ、フラッシュメモリ、およびR
AMとの間には特にトランシーバを設置する必要はない
が、リセットされても各バスがハイインピーダンスとな
らないときはメインプロセッサの各バスにもバストラン
シーバを設置し、メインプロセッサがリセットされたと
きにメインプロセッサとアドレスデコーダ、フラッシュ
メモリおよびRAMとを切り離すことが必要となる。
Conversely, if the result of the determination in step 40 is affirmative, that is, if the rewriting has not been repeated N times or more, the program code is reloaded.
After incrementing the index n in step 42, the process returns to step 33. In the above embodiment, since the main processor has a structure in which each bus becomes high impedance when reset, the main processor, the address decoder, the flash memory, and the R
There is no need to install a transceiver between the AM and the AM, but if each bus does not become high impedance even after resetting, install a bus transceiver on each bus of the main processor, and when the main processor is reset It is necessary to separate the main processor from the address decoder, the flash memory and the RAM.

【0027】さらに、上記実施例においては、プリンタ
に搭載された制御部10は通信コプロセッサを介して通
信ケーブルによってホストコンピュータと接続されるも
のとしたが、制御部10のメインプロセッサがホストコ
ンピュータのバスに直接接続可能である場合には、メイ
ンプロセッサのバスとホストコンピュータのバスをトラ
ンシーバを介して接続する構造としてもよい。
Further, in the above embodiment, the control unit 10 mounted on the printer is connected to the host computer by a communication cable via a communication coprocessor, but the main processor of the control unit 10 is connected to the host computer. If the bus can be directly connected to the bus, the bus of the main processor and the bus of the host computer may be connected via a transceiver.

【0028】上記第1の実施形態にあっては、バージョ
ンアップ時に正しいプログラムがフラッシュメモリにダ
ウンロードされなかったときは、コプロセッサを使用し
てプログラムを再度ダウンロードしない限りメインプロ
セッサによる制御を再開できないため、システム構成が
複雑となる。第2の実施形態は上記課題を解決するため
のものであって、比較的簡単な構成でプログラムの再ダ
ウンロードを可能とする。
In the first embodiment, when the correct program is not downloaded to the flash memory at the time of version upgrade, control by the main processor cannot be resumed unless the program is downloaded again using the coprocessor. However, the system configuration becomes complicated. The second embodiment is for solving the above-mentioned problem, and enables redownloading of a program with a relatively simple configuration.

【0029】図5は本発明に係るプログラム再書き込み
機能付きコンピュータを使用したプリンタの第2の実施
形態の構成図であって、第1の実施形態からの変更点を
説明する。即ち、第1の実施形態においては通信コプロ
セッサ102のアドレスバス31、データバス及びコン
トロールバスは、それぞれアドレストランシーバ10
6、データトランシーバ107及びコントロールトラン
シーバ108を介してメインプロセッサ100の各バス
に接続されているが、第2の実施形態においては通信コ
プロセッサ102とメインプロセッサ100とはバス接
続されていない。
FIG. 5 is a configuration diagram of a second embodiment of a printer using a computer with a program rewriting function according to the present invention. Changes from the first embodiment will be described. That is, in the first embodiment, the address bus 31, the data bus and the control bus of the communication coprocessor 102 are connected to the address transceiver 10 respectively.
6. Although connected to each bus of the main processor 100 via the data transceiver 107 and the control transceiver 108, the communication coprocessor 102 and the main processor 100 are not connected to the bus in the second embodiment.

【0030】その代わりに、通信コプロセッサ102か
ら出力されるアドレス制御信号aは第1のアドレス制御
部50を介してフラッシュメモリ104のアドレスの最
上位桁に接続されている。さらに、通信コプロセッサ1
02のアドレス制御信号はメインプロセッサ100のデ
ィジタル入力ポートに直結されている。図6は第1のア
ドレス制御部50回りの詳細回路図であって、メインプ
ロセッサのアドレスバスは24ビット(A0〜A23)
で構成されており16メガバイトのメモリ空間を有し、
フラッシュメモリ104は256キロバイトの容量を、
RAM105は128キロバイトの容量を有する場合を
想定する。
Instead, the address control signal a output from the communication coprocessor 102 is connected to the most significant digit of the address of the flash memory 104 via the first address control unit 50. Further, the communication coprocessor 1
The address control signal 02 is directly connected to the digital input port of the main processor 100. FIG. 6 is a detailed circuit diagram around the first address control unit 50. The address bus of the main processor has 24 bits (A0 to A23).
And has a memory space of 16 megabytes,
The flash memory 104 has a capacity of 256 kilobytes,
It is assumed that the RAM 105 has a capacity of 128 kilobytes.

【0031】通信コプロセッサ102のディジタル出力
ポートから出力されるアドレス制御信号aは第1の抵抗
501を介してNPNトランジスタ502のベースに印
加される。NPNトランジスタ502のエミッタは直接
接地され、NPNトランジスタ502のコレクタはフラ
ッシュメモリ104の最上位桁アドレス端子に直接接続
される。さらに、メインプロセッサの第18番目のアド
レスバスA17は第2の抵抗503を介してNPNトラ
ンジスタ502のコレクタに接続される。
The address control signal a output from the digital output port of the communication coprocessor 102 is applied to the base of the NPN transistor 502 via the first resistor 501. The emitter of NPN transistor 502 is directly grounded, and the collector of NPN transistor 502 is directly connected to the most significant digit address terminal of flash memory 104. Further, the eighteenth address bus A17 of the main processor is connected to the collector of the NPN transistor 502 via the second resistor 503.

【0032】図7は第2の実施形態におけるメモリマッ
プであって、メインプロセッサは論理アドレスで(00
0000)H 〜(FFFFFF)H でアクセスできる1
8メガバイトのメモリ空間を有する。そして、物理アド
レスが(00000)H 〜(3FFFF)H である25
6キロバイトのフラッシュメモリ104はメインプロセ
ッサの論理アドレス(FFC000)H 〜(FFFFF
F)H に割当てられ、物理アドレスが(00000)H
〜(1FFFF)H である128キロバイトのRAM1
05はメインプロセッサの論理アドレスで(40000
0)H 〜(41FFFF)H に割当てられている。従っ
て、フラッシュメモリ104及びRAM105はメイン
プロセッサのアドレスバスの下位18ビット(A0〜A
17)を使用してアクセスすることが可能である。
FIG. 7 shows a memory map according to the second embodiment.
0000) H- (FFFFFF) 1 accessible by H
It has 8 megabytes of memory space. The physical address is (00000) H to (3FFFF) H 25
The 6-Kbyte flash memory 104 stores logical addresses (FFC000) H to (FFFFF) of the main processor.
F) Allocated to H and the physical address is (00000) H
~ (1FFFF) H , 128 kilobytes of RAM1
05 is the logical address of the main processor (40000)
0) H to (41FFFF) H Therefore, the flash memory 104 and the RAM 105 store the lower 18 bits (A0 to A0) of the address bus of the main processor.
17) can be accessed.

【0033】そしてメインプロセッサのアドレスバスの
上位2ビット(A22,A23)はアドレスデコーダ1
03に入力され、メインプロセッサ100が使用するメ
モリをフラッシュメモリ104とRAM105の間で切
り換えるために使用される。即ち、(A22,A23)
が "L,H" である場合はアドレスレコーダはフラッシ
ュメモリ104にディスエーブル(disable )信号を出
力し、RAM105にエーブル(able)信号を出力す
る。そして(A22,A23)が "H,H" である場合
はアドレスレコーダはフラッシュメモリ104にエーブ
ル信号を出力し、RAM105にディスエーブル信号を
出力する。
The upper two bits (A22, A23) of the address bus of the main processor are stored in the address decoder 1
03 is used to switch the memory used by the main processor 100 between the flash memory 104 and the RAM 105. That is, (A22, A23)
Is "L, H", the address recorder outputs a disable signal to the flash memory 104, and outputs an enable signal to the RAM 105. When (A22, A23) is "H, H", the address recorder outputs an enable signal to the flash memory 104 and outputs a disable signal to the RAM 105.

【0034】さらにフラッシュメモリ104はそれぞれ
の容量が128キロバイトである領域1と領域2に区分
されており、領域1は論理アドレス(FFE000)H
〜(FFFFFF)H を有し、領域2は論理アドレス
(FFC000)H 〜(FFDFFF)H を有する。な
お、通常状態においては領域1及び領域2には同一のプ
ログラムが記憶されている。
The flash memory 104 is further divided into an area 1 and an area 2 each having a capacity of 128 kilobytes, and the area 1 has a logical address (FFE000) H
To (FFFFFF) H , and the area 2 has logical addresses (FFC000) H to (FFDFFF) H. In the normal state, the same program is stored in the area 1 and the area 2.

【0035】上記構成において、通信コプロセッサ10
2から出力されるアドレス制御信号aが "L" であれば
NPNトランジスタ502はオフ状態となるため、メイ
ンプロセッサから出力されるアドレスバスの第18番目
のビットA17が "H" であるときには領域1にアクセ
ス可能となり、 "L" であるときには領域2にアクセス
可能となる。通常状態においてはメインプロセッサ10
0はフラッシュメモリ104の領域1に記憶されたプロ
グラムを使用して処理を実行するため、メインプロセッ
サはアドレスバスの第18番目のビットA17として
"H" を出力する。
In the above configuration, the communication coprocessor 10
2 is "L", the NPN transistor 502 is turned off. Therefore, when the 18th bit A17 of the address bus output from the main processor is "H", the area 1 Can be accessed, and when it is "L", the area 2 can be accessed. In the normal state, the main processor 10
0 executes the process using the program stored in the area 1 of the flash memory 104, so that the main processor sets the 18th bit A17 of the address bus as
"H" is output.

【0036】逆に通信コプロセッサ102から出力され
るアドレス制御信号aが "H" であればNPNトランジ
スタ502はオン状態となり、アドレスバスの第18番
目のビットA17は強制的に "L" となるため、メイン
プロセッサは領域2に対してだけアクセス可能となる。
ここで、フラッシュメモリ104の領域1にはメインプ
ロセッサ制御用プログラム(第1版)V1 が、領域2に
はメインプロセッサ制御用プログラム(第0版)V0
記憶されており、制御用プログラムを第2版V2 にバー
ジョンアップするために、ホストコンピュータ12から
ケーブル13および通信コプロセッサ102を介してダ
ウンロード中に障害が発生し、メインプロセッサ制御用
プログラム第2版V2 のダウンロードが正常に行われな
かった場合を想定する。
Conversely, if the address control signal a output from the communication coprocessor 102 is "H", the NPN transistor 502 is turned on, and the 18th bit A17 of the address bus is forced to "L". Therefore, the main processor can access only the area 2.
Here, the main processor control program (first edition) V 1 is stored in the area 1 of the flash memory 104, and the main processor control program (zero edition) V 0 is stored in the area 2 of the flash memory 104. in order to upgrade to the second version V 2, failure occurred during downloading from the host computer 12 through the cable 13 and CC 102, successfully download main processor control program 2nd edition V 2 Suppose that it was not done.

【0037】図8はメインプロセッサ100で実行され
る第1のプログラム書換えルーチンのフローチャートで
あって、メインプロセッサ制御用プログラムの書換えが
必要となった時点で割り込み処理として実行される。即
ち、書換え要求が発生すると、まずステップ8Aでアド
レス制御信号aが "L" であるか、即ちメインプロセッ
サ100がアクセス可能なフラッシュメモリ104の領
域が領域1であるかを判定する。
FIG. 8 is a flowchart of a first program rewriting routine executed by the main processor 100, which is executed as an interrupt process when the main processor control program needs to be rewritten. That is, when a rewrite request occurs, it is first determined in step 8A whether the address control signal a is "L", that is, whether the area of the flash memory 104 accessible by the main processor 100 is the area 1.

【0038】ステップ8Aで肯定判定されたとき、即ち
メインプロセッサ100がフラッシュメモリ104の領
域1にアクセス可能であるときは、ステップ8Bで制御
プログラムコピールーチンを実行する。図9は制御プロ
グラムコピールーチンの詳細フローチャートであって、
ステップ8B1でフラッシュメモリ104の領域1に記
憶されているコピールーチンをRAM105のコピーす
る。そして、ステップ8B2でメインプロセッサ100
のタスク制御をRAM105に移行させて、メインプロ
セッサ100がRAM105に記憶されているコピール
ーチンを実行できる状態とした後、ステップ8B3でフ
ラッシュメモリ104の領域1に記憶されているメイン
プロセッサ制御用プログラム(第1版)V1 をフラッシ
ュメモリ104の領域2にコピーしてこのルーチンを終
了する。
When an affirmative determination is made in step 8A, that is, when the main processor 100 can access the area 1 of the flash memory 104, a control program copy routine is executed in step 8B. FIG. 9 is a detailed flowchart of the control program copy routine,
In step 8B1, the copy routine stored in the area 1 of the flash memory 104 is copied to the RAM 105. Then, in step 8B2, the main processor 100
Is transferred to the RAM 105 so that the main processor 100 can execute the copy routine stored in the RAM 105. Then, in step 8B3, the main processor control program (which is stored in the area 1 of the flash memory 104) is executed. copy the first edition) V 1 in the region 2 of the flash memory 104 to end the routine.

【0039】次に、ステップ8C(図8)でコピーが正
常に行われたかを、領域2についてパリティチェックに
よって判定する。ステップ8Cで肯定判定されたとき、
即ちコピーが正常に行われたと判定されたときは、ステ
ップ8Dに進みダウンロードルーチンを実行する。図1
0はダウンロードルーチンの詳細フローチャートであっ
て、ステップ8D1でメインプロセッサ100のタスク
制御をフラッシュメモリ104に移行させた後、ステッ
プ8D2で制御用プログラムを第2版V2 をホストコン
ピュータ12からRAM105にダウンロードする。ス
テップ8D3で、再びフラッシュメモリ104の領域1
に記憶されているコピールーチンをRAM105のコピ
ーした後、ステップ8D4でタスク制御をRAM105
に移行させ、ステップ8D5でRAM105にダウンロ
ードされた制御用プログラム第2版V2 をフラッシュメ
モリ104の領域1にコピーして、このルーチンを終了
する。
Next, in step 8C (FIG. 8), it is determined whether or not the copying has been normally performed by performing a parity check on the area 2. When a positive determination is made in step 8C,
That is, when it is determined that the copy has been normally performed, the process proceeds to step 8D to execute the download routine. FIG.
0 is a detailed flowchart of download routine, downloaded After migration task control of the main processor 100 to the flash memory 104 in step 8D1, a control program at step 8D2 Second Edition V 2 from the host computer 12 to the RAM105 I do. In step 8D3, the area 1 of the flash memory 104 is again
After the copy routine stored in the RAM 105 is copied to the RAM 105, task control is performed in the RAM 105 in step 8D4.
It is shifted to, and copy the downloaded control program 2nd edition V 2 in the region 1 of the flash memory 104 to the RAM105 in step 8D5, the routine ends.

【0040】ステップ8E(図8)で領域1についてパ
リティチェックを実行することにより領域1へのコピー
が正常に行われたかを判定する。ステップ8Eで肯定判
定されたとき、即ち領域1へのコピーが正常に実行され
たときはステップ8Fにおいて通信コプロセッサ102
に正常ステータスを送信してこのルーチンを終了する。
一方、ステップ8C及びステップ8Eで否定判定された
とき、即ちコピーが正常に実行されなかったときは、ス
テップ8Gにおいて通信コプロセッサ102に異常ステ
ータスを送信してこのルーチンを終了する。
In step 8E (FIG. 8), a parity check is performed on area 1 to determine whether copying to area 1 has been performed normally. When an affirmative determination is made in step 8E, that is, when copying to the area 1 has been normally executed, the communication coprocessor 102 is executed in step 8F.
, And terminates this routine.
On the other hand, when a negative determination is made in steps 8C and 8E, that is, when the copy is not normally executed, an abnormal status is transmitted to the communication coprocessor 102 in step 8G, and this routine ends.

【0041】図11は通信コプロセッサ102で実行さ
れるコプロセッサルーチンのフローチャートであって、
メインプロセッサ制御用プログラムの書換えが必要とな
った時点で割り込み処理として実行される。まず、ステ
ップ11Aでメインプロセッサ診断ルーチンを実行す
る。図12はメインプロセッサ診断ルーチンの詳細フロ
ーチャートであって、ステップ11A1でメインプロセ
ッサから送信されるステータスの受信を開始し、ステッ
プ11A2でステータスを受信したかを判定する。
FIG. 11 is a flowchart of a coprocessor routine executed by the communication coprocessor 102.
This is executed as interrupt processing when the main processor control program needs to be rewritten. First, a main processor diagnosis routine is executed in step 11A. FIG. 12 is a detailed flowchart of the main processor diagnosis routine. In step 11A1, the reception of the status transmitted from the main processor is started, and in step 11A2, it is determined whether the status has been received.

【0042】ステップ11A2で肯定判定されたとき、
即ちステータスを受信したときには、ステップ11A3
で受信したステータスが正常ステータスかを判定する。
そして、ステップ11A3で肯定判定されたとき、即ち
正常ステータスを受信したときは、ステップ11A4で
メインプロセッサにおいてダウンロードが正常に完了し
たか否かを示すフラグMSをダウンロードが正常に完了
したことを表す "1"に設定してこのルーチンを終了す
る。
When an affirmative determination is made in step 11A2,
That is, when the status is received, step 11A3
It is determined whether the status received in is normal status.
When an affirmative determination is made in step 11A3, that is, when the normal status is received, a flag MS indicating whether or not the download has been normally completed in the main processor indicates in step 11A4 that the download has been normally completed. 1 is set, and this routine ends.

【0043】ステップ11A2で否定判定されたとき、
即ちステータスを受信していないときは、ステップ11
A5でステータスの受信を開始してからフラッシュメモ
リからRAMへのコピー時間又は制御用プログラムのダ
ウンロード時間に基づいて設定された所定時間が経過し
たかを判定する。ステップ11A5で否定判定されたと
き、即ちステータスの受信を開始してから所定時間が経
過していないときはステップ11A2に戻り、ステータ
ス受信のための待機状態を継続する。
When a negative determination is made in step 11A2,
That is, if the status has not been received, step 11
It is determined whether a predetermined time set based on a copy time from the flash memory to the RAM or a download time of the control program has elapsed since the start of the status reception in A5. If a negative determination is made in step 11A5, that is, if the predetermined time has not elapsed since the start of status reception, the process returns to step 11A2, and the standby state for status reception is continued.

【0044】ステップ11A5で肯定判定されたとき、
即ちステータスの受信を開始してから所定時間が経過し
たとき、並びにステップ11A3で否定判定されたと
き、即ち異常ステータスを受信したときは、ステップ1
1A6でフラグMSをダウンロードが正常に完了しなか
ったことを表す "0" に設定してこのルーチンを終了す
る。
When an affirmative determination is made in step 11A5,
That is, when a predetermined time has elapsed since the start of status reception, and when a negative determination is made in step 11A3, that is, when an abnormal status is received, step 1
At 1A6, the flag MS is set to "0" indicating that the download has not been completed normally, and the routine ends.

【0045】ステップ11B(図11)でメインプロセ
ッサにおいてダウンロードが正常に行われたかをフラグ
の設定に基づいて判定する。ステップ11Bで否定判定
されたとき、即ちメインプロセッサにおいて制御用プロ
グラム第2版V2 のダウンロードが正常に行われなかっ
たときは、ステップ11Cでメモリ領域切り換えルーチ
ンを実行する。
In step 11B (FIG. 11), it is determined whether or not the download was normally performed in the main processor based on the setting of the flag. If a negative determination is made in step 11B, that is, when the download control program 2nd edition V 2 is not normally performed in the main processor executes memory area switching routine at step 11C.

【0046】図13はメモリ領域切り換えルーチンの詳
細フローチャートであって、ステップ11C1でメイン
プロセッサをリセット状態するために通信コプロセッサ
102のリセット信号出力端子を介してリセット信号を
"L" レベルに設定する。メインプロセッサ100をリ
セット状態とした後、ステップ11C2でアドレス制御
信号を "H" レベルとし、メインプロセッサがアクセス
するフラッシュメモリ104の領域を領域2に切り換え
る。
FIG. 13 is a detailed flowchart of the memory area switching routine. In step 11C1, a reset signal is output via the reset signal output terminal of the communication coprocessor 102 to reset the main processor.
Set to "L" level. After resetting the main processor 100, the address control signal is set to "H" level in step 11C2, and the area of the flash memory 104 accessed by the main processor is switched to area 2.

【0047】その後、ステップ11C3で通信コプロセ
ッサ102のリセット信号出力端子を介してリセット信
号を "H" レベルとしてメインプロセッサ100を動作
状態として、このルーチンを終了する。すると、メイン
プロセッサは再度図8のダウンロードルーチンの実行を
開始するが、今回はアドレス制御信号が "H" レベルで
あるのでステップ8Aにおいて否定判定され直接ステッ
プ8Dに進み、制御用プログラム第2版V2 がRAM1
05に再度ダウンロードされる。ステップ8Eから8G
で制御用プログラム第2版V2 のダウンロードステータ
スを通信コプロセッサに送信してこのルーチンを終了す
る。通信コプロセッサはステップ11Dで図12に示す
メインプロセッサ診断ルーチンを実行してこのステータ
スを処理する。
Thereafter, in step 11C3, the reset signal is set to the "H" level via the reset signal output terminal of the communication coprocessor 102 to put the main processor 100 into an operating state, and this routine ends. Then, the main processor starts the execution of the download routine of FIG. 8 again, but this time, since the address control signal is at the "H" level, a negative determination is made in step 8A and the process directly proceeds to step 8D, where the control program second version V 2 is RAM1
05 again. Steps 8E to 8G
In the download status control program 2nd edition V 2 transmits to the communication coprocessor terminates the routine. The communication coprocessor processes this status by executing the main processor diagnostic routine shown in FIG. 12 at step 11D.

【0048】即ち、ステップ11E(図11)でメイン
プロセッサにおいてダウンロードが正常に行われたれた
かをフラグの設定に基づいて判定する。ステップ11E
で否定判定されたとき、即ちメインプロセッサにおいて
制御用プログラム第2版V2 の再ダウンロードが正常に
行われなかったときは、ステップ11Fで異常処理を実
行してこのルーチンを終了する。なお、異常処理として
は、ダウンロードを再実行する、あるいは適当な異常表
示を表示する等の処理がある。
That is, in step 11E (FIG. 11), it is determined whether the download has been normally performed in the main processor based on the setting of the flag. Step 11E
When in a negative determination, that is, when the re-download the control program 2nd edition V 2 is not normally performed in the main processor executes fault processing in step 11F and this routine is terminated. Note that the abnormal processing includes processing such as re-executing the download or displaying an appropriate abnormal display.

【0049】ステップ11B又はステップ11Eで肯定
判定されたとき、即ちメインプロセッサでダウンロード
が正常に行われたときは、ステップ11Gでアドレス制
御信号を "L" レベルとしメインプロセッサがアクセス
するフラッシュメモリ領域を領域1に戻してこのルーチ
ンを終了する。上記第2の実施形態においてはメインプ
ロセッサにおいてダウンロードが正常に行われたか否か
を通信コプロセッサによりソフトウエア的に判定してい
たが、通信コプロセッサを具備しない場合にもハードウ
エア的に判定することも可能である。
When an affirmative determination is made in step 11B or 11E, that is, when the download is normally performed in the main processor, the address control signal is set to "L" level in step 11G to change the flash memory area accessed by the main processor. The routine returns to the area 1 and the routine ends. In the second embodiment, the communication coprocessor determines whether or not the download has been normally performed in the main processor by software. However, when the communication processor is not provided, the determination is made by hardware. It is also possible.

【0050】図14は本発明に係るプログラム再書き込
み機能付きコンピュータを使用したプリンタの第3の実
施形態の構成図であって、第2の実施形態からの変更点
を説明する。即ち、通信コプロセッサ102に代わり、
リセット制御部140、時間監視部141及び第2のア
ドレス信号制御部142が使用される。
FIG. 14 is a block diagram of a third embodiment of a printer using a computer with a program rewriting function according to the present invention. Changes from the second embodiment will be described. That is, instead of the communication coprocessor 102,
A reset control unit 140, a time monitoring unit 141, and a second address signal control unit 142 are used.

【0051】図15はリセット制御部、時間監視部及び
第2のアドレス信号制御部周辺の詳細回路図、図16は
詳細回路各部の波形図であって、図15及び図16のSi
g ○は相互に対応しており、Sig 1は電源監視回路10
91から出力されるメインプロセッサリセット信号を示
している。リセット制御部140は一次遅れ回路140
1と排他的論理和ゲート1402を具備し、一次遅れ回
路1401の出力であるリセット信号Sig 2はNORゲ
ート1402の一方の入力端子に接続されている。NO
Rゲート1402の出力はダイオード1092を介して
メインプロセッサ100のリセット端子に接続されてい
る。
FIG. 15 is a detailed circuit diagram around the reset control unit, the time monitoring unit and the second address signal control unit. FIG. 16 is a waveform diagram of each part of the detailed circuit.
g ○ correspond to each other, and Sig 1 is the power supply monitoring circuit 10
9 shows a main processor reset signal output from the main processor 91. The reset control unit 140 is a primary delay circuit 140
1 and an exclusive OR gate 1402, and a reset signal Sig 2 output from the primary delay circuit 1401 is connected to one input terminal of the NOR gate 1402. NO
The output of the R gate 1402 is connected via a diode 1092 to the reset terminal of the main processor 100.

【0052】時間監視部141はORゲート1411、
タイマ1412、充電回路1413、NOT素子141
4、第1のトランジスタ1415を具備し、ORゲート
1411の第1の入力端子はメインプロセッサ100の
ウォッチドッグタイマ端子に接続されており、メインプ
ロセッサ100が正常であるときには一定周期のパルス
信号となるウォッチドッグタイマ信号Sig 3を受信す
る。
The time monitoring section 141 includes an OR gate 1411,
Timer 1412, charging circuit 1413, NOT element 141
4. A first transistor 1415 is provided, and a first input terminal of the OR gate 1411 is connected to a watchdog timer terminal of the main processor 100. When the main processor 100 is normal, a pulse signal having a constant period is generated. Receive the watchdog timer signal Sig3.

【0053】ORゲート1411の出力Sig 4はタイマ
IC1412のトリガ端子に供給されるが、ウォッチド
ッグタイマ信号Sig 3が所定周期で変化するかにより、
メインプロセッサ100が正常であるかを監視する。タ
イマIC1412の出力Sig5はメインプロセッサ10
0が正常と判定されれば "H" レベルであり、異常と判
定されれば "L" レベルとなる。タイマIC1412の
出力Sig 5はNOT素子1414で反転されて信号Sig
6となる。
The output Sig 4 of the OR gate 1411 is supplied to the trigger terminal of the timer IC 1412. Depending on whether the watchdog timer signal Sig 3 changes at a predetermined cycle,
It monitors whether the main processor 100 is normal. The output Sig5 of the timer IC 1412 is
If 0 is determined to be normal, it is at the "H" level, and if it is determined to be abnormal, it is at the "L" level. The output Sig5 of the timer IC 1412 is inverted by the NOT element 1414 and the signal Sig5 is inverted.
It becomes 6.

【0054】なお、第1のトランジスタ1415のベー
スはORゲート1411の出力Sig4に、エミッタはタ
イマIC1412のディスチャージ端子及びスレッシホ
ールド端子に接続されており、コレクタは接地されてい
る。第2のアドレス信号制御部142はフリップフロッ
プ1421、第2のトランジスタ1422及び第3のト
ランジスタ1423を具備し、フリップフロップ142
1のクロック端子にはNOT素子1414の出力が接続
される。
The base of the first transistor 1415 is connected to the output Sig4 of the OR gate 1411, the emitter is connected to the discharge terminal and the threshold terminal of the timer IC 1412, and the collector is grounded. The second address signal control unit 142 includes a flip-flop 1421, a second transistor 1422, and a third transistor 1423.
The output of the NOT element 1414 is connected to one clock terminal.

【0055】フリップフロップ1421の正転出力Qは
NORゲート1402の他の一方の入力端子に、反転出
力Q* は一次遅れ回路1401の入力に接続されてい
る。又、フリップフロップ1421の正転出力Qは第2
のトランジスタ1422のエミッタ及びメインプロセッ
サ100のディジタル入力ポートにも接続される。第2
のトランジスタ1422のコレクタは抵抗を介して第3
のトランジスタ1423のベースに、ベースは抵抗分割
回路を介してメインプロセッサ100のディジタル出力
ポートに接続される。そして、第3のトランジスタ14
23のエミッタは接地され、コレクタはフラッシュメモ
リ104の最上位桁アドレス端子に直接接続されるとと
もに抵抗を介してメインプロセッサ100のアドレスバ
スの最上位桁端子A17にも接続される。
The non-inverted output Q of the flip-flop 1421 is connected to the other input terminal of the NOR gate 1402, and the inverted output Q * is connected to the input of the primary delay circuit 1401. The normal output Q of the flip-flop 1421 is
And the digital input port of the main processor 100. Second
The collector of the transistor 1422 is connected to the third
The base of the transistor 1423 is connected to a digital output port of the main processor 100 via a resistance dividing circuit. Then, the third transistor 14
The emitter of 23 is grounded, and the collector is directly connected to the most significant digit address terminal of the flash memory 104 and also to the most significant digit terminal A17 of the address bus of the main processor 100 via a resistor.

【0056】図17はメインプロセッサ100で実行さ
れる第2のプログラム書換えルーチンのフローチャート
であって、メインプロセッサ制御用プログラムの書換え
が必要となった時点で割り込み処理として実行される。
大部分の処理は第2のプログラム書換えルーチン(図
8)と同一であるので相違点のみを説明する。即ち、ス
テップ8Eでコピーが正常に行われたときは、ステップ
16Aでディジタル出力ポートから出力されるアクセス
制御信号Sig 13を "L" レベルに設定してこのルーチ
ンを終了する。逆に、ステップ8C及びステップ8Eで
否定判定されたとき、即ちコピーが正常に行われなかっ
たときは、ステップ16Bでアクセス制御信号Sig 13
を "H" レベルに設定し、ステップ16Cで内部リセッ
トをかけてこのルーチンを終了する。
FIG. 17 is a flowchart of a second program rewriting routine executed by the main processor 100. This routine is executed as an interrupt process when the main processor control program needs to be rewritten.
Most of the processing is the same as the second program rewriting routine (FIG. 8), so only the differences will be described. That is, if the copying is normally performed in step 8E, the access control signal Sig13 output from the digital output port is set to "L" level in step 16A, and this routine is terminated. Conversely, when a negative determination is made in Steps 8C and 8E, that is, when copying is not performed normally, the access control signal Sig 13 is determined in Step 16B.
Is set to the "H" level, an internal reset is performed in step 16C, and this routine ends.

【0057】従って、コピーが正常に行われなかったと
きは第2のプログラム書換えルーチンが再実行される
が、この場合はステップ8Aで否定判定されステップ8
Dでプログラムが再度ダウンロードされる。プログラム
のダウンロードによりダウンロードルーチンが実行でき
ないほどにフラッシュメモリ104の領域1の記憶内容
が破壊された場合には、時間監視部141のウオッチド
ッグタイマSig 3が周期的なパルスでなくなる。する
と、タイマIC1412の出力Sig 5が "H" に、Sig
5が "L" に遷移する(図16の時刻t1 )。
Therefore, when the copying is not performed normally, the second program rewriting routine is executed again. In this case, a negative determination is made in step 8A and step 8 is executed.
At D, the program is downloaded again. When the contents stored in the area 1 of the flash memory 104 are destroyed so that the download routine cannot be executed by downloading the program, the watchdog timer Sig3 of the time monitoring unit 141 is not a periodic pulse. Then, the output Sig5 of the timer IC 1412 becomes "H",
5 is changed to "L" (time t 1 in FIG. 16).

【0058】すると、アドレス制御部142のフリップ
フロップ1421が駆動され、正転出力Qが "H" とな
り、リセット制御部140の排他的論理和ゲート140
2の一方に入力端子に供給されるため、その出力である
リセット信号Sig 2も "H"となる。フリップフロップ
1421の反転出力Q* は "L" となり、一次遅れ回路
1401の時定数だけ遅れて排他的論理和ゲート140
2の他方の入力端子に供給されるため、リセット信号Si
g 2は所定時間後に "L" となりリセット信号はプルス
状の波形となる(図16の時刻t2 )。このリセット信
号Sig 2によってメインプロセッサ100はリセットさ
れて再実行可能となる。
Then, the flip-flop 1421 of the address control unit 142 is driven, the non-inverted output Q becomes “H”, and the exclusive OR gate 140 of the reset control unit 140
2 is supplied to the input terminal, so that the output of the reset signal Sig 2 also becomes “H”. The inverted output Q * of the flip-flop 1421 becomes “L”, and the exclusive OR gate 140 is delayed by the time constant of the primary delay circuit 1401.
2 is supplied to the other input terminal of the reset signal Si.
g 2 is to "L" reset signal after a predetermined time the Purus like waveform (time t 2 in FIG. 16). The main processor 100 is reset by the reset signal Sig 2 and can be executed again.

【0059】フリップフロップ1421の正転出力Qが
"H" となると、第2のトランジスタ1422及び第3
のトランジスタ1423によってメインプロセッサ10
0のデータアドレスの最上位ビットA17が強制的に接
地状態とされ、メインプロセッサ100はフラッシュメ
モリ104の領域2に記憶されたプログラムの実行を開
始する。
The normal output Q of the flip-flop 1421 is
When it becomes “H”, the second transistor 1422 and the third transistor 1422
Of the main processor 10 by the transistor 1423
The most significant bit A17 of the data address 0 is forcibly grounded, and the main processor 100 starts executing the program stored in the area 2 of the flash memory 104.

【0060】即ち、フラッシュメモリ104の領域2に
記憶されたダウンロードルーチンを使用して新たな制御
用プログラムをいったんRAM105にダウンロードす
る。そして領域2に記憶されたコピールーチンをRAM
105にコピーした後タスク制御をRAM105に遷移
し、RAM105に記憶された新たな制御用プログラム
をフラッシュメモリ104の領域1にコピーし、アドレ
ス制御信号を "H" に設定してダウンロード処理は完了
する。
That is, a new control program is temporarily downloaded to the RAM 105 using the download routine stored in the area 2 of the flash memory 104. Then, the copy routine stored in area 2 is stored in RAM
After copying to the RAM 105, the task control is shifted to the RAM 105, the new control program stored in the RAM 105 is copied to the area 1 of the flash memory 104, the address control signal is set to "H", and the download process is completed. .

【0061】なお、フリップフロップ1421の正転出
力Qが "H" で、メインプロセッサ100のデータアド
レスの最上位ビットA17が強制的に接地状態とされて
いる間は時間監視部141のORゲート1411の他方
の端子が "H" に維持されるため、タイマIC1412
によりウオッチドッグ信号Sig 3の監視は実行されな
い。
Note that while the normal output Q of the flip-flop 1421 is "H" and the most significant bit A17 of the data address of the main processor 100 is forcibly grounded, the OR gate 1411 of the time monitoring unit 141 is set. Of the timer IC 1412 is maintained at "H".
Therefore, the monitoring of the watchdog signal Sig3 is not executed.

【0062】そして、メインプロセッサ100によって
アドレス制御信号を "H" とする処理が実行されると、
ディジタル出力ポートから出力されるリセットパルスSi
g 10が "H" となり(図16の時刻t3 )、メインプ
ロセッサ100はフラッシュメモリ104の領域1に記
憶された制御用プログラムを実行する。そして、正常で
あれば図16の時刻t4 でSig 12によりタイマIC1
412及びフリップフロップ1421がリセットされ
る。
Then, when the processing for setting the address control signal to "H" is executed by the main processor 100,
Reset pulse Si output from digital output port
g10 becomes “H” (time t 3 in FIG. 16), and the main processor 100 executes the control program stored in the area 1 of the flash memory 104. Then, the timer IC1 by Sig 12 at time t 4 in FIG. 16 if normal
412 and flip-flop 1421 are reset.

【0063】以上第3の実施形態にあっては、メインプ
ロセッサが正常であるか否かをウオッチドッグ信号Sig
3に基づき判定する際の時間をコンデンサと抵抗を使用
した一次遅れ回路により決定しているが、例えばカウン
タ、コイルと抵抗、コイルとコンデンサを使用した時間
計時回路によっても代用することが可能である。また、
第2及び第3の実施形態においてはトランジスタとして
バイポーラ型トランジスタを使用しているが電界効果型
トランジスタ又は集積回路を使用できることはいうまで
もない。
In the third embodiment, whether the main processor is normal or not is determined by the watchdog signal Sig.
Although the time for the determination based on 3 is determined by a first-order lag circuit using a capacitor and a resistor, it can be substituted by, for example, a counter, a coil and a resistor, or a time counting circuit using a coil and a capacitor. . Also,
In the second and third embodiments, bipolar transistors are used as transistors, but it goes without saying that field effect transistors or integrated circuits can be used.

【0064】さらに、第2及び第3の実施形態において
は一つのフラッシュメモリを2領域に分割しているが、
各領域毎に独立したフラッシュメモリを使用してもよ
い。なお、上記の各実施形態においては、一括消去型不
揮発メモリはフラッシュメモリであるとしたが、他の形
式のメモリ、例えば、EEPROM(ElectricallyEras
able Programmable Read Only Memory )、バッテリバ
ックアップ付RAM(Random Access Memory)を適用す
ることも可能である。
In the second and third embodiments, one flash memory is divided into two areas.
An independent flash memory may be used for each area. Note that, in each of the above embodiments, the batch-erasable nonvolatile memory is a flash memory. However, other types of memory, for example, an EEPROM (Electrically Eras
It is also possible to apply a programmable programmable read only memory (RAM) and a RAM (random access memory) with a battery backup.

【0065】又ダウンロードが完全に行なわれなかった
旨をホストコンピュータに連絡する機能をメインプロセ
ッサ又はコプロセッサに持たせてもよい。
The main processor or coprocessor may have a function of notifying the host computer that the download has not been completed.

【0066】[0066]

【発明の効果】本発明に係るプログラム再書き込み機能
付コンピュータによれば、ホストコンピュータからメモ
リへのプログラムのダウンロードが正常に行われなかっ
たときは、正常に行われなかったことを自動的に検出し
て、再度ダウンロードが行われるので、全プログラムを
メモリに正しくダウンロードすることが可能となる。
According to the computer with the program rewriting function according to the present invention, when the program is not normally downloaded from the host computer to the memory, it is automatically detected that the program was not normally performed. Then, since the download is performed again, all the programs can be correctly downloaded to the memory.

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

【図1】本発明に係るプログラム再書き込み機能付コン
ピュータを適用したプリンタの第1の実施形態の構成図
である。
FIG. 1 is a configuration diagram of a first embodiment of a printer to which a computer with a program rewriting function according to the present invention is applied.

【図2】詳細回路図である。FIG. 2 is a detailed circuit diagram.

【図3】プログラム再書き込みルーチンのフローチャー
ト(1/2)である。
FIG. 3 is a flowchart (1/2) of a program rewriting routine.

【図4】プログラム再書き込みルーチンのフローチャー
ト(2/2)である。
FIG. 4 is a flowchart (2/2) of a program rewriting routine.

【図5】本発明に係るプログラム再書き込み機能付コン
ピュータを適用したプリンタの第2の実施形態の構成図
である。
FIG. 5 is a configuration diagram of a second embodiment of a printer to which a computer with a program rewriting function according to the present invention is applied.

【図6】第1のアドレス信号制御部回りの詳細構成図で
ある。
FIG. 6 is a detailed configuration diagram around a first address signal control unit.

【図7】メモリマップである。FIG. 7 is a memory map.

【図8】第1のプログラム書換えルーチンのフローチャ
ートである。
FIG. 8 is a flowchart of a first program rewriting routine.

【図9】制御プログラムコピールーチンの詳細フローチ
ャートである。
FIG. 9 is a detailed flowchart of a control program copy routine.

【図10】ダウンロードルーチンの詳細フローチャート
である。
FIG. 10 is a detailed flowchart of a download routine.

【図11】コプロセッサのフローチャートである。FIG. 11 is a flowchart of a coprocessor.

【図12】メインプロセッサ診断ルーチンの詳細フロー
チャートである。
FIG. 12 is a detailed flowchart of a main processor diagnosis routine.

【図13】メモリ切り換えルーチンの詳細フローチャー
トである。
FIG. 13 is a detailed flowchart of a memory switching routine.

【図14】本発明に係るプログラム再書き込み機能付コ
ンピュータを適用したプリンタの第3の実施形態の構成
図である。
FIG. 14 is a configuration diagram of a third embodiment of a printer to which the computer with a program rewriting function according to the present invention is applied.

【図15】リセット制御部、時間監視部及び第2のアド
レス制御部回りの詳細回路図である。
FIG. 15 is a detailed circuit diagram around a reset control unit, a time monitoring unit, and a second address control unit.

【図16】リセット制御部、時間監視部及び第2のアド
レス制御部の波形図である。
FIG. 16 is a waveform chart of a reset control unit, a time monitoring unit, and a second address control unit.

【図17】第2のプログラム書換えルーチンのフローチ
ャートである。
FIG. 17 is a flowchart of a second program rewriting routine.

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

1…プリンタ 10…制御部 100…メインプロセッサ 101…インターフェイス 102…通信コプロセッサ 103…アドレスデコーダ 104…フラッシュメモリ 105…RAM 106…アドレストランレシーバ 107…データトランレシーバ 108…コントロールトランレシーバ 109…電源監視回路 11…プリント部 110…サーマルヘッド 111…プラテン 112…駆動回路 113…モータ DESCRIPTION OF SYMBOLS 1 ... Printer 10 ... Control part 100 ... Main processor 101 ... Interface 102 ... Communication coprocessor 103 ... Address decoder 104 ... Flash memory 105 ... RAM 106 ... Ad restaurant receiver 107 ... Data transceiver receiver 108 ... Control transceiver receiver 109 ... Power supply monitoring circuit 11 printing section 110 thermal head 111 platen 112 drive circuit 113 motor

Claims (6)

【特許請求の範囲】[Claims] 【請求項1】 メインプロセッサと、 前記メインプロセッサがホストコンピュータと交信を実
行する場合に前記メインプロセッサを補助するととも
に、前記メインプロセッサをリセット状態に設定するた
めのリセット信号を出力するコプロセッサと、 前記メインプロセッサが実行するプログラムを記憶する
再書き込み可能なメモリと、 前記メインプロセッサと前記メモリとを接続するメイン
バスと、 前記コプロセッサと前記メモリとを接続する補助バス
と、 前記メインバス中に設置され、前記コプロセッサが前記
メインプロセッサをリセット状態としたときに、前記メ
インバスを非活性状態とするとともに、前記補助バス中
に設置され、前記コプロセッサが前記メインプロセッサ
をリセット状態としたときに前記補助バスを活性状態と
するバストランシーバと、を具備するプログラム再書き
込み機能付コンピュータ。
A coprocessor that assists the main processor when the main processor communicates with a host computer and that outputs a reset signal for setting the main processor to a reset state; A rewritable memory for storing a program executed by the main processor; a main bus connecting the main processor and the memory; an auxiliary bus connecting the coprocessor and the memory; Installed, when the coprocessor puts the main processor in a reset state, deactivates the main bus, and is placed in the auxiliary bus, when the coprocessor puts the main processor in a reset state. Activate the auxiliary bus Program re-write function with a computer that includes and vinegar transceiver, a.
【請求項2】 少なくとも1つのメインプロセッサと、 前記メインプロセッサがホストコンピュータと交信を実
行する場合に前記メインプロセッサを補助するととも
に、前記メインプロセッサをリセット状態に設定するた
めのリセット信号を出力する少なくとも1つのコプロセ
ッサと、 前記メインプロセッサが実行するプログラムを記憶する
ための少なくとも2つの領域を有する再書き込み可能な
メモリと、 前記少なくとも1つのメインプロセッサと前記少なくと
も1つのコプロセッサの間での双方向通信を許容するイ
ンターフェイス手段と、 前記少なくとも1つのメインプロセッサのそれぞれ内に
設置され、前記メモリ内の前記プログラムの書換えが必
要となったときに前記メモリの第1の領域に記憶された
前記プログラムを前記メモリの第2の領域に複写する複
写手段と、 前記少なくとも1つのメインプロセッサのそれぞれ内に
設置され、前記メモリの第1の領域に新たなプログラム
をダウンロードするダウンロード手段と、 前記少なくとも1つのメインプロセッサ内に新たにダウ
ンロードされたプログラムが正常であるかについての前
記インターフェイスを介しての前記コプロセッサの質問
に対し、異常である旨の応答があったとき、あるいは応
答が無かったときに前記メインプロセッサがアクセス可
能な前記フラッシュメモリの領域を領域1から領域2に
移行させるアドレス信号制御手段と、 前記少なくとも1つのメインプロセッサのそれぞれ内に
設置され、前記アドレス信号制御手段により前記メイン
プロセッサがアクセス可能な前記フラッシュメモリの領
域が領域1から領域2に移行したときに、プログラムを
再度ダウンロードする再ダウンロード手段と、を具備す
るプログラム再書き込み機能付コンピュータ。
2. At least one main processor, and at least a reset signal for setting the main processor to a reset state while assisting the main processor when the main processor executes communication with a host computer. A coprocessor; a rewritable memory having at least two areas for storing a program executed by the main processor; and a bidirectional communication between the at least one main processor and the at least one coprocessor. Interface means for permitting communication, and the program installed in each of the at least one main processor and stored in a first area of the memory when the program in the memory needs to be rewritten. The memory Copying means for copying to a second area; download means installed in each of the at least one main processor for downloading a new program to a first area of the memory; The main processor accesses when the coprocessor asks a question via the interface as to whether the newly downloaded program is normal or abnormally. Address signal control means for shifting a possible area of the flash memory from area 1 to area 2; and the flash provided in each of the at least one main processor and accessible by the main processor by the address signal control means. Memory area is area 1 And a re-downloading means for re-downloading the program when the program shifts from the area to the area 2.
【請求項3】 メインプロセッサと、 前記メインプロセッサが実行するプログラムを記憶する
ための少なくとも2つの領域を有する再書き込み可能な
メモリと、 前記メインプロセッサ内に設置され、前記メモリ内の前
記プログラムの書換えが必要となったときに前記メモリ
の第1の領域に記憶された前記プログラムを前記メモリ
の第2の領域に複写する複写手段と、 前記メインプロセッサ内に設置され、前記メモリの第1
の領域に新たなプログラムをダウンロードするダウンロ
ード手段と、 前記メインプロセッサが正常に動作しているかをウオッ
チドッグ信号が所定周期毎に変化しているかにより監視
する時間監視手段と、 前記時間監視手段により前記メインプロセッサが異常で
あると判定されたときに前記メインプロセッサがアクセ
ス可能な前記フラッシュメモリの領域を領域1から領域
2に移行させるアドレス信号制御手段と、 前記アドレス信号制御手段により前記メインプロセッサ
がアクセス可能な前記フラッシュメモリの領域が領域1
から領域2に移行したときに、前記メインプロセッサを
リセットするリセット制御手段と、を具備するプログラ
ム再書き込み機能付コンピュータ。
A main processor; a rewritable memory having at least two areas for storing a program to be executed by the main processor; a rewritable memory installed in the main processor and rewriting the program in the memory Copying means for copying the program stored in the first area of the memory to the second area of the memory when it becomes necessary; and
Download means for downloading a new program to an area, time monitoring means for monitoring whether or not the main processor is operating normally based on whether a watchdog signal changes at predetermined intervals, and the time monitoring means Address signal control means for shifting the area of the flash memory accessible by the main processor from area 1 to area 2 when it is determined that the main processor is abnormal; Possible flash memory area is area 1
And a reset control means for resetting the main processor when the program shifts from the first area to the second area.
【請求項4】 前記メモリが、一括消去型不揮発型メモ
リ(フラッシュメモリ)である請求項1から3のいずれ
か1項に記載のプログラム再書き込み機能付コンピュー
タ。
4. The computer with a program rewriting function according to claim 1, wherein said memory is a batch erasing nonvolatile memory (flash memory).
【請求項5】 前記メモリが、EEPROMである請求
項1から3のいずれか1項に記載のプログラム再書き込
み機能付コンピュータ。
5. The computer with a program rewriting function according to claim 1, wherein said memory is an EEPROM.
【請求項6】 前記メモリが、バッテリバックアップさ
れたRAMである請求項1から3のいずれか1項に記載
のプログラム再書き込み機能付コンピュータ。
6. The computer with a program rewriting function according to claim 1, wherein the memory is a battery-backed-up RAM.
JP34931599A 1999-05-13 1999-12-08 Computer with program rewrite function Expired - Fee Related JP4375857B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP34931599A JP4375857B2 (en) 1999-05-13 1999-12-08 Computer with program rewrite function

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP11-132569 1999-05-13
JP13256999 1999-05-13
JP34931599A JP4375857B2 (en) 1999-05-13 1999-12-08 Computer with program rewrite function

Publications (2)

Publication Number Publication Date
JP2001027954A true JP2001027954A (en) 2001-01-30
JP4375857B2 JP4375857B2 (en) 2009-12-02

Family

ID=26467111

Family Applications (1)

Application Number Title Priority Date Filing Date
JP34931599A Expired - Fee Related JP4375857B2 (en) 1999-05-13 1999-12-08 Computer with program rewrite function

Country Status (1)

Country Link
JP (1) JP4375857B2 (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006212840A (en) * 2005-02-02 2006-08-17 Funai Electric Co Ltd Digital composite machine and printer device
EP1703380A2 (en) 2005-03-16 2006-09-20 Fujitsu Limited Method of updating firmware in computer server systems
US8131912B2 (en) 2007-09-27 2012-03-06 Kabushiki Kaisha Toshiba Memory system
JP2012079175A (en) * 2010-10-04 2012-04-19 Nec Corp Disk array device and firmware update method for the same
US10108469B2 (en) 2014-08-05 2018-10-23 Renesas Electronics Corporation Microcomputer and microcomputer system
CN110286932A (en) * 2019-06-28 2019-09-27 海信(广东)空调有限公司 A kind of program down-loading method and device

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006212840A (en) * 2005-02-02 2006-08-17 Funai Electric Co Ltd Digital composite machine and printer device
JP4572689B2 (en) * 2005-02-02 2010-11-04 船井電機株式会社 Digital multi-function peripheral and printer device
EP1703380A2 (en) 2005-03-16 2006-09-20 Fujitsu Limited Method of updating firmware in computer server systems
US7631174B2 (en) 2005-03-16 2009-12-08 Fujitsu Limited Method of updating firmware in computer server systems
US8131912B2 (en) 2007-09-27 2012-03-06 Kabushiki Kaisha Toshiba Memory system
JP2012079175A (en) * 2010-10-04 2012-04-19 Nec Corp Disk array device and firmware update method for the same
US8713553B2 (en) 2010-10-04 2014-04-29 Nec Corporation Disk array apparatus and firmware update method therefor
US10108469B2 (en) 2014-08-05 2018-10-23 Renesas Electronics Corporation Microcomputer and microcomputer system
CN110286932A (en) * 2019-06-28 2019-09-27 海信(广东)空调有限公司 A kind of program down-loading method and device

Also Published As

Publication number Publication date
JP4375857B2 (en) 2009-12-02

Similar Documents

Publication Publication Date Title
JP2812189B2 (en) How to download the program
US6289510B1 (en) Online program-updating system and computer-readable recording medium storing a program-updating program
US5987605A (en) Methods and apparatus for dual-boot memory selection, update, and recovery in a programmable device
US6640334B1 (en) Method and apparatus of remotely updating firmware of a communication device
US5805882A (en) Computer system and method for replacing obsolete or corrupt boot code contained within reprogrammable memory with new boot code supplied from an external source through a data port
US7197613B2 (en) Nonvolatile memory
US6539474B2 (en) System and method for selectively executing different boot routines depending on whether an error is detected
US5933595A (en) Computer apparatus having electrically rewritable nonvolatile memory, and nonvolatile semiconductor memory
JP2002108720A (en) Memory card and data writing method for nonvolatile memory
JP3268130B2 (en) Data processing device using flash EEPROM
CN112947977A (en) Software online upgrading method and system
US6543008B1 (en) Computer system and program rewriting method
JP2001027954A (en) Computer with program rewriting function
US20080140920A1 (en) Microcomputer for flash memory rewriting
JP2004046453A (en) Single chip microcomputer and boot sector switching method
EP0918287B1 (en) ROM image processing when supply of electric power is interrupted
EP0939369B1 (en) Electronic equipment with external memory storing a correction program
JP2002189609A (en) System and method for updating software adapted to accident
JP2000293376A (en) Circuit and method for switching boot program
JPH1011277A (en) Computer device with electrically rewritable nonvolatile memory and nonvolatile semiconductor memory
JP2002351687A (en) Updating system for firmware of printer
JPH1011293A (en) Information processor
JP2001344156A (en) Device with flash memory and data rewriting method
JPH07122084A (en) Electronic device
JPH10133958A (en) Communication device control circuit

Legal Events

Date Code Title Description
A711 Notification of change in applicant

Free format text: JAPANESE INTERMEDIATE CODE: A712

Effective date: 20031125

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20060920

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20081201

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20090526

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20090715

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20090811

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20090908

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120918

Year of fee payment: 3

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130918

Year of fee payment: 4

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees