JP2001209560A - Single-chip microcomputer - Google Patents

Single-chip microcomputer

Info

Publication number
JP2001209560A
JP2001209560A JP2000019113A JP2000019113A JP2001209560A JP 2001209560 A JP2001209560 A JP 2001209560A JP 2000019113 A JP2000019113 A JP 2000019113A JP 2000019113 A JP2000019113 A JP 2000019113A JP 2001209560 A JP2001209560 A JP 2001209560A
Authority
JP
Japan
Prior art keywords
signal
chip microcomputer
cpu
watchdog timer
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.)
Withdrawn
Application number
JP2000019113A
Other languages
Japanese (ja)
Inventor
Masayuki Kamiyama
正之 神山
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.)
Seiko Epson Corp
Original Assignee
Seiko Epson 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 Seiko Epson Corp filed Critical Seiko Epson Corp
Priority to JP2000019113A priority Critical patent/JP2001209560A/en
Publication of JP2001209560A publication Critical patent/JP2001209560A/en
Withdrawn legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To select the overflow signal of the watchdog timer as the system reset signal or interrupt signal of CPU(central processing unit), to give flexibility, and to reduce peripheral devices when a single-chip microcomputer is applied. SOLUTION: This invention is provided with the switch to select the supply point of the overflow signal which the watchdog timer 2 outputs. When users use the overflow signal of the watchdog timer 2 as the system reset signal SR of CPU 6, the change-over contact of switch 3 is fixed to the terminal on the side (a) when manufactured the single-chip microcomputer 1. Concurrently, the change-over contact of switch 5 is fixed to the terminal on the side (b).

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、ウォッチドッグタ
イマやCPU(中央処理装置)などを備えたシングルチ
ップマイクロコンピュータの改良に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an improvement of a single-chip microcomputer having a watchdog timer, a CPU (Central Processing Unit), and the like.

【0002】[0002]

【従来の技術】従来、この種のシングルチップマイクロ
コンピュータとしては、次のようなものが知られてい
る。
2. Description of the Related Art Conventionally, the following is known as this kind of single-chip microcomputer.

【0003】(1)CPUの暴走により、ウォッチドッ
グタイマが一定時間以上経過してもプリセットされない
ために、オーバフロー信号を出力した場合に、その信号
に基づいてシングルチップマイクロコンピュータ内の回
路によりハード的にシステムリセットがかかり、例えば
CPUまたはシングルチップマイクロコンピュータ全体
がリセットされるもの。
(1) Since the watchdog timer is not preset even after a certain period of time has elapsed due to runaway of the CPU, when an overflow signal is output, a circuit in a single-chip microcomputer is used based on the signal to generate hardware. System reset, for example, the CPU or the entire single-chip microcomputer is reset.

【0004】(2)ウォッチドッグタイマがオーバフロ
ー信号を出力した場合に、その信号に基づいてシングル
チップマイクロコンピュータ内の回路によりハード的に
ノンマスカブル割り込みがCPUにかかり、CPUがシ
ステムに異常があったことを外部に知らせるとともに、
異常時の処理をソフトウエアで行うもの。
(2) When the watchdog timer outputs an overflow signal, a non-maskable interrupt is hardly interrupted to the CPU by a circuit in the single-chip microcomputer based on the overflow signal, and the CPU has an abnormality in the system. To the outside,
The processing at the time of abnormality is performed by software.

【0005】[0005]

【発明が解決しようとする課題】ところで、シングルチ
ップマイクロコンピュータが使用されるアプリケーショ
ンには、次の2通りが考えられる。
By the way, the following two applications are conceivable for applications in which a single-chip microcomputer is used.

【0006】(A)CPUの暴走時に、シングルチップ
マイクロコンピュータだけでなく、その周辺デバイスに
対しても初期化などの何らかの処理が必要となる場合。
(A) A case where some processing such as initialization is required not only for a single-chip microcomputer but also for peripheral devices at the time of CPU runaway.

【0007】(B)CPUの暴走時に、シングルチップ
マイクロコンピュータだけを初期化すれば良い場合。
(B) When only a single-chip microcomputer needs to be initialized when the CPU goes out of control.

【0008】このため、上記の(1)のものにより
(A)のような処理をさせたい場合には、初期化までの
柔軟な処理、例えば周辺デバイスをリセットした後に、
シングルチップマイクロコンピュータにリセットをかけ
るなどが実現できなかった。
For this reason, when it is desired to perform the process (A) by the above (1), a flexible process up to initialization, for example, after resetting a peripheral device,
Reset of the single-chip microcomputer could not be realized.

【0009】一方、上記の(2)のものにより(B)の
ような処理をさせたい場合には、出力ポートからシステ
ムリセット信号を外部に出力し、これにより周辺デバイ
スを介して、シングルチップマイクロコンピュータのリ
セットを行う必要があるので、余分な回路(デバイス)
が必要となる。
On the other hand, when the processing of (B) is desired to be performed by the method of (2), a system reset signal is output from an output port to the outside, and thereby a single chip microcontroller is connected via a peripheral device. Extra circuitry (devices) because the computer needs to be reset
Is required.

