JPH0581205A - Electronic device - Google Patents

Electronic device

Info

Publication number
JPH0581205A
JPH0581205A JP23804691A JP23804691A JPH0581205A JP H0581205 A JPH0581205 A JP H0581205A JP 23804691 A JP23804691 A JP 23804691A JP 23804691 A JP23804691 A JP 23804691A JP H0581205 A JPH0581205 A JP H0581205A
Authority
JP
Japan
Prior art keywords
program
rom
data
erasing
electronic device
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP23804691A
Other languages
Japanese (ja)
Other versions
JP2738611B2 (en
Inventor
Yuji Takada
祐司 高田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sharp Corp
Original Assignee
Sharp Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sharp Corp filed Critical Sharp Corp
Priority to JP23804691A priority Critical patent/JP2738611B2/en
Publication of JPH0581205A publication Critical patent/JPH0581205A/en
Application granted granted Critical
Publication of JP2738611B2 publication Critical patent/JP2738611B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Abstract

PURPOSE:To provide an electronic device capable of rewriting program data without unloading a program ROM from an electronic device body in an electronic notebook provided with an F-ROM as a program storing part. CONSTITUTION:When a memory card 40 is set to the electronic device and a data erasing/writing program is transferred from an external device through a communication terminal 51b, a CPU 51 temporarily writes the program in a RAM 52. Then the CPU 51 reads out the program temporarily written in the RAM 52 and erases program data stored in a ROM 54 in accordance with the procedure of the read program. After completing program erasing processing, the CPU 51 reads out program data stored in a ROM 41 and successively writes the read program data in their corresponding addresses in the ROM 54 to rewrite the program data.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は、電子手帳等の電子装置
に関し、より詳しくは、電子装置本体に搭載された電気
的に消去可能になったプログラムROMを取り外すこと
なく、該プログラムROMへのプログラムデータの書換
えが可能になった電子装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an electronic device such as an electronic notebook, and more specifically, to an electrically erasable program ROM mounted on an electronic device main body without removing the program ROM. The present invention relates to an electronic device capable of rewriting program data.

【0002】[0002]

【従来の技術】この種の電子手帳には、プログラム格納
部としてROMが搭載される。通常、ROMとしては、
データ(プログラムデータ)の書換えは不可能であるマ
スクROMや、データの書換えは可能であるものの書換
えに手間がかかる紫外線消去型PROM等が用いられ
る。ところで、最近ではこの種のROMとしてフラッシ
ュEEPROMが多用される傾向にある。フラッシュE
EPROMは、これまでのROMに比べて書換えが簡単
に実現出来るので、定期的にバージョンアップが必要な
電子装置や、内蔵プログラムの更新、入れ替えが必要な
電子装置に対して有用なものとなるからである。
2. Description of the Related Art This type of electronic notebook has a ROM as a program storage unit. As a ROM,
A mask ROM in which data (program data) cannot be rewritten, an ultraviolet erasable PROM in which data can be rewritten but requires rewriting, and the like are used. By the way, recently, a flash EEPROM is often used as a ROM of this type. Flash E
Since the EPROM can be rewritten more easily than the conventional ROMs, it is useful for electronic devices that require periodic version upgrades and electronic devices that require internal program updates and replacements. Is.

【0003】ここで、フラッシュEEPROMとは、F
lash−ElectoricalErasable
Programable Read Only Mem
olyの略であり(以下、FーPROMと略記す
る。)、電気的に消去可能なプログラムROMである。
FーPROMは、次に記す特徴を有する半導体メモリー
である。
Here, the flash EEPROM is F
flash-ElectricalErasable
Programmable Read Only Mem
It is an abbreviation for "oly" (hereinafter abbreviated as F-PROM), and is an electrically erasable program ROM.
The F-PROM is a semiconductor memory having the following features.

【0004】全メモリ内容を数十秒で一活して消去で
きる。従って、消去時間が高速であり、また大容量の素
子の量産が可能である。
The entire memory contents can be erased by refreshing it in a few tens of seconds. Therefore, the erasing time is fast, and a large capacity element can be mass-produced.

【0005】従来の紫外線消去型PROMのような消
去窓が不要であり、消去時間も格段に高速である。因み
に、紫外線消去型PROMは10〜20分かかる。
An erasing window unlike the conventional ultraviolet erasing type PROM is not necessary, and the erasing time is extremely fast. Incidentally, the UV erasable PROM takes 10 to 20 minutes.

【0006】メモリ内容の消去と書込みは、一般のC
PUを使用して、決められた手順でアクセスするプログ
ラムを作成すれば、容易に実行出来る。
Erasing and writing of memory contents is done by general C
It can be easily executed by using PU to create a program to access in a predetermined procedure.

【0007】消去・書込み時は、12V直流電圧をV
pp端子に供給して行われる。また、通常の読み出し時は
5Vを供給している。
At the time of erasing / writing, a 12V DC voltage is applied to V
It is performed by supplying it to the pp pin. In addition, 5V is supplied during normal reading.

【0008】FーPROMのデータ消去は、電子手帳に
組込んだ状態でも、特定の直流電圧と、消去・書込みプ
ログラムを用意すれば、電子手帳のCPUで実行可能で
ある。従って、本来はFーPROMを電子手帳から外す
ことなく書換えが可能である。
The data erasure of the F-PROM can be executed by the CPU of the electronic notebook even if it is incorporated in the electronic notebook by preparing a specific DC voltage and an erasing / writing program. Therefore, originally, rewriting is possible without removing the F-PROM from the electronic notebook.

【0009】[0009]

【発明が解決しようとする課題】ところが、記憶用素子
としてFーPROMを一個のみ使用している電子手帳で
は、消去・書込みプログラムは、そのFーPROM内し
か記憶する場所がないことになる。ここで、FーPRO
Mのデータ消去は、該FーPROMの全データを一括し
て消去する機能しかない。従って、消去プログラムを実
行すれば、消去プログラム自身をも消すことになつてし
まい、その後の書込みの実行が不可能になってしまう。
つまり、FーPROMを一個のみ使用した電子手帳で
は、FーPROMを電子手帳から外すことなくデータを
書き換えることはできない。
However, in an electronic notebook which uses only one F-PROM as a storage element, the erase / write program has a place to store only in the F-PROM. Where F-PRO
The data erasing of M has only the function of erasing all the data of the F-PROM at once. Therefore, if the erasing program is executed, the erasing program itself is also erased, and it becomes impossible to execute subsequent programming.
That is, in the electronic notebook that uses only one F-PROM, the data cannot be rewritten without removing the F-PROM from the electronic notebook.

【0010】そこで、ROMとしてFーPROMを一個
のみ使用した電子手帳においては、FーPROMのデー
タ内容を書き換える場合、これまでは電子手帳よりFー
PROMを外し、専用の書込み機により消去して再書込
みを行った後、再び、電子手帳に取り付けるという煩わ
しい作業が必要であった。
Therefore, in an electronic notebook that uses only one F-PROM as a ROM, when rewriting the data content of the F-PROM, the F-PROM has been removed from the electronic notebook and erased by a dedicated writing device. After the rewriting, the troublesome work of reattaching the electronic notebook is required.

【0011】本発明は、このような従来技術の問題を解
決するものであり、その目的は、電気的に消去可能にな
ったプログラムROM(FーPROM)を電子装置本体
(手帳本体)から外すことなく、容易にプログラムデー
タを書き換えることができる電子装置を提供するもので
ある。
The present invention solves the problem of the prior art as described above, and an object thereof is to remove an electrically erasable program ROM (F-PROM) from an electronic device main body (notebook main body). The present invention provides an electronic device in which program data can be easily rewritten without the need.

【0012】[0012]

【課題を解決するための手段】本発明の電子装置は、電
気的に消去可能になったプログラムROMが搭載された
電子装置本体に、データ消去・書込み用のプログラムが
格納されたプログラム格納部とプログラムデータが書き
込まれた記憶部が搭載された外部記憶装置を接続し、該
プログラムROMに書き込まれたプログラムを消去して
該記憶部に格納されたプログラムが書換え可能になった
電子装置であって、該外部記憶装置が接続されると、該
プログラム格納部に格納された消去プログラムを起動さ
せる消去プログラム起動手段と、該消去プログラムに従
って該プログラムROMに書き込まれたプログラムを消
去するプログラムデータ消去手段と、該プログラム格納
部に格納されたプログラム書込み用のプログラムを起動
させる書込みプログラム起動手段と、該データ書込みプ
ログラムに従ってデータが消去された該プログラムRO
Mに該記憶部に格納されたプログラムデータを書込むデ
ータ書込み手段と、を備えたものであり、そのことによ
り上記目的が達成される。
An electronic device according to the present invention includes a program storage unit in which a program for erasing / writing data is stored in an electronic device main body having an electrically erasable program ROM mounted therein. An electronic device in which an external storage device equipped with a storage unit in which program data is written is connected, the program stored in the program ROM is erased, and the program stored in the storage unit is rewritable. , An erasing program starting means for activating an erasing program stored in the program storage section when the external storage device is connected, and a program data erasing means for erasing the program written in the program ROM according to the erasing program , A writing program for activating a program for writing the program stored in the program storage section Ram activation means and, the program data in accordance with said data write program is erased RO
M is provided with a data writing unit for writing the program data stored in the storage unit, whereby the above object is achieved.

【0013】[0013]

【作用】上記システム構成によればプログラムROM、
又は電子装置本体に装備される通信端子を介して、電子
装置本体内に搭載された記憶手段にデータ消去・書込み
プログラムが転送され、かつ外部記憶装置が電子装置本
体にセットされると、制御手段が該データ消去・書き込
みプログラムに従って、まずプログラムROMに格納さ
れたプログラムデータを消去する。続いて外部記憶装置
に搭載された記憶部に格納されたプログラムとデータを
読み出し、次いで、読み出したプログラムデータをプロ
グラムROMの該当する番地に順次書込んで行く。これ
により、プログラムROMを電子装置本体から取り外す
ことなく、プログラムデータの書換えが行れる。
According to the above system configuration, the program ROM,
Alternatively, when the data erasing / writing program is transferred to the storage means mounted in the electronic device main body through the communication terminal provided in the electronic device main body and the external storage device is set in the electronic device main body, the control means First erases the program data stored in the program ROM according to the data erasing / writing program. Then, the program and data stored in the storage unit mounted on the external storage device are read out, and then the read program data are sequentially written into the corresponding addresses of the program ROM. As a result, the program data can be rewritten without removing the program ROM from the electronic apparatus main body.

【0014】[0014]

【実施例】以下に本発明を実施例について説明する。EXAMPLES The present invention will be described below with reference to examples.

【0015】本発明の電子装置の一例である電子手帳1
は、図1に示すように手帳本体10と、これに対して開
閉可能になったカバー20とを有し、両者は電気的に接
続されている。手帳本体10には表示部11やカード操
作用キー13等が設けられる。一方、カバー20にはテ
ンキー23等からなるキー入力部51aが設けられてい
る。加えて、手帳本体10の下端面には挿入孔(カード
スロット)14が形成されており、外部記憶装置として
のメモリカード40が挿入・取り出し自在になってい
る。メモリカード40を挿入孔14に挿入すると、これ
の先端縁に設けたコネクタ30が挿入孔14の内奥部に
形成された雌コネクターに接続され、これによりメモリ
カード40と電子手帳1が電気的に接続される。
An electronic notebook 1 which is an example of the electronic device of the present invention.
As shown in FIG. 1, it has a notebook body 10 and a cover 20 that can be opened and closed with respect to the notebook body 10, and both are electrically connected. The notebook body 10 is provided with a display unit 11, a card operation key 13, and the like. On the other hand, the cover 20 is provided with a key input section 51a including a ten-key pad 23 and the like. In addition, an insertion hole (card slot) 14 is formed in the lower end surface of the notebook body 10 so that a memory card 40 as an external storage device can be inserted and taken out. When the memory card 40 is inserted into the insertion hole 14, the connector 30 provided at the leading edge of the memory card 40 is connected to the female connector formed inside the insertion hole 14, whereby the memory card 40 and the electronic notebook 1 are electrically connected. Connected to.

【0016】図2は電子手帳1およびこれに接続される
メモリカード40の回路構成を示す。手帳本体10に装
備されるCPU51は、このシステムの制御中枢とな
り、以下に示す各種の制御を行う。例えば、キー入力部
51aを介してオペレータによりデータが入力される
と、CPU51はROM54に格納された制御プログラ
ムに従ってこの入力データをRAM52に一旦書き込
む。RAM52に一旦書き込まれたデータはCPU51
によりその後読み出され、例えばドットマトリックス構
成の液晶表示装置からなる表示部11に表示される。こ
の表示動作は表示回路12を介して行われる。
FIG. 2 shows a circuit configuration of the electronic notebook 1 and the memory card 40 connected thereto. The CPU 51 equipped in the notebook main body 10 serves as a control center of this system and performs various controls described below. For example, when data is input by the operator via the key input unit 51a, the CPU 51 once writes this input data in the RAM 52 according to the control program stored in the ROM 54. The data once written in the RAM 52 is the CPU 51
After that, it is read out and displayed on the display unit 11 which is, for example, a liquid crystal display device having a dot matrix configuration. This display operation is performed via the display circuit 12.

【0017】ROM54は上記したFーPROMからな
り、各種制御用のプログラムコードが格納されており、
該プログラムコードは、後述するようにして書換え可能
になっている。この書換えはバージョンアップ等を行う
際に行われる。
The ROM 54 is composed of the above-mentioned F-PROM and stores program codes for various controls.
The program code can be rewritten as described later. This rewriting is performed when updating the version.

【0018】電源制御部53は、CPU51からの制御
信号によりROM54に格納された制御用のプログラム
コードの書換え時、すなわち該プログラムコードの消去
・書込み時に必要な12V直流電圧をROM54へ供給
する制御を行う。この直流電圧12Vは内部で作り出さ
れるか、あるいは、外部より電源アダプター等でジヤッ
ク53aを介して供給される。
The power supply control unit 53 controls the supply of the 12V DC voltage necessary for rewriting the control program code stored in the ROM 54 by the control signal from the CPU 51, that is, for erasing / writing the program code to the ROM 54. To do. This DC voltage of 12 V is generated internally or is externally supplied through a jack 53a with a power supply adapter or the like.

【0019】メモリカード40の回路構成は以下の通り
である。コネクタ30には、CPU51がメモリカード
40内のROM41にアクセス出来るアドレスバスやデ
ータバス等の信号線が接続されている。ROM41に
は、プログラム書換用のプログラムデータが格納されて
いる。
The circuit configuration of the memory card 40 is as follows. Signal lines such as an address bus and a data bus that allow the CPU 51 to access the ROM 41 in the memory card 40 are connected to the connector 30. The ROM 41 stores program data for program rewriting.

【0020】ROM54に格納されたプログラムコード
の書換えは、メモリカード40のROM41に搭載され
た消去・書込みプログラムに従ってCPU51が行う。
以下に、プログラムコードの書き換えにおけるCPU5
1の制御手順を、図3から図5に示すフローチャートに
従って説明する。
Rewriting of the program code stored in the ROM 54 is performed by the CPU 51 according to an erasing / writing program installed in the ROM 41 of the memory card 40.
Below, the CPU 5 in rewriting the program code
The control procedure of No. 1 will be described with reference to the flowcharts shown in FIGS.

【0021】CPU51は、図3に示すメインフローが
スタートすると、まず、ステップL1でメモリカード4
0が電子手帳1にセットされたかどうかを判定する。セ
ツトされたことを確認すると、CPU51はステップL
2で通信端子51bを介して外部装置からデータ消去・
書込みプログラムのプログラムデータが転送されて来た
かどうかを判定する。転送されて来たことを確認すると
該プログラムデータをRAM52に一担書き込む。
When the main flow shown in FIG. 3 starts, the CPU 51 firstly executes the memory card 4 in step L1.
It is determined whether 0 is set in the electronic notebook 1. When confirming that the setting has been made, the CPU 51 proceeds to step L.
2 erases data from an external device via the communication terminal 51b.
It is determined whether the program data of the writing program has been transferred. When it is confirmed that the program data has been transferred, the program data is written in the RAM 52.

【0022】次いで、ステップL3でRAM52に一担
書き込まれたデータ消去・書込み用のプログラムの読み
込みを開始し、制御内容をデータ消去・書込みプログラ
ムに従った制御内容に切り換える。
Then, in step L3, the reading of the data erasing / writing program which is written in the RAM 52 is started, and the control content is switched to the control content in accordance with the data erasing / writing program.

【0023】次いで、CPU51はステップL4でプロ
グラム制御により、電源制御部53に制御信号を発し、
当初5Vの直流電圧が印加されていたROM54のVpp
端子に12Vの直流電圧を印加する。なお、電子手帳1
が12Vの直流電圧の供給回路を装備していない場合は
外部電源より供給される。次に、CPU51はステップ
L5で消去プログラムに従ってROM54のプログラム
コードを消去する消去処理のサブルーチンを実行する。
このサブルーチンの内容は図4に示される。
Next, the CPU 51 issues a control signal to the power supply control section 53 by program control in step L4,
Vpp of ROM54 which was initially applied with a DC voltage of 5V
A DC voltage of 12V is applied to the terminals. In addition, electronic notebook 1
Is not equipped with a DC voltage supply circuit of 12V, it is supplied from an external power source. Next, in step L5, the CPU 51 executes an erasing process subroutine for erasing the program code in the ROM 54 according to the erasing program.
The contents of this subroutine are shown in FIG.

【0024】以下に、その詳細を説明する。CPU51
は12Vの直流電圧がROM54のVpp端子に印加され
たことを確認すると、まずステップM1でROM54の
メモリ領域に格納された全バイト分のデータ読み出しを
順次行い、読み出した全バイトに00を書き込む(M
2)。すなわち、このステップM1からM2での処理で
は、全番地を順に読出して、00でない番地があれば、
そこに00を書込んで最終的に全バイトを00にするル
ーチンである。次いで、CPU51はステップM3でn
を0にセットする。ここで、nはステップM4 M13
及びM13で示される消去処理のトライ回数であり、デ
ータ消去が行われない場合は、ステップM4でトライ回
数nをn+1にインクリメントし、消去処理をリトライ
する。このトライ回数nは、ステップM13に示すよう
に、例えばn=1000に設定されており、消去処理が
行えない場合はステップM4〜M10及びM14で示さ
れるルーチンを1000回繰り返す。
The details will be described below. CPU51
After confirming that the DC voltage of 12 V is applied to the Vpp terminal of the ROM 54, first, in step M1, data of all bytes stored in the memory area of the ROM 54 is sequentially read, and 00 is written in all the read bytes ( M
2). That is, in the processing in steps M1 to M2, all addresses are sequentially read, and if there is an address other than 00,
This is a routine in which 00 is written there and finally all bytes are set to 00. Next, the CPU 51 executes n in step M3.
Is set to 0. Here, n is the step M4 M13
And M13, the number of tries of the erasing process is not performed, and if the data erasing is not performed, the number of tries n is incremented to n + 1 in step M4, and the erasing process is retried. The number of tries n is set to, for example, n = 1000 as shown in step M13. If the erasing process cannot be performed, the routine shown in steps M4 to M10 and M14 is repeated 1000 times.

【0025】以下にその内容を説明する。CPU51
は、まずステップM5でROM54にイレースコマンド
を2回入力する。そうすると、ステップM6で示される
待機時間9.5ns経過後にROM54の全データが一
括して消去されるので、待機時間が経過したことを確認
すると、次にステップM7でアドレスを先頭番地に設定
し、全データが一括消去されたことを番地毎に確認する
処理を開始する。
The contents will be described below. CPU51
First, in step M5, the erase command is input to the ROM 54 twice. Then, after the waiting time of 9.5 ns shown in step M6, all the data in the ROM 54 is erased at once, so if it is confirmed that the waiting time has passed, the address is set to the head address in step M7. A process for confirming that all data has been erased at once is started.

【0026】すなわち、まずステップM8でROM54
にイレースベリファイコマンド(消去確認コマンド)及
びアドレス情報を入力する。そうすると、待機時間6.
5μs経過後に(M9)、ROM54より該当する番地
のデータが消去されたか否かを示す応答信号が送信され
てくるので、この応答信号によりステップM10でベリ
ファイOK(消去OK)かどうかを判定する。
That is, first, in step M8, the ROM 54
Input the erase verify command (erase confirmation command) and address information to. Then, the waiting time 6.
After a lapse of 5 μs (M9), a response signal indicating whether or not the data at the corresponding address has been erased is transmitted from the ROM 54. Based on this response signal, it is determined at step M10 whether verification is OK (erase OK).

【0027】消去されていないことを確認すると、次に
ステップM13でトライ回数nが1000回に達してい
るか否かを判定し、達していない場合はステップM4に
進み、ここでトライ回数nをn+1にインクリメント
し、上記同様の処理を再行する。
When it is confirmed that the number of tries has not been erased, it is then determined in step M13 whether or not the number of tries n has reached 1000 times. If not, the process proceeds to step M4, where the number of tries n is n + 1. Is incremented, and the same processing as above is performed again.

【0028】一方、ステップM13でトライ回数nが1
000回に達している場合は、ステップM14に進み、
フェイル処理を実行しメインフローにリターンする。フ
ェイル処理を行った場合は、ステップL6で示される書
込み処理のサブルーチンを行わず、ステップL7でRO
M54のVpp端子に印加される直流電圧を12Vから5
Vに降下する。次いで、ステップL8で正常終了でない
と判定し、表示部11にフェイル表示を行い(L1
0)、オペレータにその旨を報じる。そして、ステップ
L11でメモリカード40が取り外されたことを確認す
ると、この処理を終了する。
On the other hand, at step M13, the number of tries n is 1
If the number has reached 000, proceed to step M14,
Executes fail processing and returns to the main flow. When the fail process is performed, the write process subroutine shown in step L6 is not performed, and RO is performed in step L7.
The DC voltage applied to the Vpp terminal of M54 changes from 12V to 5
Descend to V. Next, in step L8, it is determined that the process has not ended normally, and a fail display is displayed on the display unit 11 (L1
0), notify the operator to that effect. When it is confirmed in step L11 that the memory card 40 has been removed, this process ends.

【0029】一方、ステップM10でベリファイOKで
あると判定すると、次にステップM11で消去確認のた
めの番地が最終アドレスになったかどうかを判定し、最
終アドレスであることを確認すると、メインフローにリ
ターンし、次に述べる書込み処理のサブルーチンを実行
する。
On the other hand, if it is determined in step M10 that the verification is OK, then in step M11 it is determined whether or not the address for erasure confirmation has reached the final address. After returning, the write processing subroutine described below is executed.

【0030】これに対して、最終アドレスでないと判定
した場合は、次順のアドレスの消去確認を行うべく(M
12)、ステップM8以降の処理を再行する。
On the other hand, if it is determined that the address is not the final address, the erase confirmation of the next address is performed (M
12), The process after step M8 is performed again.

【0031】次に、書込み処理のサブルーチンについて
説明する。このサブルーチンがスタートすると、CPU
51はまずステップN1でROM54の先頭番地に、R
OM42の先頭番地に格納されたデータを書き込むべ
く、アドレス情報及びセットアップコマンドをROM5
4及びROM42にそれぞれ出力する。
Next, the subroutine of the writing process will be described. When this subroutine starts, the CPU
First, at step N1, 51 is R at the head address of ROM 54.
In order to write the data stored in the head address of the OM42, the address information and the setup command are stored in the ROM5.
4 and ROM 42 respectively.

【0032】次いで、CPU51はステップN2でn’
を0にセツトする。ここでn’はステップN4〜N1
0、およびN13で示される書込み処理のトライ回数を
意味する。このトライ回数n’は、ステップN13に示
すように、例えばn’=25に設定されており、書込み
処理が行えない場合はステップN4〜N10及びN13
で示されるルーチンを25回繰り返す。以下にその内容
を説明する。
Next, the CPU 51 proceeds to step N2, where n '
Set to 0. Here, n'is the step N4 to N1.
It means the number of trials of the writing process indicated by 0 and N13. This number of tries n'is set to, for example, n '= 25 as shown in step N13, and if the write processing cannot be performed, steps N4 to N10 and N13 are performed.
The routine indicated by is repeated 25 times. The contents will be described below.

【0033】CPU51は、まずステップN3でROM
42のマスタデータ番地から1バイト分の書込みデータ
を読み出す。次いで、ステップN5でROM54に書込
みコマンドとアドレス情報を入力し、続いて読みだした
1バイト分のデータをステップN6でROM54に入力
する。そうすると、ステップN7で示される待機時間1
0μs経過すると、このデータの書込みがおこなわれる
ので、書込みされたことを確認すると、次にステップN
8でROM54に書込みベリファイコマンド(書込み確
認コマンド)を入力する。そうすると、ステップN9で
示される待機時間6μs経過後にROM54より該当す
る番地の書込みがされたか否かを示す応答信号が送られ
てくるので、この応答信号によりステップN10でベリ
ファイOK(書込みOK)かどうかを判断する。
First, the CPU 51 executes the ROM in step N3.
One byte of write data is read from the master data address 42. Next, in step N5, a write command and address information are input to the ROM 54, and subsequently the read 1-byte data is input to the ROM 54 in step N6. Then, the waiting time 1 shown in step N7
When 0 μs has elapsed, this data is written, so if it is confirmed that the data has been written, the next step N
In step 8, a write verify command (write confirmation command) is input to the ROM 54. Then, a response signal indicating whether or not the corresponding address has been written is sent from the ROM 54 after the waiting time 6 μs shown in step N9 elapses. Therefore, it is determined in step N10 whether the verification is OK (write OK) by the response signal. To judge.

【0034】CPU51は、ステップN10で書込みが
されていないことを確認すると、次にステップN13で
トライ回数n’が25回に達しているか否かを判定す
る。トライ回数n’が25回に達していない場合はステ
ップN4に進み、ここでトライ回数n’をn’+1にイ
ンクリメントし、上記ステップN4〜N10のルーチン
について同様の処理を再行する。
When the CPU 51 confirms that the writing has not been performed in step N10, it determines in step N13 whether or not the number of trials n'has reached 25 times. If the number of tries n'has not reached 25, the process proceeds to step N4, where the number of tries n'is incremented to n '+ 1, and the same processing is repeated for the routines of steps N4 to N10.

【0035】一方、ステップN13でトライ回数nが2
5回に達していることを確認するとステップN14に進
み、フェイル処理を実行し、図3のメインフローにリタ
ーンする。フェイル処理を行った場合は、ステップL7
でROM54のVpp端子に印加される直流電圧を12V
から5Vに降下する。次いで、ステップL8で正常終了
でないと判定し、表示部11にフェイル表示を行い(L
10)、オペレータにその旨を報じる。そして、ステッ
プL11でメモリカード40が取り外されたことを確認
すると、この処理を終了する。
On the other hand, at step N13, the number of tries n is 2
When it is confirmed that the number of times has reached 5, the process proceeds to step N14, the fail process is executed, and the process returns to the main flow of FIG. When the fail processing is performed, step L7
DC voltage applied to Vpp terminal of ROM 54 is 12V
To 5V. Next, in step L8, it is determined that the process has not ended normally, and a fail display is displayed on the display unit 11 (L
10), Notify the operator to that effect. When it is confirmed in step L11 that the memory card 40 has been removed, this process ends.

【0036】一方、ステップN10で書込みベリファイ
(確認)がOKであると判定すると、次にステップN1
1でROM54の番地が最終アドレスになったかどうか
を判定する。
On the other hand, if it is determined in step N10 that the write verify is OK, then step N1
At 1, it is determined whether the address of the ROM 54 has reached the final address.

【0037】書込みの確認のための番地が最終アドレス
になっていないことを確認すると、次番地に対するデー
タの書き込みを行うべく、ステップN12で書込みアド
レスとセットアップコマンドを次の番地へ移し、ステッ
プN2に進み、上記ステップN2以降の処理を再行す
る。
When it is confirmed that the address for confirmation of writing is not the final address, the write address and the setup command are moved to the next address in step N12 in order to write the data to the next address, and the process proceeds to step N2. Then, the process from step N2 onward is repeated.

【0038】一方、ステップN11で最終アドレスであ
ることを確認すると、図3のメインフローにリターン
し、ステップL7を経てステップL8で消去処理及び書
込み処理が正常に終了したかどうかを判定し、正常に終
了したことを確認すると、ステップL9で表示部11に
その旨を表示する。そして、ステップL11の確認処理
を終了すると、上記一連の処理を終了する。
On the other hand, if the final address is confirmed in step N11, the process returns to the main flow of FIG. When it is confirmed that the process has been completed, the message is displayed on the display unit 11 in step L9. When the confirmation process of step L11 is completed, the series of processes described above is completed.

【0039】なお、上記実施例では通信端子51bを介
して転送されて来たデータ消去用プログラムに従ってR
OM54の書換えを行ったが、ROM54の空き領域に
このデータ消去・書き込み用プログラムを格納してお
き、これをRAM52に転送して上記同様の書換え処理
を行うようにしてもよい。
In the above embodiment, the R is written in accordance with the data erasing program transferred via the communication terminal 51b.
Although the rewriting of the OM 54 has been performed, this data erasing / writing program may be stored in the empty area of the ROM 54 and transferred to the RAM 52 to perform the rewriting process similar to the above.

【0040】[0040]

【発明の効果】以上の本発明電子装置によれば、プログ
ラムROM又は外部記憶装置から記憶手段に転送されて
来たデータ消去・書き込みプログラムに従ってプログラ
ムROM内のプログラムデータが自動的に消去され、続
いて外部記憶装置に搭載された記憶部に格納され新たな
プログラムデータがプログラムROMに自動的に書き込
まれる。従って、本発明電子装置によれば、プログラム
ROMを電子装置本体から取り外すことなく、容易にデ
ータを書き換えることができる。それ故、バージョンア
ップ等の処理を迅速、確実に行える利点がある。
According to the electronic device of the present invention as described above, the program data in the program ROM is automatically erased in accordance with the data erasing / writing program transferred from the program ROM or the external storage device to the storage means. The new program data stored in the storage unit mounted on the external storage device is automatically written in the program ROM. Therefore, according to the electronic device of the present invention, the data can be easily rewritten without removing the program ROM from the main body of the electronic device. Therefore, there is an advantage that processing such as version upgrade can be performed quickly and reliably.

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

【図1】本発明電子手帳を示す斜視図。FIG. 1 is a perspective view showing an electronic notebook according to the present invention.

【図2】本発明電子手帳の回路構成を示すブロック図。FIG. 2 is a block diagram showing a circuit configuration of the electronic notebook of the present invention.

【図3】本発明電子手帳のデータ書換え手順のメインフ
ローを示すフローチャート。
FIG. 3 is a flowchart showing a main flow of a data rewriting procedure of the electronic notebook of the present invention.

【図4】消去プログラムのサブルーチンを示すフローチ
ャート。
FIG. 4 is a flowchart showing a subroutine of an erasing program.

【図5】書込みプログラムのサブルーチンを示すフロー
チャート。
FIG. 5 is a flowchart showing a subroutine of a writing program.

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

1 電子手帳 10 手帳本体 11 表示部 30 コネクタ 40 メモリーカード 41、42 ROM 51 CPU 53 電源制御部 54 プログラムROM(FーPROM) 1 electronic notebook 10 notebook main body 11 display section 30 connector 40 memory card 41, 42 ROM 51 CPU 53 power supply control section 54 program ROM (F-PROM)

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】電気的に消去可能になったプログラムRO
Mが搭載された電子装置本体に、プログラムデータが書
き込まれた記憶部が搭載された外部記憶装置を接続し、
該プログラムROMに書き込まれたプログラムを消去し
て該記憶部に格納されたプログラムが書換え可能になっ
た電子装置であって、 該プログラムROMに格納されたデータ消去・書込みプ
ログラム又は外部記憶装置から転送されてくるデータ消
去・書き込みプログラムを一時記憶する記憶手段と、 該記憶手段に記憶された該データ消去・書き込みプログ
ラムを起動し、該データ消去・書き込みプログラムに従
って該プログラムROMに格納されたプログラムデータ
を消去し、該記憶部に格納されたプログラムを該プログ
ラムROMに書込む制御手段と、を備えた電子装置。
1. A program RO electrically erasable
An external storage device including a storage unit in which program data is written is connected to the electronic device main body in which M is installed,
An electronic device in which a program stored in the storage unit is rewritable by erasing a program written in the program ROM, and a data erasing / writing program stored in the program ROM or transferred from an external storage device. Storage means for temporarily storing the received data erasing / writing program, the data erasing / writing program stored in the storing means, and program data stored in the program ROM according to the data erasing / writing program. An electronic device comprising: a control unit that erases the program stored in the storage unit and writes the program in the program ROM.
JP23804691A 1991-09-18 1991-09-18 Electronic equipment Expired - Fee Related JP2738611B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP23804691A JP2738611B2 (en) 1991-09-18 1991-09-18 Electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP23804691A JP2738611B2 (en) 1991-09-18 1991-09-18 Electronic equipment

Publications (2)

Publication Number Publication Date
JPH0581205A true JPH0581205A (en) 1993-04-02
JP2738611B2 JP2738611B2 (en) 1998-04-08

Family

ID=17024364

Family Applications (1)

Application Number Title Priority Date Filing Date
JP23804691A Expired - Fee Related JP2738611B2 (en) 1991-09-18 1991-09-18 Electronic equipment

Country Status (1)

Country Link
JP (1) JP2738611B2 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS561651A (en) * 1979-06-18 1981-01-09 Minoru Uchiumi Bracelet-type microminiature tereo telephone
JPS5898889A (en) * 1981-12-08 1983-06-11 Canon Inc Writing device
JPS6019538A (en) * 1983-07-14 1985-01-31 Nec Corp Ink jet recorder
JPS6378253A (en) * 1986-09-22 1988-04-08 Hitachi Ltd Program loading system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS561651A (en) * 1979-06-18 1981-01-09 Minoru Uchiumi Bracelet-type microminiature tereo telephone
JPS5898889A (en) * 1981-12-08 1983-06-11 Canon Inc Writing device
JPS6019538A (en) * 1983-07-14 1985-01-31 Nec Corp Ink jet recorder
JPS6378253A (en) * 1986-09-22 1988-04-08 Hitachi Ltd Program loading system

Also Published As

Publication number Publication date
JP2738611B2 (en) 1998-04-08

Similar Documents

Publication Publication Date Title
JPH05327582A (en) Program memory rewrite system for portable telephone set
JPH08202626A (en) Memory controller
US5933595A (en) Computer apparatus having electrically rewritable nonvolatile memory, and nonvolatile semiconductor memory
JP2002278783A (en) System for rewriting firmware
US5039850A (en) IC card
JP2645368B2 (en) Method of programming data into an electrically programmable ROM
JP2000065899A (en) Semiconductor device, and its data rewriting method
JPS59107491A (en) Ic card
JPS59107483A (en) Writing processing method to ic card
JPH0581206A (en) Electronic device
JPH0581205A (en) Electronic device
JPH08249016A (en) Programmable controller
JPH05120501A (en) Ic card and manufacturing for the same
JP2002175193A (en) Device and method for rewriting program
JP2002150246A (en) Portable electronic device
JPS62197995A (en) Memory writing and erasing device
JP2000243093A (en) Data storing method for flash memory and data reading out method from flash memory
JPH07287603A (en) Engine controller
JPS62289999A (en) Data writing method
JPH09152969A (en) Software updating device of electronic equipment
JPH06139064A (en) Countermeasure device against bug for electronic equipment
JPH0512511A (en) Ic card and method for changing application program for ic card
JP2005128613A (en) Image forming device
JP3281858B2 (en) Microcomputer evaluation device
JP2001092713A (en) Device and method for writing data

Legal Events

Date Code Title Description
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 19980105

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

Free format text: PAYMENT UNTIL: 20080116

Year of fee payment: 10

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

Free format text: PAYMENT UNTIL: 20090116

Year of fee payment: 11

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

Free format text: PAYMENT UNTIL: 20100116

Year of fee payment: 12

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

Free format text: PAYMENT UNTIL: 20110116

Year of fee payment: 13

LAPS Cancellation because of no payment of annual fees