JPH03158915A - Power supply voltage drop detector - Google Patents

Power supply voltage drop detector

Info

Publication number
JPH03158915A
JPH03158915A JP1299024A JP29902489A JPH03158915A JP H03158915 A JPH03158915 A JP H03158915A JP 1299024 A JP1299024 A JP 1299024A JP 29902489 A JP29902489 A JP 29902489A JP H03158915 A JPH03158915 A JP H03158915A
Authority
JP
Japan
Prior art keywords
power supply
supply voltage
microcomputer
drop
data path
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
JP1299024A
Other languages
Japanese (ja)
Inventor
Yoshimitsu Fukui
福井 祥光
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sharp Corp
Original Assignee
Sharp Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sharp Corp filed Critical Sharp Corp
Priority to JP1299024A priority Critical patent/JPH03158915A/en
Publication of JPH03158915A publication Critical patent/JPH03158915A/en
Pending legal-status Critical Current

Links

Landscapes

  • Power Sources (AREA)

Abstract

PURPOSE:To exactly detect the drop of a power supply voltage in accordance with the actual characteristic of each device even when the characteristics of respective devices for constituting a microcomputer are different from each other by providing a delaying circuit on the prescribed data path of the microcomputer. CONSTITUTION:Such a prescribed processing as data passes through a data path into which a delaying circuit 13 is inserted is executed. That is, since the delay quantity of the delaying circuit 13 increases in accordance with the drop of a power supply voltage, the drop of the power supply voltage can be detected by discriminating whether the time required for the prescribed processing is within a prescribed time or not. In this case, the delay quantity is increased by reflecting the actual lowest operating voltage of each device. In such a manner, the drop of the power supply voltage can be detected exactly in accordance with each characteristic even when the characteristics of respective devices are different from each other.

Description

【発明の詳細な説明】 [産業上の利用分野コ 本発明は、マイクロコンピュータの電源電圧低下検出装
置に関する。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a power supply voltage drop detection device for a microcomputer.

[従来の技術] CPL)(中央処理装置)、記憶装置及び周辺処理装置
を有する1チツプマイクロコンピユータにおいては、シ
ステムを電池等で駆動することがしばしば行われる。こ
のような場合、電源電圧がシステムの最低動作電圧以下
となる事態が起こり得る。このような電源電圧の低下に
よるシステムの誤動作を防ぐために、マイクロコンピュ
ータに電源電圧低下検出装置を設けることが行われる。
[Prior Art] In a one-chip microcomputer having a central processing unit (CPL), a storage device, and a peripheral processing device, the system is often driven by a battery or the like. In such a case, a situation may occur in which the power supply voltage becomes lower than the minimum operating voltage of the system. In order to prevent malfunction of the system due to such a drop in power supply voltage, a microcomputer is provided with a power supply voltage drop detection device.

従来のこの種の電源電圧低下検出装置としては、定電圧
発生回路の出力と電源電圧とを比較して電源電圧がシス
テムの最低動作電圧以下となったかどうかを検出する装
置が一般に知られている。
A generally known conventional power supply voltage drop detection device of this type is a device that compares the output of a constant voltage generation circuit with the power supply voltage and detects whether the power supply voltage has fallen below the minimum operating voltage of the system. .

[発明が解決しようとする課題] しかしながら、上述した如き従来の電源電圧低下検出装
置によると、次のような不都合がある。
[Problems to be Solved by the Invention] However, the conventional power supply voltage drop detection device as described above has the following disadvantages.

一般に、マイクロコンピュータを構成する個々のデバイ
スの最低動作電圧は、各デバイス毎の特性上のバラツキ
等に応じである範囲内で互いに異なる。このため、一定
電圧と電源電圧とを比較する従来の電源電圧低下検出装
置では、判定基準である一定電圧を個々のデバイスの最
低動作電圧のバラツキの最大値以上に設定する必要があ
る。しかしながらこのような構成とした場合、電源電圧
低下検出装置からは動作不可と判定されているにもかか
わらず、システムは実際には十分動作可能である如き不
都合の生じる恐れがある。
In general, the minimum operating voltages of individual devices constituting a microcomputer differ within a certain range depending on variations in characteristics of each device. For this reason, in a conventional power supply voltage drop detection device that compares a constant voltage with a power supply voltage, it is necessary to set the constant voltage, which is a criterion, to be equal to or higher than the maximum value of the variation in the minimum operating voltage of each device. However, with such a configuration, there is a risk that the system may actually be fully operational even though the power supply voltage drop detection device has determined that the system is inoperable.