【0010】ところで、上記の(2)のものでは、CP
Uのシステムクロックが停止した場合など、異常時の状
況によっては、ウォッチドッグタイマによるノンマスカ
ブル割り込みの発生後に、ソフトウエアによる処理が確
実に行われない場合がある。例えば、CPUがフリーズ
してしまい、シングルチップマイクロコンピュータ内の
出力端子の出力信号がクリアされなかったり、またはシ
ングルチップマイクロコンピュータに含まれる表示回路
(LDCドライバ)の出力データがクリアされなかった
り、といった事態が発生し、こうした場合にはシステム
上でシングルチップマイクロコンピュータの異常が判断
され難いことがあった。例えば、CPUの暴走または停
止していても、LCDパネル上の表示がそのまま残って
しまう等である。
By the way, in the above (2), the CP
Depending on the situation at the time of abnormality, such as when the system clock of U is stopped, the processing by software may not be performed reliably after the occurrence of the non-maskable interrupt by the watchdog timer. For example, the CPU freezes and the output signal of the output terminal in the single-chip microcomputer is not cleared, or the output data of the display circuit (LDC driver) included in the single-chip microcomputer is not cleared. A situation occurred, and in such a case, it was sometimes difficult for the system to determine the abnormality of the single-chip microcomputer. For example, the display on the LCD panel may remain as it is even if the CPU runs away or stops.

【0011】そこで、本発明の第1の目的は、上記の点
に鑑み、ウォッチドッグタイマのオーバフロー信号をC
PUのシステムリセット信号または割り込み信号として
ユーザが選択できるようにし、シングルチップマイクロ
コンピュータをアプリケーションに合わせて応用する際
の柔軟性を持たせるとともに、その応用によっては余剰
な周辺デバイスの削減が可能となるシングルチップマイ
クロコンピュータを提供することにある。
In view of the above, a first object of the present invention is to provide an overflow signal of a watchdog timer with a C signal.
Allows the user to select as a PU system reset signal or interrupt signal, giving flexibility when applying a single-chip microcomputer to an application, and, depending on the application, reducing unnecessary peripheral devices. An object of the present invention is to provide a single-chip microcomputer.

【0012】また、本発明の第2の目的は、上記の点に
鑑み、ウォッチドッグタイマのオーバフロー信号が発生
し、ソフトウエアによる異常処理ができないような場合
でも、シングルチップマイクロコンピュータ内の周辺回
路に対して、異常時に必要な処理を確実に実現できるシ
ングルチップマイクロコンピュータを提供することにあ
る。
In view of the above, a second object of the present invention is to provide a peripheral circuit in a single-chip microcomputer even when an overflow signal of a watchdog timer is generated and abnormal processing cannot be performed by software. SUMMARY OF THE INVENTION It is an object of the present invention to provide a single-chip microcomputer capable of reliably performing necessary processing when an abnormality occurs.

【0013】[0013]

【課題を解決するための手段】上記課題を解決し、本発
明の第1の目的を達成するために、請求項1〜請求項3
に記載の各発明は以下のように構成した。
In order to solve the above problems and to achieve the first object of the present invention, claims 1 to 3 are provided.
Each invention described in (1) was configured as follows.

【0014】請求項1に記載の発明は、ウォッチドッグ
タイマとCPUとを少なくとも備えたシングルチップマ
イクロコンピュータにおいて、前記ウォッチドッグタイ
マのオーバフロー信号を、前記CPUのシステムリセッ
ト信号または割り込み信号として選択する選択手段を備
えていることを特徴とするものである。
According to a first aspect of the present invention, in a single-chip microcomputer having at least a watchdog timer and a CPU, a selection of selecting an overflow signal of the watchdog timer as a system reset signal or an interrupt signal of the CPU. Means are provided.

【0015】請求項2に記載の発明は、ウォッチドッグ
タイマとCPUとを少なくとも備えたシングルチップマ
イクロコンピュータにおいて、前記ウォッチドッグタイ
マのオーバフロー信号の出力先を任意に選択する第1の
スイッチと、この第1のスイッチで選択される前記オー
バフロー信号と外部からのシステムリセット信号とを入
力し、その出力を前記CPUのシステムリセット信号と
するオアゲートと、前記第1のスイッチで選択される前
記オーバフロー信号と外部からのノンマスカブル割り込
み信号との選択を行い、その選択した信号を前記CPU
のノンマスカブル割り込み信号とする第2のスイッチ
と、を備えていることを特徴とするものである。
According to a second aspect of the present invention, in a single chip microcomputer having at least a watchdog timer and a CPU, a first switch for arbitrarily selecting an output destination of an overflow signal of the watchdog timer, An OR gate which receives the overflow signal selected by the first switch and a system reset signal from the outside and uses the output thereof as a system reset signal of the CPU; and an overflow signal selected by the first switch. A non-maskable interrupt signal from the outside is selected, and the selected signal is transmitted to the CPU.
And a second switch for a non-maskable interrupt signal.

