JPH0628060A - Reset circuit for cpu - Google Patents

Reset circuit for cpu

Info

Publication number
JPH0628060A
JPH0628060A JP4183737A JP18373792A JPH0628060A JP H0628060 A JPH0628060 A JP H0628060A JP 4183737 A JP4183737 A JP 4183737A JP 18373792 A JP18373792 A JP 18373792A JP H0628060 A JPH0628060 A JP H0628060A
Authority
JP
Japan
Prior art keywords
reset
cpu
reset switch
power
switch
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
JP4183737A
Other languages
Japanese (ja)
Inventor
Motonobu Noma
元暢 野間
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.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric 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 Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP4183737A priority Critical patent/JPH0628060A/en
Publication of JPH0628060A publication Critical patent/JPH0628060A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To obtain a CPU reset circuit capable of holding contents stored in an internal RAM without clearing them even when a reset switch is operated. CONSTITUTION:A reset switch 6 is connected to an interruption terminal INT of a CPU 1, which includes an initializing routine for the reset switch 6 independently of an initializing routine for power ON. When a reset signal is inputted from the switch 6, the CPU 1 transfers processing to the reset switch initializing routine and initializes only another circuit without clearing the stored contents of the internal RAM 3.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】この発明は、CPUのリセット回
路に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a reset circuit for a CPU.

【0002】[0002]

【従来の技術】図3に、制御機器などにコントローラと
して組み込まれた従来のワンチップ・マイクロコンピュ
ータのリセット回路の構成を示す。図において、1はC
PU、2はROM、3はRAM、4は制御対象との間を
結ぶ入出力(I/O)インターフェース、5は電源ON
時に自動的にリセットをかけるパワーオンリセット回
路、6は手動リセットをかけるためのリッセットスイッ
チである。パワーオンリセット回路5とリセットスイッ
チ6は、CPU1のリセット端子RSTにそれぞれ接続
されている。
2. Description of the Related Art FIG. 3 shows a configuration of a reset circuit of a conventional one-chip microcomputer incorporated as a controller in a control device or the like. In the figure, 1 is C
PU, 2 is ROM, 3 is RAM, 4 is an input / output (I / O) interface connecting with a controlled object, and 5 is power ON
A power-on reset circuit for automatically resetting at times, and 6 is a reset switch for manually resetting. The power-on reset circuit 5 and the reset switch 6 are connected to the reset terminal RST of the CPU 1, respectively.

【0003】次に、図4のフローチャートを参照して、
前記従来のリセット回路の動作につき説明する。電源が
ONされると(ステップS41)、パワーオンリセット
回路5が作動し(ステップS42)、CPU1のリセッ
ト端子RSTにリセット信号が与えられる。
Next, referring to the flow chart of FIG.
The operation of the conventional reset circuit will be described. When the power is turned on (step S41), the power-on reset circuit 5 operates (step S42), and a reset signal is given to the reset terminal RST of the CPU 1.

【0004】すなわち、電源がONされると、パワーオ
ンリセット回路5内のコンデンサ51が抵抗52を通じ
て所定の時定数で充電され、この時定数で決定される一
定時間の間、所定のスレッショルドレベル以下のリセッ
ト信号がCPU1のリセット端子RSTへ入力される。
なお、ダイオード53は、電源OFF時のコンデンサ5
1の放電用である。
That is, when the power is turned on, the capacitor 51 in the power-on reset circuit 5 is charged with a predetermined time constant through the resistor 52, and is kept below a predetermined threshold level for a fixed time determined by this time constant. Is input to the reset terminal RST of the CPU 1.
The diode 53 is the capacitor 5 when the power is off.
1 for discharge.

【0005】CPU1は、このリセット信号の入力によ
り初期化ルーチンへ移行し、RAM3のチェックを行っ
た後(ステップS43)、RAM3の記憶内容を零クリ
アするとともに(ステップS44)、他の必要な回路、
例えばCPU1内のレジスタやI/Oインターフェース
などの周辺回路を初期化する。この初期化処理が終了す
ると、処理はメインルーチンへ移り(ステップS4
5)、メインルーチンで定められた所定の制御を繰り返
し実行する。
Upon the input of this reset signal, the CPU 1 shifts to the initialization routine, checks the RAM 3 (step S43), then clears the stored contents of the RAM 3 to zero (step S44), and other necessary circuits. ,
For example, peripheral circuits such as registers in the CPU 1 and I / O interfaces are initialized. When this initialization process ends, the process moves to the main routine (step S4).
5) The predetermined control determined by the main routine is repeatedly executed.