従って本発明の目的は、電源電圧の低下をマイクロコン
ピュータを構成する個々のデバイスの特性が互いに異な
る場合にも正確に検出することができる電源電圧低下検
出装置を提供することにある。
SUMMARY OF THE INVENTION Accordingly, an object of the present invention is to provide a power supply voltage drop detection device that can accurately detect a drop in power supply voltage even when the characteristics of individual devices constituting a microcomputer are different from each other.

[課題を解決するための手段] 上述の目的を達成する本発明の特徴は、マイクロコンピ
ュータの所定のデータ経路に挿入された遅延回路と、デ
ータがこのデータ経路を通過する所定処理を実行する手
段と、この実行手段による上述の所定処理に要した時間
が所定時間内であるかどうかを判別する手段とを備えた
ことにある。
[Means for Solving the Problems] The features of the present invention that achieve the above-mentioned objects include a delay circuit inserted into a predetermined data path of a microcomputer, and means for executing a predetermined process in which data passes through this data path. and a means for determining whether the time required for the above-mentioned predetermined processing by the execution means is within a predetermined time.

[作用コ 遅延回路が挿入されたデータ経路をデータが通過するよ
うな所定処理を実行する。電源電圧の低下に応じて遅延
回路の遅延量が増大するため、所定処理に要した時間が
所定時間内であるかどうか判別することにより、電源電
圧の低下を検出することができる。この場合、遅延量は
個々のデバイスの実際の最低動作電圧を反映して増大す
る。従って、電源電圧の低下を個々のデバイスの特性が
互いに異なる場合にも各特性に応じて正確に検出するこ
とができる。
[Action] Execute a predetermined process such that data passes through the data path in which the delay circuit is inserted. Since the amount of delay of the delay circuit increases as the power supply voltage decreases, a decrease in the power supply voltage can be detected by determining whether the time required for a predetermined process is within a predetermined time. In this case, the amount of delay increases to reflect the actual minimum operating voltage of the individual device. Therefore, even if the characteristics of individual devices differ from each other, it is possible to accurately detect a drop in the power supply voltage according to the characteristics of each device.

[実施例] 以下図面を用いて本発明の実施例を詳細に説明する。[Example] Embodiments of the present invention will be described in detail below with reference to the drawings.

第1図は本発明の一実施例の構成を概略的に示すブロッ
ク図、第2図は第1図の実施例における電圧判定処理プ
ログラムの一部を表すフローチャトである。
FIG. 1 is a block diagram schematically showing the configuration of an embodiment of the present invention, and FIG. 2 is a flowchart showing a part of a voltage determination processing program in the embodiment of FIG.

この実施例はマイクロコンピュータのCPU内のデータ
経路に遅延回路を設けたものである。第1図において、
10はマイクロコンピュータのCPU内の演算回路、1
1は演算回路10の制御回路、12は演算結果を格納す
るラッチ、13は演算回路1Gとラッチ12との間のデ
ータ経路14に設けられた遅延回路である。
In this embodiment, a delay circuit is provided in the data path within the CPU of a microcomputer. In Figure 1,
10 is an arithmetic circuit in the CPU of the microcomputer; 1
1 is a control circuit for the arithmetic circuit 10, 12 is a latch that stores the result of the arithmetic operation, and 13 is a delay circuit provided in the data path 14 between the arithmetic circuit 1G and the latch 12.

マイクロコンピュータは、一定時間毎、又は所定の処理
の前後に第2図に示す電圧判定処理プロダラムを実行す
る。まず、ステップS1において、演算回路lOに所定
の演算を実行してラッチ12へ格納するように指示する
。次いでステップS2において、ラッチ12の内容を読
み出す。次のステップS3で、この読み出した内容が上
述の所定演算の正しい結果であるかどうか判別する。“
YES”の場合、即ち正しい結果の場合は、ステップS
4へ進んで電源電圧が正常である旨の信号を出力する。
The microcomputer executes the voltage determination processing program shown in FIG. 2 at regular intervals or before and after predetermined processing. First, in step S1, the arithmetic circuit IO is instructed to perform a predetermined arithmetic operation and store it in the latch 12. Next, in step S2, the contents of the latch 12 are read. In the next step S3, it is determined whether the read content is the correct result of the above-mentioned predetermined calculation. “
YES”, that is, if the result is correct, step S
Proceed to step 4 and output a signal indicating that the power supply voltage is normal.

No”の場合、即ち正しい結果ではない場合は、ステッ
プS5へ進んで電源電圧が低下している旨の信号を出力
する。
If the result is "No", that is, if the result is not correct, the process advances to step S5, and a signal indicating that the power supply voltage is decreasing is output.

上述の各ステップは、システムクロックの1サイクル毎
に実行されるため、ステップS1で演算処理をスタート
してからステップS2で読み出すまでは一定時間経過す
ることとなる。この一定時間経過した後に正しい演算結
果が得られない場合は、電源電圧低下により遅延回路1
3の遅延量が増大したと判定するようにしているのであ
る。
Since each of the above-mentioned steps is executed every cycle of the system clock, a certain period of time will elapse from the start of arithmetic processing in step S1 until the reading in step S2. If correct calculation results cannot be obtained after this certain period of time has elapsed, the delay circuit 1
In this case, it is determined that the delay amount of No. 3 has increased.

第3図は本発明の他の実施例の構成を概略的に示すブロ
ック図、第4図は第3図の実施例における電圧判定処理
プログラムの一部を表すフローチャートである。
FIG. 3 is a block diagram schematically showing the configuration of another embodiment of the present invention, and FIG. 4 is a flowchart showing a part of the voltage determination processing program in the embodiment of FIG.

この実施例はマイクロコンピュータのCPU内の演算回
路のキャリー出力経路に遅延回路を設けたちのである。
In this embodiment, a delay circuit is provided in the carry output path of the arithmetic circuit in the CPU of the microcomputer.

第3図において、20は演算数を保持する8ビツトのA
レジスタ、21は被演算数を保持する8ビツトのBレジ
スタ、22はこの場合加算動作を行う演算回路(ALU
) 、23は演算結果を保持する8ビツトのRレジスタ
、24は演算結果のキャリー出力を保持するフラグレジ
スタ、25は演算回路22とフラグレジスタ24との間
のキャリー出力経路26に設けられた遅延回路をそれぞ
れ示している。
In Figure 3, 20 is the 8-bit A that holds the arithmetic number.
Register 21 is an 8-bit B register that holds the operand, and 22 is an arithmetic circuit (ALU) that performs the addition operation in this case.
), 23 is an 8-bit R register that holds the calculation result, 24 is a flag register that holds the carry output of the calculation result, and 25 is a delay provided in the carry output path 26 between the calculation circuit 22 and the flag register 24. Each circuit is shown.