【0016】請求項3に記載の発明は、請求項2に記載
のシングルチップマイクロコンピュータにおいて、前記
第1のスイッチ及び前記第2のスイッチの各接点は、そ
の選択後は固定されたままとなり、または電源の投入時
に選択してその選択のたびに固定されるようになってい
ることを特徴とするものである。
According to a third aspect of the present invention, in the single-chip microcomputer according to the second aspect, the respective contacts of the first switch and the second switch remain fixed after the selection. Alternatively, it is characterized in that it is selected when the power is turned on and is fixed each time the selection is made.

【0017】このような構成からなる請求項1から請求
項3に記載の各発明では、ウォッチドッグタイマのオー
バフロー信号を、CPUのシステムリセット信号または
割り込み信号(ノンマスカブル割り込み信号)として選
択できる。このため、ユーザのシングルチップマイクロ
コンピュータの応用に際して柔軟に対応できる上に、そ
の応用によっては余剰の周辺デバイスの削減を図ること
ができる。
In each of the first to third aspects of the present invention, the overflow signal of the watchdog timer can be selected as a system reset signal or an interrupt signal (non-maskable interrupt signal) of the CPU. Therefore, it is possible to flexibly cope with the application of the single-chip microcomputer by the user, and it is possible to reduce a surplus peripheral device depending on the application.

【0018】本発明の第2の目的を達成するために、請
求項4に記載の発明は以下のように構成した。
In order to achieve the second object of the present invention, the invention according to claim 4 is configured as follows.

【0019】請求項4に記載の発明は、ウォッチドッグ
タイマとCPUとを少なくとも備えたシングルチップマ
イクロコンピュータにおいて、前記ウォッチドッグタイ
マのオーバフロー信号を、割り込み信号として前記CP
Uに供給するとともに、リセット信号として前記シング
ルチップマイクロコンピュータ内の周辺回路に供給する
ようになっていることを特徴とするものである。
According to a fourth aspect of the present invention, in the single-chip microcomputer including at least a watchdog timer and a CPU, the overflow signal of the watchdog timer is used as an interrupt signal for the CP.
U and supplied to peripheral circuits in the single-chip microcomputer as a reset signal.

【0020】このような構成からなる請求項4に記載の
発明では、ウォッチドッグタイマのオーバフロー信号が
発生したときに、CPUに割り込み処理をかけるのみな
らず、シングルチップマイクロコンピュータ内の周辺回
路を初期化できる。このため、ウォッチドッグタイマの
オーバフロー信号が発生し、ソフトウエアによる異常処
理ができないような場合でも、シングルチップマイクロ
コンピュータ内の周辺回路に対しては、異常時に必要な
処理が確実に実現できる。
According to the fourth aspect of the present invention, when an overflow signal of the watchdog timer is generated, not only is the CPU interrupted, but also peripheral circuits in the single-chip microcomputer are initialized. Can be For this reason, even when an overflow signal of the watchdog timer is generated and abnormal processing cannot be performed by software, necessary processing can be reliably performed for peripheral circuits in the single-chip microcomputer in the event of an abnormality.

【0021】[0021]

【発明の実施の形態】以下、本発明の実施形態について
図面を参照して説明する。
Embodiments of the present invention will be described below with reference to the drawings.

【0022】まず、本発明のシングルチップマイクロコ
ンピュータの第1実施形態について、図1を参照して説
明する。
First, a first embodiment of a single-chip microcomputer according to the present invention will be described with reference to FIG.

【0023】この第1実施形態にかかるシングルチップ
マイクロコンピュータ1は、図1に示すように、ウォッ
チドッグタイマ2、第1のスイッチである切換えスイッ
チ3、オアゲート4、第2のスイッチである切換えスイ
ッチ5、CPU(中央処理装置)6などを備え、これら
は1個のチップに集積回路化されている。
As shown in FIG. 1, the single-chip microcomputer 1 according to the first embodiment has a watchdog timer 2, a changeover switch 3 as a first switch, an OR gate 4, and a changeover switch as a second switch. 5, a CPU (Central Processing Unit) 6, etc., which are integrated into one chip.

【0024】ウォッチドッグタイマ2は、CPU6から
の指示に基づいて動作し、一定時間以上経過してもプリ
セットされないときには、CPU6等に異常が発生した
ものとしてオーバフロー信号を出力するようになってい
る。切換えスイッチ3は、切換え接点の切換により、ウ
ォッチドッグタイマ2が出力するオーバフロー信号の供
給先を任意に選択するスイッチである。
The watchdog timer 2 operates based on an instruction from the CPU 6, and outputs an overflow signal assuming that an abnormality has occurred in the CPU 6 or the like when the preset is not performed even after a predetermined time has elapsed. The changeover switch 3 is a switch that arbitrarily selects a supply destination of the overflow signal output from the watchdog timer 2 by switching a changeover contact.

