JP4248963B2 - Timing device - Google Patents

Timing device Download PDF

Info

Publication number
JP4248963B2
JP4248963B2 JP2003284243A JP2003284243A JP4248963B2 JP 4248963 B2 JP4248963 B2 JP 4248963B2 JP 2003284243 A JP2003284243 A JP 2003284243A JP 2003284243 A JP2003284243 A JP 2003284243A JP 4248963 B2 JP4248963 B2 JP 4248963B2
Authority
JP
Japan
Prior art keywords
microcomputer
pulse signal
reset
frequency
operation cycle
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Lifetime
Application number
JP2003284243A
Other languages
Japanese (ja)
Other versions
JP2005049312A (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.)
Rinnai Corp
Original Assignee
Rinnai 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 Rinnai Corp filed Critical Rinnai Corp
Priority to JP2003284243A priority Critical patent/JP4248963B2/en
Publication of JP2005049312A publication Critical patent/JP2005049312A/en
Application granted granted Critical
Publication of JP4248963B2 publication Critical patent/JP4248963B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Images

Description

本発明は、2つのマイクロコンピュータを並行して作動させ、各マイクロコンピュータにより計時処理を行う計時装置における各マイクロコンピュータの動作サイクルの異常検知に関する。   The present invention relates to detection of an abnormality in the operation cycle of each microcomputer in a timing device that operates two microcomputers in parallel and performs time-measurement processing with each microcomputer.

従来より、マイクロコンピュータを用いたシステムにおいては、マイクロコンピュータの暴走が生じたときにマイクロコンピュータをリセットしてその作動を停止するために、ウォッチドッグタイマ回路が設けられている。ウォッチドッグタイマ回路は、マイクロコンピュータの正常動作時に該マイクロコンピュータから間欠的に出力されるパルス信号の有無を監視し、暴走により該パルス信号の出力が停止したときにマイクロコンピュータのリセット端子にリセット信号を出力するように構成される。   2. Description of the Related Art Conventionally, in a system using a microcomputer, a watchdog timer circuit is provided to reset the microcomputer and stop its operation when the microcomputer runs away. The watchdog timer circuit monitors the presence or absence of a pulse signal that is intermittently output from the microcomputer during normal operation of the microcomputer. When the output of the pulse signal stops due to runaway, a reset signal is output to the microcomputer reset terminal. Is configured to output.

また、例えば、ガス器具の作動を制御するコントローラにおいて、ガスバーナの燃焼時間を監視するためのタイマを、ソフトウェアによる計時処理によって構成したものがあるが、マイクロコンピュータに入力される基準クロック信号の周波数が電源電圧の変動等によって変化すると、それに応じてマイクロコンピュータの動作サイクルが変化する。   Further, for example, in a controller that controls the operation of a gas appliance, there is a timer configured to monitor the combustion time of the gas burner by a time measurement process by software, but the frequency of the reference clock signal input to the microcomputer is If it changes due to fluctuations in the power supply voltage or the like, the operation cycle of the microcomputer changes accordingly.

そして、マイクロコンピュータの動作サイクルの変化が大きいときには、タイマによる計時時間が実際の経過時間から大きくずれ、ガスバーナの燃焼時間を正確に監視することができなくなる。そこで、ウォッチドッグタイマ回路に、マイクロコンピュータからウォッチドッグタイマ回路に入力されるパルス信号の周波数(マイクロコンピュータの動作サイクルに依存する)が、所定の周波数範囲内にあるか否かを検知する機能を設け、該パルス信号の周波数が該周波数範囲内から逸脱したときにも、ウォッチドッグタイマ回路からマイクロコンピュータに対してリセット信号を出力するようにした燃焼装置が提案されている(例えば、特許文献1参照)。   When the change in the operation cycle of the microcomputer is large, the time measured by the timer is greatly deviated from the actual elapsed time, and the combustion time of the gas burner cannot be accurately monitored. Therefore, the watchdog timer circuit has a function of detecting whether or not the frequency of the pulse signal input to the watchdog timer circuit from the microcomputer (depending on the operation cycle of the microcomputer) is within a predetermined frequency range. A combustion apparatus has been proposed in which a reset signal is output from a watchdog timer circuit to a microcomputer even when the frequency of the pulse signal deviates from the frequency range (for example, Patent Document 1). reference).

しかし、マイクロコンピュータを2個用いて各マイクロコンピュータにより計時処理を行う場合に、各マイクロコンピュータの動作サイクルの異常を検知するためには、各マイクロコンピュータごとに上述したパルス信号が所定の周波数範囲内にあるか否かを検知する機能を有するウォッチドッグタイマ回路を設ける必要がある。そのため、回路部品の点数増加により、コストがアップすると共に部品の実装スペースの増大により回路基板のサイズがアップするという不都合がある。
特開2002−130670号公報
However, when two microcomputers are used and each microcomputer performs timing processing, in order to detect an abnormality in the operation cycle of each microcomputer, the pulse signal described above for each microcomputer falls within a predetermined frequency range. Therefore, it is necessary to provide a watchdog timer circuit having a function of detecting whether or not there is. For this reason, there is an inconvenience that the cost increases due to the increase in the number of circuit components, and the size of the circuit board increases due to an increase in the mounting space of the components.
JP 2002-130670 A