【0006】ここで、リセットスイッチ6をONし、リ
セット端子RSTにリセット信号を入力すると(ステッ
プS46)、CPU1の処理はメインルーチン(ステッ
プS45)から再びステップS43,44の初期化ルー
チンへ飛び、RAM3のチェックおよびその記憶内容の
零クリアを行った後、再びメインルーチン(ステップS
45)へ戻ってメインルーチンの処理を最初からやり直
す。
When the reset switch 6 is turned on and a reset signal is input to the reset terminal RST (step S46), the process of the CPU 1 jumps from the main routine (step S45) to the initialization routine of steps S43 and S44. After checking the RAM 3 and clearing the stored contents to zero, the main routine is executed again (step S
The process returns to 45) and the process of the main routine is restarted from the beginning.

【0007】[0007]

【発明が解決しようとする課題】従来のCPUのリセッ
ト回路の場合、リセットスイッチ6を操作してリセット
をかけると、それまでRAM3に記憶されていた内容が
クリアされてしまうという問題があった。マイクロコン
ピュータを組み込んだ制御対象によっては、リセット
時、RAM3の記憶内容はクリアすることなくそのまま
保持し、その保持データを用いてメインルーチンの処理
を再開した方がよい場合もある。従来のリセット回路は
このような場合にまったく対処することができなかっ
た。
In the case of a conventional CPU reset circuit, when the reset switch 6 is operated to perform a reset, the contents stored in the RAM 3 until then are cleared. Depending on the control target incorporating the microcomputer, it may be better to hold the stored contents of the RAM 3 as they are without clearing them at the time of reset, and restart the processing of the main routine using the held data. The conventional reset circuit cannot cope with such a case at all.

【0008】この発明は前記のような課題を解決するた
めになされたもので、リセットスイッチを操作しても内
部RAMの記憶内容についてはそのまま保持されてクリ
アされることのないCPUのリセット回路を提供するこ
とを目的とするものである。
The present invention has been made to solve the above problems, and provides a CPU reset circuit that does not clear the contents stored in the internal RAM even if the reset switch is operated. It is intended to be provided.

【0009】[0009]

【課題を解決するための手段】前記目的を達成するた
め、この発明に係るCPUのリセット回路は、リセット
スイッチをCPUの割り込み端子に接続するとともに、
電源投入時の初期化ルーチンとは独立したリセットスイ
ッチ用の初期化ルーチンを内蔵し、前記リセットスイッ
チからリセット信号が入力されたときは前記リセットス
イッチ用の期化ルーチンに処理を移行し、内部RAMの
記憶内容はクリアすることなく他の回路のみを初期化す
るようにしたものである。
In order to achieve the above object, a reset circuit for a CPU according to the present invention connects a reset switch to an interrupt terminal of the CPU, and
A reset switch initialization routine independent of the power-on initialization routine is incorporated, and when a reset signal is input from the reset switch, the process proceeds to the reset switch initialization routine, and the internal RAM The memory contents of are not cleared but only other circuits are initialized.

【0010】[0010]

【作用】この発明に係るCPUのリセット回路の場合、
リセットスイッチからリセットがかけられると、処理は
リセットスイッチ用の初期化ルーチンへ飛び、内部RA
Mの記憶内容はクリアすることなく保持したままで、他
の回路のみを初期化する。したがって、リセット後で
も、RAMの内容はそのまま残っているので、このRA
Mの記憶内容を用いてメインルーチンの処理を再開する
ことができる。
In the case of the reset circuit of the CPU according to the present invention,
When reset is applied from the reset switch, the process jumps to the initialization routine for the reset switch, and the internal RA
The memory contents of M are retained without being cleared, and only the other circuits are initialized. Therefore, the contents of the RAM remain intact even after a reset, so this RA
The processing of the main routine can be restarted using the stored contents of M.

【0011】[0011]