【0025】オアゲート4は、一方の入力端子に外部か
らのシステムリセット信号SRが入力されるとともに、
その入力端子は抵抗R1を介して接地されている。ま
た、オアゲート4の他方の入力端子は、スイッチ7およ
び抵抗R2を介して接地されるとともに、ウォッチドッ
グタイマ2からのオーバフロー信号を切換えスイッチ3
を介して入力するようになっている。さらに、オアゲー
ト4の出力は、CPU6に対してシステムリセット信号
として供給するようになっている。
The OR gate 4 receives an external system reset signal SR at one input terminal,
Its input terminal is grounded via a resistor R1. The other input terminal of the OR gate 4 is grounded via the switch 7 and the resistor R2, and switches the overflow signal from the watchdog timer 2 to the switch 3.
Is to be entered via Further, the output of the OR gate 4 is supplied to the CPU 6 as a system reset signal.

【0026】切換えスイッチ5は、切換え接点の切換に
より、外部からのノンマスカブル割り込み信号NMI
と、ウォッチドッグタイマ2から出力されるオーバフロ
ー信号を選択するスイッチであり、その選択された信号
がCPU6にノンマスカブル割り込み信号NMIとして
入力されるようになっている。このため、切換えスイッ
チ5は、そのa側の端子が切換えスイッチ3のb側の端
子に接続され、そのb側の端子が抵抗R3を介して接地
されるとともに、外部からのノンマスカブル割り込み信
号NMIが入力されるようになっている。
The changeover switch 5 is provided with a non-maskable interrupt signal NMI from the outside by switching the changeover contact.
And a switch for selecting an overflow signal output from the watchdog timer 2, and the selected signal is input to the CPU 6 as a non-maskable interrupt signal NMI. For this reason, the changeover switch 5 has its a-side terminal connected to the b-side terminal of the changeover switch 3, its b-side terminal grounded via the resistor R3, and the non-maskable interrupt signal NMI from the outside. Is to be entered.

【0027】CPU6は、システムリセット信号SRと
ノンマスカブル割り込み信号NMIを入力するようにな
っており、システムリセット信号SRが入力されるとC
PU6等がリセットされ、ノンマスカブル割り込み信号
NMIが入力されると所定の処理を行うようになってい
る。
The CPU 6 receives a system reset signal SR and a non-maskable interrupt signal NMI.
When the PU 6 and the like are reset and the non-maskable interrupt signal NMI is input, predetermined processing is performed.

【0028】次に、このような構成からなる第1実施形
態のシングルチップマイクロコンピュータの使用法など
について、図1および図2を参照して説明する。
Next, a method of using the single-chip microcomputer having the above-described structure according to the first embodiment will be described with reference to FIGS.

【0029】まず、ユーザが、ウォッチドッグタイマ2
のオーバフロー信号をCPU6のシステムリセット信号
SRとして使用する場合には、シングルチップマイクロ
コンピュータの製造時に既存の工程上で、図1に示すよ
うに、切換えスイッチ3の切換え接点をa側の端子に固
定させるとともに、切換えスイッチ5の切換え接点をb
側の端子に固定させておく。なお、R2はオアゲート4
の入力端子のゲートフローティングを防止するプルダウ
ン抵抗であり、スイッチ7を図1のように設けて、この
場合はそれをオープンにさせるようにしても良い。
First, the user sets the watch dog timer 2
Is used as the system reset signal SR of the CPU 6 when the single chip microcomputer is manufactured, the switching contact of the changeover switch 3 is fixed to the terminal on the a side as shown in FIG. And changeover contact of the changeover switch 5 to b
To the terminal on the side. R2 is OR gate 4
The switch 7 may be provided as shown in FIG. 1, and in this case, it may be opened.

【0030】このように切換えスイッチ3、5、7の切
換え接点が設定(固定)されたシングルチップマイクロ
コンピュータを使用する場合には、ウォッチドッグタイ
マ2からオーバフロー信号が出力されると、そのオーバ
フロー信号は切換えスイッチ3およびオアゲート4を介
してCPU6にシステムリセット信号SRとして供給さ
れる。このため、そのオーバフロー信号により、CPU
6またはシングルチップマイクロコンピュータ1全体に
ハード的にリセットがかかる。また、外部からのノンマ
スカブル割り込み信号NMIが切換えスイッチ5を介し
てCPU6に供給されると、CPU6はこれに応じた処
理を行う。
In the case of using a single-chip microcomputer in which the changeover contacts of the changeover switches 3, 5, and 7 are set (fixed), when an overflow signal is output from the watchdog timer 2, the overflow signal is output. Is supplied as a system reset signal SR to the CPU 6 via the changeover switch 3 and the OR gate 4. Therefore, the overflow signal causes the CPU
6 or the entire single-chip microcomputer 1 is reset by hardware. Further, when a non-maskable interrupt signal NMI from the outside is supplied to the CPU 6 via the changeover switch 5, the CPU 6 performs a process corresponding thereto.