本発明は、上記背景を鑑みてなされたものであり、2個のマイクロコンピュータを有して、各マイクロコンピュータにより計時処理を行う計時装置において、各マイクロコンピュータの動作サイクルの異常を検知する機能を、部品の実装スペースの増大を抑制して低コストで提供することを目的とする。   The present invention has been made in view of the above-described background, and has a function of detecting an abnormality in an operation cycle of each microcomputer in a time measuring apparatus that has two microcomputers and performs time measurement processing with each microcomputer. An object of the present invention is to provide a low cost by suppressing an increase in mounting space of components.

本発明は上記目的を達成するためになされたものであり、第1の発振回路から出力されるクロック信号に基づく第1の動作サイクルで作動する第1のマイクロコンピュータと、第2の発振回路から出力されるクロック信号に基づく第2の動作サイクルで作動する第2のマイクロコンピュータとを並行して稼動させ、該第1のマイクロコンピュータ及び該第2のマイクロコンピュータにより所定の計時処理を行う計時装置の改良に関する。   The present invention has been made to achieve the above object, and includes a first microcomputer that operates in a first operation cycle based on a clock signal output from the first oscillation circuit, and a second oscillation circuit. A time measuring device that operates in parallel with a second microcomputer that operates in a second operation cycle based on a clock signal that is output, and performs a predetermined time measuring process by the first microcomputer and the second microcomputer. Regarding improvements.

そして、前記第1のマイクロコンピュータは、前記第1の動作サイクルを基準とした計時処理により所定周波数の第1のパルス信号を出力する手段を有し、前記第2のマイクロコンピュータは、前記第1のパルス信号を入力して、前記第2の動作サイクルを基準とした計時処理により前記第1のパルス信号の周波数を算出する周波数算出手段を有して、前記周波数算出手段により算出された前記第1のパルス信号の周波数が、前記第1の動作サイクル及び前記第2の動作サイクルが正常であると判断し得る周波数範囲から逸脱したときに、前記第1のマイクロコンピュータ及び前記第2のマイクロコンピュータをリセットするリセット手段を備えたことを特徴とする。   The first microcomputer has means for outputting a first pulse signal having a predetermined frequency by a time measurement process based on the first operation cycle, and the second microcomputer has the first microcomputer. And a frequency calculating means for calculating the frequency of the first pulse signal by a time measurement process based on the second operation cycle, and the first frequency signal calculated by the frequency calculating means. The first microcomputer and the second microcomputer when the frequency of one pulse signal deviates from a frequency range in which it can be determined that the first operation cycle and the second operation cycle are normal. A reset means for resetting is provided.

かかる本発明によれば、前記第1の発振回路の異常等により前記第1の動作サイクルが変化すると、前記第1のマイクロコンピュータから出力される前記第1のパルス信号の周波数が変化する。そして、前記第2のコンピュータの前記周波数算出手段により算出される前記第1のパルス信号の周波数が前記周波数範囲から逸脱すると、前記リセット手段により前記第1のマイクロコンピュータ及び前記第2のマイクロコンピュータが共にリセットされる。   According to the present invention, when the first operation cycle changes due to abnormality of the first oscillation circuit, the frequency of the first pulse signal output from the first microcomputer changes. When the frequency of the first pulse signal calculated by the frequency calculation means of the second computer deviates from the frequency range, the reset microcomputer causes the first microcomputer and the second microcomputer to be Both are reset.

また、前記第2の発振回路の異常等により前記第2の動作サイクルが変化すると、前記第2のマイクロコンピュータの前記周波数算出手段により、前記第2の動作サイクルを基準として算出される前記第1のパルス信号の周波数が変化する。そして、前記周波数算出手段により算出される前記第1のパルス信号の周波数が前記周波数範囲から逸脱すると、前記リセット手段により前記第1のマイクロコンピュータ及び前記第2のマイクロコンピュータが共にリセットされる。   Further, when the second operation cycle changes due to an abnormality of the second oscillation circuit, etc., the first microcomputer is calculated based on the second operation cycle by the frequency calculation means of the second microcomputer. The frequency of the pulse signal changes. When the frequency of the first pulse signal calculated by the frequency calculation means deviates from the frequency range, both the first microcomputer and the second microcomputer are reset by the reset means.

したがって、前記第1の動作サイクルと前記第2の動作サイクルのうちの少なくともいずれか一方の異常が生じたときに、前記周波数算出手段により算出される前記第1のパルス信号の周波数が変化し、該周波数が前記周波数範囲から逸脱したときに前記リセット手段により前記第1のマイクロコンピュータ及び前記第2のマイクロコンピュータがリセットされる。   Therefore, when an abnormality occurs in at least one of the first operation cycle and the second operation cycle, the frequency of the first pulse signal calculated by the frequency calculation unit changes, When the frequency deviates from the frequency range, the first microcomputer and the second microcomputer are reset by the reset means.