【実施例】以下、図面を参照して本発明の実施例につき
説明する。図1に、この発明に係るリセット回路の1実
施例を示す。図において、1はCPU、2はROM、3
はRAM、4は制御対象との間を結ぶ入出力(I/O)
インターフェース、5は電源ON時に自動的にリセット
をかけるパワーオンリセット回路、6は手動リセットを
かけるためのリッセットスイッチである。
Embodiments of the present invention will be described below with reference to the drawings. FIG. 1 shows one embodiment of the reset circuit according to the present invention. In the figure, 1 is a CPU, 2 is a ROM, and 3
Is RAM, and 4 is an input / output (I / O) connecting with the control target
Interface 5 is a power-on reset circuit that automatically resets when the power is turned on, and 6 is a reset switch for manually resetting.

【0012】本発明の場合、パワーオンリセット回路5
については、従来のリセット回路と同様に、CPU1の
リセット端子RSTに接続されるが、リセットスイッチ
6については、CPU1の割り込み端子INTに接続さ
れる。さらに、ROM2中には、パワーオンリセット回
路5によるリセットのための初期化ルーチン(図2中の
ステップS43,44の処理)の他に、リセットスイッ
チ用の初期化ルーチン(図2の中のステップS47の処
理)を用意しておく。このリセットスイッチ用の初期化
ルーチンは、少なくともRAM3の記憶内容については
クリアしないようなプログラムとなっている。
In the case of the present invention, the power-on reset circuit 5
Is connected to the reset terminal RST of the CPU 1 like the conventional reset circuit, but the reset switch 6 is connected to the interrupt terminal INT of the CPU 1. Further, in the ROM 2, in addition to an initialization routine for resetting by the power-on reset circuit 5 (processing of steps S43 and 44 in FIG. 2), an initialization routine for reset switch (steps in FIG. 2). The process of S47) is prepared. This reset switch initialization routine is a program that does not clear at least the contents stored in the RAM 3.

【0013】次に、図2のフローチャートを参照して、
前記実施例の動作につき説明する。電源がONされると
(ステップS41)、従来と同様にパワーオンリセット
回路5によってパワーオンリセットがかかり(ステップ
S42)、パワーオンリセット用の初期化ルーチン(ス
テップS43,44)が実行されるた後、メインルーチ
ンへ移行する(ステップS45)。
Next, referring to the flowchart of FIG.
The operation of the above embodiment will be described. When the power is turned on (step S41), the power-on reset circuit 5 performs power-on reset as in the conventional case (step S42), and the initialization routine for power-on reset (steps S43 and 44) is executed. After that, the process proceeds to the main routine (step S45).

【0014】ここで、リセットスイッチ6をONしてリ
セットをかけると(ステップS46)、このリセット信
号はCPU1の割り込み端子INTに入力される。CP
U1は、割り込み端子INTにリセット信号が与えられ
たことを検知すると、それまで実行していたメインルー
チンからリセットスイッチ用の初期化ルーチン(ステッ
プS46)へ飛び、RAM3の記憶内容はそのままクリ
アすることなく、他の回路、例えばCPU1内のレジス
タやI/Oインターフェースなどの周辺回路のみを初期
化する。そして、このリセットスイッチ用の初期化ルー
チンの処理を終了すると、メインルーチン45の先頭へ
戻り、RAM3に記憶されているデータを用いてメイン
ルーチンの処理を再開する。
When the reset switch 6 is turned on to reset (step S46), this reset signal is input to the interrupt terminal INT of the CPU 1. CP
When U1 detects that a reset signal has been applied to the interrupt terminal INT, it jumps from the main routine that has been executed up to that point to the reset switch initialization routine (step S46), and clears the contents stored in RAM3. Instead, only other circuits, for example, peripheral circuits such as registers in the CPU 1 and I / O interfaces are initialized. Then, when the processing of the initialization routine for the reset switch is completed, the processing returns to the head of the main routine 45 and the processing of the main routine is restarted using the data stored in the RAM 3.

【0015】[0015]

【発明の効果】以上述べたように、この発明に係るCP
Uのリセット回路によれば、リセットスイッチからリセ
ット信号を入力された場合、内部RAMの記憶内容はク
リアされることなくそのまま保持されるため、リセット
信号が入力される前のデータを用いてメインルーチンの
処理を再開することができる。
As described above, the CP according to the present invention
According to the reset circuit of U, when a reset signal is input from the reset switch, the stored contents of the internal RAM are retained as they are without being cleared. Therefore, the main routine is performed using the data before the reset signal is input. The processing of can be restarted.

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