【0031】これに対して、ユーザが、ウォッチドッグ
タイマ2のオーバフロー信号をCPU6のノンマスカブ
ル割り込み信号NMIとして使用する場合には、シング
ルチップマイクロコンピュータの製造時に既存の工程上
で、図2に示すように、切換えスイッチ3の切換え接点
をb側の端子に固定させるとともに、切換えスイッチ5
の切換え接点をa側の端子に固定させておく。さらに、
スイッチ7はクローズ側に固定させて、オアゲート4の
入力端子をプルダウン抵抗R2でグランドレベルに固定
する。
On the other hand, when the user uses the overflow signal of the watchdog timer 2 as the non-maskable interrupt signal NMI of the CPU 6, the process shown in FIG. Then, the changeover contact of the changeover switch 3 is fixed to the terminal on the side b, and the changeover switch 5
Is fixed to the terminal on the a side. further,
The switch 7 is fixed to the closed side, and the input terminal of the OR gate 4 is fixed to the ground level by the pull-down resistor R2.

【0032】このように切換えスイッチ3、5、7の切
換え接点が設定されたシングルチップマイクロコンピュ
ータを使用する場合には、ウォッチドッグタイマ2から
オーバフロー信号が出力されると、そのオーバフロー信
号は切換えスイッチ3、5を介してCPU6にノンマス
カブル割り込み信号NMIとして供給される。このた
め、CPU6は、オーバフロー信号が供給されると、こ
れに応じた異常処理を行う。また、外部からのシステム
リセット信号SRがオアゲート4を介してCPU6に供
給されると、CPU6またはシングルチップマイクロコ
ンピュータ1全体にハード的にリセットがかかる。
When using a single-chip microcomputer in which the changeover contacts of the changeover switches 3, 5, and 7 are set, when the overflow signal is output from the watchdog timer 2, the overflow signal is changed to the changeover switch. The non-maskable interrupt signal NMI is supplied to the CPU 6 via 3 and 5. Therefore, when the overflow signal is supplied, the CPU 6 performs an abnormality process according to the overflow signal. When an external system reset signal SR is supplied to the CPU 6 via the OR gate 4, the CPU 6 or the entire single-chip microcomputer 1 is reset by hardware.

【0033】以上説明したように、この第1実施形態に
かかるシングルチップマイクロコンピュータによれば、
ウォッチドッグタイマ2のオーバフロー信号を、CPU
6のシステムリセット信号SRまたはノンマスカブル割
り込み信号NMIとして任意に選択できるようにした。
このため、ユーザが、シングルチップマイクロコンピュ
ータの応用に際して柔軟に対応できる上に、その応用に
よっては余剰の周辺デバイスの削減を図ることができ
る。
As described above, according to the single-chip microcomputer according to the first embodiment,
The watchdog timer 2 overflow signal is sent to the CPU
6 can be arbitrarily selected as the system reset signal SR or the non-maskable interrupt signal NMI.
For this reason, the user can flexibly cope with the application of the single-chip microcomputer, and can reduce excess peripheral devices depending on the application.

【0034】なお、上記の例では、切換えスイッチ3、
5、7の切換え接点の位置を、ユーザの必要に応じて製
造時に設定(固定)するようにしたが、これに代えて、
書き込み可能な不揮発メモリ、例えばEPROMなどを
用いて、アプリケーションのアセンブル工程時に前記の
選択されたスイッチ設定を書き込むようにしたり、ある
いはユーザが電源の投入後に、その都度、ソフトウエア
によりその位置を設定して使用するようにしても良い。
In the above example, the changeover switch 3,
The positions of the switching contacts 5 and 7 are set (fixed) at the time of manufacture as required by the user.
By using a writable nonvolatile memory, for example, an EPROM or the like, the selected switch setting is written in the application assembling process, or the position is set by software each time the user turns on the power. May be used.

【0035】次に、本発明のシングルチップマイクロコ
ンピュータの第2実施形態について、図3を参照して説
明する。
Next, a second embodiment of the single-chip microcomputer of the present invention will be described with reference to FIG.

【0036】この第2実施形態にかかるシングルチップ
マイクロコンピュータ11は、図3に示すように、オア
ゲート12、ウォッチドッグタイマ13、割り込み制御
回路14、CPU(中央処理装置)15、オアゲート1
6などの他に、周辺回路(周辺デバイス)としての表示
回路17などを備え、これらは1個のチップに集積回路
化されている。
As shown in FIG. 3, the single-chip microcomputer 11 according to the second embodiment has an OR gate 12, a watchdog timer 13, an interrupt control circuit 14, a CPU (central processing unit) 15, and an OR gate 1.
6 and the like, a display circuit 17 as a peripheral circuit (peripheral device) and the like are provided, and these are integrated into one chip.

【0037】オアゲート12は、CPU15から出力さ
れるウォッチドッグタイマ・リセット信号WDRSTお
よびスリープ信号SLEEPがそれぞれ入力され、この
入力に基づいてウォッチドッグタイマ・リセット信号W
DRSTがウォッチドッグタイマ13に出力されるよう
になっている。
The OR gate 12 receives the watchdog timer / reset signal WDRST and the sleep signal SLEEP output from the CPU 15, and receives the watchdog timer / reset signal W based on these inputs.
DRST is output to the watchdog timer 13.