そして、本発明においては、前記周波数算出手段は前記第2のマイクロコンピュータにおけるソフトウェア処理により実現され、ハードウェアによる構成は前記リセット手段のみで済む。そのため、部品コストの増加と部品実装スペースの増大を抑制して、前記第1のマイクロコンピュータ及び前記第2のマイクロコンピュータの動作サイクルの異常を検知する機能を実現することができる。   In the present invention, the frequency calculation means is realized by software processing in the second microcomputer, and the hardware configuration is only the reset means. Therefore, it is possible to realize a function of detecting an abnormality in the operation cycle of the first microcomputer and the second microcomputer while suppressing an increase in component cost and an increase in component mounting space.

また、前記第2のマイクロコンピュータは、正常動作時に第2のパルス信号を間欠的に出力し、該第2のパルス信号の出力が停止したときに、前記第1のマイクロコンピュータのリセット端子及び前記第2のマイクロコンピュータのリセット端子にリセット信号を出力するウォッチドックタイマ回路を備え、前記リセット手段は、前記第2のマイクロコンピュータからの前記第2のパルス信号の出力を停止して、前記ウォッチドッグタイマ回路から前記第1のマイクロコンピュータ及び前記第2のマイクロコンピュータのリセット端子にリセット信号を出力することによって、前記第1のマイクロコンピュータ及び前記第2のマイクロコンピュータをリセットすることを特徴とする。   The second microcomputer intermittently outputs a second pulse signal during normal operation, and when the output of the second pulse signal is stopped, the reset terminal of the first microcomputer and the second microcomputer A watchdog timer circuit for outputting a reset signal to a reset terminal of a second microcomputer, wherein the reset means stops outputting the second pulse signal from the second microcomputer, and The first microcomputer and the second microcomputer are reset by outputting a reset signal from a timer circuit to reset terminals of the first microcomputer and the second microcomputer.

かかる本発明によれば、前記第2のマイクロコンピュータの暴走時に前記第2のマイクロコンピュータをリセットするために一般的に設けられる前記ウォッチドッグタイマを転用して前記リセット手段を構成する。そのため、新たな部品の追加が抑制され、前記第1のマイクロコンピュータ及び前記第2のマイクロコンピュータの動作サイクルの異常を検知する機能を、さらに低コスト及び省スペースを図って実現することができる。   According to the present invention, the reset means is configured by diverting the watchdog timer generally provided for resetting the second microcomputer when the second microcomputer is out of control. Therefore, the addition of new parts is suppressed, and the function of detecting an abnormality in the operation cycle of the first microcomputer and the second microcomputer can be realized with lower cost and space saving.

本発明の実施の形態の一例を、図1〜図2を参照して説明する。図1は計時装置の回路図、図2は図1に示したマイクロコンピュータの作動フローチャートである。   An example of an embodiment of the present invention will be described with reference to FIGS. FIG. 1 is a circuit diagram of the timing device, and FIG. 2 is an operation flowchart of the microcomputer shown in FIG.

図1を参照して、本実施の形態の計時装置は、ガスバーナ(図示しない)を備えたガス器具の作動を制御するコントローラの一部を構成するものであり、メインのマイクロコンピュータ1(以下、メインマイコン1という。本発明の第2のマイクロコンピュータに相当する)とサブのマイクロコンピュータ2(以下、サブマイコン2という。本発明の第1のマイクロコンピュータに相当する)による計時処理によって、ガスバーナの作動時間の制御及び監視を行なうための時間等を計測する。   Referring to FIG. 1, the timing device of the present embodiment constitutes a part of a controller that controls the operation of a gas appliance provided with a gas burner (not shown). The main microcomputer 1 (corresponding to the second microcomputer of the present invention) and the sub-microcomputer 2 (hereinafter referred to as sub-microcomputer 2; corresponding to the first microcomputer of the present invention) are used to measure the gas burner. Measure the time for controlling and monitoring the operating time.

メインマイコン1のクロック端子(CKm)には、発振回路4(本発明の第2の発振回路に相当する)から出力されるクロック信号(CK2)が入力され、メインマイコン1は該クロック信号(CK2)に同期した動作サイクル(Cyc2,本発明の第2の動作サイクルに相当する)で作動する。また、サブマイコン2のクロック端子(CKs)には、発振回路5(本発明の第1の発振回路に相当する)から出力されるクロック信号(CK1)が入力され、サブマイコン2は該クロック信号(CK1)に同期した動作サイクル(Cyc1,本発明の第1の動作サイクルに相当する)で作動する。   The clock signal (CK2) output from the oscillation circuit 4 (corresponding to the second oscillation circuit of the present invention) is input to the clock terminal (CKm) of the main microcomputer 1, and the main microcomputer 1 receives the clock signal (CK2). ) In synchronization with the operation cycle (Cyc2, which corresponds to the second operation cycle of the present invention). The clock signal (CK1) output from the oscillation circuit 5 (corresponding to the first oscillation circuit of the present invention) is input to the clock terminal (CKs) of the sub-microcomputer 2, and the sub-microcomputer 2 receives the clock signal. It operates in an operation cycle (Cyc1, corresponding to the first operation cycle of the present invention) synchronized with (CK1).

