JP2000276347A - Portable electronic apparatus - Google Patents

Portable electronic apparatus

Info

Publication number
JP2000276347A
JP2000276347A JP8575799A JP8575799A JP2000276347A JP 2000276347 A JP2000276347 A JP 2000276347A JP 8575799 A JP8575799 A JP 8575799A JP 8575799 A JP8575799 A JP 8575799A JP 2000276347 A JP2000276347 A JP 2000276347A
Authority
JP
Japan
Prior art keywords
program
portable electronic
write
electronic device
bus
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP8575799A
Other languages
Japanese (ja)
Inventor
Toshiyuki Shibuya
敏之 渋谷
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.)
NEC Corp
Original Assignee
NEC 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 NEC Corp filed Critical NEC Corp
Priority to JP8575799A priority Critical patent/JP2000276347A/en
Publication of JP2000276347A publication Critical patent/JP2000276347A/en
Pending legal-status Critical Current

Links

Landscapes

  • Stored Programmes (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

PROBLEM TO BE SOLVED: To make it possible to write a program in a non-volatile memory built in a portable electronic apparatus without using a writing program. SOLUTION: When a program write mode selection signal 111 received from a terminal interface 16 is activated and a write/read switching signal 112 is set up to 'write', a bus control circuit 11 stops a CPU 12 and releases a data bus 102 and an address bus 103. Then the circuit 11 supplies writing power 109 to a non-volatile memory 13, and after executing erasing operation, writes a program inputted from serial input data 114 received through the interface 16 in a specified address of the memory 13 through the address bus 103 and the data bus 102.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、携帯電子機器に関
し、特に携帯電子機器内部の不揮発メモリに、機器の動
作を制御するプログラムを書き込むための書き込み方式
に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a portable electronic device, and more particularly to a writing method for writing a program for controlling the operation of a device in a nonvolatile memory inside the portable electronic device.

【0002】[0002]

【従来の技術】従来、携帯電子機器内部の不揮発メモリ
へのメイン・プログラムの書き込みは、このメイン・プ
ログラムとは別の書き込み用のプログラムを起動させて
CPUで行っていた。
2. Description of the Related Art Conventionally, writing of a main program into a nonvolatile memory in a portable electronic device has been performed by a CPU by activating a writing program different from the main program.

【0003】図3は従来技術を示すブロック図である。
図3において、ターミナル・インターフェース16は、
携帯電子機器本体1内のCPU12に接続されており、
プログラム書き込みモード選択信号111がアクティブ
になったことを検出すると、CPU12は、不揮発メモ
リ13に予め書き込まれている書き込み用プログラムの
内容を不揮発メモリ13からメモリ14にコピーした
後、この書き込み用プログラムを実行する。
FIG. 3 is a block diagram showing the prior art.
In FIG. 3, the terminal interface 16 comprises:
Connected to the CPU 12 in the portable electronic device body 1,
Upon detecting that the program write mode selection signal 111 has become active, the CPU 12 copies the contents of the write program previously written in the non-volatile memory 13 from the non-volatile memory 13 to the memory 14, and then executes the write program. Execute.

【0004】これは、不揮発メモリ13をメイン・プロ
グラムの書き込みモードに移行させると、予め書き込ま
れている書き込み用プログラムが読み出せなくなるた
め、別のメモリであるメモリ14にコピーするもので、
CPU12はメモリ14にコピーされた書き込み用プロ
グラムを実行するようにしている。
[0004] When the nonvolatile memory 13 is shifted to the write mode of the main program, the previously written write program cannot be read, so that it is copied to the memory 14 which is another memory.
The CPU 12 executes the writing program copied to the memory 14.

【0005】次にCPU12は、不揮発メモリ13を書
き込みモードに移行させるために、書き込み用電源10
9を不揮発メモリ13に供給し、書き込み、消去、リセ
ットの各動作が、データ・バス102を介して設定され
る書き込みモードとなる。まず、CPU12は、不揮発
メモリ13の内容を消去するため、データ・バス102
に消去を意味するデータを出力し、選択信号106とラ
イト信号105をアクティブにする。次にCPU12
は、データ・バス102に書き込みを意味するデータを
出力し、選択信号106とライト信号105をアクティ
ブにする。
Next, the CPU 12 writes the power supply 10 for writing to the nonvolatile memory 13 to shift the mode to the write mode.
9 is supplied to the nonvolatile memory 13, and the respective operations of writing, erasing, and resetting are in the writing mode set via the data bus 102. First, the CPU 12 executes the data bus 102 to erase the contents of the nonvolatile memory 13.
, The data indicating the erase is output, and the selection signal 106 and the write signal 105 are activated. Next, the CPU 12
Outputs data indicating write to the data bus 102, and activates the selection signal 106 and the write signal 105.

【0006】続いてCPU12は、ターミナル・インタ
ーフェース16のシリアル入力データ114から入力さ
れるプログラムを指定されたアドレスに書き込むため
に、アドレスをアドレス・バス103に、データをデー
タ・バス102に出力し、選択信号106とライト信号
105をアクティブにする。そして次のデータを書き込
むために、再びアドレスをアドレス・バス103に、デ
ータをデータ・バス102に出力し、選択信号106と
ライト信号105をアクティブにする。以降、この動作
を繰り返し行い、シリアル入力データ114から入力さ
れるプログラムの全てを不揮発メモリ13の指定された
アドレスに書き込む。
Subsequently, the CPU 12 outputs the address to the address bus 103 and the data to the data bus 102 in order to write the program input from the serial input data 114 of the terminal interface 16 to the specified address. The selection signal 106 and the write signal 105 are activated. Then, in order to write the next data, the address is output to the address bus 103 and the data is output to the data bus 102 again, and the selection signal 106 and the write signal 105 are activated. Thereafter, this operation is repeated, and all the programs input from the serial input data 114 are written to the specified address of the nonvolatile memory 13.

【0007】図2(a)はターミナル・インターフェー
ス16のシリアル入力データ114から入力されるデー
タのフォーマットを示す。BOF201からEOF20
6までは、例えば1wordのような一定のビット長を
持ち、BOF201とEOF206は決められたビット
列である。
FIG. 2A shows a format of data input from the serial input data 114 of the terminal interface 16. BOF201 to EOF20
6 have a fixed bit length such as 1 word, for example, and the BOF 201 and EOF 206 are determined bit strings.

【0008】ADR202は、データの先頭であるDT
1.203が書き込まれる不揮発メモリ13のアドレス
を示しており、続くデータのDT2.204は、ADR
202が示す値に+1したアドレスに書き込まれ、アド
レスは順次インクリメントし、n番目のデータであるD
Tn.205はADR202が表す値に+n−1したア
ドレスに書き込まれる。またアドレスが不連続な場合
は、一旦データフォーマットをEOF206で閉じ、B
OF201から新しいデータフォーマットとして開く。
プログラムの転送が終了すると、図2(b)のように、
BOF201とEOF206のみで構成するデータフォ
ーマットを送信する。
[0008] The ADR 202 has a DT which is the head of the data.
1.203 indicates the address of the nonvolatile memory 13 to which the data is written, and DT2.204 of the following data is ADR
The value is written to an address obtained by adding +1 to the value indicated by 202, the address is sequentially incremented, and the n-th data D
Tn. 205 is written to an address obtained by adding + n-1 to the value represented by the ADR 202. If the addresses are discontinuous, the data format is temporarily closed by EOF 206 and
Open as a new data format from OF201.
When the transfer of the program is completed, as shown in FIG.
A data format including only the BOF 201 and the EOF 206 is transmitted.

【0009】次に、上述のように全てのデータを書き込
み、BOF201とEOF206のみで構成されたビッ
ト列を受信したCPU12は、不揮発メモリ13を読み
出しモードに移行させるため、データ・バス102にリ
セットを意味するデータを出力し、選択信号106とラ
イト信号105をアクティブにする。以降、不揮発メモ
リ13の書き込みは終了し、読み出しモードとなる。
Next, as described above, the CPU 12 that has written all the data and received the bit string composed of only the BOF 201 and the EOF 206 means resetting the data bus 102 to shift the nonvolatile memory 13 to the read mode. Data to be output, and the selection signal 106 and the write signal 105 are activated. Thereafter, the writing to the nonvolatile memory 13 ends, and the mode is changed to the reading mode.

【0010】[0010]

【発明が解決しようとする課題】しかし、上記従来の技
術には次のような問題点があった。第1の問題点は、プ
ログラムがメイン・プログラムと書き込み用プログラム
の2部構成になることである。その理由は、メイン・プ
ログラムの書き込みを、書き込み用プログラムを実行す
ることにより実行するためである。
However, the above prior art has the following problems. The first problem is that the program has a two-part configuration including a main program and a writing program. The reason is that the writing of the main program is executed by executing the writing program.

【0011】第2の問題点は、携帯電子機器を組み立て
る前に、予め書き込み用プログラムを専用のライタを使
って不揮発性メモリに書き込む必要があることである。
その理由は、不揮発性メモリに対するメイン・プログラ
ムの書き込みの際に、CPUが書き込み用プログラムを
実行するためである。
A second problem is that it is necessary to write a writing program in a nonvolatile memory using a dedicated writer before assembling the portable electronic device.
The reason is that the CPU executes the write program when the main program is written in the nonvolatile memory.

【0012】第3の問題点は、書き込み用プログラムは
書き換えができないことである。その理由は、予め専用
のライタで不揮発性メモリに書き込む場合、プログラム
を不揮発性メモリのブート・エリア等の消去できない空
間に書き込むためである。この空間は専用のライタのみ
により書き込みと消去が可能である。これはメイン・プ
ログラム書き込み時に書き込み用プログラムが消去され
るのを防ぐためである。
A third problem is that a writing program cannot be rewritten. The reason is that when a dedicated writer is used to write the program in the nonvolatile memory in advance, the program is written in a non-erasable space such as a boot area of the nonvolatile memory. This space can be written and erased only by a dedicated writer. This is to prevent the writing program from being erased when writing the main program.

【0013】従って、本発明は、書き込み用プログラム
を用いずにメイン・プログラムを書き込むことができる
ようにすることを目的としている。
Accordingly, an object of the present invention is to make it possible to write a main program without using a writing program.

【0014】[0014]

【課題を解決するための手段】上記の目的を達成するた
めに、本発明においては、携帯電子機器の諸機能を実行
する電子回路と、電子回路を制御するCPUと、各種信
号が入力される入力手段と、入力手段を介して各種信号
が入力されると共に、電子回路とCPUとを接続するバ
スを制御するバス・コントロール回路と、プログラムを
記憶する記憶手段とを設けた携帯電子機器において、バ
ス・コントロール回路は、入力手段を介して入力される
プログラム書き込み選択信号に応じてCPUを停止させ
てバスを開放すると共に記憶手段を書き込みモードとな
し、次に入力されたプログラムを記憶手段に書き込むよ
うにしている。
According to the present invention, an electronic circuit for executing various functions of a portable electronic device, a CPU for controlling the electronic circuit, and various signals are input. In a portable electronic device provided with an input unit, a bus control circuit that controls a bus that connects an electronic circuit and a CPU while various signals are input through the input unit, and a storage unit that stores a program, The bus control circuit stops the CPU in response to a program write selection signal input through the input means, releases the bus, sets the storage means to the write mode, and writes the next input program to the storage means. Like that.

【0015】また、入力されるプログラムは、記憶手段
への書き込みアドレスを有していてよく、さらに、プロ
グラムは、機器内の対象デバイスを示すパラメータを有
し、バス・コントロール回路は、入力手段を介して入力
された書き込み信号に応じて対象デバイスの指定された
アドレスにデータを書き込み、入力手段を介して入力さ
れた読み出し信号に応じて書き込まれたデータを読み出
し出力するようにしてよい。
[0015] The input program may have a write address to the storage means. Further, the program has a parameter indicating a target device in the apparatus, and the bus control circuit controls the input means. The data may be written to a specified address of the target device according to a write signal input via the input device, and the written data may be read and output according to a read signal input via the input means.

【0016】また、記憶手段は、不揮発メモリであって
よい。また、バス・コントロール回路は、書き込みモー
ドにおいて記憶手段に電源を供給するようにしてよく、
さらに、記憶手段の書き込みを行う前にこの記憶手段の
消去を行うようにしてよい。また、CPUは、記憶手段
に記憶されたプログラムに基づいて機器の動作を制御す
るようにしてよい。
The storage means may be a non-volatile memory. Further, the bus control circuit may supply power to the storage means in the write mode,
Further, the storage means may be erased before writing to the storage means. Further, the CPU may control the operation of the device based on a program stored in the storage unit.

【0017】[0017]

【発明の実施の形態】以下、本発明の実施の形態を図面
と共に説明する。図1は本発明による携帯電子機器の第
1の実施の形態を示すブロックである。本発明の実施の
形態は、携帯電子機器本体1に内蔵されている、電気的
に書き込み又は消去が可能な不揮発メモリ13に対し
て、携帯電子機器外部から入力される携帯電子機器のメ
イン・プログラムの書き込みを行うものである。本実施
の形態によれば、従来、携帯電子機器組立前に行ってい
た不揮発性メモリ内部のブート・エリア等への書き込み
用のプログラムの書き込みは必要なくなる。
Embodiments of the present invention will be described below with reference to the drawings. FIG. 1 is a block diagram showing a first embodiment of a portable electronic device according to the present invention. The embodiment of the present invention relates to a main program of a portable electronic device, which is input from the outside of the portable electronic device, to a non-volatile memory 13 which is built in the portable electronic device main body 1 and which can be electrically written or erased. Is written. According to the present embodiment, it is no longer necessary to write a program for writing into a boot area or the like in the nonvolatile memory, which has been performed before assembling the portable electronic device.

【0018】図1において、本実施の形態は、プログラ
ム書き込みモード選択信号111から書き込みモード要
求を受信したバス・コントロール回路11は、CPU1
2に対してバス開放要求信号101を送信し、次にバス
・コントロール回路11は、選択信号106とライト信
号105を操作して、シリアル入力データ114を介し
て入力されるメイン・プログラムを、不揮発メモリ13
に書き込むものである。
In FIG. 1, according to the present embodiment, a bus control circuit 11 which has received a write mode request from a program write mode selection signal 111
2, the bus control circuit 11 operates the select signal 106 and the write signal 105 to change the main program input via the serial input data 114 into a nonvolatile program. Memory 13
To write to.

【0019】以下、構成及び動作について詳細に説明す
る。図1において、携帯電子機器本体1は、データ・バ
ス102とアドレス・バス103を介して相互に接続さ
れているバス・コントロール回路11とCPU12と不
揮発メモリ13とメモリ14と携帯電子機器回路15と
で構成される。
Hereinafter, the configuration and operation will be described in detail. In FIG. 1, a portable electronic device body 1 includes a bus control circuit 11, a CPU 12, a non-volatile memory 13, a memory 14, a portable electronic device circuit 15, which are mutually connected via a data bus 102 and an address bus 103. It consists of.

【0020】バス・コントロール回路11は、ターミナ
ル・インターフェース16からプログラム書き込みモー
ド選択信号111を受信すると、携帯電子機器本体1を
通常動作モードからプログラム書き込みモードに移行さ
せるために、CPU12に対してバス開放要求信号10
1を送信し、不揮発メモリ13に対して書き込み用電源
109を供給する。
When the bus control circuit 11 receives the program write mode selection signal 111 from the terminal interface 16, the bus control circuit 11 releases the bus to the CPU 12 to shift the portable electronic device body 1 from the normal operation mode to the program write mode. Request signal 10
1 is supplied, and the power supply 109 for writing is supplied to the nonvolatile memory 13.

【0021】続いてバス・コントロール回路11は、タ
ーミナル・インターフェース16から同期クロック11
3に同期して入力されるシリアル入力データ114を受
信し、シリアルからパラレルに変換してデータ・バス1
02に出力し、同時にシリアル入力データ114の内容
から書き込みアドレスを算出して、アドレス・バス10
3に出力し、選択信号106とライト信号105をアク
ティブの状態にすることにより、不揮発メモリ13に書
き込む機能を実現する。
Subsequently, the bus control circuit 11 sends the synchronous clock 11 from the terminal interface 16.
3 receives the serial input data 114 input in synchronization with the data bus 3 and converts the data from serial to parallel.
02 at the same time as calculating the write address from the contents of the serial input data 114,
3 to make the selection signal 106 and the write signal 105 active, thereby realizing the function of writing to the nonvolatile memory 13.

【0022】また、バス・コントロール回路11は、携
帯電子機器本体1が通常動作モードのときに、CPU1
2からアドレス・バス103に対して出力されるアドレ
ス情報を解析し、選択信号106、選択信号107、選
択信号108の各々をアクティブにすることにより、C
PU12がデータ・バス102を介して不揮発メモリ1
3、メモリ14、携帯電子機器回路15の各デバイスと
行うデータの読み書きを支援する機能も有している。
When the portable electronic device body 1 is in the normal operation mode, the bus control circuit 11
2 by analyzing the address information output to the address bus 103 and activating each of the selection signal 106, the selection signal 107, and the selection signal 108,
PU 12 is connected to nonvolatile memory 1 via data bus 102
3, a memory 14, and a function to support reading and writing of data with each device of the portable electronic device circuit 15.

【0023】CPU12は、携帯電子機器本体1がメイ
ン・プログラム書き込みモードに移行し、バス・コント
ロール回路11からのバス開放要求信号101を受信す
ると、データ・バス102とアドレス・バス103を開
放し、自らは動作を停止する。
When the portable electronic device body 1 shifts to the main program write mode and receives the bus release request signal 101 from the bus control circuit 11, the CPU 12 releases the data bus 102 and the address bus 103, The operation stops itself.

【0024】またCPU12は、携帯電子機器本体1が
通常動作モードの場合は、不揮発メモリ13からプログ
ラムを読み込み実行し、実行結果をメモリ14又は携帯
電子機器回路15に書き込み、又は実行に必要なデータ
をメモリ14又は携帯電子機器回路15から読み出す機
能を有する。
When the portable electronic device body 1 is in the normal operation mode, the CPU 12 reads and executes a program from the nonvolatile memory 13 and writes the execution result in the memory 14 or the portable electronic device circuit 15 or data necessary for execution. From the memory 14 or the portable electronic device circuit 15.

【0025】不揮発メモリ13は、書き込まれた内容の
電気的な消去及び書き込みが可能であり、携帯電子機器
本体1の電源がOFFの状態でも書き込まれた内容は保
持される。また、携帯電子機器本体1がプログラム書き
込みモードに移行した場合、不揮発メモリ13は、バス
・コントロール回路11から書き込み用電源109が供
給され、書き込み又は消去が可能な書き込みモードに移
行する。書き込みモードでは、選択信号106とライト
信号105がアクティブになったとき、データ・バス1
02に出力されているデータをアドレス・バス103に
出力されているアドレスに書き込む。
The nonvolatile memory 13 is capable of electrically erasing and writing the written content, and retains the written content even when the power of the portable electronic device body 1 is off. When the portable electronic device body 1 shifts to the program writing mode, the nonvolatile memory 13 is supplied with the writing power supply 109 from the bus control circuit 11 and shifts to the writing mode in which writing or erasing is possible. In the write mode, when the select signal 106 and the write signal 105 become active, the data bus 1
02 is written to the address output on the address bus 103.

【0026】また、書き込みモードでは、各動作の先頭
には書き込み、消去、リセットの各動作を設定するよう
になっている。これは、書き込み、消去、リセットの各
動作を意味するデータをデータ・バス102に出力し、
選択信号106とライト信号105をアクティブにする
ことにより設定できる。
In the write mode, write, erase, and reset operations are set at the beginning of each operation. This outputs data indicating each operation of write, erase, and reset to the data bus 102,
It can be set by activating the selection signal 106 and the write signal 105.

【0027】また、携帯電子機器本体1が通常動作モー
ドの場合は、読み出し専用のメモリとして動作し、CP
U12からアドレス・バス103に出力しているアドレ
スに書き込まれているデータを選択信号106とリード
信号104がアクティブになった場合データ・バス10
2に出力する。
When the portable electronic device body 1 is in the normal operation mode, it operates as a read-only memory,
When the selection signal 106 and the read signal 104 become active, the data written to the address output from the U12 to the address bus 103 is
Output to 2.

【0028】メモリ14は、携帯電子機器本体1の電源
がONの場合に、読み出し書き込みが可能となり、携帯
電子機器本体1の電源がOFFの状態では、書き込まれ
た内容が消えてしまう。CPU12が作業用のメモリと
して使用し、命令実行途中で発生するデータを一時的に
保持するのに使用する。携帯電子機器回路15は、携帯
電子機器本体1が有する諸機能を実現するための電子回
路である。例えば、各種回路、表示部やキーボード、ス
ピーカ等で構成される。
The memory 14 can be read and written when the power of the portable electronic device body 1 is ON, and the written contents are lost when the power of the portable electronic device body 1 is OFF. It is used as a work memory by the CPU 12 and is used to temporarily hold data generated during the execution of an instruction. The portable electronic device circuit 15 is an electronic circuit for realizing various functions of the portable electronic device body 1. For example, it is composed of various circuits, a display unit, a keyboard, a speaker, and the like.

【0029】ターミナル・インターフェース16は、上
記プログラムを出力する例えばコンピュータのようなタ
ーミナルと携帯電子機器本体1とを接続するインターフ
ェースであり、携帯電子機器本体1をプログラム書き込
みモードに移行させるプログラム書き込みモード選択信
号111、プログラムの書き込みかデータの読み出しか
を設定する書き込み/読み出し切り替え信号112、シ
リアル入力データ114の送受信タイミングをとる同期
クロック113、書き込むプログラムや携帯電子機器本
体1の設定を入力するシリアル入力データ114、携帯
電子機器本体1のデータを出力するシリアル出力データ
115の5本の信号線で構成される。
The terminal interface 16 is an interface for connecting the terminal such as a computer, which outputs the above-mentioned program, to the portable electronic device main body 1, and selects the program writing mode for shifting the portable electronic device main body 1 to the program writing mode. A signal 111, a write / read switching signal 112 for setting whether to write a program or to read data, a synchronous clock 113 for sending / receiving timing of serial input data 114, and serial input data for inputting a program to be written and settings of the portable electronic device body 1 114, five signal lines of serial output data 115 for outputting data of the portable electronic device body 1.

【0030】図2(a)(b)はターミナル・インター
フェース16のシリアル入力データ114から入力され
るデータのフォーマットであり、従来技術において説明
した通りである。
FIGS. 2A and 2B show a format of data input from the serial input data 114 of the terminal interface 16 as described in the prior art.

【0031】次に上記構成による動作について説明す
る。携帯電子機器本体1をプログラム書き込みモードに
設定するために、ターミナル・インターフェース16か
らプログラム書き込みモード選択信号111をアクティ
ブにし、書き込み/読み出し切り替え信号112を書き
込みに設定する。プログラム書き込みモード選択信号1
11のアクティブを検出したバス・コントロール回路1
1は、CPU12に対して動作の停止とデータ・バス1
02とアドレス・バス103の開放を要求するために、
バス開放要求信号101をアクティブにする。
Next, the operation of the above configuration will be described. In order to set the portable electronic device body 1 to the program write mode, the program write mode selection signal 111 is activated from the terminal interface 16 and the write / read switching signal 112 is set to write. Program write mode selection signal 1
Bus control circuit 1 that has detected 11 active
1 indicates that the operation of the CPU 12 is stopped and the data bus 1
02 and the request to release the address bus 103,
The bus release request signal 101 is activated.

【0032】バス開放要求信号101のアクティブを検
出したCPU12は動作を停止し、データ・バス102
とアドレス・バス103の開放を実行する。続いて、バ
ス・コントロール回路11は、不揮発メモリ13を書き
込みモードに移行させるために、書き込み用電源109
を供給する。書き込み用電源109が供給された不揮発
メモリ13は書き込みモードに移行し、書き込み、消
去、リセットの各動作がデータ・バス102を介して設
定されるのを待つ状態となる。
The CPU 12 which has detected the activation of the bus release request signal 101 stops its operation, and
And release of the address bus 103. Subsequently, the bus control circuit 11 sends the write power 109 to shift the nonvolatile memory 13 to the write mode.
Supply. The nonvolatile memory 13 to which the writing power supply 109 is supplied shifts to the writing mode, and enters a state of waiting for each operation of writing, erasing, and resetting to be set via the data bus 102.

【0033】まず、バス・コントロール回路11は、不
揮発メモリ13の内容を消去するため、データ・バス1
02に消去を意味するデータを出力し、選択信号106
とライト信号105をアクティブにする。次にバス・コ
ントロール回路11は、不揮発メモリ13を書き込みモ
ードに移行させるため、データ・バス102に書き込み
を意味するデータを出力し、選択信号106とライト信
号105をアクティブにする。
First, the bus control circuit 11 executes the data bus 1 to erase the contents of the nonvolatile memory 13.
02, data indicating erasure is output, and the selection signal 106
And the write signal 105 is activated. Next, in order to shift the nonvolatile memory 13 to the write mode, the bus control circuit 11 outputs data indicating write to the data bus 102, and activates the selection signal 106 and the write signal 105.

【0034】続いてバス・コントロール回路11は、タ
ーミナル・インターフェース16のシリアル入力データ
114から入力されるプログラムを指定されたアドレス
に書き込むために、アドレスをアドレス・バス103に
データをデータ・バス102に出力し、選択信号106
とライト信号105をアクティブにする。そして、次の
データを書き込むため、再びアドレスをデータをアドレ
ス・バス103にデータをデータ・バス102に出力
し、選択信号106とライト信号105をアクティブに
する。以降、この動作を繰り返し行い、シリアル入力デ
ータから入力されるプログラムの全てを不揮発メモリ1
3の指定されたアドレスに書き込む。
Subsequently, the bus control circuit 11 writes the address to the address bus 103 and writes the data to the data bus 102 in order to write the program input from the serial input data 114 of the terminal interface 16 to the specified address. Output and select signal 106
And the write signal 105 is activated. Then, in order to write the next data, the address and the data are output again to the address bus 103 and the data bus 102, and the selection signal 106 and the write signal 105 are activated. Thereafter, this operation is repeated, and all the programs input from the serial input data are stored in the nonvolatile memory 1.
3. Write to the specified address.

【0035】全てのデータを書き込み、図2(b)のB
OF201とEOF206のみで構成されたビット列を
受信したバス・コントロール回路11は、不揮発メモリ
13を読み出しモードに移行させるため、データ・バス
102にリセットを意味するデータを出力し、選択信号
106とライト信号105をアクティブにする。以降、
不揮発メモリ13は書き込みが終了し、読み出しモード
となる。
All data is written, and B in FIG.
The bus control circuit 11 that has received the bit string composed of only the OF 201 and the EOF 206 outputs data indicating a reset to the data bus 102 to shift the nonvolatile memory 13 to the read mode, and outputs the selection signal 106 and the write signal. Activate 105. Or later,
The writing to the nonvolatile memory 13 is completed, and the nonvolatile memory 13 enters the read mode.

【0036】次に、本発明の第2の実施の形態を説明す
る。本実施の形態は、上記第1の実施の形態の拡張とし
て以下のように構成したものである。即ち、図2(c)
に示すように、シリアル入力データ114のフォーマッ
トを変更し、対象デバイスを示すパラメータDEV20
7を追加し、書き込み/読み出し切り替え信号112を
書き込みに設定する。これにより、不揮発メモリ13や
メモリ14、携帯電子機器回路15のADR202で指
定したアドレスにデータを書き込むことが可能となる。
Next, a second embodiment of the present invention will be described. This embodiment is configured as follows as an extension of the first embodiment. That is, FIG.
The format of the serial input data 114 is changed as shown in FIG.
7 is added, and the write / read switching signal 112 is set to write. As a result, data can be written to the nonvolatile memory 13, the memory 14, and the address specified by the ADR 202 of the portable electronic device circuit 15.

【0037】また、書き込み/読み出し切り替え信号1
12を読み出しに設定すると、不揮発メモリ13やメモ
リ14、携帯電子機器回路15のADR202で指定し
たアドレスからデータを読み出し、シリアル出力データ
115に出力することが可能となる。本機能を使うこと
により、携帯電子機器の一部機能のみを動作させたり、
回路の設定の読み出し変更ができるため、故障診断や機
能検査にも有効である。
The write / read switching signal 1
When “12” is set to “read”, data can be read from the nonvolatile memory 13 and the memory 14 and the address specified by the ADR 202 of the portable electronic device circuit 15 and output to the serial output data 115. By using this function, it is possible to operate only some functions of the portable electronic device,
Since the setting of the circuit can be read and changed, it is also effective for failure diagnosis and function inspection.

【0038】[0038]

【発明の効果】以上説明したように、本発明による第1
の効果は、ソフトウェアをメイン・プログラムのみで構
成することができることである。その理由は、不揮発メ
モリに書き込む一連の動作を実現するための書き込み用
プログラムを必要としないためである。
As described above, the first embodiment according to the present invention is described.
The advantage of this is that software can be constituted only by a main program. The reason is that a writing program for implementing a series of operations for writing to the nonvolatile memory is not required.

【0039】第2の効果は、何も書き込まれていない状
態の不揮発メモリを携帯電子機器に搭載できることであ
る。その理由は、ソフトウェアがメイン・プログラムの
みで構成され、メイン・プログラムは携帯電子機器組み
立て後に書き込むことができるためである。
A second effect is that a nonvolatile memory in which nothing is written can be mounted on a portable electronic device. The reason is that the software is composed of only the main program, and the main program can be written after assembling the portable electronic device.

【0040】第3の効果は、不揮発メモリに書き込む一
連の動作を実現するための書き込み用プログラムが必要
ないことである。その理由は、書き込み要求があったと
き、CPUを停止させて不揮発メモリにプログラムを書
き込むようにしたためである。
A third effect is that a write program for realizing a series of operations for writing to the nonvolatile memory is not required. The reason is that when there is a write request, the CPU is stopped and the program is written to the nonvolatile memory.

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

【図1】本発明による携帯電子機器の実施の形態を示す
ブロック図である。
FIG. 1 is a block diagram showing an embodiment of a portable electronic device according to the present invention.

【図2】入力されるデータのフォーマット及び本発明の
第2の実施の形態によるデータのフォーマットを示す構
成図である。
FIG. 2 is a configuration diagram showing a format of input data and a data format according to a second embodiment of the present invention.

【図3】従来の携帯電子機器を示すブロック図である。FIG. 3 is a block diagram showing a conventional portable electronic device.

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

1 携帯電子機器本体 11 バス・コントロール回路 12 CPU 13 不揮発メモリ 14 メモリ 15 携帯電子機器回路 16 ターミナル・インターフェース 101 バス開放要求信号 102 データ・バス 103 アドレス・バス 104 リード信号 105 ライト信号 106、107、108 選択信号 109 書き込み用電源 111 プログラム書き込みモード選択信号 112 書き込み/読み出し切り替え信号 114 シリアル入力データ 115 シリアル出力データ DESCRIPTION OF SYMBOLS 1 Portable electronic device main body 11 Bus control circuit 12 CPU 13 Non-volatile memory 14 Memory 15 Portable electronic device circuit 16 Terminal interface 101 Bus release request signal 102 Data bus 103 Address bus 104 Read signal 105 Write signal 106, 107, 108 Select signal 109 Write power supply 111 Program write mode select signal 112 Write / read switch signal 114 Serial input data 115 Serial output data

Claims (7)

【特許請求の範囲】[Claims] 【請求項1】 携帯電子機器の諸機能を実行する電子回
路と、 前記電子回路を制御するCPUと、 各種信号が入力される入力手段と、 前記入力手段を介して前記各種信号が入力されると共
に、前記電子回路とCPUとを接続するバスを制御する
バス・コントロール回路と、 プログラムを記憶する記憶手段とを設けた携帯電子機器
において、 前記バス・コントロール回路は、前記入力手段を介して
入力されるプログラム書き込み要求信号に応じて前記C
PUを停止させて前記バスを開放すると共に前記記憶手
段を書き込みモードとなし、次に前記入力手段を介して
入力されたプログラムを前記バスを用いて前記記憶手段
に書き込むことを特徴とする携帯電子機器。
1. An electronic circuit that executes various functions of a portable electronic device, a CPU that controls the electronic circuit, an input unit to which various signals are input, and the various signals are input via the input unit. A portable electronic device provided with a bus control circuit for controlling a bus connecting the electronic circuit and a CPU; and a storage unit for storing a program, wherein the bus control circuit receives an input via the input unit. C in response to a program write request signal
A portable electronic device, comprising: stopping a PU to release the bus, setting the storage unit to a write mode, and then writing a program input via the input unit to the storage unit using the bus. machine.
【請求項2】 前記入力されるプログラムは、前記記憶
手段への書き込みアドレスを有することを特徴とする請
求項1記載の携帯電子機器。
2. The portable electronic device according to claim 1, wherein the input program has a write address to the storage unit.
【請求項3】 前記入力されるプログラムは、機器内の
対象デバイスを示すパラメータを有し、前記バス・コン
トロール回路は、前記入力手段を介して入力された書き
込み信号に応じて対象デバイスの指定されたアドレスに
データを書き込み、前記入力手段を介して入力された読
み出し信号に応じて前記書き込まれたデータを読み出し
出力することを特徴とする請求項2記載の携帯電子機
器。
3. The input program has a parameter indicating a target device in the device, and the bus control circuit specifies the target device in accordance with a write signal input via the input means. 3. The portable electronic device according to claim 2, wherein data is written to the address, and the written data is read and output in response to a read signal input via the input means.
【請求項4】 前記記憶手段は、不揮発メモリで構成さ
れることを特徴とする請求項1記載の携帯電子機器。
4. The portable electronic device according to claim 1, wherein said storage means is constituted by a nonvolatile memory.
【請求項5】 前記バス・コントロール回路は、前記書
き込みモードにおいて前記記憶手段に電源を供給するこ
とを特徴とする請求項1記載の携帯電子機器。
5. The portable electronic device according to claim 1, wherein said bus control circuit supplies power to said storage means in said write mode.
【請求項6】 前記バス・コントロール回路は、前記記
憶手段の書き込みを行う前に前記記憶手段の消去を行う
ことを特徴とする請求項1記載の携帯電子機器。
6. The portable electronic device according to claim 1, wherein said bus control circuit erases said storage means before writing to said storage means.
【請求項7】 前記CPUは、前記記憶手段に記憶され
たプログラムに基づいて電子回路の動作を制御すること
を特徴とする請求項1記載の携帯電子機器。
7. The portable electronic device according to claim 1, wherein the CPU controls an operation of the electronic circuit based on a program stored in the storage unit.
JP8575799A 1999-03-29 1999-03-29 Portable electronic apparatus Pending JP2000276347A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP8575799A JP2000276347A (en) 1999-03-29 1999-03-29 Portable electronic apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP8575799A JP2000276347A (en) 1999-03-29 1999-03-29 Portable electronic apparatus

Publications (1)

Publication Number Publication Date
JP2000276347A true JP2000276347A (en) 2000-10-06

Family

ID=13867744

Family Applications (1)

Application Number Title Priority Date Filing Date
JP8575799A Pending JP2000276347A (en) 1999-03-29 1999-03-29 Portable electronic apparatus

Country Status (1)

Country Link
JP (1) JP2000276347A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005309839A (en) * 2004-04-22 2005-11-04 Sanyo Electric Co Ltd Control device
JP2008257415A (en) * 2007-04-04 2008-10-23 Yokogawa Electric Corp Controller having program write function

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005309839A (en) * 2004-04-22 2005-11-04 Sanyo Electric Co Ltd Control device
US7788454B2 (en) 2004-04-22 2010-08-31 Sanyo Electric Co., Ltd. Controller including electrically rewritable nonvolatile memory
JP2008257415A (en) * 2007-04-04 2008-10-23 Yokogawa Electric Corp Controller having program write function

Similar Documents

Publication Publication Date Title
US5327531A (en) Data processing system including corrupt flash ROM recovery
US6772276B2 (en) Flash memory command abstraction
JP4136359B2 (en) Microcomputer
JP2004118826A (en) System unit booted using flash memory, and its booting method
JP2003233993A (en) Method for rewriting nonvolatile memory device
JP3875139B2 (en) Nonvolatile semiconductor memory device, data write control method thereof, and program
KR970066888A (en) Microcomputers Using Nonvolatile Memory
US6442068B1 (en) Non-volatile memory with functional capability of burst mode read and page mode read during suspension of an operation of electrical alteration
US7590793B2 (en) Data access controlling method in flash memory and data access controlling program
JPWO2006040798A1 (en) Semiconductor integrated circuit device and electronic system
KR100223844B1 (en) Option circuit
JP2006209451A (en) Microcomputer and method for optimizing microcomputer
JP2000276347A (en) Portable electronic apparatus
JP4491267B2 (en) Nonvolatile semiconductor memory device
JPH11149376A (en) Boot loader circuit
JP3197865B2 (en) Microcomputer
JP2008181596A (en) Semiconductor storage device
JP2003131951A (en) Control circuit for non-volatile memory
JP2008065549A (en) Microcomputer, information processing system, electronic equipment and start control method for microcomputer
JP4343244B2 (en) Microcomputer
JPH1173784A (en) Semiconductor memory device and data reading method in its device
JPH11328089A (en) Id information write circuit in device for pci bus interface
JPH11353170A (en) Flash memory controller and memory access method of flash memory controller
JP2002287994A (en) Microcontroller
JPH11149407A (en) Memory system and using method for external non-volatile memory

Legal Events

Date Code Title Description
A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20011016