JPH03204786A - Single chip microcomputer - Google Patents

Single chip microcomputer

Info

Publication number
JPH03204786A
JPH03204786A JP2001840A JP184090A JPH03204786A JP H03204786 A JPH03204786 A JP H03204786A JP 2001840 A JP2001840 A JP 2001840A JP 184090 A JP184090 A JP 184090A JP H03204786 A JPH03204786 A JP H03204786A
Authority
JP
Japan
Prior art keywords
output
output control
level
input
input terminal
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
JP2001840A
Other languages
Japanese (ja)
Inventor
Shoji Matsubara
松原 昭司
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.)
NEC Corp
Original Assignee
NEC 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 NEC Corp filed Critical NEC Corp
Priority to JP2001840A priority Critical patent/JPH03204786A/en
Publication of JPH03204786A publication Critical patent/JPH03204786A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To suppress the operation which cannot be foreknown due to a runaway, etc., of a system to the minimum by executing the output control of an output state by an input signal from the outside irrespective of an internal operation by which the output control of the output port is executed by a CPU. CONSTITUTION:A second output control circuit 6 becomes effective at the time when an input level of an output control input terminal 7 provided on the outside of a microcomputer is a high level. Accordingly, when the output control input terminal 7 is a low level input, data of a data signal A is outputted from an output terminal, but in the case a CPU runs away, when the level of the output control input terminal 7 becomes a high level, an input level of an output data input terminal 8 inputted from the outside is outputted irrespective of the data signal A from an internal circuit and the level of an internal output control signal 5. In such a way, when a program becomes a runaway state, its output can be controlled from the outside.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明はシングルチップ・マイクロコンピュータに関す
る。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a single-chip microcomputer.

〔従来の技術〕[Conventional technology]

従来この種のシングルチップ・マイクロコンピュータで
は出力ボートの出力制御を内部のCPUからの各種制御
信号によって制御、出力されており、例えば出力ボート
にハイレベルの出力を行なう場合、出力ボートの出力ラ
ッチにハイレベルのデータをCPUが設定することによ
り出力が確定していた。
Conventionally, in this type of single-chip microcomputer, the output of the output boat is controlled and output using various control signals from the internal CPU.For example, when performing high-level output to the output boat, the output latch of the output boat is The output was determined by setting high-level data by the CPU.

〔発明が解決しようとする課題〕[Problem to be solved by the invention]

上述した従来のシングルチップ・マイクロコンピュータ
では、万が一プログラムが暴走状態となった場合、シン
グルチップ・マイクロコンピュータは異常動作状態にあ
るため、出力ラッチの書き変え等による異常出力制御を
行なう可能性があり、また、部分的なショートや断線な
ど、CPUの動作を防げる内部回路の致命的な欠陥が発
生した場合にも、ユーザ・プログラムに従った正常な出
力制御が行えない欠点がある。
In the conventional single-chip microcomputer described above, if the program goes out of control, the single-chip microcomputer is in an abnormal operating state, so there is a possibility that abnormal output control will be performed by rewriting the output latch, etc. Moreover, even if a fatal defect occurs in the internal circuit that can prevent the operation of the CPU, such as a partial short circuit or disconnection, normal output control according to the user program cannot be performed.

特にシングルチップ・マイクロコンピュータを用いた高
信頼性を要求する装置、例えばロボット制御、NC制御
、自動車電装装置では上述した様な障害発生により出力
ボートに予定された出力が得られないため予知できない
異常動作をしてしまう欠点がある。
In particular, in devices that require high reliability using single-chip microcomputers, such as robot control, NC control, and automobile electrical equipment, the above-mentioned failures can cause unpredictable abnormalities because the output boat cannot obtain the expected output. There is a drawback that it moves.

本発明の目的は、プログラムが暴走状態となった時に、
その出力を外部から制御可能なシングルチップ・マイク
ロコンピュータを提供することにある。
The purpose of the present invention is to prevent the program from running out of control.
The object of the present invention is to provide a single-chip microcomputer whose output can be controlled externally.

〔課題を解決するための手段〕[Means to solve the problem]

本発明のシングルチップ・マイクロコンピュータは、出
力端子を有するシングルチップ・マイクロコンピュータ
において前記出力端子のレベルをCPUが出力制御を行
なう内部動作とは無関係に外部からの入力信号により出
力制御する手段を有することを特徴とする。
The single-chip microcomputer of the present invention is a single-chip microcomputer having an output terminal, and has means for controlling the level of the output terminal by an input signal from the outside, regardless of the internal operation of the CPU controlling the output. It is characterized by

〔実施例〕〔Example〕

次に本発明について図面を参照して説明する。 Next, the present invention will be explained with reference to the drawings.