また、ウォッチドッグタイマ回路3のクロック端子(CKw)は、メインマイコン1の出力端子(OUTm1)と接続され、リセット出力端子(RSTw)は、メインマイコン1のリセット端子(RSTm)及びANDゲート7の入力端子と接続されている。   The clock terminal (CKw) of the watchdog timer circuit 3 is connected to the output terminal (OUTm1) of the main microcomputer 1, and the reset output terminal (RSTw) is the reset terminal (RSTm) of the main microcomputer 1 and the AND gate 7. Connected to the input terminal.

ウォッチドッグタイマ回路3は、メインマイコン1の出力端子(OUTm1)からクロック端子(CKw)にロジック高レベルのパルス信号(Pu2_sig,本発明の第2のパルス信号に相当する)が入力されたときに、予め設定された時間のタイマをスタートさせる。   The watchdog timer circuit 3 receives a logic high level pulse signal (Pu2_sig, corresponding to the second pulse signal of the present invention) from the output terminal (OUTm1) of the main microcomputer 1 to the clock terminal (CKw). Start a timer for a preset time.

そして、タイマがタイムアップする前にクロック入力端子(CKw)に再びパルス信号(Pu2_sig)が入力されたときは、ウォッチドッグタイマ回路3はタイマを再スタートさせる。一方、タイマがタイマアップしたときには、ウォッチドッグタイマ回路3は、リセット出力端子(RSTw)からロジック低レベルのリセット信号(RS_sig)を出力する。これにより、メインマイコン1のリセット端子(RSTm)にロジック低レベルの信号が入力されてメインマイコン1がリセットされ、また、ANDゲート7の出力端子からサブマイコン2のリセット端子(RSTs)にロジック低レベルの信号が入力されてサブマイコン2もリセットされる。   When the pulse signal (Pu2_sig) is input again to the clock input terminal (CKw) before the timer expires, the watchdog timer circuit 3 restarts the timer. On the other hand, when the timer expires, the watchdog timer circuit 3 outputs a logic low level reset signal (RS_sig) from the reset output terminal (RSTw). As a result, a logic low level signal is input to the reset terminal (RSTm) of the main microcomputer 1 to reset the main microcomputer 1, and the logic low from the output terminal of the AND gate 7 to the reset terminal (RSTs) of the sub microcomputer 2. When the level signal is input, the sub-microcomputer 2 is also reset.

また、安全回路6はメインマイコン1の出力端子(OUTm1)から出力されるパルス信号(Pu2_sig)の有無を監視し、該パルス信号(Pu2_sig)が出力されなくなったときに、ガスバーナへの燃料ガスの供給を遮断してガスバーナの燃焼を強制的に停止する。   Further, the safety circuit 6 monitors the presence or absence of a pulse signal (Pu2_sig) output from the output terminal (OUTm1) of the main microcomputer 1, and when the pulse signal (Pu2_sig) is not output, the fuel gas is supplied to the gas burner. Shut off the supply and forcibly stop the combustion of the gas burner.

次に、メインマイコン1の動作サイクル(Cyc2)及びサブマイコン2の動作サイクル(Cyc1)の異常検知について説明する。ガス器具のコントローラへの電源供給が開始されると、メインマイコン1及びサブマイコン2は作動を開始し、サブマイコン2は、正常にプログラムを実行している間は動作サイクル(Cyc1)に基づく計時処理によって、所定周波数のパルス信号(Pu1_sig)をメインマイコン1に出力する。   Next, abnormality detection of the operation cycle (Cyc2) of the main microcomputer 1 and the operation cycle (Cyc1) of the sub-microcomputer 2 will be described. When the power supply to the controller of the gas appliance is started, the main microcomputer 1 and the sub microcomputer 2 start to operate, and the sub microcomputer 2 keeps timing based on the operation cycle (Cyc1) while executing the program normally. By processing, a pulse signal (Pu1_sig) having a predetermined frequency is output to the main microcomputer 1.

また、メインマイコン1は、プログラムの実行中に図2に示したフローチャートに従って、サブマイコン2の動作サイクル及びメインマイコン1の動作サイクルの異常を検知する。   Further, the main microcomputer 1 detects an abnormality in the operation cycle of the sub-microcomputer 2 and the operation cycle of the main microcomputer 1 according to the flowchart shown in FIG. 2 during execution of the program.

