JP2516974B2 - Reset device - Google Patents

Reset device

Info

Publication number
JP2516974B2
JP2516974B2 JP62130530A JP13053087A JP2516974B2 JP 2516974 B2 JP2516974 B2 JP 2516974B2 JP 62130530 A JP62130530 A JP 62130530A JP 13053087 A JP13053087 A JP 13053087A JP 2516974 B2 JP2516974 B2 JP 2516974B2
Authority
JP
Japan
Prior art keywords
terminal
microcomputer
reset
capacitor
port
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 - Fee Related
Application number
JP62130530A
Other languages
Japanese (ja)
Other versions
JPS63293617A (en
Inventor
義一 大熊
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.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial Co Ltd
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 Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP62130530A priority Critical patent/JP2516974B2/en
Publication of JPS63293617A publication Critical patent/JPS63293617A/en
Application granted granted Critical
Publication of JP2516974B2 publication Critical patent/JP2516974B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Description

【発明の詳細な説明】 産業上の利用分野 本発明は電源電圧がある一定値より下がった時に確実
にマイクロコンピュータをリセットするリセット装置に
関するものである。
Description: BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a reset device that reliably resets a microcomputer when a power supply voltage drops below a certain value.

従来の技術 従来この種のリセット装置は第5図に示すような構成
であった。即ち、1はマイクロコンピュータ、2はリセ
ット回路で、電源とアースの間に抵抗3とコンデンサ4
との直列接続回路素子を挿入し、抵抗3とコンデンサ4
の接続点をマイクロコンピュータ1のリセット端子RST
に接続している。また、5はマイクロコンピュータ1に
アドレスバス6、データバス7にて接続されたRAMであ
る。
2. Description of the Related Art Conventionally, this type of reset device has a structure as shown in FIG. That is, 1 is a microcomputer, 2 is a reset circuit, and a resistor 3 and a capacitor 4 are provided between the power supply and ground.
Insert a circuit element connected in series with the resistor 3 and capacitor 4
Is connected to the reset terminal RST of the microcomputer 1.
Connected to Reference numeral 5 is a RAM connected to the microcomputer 1 by an address bus 6 and a data bus 7.

発明が解決しようとする問題点 しかしながら、上記従来の構成では電源電圧が所定値
より下がった状態が継続して続いた場合(例えば電源を
切った場合)にはコンデンサ4の電荷が抵抗3を通して
電源側へ放電されるのでマイクロコンピュータ1のリセ
ット端子をローレベルにすることができるが、電源電圧
が瞬間的に低下する瞬時停電(以下瞬停という)の時に
は、コンデンサ4電荷が抵抗3を通して電源側へ充分放
電されないうちに電源電圧が回復するため、マイクロコ
ンピュータ1のRST端子をローレベルにしてマイクロコ
ンピュータ1をリセットすることができず、マイクロコ
ンピュータ1が誤動作してしまうという問題点があっ
た。
DISCLOSURE OF THE INVENTION Problems to be Solved by the Invention However, in the above-described conventional configuration, when the state where the power supply voltage is lower than the predetermined value continues (for example, when the power is turned off), the electric charge of the capacitor 4 passes through the resistor 3 to the power source. The reset terminal of the microcomputer 1 can be set to a low level because it is discharged to the side, but at the moment of a momentary power failure (hereinafter referred to as a momentary power failure) in which the power supply voltage drops momentarily, the charge of the capacitor 4 passes through the resistor 3 and the power supply side. Since the power supply voltage recovers before being fully discharged, the microcomputer 1 cannot be reset by setting the RST terminal of the microcomputer 1 to the low level, and the microcomputer 1 malfunctions.

さらに、上記従来の構成ではマイクロコンピュータ1
のリセット端子RSTとRAM5のチップセレクト端子CSとを
接続していたので、次のような誤動作をすることがあっ
た。即ち、第6図においてt=t0でマイクロコンピュー
タ1がRAM5へデータ2の書き込み動作を行なうためのパ
ルス▲▼を出しており、このパルス▲▼が完了
しないうちに電源がオフされ、マイクロコンピュータ1
のリセット端子RSTに例えばt=t1のタイミングでロー
レベルの電圧が印加された場合、RAM内部ではあたかも
パルス▲▼′が出されたかのように動作してデータ
の代わりに前のデータであるデータ1をRAMに書き込ん
でしまうことがあった。
Further, in the above conventional configuration, the microcomputer 1
Since the reset terminal RST of and the chip select terminal CS of RAM5 were connected, the following malfunction may occur. That is, in FIG. 6, at t = t 0 , the microcomputer 1 issues a pulse ▲ ▼ for writing the data 2 to the RAM 5, and the power is turned off before the pulse ▲ ▼ is completed, and the microcomputer 1
For example, when a low level voltage is applied to the reset terminal RST of the RAM at the timing of t = t 1 , the RAM operates as if the pulse ▲ ▼ ′ was issued, and the previous data is replaced by the data that is the previous data. I sometimes wrote 1 to RAM.

また、他の従来例として、電源電圧をコンパレータ8
にて基準値と比較し、ワンショットマルチバイブレータ
9を介してマイクロコンピュータ1のリセット端子に導
く第7図に示すものなどがあるが、回路構成が複雑で高
価なものとなるものであった。
Further, as another conventional example, the power supply voltage is compared by a comparator 8
There is the one shown in FIG. 7 that is compared with the reference value and led to the reset terminal of the microcomputer 1 through the one-shot multivibrator 9, but the circuit configuration is complicated and expensive.

本発明はこのような従来の問題点を解決し、構成が簡
単で確実にマイクロコンピュータをリセットすることが
できるリセット装置を安価に提供することを目的とする
ものである。
SUMMARY OF THE INVENTION It is an object of the present invention to solve the above conventional problems and to provide at low cost a reset device having a simple structure and capable of reliably resetting a microcomputer.

問題点を解決するための手段 上記目的を達成するため本発明は電源をマイクロコン
ピュータのノンマスカブルインターラプト端子に接続
し、前記ノンマスカブルインターラプト端子とマイクロ
コンピュータのポートとの間に少なくとも2つの抵抗素
子よりなる分割抵抗を接続し、前記2つの抵抗素子の接
続点にマイクロコンピュータのリセット端子とコンデン
サの一端を接続し、前記コンデンサの他端は接地する構
成とするものである。
Means for Solving the Problems In order to achieve the above object, the present invention connects a power source to a non-maskable interrupt terminal of a microcomputer, and includes at least two resistance elements between the non-maskable interrupt terminal and a port of the microcomputer. The dividing resistor is connected, the reset terminal of the microcomputer and one end of the capacitor are connected to the connection point of the two resistance elements, and the other end of the capacitor is grounded.

作用 上記構成による本発明の作用は次のようになる。即
ち、電源の瞬停時にノンマスカブル割込み処理を行な
い、ポートを出力モードとしてローレベルとすることに
より、コンデンサの電荷を放電させ強制的にリセット端
子をマイクロコンピュータがリセットする電圧以下に
し、マイクロコンピュータに確実にリセットがかかるこ
とになるものである。
Operation The operation of the present invention with the above configuration is as follows. That is, non-maskable interrupt processing is performed during a momentary power failure of the power supply, and the port is set to output mode to low level to discharge the electric charge of the capacitor and force the reset terminal to a voltage below the voltage at which the microcomputer is reset, ensuring the microcomputer. Will be reset.

実 施 例 以下、本発明の実施例について図面を参照しながら説
明する。第1図は本発明の実施例のリセット装置のブロ
ック図を示すもので、図において、10は電源電圧を検出
するセンス端子、11はマイクロコンピュータ、12は入力
された電圧の立下がりエッジを検出してノンマスカブル
割込みを発生させるノンマスカブルインターラプト端子
(以下NMI端子という)でセンス端子に接続されてい
る。13はマイクロコンピュータのプログラムにより入出
力を切換えることができるポートで、リセット(後述)
がかかるとインピーダンスの高い入力モードとなるもの
である。14はマイクロコンピュータのリセット端子で、
第2図bに示すように端子電圧がV1からV2の間でマイク
ロコンピュータ11のリセット動作をするように設定され
ている。R1,R2はNMI端子12とポート13との間に接続した
分割抵抗で、例えばそれぞれ18KΩ,3.3KΩの値であり、
その分割点Pはリセット端子14に接続されるとともに、
分割点Pと接地との間に例えば0.47μFのコンデンサC
が接続されている。15,16はそれぞれマイクロコンピュ
ータのアドレス端子とデータ端子で、RAM17のアドレス
端子18とデータ端子19に接続されてあり、アドレス,デ
ータのやりとりを行なう。20,21はそれぞれマイクロコ
ンピュータからの書込みパルス又は読み出しパルスを出
力するライト端子とリード端子でRAM17の対するライト
端子22及びリード端子23にそれぞれ接続されている。24
はローレベルを検出した時RAM17からのデータの読み出
し及び書込みを禁止するチップセレクト端子でマイクロ
コンピュータのリセット端子に接続されている。
EXAMPLES Examples of the present invention will be described below with reference to the drawings. FIG. 1 is a block diagram of a reset device according to an embodiment of the present invention, in which 10 is a sense terminal for detecting a power supply voltage, 11 is a microcomputer, and 12 is a falling edge of an input voltage. A non-maskable interrupt pin (hereinafter referred to as NMI pin) that generates a non-maskable interrupt is connected to the sense pin. 13 is a port whose input and output can be switched by a microcomputer program, and is reset (described later).
When this is applied, the input mode becomes high in impedance. 14 is the reset terminal of the microcomputer,
As shown in FIG. 2b, the terminal voltage is set to reset the microcomputer 11 between V 1 and V 2 . R 1 and R 2 are dividing resistors connected between the NMI terminal 12 and the port 13, and are, for example, 18 KΩ and 3.3 KΩ, respectively.
The division point P is connected to the reset terminal 14 and
Between the dividing point P and the ground, for example, a capacitor C of 0.47 μF
Is connected. Reference numerals 15 and 16 respectively denote an address terminal and a data terminal of the microcomputer, which are connected to the address terminal 18 and the data terminal 19 of the RAM 17 to exchange addresses and data. Reference numerals 20 and 21 respectively denote a write terminal and a read terminal for outputting a write pulse or a read pulse from the microcomputer, and are connected to the write terminal 22 and the read terminal 23 of the RAM 17, respectively. twenty four
Is a chip select terminal for inhibiting reading and writing of data from the RAM 17 when a low level is detected, and is connected to the reset terminal of the microcomputer.

上記構成において、以下マイクロコンピュータのリセ
ット動作について説明する。
In the above configuration, the reset operation of the microcomputer will be described below.

第2図a,b,cはそれぞれセンス端子10,リセット端子1
4,ポート13に現われる電圧波形を示し、今、t=t0で電
源をオンしたとするとセンス端子10から電圧(V0)の立
上がりがNMI端子12に入力され、またリセット端子14及
びポート13にはコンデンサCが時定数τ(=R1・C)
で充電されるに従って電圧が印加される。リセット端子
14に印加される電圧がV1を越えるとマイクロコンピュー
タ11のリセット動作が解除され、マイクロコンピュータ
11の動作準備が整う。次にt=t1で電源電圧が瞬時的に
降下したとすると、コンデンサCに充電された電荷は抵
抗R1を通してセンス端子へ放電を開始すると同時にセン
ス端子10に接続されたNMI端子は電圧の立下がりを検出
して、第3図にフローチャートで示す割込みを発生させ
る。第3図において、ステップ1では割込みに必要な処
理が行なわれ、例えばデータのSAVE等が行なわれる。ス
テップ2ではポート13をインピーダンスの低い出力モー
ドに設定し、ステップ3ではポート13にローレベルを出
力する。ポート13にローレベルが出力された結果、コン
デンサCに充電された電荷は抵抗R2を通してポートへ放
電されることとなり従ってコンデンサCの放電は時定数
τ(=R・CただしR=R1//R2)にて急激に行なわれ
ることとなる。コンデンサCの電荷が放電されるとリセ
ット端子14の電圧が下がり、電圧V2まで下がると、マイ
クロコンピュータ11にリセット動作がかけられノンマス
カブル割込みの処理は終わる。マイクロコンピュータ11
にリセットがかかるとポートはインピーダンスの高い入
力モードとなり、またNMI端子12にはセンス端子10から
電源電圧が印加され、またリセット端子14にはコンデン
サCが時定数τで放電されることからt=t0で電源を
オンした時と同様の波形の電圧が印加されることとな
る。
Fig. 2 a, b and c are sense terminal 10 and reset terminal 1 respectively
4, shows the voltage waveform that appears at port 13, and when the power is turned on at t = t 0 , the rising edge of the voltage (V 0 ) is input from the sense terminal 10 to the NMI terminal 12, and the reset terminal 14 and port 13 The capacitor C has a time constant τ 1 (= R 1 · C)
The voltage is applied as it is charged at. Reset terminal
When the voltage applied to 14 exceeds V 1 , the reset operation of the microcomputer 11 is released,
11 ready for operation. Next, assuming that the power supply voltage instantaneously drops at t = t 1 , the charge charged in the capacitor C starts discharging to the sense terminal through the resistor R 1 and at the same time, the NMI terminal connected to the sense terminal 10 becomes When the falling edge is detected, the interrupt shown in the flowchart of FIG. 3 is generated. In FIG. 3, in step 1, processing necessary for interruption is performed, for example, data SAVE or the like is performed. In step 2, the port 13 is set to an output mode with low impedance, and in step 3, a low level is output to the port 13. As a result of the low level being output to the port 13, the charge charged in the capacitor C is discharged to the port through the resistor R 2 , and therefore the discharge of the capacitor C is time constant τ 2 (= R · C, where R = R 1 It will be done rapidly at // R 2 ). When the charge of the capacitor C is discharged down voltage of the reset terminal 14, the drops to the voltage V 2, the process of the non-maskable interrupt reset operation is applied to the microcomputer 11 ends. Microcomputer 11
When the reset is applied to the port, the port becomes the input mode with high impedance, the power supply voltage is applied from the sense terminal 10 to the NMI terminal 12, and the capacitor C is discharged to the reset terminal 14 with the time constant τ 1. The voltage having the same waveform as when the power is turned on is applied at = t 0 .

次にt=t2で電源をオフしたとすると、センス端子10
からNMI端子へ電圧の立下がりエッジが印加され、前述
のノンマスカブル割込み処理が行なわれてコンデンサC
の電荷が時定数τで放電される。そして電源はオフさ
れているので、センス端子はローレベルであり、コンデ
ンサCは充電されることはない。
Next, if the power is turned off at t = t 2 , the sense terminal 10
From the NMI pin to the falling edge of the voltage, the non-maskable interrupt process described above is performed, and the capacitor C
Are discharged with a time constant τ 2 . Since the power supply is off, the sense terminal is at low level and the capacitor C is not charged.

このように本実施例によれば電源電圧をマイクロコン
ピュータ11のNMI端子12に接続して、電源電圧が瞬停し
た時に強制的にポート13をローレベルにしてリセット端
子14に印加される電圧を下げるようにしているので、確
実にマイクロコンピュータ11をリセットすることができ
るものである。
As described above, according to this embodiment, the power supply voltage is connected to the NMI terminal 12 of the microcomputer 11, and when the power supply voltage is momentarily stopped, the port 13 is forcibly set to the low level and the voltage applied to the reset terminal 14 is controlled. Since it is lowered, the microcomputer 11 can be reliably reset.

また、本実施例では従来例のようなデータを誤まって
RAMに書き込むといった誤動作を防止することができ
る。即ち、第4図に示すようにt=t0でマイクロコンピ
ュータ11がRAM17へデータ2の書き込み動作を行なうた
めのパルス▲▼をライト端子20から出しており、こ
のパルス▲▼が完了しないうちにt=t1で電源がオ
フされた場合、センス端子10及びNMI端子12の電圧はt
=t1のタイミングで立下がり、t=t2のタイミングでマ
イクロコンピュータ11はノンマスカブル割込みの処理が
開始される。この割込み処理がt=t1のタイミングでは
なくt=t2まで行なわれないのは、一般的にマイクロコ
ンピュータは計算結果等を保護するため割込みがかかる
と、即座に割込みの処理をするのではなく、現在行なっ
ている処理を完了させてから割込み処理に移るためであ
る。本発明の実施例はこのことを巧みに利用したもので
あり、マイクロコンピュータ11がRAM17へデータの書き
込み動作を完了させてからノンマスカブル割込み処理が
開始されるようにしており、従ってRAM17へ書き込まれ
るデータは誤まることなく正しく書き込まれるものであ
る。そして、ノンマスカブル割込み処理は第3図のフロ
ーチャートに示したようにマイクロコンピュータ11をリ
セットしてから終わるものであり、マイクロコンピュー
タがリセットして初めてRAM17のチップセレクト端子24
がローレベルとなり、RAM17内のデータが保護されるこ
ととなる。
In addition, in this embodiment, the data like the conventional example is erroneously
It is possible to prevent malfunctions such as writing to RAM. That is, as shown in FIG. 4, at t = t 0 , the microcomputer 11 issues a pulse ▲ ▼ for writing the data 2 to the RAM 17 from the write terminal 20, and before this pulse ▲ ▼ is completed. When the power is turned off at t = t 1 , the voltage of the sense terminal 10 and the NMI terminal 12 is t
At the timing of t = t 1 , the microcomputer 11 starts the non-maskable interrupt processing at the timing of t = t 2 . This interrupt processing is not performed until t = t 2 instead of at the timing of t = t 1. Generally, when a microcomputer receives an interrupt in order to protect the calculation result, it may be processed immediately. This is because the current processing is completed and then the interrupt processing is started. The embodiment of the present invention skillfully utilizes this, and the microcomputer 11 completes the data write operation to the RAM 17 before the non-maskable interrupt processing is started, so that the data written to the RAM 17 is written. Is written correctly without mistakes. The non-maskable interrupt process ends after the microcomputer 11 is reset as shown in the flow chart of FIG. 3, and the chip select terminal 24 of the RAM 17 is not until the microcomputer resets.
Becomes low level, and the data in the RAM 17 is protected.

発明の効果 以上の実施例から明らかなように本発明は電源をマイ
クロコンピュータのノンマスカブルインターラプト端子
に接続し、前記ノンマスカブルインターラプト端子とマ
イクロコンピュータのポートとの間に少なくとも2つの
抵抗素子よりなる分割抵抗を接続し、前記2つの抵抗素
子の接地点にマイクロコンピュータのリセット端子とコ
ンデンサの一端を接続し、前記コンデンサの他端を接地
するようにしたものであるので、極めて簡単な構成によ
り瞬停時でも確実にマイクロコンピュータをリセットす
ることができるリセット装置を安価に提供することがで
きる。
As is apparent from the above embodiments, the present invention connects the power supply to the non-maskable interrupt terminal of the microcomputer and divides the non-maskable interrupt terminal and the port of the microcomputer by at least two resistance elements. Since a resistor is connected, the reset terminal of the microcomputer and one end of the capacitor are connected to the grounding point of the two resistance elements, and the other end of the capacitor is grounded, the power failure is extremely simple. It is possible to inexpensively provide a reset device that can surely reset the microcomputer even at any time.

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

第1図は本発明の実施例のリセット装置の回路図、第2
図は同動作波形図、第3図は同フローチャート、第4図
は同動作波形図、第5図は従来例の回路図、第6図は同
動作波形図、第7図は他の従来例のブロック図である。 11……マイクロコンピュータ、12……ノンマスカブルイ
ンターラプト端子、13……ポート、14……リセット端
子、R1,R2……抵抗、C……コンデンサ。
FIG. 1 is a circuit diagram of a reset device according to an embodiment of the present invention, and FIG.
FIG. 4 is the same operation waveform diagram, FIG. 3 is the same flow chart, FIG. 4 is the same operation waveform diagram, FIG. 5 is a circuit diagram of a conventional example, FIG. 6 is the same operation waveform diagram, and FIG. 7 is another conventional example. It is a block diagram of. 11 …… Microcomputer, 12 …… Non-maskable interrupt terminal, 13 …… Port, 14 …… Reset terminal, R 1 , R 2 … Resistance, C …… Capacitor.

Claims (1)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】ノンマスカブルインターラプト端子と、プ
ログラムにより入出力を切換えることができるポートと
リセット端子とを有するマイクロコンピュータのリセッ
ト装置であって、電源を前記ノンマスカブルインターラ
プト端子に接続し、前記ノンマスカブルインターラプト
端子と前記ポートとの間に少なくとも2つの抵抗素子よ
りなる分割抵抗を接続し、前記2つの抵抗素子の接続点
に前記リセット端子とコンデンサの一端を接続し、前記
コンデンサの他端は接地したことを特徴とするリセット
装置。
1. A reset device for a microcomputer having a non-maskable interrupt terminal, a port whose input and output can be switched by a program, and a reset terminal, wherein a power supply is connected to the non-maskable interrupt terminal. A dividing resistor composed of at least two resistance elements is connected between the rust terminal and the port, the reset terminal and one end of the capacitor are connected to the connection point of the two resistance elements, and the other end of the capacitor is grounded. A reset device characterized by the above.
JP62130530A 1987-05-27 1987-05-27 Reset device Expired - Fee Related JP2516974B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP62130530A JP2516974B2 (en) 1987-05-27 1987-05-27 Reset device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP62130530A JP2516974B2 (en) 1987-05-27 1987-05-27 Reset device

Publications (2)

Publication Number Publication Date
JPS63293617A JPS63293617A (en) 1988-11-30
JP2516974B2 true JP2516974B2 (en) 1996-07-24

Family

ID=15036502

Family Applications (1)

Application Number Title Priority Date Filing Date
JP62130530A Expired - Fee Related JP2516974B2 (en) 1987-05-27 1987-05-27 Reset device

Country Status (1)

Country Link
JP (1) JP2516974B2 (en)

Also Published As

Publication number Publication date
JPS63293617A (en) 1988-11-30

Similar Documents

Publication Publication Date Title
US5537584A (en) Power instability control of a memory card and a data processing device therefor
US5555510A (en) Automatic computer card insertion and removal algorithm
US4777626A (en) Memory device having backup power supply
US6047343A (en) Method and apparatus for detecting insertion and removal of a memory module using standard connectors
GB2290891B (en) Multiprocessor system
US4845614A (en) Microprocessor for retrying data transfer
US4691126A (en) Redundant synchronous clock system
US7103738B2 (en) Semiconductor integrated circuit having improving program recovery capabilities
US5359728A (en) Data integrity assurance in a disk drive upon a power failure
US6523071B1 (en) Process and apparatus for configuring the direct memory access transfer mode of a motherboard or host computer
JP2516974B2 (en) Reset device
KR870011521A (en) Data protection device of engine control system using computer
JPH0822422A (en) Memory device
JP2659067B2 (en) Microcomputer reset circuit
JPS58139225A (en) Service interruption storage circuit
JP3262386B2 (en) Electrical component connection recognition device
JPH0334689B2 (en)
US5497481A (en) Microcomputer computer system having plural programmable timers and preventing memory access operations from interfering with timer start requests
JPH0887457A (en) Acquisition device for battery abnormality information on ram
JP3402414B2 (en) Watchdog timer circuit
JP2774595B2 (en) Operation monitoring device for CPU system
JP2640139B2 (en) Memory card
JPH01250162A (en) Memory writing system
JPH0246966B2 (en)
JPH0264726A (en) Information processor to connect external memory device

Legal Events

Date Code Title Description
LAPS Cancellation because of no payment of annual fees