【0038】ウォッチドッグタイマ13は、オアゲート
12からウォッチドッグタイマ・リセット信号WDRS
Tが出力されるたびにリセットされ、このリセット後に
クロックCLKの計数を開始し、一定時間内にリセット
がない場合にオーバフロー信号を出力し、このオーバフ
ロー信号が割り込み制御回路14にノンマスカブル割り
込み信号NMIとして供給されるようになっている。ま
た、このウォッチドッグタイマ13には、ウォッチドッ
グタイマ・イネーブル信号WDENが入力され、この信
号が「H」レベルの場合にウォッチドッグタイマ13が
動作するようになっている。
The watchdog timer 13 outputs a watchdog timer reset signal WDRS from the OR gate 12.
Each time T is output, the counter is reset. After the reset, counting of the clock CLK is started, and when there is no reset within a predetermined time, an overflow signal is output. It is being supplied. A watchdog timer enable signal WDEN is input to the watchdog timer 13, and the watchdog timer 13 operates when this signal is at “H” level.

【0039】割り込み制御回路14は、ウォッチッググ
タイマ13からのオーバフロー信号の他に割り込み信号
を受け付け、その優先順位に応じてCPU15とオアゲ
ート16に割り込み信号を出力するようになっている。
The interrupt control circuit 14 receives an interrupt signal in addition to the overflow signal from the watch timer 13 and outputs an interrupt signal to the CPU 15 and the OR gate 16 in accordance with the priority.

【0040】CPU15は、割り込み制御信号14から
のノンマスカブル割り込み信号NMIを受け取ると、こ
れに応じた異常処理を行うようになっている。オアゲー
ト16は、割り込み制御信号14からの割り込み信号ま
たはリセット信号RSTが入力すると、これによりシン
グルチップマイクロコンピュータ1に内蔵された周辺回
路の一部である表示回路17のデータレジスタ171−
1〜171−nをリセットするようになっている。
When the CPU 15 receives the non-maskable interrupt signal NMI from the interrupt control signal 14, the CPU 15 performs an abnormal process according to the signal. When the interrupt signal from the interrupt control signal 14 or the reset signal RST is input, the OR gate 16 receives the interrupt signal or the reset signal RST, thereby the data register 171-1 of the display circuit 17 which is a part of the peripheral circuit built in the single-chip microcomputer 1.
1 to 171-n are reset.

【0041】表示回路17は、図示しないLCDの表示
データを格納するデータレジスタ171−1〜171−
nと、このデータレジスタ171−1〜171−nの出
力側に接続されてLCDを駆動するLCDドライバ17
2−1〜172−nとから構成されている。
The display circuit 17 includes data registers 171-1 to 171- which store display data of an LCD (not shown).
n and an LCD driver 17 connected to the output side of the data registers 171-1 to 171-n to drive the LCD.
2-1 to 172-n.

【0042】次に、このような構成からなる第2実施形
態の動作について、図3を参照して説明する。
Next, the operation of the second embodiment having such a configuration will be described with reference to FIG.

【0043】いま、ウォッチドッグタイマ13がオーバ
フロー信号を出力すると、このオーバフロー信号は割り
込み制御回路14を経由し、CPU15にはノンマスカ
ブル割り込み信号NMIとして入力されるとともに、表
示回路17のデータレジスタ171−1〜171−nに
はオアゲート16を介してリセット信号として供給され
る。
Now, when the watchdog timer 13 outputs an overflow signal, the overflow signal passes through the interrupt control circuit 14 and is input to the CPU 15 as a non-maskable interrupt signal NMI and the data register 171-1 of the display circuit 17 171-n are supplied as a reset signal via the OR gate 16.

【0044】このため、CPU15はそのノンマスカブ
ル割り込み信号NMIに応じて所定の異常処理ができる
上に、表示回路17のデータレジスタ171−1〜17
1−nは、そのオーバフロー信号に基づいて強制的にリ
セットされる。
For this reason, the CPU 15 can perform a predetermined abnormal process in accordance with the non-maskable interrupt signal NMI, and can also execute the data register 171-1 to 17-17 of the display circuit 17.
1-n are forcibly reset based on the overflow signal.

【0045】従って、この第2実施形態によれば、その
ノンマスカブル割り込み信号NMIの発生後に、何らか
の原因でCPU15による異常処理がされなくて周辺回
路などの初期化ができないような場合でも、シングルチ
ップマイクロコンピュータ11内の周辺回路である表示
回路17については必要なリセットが確実にでき、この
結果、LCDの表示を消灯状態にすることができる。
Therefore, according to the second embodiment, even after the non-maskable interrupt signal NMI is generated, even if abnormal processing by the CPU 15 is not performed for some reason and initialization of peripheral circuits cannot be performed, the single-chip microcontroller can be used. Necessary resetting of the display circuit 17, which is a peripheral circuit in the computer 11, can be reliably performed, and as a result, the display on the LCD can be turned off.