メインマイコン1は、STEP1〜STEP4のループを繰り返し実行し、STEP1でウォッチドッグタイマ回路3のタイマ設定時間よりも短い周期でパルス信号(Pu2_sig)を間欠的に出力する。また、STEP2でサブマイコン2から出力される第1のパルス信号(Pu1_sig)を入力し、次のSTEP3で第1のパルス信号(Pu1_sig)の周波数を算出する。そして、続くSTEP4で、メインマイコン1は、第1のパルス信号(Pu1_sig)の周波数の算出値(Pu1_fc)が予め定められた周波数範囲(下限周波数≦Pu1_fc≦上限周波数)内にあるか否かを判断する。   The main microcomputer 1 repeatedly executes the loop of STEP1 to STEP4, and intermittently outputs the pulse signal (Pu2_sig) at a cycle shorter than the timer set time of the watchdog timer circuit 3 at STEP1. Further, the first pulse signal (Pu1_sig) output from the sub-microcomputer 2 is input in STEP2, and the frequency of the first pulse signal (Pu1_sig) is calculated in the next STEP3. In subsequent STEP 4, the main microcomputer 1 determines whether or not the calculated value (Pu1_fc) of the frequency of the first pulse signal (Pu1_sig) is within a predetermined frequency range (lower limit frequency ≦ Pu1_fc ≦ upper limit frequency). to decide.

なお、STEP3において、メインマイコン1が第1のパルス信号(Pu1_sig)の周波数を算出する機能が、本発明の周波数算出手段に相当する。   In STEP 3, the function that the main microcomputer 1 calculates the frequency of the first pulse signal (Pu1_sig) corresponds to the frequency calculation means of the present invention.

ここで、発振回路5に供給される電源電圧の異常や、発振回路5自体の不良等により、サブマイコン2に入力されるクロック信号(CK1)の周波数が基準周波数からずれると、それに応じてサブマイコン2の動作サイクル(Cyc1)が変化する。そして、サブマイコン2は動作サイクル(Cyc1)に基づく計時処理を行って第1のパルス信号(Pu1_sig)の周波数を設定している。そのため、動作サイクル(Cyc1)が変化するとそれに応じて第1のパルス信号(Pu1_sig)の周波数が変化する。   Here, if the frequency of the clock signal (CK1) input to the sub-microcomputer 2 deviates from the reference frequency due to an abnormality in the power supply voltage supplied to the oscillation circuit 5 or a defect in the oscillation circuit 5 itself, the sub frequency is accordingly changed. The operation cycle (Cyc1) of the microcomputer 2 changes. Then, the sub-microcomputer 2 sets the frequency of the first pulse signal (Pu1_sig) by performing a time measurement process based on the operation cycle (Cyc1). Therefore, when the operation cycle (Cyc1) changes, the frequency of the first pulse signal (Pu1_sig) changes accordingly.

また、発振回路4に供給される電源電圧の異常や、発振回路4自体の不良等により、メインマイコン1に入力されるクロック信号(CK2)の周波数が基準周波数からずれると、それに応じてメインマイコン1の動作サイクル(Cyc2)が変化する。そして、メインマイコン1は動作サイクル(Cyc2)に基づく計時処理を行って第1のパルス信号(Pu1_sig)の周波数を算出している。そのため、動作サイクル(Cyc2)が変化すると、算出される第1のパルス信号(Pu1_sig)の周波数(Pu1_sig)が変化する。   Further, if the frequency of the clock signal (CK2) input to the main microcomputer 1 deviates from the reference frequency due to an abnormality in the power supply voltage supplied to the oscillation circuit 4 or a defect in the oscillation circuit 4 itself, the main microcomputer is accordingly changed. 1 operation cycle (Cyc2) changes. Then, the main microcomputer 1 performs a time measurement process based on the operation cycle (Cyc2) to calculate the frequency of the first pulse signal (Pu1_sig). Therefore, when the operation cycle (Cyc2) changes, the frequency (Pu1_sig) of the calculated first pulse signal (Pu1_sig) changes.

したがって、メインマイコン1による第1のパルス信号(Pu1_sig)の周波数の算出値(Pu1_fc)は、サブマイコン2の動作サイクル(Cyc1)が変化した場合、及びメインマイコン1の動作サイクル(Cyc2)が変化した場合のいずれの場合であっても変化する。   Therefore, the calculated value (Pu1_fc) of the frequency of the first pulse signal (Pu1_sig) by the main microcomputer 1 changes when the operation cycle (Cyc1) of the sub-microcomputer 2 changes and when the operation cycle (Cyc2) of the main microcomputer 1 changes. It will change in any case.

そのため、STEP4で、第1のパルス信号(Pu1_sig)の周波数の算出値(Pu1_fc)が周波数範囲(下限周波数≦Pu1_fc≦上限周波数)内にあるか否かを判断することによって、メインマイコン1は、サブマイコン2の動作サイクル(Cyc1)の異常とメインマイコン1の動作サイクル(Cyc2)の異常とを検知することができる。   Therefore, in STEP 4, by determining whether the calculated value (Pu1_fc) of the frequency of the first pulse signal (Pu1_sig) is within the frequency range (lower limit frequency ≦ Pu1_fc ≦ upper limit frequency), the main microcomputer 1 An abnormality in the operation cycle (Cyc1) of the sub-microcomputer 2 and an abnormality in the operation cycle (Cyc2) of the main microcomputer 1 can be detected.