マイクロコンピュータは、一定時間毎、又は所定の処理
の前後に第4図に示す電圧判定処理プロダラムを実行す
る。まず、ステップSllにおいて、Aレジスタ20に
データAをセットし、ステップSt2において、Bレジ
スタ21にデータBをセットする。次のステップS13
では、演算回路22にA+Bの演算を行うように指示す
る。ステップ514では、フラグレジスタ24の内容を
見に行き、キャリー出力が正しく “1”にセットされ
ているかどうか判別する。“YES”の場合、即ち正し
い結果の場合は、ステップS15へ進んで電源電圧が正
常である旨の信号を出力する。“No”の場合、即ち正
しい結果ではない場合は、ステップS16へ進んで電源
電圧が低下している旨の信号を出力する。
The microcomputer executes the voltage determination processing program shown in FIG. 4 at regular intervals or before and after predetermined processing. First, in step Sll, data A is set in the A register 20, and in step St2, data B is set in the B register 21. Next step S13
Now, the arithmetic circuit 22 is instructed to perform the arithmetic operation of A+B. In step 514, the contents of the flag register 24 are checked to determine whether the carry output is correctly set to "1". If "YES", that is, if the result is correct, the process advances to step S15 and a signal indicating that the power supply voltage is normal is output. If "No", that is, if the result is not correct, the process advances to step S16, and a signal indicating that the power supply voltage has decreased is output.

上述の各ステップは、システムクロックの1サイクル毎
に実行されるため、ステップS13で演算をスタートし
てからステップSI4でキャリー出力を判別するまでは
一定時間経過することとなる。
Since each of the above steps is executed every cycle of the system clock, a certain period of time will elapse from the start of calculation in step S13 until the carry output is determined in step SI4.

この一定時間経過した後に正しいキャリー出力が得られ
ない場合は、電源電圧低下により遅延回路25の遅延量
が増大したと判定するようにしているのである。なお、
上述のA+Bの演算はキャリ出力が“1”となるような
演算であるとする。例えば、A=FF、B=1の場合に
A+Hの演算を行うと、結果は、R=00、キャリー出
力C=1となる。特にこの演算は、処理時間が最大とな
るため遅延量の識別が容易であるため有利である。
If a correct carry output is not obtained after the predetermined period of time has elapsed, it is determined that the delay amount of the delay circuit 25 has increased due to a drop in the power supply voltage. In addition,
It is assumed that the above-mentioned A+B operation is such that the carry output becomes "1". For example, if A+H is performed when A=FF and B=1, the result will be R=00 and carry output C=1. Particularly, this calculation is advantageous because the processing time is maximized and the amount of delay can be easily identified.

