JPH082880Y2 - EEPROM data writing device - Google Patents
EEPROM data writing deviceInfo
- Publication number
- JPH082880Y2 JPH082880Y2 JP10627589U JP10627589U JPH082880Y2 JP H082880 Y2 JPH082880 Y2 JP H082880Y2 JP 10627589 U JP10627589 U JP 10627589U JP 10627589 U JP10627589 U JP 10627589U JP H082880 Y2 JPH082880 Y2 JP H082880Y2
- Authority
- JP
- Japan
- Prior art keywords
- write
- power failure
- eeprom
- write processing
- processing
- 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.)
- Expired - Lifetime
Links
Description
【考案の詳細な説明】 〈産業上の利用分野〉 本考案は、EEPROM(Electrically erasable and prog
rammable read only memory)のデータ書込み装置に関
し、更に詳しくは、EEPROMをメモリの1つとして利用す
るマイクロプロセッサ装置において、停電直前のデータ
書込み処理の改善に関する。[Detailed Description of the Invention] <Industrial Application Field> The present invention is based on an EEPROM (Electrically erasable and prog
The present invention relates to a data writing device of a rammable read only memory), and more specifically, to improvement of a data writing process immediately before a power failure in a microprocessor device using an EEPROM as one of memories.
〈従来の技術〉 EEPROMは、電気的にデータの書込み/消去が行え、デ
ータの保持に電池が要らないなどの特徴があるが、デー
タの書き換え時間が、約2〜10msと長いという欠点があ
る。<Prior Art> The EEPROM has a feature that it can electrically write / erase data and does not require a battery to hold the data, but it has a drawback that the data rewriting time is long, about 2 to 10 ms. .
従来、EEPROMへのデータ書込み(ライト)処理には、
いくつか用意されていて、例えば第1のライト処理(こ
の間割込み禁止)中に、停電予告信号による停電割込み
が発生すると、第1のライト処理が終了してから、停電
予告信号による割込み処理に基づく第2のライト処理を
実行するようなっている。Conventionally, for writing data to the EEPROM,
Some are prepared, and for example, when a power failure interrupt by a power failure notification signal occurs during the first write processing (interrupts prohibited during this time), based on the interrupt processing by the power failure notification signal after the first write processing is completed. The second write process is executed.
〈考案が解決しようとする課題〉 このために、停電予告による割込み処理に基づくライ
ト処理は、第1のライト処理が完了するまでの時間、約
10ms待つ必要があった。<Problems to be solved by the invention> For this reason, the write processing based on the interrupt processing due to the power outage notice takes about the time until the first write processing is completed
I had to wait 10ms.
本考案は、この様な点に鑑みてなされたものであっ
て、停電予告信号による割込み処理に基づく第2のライ
ト処理を、前記したような10msの待ち時間を経ないで行
えるようにしたEEPROMのデータ書込み装置を提供するこ
とを目的とする。The present invention has been made in view of the above circumstances, and is an EEPROM in which the second write processing based on the interrupt processing by the power failure advance notice signal can be performed without waiting 10 ms as described above. It is an object of the present invention to provide a data writing device of the above.
〈課題を解決するための手段〉 前記した目的を達成する本考案は、 EEPROMと、このEEPROMへのリード/ライト手段と、停
電予告信号を受けると立てられる停電割込み要求フラグ
とを備え、 前記リード/ライト手段は、 前記EEPROMへのデータのライト処理に、少なくとも当
該ライト処理中は割込みが禁止される第1のライト処理
と、停電予告信号による割込み要求に基づく第2のライ
ト処理が用意されており、 前記第1のライト処理を行っている途中で停電割込み
要求フラグが立てられると、当該第1のライト処理の中
で前記第2のライト処理を引続き行うように構成されて
いる。<Means for Solving the Problems> The present invention which achieves the above-mentioned object is provided with an EEPROM, a read / write means for the EEPROM, and a power failure interrupt request flag which is set when a power failure notice signal is received. The / write means is provided with a first write process in which an interrupt is prohibited at least during the write process and a second write process based on an interrupt request by a power failure advance signal for writing the data to the EEPROM. Therefore, when the power failure interrupt request flag is set in the middle of the first write processing, the second write processing is continuously performed in the first write processing.
〈作用〉 リード/ライト手段はマイクロプロセッサのプログラ
ムで実現される。電源回路が正常に動作している間は、
リード/ライト手段は通常の第1のライト処理を実行し
ている。<Operation> The read / write means is realized by the program of the microprocessor. While the power circuit is operating normally,
The read / write means executes the normal first write processing.
電源回路が停電すると、停電直前に停電予告信号が出
力され、これにより停電割込み要求フラグが立てられ
る。リード/ライト手段は第1のライト動作中に、この
停電割込み要求フラグが立てられると、第1のライト処
理に続いて、第2のライト処理をそれまでライト処理し
ていたEEPROM内の領域(同じペーシ)内に行う。When the power supply circuit loses power, a power failure notice signal is output immediately before the power failure, and the power failure interrupt request flag is thereby set. When the power failure interrupt request flag is set during the first write operation, the read / write means continues to write the first write process, and then the second write process is performed on the area in the EEPROM (where Do in the same pace).
これにより、停電割込み処理に要する時間を短くする
ことが可能となる。This makes it possible to shorten the time required for the power failure interrupt process.
〈実施例〉 以下図面を用いて、本考案の一実施例を詳細に説明す
る。<Embodiment> An embodiment of the present invention will be described in detail below with reference to the drawings.
第1図は、本考案の一実施例を示す構成概念図であ
る。図において、1はマイクロプロセッサ、2はこのマ
イクロプロセッサに電力を供給している電源回路、3は
マイクロプロセッサ1にバスBSを介して結ばれているEE
PROM、4はROM、5はRAMである。FIG. 1 is a conceptual diagram showing the construction of an embodiment of the present invention. In the figure, 1 is a microprocessor, 2 is a power supply circuit for supplying power to the microprocessor, and 3 is an EE connected to the microprocessor 1 via a bus BS.
PROM, 4 is ROM, and 5 is RAM.
マイクロプロセッサ1において、11は電源回路2から
停電発生の直前に出力される停電予告信号を受け、立て
られる停電割込み要求フラグ、12はEEPROM3を含む各メ
モリへのリード/ライト手段である。このリード/ライ
ト手段は、EEPROMへのデータのライト処理に、例えば第
1のライト処理(この間割込み禁止)と、停電予告信号
による割込み要求に基づく第2のライト処理が少なくと
も用意されている。In the microprocessor 1, 11 is a power failure interrupt request flag which is set by receiving a power failure notice signal output immediately before the occurrence of a power failure from the power supply circuit 2, and 12 is a read / write means for each memory including the EEPROM 3. The read / write means is provided with, for example, at least a first write processing (interruption prohibited during this time) and a second write processing based on an interrupt request by a power failure advance notice signal for writing data to the EEPROM.
13は停電割込み要求フラグ11の状態を読み込むフラグ
状態読み込み手段で、ここで読み込まれた状態データ
は、メモリのリード/ライト手段12に伝えられる。Reference numeral 13 is a flag status reading means for reading the status of the power failure interrupt request flag 11, and the status data read here is transmitted to the read / write means 12 of the memory.
ここで、第1のライト処理,第2のライト処理につい
て、本考案が、例えば、プロセスからの信号を監視して
いて、その信号の値が予め設定してある上下限範囲を越
えると警報を出力するような警報装置に適用される場合
を例にとって説明する。Here, regarding the first write processing and the second write processing, the present invention monitors, for example, a signal from a process and gives an alarm when the value of the signal exceeds a preset upper and lower limit range. A case where the present invention is applied to an alarm device for outputting will be described as an example.
このような警報装置にあっては、前記の上下限範囲を
決めるための上限値,下限値(パラメータ)を、ユーザ
が計器の前面から任意に設定できるように構成してあ
る。設定したパラメータは、RAM5(このRAM5はバッテリ
ーバックアップされていないものとする)あるいは、電
源が切れた場合にもこれらのパラメータが消失しないよ
うに希望する場合はEEPROM3に書き込まれる。In such an alarm device, the user can arbitrarily set the upper limit value and the lower limit value (parameter) for determining the upper and lower limit ranges from the front of the instrument. The set parameters are written to RAM5 (assuming that RAM5 is not backed up by a battery) or EEPROM3 if you do not want these parameters to be lost even when the power is turned off.
ユーザは、設定した各パラメータが電源が切れた場合
にも消失しないように希望する場合、第1のライト処理
の指示を行い各設定パラメータを、EEPROM3側に書き込
む処理を行う。If the user desires that the set parameters not be lost even when the power is turned off, the user gives an instruction for the first write process and writes each set parameter to the EEPROM 3 side.
この様に、設定されたパラメータ等を例えば外部から
の指示等に基づいてEEPROM3側に書き込むような処理が
第1のライト処理になる。In this way, the process of writing the set parameters and the like to the EEPROM 3 side based on, for example, an instruction from the outside is the first write process.
一方、警報装置には監視すべき信号が印加されている
が、監視状態で一時的に停電が発生した場合、停電回復
後も同じ入力値から継続的に監視をしたいという要望が
ある。このような要望を満たす為には、停電発生時に停
電発生直前の入力値を停電予告信号に基づいて、一時的
にEEPROMに書き込む処理が行われる。On the other hand, although a signal to be monitored is applied to the alarm device, there is a demand to continuously monitor from the same input value even after the power failure is recovered when a power failure occurs temporarily in the monitoring state. In order to meet such a demand, a process of temporarily writing the input value immediately before the occurrence of the power failure to the EEPROM based on the power failure notice signal when the power failure occurs is performed.
この様に、停電割込み要求に基づいて、例えば入力値
を一時的にEEPROMに書き込む処理が第2のライト処理に
なる。As described above, the process of temporarily writing the input value to the EEPROM based on the power interruption request is the second write process.
このように構成された装置の動作を説明すれば以下の
通りである。The operation of the device configured as described above will be described below.
EEPROM3への通常のライト処理としては、複数個あ
り、それぞれEEPROM内の別々のページ(例えばNEC製
μPD28C64の場合、1ページ32バイトのブロックになっ
ており、アドレスの下位5ビットより上位の部分が共通
のもの)へライトするようになっている。There are multiple normal write operations to EEPROM3, each of which has a different page (for example, NEC
In the case of the µPD28C64, one page is a 32-byte block, and the upper part of the lower 5 bits of the address is common).
第2図は、この様な第1のライト処理中に、停電予告
信号が出力された場合の動作を示すタイムチャートであ
る。FIG. 2 is a time chart showing the operation when a power failure advance notice signal is output during such a first write process.
(a)は停電割込み要求信号であり、(b)に示す第1
のライト処理中に停電が発生しているものとする。(A) is a power failure interrupt request signal, and is the first signal shown in (b).
It is assumed that a power failure has occurred during the write processing of.
マイクロプロセッサ1内のフラグ状態読み込み手段13
は、(b)に示すライト処理の最後付近の時点t1で、停
電割込み要求フラグ11の状態を読み込み、フラグが立て
られていると(停電割込み要求が有る場合)、停電割込
み要求に基づくEEPROM内への第2のライト処理を、
(b)に示すようにそれまでライトしていた領域と同一
ページ内にライトする。なお、この領域には、第2のラ
イト処理によるデータが格納できるスペースが常にある
ものとする。Flag state reading means 13 in the microprocessor 1
Reads the state of the power failure interrupt request flag 11 at time t1 near the end of the write processing shown in (b), and if the flag is set (when there is a power failure interrupt request), the EEPROM based on the power failure interrupt request The second write process to
As shown in (b), writing is performed within the same page as the area that has been written until then. It is assumed that this area always has a space for storing data by the second write processing.
この様な動作は、第2のライト処理のアドレスを、第
1のライト処理のアドレスと同一ページに割り付けるこ
とにより、第1のライト処理に続いて第2のライト処理
を連続して行え、ページモードライトが実行できる。In such an operation, by assigning the address of the second write processing to the same page as the address of the first write processing, the second write processing can be continuously performed after the first write processing. Mode light can be executed.
ここで、第2のライト処理が終了後、(c)に示すよ
うに停電割込み処理が行われるが、ここでの停電割込み
処理は、既に第1のライト処理に連続して行った第2の
ライト処理によりEEPROMへのデータ書込み処理(ライト
処理)が終了しているので、このライト処理を除いた他
の停電割込処理(例えば各種フラグのリセット処理等)
が行われる。Here, after the completion of the second write processing, the power failure interrupt processing is performed as shown in (c), but the power failure interrupt processing here is the second power processing which has already been performed in succession to the first write processing. Since the data writing process (write process) to the EEPROM has been completed by the write process, other power interruption interrupt processes (eg reset process of various flags, etc.) excluding this write process
Is done.
第3図は、上記以外の状態で、停電割込みが発生した
場合の動作を示すタイムチャートである。FIG. 3 is a time chart showing the operation when a power interruption is generated in a state other than the above.
この様な状態では、(a)に示すように停電割込み要
求が発生すると、その時点で(b)に示すように直ちに
この要求にも基づく停電割込み処理(第2のライト処理
を含む)を実行する。この場合でのライト処理は、EEPR
OM内のある決まった領域内に行われる。In this state, when a power failure interrupt request is generated as shown in (a), the power failure interrupt processing (including the second write processing) based on this request is immediately executed at that time as shown in (b). To do. The write process in this case is EEPR
It is done in a certain area within the OM.
〈考案の効果〉 以上詳細に説明したように、本考案によれば、EEPROM
へのライト処理中に、停電割込みが発生し、その割込み
の中でもライト処理をおこなう場合、両方のライト処理
を続けて行うようにしたもので、別々にこれらのライト
処理を行う場合に必要となる書き込み完了の待ち時間を
不要にでき、停電割込みに要する時間を短くすることが
できる。<Effect of Device> As described in detail above, according to the present invention, the EEPROM
When a power failure interrupt occurs during write processing to, and if the write processing is performed even within that interrupt, both write processing are performed consecutively, which is necessary when performing these write processing separately. The waiting time for the completion of writing can be eliminated, and the time required for a power interruption can be shortened.
第1図は本考案の一実施例を示す構成概念図、第2図は
第1のライト処理中に、停電予告信号が出力された場合
の動作を示すタイムチャート、第3図は第2図に示す以
外の状態で、停電割込みが発生した場合の動作を示すタ
イムチャートである。 1……マイクロプロセッサ 2……電源回路、3……EEPROM 4……ROM、5……RAM 11……停電割込み要求フラグ 12……リード/ライト手段 13……フラグ状態読み込み手段FIG. 1 is a conceptual diagram showing the configuration of an embodiment of the present invention, FIG. 2 is a time chart showing the operation when a power failure notice signal is output during the first write processing, and FIG. 3 is FIG. 7 is a time chart showing the operation when a power interruption is generated in a state other than that shown in FIG. 1 ... Microprocessor 2 ... Power supply circuit 3 ... EEPROM 4 ... ROM 5 ... RAM 11 ... Power interruption request flag 12 ... Read / write means 13 ... Flag status reading means
Claims (1)
手段と、停電予告信号を受けると立てられる停電割込み
要求フラグとを備え、 前記リード/ライト手段は、 前記EEPROMへのデータのライト処理に、少なくとも当該
ライト処理中は割込みが禁止される第1のライト処理
と、停電予告信号による割込み要求に基づく第2のライ
ト処理が用意されており、 前記第1のライト処理を行っている途中で停電割込み要
求フラグが立てられると、当該第1のライト処理の中で
前記第2のライト処理を引続き行うように構成されてい
ることを特徴とするEEPROMのデータ書込み装置。1. An EEPROM, a read / write means for the EEPROM, and a power failure interrupt request flag which is set when a power failure advance signal is received, and the read / write means is for writing data to the EEPROM. At least during the write processing, a first write processing in which an interrupt is prohibited and a second write processing based on an interrupt request by a power failure notice signal are prepared, and while the first write processing is being performed, An EEPROM data writing device, characterized in that, when a power failure interrupt request flag is set, the second write process is continuously performed in the first write process.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP10627589U JPH082880Y2 (en) | 1989-09-11 | 1989-09-11 | EEPROM data writing device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP10627589U JPH082880Y2 (en) | 1989-09-11 | 1989-09-11 | EEPROM data writing device |
Publications (2)
Publication Number | Publication Date |
---|---|
JPH0345299U JPH0345299U (en) | 1991-04-25 |
JPH082880Y2 true JPH082880Y2 (en) | 1996-01-29 |
Family
ID=31655011
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP10627589U Expired - Lifetime JPH082880Y2 (en) | 1989-09-11 | 1989-09-11 | EEPROM data writing device |
Country Status (1)
Country | Link |
---|---|
JP (1) | JPH082880Y2 (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP5348541B2 (en) * | 2009-05-20 | 2013-11-20 | ルネサスエレクトロニクス株式会社 | Semiconductor device |
-
1989
- 1989-09-11 JP JP10627589U patent/JPH082880Y2/en not_active Expired - Lifetime
Also Published As
Publication number | Publication date |
---|---|
JPH0345299U (en) | 1991-04-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JPS63223901A (en) | On-vehicle controller | |
JPH082880Y2 (en) | EEPROM data writing device | |
JPH03252993A (en) | Information writing device for e2prom | |
JP2001147863A (en) | Flash memory rewrite device | |
JPH0731640B2 (en) | Disk access control method | |
JP3207333B2 (en) | Programmable controller | |
JP2659115B2 (en) | Sequence controller | |
JPH1165884A (en) | Microcomputer and debugging method therefor | |
JPH0357049A (en) | Microcomputer incorporating eeprom | |
JP2555182B2 (en) | Process control system with monitor function | |
JPH03250347A (en) | Memory device | |
JPS58168121A (en) | Processing system of power failure restoration | |
KR930002263Y1 (en) | Resume processor | |
JPS60147858A (en) | System for reading out content of memory in operation | |
JPS6034132B2 (en) | programmable controller | |
JPS62287345A (en) | Memory access state monitoring device | |
JPH02210515A (en) | System resetting system | |
JPH02227756A (en) | Digital arithmetic unit | |
JPH02252039A (en) | Memory control system for processor | |
JPS6284346A (en) | Memory dumping system | |
JPH02156317A (en) | Initializing system | |
JPS62272815A (en) | Digital protective relay | |
JPH10228787A (en) | Input/output module | |
JPS60178556A (en) | State display system | |
JPH04171491A (en) | Electronic musical instrument |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
EXPY | Cancellation because of completion of term |