そして、STEP4で、第1のパルス信号(Pu1_sig)の周波数の算出値(Pu1_fc)が周波数範囲内にあり、サブマイコン2の動作サイクル(Cyc1)及びメインマイコン1の動作サイクル(Cyc2)が正常であると判断できるときはSTEP1に戻る。一方、STEP4で、第1のパルス信号(Pu1_sig)の周波数の算出値(Pul_fc)が正常周波数範囲から逸脱したときには、サブマイコン2の動作サイクル(Cyc1)とメインマイコン1の動作サイクル(Cyc2)とのうちの少なくともいずれか一方が異常であると判断できるため、STEP5に進む。   In STEP 4, the calculated value (Pu1_fc) of the frequency of the first pulse signal (Pu1_sig) is within the frequency range, and the operation cycle (Cyc1) of the sub microcomputer 2 and the operation cycle (Cyc2) of the main microcomputer 1 are normal. If it can be determined that there is, the process returns to STEP1. On the other hand, when the calculated value (Pul_fc) of the first pulse signal (Pu1_sig) deviates from the normal frequency range in STEP 4, the operation cycle (Cyc1) of the sub-microcomputer 2 and the operation cycle (Cyc2) of the main microcomputer 1 are Since at least one of them can be determined to be abnormal, the process proceeds to STEP5.

そして、STEP5で、第1のパルス信号(Pu1_sig)の周波数の算出値(Pul_fc)がゼロであったときは、サブマイコン2が暴走してプログラムの実行が停止していると判断できるため、STEP10に分岐して、メインマイコン1は、出力端子(OUTm2)からロジック高レベルのサブマイコンリセット信号(RSm_sig)を出力する。   Then, in STEP5, when the calculated value (Pul_fc) of the frequency of the first pulse signal (Pu1_sig) is zero, it can be determined that the sub-microcomputer 2 runs out of control and execution of the program is stopped. The main microcomputer 1 outputs a sub-microcomputer reset signal (RSm_sig) having a logic high level from the output terminal (OUTm2).

これにより、サブマイコンリセット信号(RSm_sig)が反転ゲート8を介してANDゲート7に入力され、ANDゲート7からサブマイコン2のリセット端子(RSTs)にロジック低レベルの信号が出力されて、サブマイコン2がリセットされる。リセットによりサブマイコン2の暴走が停止し、サブマイコン2は初期状態から作動を再開する。   As a result, the sub-microcomputer reset signal (RSm_sig) is input to the AND gate 7 via the inverting gate 8, and a logic low level signal is output from the AND gate 7 to the reset terminal (RSTs) of the sub-microcomputer 2. 2 is reset. The runaway of the sub-microcomputer 2 is stopped by the reset, and the sub-microcomputer 2 resumes operation from the initial state.

一方、STEP5で、第1のパルス信号(Pu1_sig)の周波数の算出値(Pul_fc)がゼロでなかったときには、STEP6に進んで、メインマイコン1は第2のパルス信号(Pu2_sig)の出力を停止する。これにより、ウォッチドッグタイマ回路3のタイマがタイムアップし、ウォッチドッグタイマ回路3のリセット出力端子(RSTw)からロジック低レベルの信号が出力される。   On the other hand, when the calculated value (Pul_fc) of the frequency of the first pulse signal (Pu1_sig) is not zero in STEP5, the process proceeds to STEP6 and the main microcomputer 1 stops the output of the second pulse signal (Pu2_sig). . As a result, the timer of the watchdog timer circuit 3 times out, and a logic low level signal is output from the reset output terminal (RSTw) of the watchdog timer circuit 3.

そして、ウォッチドッグタイマ回路3のリセット出力端子(RSTw)から出力されたロジック低レベルの信号は、メインマイコン1のリセット端子(RSTm)に入力されてメインマイコン1がリセットされる。また、ウォッチドッグタイマ回路3のリセット出力端子(RSTw)から出力されたロジック低レベルの信号は、ANDゲート7に入力されてANDゲート7からロジック低レベルの信号がサブマイコン2のリセット端子(RSTs)に出力され、サブマイコン2がリセットされる。   The logic low level signal output from the reset output terminal (RSTw) of the watchdog timer circuit 3 is input to the reset terminal (RSTm) of the main microcomputer 1 and the main microcomputer 1 is reset. The logic low level signal output from the reset output terminal (RSTw) of the watchdog timer circuit 3 is input to the AND gate 7, and the logic low level signal is output from the AND gate 7 to the reset terminal (RSTs) of the sub microcomputer 2. ) And the sub-microcomputer 2 is reset.

