JP2001318741A - Program execution device - Google Patents
Program execution deviceInfo
- Publication number
- JP2001318741A JP2001318741A JP2000139166A JP2000139166A JP2001318741A JP 2001318741 A JP2001318741 A JP 2001318741A JP 2000139166 A JP2000139166 A JP 2000139166A JP 2000139166 A JP2000139166 A JP 2000139166A JP 2001318741 A JP2001318741 A JP 2001318741A
- Authority
- JP
- Japan
- Prior art keywords
- voltage
- circuit
- program
- power supply
- signal
- 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
Links
- 238000012545 processing Methods 0.000 claims abstract description 54
- 238000001514 detection method Methods 0.000 claims abstract description 38
- 238000007599 discharging Methods 0.000 claims abstract description 14
- 238000000034 method Methods 0.000 claims description 42
- 239000003990 capacitor Substances 0.000 claims description 9
- 238000010586 diagram Methods 0.000 description 6
- 230000007274 generation of a signal involved in cell-cell signaling Effects 0.000 description 4
- 238000013459 approach Methods 0.000 description 3
- 230000006870 function Effects 0.000 description 3
- 230000003213 activating effect Effects 0.000 description 2
- 230000004913 activation Effects 0.000 description 2
- 230000007423 decrease Effects 0.000 description 2
- 239000004973 liquid crystal related substance Substances 0.000 description 2
- 230000007257 malfunction Effects 0.000 description 2
- 230000002093 peripheral effect Effects 0.000 description 2
- 208000032368 Device malfunction Diseases 0.000 description 1
- 238000004590 computer program Methods 0.000 description 1
- 238000012790 confirmation Methods 0.000 description 1
- 239000013256 coordination polymer Substances 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 239000007788 liquid Substances 0.000 description 1
- 238000012423 maintenance Methods 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 230000003071 parasitic effect Effects 0.000 description 1
- 238000003825 pressing Methods 0.000 description 1
- 238000012795 verification Methods 0.000 description 1
Landscapes
- Power Sources (AREA)
- Techniques For Improving Reliability Of Storages (AREA)
- Stand-By Power Supply Arrangements (AREA)
Abstract
Description
【0001】[0001]
【発明が属する技術分野】本発明は、コンピュータプロ
グラム(以下、単に「プログラム」と称す)を実行する
プログラム実行装置に関する。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a program execution device for executing a computer program (hereinafter, simply referred to as "program").
【0002】[0002]
【従来の技術】従来では、プログラムの実行中に外部か
らの電源が遮断されたとき、即座にバックアップ電源に
切り替えて引き続いて同じプログラムを実行する。2. Description of the Related Art Conventionally, when an external power supply is cut off during execution of a program, the power supply is immediately switched to a backup power supply and the same program is subsequently executed.
【0003】[0003]
【発明が解決しようとする課題】しかしながら、バック
アップ電源の充電量が少なければ、プログラム実行装置
の駆動が不安定になり、それまでのプログラムの実行に
よって得られた処理結果が消失してしまうという問題点
があった。However, if the amount of charge of the backup power supply is small, the drive of the program execution device becomes unstable, and the processing results obtained by executing the program up to that point are lost. There was a point.
【0004】本発明は上記の問題点を解決するためにな
されたものであり、バックアップ電源の少ない充電量で
も処理結果が消失してしまうことを防ぐことができるプ
ログラム実行装置を得ることを目的とする。SUMMARY OF THE INVENTION The present invention has been made to solve the above problems, and has as its object to provide a program execution device capable of preventing a processing result from being lost even with a small amount of charge of a backup power supply. I do.
【0005】[0005]
【課題を解決するための手段】請求項1に記載の課題解
決手段は、直流電源電圧を受け、当該直流電源電圧が第
1閾値閾電圧より大きいときにオン信号、そうでないと
きにオフ信号を出力する検出回路と、前記直流電源電圧
を電源端子に受けて駆動し、前記オン信号を受けると第
1種プログラムを実行し、前記オフ信号を受けると前記
第1種プログラムを実行することによって得られた処理
結果を保護する第2種プログラムを実行するとともに放
電信号を生成する実行回路と、 前記直流電源電圧を充
電する充電回路と、前記放電信号を受けると、前記充電
回路の充電電圧を前記電源端子へ放電する放電回路とを
備える。According to a first aspect of the present invention, a DC power supply voltage is received, and an ON signal is output when the DC power supply voltage is higher than a first threshold voltage, and an OFF signal is output otherwise. A detection circuit that outputs the DC power supply voltage to a power supply terminal, drives the power supply terminal, executes the first type program when the ON signal is received, and executes the first type program when the OFF signal is received. An execution circuit that executes a second type program that protects the processing result obtained, and generates a discharge signal; a charging circuit that charges the DC power supply voltage; and receives the discharge signal, and changes a charging voltage of the charging circuit. A discharge circuit for discharging to a power supply terminal.
【0006】請求項2に記載の課題解決手段は、前記電
源端子の電圧が当該実行回路が動作可能な予め設定され
た第2閾値電圧になったときに前記放電信号を前記放電
回路に出力する出力回路をさらに備える。A second aspect of the present invention is to output the discharge signal to the discharge circuit when the voltage of the power supply terminal reaches a predetermined second threshold voltage at which the execution circuit can operate. An output circuit is further provided.
【0007】請求項3に記載の課題解決手段において、
前記第2種プログラムは前記実行回路をリセットする処
理を含む。[0007] In the means for solving problems according to claim 3,
The second type program includes a process of resetting the execution circuit.
【0008】請求項4に記載の課題解決手段において、
前記第1種および第2種プログラムは、当該第1種およ
び第2種プログラムの処理結果が所定条件を満たしてい
なければ、前記実行回路をリセットする処理を含む。[0008] In the means for solving problems according to claim 4,
The first and second type programs include a process of resetting the execution circuit if the processing results of the first and second type programs do not satisfy a predetermined condition.
【0009】請求項5に記載の課題解決手段において、
前記充電回路は、前記直流電源電圧を充電するコンデン
サを含む。[0009] In the means for solving problems according to claim 5,
The charging circuit includes a capacitor that charges the DC power supply voltage.
【0010】請求項6に記載の課題解決手段において、
前記検出回路、前記実行回路、前記充電回路、前記放電
回路は1チップ上に形成されている。[0010] In the means for solving problems according to claim 6,
The detection circuit, the execution circuit, the charging circuit, and the discharging circuit are formed on one chip.
【0011】[0011]
【発明の実施の形態】(実施の形態1)図1は本発明の
実施の形態1のプログラム実行装置を示すブロック図で
ある。実施の形態1のプログラム実行装置は、電源回路
10、検出回路20、実行回路30、出力回路40、放
電回路50、充電回路60、入力部71、出力部72、
リセット回路80および電源ライン90を含む。(Embodiment 1) FIG. 1 is a block diagram showing a program execution apparatus according to Embodiment 1 of the present invention. The program execution device according to the first embodiment includes a power supply circuit 10, a detection circuit 20, an execution circuit 30, an output circuit 40, a discharge circuit 50, a charge circuit 60, an input unit 71, an output unit 72,
It includes a reset circuit 80 and a power supply line 90.
【0012】まず、実施の形態1のプログラム実行装置
の構成について説明する。First, the configuration of the program execution device according to the first embodiment will be described.
【0013】電源回路10は外部から直流電圧V0を受
け、直流電圧Va、直流電圧Vbおよび直流電圧Vcを
生成して出力する。Power supply circuit 10 receives DC voltage V0 from the outside, generates and outputs DC voltage Va, DC voltage Vb and DC voltage Vc.
【0014】検出回路20は直流電圧Vbを受け、検出
信号C1を生成して出力する。検出回路20は、例えば
図2に示すようなインバータ機能を有する回路である。
図2において、Vdは電源回路10が生成する直流電
圧、その他の符号は図1に対応している。検出回路20
は、図2のような回路以外であってもよく、直流電圧V
bが閾値電圧cより大きいとき”0”の検出信号C1を
出力し、そうでないとき”1”の検出信号C1を出力す
るものであればよい。The detection circuit 20 receives the DC voltage Vb, generates and outputs a detection signal C1. The detection circuit 20 is a circuit having an inverter function as shown in FIG. 2, for example.
2, Vd is a DC voltage generated by the power supply circuit 10, and other symbols correspond to FIG. Detection circuit 20
May be a circuit other than the circuit shown in FIG.
If b is larger than the threshold voltage c, a detection signal C1 of "0" is output, and otherwise, a detection signal C1 of "1" is output.
【0015】図1の実行回路30は、電源端子が電源ラ
イン90に接続され、検出信号C1を受け、制御信号C
2を生成して出力する。また、実行回路30は、入力部
71から入力信号C4を受け、処理結果C5を生成して
出力部72に出力する。An execution circuit 30 shown in FIG. 1 has a power supply terminal connected to a power supply line 90, receives a detection signal C1, and receives a control signal C1.
2 is generated and output. Further, the execution circuit 30 receives the input signal C4 from the input unit 71, generates a processing result C5, and outputs it to the output unit 72.
【0016】図3は、実行回路30の内部構成を示すブ
ロック図である。実行回路30は割込信号生成回路3
1、CPU32および主メモリ33を含む。割込信号生
成回路31は、検出信号C1およびCPU32からの信
号D1を受け、検出信号C1および信号D1の排他的論
理和を信号D2としてCPU32に出力する。主メモリ
33およびCPU32の動作を図4および図5を用いて
説明する。図4に示すように、検出信号C1が”1”で
信号D1が”0”のとき、信号D2は”1”である(時
刻ta)。この状態で、検出信号C1が”0”になる
と、割込信号生成回路31は信号D2を立ち下げる(時
刻tb)。CPU32は信号D2の立ち下がりを受ける
と、信号D1を反転させて”1”にする。これによっ
て、信号D2は再び”1”になる(時刻tc)。また、
図5に示すように、検出信号C1が”0”で信号D1
が”1”のとき、信号D2は”1”である(時刻t
a)。この状態で、検出信号C1が”1”になると、割
込信号生成回路31は信号D2を立ち下げる(時刻t
b)。CPU32は信号D2の立ち下がりを受けると、
信号D1を反転させて”0”にする。これによって、信
号D2は再び”1”になる(時刻tc)。以上のよう
に、検出信号C1が”0”から”1”あるいは”1”か
ら”0”に変化する度に、CPU32は信号D2の立ち
下がりパルス(割込信号)を受けることになる。FIG. 3 is a block diagram showing the internal configuration of the execution circuit 30. The execution circuit 30 includes the interrupt signal generation circuit 3
1, including a CPU 32 and a main memory 33. The interrupt signal generation circuit 31 receives the detection signal C1 and the signal D1 from the CPU 32, and outputs an exclusive OR of the detection signal C1 and the signal D1 to the CPU 32 as a signal D2. The operations of the main memory 33 and the CPU 32 will be described with reference to FIGS. As shown in FIG. 4, when the detection signal C1 is "1" and the signal D1 is "0", the signal D2 is "1" (time ta). In this state, when the detection signal C1 becomes "0", the interrupt signal generation circuit 31 causes the signal D2 to fall (time tb). When receiving the falling edge of the signal D2, the CPU 32 inverts the signal D1 to "1". As a result, the signal D2 becomes "1" again (time tc). Also,
As shown in FIG. 5, when the detection signal C1 is "0" and the signal D1
Is "1", the signal D2 is "1" (at time t).
a). In this state, when the detection signal C1 becomes “1”, the interrupt signal generation circuit 31 causes the signal D2 to fall (time t).
b). When the CPU 32 receives the falling edge of the signal D2,
The signal D1 is inverted to “0”. As a result, the signal D2 becomes "1" again (time tc). As described above, every time the detection signal C1 changes from "0" to "1" or from "1" to "0", the CPU 32 receives the falling pulse (interrupt signal) of the signal D2.
【0017】また、CPU32は主メモリ33との間で
データやプログラムを実行することによって得られた処
理結果をやりとりしたり、主メモリ33からプログラム
の命令を取り込んだりする。主メモリ33に格納されて
いるデータやプログラムは入力部71(図1)から与え
られる。The CPU 32 exchanges processing results obtained by executing data and programs with the main memory 33 and fetches program instructions from the main memory 33. Data and programs stored in the main memory 33 are provided from the input unit 71 (FIG. 1).
【0018】出力回路40は、電源ライン90に接続さ
れ、制御信号C2を受け、制御信号C3を出力する。出
力回路40の動作は、制御信号C2が”1”の場合は制
御信号C3を”0”に固定し、制御信号C2が”0”の
場合は電圧V3が駆動最低電圧dより大きいとき制御信
号C3を”0”にし、電圧V3が駆動最低電圧d以下の
とき制御信号C3を”1”にする。The output circuit 40 is connected to the power supply line 90, receives the control signal C2, and outputs a control signal C3. The operation of the output circuit 40 is such that when the control signal C2 is "1", the control signal C3 is fixed to "0", and when the control signal C2 is "0", the voltage V3 is higher than the driving minimum voltage d. C3 is set to "0", and when the voltage V3 is equal to or lower than the driving minimum voltage d, the control signal C3 is set to "1".
【0019】充電回路60は直流電圧Vcを受けて充電
する。この充電電圧がV2である。図6に充電回路60
の内部構成の例を示す。充電回路60は、充電完了検出
回路61、充電回路本体62およびコンデンサ63を含
む。図6において、Veは電源回路10が生成する基準
直流電圧、その他の符号は図1に対応している。充電回
路本体62は直流電圧Vcを受けてコンデンサ63に充
電する。充電完了検出回路61は、充電電圧V2が基準
電圧Veに等しくなるように、充電回路本体62を制御
する。これによって、充電回路60は充電電圧V2が基
準電圧Veに等しくなると自動的に充電を停止する。充
電回路60は、図6のような回路以外であってもよく、
直流電圧Vcを受けて充電できるものであればよい。The charging circuit 60 receives and charges the DC voltage Vc. This charging voltage is V2. FIG. 6 shows a charging circuit 60.
2 shows an example of the internal configuration. The charging circuit 60 includes a charging completion detection circuit 61, a charging circuit main body 62, and a capacitor 63. 6, Ve is a reference DC voltage generated by the power supply circuit 10, and other symbols correspond to FIG. The charging circuit main body 62 receives the DC voltage Vc and charges the capacitor 63. The charging completion detection circuit 61 controls the charging circuit main body 62 so that the charging voltage V2 becomes equal to the reference voltage Ve. As a result, the charging circuit 60 automatically stops charging when the charging voltage V2 becomes equal to the reference voltage Ve. The charging circuit 60 may be other than the circuit shown in FIG.
Any device that can receive and charge the DC voltage Vc may be used.
【0020】図1の放電回路50は、制御信号C3およ
び充電電圧V2を受け、制御信号C3に応じて充電電圧
V2を電源ライン90に出力する。なお、放電回路50
は充電電圧V2を、そのまま電源ライン90に出力して
もよいし、所定の電圧に変換して電源ライン90に出力
してもよい。The discharge circuit 50 shown in FIG. 1 receives the control signal C3 and the charging voltage V2, and outputs the charging voltage V2 to the power supply line 90 according to the control signal C3. Note that the discharge circuit 50
May output the charging voltage V2 as it is to the power supply line 90, or may convert it to a predetermined voltage and output it to the power supply line 90.
【0021】入力部71は、例えば、外部の周辺装置か
らのデータを入力する入力インタフェース、あるいはキ
ーボード、あるいはマウス、あるいはタッチパネルであ
る。The input unit 71 is, for example, an input interface for inputting data from an external peripheral device, a keyboard, a mouse, or a touch panel.
【0022】出力部72は、実行回路30がプログラム
を実行することによって得られた処理結果を出力する装
置であり、例えば、外部の周辺装置へデータを出力する
出力インタフェース、あるいは液晶パネル、あるいはC
RT、あるいはフラッシュメモリ等の不揮発性メモリで
ある。The output unit 72 is a device that outputs a processing result obtained by executing the program by the execution circuit 30. For example, an output interface that outputs data to an external peripheral device, a liquid crystal panel, or a C
RT or a nonvolatile memory such as a flash memory.
【0023】リセット回路80は押しボタンスイッチを
含み、例えばプログラムが暴走したときに操作者が押し
ボタンスイッチを押すことによって実行回路30をリセ
ットする。The reset circuit 80 includes a push button switch, and resets the execution circuit 30 by, for example, an operator pressing the push button switch when the program runs away.
【0024】なお、”0”の検出信号C1がオン信号で
あり、”1”の検出信号C1がオフ信号であり、”1”
の制御信号C3および”0”の制御信号C2が放電信号
である。また、直流電圧Va、直流電圧Vb、直流電圧
Vc、直流電圧Vdおよび基準電圧Veは直流電源電圧
の概念に含まれる。The detection signal C1 of "0" is an ON signal, the detection signal C1 of "1" is an OFF signal, and "1".
And the control signal C2 of "0" are discharge signals. The DC voltage Va, the DC voltage Vb, the DC voltage Vc, the DC voltage Vd, and the reference voltage Ve are included in the concept of the DC power supply voltage.
【0025】また、全ての図の各信号において、”0”
および”1”の一方が高電位、他方が低電位である。In each signal of all the figures, "0"
And one of "1" is a high potential and the other is a low potential.
【0026】次に、全体の動作を図7を用いて説明す
る。Next, the overall operation will be described with reference to FIG.
【0027】まず、時刻t0では、直流電圧V0はGN
D(接地電位)であり、充電回路60は全く充電されて
いないために充電電圧V2もGNDであるとする。検出
信号C1は、実行回路30が駆動しておらず”0”であ
る。電源ライン90の電圧V3はGND、検出信号C1
は”0”、制御信号C2は”1”、制御信号C3は”
0”である。First, at time t0, DC voltage V0 is set to GN.
D (ground potential), and since the charging circuit 60 is not charged at all, the charging voltage V2 is also assumed to be GND. The detection signal C1 is “0” because the execution circuit 30 is not driven. The voltage V3 of the power supply line 90 is GND, the detection signal C1
Is "0", the control signal C2 is "1", and the control signal C3 is "1".
0 ".
【0028】次に、時刻t1で直流電圧V0が立ち上が
る。これに従って、電源回路10は駆動し、直流電圧V
a、直流電圧Vbおよび直流電圧Vcは同様に変化し、
それぞれ電圧a1、電圧a2、電圧a3に近づく。な
お、電圧a1、電圧a2、電圧a3は互いに異なる大き
さであってもよいし、等しくてもよいし、正電圧、負電
圧のどちらでもよい。Next, at time t1, the DC voltage V0 rises. According to this, the power supply circuit 10 is driven, and the DC voltage V
a, DC voltage Vb and DC voltage Vc change similarly,
The voltages approach the voltage a1, the voltage a2, and the voltage a3, respectively. The voltage a1, the voltage a2, and the voltage a3 may be different in magnitude from each other, may be equal to each other, and may be either a positive voltage or a negative voltage.
【0029】電源ライン90には、直流電圧Vaが与え
られるので、電源ライン90の電圧V3は直流電圧Va
と同様に変化し、実行回路30の電源端子に印加され
る。実行回路30は、電圧V3が駆動最低電圧d以上に
なると正常に駆動できる(時刻t2)。Since the DC voltage Va is applied to the power supply line 90, the voltage V3 of the power supply line 90 is changed to the DC voltage Va.
, And is applied to the power supply terminal of the execution circuit 30. The execution circuit 30 can drive normally when the voltage V3 becomes equal to or higher than the driving minimum voltage d (time t2).
【0030】直流電圧V0が定常状態になると、直流電
圧Va、直流電圧Vb、直流電圧Vcはそれぞれ電圧a
1、電圧a2、電圧a3で一定になる。When the DC voltage V0 is in a steady state, the DC voltage Va, the DC voltage Vb, and the DC voltage Vc become the voltage a, respectively.
1, constant at voltage a2 and voltage a3.
【0031】実行回路30のCPU32は、主メモリ3
3に格納されている第1種プログラムを実行して主メモ
リ33に格納されているデータを処理する。The CPU 32 of the execution circuit 30 includes the main memory 3
3 to process the data stored in the main memory 33 by executing the first type program.
【0032】第1種プログラムの実行を詳しく説明す
る。第1種プログラムには、OS(オペレーティングシ
ステム)、放電停止処理を行うプログラム、リジューム
処理を行うプログラム、アプリケーションプログラムが
含まれる。まず、OSが起動した後、放電停止処理を行
うプログラムが実行されることで”1”の制御信号C2
が出力される。次に、後述するリジューム処理を行うプ
ログラムが実行される。次に、アプリケーションプログ
ラムが実行される。アプリケーションプログラムは、例
えば、入力部71から入力されたデータを所定の演算式
によって処理してその処理結果を主メモリ33に格納
し、必要なときに主メモリ33から出力部72へ出力す
る(例えば、不揮発性メモリ(出力部72)へ書き込
む)。The execution of the type 1 program will be described in detail. The first type program includes an OS (operating system), a program for performing a discharge stop process, a program for performing a resume process, and an application program. First, after the OS is started, the control signal C2 of “1” is executed by executing the program for performing the discharge stop processing.
Is output. Next, a program for performing a resume process described later is executed. Next, the application program is executed. For example, the application program processes data input from the input unit 71 by a predetermined arithmetic expression, stores the processing result in the main memory 33, and outputs the processing result from the main memory 33 to the output unit 72 when necessary (for example, , Writing to the non-volatile memory (output unit 72).
【0033】一方、その間に充電回路60は、直流電圧
Vcを受けて充電し、充電電圧V2が基準電圧Veにな
ると自動的に充電を停止する(時刻t3)。Meanwhile, the charging circuit 60 receives and charges the DC voltage Vc, and automatically stops charging when the charging voltage V2 becomes equal to the reference voltage Ve (time t3).
【0034】次に、時刻t4で直流電圧V0が遮断され
て急激にGNDになる。直流電圧V0が低下したことに
よって、電源回路10が生成する直流電圧Va、直流電
圧Vb、直流電圧VcもGNDに近づく。なお、電源回
路10の寄生容量等が原因で、直流電圧Va、直流電圧
Vb、直流電圧Vcの変動は直流電圧V0と比較して緩
やかである。Next, at time t4, the DC voltage V0 is cut off and suddenly becomes GND. As the DC voltage V0 decreases, the DC voltage Va, the DC voltage Vb, and the DC voltage Vc generated by the power supply circuit 10 also approach GND. It should be noted that the DC voltage Va, the DC voltage Vb, and the DC voltage Vc fluctuate more slowly than the DC voltage V0 due to the parasitic capacitance and the like of the power supply circuit 10.
【0035】直流電圧Vbが閾値電圧cになると、検出
回路20は検出信号C1を”0”から”1”にする。こ
れによって、実行回路30のCPU32に割込信号が与
えられ、CPU32は第2種プログラムをスケジューリ
ングして実行する(時刻t5)。When the DC voltage Vb becomes the threshold voltage c, the detection circuit 20 changes the detection signal C1 from "0" to "1". As a result, an interrupt signal is given to the CPU 32 of the execution circuit 30, and the CPU 32 schedules and executes the second type program (time t5).
【0036】第2種プログラムには、サスペンド処理を
行うプログラム、放電処理を行うプログラム、所望の処
理結果を得るためのプログラムが含まれる。サスペンド
処理とは、入力部71や出力部72等を省電力モードに
制御(個別ハード省電力制御)する処理であり、サスペ
ンド処理が行われた状態をサスペンド状態と称す。ま
ず、サスペンド処理を行うプログラムが実行されること
で入力部71および出力部72が省電力モードで動作す
る。次に、放電処理を行うプログラムが実行されること
で実行回路30は制御信号C2を”0”にする(時刻t
6)。なお、この時点では、電圧V3は駆動最低電圧d
以上なので、実行回路30は正常に動作できる。次に、
所望の処理結果を得るためのプログラムが実行される。
このプログラムを実行することによって、ここでは例え
ば、データ書き込み処理が行われ、第1種プログラムを
実行することによって得られた処理結果C5を主メモリ
33から出力部72の一である不揮発性メモリへの書き
込みが開始される。The second type program includes a program for performing a suspending process, a program for performing a discharging process, and a program for obtaining a desired processing result. The suspend process is a process of controlling the input unit 71, the output unit 72, and the like to the power saving mode (individual hardware power saving control), and a state in which the suspend process is performed is referred to as a suspend state. First, the input unit 71 and the output unit 72 operate in the power saving mode by executing the program for performing the suspend process. Next, the execution circuit 30 sets the control signal C2 to “0” by executing the program for performing the discharge process (at time t).
6). At this point, the voltage V3 is equal to the driving minimum voltage d.
Thus, the execution circuit 30 can operate normally. next,
A program for obtaining a desired processing result is executed.
By executing this program, here, for example, data write processing is performed, and the processing result C5 obtained by executing the first type program is transferred from the main memory 33 to the non-volatile memory which is one of the output units 72. Is started.
【0037】その後、電圧V3が駆動最低電圧dになる
(時刻t7)。このとき、出力回路40は制御信号C3
を”1”にする。放電回路50は、”1”の制御信号C
3を受けると、充電電圧V2を電源ライン90を介して
実行回路30の電源端子へ放電する。これによって、電
源ライン90の電圧V3が上昇して駆動最低電圧dより
大きくなり、実行回路30は安定した駆動を続けること
ができる。電圧V3が駆動最低電圧dより大きくなった
ので、出力回路40は制御信号C3を”0”にする。放
電回路50は、”0”の制御信号C3を受けると、充電
電圧V2を電源ライン90に放電するのを停止し、電圧
V3が駆動最低電圧dになる。以上のことが繰り返さ
れ、実行回路30の電源端子に充電電圧V2が補われ、
実行回路30はプログラムを正常に実行することがで
き、処理結果C5の不揮発性メモリへの書き込みを完了
することができる。このように、第1種プログラムを実
行することによって得られた処理結果C5を所望の処理
結果を得るためのプログラムによって不揮発性メモリへ
書き込んで保護して消失することを防ぐことができる。Thereafter, the voltage V3 becomes the minimum drive voltage d (time t7). At this time, the output circuit 40 outputs the control signal C3
To “1”. The discharge circuit 50 outputs the control signal C of “1”.
When receiving the signal 3, the charging voltage V2 is discharged to the power supply terminal of the execution circuit 30 through the power supply line 90. As a result, the voltage V3 of the power supply line 90 increases and becomes higher than the driving minimum voltage d, and the execution circuit 30 can continue stable driving. Since the voltage V3 has become higher than the minimum drive voltage d, the output circuit 40 sets the control signal C3 to "0". When receiving the control signal C3 of "0", the discharging circuit 50 stops discharging the charging voltage V2 to the power supply line 90, and the voltage V3 becomes the driving minimum voltage d. The above is repeated, and the charging voltage V2 is supplemented to the power supply terminal of the execution circuit 30,
The execution circuit 30 can normally execute the program, and can complete the writing of the processing result C5 into the nonvolatile memory. As described above, the processing result C5 obtained by executing the type 1 program can be protected by being written to the nonvolatile memory by the program for obtaining the desired processing result, and can be prevented from being lost.
【0038】そして、放電回路50の放電・放電停止が
繰り返されるごとに、充電回路60に充電された電荷は
少なくなっていき、時刻t8では、放電回路50が放電
しても、電圧V3は駆動最低電圧d以上にならず、実行
回路30は駆動できずに停止する。Each time the discharge circuit 50 is repeatedly discharged and stopped, the charge charged in the charge circuit 60 decreases. At time t8, even if the discharge circuit 50 discharges, the voltage V3 is driven. Since the voltage does not exceed the minimum voltage d, the execution circuit 30 cannot be driven and stops.
【0039】なお、時刻t8でプログラム実行装置が誤
動作すれば、操作者はリセット回路80の押しボタンを
押してリセットすればよい。If the program execution device malfunctions at time t8, the operator may press the push button of the reset circuit 80 to reset the program.
【0040】以上のように、実行回路30の電源端子に
は放電回路50から放電された電圧が補われることで、
実行回路30は時刻t8まで安定して駆動でき、この間
に、第1種プログラムを実行することによって得られた
処理結果C5を第2種プログラムの所望の処理結果を得
るためのプログラムによって保護して消失することを防
ぐことができ、操作者は所望の処理結果C5を得ること
ができる。As described above, the power supply terminal of the execution circuit 30 is supplemented with the voltage discharged from the discharge circuit 50,
The execution circuit 30 can be driven stably until time t8, during which the processing result C5 obtained by executing the type 1 program is protected by a program for obtaining a desired processing result of the type 2 program. The loss can be prevented, and the operator can obtain a desired processing result C5.
【0041】ところで、時刻t7から時刻t8の間に、
再び、直流電圧V0が立ち上がったとする(図8の時刻
t9)。これに従って、電源回路10は駆動し、直流電
圧Va、直流電圧Vbおよび直流電圧Vcは同様に変化
し、それぞれ電圧a1、電圧a2、電圧a3に近づく。By the way, between time t7 and time t8,
Assume that the DC voltage V0 rises again (time t9 in FIG. 8). Accordingly, the power supply circuit 10 is driven, and the DC voltage Va, the DC voltage Vb, and the DC voltage Vc change similarly, approaching the voltage a1, the voltage a2, and the voltage a3, respectively.
【0042】直流電圧Vbが閾値電圧cより大きくなる
と、検出回路20は検出信号C1を”0”にする。これ
によって、実行回路30のCPU32に割込信号が与え
られ、CPU32は第1種プログラムのリジューム処理
を行うプログラム、放電停止処理を行うプログラム、ア
プリケーションプログラムを順にスケジューリングして
実行する(時刻t10)。リジューム処理とは、サスペ
ンド処理を行う直前の状態に戻す処理を意味し、リジュ
ーム処理が行われた状態をリジューム状態と称す。基本
的には、入力部71および出力部72をサスペンド処理
を行う直前の状態に戻す制御(個別ハード復帰制御)を
行うが、ここでは、入力部71および出力部72は直流
電圧Va、直流電圧Vb、直流電圧Vcが電圧a1、電
圧a2、電圧a3になれば自然に元の状態に戻る。時刻
t10後では、電源ライン90の電圧V3は充分に電圧
a1に近づき、充電電圧V2に頼らなくても、実行回路
30は正常に駆動できる状態にある。そこで、放電停止
処理を行うプログラムが実行され、実行回路30のCP
U32は割込信号を受けると直ぐに制御信号C2を”
1”にする。出力回路40は、”1”の制御信号C2を
受けると制御信号C3を”0”に固定する。放電回路5
0は、”0”の制御信号C3を受けると、充電電圧V2
を電源ライン90に放電するのを停止する。その後、ア
プリケーションプログラムが実行される。When the DC voltage Vb exceeds the threshold voltage c, the detection circuit 20 sets the detection signal C1 to "0". As a result, an interrupt signal is given to the CPU 32 of the execution circuit 30, and the CPU 32 schedules and executes the program for performing the resume processing of the first type program, the program for performing the discharge stop processing, and the application program in order (time t10). The resume process means a process of returning to a state immediately before performing the suspend process, and a state in which the resume process is performed is referred to as a resume state. Basically, control is performed to return the input unit 71 and the output unit 72 to the state immediately before performing the suspend processing (individual hardware return control). Here, the input unit 71 and the output unit 72 are controlled by the DC voltage Va, the DC voltage When Vb and DC voltage Vc become voltage a1, voltage a2, and voltage a3, the state naturally returns to the original state. After the time t10, the voltage V3 of the power supply line 90 sufficiently approaches the voltage a1, and the execution circuit 30 can be driven normally without depending on the charging voltage V2. Then, a program for performing the discharge stop processing is executed, and the CP of the execution circuit 30 is executed.
Upon receiving the interrupt signal, U32 changes the control signal C2 to "
The output circuit 40 fixes the control signal C3 to "0" when receiving the control signal C2 of "1".
0 receives the control signal C3 of “0”, the charging voltage V2
Is stopped from being discharged to the power supply line 90. After that, the application program is executed.
【0043】つまり、サスペンド処理を行うプログラム
を実行することによって、入力部71、出力部72等を
省電力モードで動作させ、充電回路60の充電量の消費
を抑え、実行回路30をより長く駆動させ、再び、直流
電圧V0が立ち上がるまで、実行回路30を待機させる
ことができる。これによって、第1種プログラムを実行
することによって得られた処理結果C5を、サスペンド
処理を行うプログラムによって実行回路30を待機させ
て保護して消失することを防ぐことができる。That is, by executing the program for performing the suspending process, the input unit 71 and the output unit 72 are operated in the power saving mode, the consumption of the charge amount of the charging circuit 60 is suppressed, and the execution circuit 30 is driven for a longer time. Then, the execution circuit 30 can wait until the DC voltage V0 rises again. As a result, the processing result C5 obtained by executing the type 1 program can be protected by the execution circuit 30 being put on standby by the program for performing the suspend processing, and can be prevented from being lost.
【0044】以上のように、直流電圧Vbが閾値電圧c
より大きければ第1種プログラムを実行する。直流電圧
Vbが閾値電圧c以下になると、第1種プログラムを実
行することによって得られた処理結果を保護する第2種
プログラムを実行するとともに、実行回路30の電源端
子には直流電圧Vaに加えて放電回路50から放電され
た充電電圧V2が補われる。これによって、実行回路3
0はより長く安定して駆動することができ、その間に、
第1種プログラムを実行することによって得られた処理
結果を第2種プログラムによって保護して消失すること
を防ぐことができる。As described above, the DC voltage Vb is equal to the threshold voltage c.
If it is larger, the first type program is executed. When the DC voltage Vb becomes equal to or lower than the threshold voltage c, the second type program for protecting the processing result obtained by executing the first type program is executed, and the power supply terminal of the execution circuit 30 is connected to the DC voltage Va. Thus, the charging voltage V2 discharged from the discharging circuit 50 is supplemented. Thereby, the execution circuit 3
0 can be driven longer and more stable, while
The processing result obtained by executing the first type program can be protected by the second type program and prevented from being lost.
【0045】また、直流電圧V0は遮断されたのではな
く、直流電圧Vaが駆動最低電圧dより小さい僅かな電
圧が図7の時刻t7〜時刻t8で供給されている場合が
ある。この場合、充電回路60の充電量が僅かであって
も、直流電圧Vaと充電回路60からの充電電圧V2と
の合計により、実行回路30は長く安定して駆動でき
る。In some cases, the DC voltage V0 is not cut off, but a slight voltage at which the DC voltage Va is smaller than the minimum drive voltage d is supplied from time t7 to time t8 in FIG. In this case, even when the charging amount of the charging circuit 60 is small, the execution circuit 30 can be stably driven for a long time by the sum of the DC voltage Va and the charging voltage V2 from the charging circuit 60.
【0046】また、先に説明した放電回路50の放電・
放電停止の繰り返しによって、電圧V3が駆動最低電圧
dに達する分だけの電力量が放電回路50から少しずつ
供給されるので、充電回路60の充電量が僅かでも実行
回路30を長く安定して駆動させることができる。Further, the discharging of the discharging circuit 50 described above
By repeating the discharge stop, the amount of power that the voltage V3 reaches the driving minimum voltage d is supplied little by little from the discharging circuit 50. Therefore, even if the charging amount of the charging circuit 60 is small, the execution circuit 30 is driven stably for a long time. Can be done.
【0047】また、従来ではバックアップ電源の充電量
が少なければ、それまでのプログラムの実行によって得
られた処理結果が消失してしまうので、バックアップ電
源として充電容量の少ないコンデンサ63を適用できな
かったが、本発明では充電量が僅かでも上述のように処
理結果を保護して消失することを防ぐことができる。し
たがって、バックアップ電源としてコンデンサ63を適
用することができ、しかも、充電回路60を寿命のない
バックアップ電源として構成でき、充電池のように液漏
れがなく、メンテナンスを行う必要がない。Conventionally, if the amount of charge of the backup power supply is small, the processing result obtained by executing the program up to that point is lost, so that the capacitor 63 having a small charge capacity cannot be applied as the backup power supply. According to the present invention, even if the charge amount is small, the processing result can be protected and prevented from disappearing as described above. Therefore, the capacitor 63 can be applied as a backup power supply, and the charging circuit 60 can be configured as a backup power supply with no life, so that there is no liquid leakage unlike a rechargeable battery and no maintenance is required.
【0048】また、出力回路40は、図2のような回路
に代えて、制御信号C2が”1”になったとき制御信号
C3を”0”に保持し、制御信号C2が”0”の状態で
電圧V3が駆動最低電圧d以下になったとき制御信号C
3を”1”に保持するラッチ回路でもよい。ラッチ回路
に代えると、図7の時刻t7〜時刻t8は常に”1”で
ある。このように、出力回路40は、電源端子の電圧V
3が実行回路30が動作可能な予め設定された閾値電圧
(以上の説明では駆動最低電圧dに等しい)になったと
きに”0”の制御信号C3を放電回路50に出力する。
これによって、電圧V3が駆動最低電圧dになるまでは
実行回路30は直流電圧Vaのみで駆動するので、その
分、実行回路30はさらに長く安定して駆動することが
できる。なお、予め設定された閾値電圧は、駆動最低電
圧dより大きくてもよい。The output circuit 40 holds the control signal C3 at "0" when the control signal C2 becomes "1" and replaces the control signal C2 with "0" when the control signal C2 becomes "1". When the voltage V3 becomes equal to or lower than the driving minimum voltage d in the state, the control signal C
A latch circuit that holds 3 at “1” may be used. When a latch circuit is used, time t7 to time t8 in FIG. 7 is always "1". As described above, the output circuit 40 outputs the voltage V
3 outputs a control signal C3 of “0” to the discharge circuit 50 when a predetermined threshold voltage (equal to the driving minimum voltage d in the above description) is reached at which the execution circuit 30 can operate.
As a result, the execution circuit 30 is driven only by the DC voltage Va until the voltage V3 reaches the minimum drive voltage d, so that the execution circuit 30 can be driven stably for a longer time. Note that the preset threshold voltage may be higher than the minimum drive voltage d.
【0049】また、直流電圧V0を遮断した後、サスペ
ンド状態で実行回路30の状態を保持するので、OSを
再び起動する必要がなく、直流電圧V0が投入された直
後にプログラムを直ちに立ち上げることができる。Since the state of the execution circuit 30 is maintained in the suspended state after the DC voltage V0 is cut off, it is not necessary to restart the OS, and the program is immediately started immediately after the DC voltage V0 is turned on. Can be.
【0050】また、出力回路40をラッチ回路に置き換
えた場合、リセット回路80からの信号をこのラッチ回
路に入力して、操作者がリセット回路80の押しボタン
を押せば、制御信号C3を”0”にリセットする構成に
してもよい。When the output circuit 40 is replaced by a latch circuit, a signal from the reset circuit 80 is input to this latch circuit, and if the operator presses a push button of the reset circuit 80, the control signal C3 is set to "0". "May be reset.
【0051】また、出力回路40を省略して、制御信号
C2を放電回路50に与えても良い。この場合、”0”
の制御信号C2が放電信号、”1”の制御信号C2が放
電停止信号であり、これに合わせて、放電回路50は、
“0”の制御信号C2を受けると充電電圧V2を電源ラ
イン90を介して実行回路30の電源端子へ放電し、”
1”の制御信号C2を受けると充電電圧V2を電源ライ
ン90に放電するのを停止する。The output circuit 40 may be omitted, and the control signal C2 may be provided to the discharge circuit 50. In this case, "0"
Is a discharge signal, the control signal C2 of "1" is a discharge stop signal, and the discharge circuit 50
When receiving the control signal C2 of "0", the charge voltage V2 is discharged to the power supply terminal of the execution circuit 30 via the power supply line 90, and "
When the control signal C2 of 1 ″ is received, the discharging of the charging voltage V2 to the power supply line 90 is stopped.
【0052】また、放電回路50は、制御信号C3の
“0”から“1”への立ち上がりを受ければ充電電圧V
2を電源ライン90に放電し続け、制御信号C3の
“1”から“0”への立ち下がりを受ければ放電を停止
し続けるラッチ機能を有していてもよい。この場合、リ
セット回路80からの信号を放電回路50に入力して、
操作者がリセット回路80の押しボタンを押せば、上記
の放電を停止する構成にしてもよい。When the discharge circuit 50 receives the rise of the control signal C3 from "0" to "1", the discharge voltage 50
2 may continue to be discharged to the power supply line 90, and may have a latch function of stopping the discharge when receiving the fall of the control signal C3 from "1" to "0". In this case, a signal from the reset circuit 80 is input to the discharge circuit 50,
If the operator presses the push button of the reset circuit 80, the discharge may be stopped.
【0053】また、直流電圧Va、直流電圧Vb、直流
電圧Vcは同一の直流電源電圧であってもよい。The DC voltage Va, the DC voltage Vb, and the DC voltage Vc may be the same DC power supply voltage.
【0054】また、充電回路60のコンデンサ63を充
電池に代えてもよい。The capacitor 63 of the charging circuit 60 may be replaced by a rechargeable battery.
【0055】また、第2種プログラムは、上述のデータ
書き込み処理を行うプログラムやサスペンド処理を行う
プログラム以外の、処理結果を保護するプログラムを含
んでいればよい。例えば、処理結果C5を出力部72の
一である液晶パネルに表示させるためのプログラムでも
よい。あるいは、実行回路30をリセットすることによ
って、リセット信号C6が入力された場合と同じ初期状
態に戻すためのプログラムであってもよい。この場合、
リセットすることによって、不安定な駆動による第2種
プログラムの暴走を防ぎ、例えば、第1種プログラムに
よって出力部72の一である不揮発性メモリに既に書き
込まれた処理結果が破壊されることを防ぐことができ
る。The second type program may include a program for protecting the processing result other than the program for performing the data writing process and the program for performing the suspending process. For example, a program for displaying the processing result C5 on a liquid crystal panel, which is one of the output units 72, may be used. Alternatively, the program may be a program for resetting the execution circuit 30 to return to the same initial state as when the reset signal C6 is input. in this case,
By resetting, the runaway of the second type program due to unstable driving is prevented, and, for example, the processing result already written in the nonvolatile memory which is one of the output units 72 by the first type program is prevented from being destroyed. be able to.
【0056】また、制御信号C2の放電信号および放電
停止信号は、上述の例では第1種プログラムや第2種プ
ログラムに含まれる命令によってCPU32が生成する
が、これに代えて、実行回路30は検出信号C1の”
1”、”0”に応じて生成する別回路を含み、CPU3
2が第2種プログラムを実行するとともに当該別回路が
放電信号および放電停止信号を生成してもよい。In the above example, the CPU 32 generates the discharge signal and the discharge stop signal of the control signal C2 according to the instructions included in the first type program and the second type program. Of the detection signal C1
The CPU 3 includes another circuit that generates a signal in accordance with “1” or “0”.
2 may execute the second type program, and the separate circuit may generate the discharge signal and the discharge stop signal.
【0057】また、第1種プログラムは直流電圧V0が
立ち上がった直後に不揮発性メモリに書き込まれた処理
結果を実行回路30の主メモリ33に取り込むプログラ
ムを含み、第2種プログラムは上述のデータ書き込み処
理を行うプログラムを含んでいてもよい。これによれ
ば、まず、図7の時刻t4において直流電圧V0が遮断
されると、上述のように、第2種プログラム内のデータ
書き込み処理を行うプログラムが実行されることによっ
て、第1種プログラムを実行することによって得られた
処理結果C5が主メモリ33から出力部72の不揮発性
メモリに書き込まれる。その後、再び直流電圧V0が立
ち上がると、第1種プログラム内の上記の処理結果を取
り込むプログラムが実行されることによって、処理結果
C5が不揮発性メモリから主メモリ33に書き込まれ
る。これによって、直流電圧V0が立ち上がる前に電圧
V3が駆動最低電圧dを下回ったとしても、第1種プロ
グラムに含まれるアプリケーションプログラムは、主メ
モリ33に書き込まれた処理結果C5を初期値として、
時刻t4直前と同じ状態で立ち上がることができる。The first type program includes a program for taking the processing result written in the non-volatile memory into the main memory 33 of the execution circuit 30 immediately after the DC voltage V0 rises. It may include a program for performing processing. According to this, first, when the DC voltage V0 is cut off at the time t4 in FIG. 7, as described above, the program for performing the data writing process in the second type program is executed, whereby the first type program is executed. Is written from the main memory 33 to the non-volatile memory of the output unit 72. Thereafter, when the DC voltage V0 rises again, the program for taking in the above processing result in the first type program is executed, whereby the processing result C5 is written from the nonvolatile memory to the main memory 33. Thus, even if the voltage V3 falls below the minimum drive voltage d before the DC voltage V0 rises, the application program included in the type 1 program sets the processing result C5 written in the main memory 33 as an initial value.
It is possible to start up in the same state as immediately before time t4.
【0058】(実施の形態2)実施の形態1において、
プログラムの実行中に直流電圧V0が遮断され、リジュ
ーム状態からサスペンド状態に入るとき、プログラムの
実行が中断されたり、充電回路60の充電量が少なかっ
たり、その他の何らかの原因により、プログラムが正常
に動作しない可能性がある。プログラムが正常に動作し
ない状態で、再び直流電圧V0が投入されてリジューム
状態になると、プログラムが正常に動作しない状態が続
くことになる。(Embodiment 2) In Embodiment 1,
When the DC voltage V0 is cut off during the execution of the program and the system enters the suspend state from the resume state, the program normally operates due to interruption of the program execution, a low charge amount of the charging circuit 60, or some other cause. May not. If the DC voltage V0 is applied again to resume the program in a state where the program does not operate normally, the state in which the program does not operate normally continues.
【0059】つまり、従来ではプログラムが正常に動作
していなければ外部からの電源を遮断して、再び電源を
投入すれば、プログラムが始めから起動されて正常に動
作させることができる。しかし、実施の形態1で説明し
たサスペンド状態、レジューム状態が繰り返されれば、
外部からの電源を遮断して再び投入しても、プログラム
は正常に動作しないという問題点が生じる。That is, conventionally, if the program is not operating normally, the external power supply is cut off and the power is turned on again, so that the program can be started from the beginning and operated normally. However, if the suspend state and the resume state described in the first embodiment are repeated,
Even if the external power supply is cut off and turned on again, there is a problem that the program does not operate normally.
【0060】そこで、上記問題点を解決するために、プ
ログラムが正常に動作していなければ、サスペンド処理
やリジューム処理を行うときに実行回路30をリセット
する(サスペンドリセット、リジュームリセット)。Therefore, in order to solve the above problem, if the program is not operating normally, the execution circuit 30 is reset when performing the suspend process or the resume process (suspend reset, resume reset).
【0061】まず、サスペンドリセットを図9〜図12
を用いて説明する。第1種プログラムの実行中に、誤動
作が生じやすいところにフラグをオンする。誤動作が生
じやすいところにフラグをオンする場合の例を、図9〜
図11に列挙する。例えば、図9に示すように、CPU
32はOSを起動した直後(ステップS11)、フラグ
をオンし(ステップS12)、アプリケーションプログ
ラム等を実行する。そして、フラグをオンしてから所定
時間経過後(ステップS13)、フラグをオフする(ス
テップS14)。あるいは、図10に示すように、CP
U32はアプリケーションプログラムのフラグオン命令
を実行する(ステップS21)。これによって、フラグ
をオンする(ステップS22)。次に、CPU32はア
プリケーションプログラムのフラグオフ命令を実行する
(ステップS23)。これによって、フラグをオフする
(ステップS24)。あるいは、図11に示すように、
CPU32はレジューム処理を開始してから(ステップ
S31)、フラグをオンし(ステップS32)、アプリ
ケーションプログラム等を実行する。そして、フラグを
オンしてから所定時間経過後(ステップS33)、フラ
グをオフする(ステップS34)。以上の図9〜図11
に示したようなフラグを立てる処理は、第1種プログラ
ムに含まれる。First, the suspend reset is performed as shown in FIGS.
This will be described with reference to FIG. During execution of the type 1 program, a flag is turned on where a malfunction is likely to occur. FIGS. 9 to 9 show examples in which a flag is turned on in a place where a malfunction is likely to occur.
These are listed in FIG. For example, as shown in FIG.
32 turns on the flag (step S12) immediately after starting the OS (step S11), and executes an application program or the like. Then, after a predetermined time has elapsed since the flag was turned on (step S13), the flag is turned off (step S14). Alternatively, as shown in FIG.
U32 executes the flag on instruction of the application program (step S21). As a result, the flag is turned on (step S22). Next, the CPU 32 executes a flag-off command of the application program (step S23). As a result, the flag is turned off (step S24). Alternatively, as shown in FIG.
After starting the resume process (step S31), the CPU 32 turns on the flag (step S32) and executes an application program or the like. Then, after a predetermined time has elapsed since the flag was turned on (step S33), the flag is turned off (step S34). 9 to 11 described above.
The process of setting a flag as shown in (1) is included in the type 1 program.
【0062】次に、サスペンド処理を行うときに、フラ
グがオンしていればリセットを行う。図12を用いて詳
しく説明すると、CPU32は、サスペンド処理を開始
すると(ステップS41)、フラグがオフしているかど
うかを判断する(ステップS42)。フラグがオフして
いれば、CPU32はサスペンド処理を続行する(ステ
ップS43)。一方、フラグがオンしていればプログラ
ムが正常に動作しない可能性が充分に考えられるので、
CPU32は実行回路30をリセットする(ステップS
44)。以上の図12に示したような処理は第2種プロ
グラムに含まれる。Next, when the suspend process is performed, if the flag is on, reset is performed. More specifically, referring to FIG. 12, when the suspend process is started (step S41), the CPU 32 determines whether the flag is turned off (step S42). If the flag is off, the CPU 32 continues the suspend process (step S43). On the other hand, if the flag is on, there is a good chance that the program will not work properly,
The CPU 32 resets the execution circuit 30 (Step S
44). The processing as shown in FIG. 12 is included in the type 2 program.
【0063】以上、図9〜図12で説明したように、C
PU32はサスペンド処理を行うとき(つまり、オン信
号からオフ信号を受けるとき)、フラグがオフしていな
ければ(つまり、第1種プログラムの処理結果が所定条
件を満たしていなければ)、実行回路30をリセットす
る。これによって、再びリジューム状態になったとき
に、プログラムが正常に動作していない状態から自動的
に回避することができ、操作者がサスペンド状態にする
ことができるかどうかを確認しなくて済む。As described above with reference to FIGS.
When performing the suspending process (that is, when receiving an off signal from an on signal), the PU 32 executes the execution circuit 30 if the flag is not turned off (that is, if the processing result of the type 1 program does not satisfy a predetermined condition). Reset. This makes it possible to automatically avoid a state in which the program is not operating normally when the resume state is resumed, and it is not necessary for the operator to confirm whether or not the program can be brought into the suspend state.
【0064】次に、リジュームリセットを図13を用い
て説明する。まず、リジューム処理を開始したとき(ス
テップS51)、OSのシェルのユーザーへのメッセー
ジ等の表示処理が行われる。この表示処理が正しく実行
されているかどうかを判断する(ステップS52)。判
断方法は、例えば、不揮発性メモリにファイル形式でシ
ェルの起動条件を予め格納しておき、この起動条件とシ
ェルの表示処理の結果とを比較することで判断できる。
このような判断方法によって、シェルが正常に実行され
ていなければ実行回路30をリセットし(ステップS5
6)、そうでなければステップS53に進む。Next, the resume reset will be described with reference to FIG. First, when the resume process is started (step S51), a process of displaying a message or the like to the user of the OS shell is performed. It is determined whether or not the display process has been correctly performed (step S52). The determination method can be determined by, for example, storing the shell start condition in a file format in a nonvolatile memory in advance, and comparing the start condition with the result of the shell display processing.
According to such a determination method, if the shell is not normally executed, the execution circuit 30 is reset (step S5).
6) Otherwise, proceed to step S53.
【0065】ステップS53では、アプリケーションの
起動数が前回のリジューム状態の起動数に等しいかどう
かを確認する。確認方法は、例えば、サスペンド処理に
よってアプリケーションプログラムの起動数を調べて起
動条件として主メモリ33に格納しておく。そして、リ
ジューム処理の開始後、アプリケーションプログラムの
起動数と主メモリ33に格納されている起動数とを比較
することで確認できる。このような確認方法によって、
アプリケーションの起動数が前回のリジューム状態と異
なれば、実行回路30をリセットし(ステップS5
6)、そうでなければステップS54に進む。In step S53, it is determined whether or not the number of activated applications is equal to the number of activated applications in the previous resume state. As a confirmation method, for example, the number of activated application programs is checked by a suspend process and stored in the main memory 33 as activation conditions. Then, after the start of the resume processing, it can be confirmed by comparing the number of activated application programs with the number of activated programs stored in the main memory 33. With this verification method,
If the activation number of the application is different from the previous resume state, the execution circuit 30 is reset (step S5).
6) If not, proceed to step S54.
【0066】ステップS54では、アプリケーションプ
ログラムが正しく実行されているかどうかを判断する。
判断方法はステップS52同様、例えば、不揮発性メモ
リにファイル形式でアプリケーションプログラムの起動
条件を予め格納しておき、この起動条件とアプリケーシ
ョンプログラムの実行結果とを比較することで判断でき
る。このような判断方法によって、アプリケーションプ
ログラムが正常に実行されていなければ実行回路30を
リセットし(ステップS56)、そうでなければリジュ
ーム処理を続行する(ステップS55)。In the step S54, it is determined whether or not the application program is correctly executed.
As in step S52, the determination method can be determined by, for example, storing in advance a condition for activating the application program in a non-volatile memory in a file format, and comparing the activating condition with the execution result of the application program. According to such a determination method, if the application program is not normally executed, the execution circuit 30 is reset (step S56), and if not, the resume processing is continued (step S55).
【0067】なお、ステップS52〜ステップS54
は、選択的に実行できるように構成してもよい。Steps S52 to S54
May be configured to be selectively executed.
【0068】以上、図13で説明したように、CPU3
2はサスペンド処理を行うとき(つまり、オフ信号から
オン信号を受けるとき)、OSのシェルやアプリケーシ
ョンプログラムの処理結果が不揮発性メモリや主メモリ
33に格納されている所定条件を満たしていなければ、
実行回路30をリセットする。これによって、再びリジ
ューム状態になったときに、プログラムが正常に動作し
ていない状態から自動的に回避することができ、操作者
がプログラムの立上げを行う必要がない。As described above with reference to FIG.
2 indicates that when the suspend process is performed (that is, when an ON signal is received from an OFF signal), if the processing result of the OS shell or the application program does not satisfy predetermined conditions stored in the nonvolatile memory or the main memory 33,
The execution circuit 30 is reset. This makes it possible to automatically avoid the state where the program is not operating normally when the resume state is resumed, and it is not necessary for the operator to start up the program.
【0069】また、サスペンドリセットやリジュームリ
セットを行うことによって、実施の形態1同様、不安定
な駆動による第2種プログラムの暴走を防いで、第1種
プログラムを実行することによって得られた処理結果を
保護することができる。Further, by performing a suspend reset or a resume reset, as in the first embodiment, runaway of the second type program due to unstable driving is prevented, and the processing result obtained by executing the first type program is obtained. Can be protected.
【0070】(本発明の適用例)本発明のプログラム実
行装置は、プログラムを実行する装置であればよく、例
えば、ファクトリーオートメーション(FA)の生産ラ
インを構成する機械を制御する制御機器、パーソナルコ
ンピュータなどに適用してもよい。あるいは、図1の構
成要素のうち、少なくとも検出回路20、実行回路3
0、充電回路60、放電回路50を1チップ上に形成し
て、DSP(Digital Signal Processor)と称されるよ
うな1チップマイクロコンピュータなどに適用してもよ
い。特に、図7の直流電圧V0が遮断されてから(時刻
t4)、電圧V3が駆動最低電圧dを下回るまで(時刻
t8)の間に、再び、直流電圧V0が立ち上がることが
頻繁に起こるシステムに適用すれば、直流電圧V0が投
入された直後にプログラムを直ちに立ち上げることがで
きるので効果的である。(Application Example of the Present Invention) The program execution device of the present invention may be any device that executes a program. For example, a control device for controlling machines constituting a production line of factory automation (FA), a personal computer It may be applied to such as. Alternatively, among the components of FIG. 1, at least the detection circuit 20 and the execution circuit 3
0, the charging circuit 60, and the discharging circuit 50 may be formed on one chip and applied to a one-chip microcomputer called a DSP (Digital Signal Processor). In particular, in the system in which the DC voltage V0 frequently rises again after the DC voltage V0 is cut off (time t4) until the voltage V3 falls below the minimum drive voltage d (time t8) in FIG. If it is applied, the program can be immediately started immediately after the DC voltage V0 is applied, which is effective.
【0071】[0071]
【発明の効果】請求項1に記載の発明によれば、直流電
圧が第1閾値電圧より大きければ第1種プログラムを実
行する。直流電圧が第1閾値電圧以下になると、第1種
プログラムで得られた処理結果を保護するための第2種
プログラムを実行するとともに、電源端子には直流電圧
に加えて放電回路から放電された充電電圧が補われる。
これによって、実行回路はより長く安定して駆動するこ
とができ、その間に、第1種プログラムを実行すること
によって得られた処理結果を第2種プログラムによって
保護して消失することを防ぐことができる。According to the first aspect of the invention, if the DC voltage is higher than the first threshold voltage, the first type program is executed. When the DC voltage becomes equal to or lower than the first threshold voltage, the second type program for protecting the processing result obtained by the first type program is executed, and the power supply terminal is discharged from the discharge circuit in addition to the DC voltage. The charging voltage is supplemented.
As a result, the execution circuit can be driven stably for a longer time, and in the meantime, the processing result obtained by executing the first type program can be protected by the second type program and prevented from being lost. it can.
【0072】請求項2に記載の発明によれば、実行回路
は、電源端子の電圧が第2閾値電圧になるまでは直流電
源電圧で駆動する。これによって、実行回路はさらに長
く安定して駆動することができる。According to the second aspect of the present invention, the execution circuit is driven by the DC power supply voltage until the voltage of the power supply terminal reaches the second threshold voltage. Thus, the execution circuit can be driven stably for a longer time.
【0073】請求項3に記載の発明によれば、第2種プ
ログラムで実行回路をリセットすることで、第2種プロ
グラムの暴走を防ぐことによって、第1種プログラムで
得られた処理結果を保護することができる。According to the third aspect of the present invention, the execution circuit is reset by the second type program to prevent runaway of the second type program, thereby protecting the processing result obtained by the first type program. can do.
【0074】請求項4に記載の発明によれば、第1種お
よび第2種プログラムが正常に動作していない状態から
回避することができる。According to the fourth aspect of the present invention, it is possible to avoid a state where the first type and second type programs are not operating normally.
【0075】請求項5に記載の発明によれば、第1種プ
ログラムに代えて所望の処理結果を得るための第2種プ
ログラムを実行するので、充電回路の充電容量が僅かで
も所望の処理結果を得ることができる。よって、充電回
路を充電容量の小さいコンデンサを用いて構成しても充
分な効果を得ることができ、しかも、充電回路を寿命の
ないバックアップ電源として構成できる。According to the fifth aspect of the present invention, since the second type program for obtaining the desired processing result is executed instead of the first type program, the desired processing result is obtained even if the charging capacity of the charging circuit is small. Can be obtained. Therefore, a sufficient effect can be obtained even if the charging circuit is configured using a capacitor having a small charging capacity, and the charging circuit can be configured as a backup power supply having no life.
【0076】請求項6に記載の発明によれば、コンデン
サをバックアップ電源として用いることができるので、
バックアップ機能付きの1チップで構成されたプログラ
ム実行装置を得ることができる。According to the invention, the capacitor can be used as a backup power supply.
It is possible to obtain a program execution device composed of one chip with a backup function.
【図1】 本発明の実施の形態1のプログラム実行装置
を示すブロック図である。FIG. 1 is a block diagram illustrating a program execution device according to a first embodiment of the present invention.
【図2】 本発明の実施の形態1の検出回路を示す回路
図である。FIG. 2 is a circuit diagram showing a detection circuit according to the first embodiment of the present invention.
【図3】 本発明の実施の形態1の実行回路を示すブロ
ック図である。FIG. 3 is a block diagram illustrating an execution circuit according to the first embodiment of the present invention.
【図4】 本発明の実施の形態1の実行回路の動作を示
すタイミングチャートである。FIG. 4 is a timing chart illustrating an operation of the execution circuit according to the first embodiment of the present invention.
【図5】 本発明の実施の形態1の実行回路の動作を示
すタイミングチャートである。FIG. 5 is a timing chart showing an operation of the execution circuit according to the first embodiment of the present invention.
【図6】 本発明の実施の形態1の充電回路を示すブロ
ック図である。FIG. 6 is a block diagram illustrating a charging circuit according to the first embodiment of the present invention.
【図7】 本発明の実施の形態1のプログラム実行装置
の動作を示すタイミングチャートである。FIG. 7 is a timing chart illustrating an operation of the program execution device according to the first embodiment of the present invention.
【図8】 本発明の実施の形態1のプログラム実行装置
の動作を示すタイミングチャートである。FIG. 8 is a timing chart showing an operation of the program execution device according to the first embodiment of the present invention.
【図9】 本発明の実施の形態2のプログラム実行装置
の動作を示すフローチャートである。FIG. 9 is a flowchart showing an operation of the program execution device according to the second embodiment of the present invention.
【図10】 本発明の実施の形態2のプログラム実行装
置の動作を示すフローチャートである。FIG. 10 is a flowchart showing an operation of the program execution device according to the second embodiment of the present invention.
【図11】 本発明の実施の形態2のプログラム実行装
置の動作を示すフローチャートである。FIG. 11 is a flowchart showing an operation of the program execution device according to the second embodiment of the present invention.
【図12】 本発明の実施の形態2のプログラム実行装
置の動作を示すフローチャートである。FIG. 12 is a flowchart illustrating an operation of the program execution device according to the second embodiment of the present invention.
【図13】 本発明の実施の形態2のプログラム実行装
置の動作を示すフローチャートである。FIG. 13 is a flowchart showing an operation of the program execution device according to the second embodiment of the present invention.
10 電源回路、20 検出回路、30 実行回路、4
0 出力回路、50放電回路、60 充電回路。10 power supply circuit, 20 detection circuit, 30 execution circuit, 4
0 output circuit, 50 discharging circuit, 60 charging circuit.
───────────────────────────────────────────────────── フロントページの続き (72)発明者 菅井 祐平 大阪市淀川区西宮原1丁目7番31号 和泉 電気株式会社内 (72)発明者 田栗 義輝 大阪市淀川区西宮原1丁目7番31号 和泉 電気株式会社内 Fターム(参考) 5B011 DA06 DA13 GG03 HH02 JA01 JA04 JB03 LL11 MB07 5G015 FA16 GB10 JA34 JA62 KA06 ──────────────────────────────────────────────────続 き Continued on the front page (72) Inventor Yuhei Sugai 1-7-131 Nishinomiyahara, Yodogawa-ku, Osaka City Inside Izumi Electric Co., Ltd. F term in the company (reference) 5B011 DA06 DA13 GG03 HH02 JA01 JA04 JB03 LL11 MB07 5G015 FA16 GB10 JA34 JA62 KA06
Claims (6)
が第1閾値閾電圧より大きいときにオン信号、そうでな
いときにオフ信号を出力する検出回路と、 前記直流電源電圧を電源端子に受けて駆動し、前記オン
信号を受けると第1種プログラムを実行し、前記オフ信
号を受けると前記第1種プログラムを実行することによ
って得られた処理結果を保護する第2種プログラムを実
行するとともに放電信号を生成する実行回路と、 前記直流電源電圧を充電する充電回路と、 前記放電信号を受けると、前記充電回路の充電電圧を前
記電源端子へ放電する放電回路と、を備えたプログラム
実行装置。A detection circuit that receives a DC power supply voltage and outputs an ON signal when the DC power supply voltage is greater than a first threshold voltage, and an OFF signal when the DC power supply voltage is not greater than a first threshold voltage; And executes the first type program upon receiving the ON signal, and executes the second type program which protects the processing result obtained by executing the first type program upon receiving the OFF signal. A program execution device comprising: an execution circuit that generates a discharge signal; a charging circuit that charges the DC power supply voltage; and a discharge circuit that discharges a charging voltage of the charging circuit to the power supply terminal when receiving the discharge signal. .
作可能な予め設定された第2閾値電圧になったときに前
記放電信号を前記放電回路に出力する出力回路をさらに
備えた請求項1記載のプログラム実行装置。2. An output circuit that outputs the discharge signal to the discharge circuit when the voltage of the power supply terminal reaches a second predetermined threshold voltage at which the execution circuit can operate. The program execution device according to the above.
リセットする処理を含む請求項1記載のプログラム実行
装置。3. The program execution device according to claim 1, wherein the second type program includes a process of resetting the execution circuit.
当該第1種および第2種プログラムの処理結果が所定条
件を満たしていなければ、前記実行回路をリセットする
処理を含む請求項1記載のプログラム実行装置。4. The first type and second type programs include:
2. The program execution device according to claim 1, further comprising a process of resetting the execution circuit if the processing results of the first type and second type programs do not satisfy a predetermined condition.
電するコンデンサを含む請求項1記載のプログラム実行
装置。5. The program execution device according to claim 1, wherein said charging circuit includes a capacitor for charging said DC power supply voltage.
回路、前記放電回路は1チップ上に形成されている請求
項5記載のプログラム実行装置。6. The program execution device according to claim 5, wherein said detection circuit, said execution circuit, said charging circuit, and said discharging circuit are formed on one chip.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2000139166A JP2001318741A (en) | 2000-05-11 | 2000-05-11 | Program execution device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2000139166A JP2001318741A (en) | 2000-05-11 | 2000-05-11 | Program execution device |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JP2001318741A true JP2001318741A (en) | 2001-11-16 |
Family
ID=18646661
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2000139166A Pending JP2001318741A (en) | 2000-05-11 | 2000-05-11 | Program execution device |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP2001318741A (en) |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2008065453A (en) * | 2006-09-05 | 2008-03-21 | Toa Corp | Backup device |
| US12373366B2 (en) | 2007-06-01 | 2025-07-29 | Netlist, Inc. | Memory with on-module power management |
-
2000
- 2000-05-11 JP JP2000139166A patent/JP2001318741A/en active Pending
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2008065453A (en) * | 2006-09-05 | 2008-03-21 | Toa Corp | Backup device |
| US12373366B2 (en) | 2007-06-01 | 2025-07-29 | Netlist, Inc. | Memory with on-module power management |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP2747971B2 (en) | Power supply device for portable information processing equipment and driving method thereof | |
| JP5340335B2 (en) | Information processing device | |
| JP3213208B2 (en) | Information processing apparatus and control method thereof | |
| JP4515093B2 (en) | CPU power-down method and apparatus therefor | |
| JP4175838B2 (en) | Information processing apparatus with standby mode, standby mode start method and standby mode cancel method | |
| JPH11259189A (en) | Power supply control device for peripheral equipment | |
| JP2007306648A (en) | Low voltage malfunction prevention circuit and method, and power supply circuit and electronic device using the same | |
| US11500645B2 (en) | Boot method and electronic device | |
| WO2011118487A1 (en) | Information processing device and power supply control circuit | |
| JP2013218672A (en) | State control device, information processing device, program, and semiconductor device | |
| CN113495612A (en) | Information processing apparatus and control method | |
| CN102841839B (en) | Information processor and control method thereof | |
| JP2002258988A (en) | Uninterruptible power system | |
| JPH1115569A (en) | System resetting system | |
| CN104735278A (en) | Information processing apparatus, control method for information processing apparatus, and storage medium | |
| JP2001318741A (en) | Program execution device | |
| KR100524474B1 (en) | Computer sysytem and control method thereof | |
| JP2010079572A (en) | Information processor, external memory and control method | |
| US20110307731A1 (en) | Method capable of preventing erroneous data writing and computer system | |
| JPH10268981A (en) | Computer system power shut-off device and method | |
| JP2017102887A (en) | Information processing apparatus, activation method, and activation program | |
| JPH0594226A (en) | Clock switching system | |
| CN1252606C (en) | Microprocessor for ending shutdown mode with interrupt signal and method for controlling clock signal | |
| KR100577800B1 (en) | Automatic backup device and method of computer system | |
| JP5644153B2 (en) | Information processing apparatus and power supply control circuit |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20070228 |
|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20090612 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20090622 |
|
| A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 20091026 |