【0046】なお、この第2実施形態では、シングルチ
ップマイクロコンピュータ11内の周辺回路として表示
回路17の場合について説明したが、その表示回路17
に代えて例えば周辺デバイスのブザー等を駆動する音源
回路やモータの駆動回路等とし、こうした周辺回路に含
まれるデータレジスタをリセットあるいはセットするよ
うにしても良い。
In the second embodiment, the case where the display circuit 17 is a peripheral circuit in the single-chip microcomputer 11 has been described.
Instead, for example, a sound source circuit for driving a buzzer or the like of a peripheral device, a driving circuit for a motor, or the like may be used, and a data register included in such a peripheral circuit may be reset or set.

【0047】[0047]

【発明の効果】以上述べたように、請求項1から請求項
3にかかる各発明では、ウォッチドッグタイマのオーバ
フロー信号を、CPUのシステムリセット信号または割
り込み信号として選択できるようにしたので、ユーザが
シングルチップマイクロコンピュータをアプリケーショ
ンに合わせて応用する際に柔軟に対応できる上に、その
応用によっては余剰の周辺デバイスの削減を図ることが
できる。
As described above, in each of the first to third aspects of the present invention, the overflow signal of the watchdog timer can be selected as a system reset signal or an interrupt signal of the CPU. In addition to being able to flexibly cope with the application of a single-chip microcomputer according to the application, it is possible to reduce excess peripheral devices depending on the application.

【0048】また、請求項4にかかる発明では、ウォッ
チドッグタイマのオーバフロー信号が発生したときに、
CPUに割り込み処理をかけるのみならず、シングルチ
ップマイクロコンピュータ内の周辺回路を初期化できる
ようにしたので、ウォッチドッグタイマのオーバフロー
信号が発生した後、何らかの原因でソフトウエアによる
異常処理ができないような場合でも、シングルチップマ
イクロコンピュータ内の周辺回路に対しては、異常時に
必要な処理が確実に実現できる。
In the invention according to claim 4, when an overflow signal of the watchdog timer is generated,
In addition to interrupt processing to the CPU, peripheral circuits in the single-chip microcomputer can be initialized, so that after a watchdog timer overflow signal occurs, abnormal processing by software cannot be performed for any reason. Even in such a case, the necessary processing can be reliably performed for the peripheral circuits in the single-chip microcomputer in the event of an abnormality.

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

【図1】本発明のシングルチップマイクロコンピュータ
の第1実施形態の構成を示し、ウォッチドッグタイマの
オーバフロー信号をシステムクロックとして使用する場
合のブロック図である。
FIG. 1 is a block diagram showing a configuration of a single-chip microcomputer according to a first embodiment of the present invention, in which an overflow signal of a watchdog timer is used as a system clock.

【図2】同第1実施形態の構成を示し、ウォッチドッグ
タイマのオーバフロー信号をノンマスカブル割り込み信
号として使用する場合のブロック図である。
FIG. 2 is a block diagram showing the configuration of the first embodiment, in which an overflow signal of a watchdog timer is used as a non-maskable interrupt signal.

【図3】本発明のシングルチップマイクロコンピュータ
の第2実施形態の構成を示すブロック図である。
FIG. 3 is a block diagram showing a configuration of a second embodiment of the single-chip microcomputer of the present invention.

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

1、11 シングルチップマイクロコンピュータ 2、13 ウォッチドッグタイマ 3 切換えスイッチ(第1のスイッチ) 4、オアゲート 5 切換えスイッチ(第2のスイッチ) 6、15 CPU 7 スイッチ 12、16 オアゲート 14 割り込み制御回路 17 表示回路(周辺回路) 171−1〜171−n データレジスタ 172−1〜172−n LCDドライバ R1〜R3 プルダウン抵抗 1, 11 Single-chip microcomputer 2, 13 Watchdog timer 3 Changeover switch (first switch) 4, OR gate 5 Changeover switch (secondary switch) 6, 15 CPU 7 Switch 12, 16 OR gate 14 Interrupt control circuit 17 Display Circuit (peripheral circuit) 171-1 to 171-n Data register 172-1 to 172-n LCD driver R1 to R3 Pulldown resistor

Claims (4)