なお、STEP6でメインマイコン1が第2のパルス信号(Pu2_sig)の出力を停止して、ウォッチドッグタイマ回路3からの出力によりメインマイコン1とサブマイコン2をリセットする構成が、本発明のリセット手段に相当する。   The configuration in which the main microcomputer 1 stops the output of the second pulse signal (Pu2_sig) in STEP 6 and the main microcomputer 1 and the sub-microcomputer 2 are reset by the output from the watchdog timer circuit 3 is the reset means of the present invention. It corresponds to.

このように、メインマイコン1の動作サイクル(Cyc2)の異常又はサブマイコン2の動作サイクル(Cyc1)の異常が生じると、ウォッチドッグタイマ回路3の作動によりメインマイコン1及びサブマイコン2がリセットされ、メインマイコン1及びサブマイコン2は作動を停止して初期状態に復帰する。   As described above, when the operation cycle (Cyc2) of the main microcomputer 1 or the operation cycle (Cyc1) of the sub-microcomputer 2 occurs, the main microcomputer 1 and the sub-microcomputer 2 are reset by the operation of the watchdog timer circuit 3. The main microcomputer 1 and the sub microcomputer 2 stop operating and return to the initial state.

これにより、動作サイクルの異常により、メインマイコン1又はサブマイコン2による計時処理が不良となり、ガスバーナの燃焼時間の制御や監視が正常に行なわれない状態が継続されることを防止することができる。   As a result, it is possible to prevent the state in which the time measurement processing by the main microcomputer 1 or the sub-microcomputer 2 becomes defective due to an abnormality in the operation cycle and the control or monitoring of the combustion time of the gas burner is not normally performed.

なお、本実施の形態では、本発明のリセット手段をウォッチドッグタイマ回路3を転用して構成したが、該リセット手段をウォッチドッグタイマ回路3とは別個に設けてもよい。   In the present embodiment, the reset means of the present invention is configured by diverting the watchdog timer circuit 3, but the reset means may be provided separately from the watchdog timer circuit 3.

また、本実施の形態では、ガス器具のコントローラを構成する計時装置に本発明を適用した例を示したが、2個のマイクロコンピュータを有して、各マイクロコンピュータにより計時処理を行う計時装置であれば、本発明の適用が可能である。   In the present embodiment, an example in which the present invention is applied to a timing device that constitutes a controller of a gas appliance has been described. However, the timing device has two microcomputers, and each microcomputer performs timing processing. If so, the present invention can be applied.

また、図2のSTEP4で、第1のパルス信号(Pu1_sig)の周波数の算出値(Pu1_fc)が周波数範囲から逸脱したときに、STEP5を省略して直ちにSTEP6を実行し、メインマイコン1とサブマイコン2をリセットするようにしてもよい。   Further, in STEP4 of FIG. 2, when the calculated value (Pu1_fc) of the frequency of the first pulse signal (Pu1_sig) deviates from the frequency range, STEP5 is omitted and STEP6 is immediately executed, and the main microcomputer 1 and the sub microcomputer 2 may be reset.

また、図2のSTEP4で、第1のパルス信号(Pu1_sig)の周波数の算出値(Pu1_fc)が周波数範囲から逸脱したときに、STEP5を省略してSTEP10を実行し、これにより先にサブマイコン2をリセットしてから次にSTEP6を実行してメインマイコン1とサブマイコン2をリセットするようにしてもよい。   Further, in STEP4 of FIG. 2, when the calculated value (Pu1_fc) of the frequency of the first pulse signal (Pu1_sig) deviates from the frequency range, STEP5 is omitted, and STEP10 is executed first. After resetting, the main microcomputer 1 and the sub-microcomputer 2 may be reset by executing STEP 6 next.

計時装置の回路構成図。The circuit block diagram of a time measuring device. 図1に示したマイクロコンピュータの作動フローチャート。2 is an operation flowchart of the microcomputer shown in FIG. 1.

符号の説明Explanation of symbols

1…メインマイコン、2…サブマイコン、3…ウォッチドッグタイマ回路、4,5…発振回路、6…安全回路
DESCRIPTION OF SYMBOLS 1 ... Main microcomputer, 2 ... Sub microcomputer, 3 ... Watchdog timer circuit, 4, 5 ... Oscillation circuit, 6 ... Safety circuit

Claims (2)