第5図は本発明のさらに他の実施例の構成を概略的に示
すブロック図、第6図は第5図の実施例における電圧判
定処理プログラムの一部を表すフローチャートである。
FIG. 5 is a block diagram schematically showing the configuration of still another embodiment of the present invention, and FIG. 6 is a flowchart showing a part of the voltage determination processing program in the embodiment of FIG.

この実施例はマイクロコンピュータのCPUと周辺処理
装置との間のデータ経路に遅延回路を設けたものである
。第5図において、30はマイクロコンピュータのCP
U、31は周辺処理装置、32はCPU30と周辺処理
装置31との間のデータ経路33に設けられた遅延回路
である。
In this embodiment, a delay circuit is provided in a data path between a CPU of a microcomputer and a peripheral processing unit. In FIG. 5, 30 is the CP of the microcomputer.
U, 31 is a peripheral processing device, and 32 is a delay circuit provided in a data path 33 between the CPU 30 and the peripheral processing device 31.

マイクロコンピュータは、一定時間毎、又は所定の処理
の前後に第6図に示す電圧判定処理プログラムを実行す
る。まず、ステップ521において、周辺処理装置3I
ヘデータを転送するように指示する。次いでステップS
22において、周辺処理装置31からデータを読み出す
。次のステップS23で、この読み出したデータが周辺
処理装置31へ転送したデータに一致するかどうか判別
する。“YES”の場合、即ち正しい転送が行われた場
合は、ステップS24へ進んで電源電圧が正常である旨
の信号を出力する。“No”の場合、即ち正しい転送が
行われなかった場合は、ステップ325へ進んで電源電
圧が低下している旨の信号を出力する。
The microcomputer executes the voltage determination processing program shown in FIG. 6 at fixed time intervals or before and after predetermined processing. First, in step 521, the peripheral processing device 3I
instructs to transfer data to Then step S
At 22, data is read from the peripheral processing device 31. In the next step S23, it is determined whether the read data matches the data transferred to the peripheral processing device 31. If "YES", that is, if correct transfer has been performed, the process advances to step S24 and a signal indicating that the power supply voltage is normal is output. If "No", that is, if the correct transfer has not been performed, the process advances to step 325, and a signal indicating that the power supply voltage has decreased is output.

上述の各ステップも、システムクロックの1サイクル毎
に実行されるため、ステップ321で転送をスタートし
てからステップ322で読み出すまでは一定時間経過す
ることとなり、この一定時間経過した後に正しい転送結
果が得られない場合は、電源電圧低下により遅延回路3
2の遅延量が増大したと判定しているのである。
Each of the above steps is also executed every cycle of the system clock, so a certain amount of time will elapse from the start of transfer in step 321 until the readout in step 322, and the correct transfer result will not be obtained after this certain period of time has elapsed. If this is not possible, the delay circuit 3
It is determined that the amount of delay of No. 2 has increased.

以上3つの実施例により本発明を説明したが、本発明の
遅延回路はマイクロコンピュータのブタ経路であればど
のような位置に挿入されてもよいことは明らかである。
Although the present invention has been described using the above three embodiments, it is clear that the delay circuit of the present invention may be inserted at any position in the pig path of a microcomputer.