第1図は、本発明の第1の実施例を示すブロック図であ
る。出力端子1に出力されるデータは、内部回路からの
データ信号Aにより出力制御回路3を介してCMO3出
力バッファ4のMOS)ランジスタのゲートに伝えられ
発生する。第1の出力制御回路3は内部回路からの内部
出力制御信号5により制御されており、通常動作時には
、この信号がロウレベルの時に出力が1ネーブル(ハイ
又はロウレベル出力)1となり、ロウレベルの時に出力
がディスエーブル(ハイ・インピーダンス出力)となる
FIG. 1 is a block diagram showing a first embodiment of the present invention. Data outputted to the output terminal 1 is generated by being transmitted to the gate of the MOS transistor of the CMO3 output buffer 4 via the output control circuit 3 in accordance with the data signal A from the internal circuit. The first output control circuit 3 is controlled by an internal output control signal 5 from an internal circuit, and during normal operation, when this signal is low level, the output becomes 1 enable (high or low level output) 1, and when it is low level, the output is is disabled (high impedance output).

一方、第2の出力制御回路6はマイクロ・コンピュータ
外部に設けられた出力制御入力端子7の入力レベルがハ
イ・レベルの時に有効となる回路で、この場合、マイク
ロ・コンピュータ外部に設けられた出力データ入力端子
8から入力されたレベルが、データ信号Bとなり、第2
の出力制御回路6を介してCMO3出力バッファ4に伝
えられ、出力が決定される6同時に、内部出力回路制御
信号10がハイレベルとなるため内部出力制御信号5が
制御され第1の出力制御回路3が無効となる。
On the other hand, the second output control circuit 6 is a circuit that becomes effective when the input level of the output control input terminal 7 provided outside the microcomputer is at a high level. The level input from the data input terminal 8 becomes the data signal B, and the second
It is transmitted to the CMO3 output buffer 4 via the output control circuit 6 of 6, and the output is determined.6 At the same time, the internal output circuit control signal 10 becomes high level, so the internal output control signal 5 is controlled and the output is determined by the first output control circuit. 3 is invalid.

従って、出力制御入力端子7がロウ・レベル入力の時は
、データ信号Aのデータが出力端子1より出力されるが
、CPUが暴走した場合に出力制御入力端子7のレベル
をハイ・レベルとすることにより、内部回路からのデー
タ信号Aおよび内部出力制御信号5のレベルにかかわら
ず、外部から入力した出力データ入力端子8の入力レベ
ルを出力することができる。
Therefore, when the output control input terminal 7 is a low level input, the data of the data signal A is output from the output terminal 1, but if the CPU goes out of control, the level of the output control input terminal 7 is set to a high level. As a result, the input level of the output data input terminal 8 input from the outside can be output regardless of the levels of the data signal A and the internal output control signal 5 from the internal circuit.

第2図は本発明の第2の実施例を示すブロック図である
。本実施例の基本構成は第1の実施例と同じであるがデ
ータ信号Bを供給する構成が出力制御入力端子7がハイ
・レベル入力時に、所定のパルスを1出力端子からCP
Uの動作とは無関係に出力するようになっているところ
に特徴がある。すなわち、nビット・ダウンカウンタ1
1は、外部クロック入力端子12から入力されたタロツ
クによりダウンカウントするタイマで、カウントが終了
するとU、F(マンダ・フォロー)信号13を出力する
。またこのカウンタのカウンタ初期値はmビット・レジ
スタ14(02m)にあらかじめ設定された値が外部ト
リガ入力端子15に印加されるトリガにより、nビット
・ダウンカウンタ11にロードされる様になっている。
FIG. 2 is a block diagram showing a second embodiment of the invention. The basic configuration of this embodiment is the same as that of the first embodiment, but the configuration for supplying the data signal B is such that when the output control input terminal 7 is input at a high level, a predetermined pulse is sent from one output terminal to the CP.
It is distinctive in that it is designed to be output regardless of the operation of U. That is, n-bit down counter 1
Reference numeral 1 denotes a timer that counts down based on the tarock input from an external clock input terminal 12, and outputs U and F (mander follow) signals 13 when the count ends. Further, the initial value of this counter is a value preset in the m-bit register 14 (02m) and is loaded into the n-bit down counter 11 by a trigger applied to the external trigger input terminal 15. .

このmビット・レジスタ14は、マスクにより、製造時
に固定設定されている。
This m-bit register 14 is fixedly set at the time of manufacture by a mask.

外部トリガ入力端子14に立上りエッチ入力が印加され
ると、F/F16 (S−R,フリップ・フロップ)が
セットされデータ信号Bにハイ・レベルが出力される。
When a rising etch input is applied to the external trigger input terminal 14, the F/F 16 (SR, flip-flop) is set and the data signal B is output at a high level.

ダウン・カウントが終了し、U、F13が発生すると、
F/F 16はリセットされデータ信号Bにロウ・レベ
ルが出力される。
When the down count ends and U and F13 occur,
The F/F 16 is reset and the data signal B is output at a low level.

したがって、CPUの動作とは無関係に、外部クロック
に同期した所定(mビット×クロック周期)のパルスを
出力端子1より出力することができる。
Therefore, a predetermined (m bits×clock period) pulse synchronized with the external clock can be output from the output terminal 1, regardless of the operation of the CPU.