第1の発振回路から出力されるクロック信号に基づく第1の動作サイクルで作動する第1のマイクロコンピュータと、第2の発振回路から出力されるクロック信号に基づく第2の動作サイクルで作動する第2のマイクロコンピュータとを並行して稼動させ、該第1のマイクロコンピュータ及び該第2のマイクロコンピュータにより所定の計時処理を行う計時装置において、
前記第1のマイクロコンピュータは、前記第1の動作サイクルを基準とした計時処理により所定周波数の第1のパルス信号を出力する手段を有し、
前記第2のマイクロコンピュータは、前記第1のパルス信号を入力して、前記第2の動作サイクルを基準とした計時処理により前記第1のパルス信号の周波数を算出する周波数算出手段を有して、
前記周波数算出手段により算出された前記第1のパルス信号の周波数が、前記第1の動作サイクル及び前記第2の動作サイクルが正常であると判断し得る周波数範囲から逸脱したときに、前記第1のマイクロコンピュータ及び前記第2のマイクロコンピュータをリセットするリセット手段を備えたことを特徴とする計時装置。
A first microcomputer that operates in a first operation cycle based on a clock signal output from the first oscillation circuit, and a second microcomputer that operates in a second operation cycle based on a clock signal output from the second oscillation circuit. In a timing device that operates two microcomputers in parallel and performs a predetermined timing process by the first microcomputer and the second microcomputer,
The first microcomputer has means for outputting a first pulse signal having a predetermined frequency by a time measurement process based on the first operation cycle,
The second microcomputer has frequency calculation means for inputting the first pulse signal and calculating a frequency of the first pulse signal by a timing process based on the second operation cycle. ,
When the frequency of the first pulse signal calculated by the frequency calculation means deviates from a frequency range in which it can be determined that the first operation cycle and the second operation cycle are normal, the first pulse signal A time measuring device comprising reset means for resetting the microcomputer and the second microcomputer.
前記第2のマイクロコンピュータは、正常動作時に第2のパルス信号を間欠的に出力し、
該第2のパルス信号の出力が停止したときに、前記第1のマイクロコンピュータのリセット端子及び前記第2のマイクロコンピュータのリセット端子にリセット信号を出力するウォッチドックタイマ回路を備え、
前記リセット手段は、前記第2のマイクロコンピュータからの前記第2のパルス信号の出力を停止して、前記ウォッチドッグタイマ回路から前記第1のマイクロコンピュータ及び前記第2のマイクロコンピュータのリセット端子にリセット信号を出力することによって、前記第1のマイクロコンピュータ及び前記第2のマイクロコンピュータをリセットすることを特徴とする請求項1記載の計時装置。
The second microcomputer intermittently outputs a second pulse signal during normal operation,
A watchdog timer circuit for outputting a reset signal to the reset terminal of the first microcomputer and the reset terminal of the second microcomputer when the output of the second pulse signal is stopped;
The reset means stops the output of the second pulse signal from the second microcomputer and resets the watchdog timer circuit to the reset terminals of the first microcomputer and the second microcomputer. 2. The time measuring apparatus according to claim 1, wherein the first microcomputer and the second microcomputer are reset by outputting a signal.
JP2003284243A 2003-07-31 2003-07-31 Timing device Expired - Lifetime JP4248963B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003284243A JP4248963B2 (en) 2003-07-31 2003-07-31 Timing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003284243A JP4248963B2 (en) 2003-07-31 2003-07-31 Timing device

Publications (2)

Publication Number Publication Date
JP2005049312A JP2005049312A (en) 2005-02-24
JP4248963B2 true JP4248963B2 (en) 2009-04-02

Family

ID=34268907

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003284243A Expired - Lifetime JP4248963B2 (en) 2003-07-31 2003-07-31 Timing device

Country Status (1)

Country Link
JP (1) JP4248963B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5702941B2 (en) * 2010-03-30 2015-04-15 アズビル株式会社 Control device
JP2014102662A (en) * 2012-11-19 2014-06-05 Nikki Co Ltd Microcomputer run-away monitoring device

Also Published As

Publication number Publication date
JP2005049312A (en) 2005-02-24

Similar Documents

Publication Publication Date Title
JP5739290B2 (en) Electronic control unit
JP2004070913A (en) Fault detection method, fault detection apparatus, and temperature controller
US9520830B2 (en) Crystal oscillator
TWI801526B (en) Fail-safe clock monitor with fault injection
US8311169B2 (en) Automatic frequency monitoring circuit, electronic device, automatic frequency monitoring method, and automatic frequency monitoring program
JP4248963B2 (en) Timing device
JP2007026028A (en) Device for detecting abnormality in microcomputer
JP2014102662A (en) Microcomputer run-away monitoring device
JP5347631B2 (en) Microcomputer
JP4194748B2 (en) Arithmetic control unit
JP7063692B2 (en) Watchdog timer monitoring system
KR100586521B1 (en) Display apparatus and control method thereof
JP2008261663A (en) Electronic watthour meter
JP2015158790A (en) alarm
JP5627375B2 (en) Water heater system
JP2004070932A (en) Fault detection method, device and thermoregulator
JP2011060159A (en) Microcomputer
JP2013201619A (en) Clock failure detection device, and clock failure detection method
JP2002333997A (en) System clock check method for microcomputer
JPH01245322A (en) Power failure control circuit for microprocessor
JP3032634B2 (en) Switching device of bridge excitation voltage supply system in strain gauge
JP2010003199A (en) Semiconductor integrated circuit device
JPS63163290A (en) Ic inspecting device
JP2003140783A (en) Semiconductor device
JPH09231105A (en) Method for detecting program fault

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20050805

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20080901

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20090113

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20090114

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120123

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

Ref document number: 4248963

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120123

Year of fee payment: 3

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130123

Year of fee payment: 4

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20140123

Year of fee payment: 5

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

EXPY Cancellation because of completion of term