[発明の効果コ 上述したように本発明の電源電圧低下検出装置は、マイ
クロコンピュータの所定のデータ経路に挿入された遅延
回路と、データがこのデータ経路を通過する所定処理を
実行する手段と、この実行手段による上述の所定処理に
要した時間が所定時閣内であるかどうかを判別する手段
とを備えているため、電源電圧の低下をマイクロコンピ
ュータを構成する個々のデバイスの特性が互いに異なる
場合にも各デバイスの実際の特性に応じて正確に検出す
ることができ、しかもこの検出を簡易な回路構成で行う
ことができるという格別の効果を有する。
[Effects of the Invention] As described above, the power supply voltage drop detection device of the present invention includes: a delay circuit inserted into a predetermined data path of a microcomputer; a means for executing a predetermined process in which data passes through the data path; Since the execution means is equipped with a means for determining whether or not the time required for the above-mentioned predetermined processing is within the predetermined time period, a drop in the power supply voltage can be detected even if the characteristics of the individual devices constituting the microcomputer are different from each other. However, it has the special effect of being able to accurately detect each device according to its actual characteristics, and that this detection can be performed with a simple circuit configuration.

【図面の簡単な説明】[Brief explanation of the drawing]

第1図は本発明の一実施例の構成を概略的に示すブロッ
ク図、第2図は第1図の実施例における電圧判定処理プ
ログラムの一部を表すフロチャト、第3図は本発明の他
の実施例の構成を概略的に示すブロック図、第4図は第
3図の実施例における電圧判定処理プログラムの一部を
表すフロチャート、第5図は本発明のさらに他の実施例
の構成を概略的に示すブロック図、第6図は第5図の実
施例における電圧判定処理プログラムの一部を表すフロ
ーチャートである。 l0122・・・・・・演算回路、11・・・・・・制
御回路、12・・・・・・ラッチ、13.25.32・
・・・・・遅延回路、14.33・・・・・・デ0 −タ経路、 20. 21. 23・・・・・・レジスタ、 24・・・・・・フラ グレジスタ、 26・・・・・・キヤ ノー出力経路、 30・・・・・・C PU。 31・・・・・・周辺処理装置。 志懸入 (504)ンヤーブ(1式会社 1 特開平3 158915 (5)
FIG. 1 is a block diagram schematically showing the configuration of an embodiment of the present invention, FIG. 2 is a flowchart showing a part of the voltage determination processing program in the embodiment of FIG. 1, and FIG. FIG. 4 is a flow chart showing a part of the voltage determination processing program in the embodiment of FIG. 3, and FIG. 5 is a block diagram schematically showing the configuration of another embodiment of the present invention. FIG. 6 is a flowchart showing a part of the voltage determination processing program in the embodiment of FIG. 5. l0122... Arithmetic circuit, 11... Control circuit, 12... Latch, 13.25.32.
...Delay circuit, 14.33...Data path, 20. 21. 23...Register, 24...Flag register, 26...Canon output path, 30...CPU. 31... Peripheral processing device. Shikakein (504) Nyabu (1 type company 1 JP-A-3 158915 (5)

Claims (1)

【特許請求の範囲】[Claims] マイクロコンピュータの所定のデータ経路に挿入された
遅延回路と、データが該データ経路を通過する所定処理
を実行する手段と、該実行手段による該所定処理に要し
た時間が所定時間内であるかどうかを判別する手段とを
備えたことを特徴とする電源電圧低下検出装置。
A delay circuit inserted into a predetermined data path of a microcomputer, a means for executing a predetermined process in which data passes through the data path, and whether the time required for the predetermined process by the execution means is within a predetermined time. A power supply voltage drop detection device comprising: means for determining.
JP1299024A 1989-11-17 1989-11-17 Power supply voltage drop detector Pending JPH03158915A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP1299024A JPH03158915A (en) 1989-11-17 1989-11-17 Power supply voltage drop detector

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP1299024A JPH03158915A (en) 1989-11-17 1989-11-17 Power supply voltage drop detector

Publications (1)

Publication Number Publication Date
JPH03158915A true JPH03158915A (en) 1991-07-08

Family

ID=17867235

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1299024A Pending JPH03158915A (en) 1989-11-17 1989-11-17 Power supply voltage drop detector

Country Status (1)

Country Link
JP (1) JPH03158915A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0553699A (en) * 1991-08-21 1993-03-05 Nec Corp Operational margin detection circuit

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0553699A (en) * 1991-08-21 1993-03-05 Nec Corp Operational margin detection circuit

Similar Documents

Publication Publication Date Title
US4601008A (en) Data processing system
US5717851A (en) Breakpoint detection circuit in a data processor and method therefor
JPH0743653B2 (en) Interrupt controller
JPH08328848A (en) Microprocessor
JPH02202642A (en) Device for supervising program action
US6463492B1 (en) Technique to automatically notify an operating system level application of a system management event
US6269443B1 (en) Method and apparatus for automatically selecting CPU clock frequency multiplier
JPH03158915A (en) Power supply voltage drop detector
US6990569B2 (en) Handling problematic events in a data processing apparatus
US4987534A (en) Processor having synchronized operation between a CPU and a vector processor
JPS62145440A (en) Runaway detection circuit
JPS62106552A (en) Loop detector
JPH04225432A (en) Interruption processing time control system for one-chip microcomputer
JP3145937B2 (en) Runaway detection method for microcomputer
JPS6118045A (en) Detecting system of program runaway
JPS6211745B2 (en)
JPS62222318A (en) Information processor
JP2004171040A (en) Timer circuit
JPH0365739A (en) Control device
JPH03208132A (en) Single chip microcomputer
JPH02150942A (en) Bus abnormality detecting circuit
JP2003050750A (en) Microcomputer
JPS60262229A (en) Lifetime discriminating method of memory backup battery
JPH03156659A (en) Direct memory access controller
JPS63255751A (en) Automatic detector for main memory capacity