【特許請求の範囲】[Claims] 【請求項1】 ウォッチドッグタイマとCPUとを少な
くとも備えたシングルチップマイクロコンピュータにお
いて、 前記ウォッチドッグタイマのオーバフロー信号を、前記
CPUのシステムリセット信号または割り込み信号とし
て選択する選択手段を備えていることを特徴とするシン
グルチップマイクロコンピュータ。
1. A single-chip microcomputer comprising at least a watchdog timer and a CPU, comprising: a selection means for selecting an overflow signal of the watchdog timer as a system reset signal or an interrupt signal of the CPU. Features a single-chip microcomputer.
【請求項2】 ウォッチドッグタイマとCPUとを少な
くとも備えたシングルチップマイクロコンピュータにお
いて、 前記ウォッチドッグタイマのオーバフロー信号の出力先
を任意に選択する第1のスイッチと、 この第1のスイッチで選択される前記オーバフロー信号
と外部からのシステムリセット信号とを入力し、その出
力を前記CPUのシステムリセット信号とするオアゲー
トと、 前記第1のスイッチで選択される前記オーバフロー信号
と外部からのノンマスカブル割り込み信号との選択を行
い、その選択した信号を前記CPUのノンマスカブル割
り込み信号とする第2のスイッチと、 を備えていることを特徴とするシングルチップマイクロ
コンピュータ。
2. A single-chip microcomputer having at least a watchdog timer and a CPU, a first switch for arbitrarily selecting an output destination of an overflow signal of the watchdog timer, and a first switch selected by the first switch. An OR gate for receiving the overflow signal and an external system reset signal and using the output as a system reset signal of the CPU; an overflow signal selected by the first switch and an external non-maskable interrupt signal; And a second switch for making the selected signal, and using the selected signal as a non-maskable interrupt signal for the CPU.
【請求項3】 前記第1のスイッチ及び前記第2のスイ
ッチの各接点は、その選択後は固定されたままとなり、
または電源の投入時に選択してその選択のたびに固定さ
れるようになっていることを特徴とする請求項2に記載
のシングルチップマイクロコンピュータ。
3. The contacts of the first switch and the second switch remain fixed after selection.
3. The single-chip microcomputer according to claim 2, wherein the single-chip microcomputer is selected at power-on and is fixed each time the selection is made.
【請求項4】 ウォッチドッグタイマとCPUとを少な
くとも備えたシングルチップマイクロコンピュータにお
いて、 前記ウォッチドッグタイマのオーバフロー信号を、割り
込み信号として前記CPUに供給するとともに、リセッ
ト信号として前記シングルチップマイクロコンピュータ
内の周辺回路に供給するようになっていることを特徴と
するシングルチップマイクロコンピュータ。
4. A single-chip microcomputer including at least a watchdog timer and a CPU, wherein an overflow signal of the watchdog timer is supplied to the CPU as an interrupt signal, and a reset signal in the single-chip microcomputer is provided. A single-chip microcomputer adapted to supply peripheral circuits.
JP2000019113A 2000-01-27 2000-01-27 Single-chip microcomputer Withdrawn JP2001209560A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2000019113A JP2001209560A (en) 2000-01-27 2000-01-27 Single-chip microcomputer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2000019113A JP2001209560A (en) 2000-01-27 2000-01-27 Single-chip microcomputer

Publications (1)

Publication Number Publication Date
JP2001209560A true JP2001209560A (en) 2001-08-03

Family

ID=18545874

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2000019113A Withdrawn JP2001209560A (en) 2000-01-27 2000-01-27 Single-chip microcomputer

Country Status (1)

Country Link
JP (1) JP2001209560A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010140361A (en) * 2008-12-12 2010-06-24 Fujitsu Microelectronics Ltd Computer system and abnormality detection circuit
JP2018073160A (en) * 2016-10-31 2018-05-10 新コスモス電機株式会社 Alarm

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010140361A (en) * 2008-12-12 2010-06-24 Fujitsu Microelectronics Ltd Computer system and abnormality detection circuit
US8700835B2 (en) 2008-12-12 2014-04-15 Fujitsu Semiconductor Limited Computer system and abnormality detection circuit
JP2018073160A (en) * 2016-10-31 2018-05-10 新コスモス電機株式会社 Alarm

Similar Documents

Publication Publication Date Title
JP3817743B2 (en) Semiconductor integrated circuit device, semiconductor device and electronic apparatus including the same
US6825689B1 (en) Configurable input/output interface for a microcontroller
KR920002754B1 (en) Microcomputer w/power saving function
EP0581480B1 (en) General I/O port interrupt apparatus
US6633940B1 (en) Method and apparatus for processing interrupts in a computing system
US20070288778A1 (en) Method for managing and controlling the low power modes for an integrated circuit device
JPH08314587A (en) Power saving power source circuit
US5579531A (en) System for selecting path among plurality of paths using plurality of multiplexers coupled to common bus to transfer data between peripheral devices and external device
US5606715A (en) Flexible reset configuration of a data processing system and method therefor
JP3291569B2 (en) Microcomputer
KR20040097279A (en) Temporary user suspension of automatic shutdown
US6574693B1 (en) Method and apparatus for gating interrupts in a computing system
JPH07281782A (en) Clock control circuit
JP2001209560A (en) Single-chip microcomputer
US6526514B1 (en) Method and apparatus for power management interrupt processing in a computing system
US20030126484A1 (en) Reduced power option
EP1372065B1 (en) System large scale integrated circuit (LSI), method of designing the same, and program therefor
US7058842B2 (en) Microcontroller with multiple function blocks and clock signal control
JP2004070961A (en) Method and system supporting a plurality of event types
KR20050044674A (en) Polarity independent power supply control methods and systems using the same
KR100272531B1 (en) Method for prohibitting exhaust of power source in electronic equipment
JPS62224119A (en) Data processor
JPH0756774A (en) Watching timer
JP2734243B2 (en) Watchdog timer
WO1998044408A1 (en) Microcomputer and electronic equipment

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20070403