【図1】この発明に係るCPUのリセット回路の実施例
を示す回路図である。
FIG. 1 is a circuit diagram showing an embodiment of a reset circuit of a CPU according to the present invention.

【図2】前記実施例の動作を示すフローチャートであ
る。
FIG. 2 is a flowchart showing the operation of the embodiment.

【図3】従来のCPUのリセット回路を示す回路図であ
る。
FIG. 3 is a circuit diagram showing a reset circuit of a conventional CPU.

【図4】前記従来回路の動作を示すフローチャートであ
る。
FIG. 4 is a flowchart showing the operation of the conventional circuit.

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

1 CPU 2 ROM 3 RAM 4 I/Oインターフェース 5 パワーオンリセット回路 6 リセットスイッチ RST リセット端子 INT 割り込み端子 1 CPU 2 ROM 3 RAM 4 I / O interface 5 Power-on reset circuit 6 Reset switch RST Reset terminal INT interrupt terminal

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】 リセットスイッチをCPUの割り込み端
子に接続するとともに、電源投入時の初期化ルーチンと
は独立したリセットスイッチ用の初期化ルーチンを内蔵
し、 前記リセットスイッチからリセット信号が入力されたと
きは前記リセットスイッチ用の期化ルーチンに処理を移
行し、内部RAMの記憶内容をクリアすることなく他の
回路のみを初期化するようにしたことを特徴とするCP
Uのリセット回路。
1. A reset switch is connected to an interrupt terminal of a CPU, and an initialization routine for a reset switch, which is independent of an initialization routine at power-on, is incorporated, and when a reset signal is input from the reset switch. CP shifts the processing to the resetting routine for the reset switch and initializes only the other circuits without clearing the contents stored in the internal RAM.
U reset circuit.
JP4183737A 1992-07-10 1992-07-10 Reset circuit for cpu Pending JPH0628060A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP4183737A JPH0628060A (en) 1992-07-10 1992-07-10 Reset circuit for cpu

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP4183737A JPH0628060A (en) 1992-07-10 1992-07-10 Reset circuit for cpu

Publications (1)

Publication Number Publication Date
JPH0628060A true JPH0628060A (en) 1994-02-04

Family

ID=16141095

Family Applications (1)

Application Number Title Priority Date Filing Date
JP4183737A Pending JPH0628060A (en) 1992-07-10 1992-07-10 Reset circuit for cpu

Country Status (1)

Country Link
JP (1) JPH0628060A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6353533B1 (en) 1997-06-13 2002-03-05 Compaq Information Technologies Group, L.P. Ergonomic controls for a personal computer CPU
JP2011070306A (en) * 2009-09-24 2011-04-07 Japan Radio Co Ltd Program starting method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6353533B1 (en) 1997-06-13 2002-03-05 Compaq Information Technologies Group, L.P. Ergonomic controls for a personal computer CPU
JP2011070306A (en) * 2009-09-24 2011-04-07 Japan Radio Co Ltd Program starting method

Similar Documents

Publication Publication Date Title
US7170498B2 (en) Computer system provided with hotkeys
KR960035262A (en) Method and apparatus for selective control of interrupt wait in data processing system
JPS6019220A (en) Microcomputer
EP0629301B1 (en) System and method for resetting a microprocessor system
JPH0561724A (en) Initializing information resetting system
JPH0628060A (en) Reset circuit for cpu
JP3322664B2 (en) LCD projector
US20050144498A1 (en) [method and apparatus for tuning over clock and tuning method for sub-stable state with high performance]
JP3052595B2 (en) Computer redundancy control method
JPH08179857A (en) Reset circuit
JPS5854418A (en) Interruption processing system
JPS63184147A (en) Method for initializing channel controller
JP3201530B2 (en) Information processing apparatus and method
JPS61177551A (en) Start-up control system of processor
JPH1131068A (en) Reset vector switching method and information processor using the switching method
JPS62211737A (en) Error recovery system
JP2000112576A (en) Reset device and information processor
JP2573415Y2 (en) Data output switching device
KR920001358Y1 (en) Rom for resetting of micro processor system
JP3055972B2 (en) Basic call control return method
JPH05197451A (en) Information processor
JPS62243018A (en) Reset control system
JPH05233308A (en) Program maintaining method
JPH06282358A (en) Reset system for semiconductor integrated circuit
JPS61141037A (en) Microprocessor