〔発明の効果〕〔Effect of the invention〕

以上説明したように、本発明は、CPUが出力ボートの
出力制御を行なう内部動作とは無関係に出力ボートの出
力状態を外部からの入力信号により出力制御できること
により、シングルチップ・マイクロコンピュータを使用
した特に高信頼性を要求されるシステムでは、マイクロ
コンピュータが異常動作にもシステムが安全サイドに動
作するよう設計が可能となり、システムの暴走等による
予知できない動作を最小限におさえることができる効果
がある。
As explained above, the present invention uses a single-chip microcomputer by allowing the CPU to control the output state of the output board using external input signals, regardless of the internal operation that controls the output of the output board. Especially in systems that require high reliability, it is possible to design the system so that it operates on the safe side even if the microcomputer operates abnormally, which has the effect of minimizing unpredictable operations such as runaway system. .

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

第1区は本発明の第1の実施例を示すブロック図、第2
図は本発明の第2の実施例を示すブロック図である。 1・・・出力端子、3・・・第1の出力制御回路、4・
・・CMOS出力バッファ、5・・・内部出力制御信号
、6・・・第2の出力制御回路B、7・・・出力制御入
力端子、8・・・出力データ入力端子、10・・・内部
出力回路制御信号、11・・・nビット・ダウンカウン
タ、12・・・外部クロック入力端子、13・・・U、
F(アンダーフロー信号)、14・・・mビット・レジ
スタ、15・・・外部トリガ入力端子、16・・・F/
F (セット−リセット、フリップ・フロップ)。
The first section is a block diagram showing the first embodiment of the present invention, and the second section is a block diagram showing the first embodiment of the present invention.
The figure is a block diagram showing a second embodiment of the present invention. DESCRIPTION OF SYMBOLS 1... Output terminal, 3... First output control circuit, 4.
... CMOS output buffer, 5... Internal output control signal, 6... Second output control circuit B, 7... Output control input terminal, 8... Output data input terminal, 10... Internal Output circuit control signal, 11...n-bit down counter, 12...external clock input terminal, 13...U,
F (underflow signal), 14... m-bit register, 15... external trigger input terminal, 16... F/
F (set-reset, flip-flop).

Claims (1)

【特許請求の範囲】[Claims]  出力端子を有するシングルチップ・マイクロコンピュ
ータにおいて前記出力端子のレベルをCPUが出力制御
を行なう内部動作とは無関係に外部からの入力信号によ
り出力制御する手段を有することを特徴とするシングル
チップ・マイクロコンピュータ。
A single-chip microcomputer having an output terminal, characterized in that the single-chip microcomputer has means for output-controlling the level of the output terminal by an input signal from the outside, regardless of the internal operation in which the CPU performs output control. .
JP2001840A 1990-01-08 1990-01-08 Single chip microcomputer Pending JPH03204786A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2001840A JPH03204786A (en) 1990-01-08 1990-01-08 Single chip microcomputer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2001840A JPH03204786A (en) 1990-01-08 1990-01-08 Single chip microcomputer

Publications (1)

Publication Number Publication Date
JPH03204786A true JPH03204786A (en) 1991-09-06

Family

ID=11512750

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2001840A Pending JPH03204786A (en) 1990-01-08 1990-01-08 Single chip microcomputer

Country Status (1)

Country Link
JP (1) JPH03204786A (en)

Similar Documents

Publication Publication Date Title
US5440603A (en) Watch-dog timer circuit and a microcomputer equipped therewith
US5530597A (en) Apparatus and method for disabling interrupt masks in processors or the like
US7149915B2 (en) Microcomputer using a shared counter
JP2593915B2 (en) Double microcomputer system runaway prevention circuit
JPH03204786A (en) Single chip microcomputer
JP2002325459A (en) Pulse width modulation signal generator
JPH1185304A (en) Clock input control circuit
JPH01246602A (en) Special function unit for programmable controller
JP2734243B2 (en) Watchdog timer
JP2922309B2 (en) Process signal output method and output circuit
JPH06150029A (en) Reset controller
JPH0395636A (en) Diagnostic system for fail-safe circuit
KR100442290B1 (en) A circuit for controlling program counter
KR100272531B1 (en) Method for prohibitting exhaust of power source in electronic equipment
JP4083954B2 (en) Anomaly monitoring apparatus and anomaly monitoring method
JP2024044801A (en) Microcontrollers and Electronic Circuits
JP2001203324A (en) Integrated circuit and method for controlling its operation
JPS6362776B2 (en)
JP2002123301A (en) Controller
JPH0251748A (en) Microcomputer
JPH06250864A (en) Method for preventing generation of error output from programmable controller
KR20020069689A (en) Watchdog timer of program capable of controlling like software
JPS61131044A (en) External signal controlling system
JPH0683989A (en) Single chip microcomputer
JPS62279430A (en) Information processor