JP5045692B2 - Operation mode control circuit and microcomputer - Google Patents

Operation mode control circuit and microcomputer Download PDF

Info

Publication number
JP5045692B2
JP5045692B2 JP2009026154A JP2009026154A JP5045692B2 JP 5045692 B2 JP5045692 B2 JP 5045692B2 JP 2009026154 A JP2009026154 A JP 2009026154A JP 2009026154 A JP2009026154 A JP 2009026154A JP 5045692 B2 JP5045692 B2 JP 5045692B2
Authority
JP
Japan
Prior art keywords
signal
circuit
output
operation mode
control
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2009026154A
Other languages
Japanese (ja)
Other versions
JP2009104653A (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.)
Fujitsu Semiconductor Ltd
Original Assignee
Fujitsu Semiconductor Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujitsu Semiconductor Ltd filed Critical Fujitsu Semiconductor Ltd
Priority to JP2009026154A priority Critical patent/JP5045692B2/en
Publication of JP2009104653A publication Critical patent/JP2009104653A/en
Application granted granted Critical
Publication of JP5045692B2 publication Critical patent/JP5045692B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Microcomputers (AREA)
  • Debugging And Monitoring (AREA)

Description

本発明は、制御プログラムにより処理を行うマイクロコンピュータであって、複数の動作モードを有する入出力回路を内蔵するマイクロコンピュータにおいて、前記入出力回路の動作モードを制御する動作モード制御回路、及び、前記動作モード制御回路を内蔵したマイクロコンピュータに関する。   The present invention is a microcomputer that performs processing according to a control program, and includes an operation mode control circuit that controls an operation mode of the input / output circuit in a microcomputer incorporating an input / output circuit having a plurality of operation modes, and The present invention relates to a microcomputer incorporating an operation mode control circuit.

マイクロコンピュータシステム等に対しては、劣悪な環境下でも、ウオッチドッグタイマよる監視機能が働き、動作が安定していることが要求されている。そして、前記システムを制御プログラムにより制御するマイクロコンピュータ(以下、通常のマイクロコンピュータ、マイクロコントロールシステム又は半導体制御装置、例えば、DSP(digital signal processor)等を総称してマイクロコンピュータという)であって、複数の動作モードを有する入出力回路を内蔵するマイクロコンピュータに対しては、制御プログラムにより、マイクロコンピュータの初期化時に設定された入出力回路の動作モードが安定していることが要求されている。なぜなら、マイクロコンピュータの入出力信号は、前記入出力信号に応じて動作する、マイクロコンピュータシステムの他のデバイスに与える影響が大きいからであり、その結果、マイクロコンピュータシステム全体動作も影響されるからである。   A microcomputer system or the like is required to have a monitoring function by a watchdog timer and to operate stably even in a poor environment. And a microcomputer for controlling the system by a control program (hereinafter, a general microcomputer, a micro control system, or a semiconductor control device, for example, a DSP (digital signal processor) or the like is collectively referred to as a microcomputer). For a microcomputer incorporating an input / output circuit having the above operation mode, it is required by the control program that the operation mode of the input / output circuit set when the microcomputer is initialized is stable. This is because the input / output signals of the microcomputer have a great influence on other devices of the microcomputer system that operate according to the input / output signals, and as a result, the entire operation of the microcomputer system is also affected. is there.

従って、前記のマイクロコンピュータに内蔵されることにより、前記入出力回路の動作モードを、一旦設定したならば、前記動作モードを安定するように制御する回路が求められていた。   Therefore, there has been a demand for a circuit that is built in the microcomputer so as to control the operation mode once the operation mode of the input / output circuit is set.

そこで、以下に、図16〜図18を用いて、マイクロコンピュータにおける入出力回路の動作制御、又は、ウオッチドッグタイマを利用する、マイクロコンピュータシステムの安定動作に係わる従来例を説明する。   A conventional example related to stable operation of a microcomputer system using an input / output circuit operation control in a microcomputer or a watchdog timer will be described below with reference to FIGS.

図16に示す車両用LANマイコンシステムは、マイコン602と、マイコンの動作を監視する外付けのLSIであるウオッチドッグタイマ605と、電源回路603と、ROM606と、入力I/F回路601と、VCCIION/OFF回路607と、VCCI613と、VCCII614と、低電圧リセット回路608と、通信LSI609と、遅延回路604と、多入力アンド回路615とから構成されている。   The vehicle LAN microcomputer system shown in FIG. 16 includes a microcomputer 602, a watchdog timer 605, which is an external LSI that monitors the operation of the microcomputer, a power supply circuit 603, a ROM 606, an input I / F circuit 601, and a VCCION. / OFF circuit 607, VCCI 613, VCCII 614, low voltage reset circuit 608, communication LSI 609, delay circuit 604, and multi-input AND circuit 615.

前記の車両用LANマイコンシステムでは、マイコン602の動作を監視するウオッチドッグタイマ(以下「ウオッチドッグ」という)605を前記システムに搭載し、マイコン602が何らかの原因で、暴走状態となったときに、マイコン602に搭載されている監視信号発生回路からの信号が途絶えることを検出して、マイコンをリセットする仕組みとし、誤動作を防止している(例えば、特許文献1)。
また、図17に示すデータ処理装置は、シングルチップマイクロコンピュータであって、中央処理装置CPU701と、システムコントローラSYSC702と、割込コントローラINT704と、リードオンリメモリROM705と、ランダムアクセスメモリRAM706と、タイマ708と、シリアルコミュニケーションインタフェースSCI707と、第1から第8の入出力ポートIOP8(709)〜1(716)、クロック発振器CPG703の機能ブロックから構成されている。
In the vehicle LAN microcomputer system, a watchdog timer (hereinafter referred to as “watchdog”) 605 for monitoring the operation of the microcomputer 602 is mounted on the system, and when the microcomputer 602 is in a runaway state for some reason, By detecting that the signal from the monitoring signal generation circuit mounted on the microcomputer 602 is interrupted, the microcomputer is reset to prevent malfunction (for example, Patent Document 1).
The data processing apparatus shown in FIG. 17 is a single-chip microcomputer, and includes a central processing unit CPU 701, a system controller SYSC 702, an interrupt controller INT 704, a read only memory ROM 705, a random access memory RAM 706, and a timer 708. And functional blocks of a serial communication interface SCI 707, first to eighth input / output ports IOP8 (709) to 1 (716), and a clock oscillator CPG 703.

そして、前記データ処理装置は、動作モード情報を保持するシステムコントローラSYSC702をシングルチップマイクロコンピュータ内部に有し、初期化動作において、不揮発性記憶装置であるROM705に格納された情報を自動的に読み出し、動作モード情報を保持するシステムコントローラSYSC702へ、ソフトウエアでは制御されないコントロール信号で設定する。さらに、動作モード情報を保持するシステムコントローラSYSC702の動作モード情報は、初期化動作後の動作においては、CPU(中央処理装置)701のソフトウエアでは書き換えられない仕組みとすることにより、動作モードを誤って書き換えることを防止している(例えば、特許文献2)。
また、図18に示すマイクロコンピュータは、CPU801と、メモリ802と、プロテクト制御レジスタ804、アドレスデコーダ811〜814、論理素子805〜810、論理素子827を有するプロテクト制御回路830と、制御レジスタ815を有するクロック発生回路819と、制御レジスタ816を有する周辺ユニットA820と、制御レジスタ817を有する周辺ユニットB821と、制御レジスタ818を有する周辺ユニットC822とから構成されている。
The data processing apparatus has a system controller SYSC 702 that holds operation mode information inside a single chip microcomputer, and automatically reads information stored in a ROM 705 that is a nonvolatile storage device in an initialization operation. The system controller SYSC 702 that holds the operation mode information is set by a control signal that is not controlled by software. Furthermore, the operation mode information of the system controller SYSC 702 that holds the operation mode information is erroneously changed to an operation mode that is not rewritten by software of the CPU (central processing unit) 701 in the operation after the initialization operation. To prevent rewriting (for example, Patent Document 2).
18 includes a CPU 801, a memory 802, a protection control register 804, an address decoder 811 to 814, logic elements 805 to 810, a protection control circuit 830 having a logic element 827, and a control register 815. The clock generation circuit 819 includes a peripheral unit A 820 having a control register 816, a peripheral unit B 821 having a control register 817, and a peripheral unit C 822 having a control register 818.

そして、前記マイクロコンピュータは前記制御レジスタ815〜818に対するデータの書込みを許可するか、又は禁止するかの情報を制御レジスタ毎に前記プロテクト制御レジスタ804が保持し、書込み動作が発生したときに書込みの対象となっている前記制御レジスタを特定し、前記プロテクト制御レジスタ804の情報に応じて、前記プロテクト制御回路830が書込信号を制御する仕組みとすることによりプログラムの暴走等に起因する制御レジスタに対する誤書込みを防止している(例えば、特許文献3)。   The microcomputer holds information on whether to allow or prohibit writing of data to the control registers 815 to 818 for each control register, and the protection control register 804 stores the information when a write operation occurs. The control register that is the target is specified, and the protection control circuit 830 controls the write signal according to the information in the protection control register 804, so that the control register caused by a program runaway or the like is controlled. Incorrect writing is prevented (for example, Patent Document 3).

特開平5−32142号公報JP-A-5-32142 特開平8−63445号公報JP-A-8-63445 特開平8−235073号公報JP-A-8-233503

制御プログラムにより処理を行うマイクロコンピュータでは、マイクロコンピュータが複数の動作モードを有する入出力回路を内蔵する場合に、制御プログラムのみにより、動作モードを決定するのでは、制御プログラムにより、意図しない動作モードの再設定がおきることがある。一方、前記のような動作モードの再設定が起きないように、前記の動作モードの決定をマイクロコンピュータのハードウエアのみにより行う場合には、融通性、拡張性がなくなる問題があった。   In a microcomputer that performs processing by a control program, when the microcomputer has an input / output circuit having a plurality of operation modes, the operation mode is determined only by the control program. Reconfiguration may occur. On the other hand, there is a problem that flexibility and expandability are lost when the operation mode is determined only by the microcomputer hardware so that the operation mode is not reset as described above.

例えば、従来のデータ処理装置では、マイコンの誤動作中に、動作モード等が、CPUのソフトウエアに起因する命令により書き換わることは防止できるが、ソフトウエアでは制御されないコントロール信号により、動作モード情報を保持するレジスタ手段を制御するため、不揮発性記憶装置に格納された情報でしか動作モードを設定できないということになり、融通性、拡張性がなくなるという問題があった。   For example, in a conventional data processing apparatus, it is possible to prevent the operation mode and the like from being rewritten by an instruction caused by the CPU software during a malfunction of the microcomputer, but the operation mode information is obtained by a control signal that is not controlled by the software. Since the register means to be held is controlled, the operation mode can be set only by information stored in the nonvolatile storage device, and there is a problem that flexibility and expandability are lost.

また、従来のマイクロコンピュータでは、動作モードを決定する制御レジスタへの書込みを許可するか、禁止するかを決定するプロテクト制御レジスタ及び動作モードを決定する制御レジスタを選択するプロテクト制御回路が大規模なハードウエアを必要とする問題があった。さらに、前記のマイクロコンピュータでは、マイクロコンピュータの暴走による動作モードを決定する制御レジスタの書き換えは、プロテクト回路で防止できるが、プロテクト制御レジスタはソフトウエアに起因する命令により書き換え可能であるため、まず、プロテクト制御レジスタがマイクロコンピュータの暴走時にソフトウエアに起因する命令で書換られ、その結果、動作モードを決定する制御レジスタが書き換え可能となり、意図しない動作モードに設定されるという問題点があった。   Further, in a conventional microcomputer, a protection control circuit for selecting whether to allow or prohibit writing to a control register for determining an operation mode and a protection control circuit for selecting a control register for determining an operation mode are large-scale. There was a problem that required hardware. Furthermore, in the microcomputer described above, rewriting of the control register that determines the operation mode due to microcomputer runaway can be prevented by the protect circuit, but the protect control register can be rewritten by an instruction caused by software. The protection control register is rewritten with an instruction caused by software when the microcomputer runs out of control, and as a result, the control register for determining the operation mode can be rewritten and set to an unintended operation mode.

さらに、マイクロコンピュータシステム内蔵のマイクロコンピュータが制御プログラムに起因する命令により、入出力回路の入出力属性(例えば、入力モード、出力モードの切り換え)の切り換えや、A/D変換器又は16ビット長インターバルタイマ等の内蔵周辺機能の内、どの内蔵周辺機能からの出力信号をマイクロコンピュータシステム外部へ出力するかを切り換え可能である。一方、マイクロコンピュータが暴走すると、マイクロコンピュータが自発的に発生している監視信号が途切れるので、監視信号の途切れを検出したマイクロコンピュータシステム内蔵のウオッチドッグからリセット信号が出て、マイクロコンピュータシステムの誤動作は防止される。   Further, the microcomputer built in the microcomputer system switches the input / output attributes of the input / output circuit (for example, switching between the input mode and the output mode), the A / D converter, or the 16-bit length interval according to an instruction derived from the control program. Of the built-in peripheral functions such as a timer, it is possible to switch which built-in peripheral function outputs the output signal to the outside of the microcomputer system. On the other hand, if the microcomputer runs out of control, the monitoring signal generated spontaneously by the microcomputer is interrupted, so a reset signal is output from the watchdog built into the microcomputer system that detected the disconnection of the monitoring signal, causing the microcomputer system to malfunction. Is prevented.

従って、暴走したマイクロコンピュータの命令により、マイクロコンピュータシステム外部に出力される内蔵周辺機能の出力信号に切り換えが起こり、監視信号に換わって、監視信号と相似なタイマ信号が出る場合には、ウオッチドッグは、監視信号の途切れを検出できなくなり、マイクロコンピュータの暴走状態を止めるリセット信号を発生しない。   Therefore, if a runaway microcomputer command causes the output signal of the built-in peripheral function to be output to the outside of the microcomputer system, and a watchdog signal is output instead of the monitor signal, the watchdog Does not detect the interruption of the monitoring signal, and does not generate a reset signal that stops the microcomputer from running away.

そうすると、ウオッチドッグによる監視機能を内蔵しながら、マイクロコンピュータシステムの誤動作が防止されないという問題があった。   Then, there is a problem that the malfunction of the microcomputer system is not prevented while the watchdog monitoring function is incorporated.

加えて、マイクロコンピュータは正常に動作している場合であって、かつ、マイクロコンピュータ内部のノイズ(外部からのノイズに呼答して発生した場合も含む)によって、マイクロコンピュータが、その発生を命令しないのに、動作モードの設定に係る命令が発生した場合に、その結果、ウオッチドックへの監視信号を出力する出力回路のモードが再設定され、監視信号が途切れることにより、ウオッチドックよりリセット信号が送られ、マイクロコンピュータが正常であっても、マイクロコンピュータがリセットされてしまう問題点もあった。   In addition, when the microcomputer is operating normally, and the microcomputer generates a command to generate it due to noise inside the microcomputer (including when it occurs in response to external noise). However, when a command related to the setting of the operation mode occurs, as a result, the mode of the output circuit that outputs the monitoring signal to the watchdog is reset, and the reset signal is output from the watchdog when the monitoring signal is interrupted. Even if the microcomputer is normal, there is a problem that the microcomputer is reset.

そこで、本発明は、制御プログラムにより処理を行うマイクロコンピュータであって、マイクロコンピュータが複数の動作モードを有する入出力回路を内蔵する場合に、前記の動作モードの融通性、拡張性を保ちながら、前記動作モードの意図しない再設定を抑止する動作モード制御回路、前記動作モード制御回路を内蔵したマイクロコンピュータを提供する。   Therefore, the present invention is a microcomputer that performs processing by a control program, and when the microcomputer incorporates an input / output circuit having a plurality of operation modes, while maintaining the flexibility and expandability of the operation modes, An operation mode control circuit that suppresses unintended resetting of the operation mode and a microcomputer incorporating the operation mode control circuit are provided.

本発明の一観点によれば、少なくとも、制御信号発生部と、制御信号発生部からの第1の出力信号に応答して制御信号発生部からの第2の出力信号を保持し、保持した信号の論理値に応じた書込信号を発生する書込抑止回路と、書込信号に応答して制御信号発生部からの第3の出力信号を保持し、保持した信号の論理値に応じた制御信号を発生する制御回路とを備える動作モード制御回路が提供される。書込信号は、書込抑止回路が保持した信号の論理値が一方の論理値である場合は論理値が固定した信号であり、書込抑止回路が保持した信号の論理値が他方の論理値である場合は制御信号発生部からの第1の出力信号のバッファ信号であって、制御信号は、少なくともデータレジスタ回路を含む複数の信号発生回路の中から、外部へ信号を伝える信号発生回路を選択する選択回路へ供給される。
前記構成によれば、マイクロコンピュータ内部で、一つの入出力制御回路に、選択回路を通じて、接続される周辺回路が複数ある場合に、書込抑止回路の作用により、所定の状態に選択回路への選択信号を設定した後は、コンピュータ自身では、その設定を書換えできない為、マイクロコンピュータの状態(例えば、暴走状態であっても)いかんによらず、選択回路の設定は維持される効果がある。
According to one aspect of the present invention, at least a control signal generator and a second output signal from the control signal generator in response to the first output signal from the control signal generator, A write inhibit circuit for generating a write signal according to the logic value of the signal, a third output signal from the control signal generator in response to the write signal, and a control according to the logic value of the held signal An operation mode control circuit comprising a control circuit for generating a signal is provided . The write signal, when the logic value of the signal write inhibition circuit has held a one logic value is a signal whose logic value is fixed, the logical value other logic value of the signal write inhibition circuit is held Is a buffer signal of the first output signal from the control signal generation unit, and the control signal is a signal generation circuit that transmits a signal to the outside from a plurality of signal generation circuits including at least a data register circuit. It is supplied to the selection circuit to select.
According to the above configuration, when there are a plurality of peripheral circuits connected to one input / output control circuit through the selection circuit in the microcomputer, the write inhibit circuit operates to bring the selection circuit into a predetermined state. After the selection signal is set, the setting cannot be rewritten by the computer itself, so that the setting of the selection circuit is maintained regardless of the state of the microcomputer (for example, even in a runaway state).

本発明によれば、以下の効果がある。
マイクロコンピュータ内部において、マイクロコンピュータの動作モード、例えば、周辺機能回路とI/O(Input/Output)バッファとの接続の設定、I/Oバッファの動作モード等の設定は、動作モード設定期間に、マイクロコンピュータの制御プログラムによって、状況に応じて、設定可能という効果がある。
The present invention has the following effects.
In the microcomputer, the operation mode of the microcomputer, for example, the setting of the connection between the peripheral function circuit and the I / O (Input / Output) buffer, the setting of the operation mode of the I / O buffer, etc. are set during the operation mode setting period. According to the microcomputer control program, there is an effect that it can be set according to the situation.

一方、動作モード設定期間に設定した動作モードの設定は、マイクロコンピュータ内部の動作モード制御回路の効果により、外部からリセットされるまで、マイクロコンピュータの状態(例えば、暴走状態であっても)いかんによらず再設定できないという効果がある。   On the other hand, the setting of the operation mode set during the operation mode setting period depends on the effect of the operation mode control circuit inside the microcomputer until the microcomputer is reset from the outside (for example, even in a runaway state). There is an effect that it cannot be reset regardless.

従って、周辺機能回路の一種であるウオッチドックタイマ用の監視信号発生回路と監視信号出力ポートのI/Oバッファの接続の設定、及び、前記I/Oバッファの動作モードに対して、前記動作モード制御回路を適用すると、マイクロコンピュータの状態いかんによらず、動作モード設定期間に設定された前記の設定は、外部からのリセット信号によりリセットされるまで、保持されるという効果がある。
その結果、ウオッチドックタイマは、高い信頼性をもって、マイクロコンピュータの暴走状態の検出を行うことができる効果がある。
Therefore, the operation mode is compared with the setting of the connection between the monitoring signal generation circuit for the watchdog timer which is a kind of peripheral function circuit and the I / O buffer of the monitoring signal output port, and the operation mode of the I / O buffer. When the control circuit is applied, the setting set in the operation mode setting period is maintained until it is reset by an external reset signal regardless of the state of the microcomputer.
As a result, the watchdog timer is effective in detecting the runaway state of the microcomputer with high reliability.

第1の実施形態に係るマイクロコンピュータ全体回路の概略図である。It is the schematic of the whole microcomputer circuit which concerns on 1st Embodiment. 第1の実施形態に係るマイクロコンピュータの制御プログラム概略図である。It is a control program schematic diagram of the microcomputer concerning a 1st embodiment. 第1の実施形態に係る制御プログラムのフローチャート概略図である。It is a flowchart schematic diagram of a control program concerning a 1st embodiment. 第1の実施形態に係るモード設定ルーチンのフローチャート概略図である。It is a flowchart schematic diagram of the mode setting routine concerning a 1st embodiment. 第2の実施形態に係るマイクロコンピュータ全体回路概略図である。It is the whole microcomputer schematic circuit diagram concerning a 2nd embodiment. 第3の実施形態の概略図である。It is the schematic of 3rd Embodiment. 第3の実施形態の書込抑止回路の動作波形図である。It is an operation | movement waveform diagram of the write-inhibition circuit of 3rd Embodiment. 第4の実施形態の概略図である。It is the schematic of 4th Embodiment. 第4の実施形態の書込抑止回路の動作波形図である。It is an operation | movement waveform diagram of the write-inhibition circuit of 4th Embodiment. 第5の実施形態の概略図である。It is the schematic of 5th Embodiment. 第5の実施形態の書込抑止回路の動作波形図である。It is an operation | movement waveform diagram of the write-inhibition circuit of 5th Embodiment. 第6の実施形態の概略図である。It is the schematic of 6th Embodiment. 第6の実施形態の書込抑止回路の動作波形図である。It is an operation | movement waveform diagram of the write-inhibition circuit of 6th Embodiment. 第7の実施形態(マイクロコンピュータ全体回路の概要)の概略図である。It is the schematic of 7th Embodiment (outline | summary of the whole microcomputer circuit). 第8の実施形態(制御システム)の概略図である。It is the schematic of 8th Embodiment (control system). 従来例1(車両マイコンシステム)の概略図である。It is the schematic of the prior art example 1 (vehicle microcomputer system). 従来例2(データ処理装置)の概略図である。It is the schematic of the prior art example 2 (data processing apparatus). 従来例3(マイクロコンピュータ)の概略図である。It is the schematic of the prior art example 3 (microcomputer).

発明を実施するための形態に係るマイクロコンピュータ(以下、通常のマイクロコンピュータ、マイクロコントロールシステム又は半導体制御装置、例えば、DSP(digital signal processor)等を総称してマイクロコンピュータという)について、以下に説明する。前記のマイクロコンピュータは、制御信号発生部を含むCPU(中央処理装置)と、出力データレジスタと、動作モード制御回路と、タイマと、セレクタと、複数の動作モードを有するI/Oバッファとを備えている。また、動作モード制御回路は、オア回路と、周辺選択レジスタと、入出力制御レジスタと、書込抑止回路を備えている。   A microcomputer according to an embodiment for carrying out the invention (hereinafter referred to as a general microcomputer, a micro control system, or a semiconductor control device such as a DSP (digital signal processor)) will be described below. . The microcomputer includes a CPU (central processing unit) including a control signal generator, an output data register, an operation mode control circuit, a timer, a selector, and an I / O buffer having a plurality of operation modes. ing. The operation mode control circuit includes an OR circuit, a peripheral selection register, an input / output control register, and a write inhibit circuit.

そして、前記CPUはマイクロコンピュータの制御プログラムにより、それ以外の制御回路を制御している。また、前記CPUは前記制御プログラム中の動作モード設定ルーチンにより、制御信号発生部を通じて、動作モードを設定するために、入出力制御レジスタ、周辺選択レジスタ等の動作モード設定に関係するレジスタへ書込み信号を発生する。   The CPU controls other control circuits by a microcomputer control program. In addition, the CPU sets a write signal to registers related to the operation mode setting, such as an input / output control register and a peripheral selection register, in order to set the operation mode through the control signal generator by the operation mode setting routine in the control program. Is generated.

前記出力データレジスタは、CPUから、I/Oバッファを通じて、マイクロコンピュータ外部へ出力するデータの一時格納場所である。   The output data register is a temporary storage location for data output from the CPU through the I / O buffer to the outside of the microcomputer.

前記タイマは、周辺機能回路の具体例であって、マイクロコンピュータが外部装置をコントロールする為の一定のインターバルを示す信号を発生する。   The timer is a specific example of the peripheral function circuit, and generates a signal indicating a certain interval for the microcomputer to control the external device.

前記セレクタは、周辺選択レジスタからの信号の論理値に応じて、出力データレジスタの出力又はタイマからの出力のうち、一方を選択して、I/Oバッファに接続する回路である。   The selector is a circuit that selects one of the output of the output data register or the output from the timer according to the logical value of the signal from the peripheral selection register and connects it to the I / O buffer.

前記動作モード制御回路は、前記周辺選択レジスタを通じて、前記セレクタの選択を制御する。また、前記入出力制御レジスタ及び前記オア回路を通じて、I/Oバッファの動作モードを制御する。そして、前記動作モード制御回路を構成する回路は、以下のように動作する。   The operation mode control circuit controls selection of the selector through the peripheral selection register. The operation mode of the I / O buffer is controlled through the input / output control register and the OR circuit. The circuits constituting the operation mode control circuit operate as follows.

前記周辺選択レジスタは、前記書込信号に応じて、前記出力データレジスタの出力を前記I/Oバッファに接続する為の信号を前記セレクタと前記オア回路に出力する。   The peripheral selection register outputs a signal for connecting the output of the output data register to the I / O buffer in response to the write signal to the selector and the OR circuit.

前記入出力制御レジスタは前記I/Oバッファの動作モードを設定する信号を、前記オア回路へ出力する。   The input / output control register outputs a signal for setting an operation mode of the I / O buffer to the OR circuit.

前記オア回路には、前記周辺選択レジスタの出力と前記入出力レジスタの出力が入力されている。前記オア回路は、前記周辺選択レジスタからの信号の論理値が"0"であるときは、論理値"0"を出力し、一方、前記周辺選択レジスタからの信号の論理値が"1"であるときは、前記入出力制御レジスタの信号と同様な論理値を出力する。   The output of the peripheral selection register and the output of the input / output register are input to the OR circuit. The OR circuit outputs a logical value “0” when the logical value of the signal from the peripheral selection register is “0”, while the logical value of the signal from the peripheral selection register is “1”. In some cases, a logical value similar to the signal of the input / output control register is output.

前記書込抑止回路は、前記周辺選択レジスタが前記出力データレジスタの出力を前記I/Oバッファに接続する為の論理値"0"の信号を前記セレクタと前記オア回路に出力し、前記オア回路から論理値"0"の信号が出力され、前記I/Oバッファの動作モードを設定した後は、外部からのリセット信号によりリセットされるまで、前記入出力回路の動作モードを再設定することを抑止する。   The write inhibit circuit outputs a signal of logical value “0” for the peripheral selection register to connect the output of the output data register to the I / O buffer to the selector and the OR circuit, and the OR circuit After the signal of logical “0” is output from the I / O buffer and the operation mode of the I / O buffer is set, the operation mode of the input / output circuit is reset until it is reset by an external reset signal. Deter.

前記複数の動作モードを有するI/Oバッファは前記オア回路からの信号の論理値により設定される動作モードにより、前記マイクロコンピュータの外部との信号を入出力する。ここで、論理値"0"に対応する動作モードは出力モード、論理値"1"に対応する動作モードは入力モードである。   The I / O buffer having the plurality of operation modes inputs / outputs a signal to / from the outside of the microcomputer according to an operation mode set by a logical value of a signal from the OR circuit. Here, the operation mode corresponding to the logical value “0” is the output mode, and the operation mode corresponding to the logical value “1” is the input mode.

発明を実施するための形態によれば、CPUの制御プログラム中の動作モード設定ルーチンが動作している間は、出力データレジスタの出力をI/Oバッファに接続する設定、及び、I/Oバッファの動作モードを、ソフトウエアにより設定可能である。しかし、動作モード設定ルーチン終了後は、前記動作モード制御回路及び前記動作モード制御回路を構成する書込抑止回路の効果により、外部からのリセット信号によりリセットされるまでは、前記I/Oバッファの動作モードの設定及び出力データレジスタとI/Oバッファの接続の設定を再設定することは抑止される。従って、CPUが暴走した結果、予期しないソフトウエアが動作しても、前記の設定は維持される。   According to the mode for carrying out the invention, while the operation mode setting routine in the control program of the CPU is operating, the setting for connecting the output of the output data register to the I / O buffer, and the I / O buffer The operation mode can be set by software. However, after completion of the operation mode setting routine, due to the effect of the operation mode control circuit and the write inhibit circuit constituting the operation mode control circuit, the I / O buffer is not reset until reset by an external reset signal. Resetting the operation mode setting and the connection setting between the output data register and the I / O buffer is inhibited. Therefore, even if unexpected software operates as a result of CPU runaway, the above setting is maintained.

(第1の実施形態)
図1〜図4を用いて第1の実施形態について、説明する。
(First embodiment)
The first embodiment will be described with reference to FIGS.

まず、図1に示すマイクロコンピュータ850は、制御信号発生部861を含むCPU(中央処理装置)860と、RAM(Random Access Memory)851と、ROM(Read Only Memory)852と、動作モード検出回路853と、出力データレジスタ855と、リセット回路870と、動作モード制御回路862と、タイマ854と、セレクタ856と、インプットバッファ864と、I/O(Input/Output)バッファ867と、データバス863と、リセット信号871と、動作モード設定ポート865と、監視信号出力ポート866と、リセット信号受け入れポート869を備えている。また、動作モード制御回路862は、オア回路868と、周辺選択レジスタ857と、入出力制御レジスタ858と、書込抑止回路859を備えている。   First, the microcomputer 850 shown in FIG. 1 includes a CPU (Central Processing Unit) 860 including a control signal generator 861, a RAM (Random Access Memory) 851, a ROM (Read Only Memory) 852, and an operation mode detection circuit 853. An output data register 855, a reset circuit 870, an operation mode control circuit 862, a timer 854, a selector 856, an input buffer 864, an I / O (Input / Output) buffer 867, a data bus 863, A reset signal 871, an operation mode setting port 865, a monitor signal output port 866, and a reset signal receiving port 869 are provided. The operation mode control circuit 862 includes an OR circuit 868, a peripheral selection register 857, an input / output control register 858, and a write inhibit circuit 859.

そして、監視信号出力ポート866は、マイクロコンピュータ850からウオッチドックタイマへの監視信号を出力するポートである。ここで、ウオッチドックタイマは、前記の監視信号の出力タイミング、すなわち、監視信号間の間隔、或いは、単位時間あたりの出力回数等を監視し、マイクロコンピュータ850内部のCPU860が正常動作をしているか否かを判断する、外付け回路である。   The monitoring signal output port 866 is a port for outputting a monitoring signal from the microcomputer 850 to the watchdog timer. Here, the watchdog timer monitors the output timing of the monitoring signal, that is, the interval between the monitoring signals, the number of outputs per unit time, etc., and whether the CPU 860 in the microcomputer 850 is operating normally. This is an external circuit for determining whether or not.

次に動作モード設定ポート865は、マイクロコンピュータ850の動作モードを決定する期間に、マイクロコンピュータ850外部からの動作モードを決定する外部入力信号を受け入れるポートである。   Next, the operation mode setting port 865 is a port for receiving an external input signal for determining the operation mode from the outside of the microcomputer 850 during the period for determining the operation mode of the microcomputer 850.

次にリセット信号受け入れポート869は、ウオッチドックタイマが、マイクロコンピュータ850内部のCPU860が誤動作、あるいは、暴走状態であると判断したときに発生するリセット信号を受けるポートである。また、マイクロコンピュータ850を初期化するために入力する、マイクロコンピュータ850外部からのリセット信号(以下「マイクロコンピュータ850外部からのリセット信号」という)を受け入れるポートでもある。すなわち、「外部からのリセット信号」には、「ウオッチドックタイマからのリセット信号」、及び、マイクロコンピュータ850を初期化するために入力する、「マイクロコンピュータ850外部からのリセット信号」が含まれる。   Next, the reset signal receiving port 869 is a port for receiving a reset signal generated when the watchdog timer determines that the CPU 860 in the microcomputer 850 is malfunctioning or running out of control. The port is also a port for receiving a reset signal from the outside of the microcomputer 850 (hereinafter referred to as “reset signal from the outside of the microcomputer 850”), which is input to initialize the microcomputer 850. That is, the “reset signal from the outside” includes a “reset signal from the watchdog timer” and a “reset signal from the outside of the microcomputer 850” that is input to initialize the microcomputer 850.

そして、CPU860はマイクロコンピュータ850の制御プログラムにより、マイクロコンピュータ850全体を制御する中央処理装置である。また、制御信号発生部861は、CPU860内部にあって、CPU860以外の回路の動作モード決定に関する、マイクロコンピュータ850の内部回路を制御する信号の発生部分である。   The CPU 860 is a central processing unit that controls the entire microcomputer 850 by a control program of the microcomputer 850. The control signal generation unit 861 is a signal generation unit that controls the internal circuit of the microcomputer 850 and determines the operation mode of circuits other than the CPU 860 in the CPU 860.

また、RAM851、ROM852は、例えば、制御プログラムや設定条件の格納場所やマイクロコンピュータ850内の機能回路間で受け渡されるデータの一時格納場所の役割を果たす。   The RAM 851 and the ROM 852 serve as, for example, a storage location for control programs and setting conditions and a temporary storage location for data passed between functional circuits in the microcomputer 850.

加えて、データバス863はマイクロコンピュータ850内の機能回路間で受け渡されるデータが通過するバスである。ここで、データバス863は、CPU860が接続されている、いわゆる共通バスを含むが、CPU860が接続されていず、CPU860以外の機能回路間に存在するバスも含む。   In addition, the data bus 863 is a bus through which data passed between functional circuits in the microcomputer 850 passes. Here, the data bus 863 includes a so-called common bus to which the CPU 860 is connected, but also includes a bus that is not connected to the CPU 860 and exists between functional circuits other than the CPU 860.

また、リセット回路870は、「ウオッチドックタイマからのリセット信号」、又は、「マイクロコンピュータ850外部からのリセット信号」に応じて、マイクロコンピュータ850内部の回路への内部リセット信号904、又は、リセット信号871を発生させ、マイクロコンピュータ850内部の関係する各回路をリセットする。ここで、前記のリセット信号871は、CPU860の他、リセットが必要な関係回路へ接続されている。   In addition, the reset circuit 870 is an internal reset signal 904 or a reset signal to a circuit inside the microcomputer 850 in response to “a reset signal from the watchdog timer” or “a reset signal from the outside of the microcomputer 850”. 871 is generated, and each related circuit in the microcomputer 850 is reset. Here, the reset signal 871 is connected to a related circuit that needs to be reset in addition to the CPU 860.

さらに、動作モード検出回路853は、マイクロコンピュータ850の動作後に、動作モードを決定する期間に、動作モード設定ポート865に与えられた入力状態を判定する回路である。   Further, the operation mode detection circuit 853 is a circuit for determining an input state given to the operation mode setting port 865 during a period for determining the operation mode after the operation of the microcomputer 850.

次に、I/Oバッファ867は、マイクロコンピュータ850の外部にデータを出力する出力回路とマイクロコンピュータ850の外部からデータを受け入れる入力回路とをかね備え、例えば、入力モード、出力モード、そのどちらでもないモード等の複数の入出力モードを有することができるものであるが、動作モード設定端子を有し、論理値"0"の信号を受けた時に出力モード、論理値"1"を受けた時に入力モードに設定されることが、本実施例では望ましい。   Next, the I / O buffer 867 includes an output circuit that outputs data to the outside of the microcomputer 850 and an input circuit that receives data from the outside of the microcomputer 850. For example, in either the input mode or the output mode, Can have a plurality of input / output modes such as a non-existing mode, but has an operation mode setting terminal, and when it receives a signal of logical value “0”, it receives an output mode, and when it receives logical value “1” In this embodiment, it is desirable to set the input mode.

加えて、出力データレジスタ855は、CPU860から、I/Oバッファ867を通じて、マイクロコンピュータ850外部へ出力するデータの一時格納場所である。そして、出力データレジスタ855は、格納したデータを所定のタイミングで、I/Oバッファ867へ引き渡しをする。従って、前記I/Oバッファ867が、マイクロコンピュータ850からウオッチドックタイマへのデータを出力する監視信号出力ポート866へ接続されている場合、出力データレジスタ855は、マイクロコンピュータ850からウオッチドックタイマへのデータを一時格納し、CPU860の制御により、CPU860が正常動作をしている証拠となる、所定のタイミングを形成する。   In addition, the output data register 855 is a temporary storage location for data output from the CPU 860 to the outside of the microcomputer 850 through the I / O buffer 867. The output data register 855 delivers the stored data to the I / O buffer 867 at a predetermined timing. Therefore, when the I / O buffer 867 is connected to the monitor signal output port 866 that outputs data from the microcomputer 850 to the watchdog timer, the output data register 855 is connected to the watchdog timer from the microcomputer 850. Data is temporarily stored, and the CPU 860 controls to form a predetermined timing that provides evidence that the CPU 860 is operating normally.

次に、タイマ854は、周辺機能回路の具体的な例であり、マイクロコンピュータ850が外部装置をコントロールする為の一定のインターバルを示す信号を発生する回路である。   Next, the timer 854 is a specific example of a peripheral function circuit, and is a circuit that generates a signal indicating a certain interval for the microcomputer 850 to control an external device.

また、セレクタ856は、周辺選択レジスタ857からの信号の論理値に応じて、出力データレジスタ855からの出力、又は、タイマ854からの出力の内、一方を選択して、I/Oバッファ867へ接続する回路である。すなわち、周辺選択レジスタ857からの信号の論理値が"0"であるときは、出力データレジスタ855からの出力を選択し、周辺選択レジスタ857からの信号の論理値が"1"であるときは、タイマ854からの出力を選択する。   Further, the selector 856 selects one of the output from the output data register 855 or the output from the timer 854 according to the logical value of the signal from the peripheral selection register 857, and sends it to the I / O buffer 867. It is a circuit to be connected. That is, when the logical value of the signal from the peripheral selection register 857 is “0”, the output from the output data register 855 is selected, and when the logical value of the signal from the peripheral selection register 857 is “1”. , The output from the timer 854 is selected.

加えて、動作モード制御回路862は、前記I/Oバッファ867の入出力モードの制御及び前記セレクタ856に対して選択を指示する回路であって、動作モード制御回路862を構成する回路は、以下のように動作する。   In addition, the operation mode control circuit 862 is a circuit for controlling the input / output mode of the I / O buffer 867 and instructing selection to the selector 856. The circuit constituting the operation mode control circuit 862 is as follows. Behaves like

入出力制御レジスタ858は、入出力モードを設定する信号を保持する回路であって、保持している信号と同一の論理値を示す信号を、オア回路868へ出力する。   The input / output control register 858 is a circuit that holds a signal for setting an input / output mode, and outputs a signal indicating the same logical value as the held signal to the OR circuit 868.

また、周辺選択レジスタ857は、前記セレクタ856に対して、選択を指示する信号を保持する回路であって、保持する信号と同一の信号をセレクタ856と、オア回路868に出力する。   The peripheral selection register 857 is a circuit that holds a signal instructing the selector 856 to select, and outputs the same signal as the held signal to the selector 856 and the OR circuit 868.

さらに、書込抑止回路859は、「マイクロコンピュータ850外部からのリセット信号」又は「ウオッチドックタイマからのリセット信号」により、リセットされるまで、セレクタ856に対して選択を指示する信号の周辺選択レジスタ857への再書込を、抑止する。   Further, the write inhibit circuit 859 is a peripheral selection register for a signal that instructs the selector 856 to select until it is reset by a “reset signal from the outside of the microcomputer 850” or “a reset signal from the watchdog timer”. Rewriting to 857 is inhibited.

加えて、オア回路868は、周辺選択レジスタ857からのセレクタ856に対する、選択を指示する信号が論理値"0"であるとき、すなわち、セレクタ856が出力データレジスタ855からの出力信号を選択しているとき、論理値"0"の信号を出力する。その結果、I/Oバッファ867は出力モードに設定される。   In addition, the OR circuit 868 selects the output signal from the output data register 855 when the selection instructing signal from the peripheral selection register 857 to the selector 856 is the logical value “0”. When it is, a signal of logical value “0” is output. As a result, the I / O buffer 867 is set to the output mode.

一方、オア回路868は、周辺選択レジスタ857からのセレクタ856に対する、選択を指示する信号が論理値"1"であるとき、すなわち、セレクタ856がタイマ854からの出力信号を選択しているとき、入出力制御レジスタ858からの信号に応じた論理値を出力する。その結果、I/Oバッファ867は、入出力制御レジスタ858からの信号の論理値に応じた入出力モードに設定される。   On the other hand, the OR circuit 868 has a logical value “1” for the selection instruction from the peripheral selection register 857 to the selector 856, that is, when the selector 856 selects the output signal from the timer 854. A logical value corresponding to the signal from the input / output control register 858 is output. As a result, the I / O buffer 867 is set to the input / output mode corresponding to the logical value of the signal from the input / output control register 858.

従って、以上に説明した動作モード制御回路862は、マイクロコンピュータ850の動作モード設定期間に、前記出力データレジスタ855からの出力信号をI/Oバッファ867に接続する設定、及び、接続されたI/Oバッファ867の動作モードの設定をする。そして、動作モード制御回路862を構成する書込抑止回路859の働きにより、動作モード制御回路862は、出力データレジスタ855の出力をI/Oバッファ867へ接続し、I/Oバッファの動作モードを出力モードに設定した後は、「マイクロコンピュータ850外部からのリセット信号」又は「ウオッチドックタイマからのリセット信号」により、リセットされるまで、前記の設定が再設定されるのを抑止する。   Therefore, the operation mode control circuit 862 described above is configured to connect the output signal from the output data register 855 to the I / O buffer 867 and the connected I / O during the operation mode setting period of the microcomputer 850. The operation mode of the O buffer 867 is set. Then, the operation of the write inhibit circuit 859 constituting the operation mode control circuit 862 causes the operation mode control circuit 862 to connect the output of the output data register 855 to the I / O buffer 867 and change the operation mode of the I / O buffer. After the output mode is set, the above setting is prevented from being reset until it is reset by the “reset signal from the outside of the microcomputer 850” or the “reset signal from the watchdog timer”.

また、インプットバッファ864は、動作モード設定ポート865に入力された信号を動作モード検出回路853に伝える信号バッファ回路である。   The input buffer 864 is a signal buffer circuit that transmits a signal input to the operation mode setting port 865 to the operation mode detection circuit 853.

次に、図2に示すマイクロコンピュータ850の制御プログラムは、初期化モジュール903と、モード設定モジュール909と、表示制御モジュール910と、ウオッチドックタイマモジュール905と、タスク制御モジュール907と、周辺機能に対応した周辺機能1モジュール906及び周辺機能2モジュール908を少なくとも備えている。そして、前記マイクロコンピュータ850の制御モジュールは、「マイクロコンピュータ850外部から入力される外部リセット信号900」、又は、「ウオッチドックタイマからのリセット信号902」の入力を契機としてリセットされる。また、監視信号901は、ウオッチドックタイマモジュール905が動作した結果発生する信号である。さらに、内部リセット信号904は、初期化モジュール903が起動のため、ウオッチドックタイマモジュール905から発生する信号である。   Next, the control program of the microcomputer 850 shown in FIG. 2 corresponds to the initialization module 903, the mode setting module 909, the display control module 910, the watchdog timer module 905, the task control module 907, and peripheral functions. The peripheral function 1 module 906 and the peripheral function 2 module 908 are provided at least. The control module of the microcomputer 850 is reset in response to the input of “an external reset signal 900 input from the outside of the microcomputer 850” or “a reset signal 902 from the watchdog timer”. The monitoring signal 901 is a signal generated as a result of the operation of the watchdog timer module 905. Further, the internal reset signal 904 is a signal generated from the watchdog timer module 905 because the initialization module 903 is activated.

そして、制御プログラムの各モジュールは、CPU850が行う一塊のルーチンと対応している。   Each module of the control program corresponds to a group of routines executed by the CPU 850.

従って、制御プログラムの一部であるモード設定モジュール909の実行中は、例えば、動作モード設定ポート865からの設定信号を、動作モード検出回路853にて検出し、CPU860からの制御により、動作モード制御回路862が、セレクタ856の選択の設定、I/Oバッファ867の動作モードの設定をする。   Therefore, during the execution of the mode setting module 909 which is a part of the control program, for example, the setting signal from the operation mode setting port 865 is detected by the operation mode detection circuit 853 and the operation mode control is performed by the control from the CPU 860. The circuit 862 sets the selection of the selector 856 and the operation mode of the I / O buffer 867.

また、制御プログラムの一部であるウオッチドックタイマモジュール905を実行中は、例えば、出力データレジスタ885は、CPU860からのデータを受け取り、I/Oバッファ867は、出力データレジスタ855からの出力を、監視信号901として、マイクロコンピュータ850の監視信号出力ポート866から、出力する。そして、ウオッチドックタイマからのリセット信号902をマイクロコンピュータ850が受け取ると、内部リセット信号904を発生させ、初期化モジュール903を起動する。   Further, during execution of the watchdog timer module 905 that is a part of the control program, for example, the output data register 885 receives data from the CPU 860, and the I / O buffer 867 outputs the output from the output data register 855, The monitoring signal 901 is output from the monitoring signal output port 866 of the microcomputer 850. When the microcomputer 850 receives the reset signal 902 from the watchdog timer, the microcomputer 850 generates an internal reset signal 904 and activates the initialization module 903.

すなわち、CPU860が正常動作をしていれば、所定の信号が、所定のタイミングで、監視信号901として出力されるため、まったく、所定の信号が出力されない場合、又は、所定の信号が、所定のタイミングで出力されない場合は、CPU860が誤動作を起こしていることが認知できる。   In other words, if the CPU 860 is operating normally, a predetermined signal is output as the monitoring signal 901 at a predetermined timing. Therefore, when the predetermined signal is not output at all, or the predetermined signal is If it is not output at the timing, it can be recognized that the CPU 860 is malfunctioning.

ここで、「ウオッチドックタイマからのリセット信号902」と「マイクロコンピュータ850外部からのリセット信号900」はリセット信号受入ポート869で受けることを第1の実施形態では想定しており、「ウオッチドックタイマからのリセット信号902」と「マイクロコンピュータ850外部からのリセット信号900」の区別はリセット回路870が各々の信号の特徴に従って行っている。また、その場合、発生される内部リセット信号904と図1に図示されているリセット信号871は、CPU860を含む同様な関係回路に供給される。しかし、「ウオッチドックタイマからのリセット信号902」と「マイクロコンピュータ850外部からのリセット信号900」は別々のポートからマイクロコンピュータ850へ入力されることであってもよい。さらに、「ウオッチドックタイマからのリセット信号902」と「マイクロコンピュータ外部からのリセット信号900」を区別して扱わなくてもよく、その場合は、図3の制御プログラムのフローチャート概略図に示すエントリーポイントであるウオッチドックタイマからのリセット915とリセットエントリー916は、図3のウオッチドックタイマモジュール918へ、統合して、接続することになる。また、図2においては、初期化モジュール903へ入力される「マイクロコンピュータ850外部からのリセット信号900」と「ウオッチドックタイマからのリセット信号902」は、図2のウオッチドックタイマモジュール905へ入力される「外部からのリセット信号」に統合される。   Here, in the first embodiment, it is assumed that the “reset signal 902 from the watchdog timer” and the “reset signal 900 from the outside of the microcomputer 850” are received by the reset signal receiving port 869. The reset circuit 870 makes a distinction between the “reset signal 902 from” and the “reset signal 900 from outside the microcomputer 850” according to the characteristics of each signal. In that case, the generated internal reset signal 904 and the reset signal 871 shown in FIG. 1 are supplied to similar related circuits including the CPU 860. However, the “reset signal 902 from the watchdog timer” and the “reset signal 900 from the outside of the microcomputer 850” may be input to the microcomputer 850 from different ports. Furthermore, it is not necessary to distinguish between “reset signal 902 from the watchdog timer” and “reset signal 900 from the outside of the microcomputer”. In this case, the entry point shown in the flowchart schematic diagram of the control program in FIG. A reset 915 and reset entry 916 from a watchdog timer will be integrated and connected to the watchdog timer module 918 of FIG. In FIG. 2, the “reset signal 900 from the microcomputer 850” and the “reset signal 902 from the watchdog timer” input to the initialization module 903 are input to the watchdog timer module 905 of FIG. Integrated into the “reset signal from the outside”.

さらに、制御プログラムの一部であるタスク制御モジュール907実行中は、所定のアルゴリズムにより、各種のモジュールを実行するタイミングを決定する。   Further, during execution of the task control module 907, which is a part of the control program, the timing for executing various modules is determined by a predetermined algorithm.

加えて、制御プログラムの一部である初期化モジュール903は、「マイクロコンピュータ850外部からのリセット信号900」が入力されると、最初に実行され、マイクロコンピュータ850の状態を所定の初期状態に設定する。   In addition, the initialization module 903, which is a part of the control program, is executed first when the “reset signal 900 from the outside of the microcomputer 850” is input, and sets the state of the microcomputer 850 to a predetermined initial state. To do.

また、制御プログラムの一部である表示モジュール910実行中は、マイクロコンピュータ850内部の、あるいは、マイクロコンピュータ850が制御している装置の状態について、マイクロコンピュータ850が、制御する外部表示装置上に、所定の状態を表示する信号を発生する。   During execution of the display module 910 which is a part of the control program, the microcomputer 850 controls the state of the device inside the microcomputer 850 or the device controlled by the microcomputer 850 on the external display device to be controlled. A signal indicating a predetermined state is generated.

加えて、制御プログラムの一部である周辺機能1モジュール906、周辺機能2モジュール908等の周辺機能に関するモジュールの実行中は、マイクロコンピュータ850内のタイマ854等の周辺機能回路を動作させる。   In addition, the peripheral function circuit such as the timer 854 in the microcomputer 850 is operated during the execution of the modules related to the peripheral functions such as the peripheral function 1 module 906 and the peripheral function 2 module 908 which are a part of the control program.

次に、図3にマイクロコンピュータ850の制御プログラムのフローチャートの概略を示す。プログラムが正常に動作した場合、「マイクロコンピュータ850外部からのリセット信号900」がはいると、マイクロコンピュータ850の制御プログラムは、リセットエントリー916し、初期化モジュール917、モード設定モジュール923の実行の後、タスク制御モジュール921を実行する。また、タスク制御モジュール921の実行中に所定のアルゴリズムにより、周辺機能制御モジュール925やウオッチドックタイマモジュール918が実行される。一方、制御プログラムが正常に動作しなくなると、すなわち、CPU860が暴走すると、制御プログラムは所定のアルゴリズムで動作せず、例えば、ウオッチドックタイマモジュール918が所定のタイミングで動作しなくなる状態、或いは、まったくウオッチドックタイマモジュール918が動作しなくなる状態となる。その場合は、「ウオッチドックタイマからのリセット信号902」により、ウオッチドックタイマからのリセットエントリー915からウオッチドックタイマモジュール918が起動されることとなる。   Next, FIG. 3 shows an outline of a flowchart of a control program of the microcomputer 850. When the program operates normally, if the “reset signal 900 from the outside of the microcomputer 850” is input, the control program of the microcomputer 850 enters the reset entry 916, and after executing the initialization module 917 and the mode setting module 923. The task control module 921 is executed. Also, the peripheral function control module 925 and the watchdog timer module 918 are executed by a predetermined algorithm during the execution of the task control module 921. On the other hand, when the control program does not operate normally, that is, when the CPU 860 runs away, the control program does not operate according to a predetermined algorithm, for example, the state where the watchdog timer module 918 stops operating at a predetermined timing, or at all The watchdog timer module 918 becomes inoperative. In this case, the watchdog timer module 918 is activated from the reset entry 915 from the watchdog timer by the “reset signal 902 from the watchdog timer”.

次に、図4にマイクロコンピュータ850の制御プログラムを構成するモード設定モジュール923のフローチャートの概略を示す。すなわち、モード設定モジュール923が、モード設定向け入力状態の認識のステップ、周辺選択レジスタ857へのデータを出力するステップ、周辺選択レジスタ857へのデータを保持させるステップ、入出力制御レジスタ858へのデータを出力するステップ、入出力制御レジスタ858へのデータを保持させるステップを少なくとも含む点が図示されている。そして、「マイクロコンピュータ850外部からのリセット信号」又は「ウオッチドックタイマからのリセット信号」により書込抑止回路859の抑止が解除された後、前記モード設定向け入力状態の認識のステップで認識した動作モードに対応して、周辺選択レジスタ857、及び、入出力制御レジスタ858へ所定のデータを保持させることにより、マイクロコンピュータ850の動作モードは設定され、書込抑止回路859が有する機能により抑止が開始する。   Next, FIG. 4 shows an outline of a flowchart of the mode setting module 923 constituting the control program of the microcomputer 850. That is, the mode setting module 923 recognizes the input state for mode setting, outputs data to the peripheral selection register 857, holds data in the peripheral selection register 857, and data to the input / output control register 858 , And at least a step of holding data to the input / output control register 858 is shown. Then, after the inhibition of the write inhibition circuit 859 is released by the “reset signal from the outside of the microcomputer 850” or the “reset signal from the watchdog timer”, the operation recognized in the step of recognizing the input state for mode setting. Corresponding to the mode, by holding predetermined data in the peripheral selection register 857 and the input / output control register 858, the operation mode of the microcomputer 850 is set, and suppression is started by the function of the write suppression circuit 859. To do.

そこで、第1の実施形態のマイクロコンピュータ850は、CPU860の状態(例えば、暴走状態であっても)によらず、マイクロコンピュータ850の動作モードを設定した後、「マイクロコンピュータ850外部からのリセット信号900」又は「ウオッチドックタイマからのリセット信号902」により、機能が解除されるまで、周辺機能の選択を指示する信号を、周辺選択レジスタ857へ再書込することを抑止するため、周辺選択レジスタ857の周辺機能を選択する信号の設定、及び、前記I/Oバッファ867の動作モードの設定を再設定しないという効果を有する。   Therefore, the microcomputer 850 of the first embodiment sets the operation mode of the microcomputer 850 regardless of the state of the CPU 860 (for example, even if it is in a runaway state), and then “reset signal from the outside of the microcomputer 850”. 900 ”or“ reset signal 902 from the watchdog timer ”in order to prevent the peripheral selection register 857 from rewriting a signal for instructing the selection of the peripheral function until the function is canceled. The setting of the signal for selecting the peripheral function 857 and the setting of the operation mode of the I / O buffer 867 are not reset.

すなわち、マイクロコンピュータ850の動作モード設定期間に、制御プログラムにより制御されたCPU860が、前記出力データレジスタ855を、前記I/Oバッファ867を通じて、監視信号出力ポート866へ接続する設定、及び、前記I/Oバッファ855の入出力モードを、出力モードとする設定をした後は、マイクロコンピュータ850の動作モードは固定される。   That is, during the operation mode setting period of the microcomputer 850, the CPU 860 controlled by the control program connects the output data register 855 to the monitoring signal output port 866 through the I / O buffer 867, and the I After the input / output mode of the / O buffer 855 is set to the output mode, the operation mode of the microcomputer 850 is fixed.

従って、CPU860が暴走状態となっても、タイマ854からの出力がI/Oバッファ867に接続されるように選択を指示する信号が、周辺選択レジスタ857に保持されることはなく、マイクロコンピュータ850からウオッチドックタイマへの監視信号が、正常な監視信号と相似なタイマ854からの信号に置き換わることもない。   Therefore, even when the CPU 860 goes into a runaway state, the peripheral selection register 857 does not hold a signal for instructing selection so that the output from the timer 854 is connected to the I / O buffer 867, and the microcomputer 850 The watch signal from the watchdog timer to the watchdog timer is not replaced with a signal from the timer 854 similar to the normal watch signal.

その結果、常に、CPU860の状態を反映した信号が、監視信号出力ポート866からマイクロコンピュータ850外部へ出力されるため、ウオッチドックタイマは、高い信頼性をもって、CPU860の暴走状態の検出を行うことができる。   As a result, a signal reflecting the state of the CPU 860 is always output from the monitoring signal output port 866 to the outside of the microcomputer 850, so that the watchdog timer can detect the runaway state of the CPU 860 with high reliability. it can.

(第2の実施形態)
まず、図5に示すマイクロコンピュータ880は、制御信号発生部891を含むCPU(中央処理装置)890と、RAM881と、ROM882と、動作モード検出回路883と、出力データレジスタ885と、リセット回路889と、動作モード制御回路886と、周辺機能回路884と、インプットバッファ893と、アウトプットバッファ899と、I/Oバッファ897と、周辺機能回路用ポート895と、動作モード設定ポート894と、監視信号出力ポート896と、リセット信号受け入れポート898と、データバス892と、リセット信号879とを備えている。また、動作モード制御回路886は、入出力制御レジスタ887と、書込抑止回路888を備えている。
(Second Embodiment)
First, the microcomputer 880 shown in FIG. 5 includes a CPU (central processing unit) 890 including a control signal generator 891, a RAM 881, a ROM 882, an operation mode detection circuit 883, an output data register 885, and a reset circuit 889. , An operation mode control circuit 886, a peripheral function circuit 884, an input buffer 893, an output buffer 899, an I / O buffer 897, a peripheral function circuit port 895, an operation mode setting port 894, and a monitor signal output A port 896, a reset signal receiving port 898, a data bus 892, and a reset signal 879 are provided. Further, the operation mode control circuit 886 includes an input / output control register 887 and a write inhibit circuit 888.

ここで、第1の実施形態のマイクロコンピュータ850と比較すると、第2の実施形態に係るマイクロコンピュータ880では、周辺機能回路の具体例であるタイマ854にかわって、タイマ854を含む一般的な周辺機能回路884が構成要素となっている点、周辺機能回路884からの出力は周辺機能回路用ポート895からマイクロコンピュータ外部へ出力される点、セレクタ856が構成要素になく、出力データレジスタ885に対するI/Oバッファ897と、周辺機能回路884に対するアウトプットバッファ899とは個別に存在する点、周辺選択レジスタ857が動作モード制御回路886の構成要素でない点が異なる。   Here, compared with the microcomputer 850 of the first embodiment, the microcomputer 880 according to the second embodiment has a general peripheral including a timer 854 instead of the timer 854 which is a specific example of the peripheral function circuit. The function circuit 884 is a constituent element, the output from the peripheral function circuit 884 is output from the peripheral function circuit port 895 to the outside of the microcomputer, the selector 856 is not included in the constituent element, and the I for the output data register 885 The / O buffer 897 and the output buffer 899 for the peripheral function circuit 884 exist separately, and the peripheral selection register 857 is not a component of the operation mode control circuit 886.

ここで、周辺機能回路用ポート895は、マイクロコンピュータ880が有する周辺機能回路884からの信号を出力するポートである。   Here, the peripheral function circuit port 895 is a port for outputting a signal from the peripheral function circuit 884 included in the microcomputer 880.

周辺機能回路884は、マイクロコンピュータ880がマイクロコンピュータ880外部の装置を制御するための信号を生成する回路であり、例えば、インターバルタイマや16ビットA/D変換器等がある。   The peripheral function circuit 884 is a circuit that generates a signal for the microcomputer 880 to control a device outside the microcomputer 880, and includes, for example, an interval timer and a 16-bit A / D converter.

また、動作モード制御回路886は、前記I/Oバッファ897の入出力モードの制御を行う回路である。そして、入出力制御レジスタ887は、入出力モードを設定する信号を保持する回路である。また、書込抑止回路888は、「マイクロコンピュータ880外部からのリセット信号」又は「ウオッチドックタイマからのリセット信号」により、リセットされるまで、入出力制御レジスタ887に対する入出力モードを設定する信号の再書込を抑止する回路である。従って、前記の動作モード制御回路886は、マイクロコンピュータ880の動作モード設定期間に、前記出力データレジスタ885が接続されているI/Oバッファ897の動作モードの設定をする。そして、動作モード制御回路886を構成する書込抑制回路888の働きにより、動作モード制御回路886は、前記の設定を行った後は、「マイクロコンピュータ880外部からのリセット信号」又は「ウオッチドックタイマからのリセット信号」により、リセットされるまで、前記の設定を再設定されるのを抑止する。   The operation mode control circuit 886 is a circuit that controls the input / output mode of the I / O buffer 897. The input / output control register 887 is a circuit that holds a signal for setting the input / output mode. The write inhibit circuit 888 is a signal for setting the input / output mode for the input / output control register 887 until it is reset by the “reset signal from the outside of the microcomputer 880” or the “reset signal from the watchdog timer”. This circuit suppresses rewriting. Therefore, the operation mode control circuit 886 sets the operation mode of the I / O buffer 897 to which the output data register 885 is connected during the operation mode setting period of the microcomputer 880. After the above setting, the operation mode control circuit 886 performs the “reset signal from the outside of the microcomputer 880” or the “watchdog timer” by the operation of the write suppression circuit 888 constituting the operation mode control circuit 886. By the “reset signal from”, the setting is prevented from being reset until it is reset.

また、インプットバッファ893は動作モード設定ポート894から動作モード検出回路883に信号を伝える信号バッファ回路である。   The input buffer 893 is a signal buffer circuit that transmits a signal from the operation mode setting port 894 to the operation mode detection circuit 883.

さらに、アウトプットバッファ899は周辺機能回路884から周辺機能回路用ポート895へ信号を伝える信号バッファ回路である。
一方、その他のマイクロコンピュータ880の構成要素である、CPU890、制御信号発生部891、RAM881、ROM882、動作モード検出回路883、出力データレジスタ885、リセット回路889、及び、I/Oバッファ897については、第1の実施形態で示した回路と同様な機能をもつものである。加えて、監視信号出力ポート896及びリセット信号受け入れポート898も第1の実施形態と同様な役割を持つポートである。さらに、データバス892及びリセット信号879も第1の実施形態と同様な役割を持つバス、或いは、信号である。
Further, the output buffer 899 is a signal buffer circuit for transmitting a signal from the peripheral function circuit 884 to the peripheral function circuit port 895.
On the other hand, regarding the other components of the microcomputer 880, the CPU 890, the control signal generator 891, the RAM 881, the ROM 882, the operation mode detection circuit 883, the output data register 885, the reset circuit 889, and the I / O buffer 897, The circuit has the same function as the circuit shown in the first embodiment. In addition, the monitoring signal output port 896 and the reset signal receiving port 898 are also ports having the same role as in the first embodiment. Further, the data bus 892 and the reset signal 879 are also buses or signals having the same role as in the first embodiment.

さらに、CPU890を制御するマイクロコンピュータの制御プログラムも第1の実施形態におけるマイクロコンピュータ880の制御プログラムと同様な機能をもち、前記制御プログラムを構成する、タスク制御モジュール、動作モード設定モジュール、初期化モジュール、ウオッチドックタイマ制御モジュール、周辺機能制御モジュールも同様な機能をもつ。   Further, the control program for the microcomputer that controls the CPU 890 also has the same function as the control program for the microcomputer 880 in the first embodiment, and the task control module, operation mode setting module, and initialization module that constitute the control program. The watchdog timer control module and the peripheral function control module have similar functions.

そこで、第2の実施形態のマイクロコンピュータ880は、第2の実施形態の動作モード制御回路886の作用により、入出力モードを設定する信号の入出力制御レジスタ887への誤った書込が行われないように、マイクロコンピュータ880の動作モードを設定した後、「マイクロコンピュータ880外部からのリセット信号」又は「ウオッチドックタイマからのリセット信号」により、機能が解除されるまで、入出力モードを設定する信号の入出力制御レジスタ887への書込を抑止する効果を有する。   Therefore, in the microcomputer 880 of the second embodiment, the signal for setting the input / output mode is erroneously written to the input / output control register 887 by the operation of the operation mode control circuit 886 of the second embodiment. After setting the operation mode of the microcomputer 880 so that the function is canceled, the input / output mode is set until the function is canceled by the “reset signal from the outside of the microcomputer 880” or the “reset signal from the watchdog timer”. This has the effect of inhibiting the writing of signals to the input / output control register 887.

すなわち、前記I/Oバッファ897が、監視信号出力ポート896へ接続されている場合、マイクロコンピュータ880の動作モード設定期間に、出力モードへ設定された後は、動作モードが固定される。   That is, when the I / O buffer 897 is connected to the monitoring signal output port 896, the operation mode is fixed after the microcomputer 880 is set to the output mode during the operation mode setting period.

従って、CPU890が正常であるにもかかわらず、マイクロコンピュータ880内部のノイズにより、入出力モードを設定する信号の入出力制御レジスタ887への誤った書込が行われることがなく、マイクロコンピュータ880からウオッチドックタイマへの監視信号が常に出力される。その結果、常に、CPU890の動作状態を反映した、監視信号がウオッチドックタイマに届くため、ウオッチドックタイマは、高い信頼性をもってCPU890の状態を監視し続けることができる。   Therefore, although the CPU 890 is normal, the microcomputer 880 does not erroneously write a signal for setting the input / output mode to the input / output control register 887 due to noise inside the microcomputer 880. A monitoring signal to the watchdog timer is always output. As a result, since the monitoring signal that always reflects the operation state of the CPU 890 reaches the watchdog timer, the watchdog timer can continue to monitor the state of the CPU 890 with high reliability.

(第3の実施形態)
図6及び図7を用いて、第3の実施形態について、説明する。第3の実施形態は第2の実施形態の動作モード制御回路に関し、さらに詳細に記載するものである。
(Third embodiment)
The third embodiment will be described with reference to FIGS. 6 and 7. The third embodiment relates to the operation mode control circuit of the second embodiment and will be described in more detail.

まず、図6は、書込抑止回路10を含む動作モード制御回路20と、動作モード制御回路20で制御される出力データレジスタ2及び入出力I/O3と、入出力I/O3からの出力信号が出力される端子8を表している。ここで、入出力I/O3は、例えば、出力信号を出力しない動作モードや出力信号を出力する動作モード等を有し、その動作モードが変更可能なものである。一方、出力データレジスタ2は、入出力I/O3から出力される出力データをラッチしておくものである。   First, FIG. 6 shows an operation mode control circuit 20 including a write inhibit circuit 10, an output data register 2 and input / output I / O3 controlled by the operation mode control circuit 20, and output signals from the input / output I / O3. Represents the terminal 8 from which is output. Here, the input / output I / O 3 has, for example, an operation mode in which no output signal is output, an operation mode in which an output signal is output, and the like, and the operation mode can be changed. On the other hand, the output data register 2 latches output data output from the input / output I / O 3.

また、動作モード制御回路20は、ライトパルス生成部1と、ライトパルス生成部1からの最初の入出力制御レジスタ書込信号12を受け、入出力制御レジスタ書込信号12のバッファ信号を出力する書込抑止回路10と、入出力制御レジスタ書込信号12のバッファ信号を受け、データバス14からデータをラッチする入出力制御レジスタ4から構成されている。さらに、ライトパルス生成部1は、出力データレジスタ2へデータバス14を通して出力データを供給し、出力データレジスタ2へ出力データレジスタ書込信号11を供給して前記の出力データをラッチさせる。また、入出力制御レジスタ4のQ端子の出力は、入出力I/O3へ供給され、前記Q端子の出力の論理値に応じて、入出力I/O3の動作モードが決定される。   The operation mode control circuit 20 receives the write pulse generator 1 and the first input / output control register write signal 12 from the write pulse generator 1 and outputs a buffer signal of the input / output control register write signal 12. It comprises a write inhibit circuit 10 and an input / output control register 4 that receives the buffer signal of the input / output control register write signal 12 and latches data from the data bus 14. Further, the write pulse generator 1 supplies output data to the output data register 2 through the data bus 14 and supplies the output data register write signal 11 to the output data register 2 to latch the output data. The output of the Q terminal of the input / output control register 4 is supplied to the input / output I / O 3 and the operation mode of the input / output I / O 3 is determined according to the logical value of the output of the Q terminal.

さらに、書込抑止回路10は、入出力制御レジスタ書込信号12を一方の入力端子で受けるアンド回路5と、アンド回路5の出力をデータ取り込み信号とするフリップフロップ(以下「FF」という)6と、FF6の出力を入力に受け、アンド回路5の他方の入力端子へ、出力するバッファ7から構成されている。   Further, the write inhibit circuit 10 includes an AND circuit 5 that receives the input / output control register write signal 12 at one input terminal, and a flip-flop (hereinafter referred to as “FF”) 6 that uses the output of the AND circuit 5 as a data capture signal. The buffer 7 receives the output of the FF 6 as an input and outputs it to the other input terminal of the AND circuit 5.

そして、書込抑止回路10への2回目以降の入出力制御レジスタ書込信号12の入力に対して、書込抑止回路10が、入出力制御レジスタ4への入出力制御レジスタ書込信号12のバッファ信号の伝達を、抑止するので、動作モード制御回路20は、初期化後に、入出力制御レジスタ4にラッチされた最初の動作モード設定値を維持する。   Then, in response to the second and subsequent input / output control register write signal 12 input to the write inhibit circuit 10, the write inhibit circuit 10 sends the input / output control register write signal 12 to the input / output control register 4. Since the transmission of the buffer signal is suppressed, the operation mode control circuit 20 maintains the first operation mode setting value latched in the input / output control register 4 after initialization.

従って、入出力制御レジスタ4にラッチされた最初の動作モード設定値は、入出力I/O3の動作モードを決定するので、ライトパルス生成部1から出力される出力データレジスタ書込信号11を受けて出力データレジスタ2にラッチされたデータバス14からのデータは、最初の入出力制御レジスタ書込信号12で設定され、それ以降、マイクロコンピュータの暴走やマイクロコンピュータ内部のノイズによっても変化しない入出力I/O3の動作モードに応じて出力されるという効果がある。   Therefore, since the first operation mode setting value latched in the input / output control register 4 determines the operation mode of the input / output I / O 3, the output data register write signal 11 output from the write pulse generator 1 is received. The data from the data bus 14 latched in the output data register 2 is set by the first input / output control register write signal 12, and thereafter, the input / output does not change due to microcomputer runaway or noise in the microcomputer. There is an effect that the data is output according to the operation mode of I / O3.

なお、前記では、ライトパルス生成部1がパルス信号を発生することを前提としているが、状態が変化する信号であっても、書込抑止回路10が、ライトパルス生成部1からの最初の入出力制御レジスタ書込信号12からに限って、パルス信号を発生することとすれば、入出力制御レジスタ4には、最初の一回の書込みしか行われず、動作モード制御回路20は同様に初期化後の最初の動作モード設定値を維持することができる。   In the above description, it is assumed that the write pulse generation unit 1 generates a pulse signal. However, even if the signal changes in state, the write suppression circuit 10 does not receive the first input from the write pulse generation unit 1. If a pulse signal is generated only from the output control register write signal 12, only the first write is performed in the input / output control register 4, and the operation mode control circuit 20 is similarly initialized. It is possible to maintain the first operation mode setting value later.

ここで、書込抑止回路10の動作を明確にするため、図7を用いて、以下に説明する。   Here, in order to clarify the operation of the write inhibit circuit 10, a description will be given below with reference to FIG.

まず、リセット信号15がR端子に入力されることにより、FF6はリセットされ、FF6はQ端子から"0"を出力する。ここで、リセット信号15は動作モード制御回路20を含むシステム又はマイクロコンピュータの全体回路をリセットする信号をいう。その結果、バッファ7は"1"を出力し、アンド回路5は一方の端子でバッファ7の出力信号"1"を受け、アンド回路5は他方の端子からの信号を通過させる状態となる。   First, when the reset signal 15 is input to the R terminal, the FF 6 is reset, and the FF 6 outputs “0” from the Q terminal. Here, the reset signal 15 is a signal for resetting the entire circuit of the system or microcomputer including the operation mode control circuit 20. As a result, the buffer 7 outputs “1”, the AND circuit 5 receives the output signal “1” of the buffer 7 at one terminal, and the AND circuit 5 is in a state of passing the signal from the other terminal.

次に、パルス信号である入出力制御レジスタ書込信号12がアンド回路5の他方の端子に入力され、アンド回路5の出力からFF6のCK端子にパルス信号が伝えられると、D端子には常にVCC電源9、すなわち、論理値"1"の信号が入力されているので、FF6はQ端子から"1"を出力する。一方で、アンド回路5の出力は書込抑止信号10として入出力制御レジスタにも伝えられ、データバス14からデータを取り込み、データをラッチする。   Next, when the input / output control register write signal 12 as a pulse signal is input to the other terminal of the AND circuit 5 and a pulse signal is transmitted from the output of the AND circuit 5 to the CK terminal of the FF 6, the D terminal is always supplied to the D terminal. Since the VCC power supply 9, that is, the signal of the logical value “1” is input, the FF 6 outputs “1” from the Q terminal. On the other hand, the output of the AND circuit 5 is also transmitted to the input / output control register as the write inhibit signal 10, and takes in data from the data bus 14 and latches the data.

次にFF6のQ端子の出力"1"は、バッファ7に入力され、バッファ7の出力は"0"に反転する。前記バッファ7の出力はアンド回路5の一方の端子に入力され、2回目の入出力制御レジスタ書込信号12をブロックする。この段階で、バッファ7、アンド回路5、FF6の出力状態は、次のリセット信号15がくるまで維持されるので、2回目以降の入出力制御レジスタ書込信号12は、入出力制御レジスタ4に対して、何の作用もしなくなる。   Next, the output “1” of the Q terminal of the FF 6 is input to the buffer 7, and the output of the buffer 7 is inverted to “0”. The output of the buffer 7 is input to one terminal of the AND circuit 5 to block the second input / output control register write signal 12. At this stage, the output states of the buffer 7, the AND circuit 5, and the FF 6 are maintained until the next reset signal 15 is received, so that the second and subsequent input / output control register write signals 12 are input to the input / output control register 4. On the other hand, it has no effect.

つまり、入出力制御レジスタ書込信号に対応して書込抑止回路10は、パルス信号を発生するが、入出力制御レジスタ書込信号12によりFF6及びバッファ7の出力がラッチされるので、次の書込抑止回路10のパルス発生は抑止されることとなる。   That is, the write inhibit circuit 10 generates a pulse signal in response to the input / output control register write signal, but the outputs of the FF 6 and the buffer 7 are latched by the input / output control register write signal 12, so that The generation of pulses in the write inhibit circuit 10 is inhibited.

図6の第3の実施形態に係る書込抑止回路10及び動作モード制御回路20によれば、前記書込抑止回路10により入出力制御レジスタ4は、一回目の入出力制御レジスタ書込信号により設定された設定値を、マイクロコンピュータの暴走や内部ノイズがあっても維持するので、動作モードが意図しないソフトウエア命令によって変更されない効果がある。   According to the write inhibit circuit 10 and the operation mode control circuit 20 according to the third embodiment shown in FIG. 6, the write inhibit circuit 10 causes the input / output control register 4 to respond to the first input / output control register write signal. Since the set set value is maintained even if there is a microcomputer runaway or internal noise, there is an effect that the operation mode is not changed by an unintended software instruction.

なお、前記では、入出力I/Oに関する動作モードの設定を例に説明を行ったが、入出力制御レジスタ4を動作モード制御レジスタと、入出力制御レジスタ書込信号12を動作モード制御レジスタ書込信号とすれば、動作モード制御回路20及び書込抑止回路10は、一般的な動作モードを制御することもでき、前記と同様な効果を奏する。   In the above description, the operation mode related to the input / output I / O has been described as an example. However, the input / output control register 4 is the operation mode control register, and the input / output control register write signal 12 is the operation mode control register. In the case of an embedded signal, the operation mode control circuit 20 and the write inhibit circuit 10 can also control a general operation mode, and have the same effect as described above.

(第4の実施形態)
図8及び図9を用いて、第4の実施形態について説明する。第4の実施形態は、第2の実施形態の動作モード制御回路を、さらに詳細に記載したものである。
(Fourth embodiment)
The fourth embodiment will be described with reference to FIGS. 8 and 9. In the fourth embodiment, the operation mode control circuit of the second embodiment is described in more detail.

まず、図8は、書込抑止回路120を含む動作モード制御回路130と、動作モード制御回路130で制御される出力データレジスタ102及び入出力I/O103と、入出力I/O103からの出力信号が出力される端子113を表している。ここで、出力データレジスタ102及び入出力I/O103は、図6の第3の実施形態で対応する出力データレジスタ2及び入出力I/O3と同様な機能を有する。   First, FIG. 8 shows an operation mode control circuit 130 including a write inhibit circuit 120, an output data register 102 and input / output I / O 103 controlled by the operation mode control circuit 130, and output signals from the input / output I / O 103. Represents a terminal 113 from which is output. Here, the output data register 102 and the input / output I / O 103 have the same functions as the corresponding output data register 2 and input / output I / O 3 in the third embodiment of FIG.

一方、図6の第3の実施形態では、書込抑止回路10が、初期化後の一回に限って入出力レジスタ4への、入出力I/O3の動作モード設定値の書込を許可するのに対し、図5の第2の実施形態では、書込抑止回路120は、書込抑止回路120へ、ライトパルス生成部101からの2以上の連続デコードがあったときに、入力レジスタ104への、入出力I/O3の動作モードの設定値の書込みを許可する点で相違する。   On the other hand, in the third embodiment of FIG. 6, the write inhibit circuit 10 permits writing of the operation mode setting value of the input / output I / O 3 to the input / output register 4 only once after initialization. In contrast, in the second embodiment of FIG. 5, the write inhibit circuit 120 causes the input register 104 when the write inhibit circuit 120 receives two or more consecutive decodes from the write pulse generator 101. Is different in that writing of the setting value of the operation mode of the input / output I / O 3 is permitted.

また、動作モード制御回路130は、ライトパルス生成部101と、前記ライトパルス生成部101からの入出力制御レジスタ書込信号122を受けてパルス信号を発生する書込抑止回路120と、前記書込抑止回路120からのパルス信号を受けてデータバス124からのデータをラッチする入出力制御レジスタ104とから構成されている。さらに、ライトパルス生成部101は、出力データレジスタ102へデータバス124を通して出力データを供給し、出力データレジスタ102へ出力データレジスタ書込信号121を供給して前記の出力データをラッチさせる。また、入出力制御レジスタ104のQ端子の出力は、入出力I/O103へ供給され、前記Q端子の出力の論理値に応じて、入出力I/O103の動作モードが決定される。   Further, the operation mode control circuit 130 includes a write pulse generation unit 101, a write inhibit circuit 120 that receives the input / output control register write signal 122 from the write pulse generation unit 101 and generates a pulse signal, and the write The input / output control register 104 is configured to receive a pulse signal from the inhibition circuit 120 and latch data from the data bus 124. Further, the write pulse generator 101 supplies output data to the output data register 102 through the data bus 124, and supplies the output data register write signal 121 to the output data register 102 to latch the output data. The output of the Q terminal of the input / output control register 104 is supplied to the input / output I / O 103, and the operation mode of the input / output I / O 103 is determined according to the logical value of the output of the Q terminal.

さらに、書込抑止回路120は、データバス124からデータ"55"又はデータ"AA"を受けた場合に、それぞれのデータに対応したデコード信号を発生するデコーダ105と、データ"AA"に対応するデコード信号を一方の入力として受けるアンド回路106と、アンド回路106の出力を入出力制御レジスタ書込信号122により取り込むフリップフロップ(以下「FF」という)107と、FF107の出力及びデータ"55"に対応するデコード信号とを入力として受けるアンド回路108と、アンド回路108の出力を入出力制御レジスタ書込信号122により取り込むFF109と、FF109の出力を入力として受け、アンド回路106の一方の入力へ、出力するバッファ110と、FF109の出力である書込抑止信号123が一方の端子より入力され、入出力制御レジスタ書込信号122が他方の端子より入力されるアンド回路111とから構成されている。   Further, when receiving data “55” or data “AA” from the data bus 124, the write inhibit circuit 120 corresponds to the decoder 105 that generates a decode signal corresponding to each data and the data “AA”. The AND circuit 106 that receives the decode signal as one input, the flip-flop (hereinafter referred to as “FF”) 107 that receives the output of the AND circuit 106 by the input / output control register write signal 122, and the output and data “55” of the FF 107 The AND circuit 108 that receives the corresponding decode signal as an input, the FF 109 that receives the output of the AND circuit 108 by the input / output control register write signal 122, the output of the FF 109 as an input, and one input of the AND circuit 106 The buffer 110 to output and the write inhibit signal 123 that is the output of the FF 109 are Input from square pin, output control register write signals 122 and an AND circuit 111. inputted from the other terminal.

そして、データ"55"及びデータ"AA"により連続してデコードされることにより、ライトパルス生成部101からの入出力制御レジスタ書込信号122を受け、アンド回路111へ通過許可信号として書込抑止信号123が発生され、アンド回路111が入出力制御レジスタ書込信号122をバッファした信号を出力するため入出力制御レジスタ104において入出力I/O103の動作モードに対応する値が設定される。   Then, by successively decoding with the data “55” and the data “AA”, the input / output control register write signal 122 is received from the write pulse generation unit 101, and the write inhibition to the AND circuit 111 as a pass permission signal. The signal 123 is generated, and the AND circuit 111 outputs a signal obtained by buffering the input / output control register write signal 122. In the input / output control register 104, a value corresponding to the operation mode of the input / output I / O 103 is set.

一方、データ"55"及びデータ"AA"によるデコードが終了すると、書込抑止回路120が、入出力制御レジスタ書込信号122を受けたときに、アンド回路111へ通過禁止信号として書込抑止信号123が発生され、入出力制御レジスタ書込信号122が入出力制御レジスタ104へ伝えられるのを抑止する。その結果、動作モード制御回路130は初期化後の最初の動作モード設定値を維持することができる。   On the other hand, when the decoding by the data “55” and the data “AA” is completed, when the write inhibit circuit 120 receives the input / output control register write signal 122, the write inhibit signal is sent to the AND circuit 111 as a passage inhibit signal. 123 is generated to prevent the input / output control register write signal 122 from being transmitted to the input / output control register 104. As a result, the operation mode control circuit 130 can maintain the first operation mode setting value after initialization.

なお、前記では、入出力制御レジスタ書込信号122がパルス信号であることを前提としているが、複数のデコード信号(ここでは、データ"55"及びデータ"AA")が連続して入力されたときに限って、ライトパルス生成部101から出力された入出力制御レジスタ書込信号122から、書込抑止回路120がパルス信号を発生することとしても、入出力制御レジスタ104に、動作モードの書込が行われるため、動作モード制御回路130は同様に動作モード設定値を維持することができる。   In the above description, it is assumed that the input / output control register write signal 122 is a pulse signal, but a plurality of decode signals (here, data “55” and data “AA”) are continuously input. Only when the write inhibit circuit 120 generates a pulse signal from the input / output control register write signal 122 output from the write pulse generator 101, the operation mode is written to the input / output control register 104. Therefore, the operation mode control circuit 130 can similarly maintain the operation mode set value.

従って、ライトパルス生成部101から出力された出力データレジスタ書込信号121を受けて、出力データレジスタ102にラッチされたデータは、書込抑止回路120が連続デコードし、入出力制御レジスタ書込信号122によって設定された動作モードに応じて入出力I/O103から出力されるという効果がある。   Therefore, the write inhibit circuit 120 continuously decodes the data latched in the output data register 102 in response to the output data register write signal 121 output from the write pulse generator 101, and the input / output control register write signal. There is an effect that the data is output from the input / output I / O 103 in accordance with the operation mode set by 122.

また、マイクロコンピュータが暴走しても特定のデータによる連続デコードが起こる確率は低いため、入出力制御レジスタ書込信号122によって設定された動作モードは、マイクロコンピュータの暴走によっても変更されないという効果もある。   In addition, even if the microcomputer runs out of control, there is a low probability that continuous decoding by specific data will occur. Therefore, the operation mode set by the I / O control register write signal 122 is not changed by the microcomputer running out of control. .

ここで、書込抑止回路120の動作を明確化するため、図9を用いて、以下に説明する。   Here, in order to clarify the operation of the write inhibit circuit 120, it will be described below with reference to FIG.

まず、リセット信号112で、FF107及びFF109をリセットし、各々のFFの出力端子Qからの出力を"0"とする。次に、データ"AA"に応じて、デコーダ105は、前記データ"AA"に対応する信号"1"を発生する。次に、アンド回路106はバッファ110の出力信号"1"及びデータ"AA"に対応する信号"1"を受け、アンド回路106は信号"1"を出力する。次にFF107は、アンド回路106の出力"1"を、パルス信号である入出力制御レジスタ書込信号122を受けてラッチし、Q端子より"1"を出力する。   First, the FF 107 and the FF 109 are reset by the reset signal 112, and the output from the output terminal Q of each FF is set to “0”. Next, in response to the data “AA”, the decoder 105 generates a signal “1” corresponding to the data “AA”. Next, the AND circuit 106 receives the output signal “1” of the buffer 110 and the signal “1” corresponding to the data “AA”, and the AND circuit 106 outputs the signal “1”. Next, the FF 107 receives and latches the output “1” of the AND circuit 106 in response to the input / output control register write signal 122 which is a pulse signal, and outputs “1” from the Q terminal.

次に、データ"AA"によるデコードを取りやめ、デコーダ105がデータ"55"によるデコードを受けると、アンド回路108は、FF107からの出力"1"及びデータ"55"に対応する信号"1"を受けて、信号"1"を出力する。次に、FF109は、アンド回路108の出力"1"を入出力制御レジスタ書込信号122により取り込み、書込抑止信号123として"1"を出力する。その結果、アンド回路111は入出力制御レジスタ104へ入出力制御レジスタ書込信号122をバッファして出力し、入出力制御レジスタ104はデータバス124からのデータをラッチする。   Next, when the decoding by the data “AA” is canceled and the decoder 105 receives the decoding by the data “55”, the AND circuit 108 outputs the signal “1” corresponding to the output “1” from the FF 107 and the data “55”. In response, a signal “1” is output. Next, the FF 109 takes in the output “1” of the AND circuit 108 by the input / output control register write signal 122 and outputs “1” as the write inhibit signal 123. As a result, the AND circuit 111 buffers and outputs the input / output control register write signal 122 to the input / output control register 104, and the input / output control register 104 latches data from the data bus 124.

その後、データ"55"デコードも止めると、デコーダ105からは、"0"信号が出力され、この状態で入出力制御レジスタ書込信号122がライトパルス生成部101から出力されると、FF109からは、書込抑止信号123として"0"信号が出力される。その結果、アンド回路111の一方の入力端子には、"0"信号の書込抑止信号123が入力されているため、アンド回路111が入出力制御レジスタ書込信号122をバッファして出力するのを抑止する。   Thereafter, when the decoding of the data “55” is stopped, a “0” signal is output from the decoder 105. When the input / output control register write signal 122 is output from the write pulse generation unit 101 in this state, the FF 109 The “0” signal is output as the write inhibit signal 123. As a result, since the write inhibit signal 123 of the “0” signal is inputted to one input terminal of the AND circuit 111, the AND circuit 111 buffers and outputs the input / output control register write signal 122. Is suppressed.

すなわち、書込抑止回路120が異なるデコード信号で、連続デコードを受けたときのみ、書込抑止回路120は入出力制御レジスタ書込信号122をバッファして入出力制御レジスタ104に出力するが、デコードされないとき、又は、連続デコードがされないときは、入出力制御レジスタ書込信号122をバッファして入出力制御レジスタ104に出力しない。   That is, only when the write inhibit circuit 120 receives continuous decode with different decode signals, the write inhibit circuit 120 buffers the input / output control register write signal 122 and outputs it to the input / output control register 104. When not performed or when continuous decoding is not performed, the input / output control register write signal 122 is buffered and not output to the input / output control register 104.

図8の第4の実施形態に係わる書込抑止回路120及び動作モード制御回路130によれば、マイクロコンピュータの暴走があっても、連続して"55"と"AA"データを出力する確率は低いので、連続デコード時に設定した入出力I/Oの動作モードは維持される。従って、意図しないソフトウエア命令や内部ノイズによる制御レジスタ書込信号122及びデコード信号の出力によって、動作モードが変更されないという効果がある。   According to the write inhibit circuit 120 and the operation mode control circuit 130 according to the fourth embodiment of FIG. 8, even if the microcomputer runs out of control, the probability of continuously outputting “55” and “AA” data is Since it is low, the operation mode of the input / output I / O set at the time of continuous decoding is maintained. Therefore, the operation mode is not changed by the output of the control register write signal 122 and the decode signal due to an unintended software instruction or internal noise.

なお、前記では、入出力I/Oに関する動作モードの設定を例に説明を行ったが、入出力制御レジスタ104を動作モード制御レジスタと、入出力制御レジスタ書込信号122を動作モード制御レジスタ書込信号とすれば、動作モード制御回路130及び書込抑止回路120は、一般的な動作モードを制御することもでき、前記と同様な効果を奏する。   In the above description, the operation mode setting related to input / output I / O has been described as an example. However, the input / output control register 104 is an operation mode control register, and the input / output control register write signal 122 is an operation mode control register. In the case of an embedded signal, the operation mode control circuit 130 and the write inhibit circuit 120 can also control a general operation mode, and have the same effects as described above.

(第5実施形態)
図10及び図11を用いて、第5の実施形態について説明する。第5の実施形態は、第1の実施形態の動作モード回路を、さらに詳細に記載したものである。
(Fifth embodiment)
The fifth embodiment will be described with reference to FIGS. 10 and 11. The fifth embodiment describes the operation mode circuit of the first embodiment in more detail.

まず、図10は、書込抑止回路220を含む動作モード制御回路230と、動作モード制御回路230で制御される出力データレジスタ204及び入出力I/O205と、セレクタ203と、入出力I/O205からの出力信号が出力される端子212と、タイマ回路を表している。ここで、タイマ202は一定周期のクロック信号を出力するものである。また、セレクタ203はタイマ202からの出力信号、又は、出力データレジスタ204からの出力信号かを選択する回路であり、論理値"1"を設定するとタイマ202からの出力信号を選択し、論理値"0"を設定すると出力データレジスタ204からの出力信号を選択するものである。さらに、出力データレジスタ204はライトパルス生成回路201からの出力データを、データバス221を通して受け取り、ラッチする回路である。   First, FIG. 10 shows an operation mode control circuit 230 including a write inhibit circuit 220, an output data register 204 and input / output I / O 205 controlled by the operation mode control circuit 230, a selector 203, and an input / output I / O 205. 2 represents a terminal 212 from which an output signal is output and a timer circuit. Here, the timer 202 outputs a clock signal having a fixed period. The selector 203 is a circuit for selecting an output signal from the timer 202 or an output signal from the output data register 204. When the logical value “1” is set, the selector 203 selects the output signal from the timer 202, and the logical value When “0” is set, an output signal from the output data register 204 is selected. Further, the output data register 204 is a circuit that receives and latches output data from the write pulse generation circuit 201 through the data bus 221.

図6の第3の実施形態では、書込抑止回路10が、初期化後の一回に限って入出力レジスタ4への、入出力I/O3の動作モード設定値の書込みを許可するのに対し、図10の第5の実施形態では、書込抑止回路220が、初期化後、所定のデータ信号を書込抑止回路220へ送り、それがラッチされるまでの期間のみ、セレクタ203で使用される周辺選択レジスタ207の選択設定値の書込みを許可する点で異なる。   In the third embodiment of FIG. 6, the write inhibit circuit 10 permits writing of the operation mode set value of the input / output I / O 3 to the input / output register 4 only once after initialization. On the other hand, in the fifth embodiment of FIG. 10, the write inhibit circuit 220 sends a predetermined data signal to the write inhibit circuit 220 after initialization and is used by the selector 203 only during the period until it is latched. This is different in that writing of the selected set value of the peripheral selection register 207 is permitted.

また、動作モード制御回路230は、ライトパルス生成部201と、前記ライトパルス生成部201からの周辺選択レジスタ書込信号223を受け、書込抑止信号224を発生する書込抑止回路220と、前記ライトパルス生成部201からの入出力制御レジスタ書込信号222を受け、データバス221上のデータをラッチする入出力制御レジスタ208と、前記書込抑止回路220からの書込抑止信号224を受け、データバス221上のデータをラッチする周辺選択レジスタ207と、入出力制御レジスタ208のQ端子からの出力及び周辺選択レジスタ207のQ端子からの出力を入力端子で受け、論理和をとるオア206とから構成されている。   The operation mode control circuit 230 includes a write pulse generation unit 201, a write suppression circuit 220 that receives the peripheral selection register write signal 223 from the write pulse generation unit 201 and generates a write suppression signal 224, The input / output control register write signal 222 from the write pulse generator 201 is received, the input / output control register 208 that latches data on the data bus 221 and the write inhibit signal 224 from the write inhibit circuit 220 are received, Peripheral selection register 207 that latches data on data bus 221; OR 206 that receives an output from the Q terminal of input / output control register 208 and an output from the Q terminal of peripheral selection register 207 at the input terminal and takes a logical sum; It is composed of

そして、周辺選択レジスタ207のQ端子からの出力はセレクタ203に供給され、選択信号として働く。ここで、前記選択信号が"1"の場合は、タイマ202からの信号を選択し、オア206からも前記選択信号の論理値と同等な論理値が出力されるため、入出力I/O205は論理値"1"に対応した動作モードで動作する。一方、前記選択信号が"0"の場合は、出力データレジスタ204からの信号を選択するが、オア206からは、入出力制御レジスタのQ端子からの出力と同様な論理信号が出力され、入出力I/O205は入出力制御レジスタのQ端子からの出力に応じた動作モードで動作する。   The output from the Q terminal of the peripheral selection register 207 is supplied to the selector 203 and functions as a selection signal. Here, when the selection signal is “1”, the signal from the timer 202 is selected, and the logical value equivalent to the logical value of the selection signal is also output from the OR 206. Therefore, the input / output I / O 205 It operates in the operation mode corresponding to the logical value “1”. On the other hand, when the selection signal is “0”, the signal from the output data register 204 is selected, but the OR 206 outputs a logic signal similar to the output from the Q terminal of the input / output control register. The output I / O 205 operates in an operation mode corresponding to the output from the Q terminal of the input / output control register.

書込抑止回路220は、データバス221からのデータを受け取るバッファ210と、バッファ210の出力をライトパルス生成部201からの周辺選択レジスタ書込信号223によりラッチするフリップフロップ(以下「FF」という)209と、ライトパルス生成部201からの周辺選択レジスタ書込信号223及びFF209からの出力信号を入力として受けるアンド回路211とから構成されている。ここで、データバス221は少なくとも、出力データレジスタ204向けの信号、周辺選択レジスタ207向けの信号、入出力制御レジスタ208向けの信号、FF209向けの信号を含むデータバスである。   The write inhibit circuit 220 receives a data from the data bus 221 and a flip-flop (hereinafter referred to as “FF”) that latches the output of the buffer 210 with a peripheral selection register write signal 223 from the write pulse generator 201. 209 and an AND circuit 211 that receives the peripheral selection register write signal 223 from the write pulse generation unit 201 and the output signal from the FF 209 as inputs. Here, the data bus 221 is a data bus including at least a signal for the output data register 204, a signal for the peripheral selection register 207, a signal for the input / output control register 208, and a signal for the FF 209.

そして、リセット信号213をR端子に入力することにより、書込抑止回路220のFF209のXQ端子が"1"に設定されてから、データバス221のFF209向けの信号に"0"が設定され、前記データバス221のFF209向けの信号に設定された"0"を周辺選択レジスタ書込信号223でFF209がラッチした結果、FF209のXQ端子が"0"に変化するときまでの間(以下「アンド回路211開放期間」という)、アンド回路211は周辺選択レジスタ書込信号223をそのまま書込抑止信号224として出力する。言い換えれば、リセット信号により書込抑止回路220のFF209のXQ端子が"1"に設定された後、データバス221のFF209向けの信号に"1"信号が設定されている間は、周辺選択レジスタ書込信号223が発生する度に、周辺選択レジスタ207は書込抑止信号224によりデータバス221の周辺選択レジスタ207向けの信号をラッチする効果がある。一方、前記アンド回路211開放期間以外は、FF209のXQ端子に"0"が設定される結果、アンド回路211の出力信号である書込抑止信号224は論理値"0"の固定信号となり、周辺選択レジスタ207のラッチを抑止する効果がある。   Then, by inputting the reset signal 213 to the R terminal, the XQ terminal of the FF 209 of the write inhibit circuit 220 is set to “1”, and then the signal for the FF 209 of the data bus 221 is set to “0”. As a result of the FF 209 being latched by the peripheral selection register write signal 223, “0” set as the signal for the FF 209 of the data bus 221 until the XQ terminal of the FF 209 changes to “0” (hereinafter “AND”). The AND circuit 211 outputs the peripheral selection register write signal 223 as the write inhibition signal 224 as it is. In other words, after the XQ terminal of the FF 209 of the write inhibit circuit 220 is set to “1” by the reset signal, the peripheral selection register is set while the “1” signal is set as the signal for the FF 209 of the data bus 221. Each time the write signal 223 is generated, the peripheral select register 207 has an effect of latching a signal for the peripheral select register 207 of the data bus 221 by the write inhibit signal 224. On the other hand, during the period other than the AND circuit 211 open period, “0” is set to the XQ terminal of the FF 209. As a result, the write inhibit signal 224, which is the output signal of the AND circuit 211, becomes a fixed signal of logical value “0”. The latch of the selection register 207 is suppressed.

ここで、書込抑止回路220の動作を明確にするため、図11を用いて、以下に説明する。   Here, in order to clarify the operation of the write inhibit circuit 220, it will be described below with reference to FIG.

最初にリセット信号213をR端子に入力することで、FF209をリセットし、FF209のXQ端子を"1"に設定する。次にライトパルス生成部201からの周辺選択レジスタ書込信号223を発生させると、アンド回路211は周辺選択レジスタ書込信号223をそのまま書込抑止信号224として出力し、FF209は書込抑止信号224を受け、データバス221のFF209向けの信号をラッチする。   First, by inputting the reset signal 213 to the R terminal, the FF 209 is reset, and the XQ terminal of the FF 209 is set to “1”. Next, when the peripheral selection register write signal 223 is generated from the write pulse generator 201, the AND circuit 211 outputs the peripheral selection register write signal 223 as it is as the write inhibition signal 224, and the FF 209 outputs the write inhibition signal 224. In response, the signal for the FF 209 of the data bus 221 is latched.

このとき、データバス221のFF209向けのデータ信号を"1"に設定している場合は、FF209のXQ端子は"1"を維持する。従って、アンド回路211は、次の周辺選択レジスタ書込信号223も、書込抑止信号224として通過させる。   At this time, when the data signal for the FF 209 of the data bus 221 is set to “1”, the XQ terminal of the FF 209 maintains “1”. Therefore, the AND circuit 211 also passes the next peripheral selection register write signal 223 as the write inhibit signal 224.

しかし、データバス221のFF209向けのデータ信号を"0"に設定した場合には、FF209のXQ端子は"0"に変化する。その結果、アンド回路211は書込抑止信号224として、固定された"0"信号を出力するので、周辺選択レジスタ207及びFF209への書込みは抑止される。   However, when the data signal for the FF 209 of the data bus 221 is set to “0”, the XQ terminal of the FF 209 changes to “0”. As a result, the AND circuit 211 outputs a fixed “0” signal as the write inhibit signal 224, so that writing to the peripheral selection register 207 and the FF 209 is inhibited.

また、FF209のXQ端子の出力が"0"の状態では、アンド回路211の出力が"0"に維持されるため、FF209をリセット信号213でリセットしない限り、周辺選択レジスタ207及びFF209への書込の抑止状態は維持される。   Further, when the output of the XQ terminal of the FF 209 is “0”, the output of the AND circuit 211 is maintained at “0”. Therefore, unless the FF 209 is reset by the reset signal 213, writing to the peripheral selection register 207 and the FF 209 is performed. The deterrence state is maintained.

なお、前記では、周辺選択レジスタ書込信号223がパルス信号であることを前提としたが、周辺選択レジスタ書込信号223が状態変化信号であっても、書込抑止回路220が、ライトパルス発生部201からの周辺選択レジスタ書込信号223を受けて、パルス信号を発生することとすれば同様な効果を奏する。また、パルス信号の発生のためには、書込抑止回路220中のアンド回路211の直後に、状態変化信号を受けてパルスを発生する回路が含まれることが望ましい。   In the above description, it is assumed that the peripheral selection register write signal 223 is a pulse signal. However, even if the peripheral selection register write signal 223 is a state change signal, the write suppression circuit 220 generates a write pulse. If the peripheral selection register write signal 223 from the unit 201 is received and a pulse signal is generated, the same effect can be obtained. In order to generate a pulse signal, it is desirable to include a circuit that receives a state change signal and generates a pulse immediately after the AND circuit 211 in the write inhibit circuit 220.

従って、動作モード制御回路230は、周辺選択レジスタ207の設定値をセレクタ203への出力とし、入出力制御レジスタ書込信号224で設定した入出力制御レジスタ208の設定値を入出力I/O205への出力とするが、書込抑止回路220が周辺選択レジスタ207への書込信号を抑止した後は、前記の出力は固定されるという効果がある。   Therefore, the operation mode control circuit 230 outputs the setting value of the peripheral selection register 207 to the selector 203 and the setting value of the input / output control register 208 set by the input / output control register write signal 224 to the input / output I / O 205. However, after the write inhibition circuit 220 inhibits the write signal to the peripheral selection register 207, the output is fixed.

その結果、周辺選択レジスタ207の出力が"0"であった場合には、セレクタ203はタイマ202からの出力ではなく、出力データレジスタ204の出力を、入出力制御レジスタ208の設定値に従って設定された動作モードに応じて入出力I/O205より出力されるという効果がある。   As a result, when the output of the peripheral selection register 207 is “0”, the selector 203 sets not the output from the timer 202 but the output of the output data register 204 according to the set value of the input / output control register 208. There is an effect that the data is output from the input / output I / O 205 according to the operation mode.

また、周辺選択レジスタ207の設定値は、アンド回路211の出力が"0"に固定されているため、マイクロコンピュータの暴走や内部ノイズによっても、維持されるので、常にタイマ202からの出力は出力されず、出力データレジスタ213の出力が出力されるという効果がある。   Further, since the output of the AND circuit 211 is fixed to “0” because the set value of the peripheral selection register 207 is maintained even if the microcomputer runs away or internal noise, the output from the timer 202 is always output. The output of the output data register 213 is output.

なお、前記では、入出力I/Oに関する動作モードの設定を例に説明を行ったが、入出力制御レジスタ208を動作モード制御レジスタと、入出力制御レジスタ書込信号222を動作モード制御レジスタ書込信号とすれば、動作モード制御回路230及び書込抑止回路220は、一般的な動作モードを制御することもでき、前記と同様な効果を奏する。   In the above description, the operation mode setting related to input / output I / O has been described as an example. However, the input / output control register 208 is an operation mode control register, and the input / output control register write signal 222 is an operation mode control register. In the case of an embedded signal, the operation mode control circuit 230 and the write inhibit circuit 220 can also control a general operation mode, and have the same effect as described above.

(第6の実施形態)
図12及び図13を用いて、第6の実施形態について説明する。第6の実施形態は、第2の実施形態の動作モード制御回路を、さらに詳細に記載したものである。
(Sixth embodiment)
The sixth embodiment will be described with reference to FIGS. 12 and 13. In the sixth embodiment, the operation mode control circuit of the second embodiment is described in more detail.

まず、図12は書込抑止回路310を含む動作モード制御回路320と、動作モード制御回路320で制御される出力データレジスタ302及び入出力I/O304と、入出力I/O304からの出力信号が出力される端子309を表している。ここで、出力データレジスタ302及び入出力I/O304は、図6の第3の実施形態で対応する出力データレジスタ2及び入出力I/O3と同様な機能を有する。   First, FIG. 12 shows an operation mode control circuit 320 including a write inhibit circuit 310, an output data register 302 and input / output I / O 304 controlled by the operation mode control circuit 320, and output signals from the input / output I / O 304. An output terminal 309 is shown. Here, the output data register 302 and the input / output I / O 304 have the same functions as the corresponding output data register 2 and input / output I / O 3 in the third embodiment of FIG.

一方、図6の第3の実施形態では、書込抑止回路10が、初期化後の一回に限って入出力制御レジスタ4への、入出力I/O3の動作モード設定値の書込を許可するのに対し、図12の第6の実施形態では、書込抑止回路310が、初期化ルーチンにおける実行状態において、所定の初期化ルーチンが実行されている間は、入出力制御レジスタ303への、入出力I/O304の動作モードの設定値の書込を許可する点で相違する。   On the other hand, in the third embodiment of FIG. 6, the write inhibit circuit 10 writes the operation mode setting value of the input / output I / O 3 to the input / output control register 4 only once after initialization. On the other hand, in the sixth embodiment of FIG. 12, the write inhibit circuit 310 is in the execution state in the initialization routine while the predetermined initialization routine is being executed, to the input / output control register 303. This is different in that writing of the setting value of the operation mode of the input / output I / O 304 is permitted.

また、動作モード制御回路320は、ライトパルス生成部301と、前記ライトパルス生成部301からの入出力制御レジスタ書込信号313を受け、そのままバッファとして出力するか、抑止するかを、初期化プログラムの実行状態により決定する書込抑止回路310と、前記入出力制御レジスタ書込信号313のバッファ信号を受け、データバス317からのデータをラッチする入出力制御レジスタ303とから構成されている。   Further, the operation mode control circuit 320 receives the write pulse generation unit 301 and the input / output control register write signal 313 from the write pulse generation unit 301, and outputs an initialization program as to whether to output as a buffer or to suppress it. The write inhibit circuit 310 is determined according to the execution state, and the input / output control register 303 receives the buffer signal of the input / output control register write signal 313 and latches data from the data bus 317.

第6の実施形態に係わる書込抑止回路310は、初期化プログラムの読み取り状態であることを示す初期化ルーチン状態信号311を発生する初期化ルーチン実行表示回路(以下「表示回路」という)305と、初期化プログラムの現在実行中のシーケンスが所定のシーケンス以降であることを示す、初期化ルーチンの所定領域内状態信号(以下「所定内状態信号」という)312を発生する初期化ルーチンにおける実行状態の判定回路(以下「判定回路」という)306と、前記所定内状態信号及び初期化ルーチン状態信号を入力とするアンド回路316と、アンド回路316の出力をラッチするセット/リセットフリップフロップ(以下「SRFF」という)307と、一方の入力端子からは入出力制御レジスタ書込信号を受け入れ、他方の入力端子からは前記SRFF307からの出力信号を受け入れて書込抑止信号を出力するアンド回路308とから構成されている。   The write inhibition circuit 310 according to the sixth embodiment includes an initialization routine execution display circuit (hereinafter referred to as “display circuit”) 305 that generates an initialization routine state signal 311 indicating that the initialization program is being read. An execution state in an initialization routine that generates a state signal in a predetermined region (hereinafter referred to as “predetermined state signal”) 312 of the initialization routine indicating that the sequence currently being executed of the initialization program is after the predetermined sequence Determination circuit (hereinafter referred to as “determination circuit”) 306, an AND circuit 316 that receives the predetermined internal state signal and the initialization routine state signal, and a set / reset flip-flop (hereinafter referred to as “the determination circuit”) that latches the output of the AND circuit 316. SRFF ") 307 and one input terminal accepts the input / output control register write signal, the other From the input terminal and an AND circuit 308 for outputting a write inhibit signal it receives the output signal from the SRFF307.

そして、書込抑止回路310は初期化プログラムの現在実行中のシーケンスが所定のシーケンス以前のものであれば、ライトパルス生成部301から出力された入出力制御レジスタ書込信号313をバッファして通過させ、初期化プログラムの現在実行中のシーケンスが所定のシーケンス以降のものであるときには、前記入出力書込信号の通過を阻止する効果がある。   If the sequence currently being executed of the initialization program is before the predetermined sequence, the write inhibit circuit 310 buffers and passes the input / output control register write signal 313 output from the write pulse generation unit 301. Thus, when the sequence currently being executed of the initialization program is a sequence after a predetermined sequence, there is an effect of blocking the passage of the input / output write signal.

さらに、動作モード制御回路320は、初期化プログラムの所定のシーケンス以降は、ライトパルス生成部301からの入出力制御レジスタ信号を、書込抑止回路310が抑止するので、マイクロコンピュータが暴走しても、入出力制御レジスタ303に設定された動作モードに関する設定値を維持する効果がある。   Further, the operation mode control circuit 320 prevents the input / output control register signal from the write pulse generation unit 301 from being suppressed after the predetermined sequence of the initialization program, so that even if the microcomputer runs out of control. There is an effect of maintaining the set value relating to the operation mode set in the input / output control register 303.

その結果、動作モード制御回路320の設定した動作モードにより、入出力I/O304は出力データレジスタ302に取り込んだデータを、出力するという効果がある。   As a result, there is an effect that the input / output I / O 304 outputs the data fetched into the output data register 302 according to the operation mode set by the operation mode control circuit 320.

ここで、書込抑止回路310の動作を明確化するため、図13を用いて、以下に説明する。   Here, in order to clarify the operation of the write inhibit circuit 310, it will be described below with reference to FIG.

まず、リセット信号318により、SRFF307の出力端子Qの出力を"1"に設定する。ここで、リセット信号とは、動作モード制御回路320及び書込抑止回路310を含むシステム又はマイクロコンピュータの回路をリセットする信号をいう。   First, the output of the output terminal Q of the SRFF 307 is set to “1” by the reset signal 318. Here, the reset signal means a signal for resetting a system or microcomputer circuit including the operation mode control circuit 320 and the write inhibit circuit 310.

次にマイクロコンピュータを初期化する初期化ルーチンを開始すると、表示回路305から論理値が"1"である初期化ルーチン状態信号311が出力される。一方、判定回路306からは、当初には論理値"1"であるが、初期化ルーチンが進み、初期化ルーチンのシーケンスが所定の領域外に出たときに、論理値"0"に変化する所定内状態信号312が出力される。その結果、初期化ルーチン開始後であって、初期化ルーチンの所定領域内であるときには、アンド回路316は"1"を出力するが、所定領域内をすぎると、アンド回路316は"0"を出力する。   Next, when an initialization routine for initializing the microcomputer is started, an initialization routine status signal 311 whose logical value is “1” is output from the display circuit 305. On the other hand, from the determination circuit 306, the logical value is initially “1”, but when the initialization routine proceeds and the sequence of the initialization routine goes out of a predetermined area, the logical value changes to “0”. A predetermined internal state signal 312 is output. As a result, the AND circuit 316 outputs “1” after the initialization routine is started and within the predetermined area of the initialization routine. However, when the predetermined area is exceeded, the AND circuit 316 outputs “0”. Output.

次にSRFF307はアンド回路316の出力が"0"から"1"に変化し、さらに、"1"から"0"へ変化すると、出力端子Qが"1"から"0"へ変化する。   Next, when the output of the AND circuit 316 changes from “0” to “1” and further changes from “1” to “0”, the SRFF 307 changes the output terminal Q from “1” to “0”.

そこで、初期化ルーチン開始後であって、初期化ルーチンの所定領域内であるときに、ライトパルス生成部301から入出力制御レジスタ書込信号313が、出力されると、入出力制御レジスタ書込信号313はアンド回路308でバッファされ、入出力制御レジスタ303へ出力される。   Therefore, when the input / output control register write signal 313 is output from the write pulse generation unit 301 after the initialization routine is started and within the predetermined area of the initialization routine, the input / output control register write is performed. The signal 313 is buffered by the AND circuit 308 and output to the input / output control register 303.

一方、初期化プログラムが実行されていないとき及び初期化ルーチンが所定領域外にあるときには、SRFF307の出力端子は"0"なので、入出力制御レジスタ書込信号313は、アンド回路308で抑止される。   On the other hand, when the initialization program is not executed and when the initialization routine is outside the predetermined area, the output terminal of the SRFF 307 is “0”, so the input / output control register write signal 313 is suppressed by the AND circuit 308. .

図12の動作モード制御回路320及び書込抑止回路310によれば、初期化プログラムであって、所定の初期化ルーチン以前の段階を実行中に、動作モード制御回路320における入出力制御レジスタ303に設定した動作モードは、初期化プログラム以外のソフトウエアによっては制御されない書込抑止回路310により、入出力制御レジスタ303への書込みが抑止されているので、内部ノイズやマイクロコンピュータが暴走したことに原因する意図しないソフトウエアによって、変更されないという効果がある。   According to the operation mode control circuit 320 and the write inhibit circuit 310 of FIG. 12, the initialization program is stored in the input / output control register 303 in the operation mode control circuit 320 during execution of a stage before a predetermined initialization routine. The set operation mode is caused by internal noise or microcomputer runaway because writing to the input / output control register 303 is inhibited by the write inhibiting circuit 310 that is not controlled by software other than the initialization program. It has the effect of not being changed by unintended software.

(第7の実施形態)
図14を用いて、第7の実施形態について説明する。
(Seventh embodiment)
The seventh embodiment will be described with reference to FIG.

第7の実施形態に係るマイクロコンピュータ400は、CPU401(中央処理装置)と、ROM(Read Only Memory)405と、RAM(Random Access Memory)404と、タイマ403と、書込抑止回路402と、アドレス入出力I/O用の入出力制御レジスタ&アドレスレジスタ406と、制御信号I/O用の入出力制御レジスタ&制御信号レジスタ415と、データ入出力I/O用の入出力制御レジスタ&データレジスタ409と、アドレス入出力I/O1(407)と、アドレス入出力I/O2(408)と、データ入出力I/O410と、制御信号I/O411と、セレクタ417と、周辺選択レジスタ416とから構成されており、前記書込抑止回路402は、第1の実施形態〜第4の実施形態に係わる書込抑止回路であり、前記書込抑止回路402と、前記入出力レジスタと、周辺選択レジスタは第3の実施形態にかかわる動作モード制御回路を構成している。そして、CPU(中央処理装置)401は、第1〜第4の実施形態におけるライトパルス生成部として機能する。   A microcomputer 400 according to the seventh embodiment includes a CPU 401 (central processing unit), a ROM (Read Only Memory) 405, a RAM (Random Access Memory) 404, a timer 403, a write inhibit circuit 402, an address Input / output control register & address register 406 for input / output I / O, input / output control register & control signal register 415 for control signal I / O, input / output control register & data register for data input / output I / O 409, address input / output I / O 1 (407), address input / output I / O 2 (408), data input / output I / O 410, control signal I / O 411, selector 417, and peripheral selection register 416 The write inhibit circuit 402 is a write inhibit circuit according to the first to fourth embodiments, and the write inhibit circuit A road 402, and the input and output registers, peripheral selection register constitutes the operation mode control circuit according to the third embodiment. A CPU (central processing unit) 401 functions as a write pulse generation unit in the first to fourth embodiments.

ここで、マイクロコンピュータ400内のタイマ403等の周辺機能と、マイクロコンピュータ外部との入出力に必要な制御信号、データ、アドレスを蓄積するそれぞれのレジスタ等の入出力機能とは、データ又は信号をマイクロコンピュータ外部に出力するにあたり、同一の入出力I/Oを兼用することがある。例えば、図14では、アドレス入出力I/O1(407)の一部をタイマ403の出力とが兼用であることを示している。   Here, the peripheral functions such as the timer 403 in the microcomputer 400 and the input / output functions such as respective registers for storing control signals, data, and addresses necessary for input / output to / from the outside of the microcomputer are data or signals. When outputting to the outside of the microcomputer, the same input / output I / O may be shared. For example, FIG. 14 shows that a part of the address input / output I / O 1 (407) is shared with the output of the timer 403.

この場合にCPU(中央処理装置)401は、どの機能からの出力を入出力I/Oに出力するかを示す設定値を、周辺選択レジスタ書込信号を送るとともに、データバスを通じてデータを送ることにより、周辺選択レジスタ416に設定し、どの入出力I/Oにどのような動作モードをもたせるかを、周辺選択レジスタ416の場合と同様にして、入出力制御レジスタに設定する。そして、周辺選択レジスタ416の設定値に基づいて出力された信号で、セレクタ417は、複数の機能のうちどの機能からの信号を出力するかを選択し、入出力制御レジスタの設定値に基づいて出力された信号で、入出力I/Oは出力動作モードを選択する。   In this case, the CPU (central processing unit) 401 sends a setting value indicating which function is output to the input / output I / O, sends a peripheral selection register write signal, and sends data through the data bus. Thus, in the peripheral selection register 416, which input / output I / O has what operation mode is set in the input / output control register in the same manner as the peripheral selection register 416. The selector 417 selects which function to output a signal from among a plurality of functions based on the signal output based on the setting value of the peripheral selection register 416, and based on the setting value of the input / output control register. With the output signal, the input / output I / O selects the output operation mode.

また、書込抑止回路402は、周辺選択レジスタ416及び各入出力制御レジスタの設定値を、第3の実施形態から第6の実施形態に示した機能により、CPU(中央処理装置)からの信号を受けて、所定の設定方法により設定する以外の方法によっては書き換えられないようにする役割を有する。   Further, the write inhibit circuit 402 sets the values set in the peripheral selection register 416 and each input / output control register to a signal from the CPU (central processing unit) by the functions shown in the third to sixth embodiments. In response to this, it has a role of preventing rewriting by a method other than setting by a predetermined setting method.

従って、第7の実施形態に係わるマイクロコンピュータ400によれば、書込抑止回路402にてウオッチドッグへの監視信号のように、重要な入出力I/Oに係わる出力属性を決定する制御レジスタの設定値を、マイクロコンピュータが暴走しても確保することができるため、マイクロコンピュータが暴走したときの対処が確実に行える、一方、マイクロコンピュータの通常動作時においても、マイクロコンピュータのソフトウエア命令により出力される信号によっては入出力I/Oに係わる出力属性が変化しないので、ソフトウエア命令の間違いがあっても、マイクロコンピュータが暴走しているか否かの判定が確実に行える。従って、第5の実施形態に係わるマイクロコンピュータをシステムに使用した場合に、安全性の高いシステムとすることができるという効果がある。   Therefore, according to the microcomputer 400 according to the seventh embodiment, the control register for determining the output attribute related to the important input / output I / O, such as the monitoring signal to the watchdog, in the write inhibiting circuit 402. Since the set value can be secured even if the microcomputer runs away, the microcomputer can be reliably dealt with when the microcomputer runs away. On the other hand, even during the normal operation of the microcomputer, it is output by the software command of the microcomputer. Depending on the output signal, the output attribute related to the input / output I / O does not change, so even if there is an error in the software instruction, it can be reliably determined whether or not the microcomputer is out of control. Therefore, when the microcomputer according to the fifth embodiment is used in the system, there is an effect that the system can be made highly safe.

(第8の実施形態)
図15を用いて、第8の実施形態について説明する。
(Eighth embodiment)
The eighth embodiment will be described with reference to FIG.

第8の実施形態に係る制御システム500は、タイマ502等の周辺機能回路と、監視信号に係る出力データレジスタ503と、前記タイマ502等の周辺機能回路からの出力又は前記出力データレジスタ503からの出力のどちらかを選択するセレクタ507と、前記セレクタ507からの出力を出力するI/Oバッファ508と、監視信号を出力する監視信号出力ポート511と、前記セレクタ507を制御する周辺選択レジスタ504と、前記I/Oバッファ508の入出力モードを制御する入出力制御レジスタ505と、前記周辺選択レジスタ504又は入出力制御レジスタ505へのデータ書込を抑止する書込抑止回路506と、CPU510(中央処理装置)と、RAM516と、ROM517と、リセット回路509と、マイクロコンピュータ全体をリセットするリセット信号を受け入れるリセット信号受入ポート512とから構成されるマイクロコンピュータ501及び前記マイクロコンピュータ501からの監視信号514を受信し、信号が途絶えたときに、リセット信号515を発生するウオッチドッグ513を少なくとも有している。ここで、前記の書込抑止回路506は第1〜4の実施形態の書込抑止回路であり、書込抑止回路506と、入出力制御レジスタ505と、周辺選択レジスタ504とは、第5の実施形態に示す動作モード制御回路を構成している。   The control system 500 according to the eighth embodiment includes a peripheral function circuit such as a timer 502, an output data register 503 related to a monitoring signal, an output from the peripheral function circuit such as the timer 502, or an output from the output data register 503. A selector 507 for selecting one of the outputs, an I / O buffer 508 for outputting the output from the selector 507, a monitoring signal output port 511 for outputting a monitoring signal, and a peripheral selection register 504 for controlling the selector 507 , An input / output control register 505 for controlling the input / output mode of the I / O buffer 508, a write inhibition circuit 506 for inhibiting data writing to the peripheral selection register 504 or the input / output control register 505, and a CPU 510 (central Processing device), RAM 516, ROM 517, reset circuit 509, my A microcomputer 501 comprising a reset signal receiving port 512 for receiving a reset signal for resetting the entire computer and a monitor signal 514 from the microcomputer 501 are received, and a reset signal 515 is generated when the signal is interrupted. At least a watch dog 513 is included. Here, the write inhibit circuit 506 is the write inhibit circuit of the first to fourth embodiments. The write inhibit circuit 506, the input / output control register 505, and the peripheral selection register 504 are the same as those in the fifth embodiment. The operation mode control circuit shown in the embodiment is configured.

第8の実施形態に係わる制御システム500によれば、前記制御システム500を組み込んだ装置を、制御システム500がコントロールしている最中に、何らかの原因で、制御システム500が有するマイクロコンピュータ501が暴走したとき、監視信号出力ポート511から監視信号の出力が途切れる結果、ウオッチドッグ513が前記の信号の途切れを検出し、ウオッチドッグ513がマイクロコンピュータ501向けにリセット信号515を発生し、マイクロコンピュータ501がリセットされるので、自動的に暴走状態から復帰することができる。一方、前記制御システム500の通常動作時においても、前記制御システム内のマイクロコンピュータ501のソフトウエア命令により出力される信号によっては、マイクロコンピュータ501のI/Oバッファ508に係わる出力属性は変化せず、また、ウオッチドッグとの監視信号出力ポートがソフトウエア命令の間違いがあっても、監視信号を出力するための出力データレジスタ503からの出力がタイマ502の出力に切り換えられることがないので、マイクロコンピュータ501が暴走しているか否かの判定が確実に行える。従って、第8の実施形態に係わる制御システム500を使用した装置を、安全性の高い装置とすることができるという効果がある。   According to the control system 500 according to the eighth embodiment, the microcomputer 501 included in the control system 500 runs out of control for some reason while the control system 500 controls the apparatus incorporating the control system 500. When the monitoring signal output port 511 interrupts the monitoring signal output port 511, the watch dog 513 detects the interruption of the signal, the watch dog 513 generates a reset signal 515 for the microcomputer 501, and the microcomputer 501 Because it is reset, it can automatically recover from the runaway state. On the other hand, even during the normal operation of the control system 500, the output attribute related to the I / O buffer 508 of the microcomputer 501 does not change depending on the signal output by the software instruction of the microcomputer 501 in the control system. In addition, even if the monitoring signal output port with the watchdog has an error in the software instruction, the output from the output data register 503 for outputting the monitoring signal is not switched to the output of the timer 502. It can be reliably determined whether or not the computer 501 is running away. Therefore, there is an effect that the apparatus using the control system 500 according to the eighth embodiment can be a highly safe apparatus.

(付記1)
外部からのリセット信号によりリセットされ、制御プログラムにより処理を行うマイクロコンピュータであって、
複数の動作モードを有する入出力回路と、
制御信号発生部と、
制御回路と、
抑止回路とを備え、
前記制御信号発生部は、前記制御プログラム中の動作モード設定ルーチンにより、書込み信号を発生し、
前記制御回路は、前記書込信号に応じて、前記入出力回路の動作モードを設定し、
前記抑止回路は、前記制御回路が前記動作モードを設定した後は、前記外部からのリセット信号によりリセットされるまで、前記入出力回路の動作モードを再設定することを抑止し、
前記入出力回路は前記制御回路が設定する動作モードにより、前記マイクロコンピュータの外部との信号を入出力することを特徴とするマイクロコンピュータ。
付記1の係るマイクロコンピュータによれば、前記制御回路が設定する動作モードを、前記制御信号発生部が、前記制御プログラムに基づいて設定可能である。しかし、その後は、リセット信号により、リセットされるまで、抑止回路の作用により、前記制御信号発生部からの書込信号、或いは、内部ノイズにより発生した書込信号により、動作モードを再設定できない効果がある。その結果、前記入出力回路の動作モードは維持されるので、前記入出力回路がウオッチドックタイマへの監視信号を出力するものであった場合に、マイクロコンピュータの状態、例えば、正常、暴走等の状態を、そのまま反映した監視信号を出力できる効果がある。
(付記2)
制御信号発生部と
初期化後において前記制御信号発生部からの最初の第1の出力信号からに限って、前記第1の出力信号のバッファ信号を発生する書込抑止回路と
前記書込抑止回路からの前記バッファ信号に応答して、前記制御信号発生部からの第2の出力信号を保持する制御回路とを備え、
前記制御回路は、保持された前記第2の出力信号に基づいて外部との信号の入出力制御回路の動作モードを設定することを特徴とする動作モード制御回路。
付記2に係る動作モード制御回路によれば、前記制御回路に保持された信号は、書込抑止回路の作用でマイクロコンピュータの自身によっては書換えができないので、マイクロコンピュータの状態(例えば、暴走状態であっても)いかんによらず、外部との信号の入出力を制御する回路の動作モードは維持される効果がある。
(付記3)
付記2に記載した動作モード制御回路であって、
前記第1の出力信号はパルス信号であることを特徴とする動作モード制御回路。
(付記4)
付記2に記載した動作モード制御回路であって、
前記書込抑止回路が、
前記制御信号発生部からの前記第1の出力信号に応答して、前記第1の出力信号のバッファ信号又は固定論理信号を出力するバッファ手段と、
前記制御信号発生部からの前記第1の出力信号により保持し、保持状態を示す状態信号を出力する保持手段とを備え、
前記バッファ手段が、さらに、前記保持手段からの前記状態信号を受ける入力端子を有し、前記状態信号が前記保持状態であることを示した場合は、前記固定論値信号を出力し、前記保持状態を示していない場合は、前記バッファ信号を出力することを特徴とする動作モード制御回路。
付記4に係る動作モード制御回路も、付記2に係る動作モード制御回路と同様な効果を奏する。
(付記5)
付記2に記載した動作モード制御回路であって、
前記書込抑止回路が、
前記制御信号発生部からの前記第1の出力信号を入力の一方に受けるアンド回路と、
前記アンド回路の出力が保持端子に接続され、パルス信号が前記保持端子に入力されると論理値"1"の信号を出力するフリップフロップ回路と、
前記フリップフロップ回路からの信号に応答して、論理値を反転させた信号を前記アンド回路の他方の入力へ、出力するバッファ回路とを備え、
前記アンド回路は前記制御信号発生部からの前記第1の出力信号と前記論理値を反転させた信号と論理積をとることを特徴とする動作モード制御回路。
(付記6)
少なくとも、付記2から付記5のいずれかに記載した動作モード制御回路と、
外部との信号の入出力を制御する前記入出力制御回路と、
前記動作モード制御回路からのデータ信号を、前記動作モード制御回路からのデータレジスタ書込信号により、保持するデータレジスタ回路とを備え、
前記データレジスタ回路は、前記データ信号に応じた信号を、前記入出力制御回路へ出力することを特徴とするマイクロコンピュータ。
付記6に係るマイクロコンピュータには、前記制御回路に保持された、入出力制御回路の動作モードを設定する信号は、書込抑止回路の作用でマイクロコンピュータの自身によっては書換えができないので、マイクロコンピュータの状態(例えば、暴走状態であっても)いかんによらず、外部との信号の入出力を制御する回路の動作モードは維持される効果がある。
(付記7)
制御信号発生部と、
前記制御信号発生部からの第1のデコード信号及び第2のデコード信号を連続して受けたときに限って、前記制御信号発生部からの第1の出力信号をバッファしたバッファ信号を発生する書込抑止回路と、
前記書込抑止回路からの前記バッファ信号に応答して、前記制御信号発生部からの第2の信号を保持する制御回路とを備え、
前記制御回路は、保持された前記第2の出力信号に基づいて外部との信号の入出力制御回路の動作モードを設定することを特徴とする動作モード制御回路。
付記7に係る動作モード制御回路によれば、前記制御回路に保持された信号は、書込抑止回路への指定されたコードによる、連続デコードの確率は低いため、書込抑止回路の作用でマイクロコンピュータの自身によっては書換えの可能性が低くなる結果、マイクロコンピュータの状態(例えば、暴走状態であっても)いかんによらず、外部との信号の入出力を制御する回路の動作モードは維持される効果がある。
(付記8)
付記7に記載した動作モード制御回路であって、
前記第1の出力信号はパルス信号であることを特徴とする動作モード制御回路。
(付記9)
制御信号発生部と、
前記制御信号発生部から所定の複数のデコード信号を連続して受けたときに限って、前記制御信号発生部からの第1の出力信号をバッファしたバッファ信号を発生する書込抑止回路と、
前記書込抑止回路からの前記バッファ信号に応答して、前記制御信号発生部からの第2の信号を保持する制御回路とを備え、
前記制御回路は、保持された前記第2の出力信号に基づいて外部との信号の入出力制御回路の動作モードを設定することを特徴とする動作モード制御回路。
(付記10)
付記7に記載した動作モード制御回路であって、
前記書込抑止回路が、
前記制御信号発生部からの前記第1のデコード信号及び、前記第2のデコード信号に応じて、第1の選択状態信号及び、第2の選択状態信号を出力するデコーダ回路と、
前記第1の選択状態信号を一方の入力端子に受ける第1のアンド回路と、
前記第2の選択状態信号を一方の入力端子に受ける第2のアンド回路と、
第3のアンド回路と、
前記制御信号発生部からの前記第1の出力信号に応答して、前記第1のアンド回路の出力信号を保持し、前記第2のアンド回路の他方の入力端子へ、第1のデータを出力する第1のフリップフロップ回路と、
前記制御信号発生部からの前記第1の出力信号に応答して、前記第2のアンド回路の出力信号を保持し、前記第3のアンド回路の一方の入力端子へ、第2のデータを出力する第2フリップフロップ回路と、
前記第2のデータを論理的に反転した第3の出力信号を、第1のアンド回路の他方の入力へ、出力するバッファ回路とを備え、
前記第1のアンド回路は前記第1の選択状態信号と前記第3の出力信号と論理積し、
前記第2のアンド回路は前記第2の選択状態信号と前記第1のデータと論理積し、
前記第3のアンド回路は前記第2のデータと前記第1の出力信号と論理積し、
前記制御回路は、前記第3のアンド回路からの出力信号に応答して、前記制御信号発生部からの前記第2の出力信号を保持する第3のフリップフロップ回路を備えたことを特徴とする動作モード制御回路。
なお、付記10も付記7と同様な効果を奏する。
(付記11)
少なくとも、付記7から付記10のずれかに記載した動作モード制御回路と、
外部との信号の入出力を制御する前記入出力制御回路と、
前記動作モード制御回路からのデータ信号を、前記動作モード制御回路からのデータレジスタ書込信号により、保持するデータレジスタ回路とを備え、
前記データレジスタ回路は、前記データ信号に応じた信号を、前記入出力制御回路へ出力することを特徴とするマイクロコンピュータ。
付記11に係るマイクロコンピュータには、前記制御回路に保持された、入出力制御回路の動作モードを設定する信号は、書込抑止回路の作用でマイクロコンピュータの自身によっては書換えができないので、マイクロコンピュータの状態(例えば、暴走状態であっても)いかんによらず、外部との信号の入出力を制御する回路の動作モードは維持される効果がある。
(付記12)
少なくとも、制御信号発生部と、
前記制御信号発生部からの第1の出力信号に応答して、前記制御信号発生部からの第2の出力信号を保持し、保持した信号の論理値に応じた書込信号を発生する書込抑止回路と
前記書込信号に応答して、前記制御信号発生部からの第3の出力信号を保持し、保持した信号の論理値に応じた制御信号を発生する制御回路とを備え、
前記制御信号発生部からの前記第2の出力信号の論理値に応じた前記書込信号は、一方は論理値が固定した信号であり、他方は前記制御信号発生部からの前記第1の出力信号のバッファ信号であって、
前記制御信号は、少なくともデータレジスタ回路を含む複数の信号発生回路の中から、外部へ信号を伝える信号発生回路を選択する選択回路へ、供給されることを特徴とする動作モード制御回路。
付記12に係る動作モード制御回路によれば、マイクロコンピュータ内部で、一つの入出力制御回路に、選択回路を通じて、接続される周辺回路が複数ある場合に、書込抑止回路の作用により、所定の状態に選択回路への選択信号を設定した後は、コンピュータ自身では、その設定を書換えできない為、マイクロコンピュータの状態(例えば、暴走状態であっても)いかんによらず、前記選択回路の設定は維持される効果がある。
(付記13)
少なくとも、制御信号発生部と、
前記制御信号発生部からの第1の出力信号に応答して、前記制御信号発生部からの第2の出力信号を保持し、保持した信号の論理値に応じた書込信号を発生する書込抑止回路と
前記書込信号に応答して、前記制御信号発生部からの第3の出力信号を保持し、保持した信号の論理値に応じた第1の制御信号を発生する第1の制御回路と、
前記制御信号発生部からの第4の出力信号に応答して、前記制御信号発生部からの第5の出力信号を保持し、保持した信号の論理値に応じた第2の制御信号を発生する第2の制御回路と、
前記第1の制御信号と前記第2の制御信号の論理和をとり、その結果である動作モード設定信号を出力するオア回路を備え、
前記制御信号発生部からの前記第2の出力信号の論理値に応じた前記書込信号は、一方は論理値が固定した信号であり、他方は前記制御信号発生部からの前記第1の出力信号のバッファ信号であって、
前記第1の制御信号は、少なくともデータレジスタ回路を含む複数の信号発生回路の中から、外部へ信号を伝える信号発生回路を選択する選択回路へ供給され、
前記動作モード設定信号は、外部との入出力信号の制御をする回路へ、該回路の動作モードを設定するために供給されることを特徴とする動作モード制御回路。
(付記14)
付記12に記載した動作モード制御回路であって、
前記書込抑止回路が、
前記制御信号発生部からの前記第1の出力信号に応答して、前記第1の出力信号のバッファ信号又は固定した信号を出力するバッファ手段と、
前記バッファ信号に応答して、前記制御信号発生部からの前記第2の出力信号を保持し、前記第2の出力信号の論理値に応じた論理信号を出力する保持手段とを備え、
前記バッファ手段は前記保持手段からの論理信号を受け取り、一方の論理値に応じて前記固定した信号を出力し、他方の論理値に応じて前記バッファ信号を出力することを特徴とする動作モード制御回路。
なお、付記14に係る動作モード制御回路も付記12に係る動作モード制御回路と同様な効果を奏する。
(付記15)
付記12に記載した動作モード制御回路であって、
前記書込抑止回路が、
前記制御信号発生部からの前記第1の出力信号を一方の入力端子で受けるアンド回路と、
前記制御信号発生部からの前記第2の出力信号を論理的に反転したバッファ信号を出力するバッファ回路と、
前記バッファ信号をデータ端子で受け、前記アンド回路の出力に応答して、前記バッファ信号を保持し、前記バッファ信号の論理値に応じた論理信号を発生する保持回路とを備え、
前記アンド回路は前記論理信号と前記第1の出力信号と論理積することを特徴とする動作モード制御回路。
(付記16)
少なくとも、付記12乃至付記15に記載した動作モード制御回路と、
外部との信号の入出力を制御する入出力制御回路と、
前記動作モード制御回路からのデータレジスタ書込信号に応答して、前記動作モード制御回路からのデータ信号を保持するデータレジスタ回路と、
1つ以上の一定周期のクロックを発生可能なタイマ回路と、
前記動作モード制御回路からの前記第1の制御信号に応じて、前記データレジスタ回路又は前記タイマ回路を選択する選択回路とを備え、
前記データレジスタ回路は、前記データ信号に応じた信号を、前記入出力制御回路へ出力することを特徴とするマイクロコンピュータ。
付記16に係るマイクロコンピュータには、マイクロコンピュータ内部に入出力信号を制御するデータレジスタ回路とタイマ回路があった場合に、それらの回路を選択するために、動作モード制御回路から選択回路へ供給される設定値が、書込抑止回路の作用により、マイクロコンピュータ自身では書換えができないという効果がある。従って、マイクロコンピュータの状態(例えば、暴走状態であっても)いかんによらず、常にデータレジスタ回路の出力が入出力制御回路に接続されるという効果がある。
(付記17)
制御信号発生部と、
初期化プログラム実行後において、所定の初期化ルーチン以前の段階を実行中であるときは、前記制御信号発生部からの第1の出力信号をバッファしたバッファ信号を出力し、それ以外の時は、固定した信号を出力する書込抑止回路と、
前記書込抑止回路からの出力信号に応答して、前記制御信号発生部からの第2の出力信号を保持する制御回路とを備え、
前記制御回路は、保持された前記第2の出力信号に応じて、外部との信号の入出力制御回路の動作モードを設定することを特徴とする動作モード制御回路。
付記17に係る動作モード制御回路によれば、初期化ルーチン中に前記制御回路に保持された信号は、書込抑止回路の作用でマイクロコンピュータの自身によっては書換えができないので、マイクロコンピュータの状態(例えば、暴走状態であっても)いかんによらず、外部との信号の入出力を制御する回路の動作モードは維持される効果がある。
(付記18)
付記17に記載した動作モード制御回路であって、
前記制御信号発生部からの前記第1の出力信号はパルス信号であることを特徴とする動作モード制御回路。
(付記19)
付記17に記載した動作モード制御回路であって、
前記書込抑止回路が、
初期化プログラムを実行中であることを示す第1の状態信号を発生する第1の状態信号発生回路と、
所定の初期化ルーチン以前の段階を実行中であることを示す第2の状態信号を発生する第2の状態信号発生回路と、
前記第1の状態信号と前記第2の状態信号と論理積する第1のアンド回路と、
リセット状態では論理値"1"を出力し、前記第1のアンド回路からの出力を受け、前記第1のアンド回路からの出力が所定の信号であったときは、論理値"0"を出力するセット/リセットフリップフリップ回路と、
前記制御信号発生部からの前記第1の信号と前記セット/リセットフリップフリップ回路の出力信号と論理積する第2のアンド回路とを備えることを特徴とする動作モード制御回路。
(付記20)
少なくとも、付記17から付記19のいずれかに記載した動作モード制御回路と、
外部との信号の入出力を制御する前記入出力制御回路と、
前記動作モード制御回路からのデータ信号を、前記動作モード制御回路からのデータレジスタ書込信号により、保持するデータレジスタ回路とを備え、
前記データレジスタ回路は、前記データ信号に応じた信号を、前記入出力制御回路へ出力することを特徴とするマイクロコンピュータ。
付記20に係るマイクロコンピュータには、前記制御回路に保持された、入出力制御回路の動作モードを設定する信号は、書込抑止回路の作用でマイクロコンピュータの自身によっては書換えができないので、マイクロコンピュータの状態(例えば、暴走状態であっても)いかんによらず、外部との信号の入出力を制御する回路の動作モードは維持される効果がある。
(付記21)
少なくとも、ウオッチドッグと
付記6、付記11、付記16又は付記20に記載したマイクロコンピュータとを備え、
前記マイクロコンピュータはさらに、監視信号を前記ウオッチドッグへ出力する監視信号出力ポートと
前記ウオッチドッグからの第1のリセット信号を受け入れるリセット信号受入ポートと
前記第1のリセット信号に応じて、前記マイクロコンピュータの所定の回路への、第2のリセット信号を発生するリセット回路を有し、
前記入出力制御回路からの出力が前記ウオッチドッグへの前記監視信号であって、
前記ウオッチドッグは前記第1のリセット信号を前記マイクロコンピュータに出力することを特徴とする制御システム。
付記21に記載した制御システムによれば、マイクロコンピュータからウオッチドッグへ出力される監視信号が、常にマイクロコンピュータ本体の動作に起因して発生されるので、監視信号の発生の途絶え又は継続は、常にマイクロコンピュータ本体の状態を反映したものとなる効果がある。従って、マイクロコンピュータのウオッチドッグによる監視が適正に行われ、マイクロコンピュータの暴走が確実に防止され、制御システム全体の誤動作が防止されるという効果がある。また、マイクロコンピュータは正常である場合に、マイクロコンピュータの内部ノイズ(外部から誘起された場合も含む)により、監視信号がウオッチドックへ出力されないということがない。
(Appendix 1)
A microcomputer that is reset by an external reset signal and performs processing by a control program,
An input / output circuit having a plurality of operation modes;
A control signal generator;
A control circuit;
With a deterrent circuit,
The control signal generation unit generates a write signal by an operation mode setting routine in the control program,
The control circuit sets an operation mode of the input / output circuit according to the write signal,
The inhibition circuit inhibits resetting the operation mode of the input / output circuit until it is reset by the external reset signal after the control circuit sets the operation mode,
The microcomputer according to claim 1, wherein the input / output circuit inputs / outputs a signal to / from the outside of the microcomputer according to an operation mode set by the control circuit.
According to the microcomputer according to appendix 1, the operation mode set by the control circuit can be set by the control signal generation unit based on the control program. However, after that, until the reset signal is reset, the operation mode cannot be reset by the write signal from the control signal generator or the write signal generated by the internal noise due to the action of the suppression circuit. There is. As a result, since the operation mode of the input / output circuit is maintained, when the input / output circuit outputs a monitoring signal to the watchdog timer, the microcomputer status, for example, normal, runaway, etc. There is an effect of outputting a monitoring signal reflecting the state as it is.
(Appendix 2)
A write inhibit circuit for generating a buffer signal for the first output signal only from the first first output signal from the control signal generator after initialization, and the write inhibit circuit; A control circuit for holding a second output signal from the control signal generator in response to the buffer signal from
The control circuit sets an operation mode of an external signal input / output control circuit based on the held second output signal.
According to the operation mode control circuit according to appendix 2, the signal held in the control circuit cannot be rewritten by the microcomputer itself due to the action of the write inhibit circuit, so that the microcomputer state (for example, in the runaway state) Regardless of this, the operation mode of the circuit that controls input / output of signals to / from the outside is effectively maintained.
(Appendix 3)
An operation mode control circuit described in appendix 2,
The operation mode control circuit according to claim 1, wherein the first output signal is a pulse signal.
(Appendix 4)
An operation mode control circuit described in appendix 2,
The write inhibit circuit is
Buffer means for outputting a buffer signal of the first output signal or a fixed logic signal in response to the first output signal from the control signal generator;
Holding means for holding by the first output signal from the control signal generator and outputting a status signal indicating a holding state;
The buffer means further has an input terminal for receiving the state signal from the holding means, and outputs the fixed logic value signal when the state signal indicates the holding state, and holds the holding signal. An operation mode control circuit that outputs the buffer signal when a state is not indicated.
The operation mode control circuit according to appendix 4 also has the same effect as the operation mode control circuit according to appendix 2.
(Appendix 5)
An operation mode control circuit described in appendix 2,
The write inhibit circuit is
An AND circuit that receives the first output signal from the control signal generator at one of the inputs;
A flip-flop circuit that outputs a signal of a logical value “1” when an output of the AND circuit is connected to a holding terminal and a pulse signal is input to the holding terminal;
In response to a signal from the flip-flop circuit, a buffer circuit that outputs a signal obtained by inverting a logical value to the other input of the AND circuit,
The AND circuit takes an AND of the first output signal from the control signal generator and a signal obtained by inverting the logic value.
(Appendix 6)
At least the operation mode control circuit described in any one of appendix 2 to appendix 5,
The input / output control circuit for controlling input / output of signals with the outside;
A data register circuit for holding a data signal from the operation mode control circuit by a data register write signal from the operation mode control circuit;
The microcomputer according to claim 1, wherein the data register circuit outputs a signal corresponding to the data signal to the input / output control circuit.
In the microcomputer according to appendix 6, since the signal for setting the operation mode of the input / output control circuit held in the control circuit cannot be rewritten by the microcomputer itself by the action of the write inhibit circuit. The operation mode of the circuit that controls the input / output of signals to / from the outside is maintained regardless of the state (for example, even in a runaway state).
(Appendix 7)
A control signal generator;
A document that generates a buffer signal obtained by buffering the first output signal from the control signal generator only when the first decode signal and the second decode signal from the control signal generator are successively received. A deterrence circuit,
A control circuit for holding a second signal from the control signal generator in response to the buffer signal from the write inhibit circuit;
The control circuit sets an operation mode of an external signal input / output control circuit based on the held second output signal.
According to the operation mode control circuit according to appendix 7, the signal held in the control circuit has a low probability of continuous decoding by the code designated to the write inhibit circuit. As a result of the possibility of rewriting depending on the computer itself, the operation mode of the circuit that controls the input / output of signals to / from the outside is maintained regardless of the state of the microcomputer (for example, even in a runaway state). There is an effect.
(Appendix 8)
An operation mode control circuit according to appendix 7,
The operation mode control circuit according to claim 1, wherein the first output signal is a pulse signal.
(Appendix 9)
A control signal generator;
A write inhibit circuit that generates a buffer signal obtained by buffering the first output signal from the control signal generator only when a predetermined plurality of decode signals are continuously received from the control signal generator;
A control circuit for holding a second signal from the control signal generator in response to the buffer signal from the write inhibit circuit;
The control circuit sets an operation mode of an external signal input / output control circuit based on the held second output signal.
(Appendix 10)
An operation mode control circuit according to appendix 7,
The write inhibit circuit is
A decoder circuit for outputting a first selection state signal and a second selection state signal in response to the first decode signal and the second decode signal from the control signal generator;
A first AND circuit that receives the first selection state signal at one input terminal;
A second AND circuit receiving the second selection state signal at one input terminal;
A third AND circuit;
In response to the first output signal from the control signal generator, the output signal of the first AND circuit is held, and the first data is output to the other input terminal of the second AND circuit. A first flip-flop circuit that
In response to the first output signal from the control signal generator, the output signal of the second AND circuit is held, and the second data is output to one input terminal of the third AND circuit. A second flip-flop circuit that
A buffer circuit that outputs a third output signal obtained by logically inverting the second data to the other input of the first AND circuit;
The first AND circuit ANDs the first selection state signal and the third output signal,
The second AND circuit ANDs the second selection state signal and the first data,
The third AND circuit ANDs the second data and the first output signal,
The control circuit includes a third flip-flop circuit that holds the second output signal from the control signal generator in response to an output signal from the third AND circuit. Operation mode control circuit.
Note that Supplementary Note 10 has the same effect as Supplementary Note 7.
(Appendix 11)
At least the operation mode control circuit described in any one of appendix 7 to appendix 10;
The input / output control circuit for controlling input / output of signals with the outside;
A data register circuit for holding a data signal from the operation mode control circuit by a data register write signal from the operation mode control circuit;
The microcomputer according to claim 1, wherein the data register circuit outputs a signal corresponding to the data signal to the input / output control circuit.
In the microcomputer according to appendix 11, the signal that sets the operation mode of the input / output control circuit held in the control circuit cannot be rewritten by the microcomputer itself by the action of the write inhibit circuit. The operation mode of the circuit that controls the input / output of signals to / from the outside is maintained regardless of the state (for example, even in a runaway state).
(Appendix 12)
At least a control signal generator;
In response to the first output signal from the control signal generator, the second output signal from the control signal generator is held and a write signal is generated according to the logical value of the held signal A control circuit for holding a third output signal from the control signal generator in response to the write signal and generating a control signal according to the logical value of the held signal in response to the write signal;
One of the write signals corresponding to the logic value of the second output signal from the control signal generator is a signal whose logic value is fixed, and the other is the first output from the control signal generator. A buffer signal of the signal,
The operation mode control circuit, wherein the control signal is supplied to a selection circuit that selects a signal generation circuit that transmits a signal to the outside from a plurality of signal generation circuits including at least a data register circuit.
According to the operation mode control circuit of Supplementary Note 12, when there are a plurality of peripheral circuits connected to one input / output control circuit through a selection circuit in the microcomputer, the operation of the write inhibit circuit causes a predetermined After setting the selection signal to the selection circuit in the state, since the setting cannot be rewritten by the computer itself, the setting of the selection circuit is not limited regardless of the state of the microcomputer (for example, even in a runaway state). The effect is maintained.
(Appendix 13)
At least a control signal generator;
In response to the first output signal from the control signal generator, the second output signal from the control signal generator is held and a write signal is generated according to the logical value of the held signal A first control circuit for holding a third output signal from the control signal generator and generating a first control signal corresponding to the logical value of the held signal in response to the write signal; When,
In response to the fourth output signal from the control signal generation unit, the fifth output signal from the control signal generation unit is held, and a second control signal corresponding to the logical value of the held signal is generated. A second control circuit;
An OR circuit that takes a logical sum of the first control signal and the second control signal and outputs an operation mode setting signal as a result;
One of the write signals corresponding to the logic value of the second output signal from the control signal generator is a signal whose logic value is fixed, and the other is the first output from the control signal generator. A buffer signal of the signal,
The first control signal is supplied to a selection circuit that selects a signal generation circuit for transmitting a signal to the outside from a plurality of signal generation circuits including at least a data register circuit.
The operation mode control circuit is characterized in that the operation mode setting signal is supplied to a circuit for controlling an input / output signal to / from the outside in order to set an operation mode of the circuit.
(Appendix 14)
An operation mode control circuit described in appendix 12,
The write inhibit circuit is
Buffer means for outputting a buffer signal of the first output signal or a fixed signal in response to the first output signal from the control signal generator;
Holding means for holding the second output signal from the control signal generator in response to the buffer signal and outputting a logic signal corresponding to the logic value of the second output signal;
The buffer means receives a logic signal from the holding means, outputs the fixed signal according to one logic value, and outputs the buffer signal according to the other logic value. circuit.
The operation mode control circuit according to Supplementary Note 14 has the same effect as the operation mode control circuit according to Supplementary Note 12.
(Appendix 15)
An operation mode control circuit described in appendix 12,
The write inhibit circuit is
An AND circuit that receives the first output signal from the control signal generator at one input terminal;
A buffer circuit that outputs a buffer signal obtained by logically inverting the second output signal from the control signal generator;
A buffer circuit that receives the buffer signal at a data terminal, holds the buffer signal in response to an output of the AND circuit, and generates a logic signal corresponding to a logic value of the buffer signal;
The AND circuit performs an AND operation on the logic signal and the first output signal.
(Appendix 16)
At least the operation mode control circuit described in appendix 12 to appendix 15,
An input / output control circuit for controlling input / output of signals with the outside;
A data register circuit that holds a data signal from the operation mode control circuit in response to a data register write signal from the operation mode control circuit;
A timer circuit capable of generating one or more periodic clocks;
A selection circuit that selects the data register circuit or the timer circuit in response to the first control signal from the operation mode control circuit;
The microcomputer according to claim 1, wherein the data register circuit outputs a signal corresponding to the data signal to the input / output control circuit.
When the microcomputer according to appendix 16 includes a data register circuit and a timer circuit for controlling input / output signals in the microcomputer, the operation mode control circuit supplies the selection circuit with the data register circuit and timer circuit. The set value can be rewritten by the microcomputer itself by the action of the write inhibit circuit. Therefore, there is an effect that the output of the data register circuit is always connected to the input / output control circuit regardless of the state of the microcomputer (for example, even in a runaway state).
(Appendix 17)
A control signal generator;
After executing the initialization program, when a stage before a predetermined initialization routine is being executed, a buffer signal obtained by buffering the first output signal from the control signal generator is output, and otherwise, A write inhibit circuit for outputting a fixed signal;
A control circuit for holding a second output signal from the control signal generator in response to an output signal from the write inhibit circuit;
The control circuit sets an operation mode of an external input / output control circuit in accordance with the held second output signal.
According to the operation mode control circuit of Supplementary Note 17, since the signal held in the control circuit during the initialization routine cannot be rewritten by the microcomputer itself by the action of the write inhibit circuit, the microcomputer state ( For example, the operation mode of the circuit that controls the input / output of signals to / from the outside is maintained regardless of whether it is in a runaway state.
(Appendix 18)
An operation mode control circuit described in appendix 17,
The operation mode control circuit according to claim 1, wherein the first output signal from the control signal generator is a pulse signal.
(Appendix 19)
An operation mode control circuit described in appendix 17,
The write inhibit circuit is
A first state signal generating circuit for generating a first state signal indicating that the initialization program is being executed;
A second state signal generating circuit for generating a second state signal indicating that a stage before a predetermined initialization routine is being executed;
A first AND circuit that ANDs the first state signal and the second state signal;
In the reset state, the logic value “1” is output, the output from the first AND circuit is received, and the logic value “0” is output when the output from the first AND circuit is a predetermined signal. A set / reset flip flip circuit,
An operation mode control circuit comprising: a second AND circuit that performs an AND operation on the first signal from the control signal generator and an output signal of the set / reset flip-flip circuit.
(Appendix 20)
At least the operation mode control circuit described in any one of appendix 17 to appendix 19,
The input / output control circuit for controlling input / output of signals with the outside;
A data register circuit for holding a data signal from the operation mode control circuit by a data register write signal from the operation mode control circuit;
The microcomputer according to claim 1, wherein the data register circuit outputs a signal corresponding to the data signal to the input / output control circuit.
In the microcomputer according to appendix 20, since the signal for setting the operation mode of the input / output control circuit held in the control circuit cannot be rewritten by the microcomputer itself by the action of the write inhibit circuit, the microcomputer The operation mode of the circuit that controls the input / output of signals to / from the outside is maintained regardless of the state (for example, even in a runaway state).
(Appendix 21)
And at least a watchdog and the microcomputer described in Appendix 6, Appendix 11, Appendix 16 or Appendix 20,
The microcomputer further includes a monitoring signal output port for outputting a monitoring signal to the watchdog, a reset signal receiving port for receiving a first reset signal from the watchdog, and the microcomputer according to the first reset signal. A reset circuit for generating a second reset signal to the predetermined circuit of
The output from the input / output control circuit is the monitoring signal to the watchdog,
The control system, wherein the watch dog outputs the first reset signal to the microcomputer.
According to the control system described in appendix 21, since the monitoring signal output from the microcomputer to the watchdog is always generated due to the operation of the microcomputer main body, the interruption or continuation of the generation of the monitoring signal is always performed. There is an effect that reflects the state of the microcomputer body. Therefore, there is an effect that monitoring by the watchdog of the microcomputer is properly performed, the microcomputer is prevented from runaway reliably, and the malfunction of the entire control system is prevented. Further, when the microcomputer is normal, the monitoring signal is not output to the watch dock due to internal noise of the microcomputer (including a case induced from the outside).

本発明に係わるマイクロコンピュータの動作モード制御回路は、I/Oバッファの入出力属性を決定する入出力レジスタ、及び、周辺機能の選択をする周辺選択レジスタに対して、所定の設定方法により設定する以外の方法によっては書換られないようにする書込抑止の効果があり、動作モード設定期間に設定した動作モードは、マイクロコンピュータの状態いかんによらず、外部からのリセット信号によりリセットされるまで、動作モードの再設定が防止される。   An operation mode control circuit of a microcomputer according to the present invention sets an input / output register for determining an input / output attribute of an I / O buffer and a peripheral selection register for selecting a peripheral function by a predetermined setting method. There is an effect of inhibiting writing so as not to be rewritten by other methods, and the operation mode set in the operation mode setting period is not reset regardless of the state of the microcomputer until it is reset by an external reset signal. The resetting of the operation mode is prevented.

従って、ウオッチドックタイマ用の監視信号を出力するポートのI/Oバッファの設定と前記I/Oバッファにウオッチドックタイマ用の監視信号発生回路を接続する設定は、所定の期間、マイクロコンピュータ自身によって再設定されないため、マイクロコンピュータの状態いかんによらず、ウオッチドックタイマに対し、マイクロコンピュータの状態を表した監視信号を送り続けることができる。
そのため、ウオッチドックタイマは高い信頼性をもって、マイクロコンピュータの状態(例えば、暴走した状態)を監視し続けることができる。
Therefore, the setting of the I / O buffer of the port that outputs the monitoring signal for the watchdog timer and the setting of connecting the monitoring signal generation circuit for the watchdog timer to the I / O buffer are performed by the microcomputer itself for a predetermined period. Since the resetting is not performed, the monitoring signal indicating the microcomputer state can be continuously sent to the watchdog timer regardless of the state of the microcomputer.
Therefore, the watchdog timer can continue to monitor the state of the microcomputer (for example, a runaway state) with high reliability.

その結果、本発明によれば、動作モードの再書込を防止する動作モード制御回路、及び、安定的に動作可能なマイクロコンピュータ、前記マイクロコンピュータを使用した制御システムを提供することができる。   As a result, according to the present invention, it is possible to provide an operation mode control circuit that prevents rewriting of the operation mode, a microcomputer that can operate stably, and a control system that uses the microcomputer.

1 ライトパルス生成部
2 出力データレジスタ
3 入出力I/O
4 入出力制御レジスタ
5 アンド回路
6 FF
7 バッファ
8 端子
9 VCC電源
10 書込抑止回路
11 出力データレジスタ書込信号
12 入出力制御レジスタ書込信号
13 書込抑止信号
14 データバス
15 リセット信号
20 動作モード制御回路
101 ライトパルス生成部
102 出力データレジスタ
103 入出力I/O
104 入出力制御レジスタ
105 デコーダ
106 アンド回路
107 FF
108 アンド回路
109 FF
110 バッファ
111 アンド回路
112 リセット信号
113 端子
120 書込抑止回路
121 出力データレジスタ書込信号
122 入出力データレジスタ書込信号
124 データバス
130 動作モード制御回路
201 ライトパルス生成部
202 タイマ
203 セレクタ
204 出力データレジスタ
205 入出力I/O
206 オア
207 周辺選択レジスタ
208 入出力制御レジスタ
209 FF
210 バッファ
211 アンド回路
212 端子
213 リセット信号
220 書込抑止回路
221 データバス
222 入出力制御レジスタ書込信号
223 周辺選択レジスタ書込信号
225 出力データレジスタ書込信号
230 動作モード制御回路
301 ライトパルス生成部
302 出力データレジスタ
303 入出力制御レジスタ
304 入出力I/O
305 初期化ルーチン実行表示回路
306 初期化ルーチンにおける実行状態の判定回路
307 SRFF
308 アンド回路
309 端子
310 書込抑止回路
311 初期化ルーチン状態信号
312 初期化ルーチンの所定領域内状態信号
313 入出力制御レジスタ書込信号
314 出力データレジスタ書込信号
316 アンド回路
317 データバス
318 リセット信号
320 動作モード制御回路
400 マイクロコンピュータ
401 CPU(中央処理装置)
402 書込抑止回路
403 タイマ
404 RAM
405 ROM
406 入出力制御レジスタ&アドレスレジスタ
407 アドレス入出力I/O1
408 アドレス入出力I/O2
409 入出力制御レジスタ&データレジスタ
410 データ入出力I/O
411 制御信号I/O
413 コントロール信号
414 データバス
415 入出力制御レジスタ&制御信号レジスタ
416 周辺選択レジスタ
500 制御システム
501 マイクロコンピュータ
502 タイマ
503 出力データレジスタ
504 周辺選択レジスタ
505 入出力制御レジスタ
506 書込抑止回路
507 セレクタ
508 I/Oバッファ
509 リセット回路
510 CPU(中央処理装置)
511 監視信号出力ポート
512 リセット信号受入ポート
513 ウオッチドッグ
514 監視信号
515 リセット信号
516 RAM
517 ROM
518 データバス
601 入力I/F回路
602 マイコン
603 電源回路
604 遅延回路
605 ウオッチドッグタイマ
606 ROM
607 VCCIION/OFF回路
608 低電圧リセット回路
609 通信LSI
610 スリープ/ウエイクアップ信号
611 P.RUN信号
612 RESET信号
613 VCCI
614 VCCII
615 多入力アンド回路
701 CPU(中央処理装置)
702 SYSC
703 CPG
705 ROM
706 RAM
707 SCI
708 タイマ
709 IOP8
710 IOP7
711 IOP6
712 IOP5
713 IOP4
714 IOP3
715 IOP2
716 IOP1
717 内部バス
718 書込要求信号
801 CPU
802 メモリ
803 アドレスデコーダ
804 プロテクト制御レジスタ
805 論理素子
806 論理素子
807 論理素子
808 論理素子
809 論理素子
810 論理素子
811 アドレスデコーダ
812 アドレスデコーダ
813 アドレスデコーダ
814 アドレスデコーダ
815 制御レジスタ
816 制御レジスタ
817 制御レジスタ
818 制御レジスタ
819 クロック発生回路
820 周辺ユニットA
821 周辺ユニットB
822 周辺ユニットC
823 内部バス
824 ALE
825 SPCWR
826 WR
827 論理素子
830 プロテクト制御回路
850 マイクロコンピュータ
851 RAM
852 ROM
853 動作モード検出回路
854 タイマ
855 出力データレジスタ
856 セレクタ
857 周辺選択レジスタ
858 入出力制御レジスタ
859 書込抑止回路
860 CPU(中央処理装置)
861 制御信号発生装置
862 動作モード制御回路
863 データバス
864 I/Oバッファ
865 動作モード設定ポート
866 監視信号出力ポート
867 I/Oバッファ
868 オア回路
869 リセット信号受け入れポート
870 リセット回路
871 リセット信号
879 リセット信号
880 マイクロコンピュータ
881 RAM
882 ROM
883 動作モード検出回路
884 周辺機能回路
885 出力データレジスタ
886 動作モード制御回路
887 入出力制御レジスタ
888 書込抑止回路
889 リセット回路
890 CPU(中央処理装置)
891 制御信号発生部
892 データバス
893 I/Oバッファ
894 動作モード設定ポート
895 周辺機能回路用ポート
896 監視信号出力ポート
897 I/Oバッファ
898 リセット信号受入ポート
899 I/Oバッファ
900 外部リセット信号
901 監視信号
902 ウオッチドックタイマからのリセット信号
903 初期化モジュール
904 内部リセット信号
905 ウオッチドックタイマモジュール
906 周辺機能1モジュール
907 タスク制御モジュール
908 周辺機能2モジュール
909 モード設定モジュール
910 表示制御モジュール
915 ウオッチドックタイマからのリセット
916 リセットエントリー
917 初期化モジュール
918 ウオッチドックタイマ制御モジュール
921 タスク制御モジュール
923 モード設定モジュール
925 周辺機能制御モジュール
1 Write Pulse Generation Unit 2 Output Data Register 3 Input / Output I / O
4 I / O control register 5 AND circuit 6 FF
7 buffer 8 terminal 9 VCC power supply 10 write inhibit circuit 11 output data register write signal 12 input / output control register write signal 13 write inhibit signal 14 data bus 15 reset signal 20 operation mode control circuit 101 write pulse generator 102 output Data register 103 Input / output I / O
104 I / O control register 105 Decoder 106 AND circuit 107 FF
108 AND circuit 109 FF
110 Buffer 111 AND circuit 112 Reset signal 113 Terminal 120 Write inhibit circuit 121 Output data register write signal 122 Input / output data register write signal 124 Data bus 130 Operation mode control circuit 201 Write pulse generator 202 Timer 203 Selector 204 Output data Register 205 I / O I / O
206 OR 207 Peripheral selection register 208 I / O control register 209 FF
210 Buffer 211 AND circuit 212 Terminal 213 Reset signal 220 Write inhibit circuit 221 Data bus 222 Input / output control register write signal 223 Peripheral selection register write signal 225 Output data register write signal 230 Operation mode control circuit 301 Write pulse generator 302 Output data register 303 Input / output control register 304 Input / output I / O
305 Initialization routine execution display circuit 306 Execution state determination circuit in initialization routine 307 SRFF
308 AND circuit 309 Terminal 310 Write inhibit circuit 311 Initialization routine state signal 312 Initial state routine predetermined state signal 313 Input / output control register write signal 314 Output data register write signal 316 AND circuit 317 Data bus 318 Reset signal 320 Operation Mode Control Circuit 400 Microcomputer 401 CPU (Central Processing Unit)
402 Write inhibit circuit 403 Timer 404 RAM
405 ROM
406 Input / output control register & address register 407 Address input / output I / O1
408 Address input / output I / O2
409 Input / output control register & data register 410 Data input / output I / O
411 Control signal I / O
413 Control signal 414 Data bus 415 Input / output control register & control signal register 416 Peripheral selection register 500 Control system 501 Microcomputer 502 Timer 503 Output data register 504 Peripheral selection register 505 Input / output control register 506 Write inhibit circuit 507 Selector 508 I / O buffer 509 Reset circuit 510 CPU (central processing unit)
511 Monitoring signal output port 512 Reset signal receiving port 513 Watchdog 514 Monitoring signal 515 Reset signal 516 RAM
517 ROM
518 Data bus 601 Input I / F circuit 602 Microcomputer 603 Power supply circuit 604 Delay circuit 605 Watchdog timer 606 ROM
607 VCCION / OFF circuit 608 Low voltage reset circuit 609 Communication LSI
610 Sleep / wake-up signal 611 RUN signal 612 RESET signal 613 VCCI
614 VCCII
615 Multi-input AND circuit 701 CPU (central processing unit)
702 SYSC
703 CPG
705 ROM
706 RAM
707 SCI
708 Timer 709 IOP8
710 IOP7
711 IOP6
712 IOP5
713 IOP4
714 IOP3
715 IOP2
716 IOP1
717 Internal bus 718 Write request signal 801 CPU
802 Memory 803 Address decoder 804 Protect control register 805 Logic element 806 Logic element 807 Logic element 808 Logic element 809 Logic element 810 Logic element 811 Address decoder 812 Address decoder 813 Address decoder 814 Address decoder 815 Control register 816 Control register 817 Control register 818 Control Register 819 Clock generation circuit 820 Peripheral unit A
821 Peripheral unit B
822 Peripheral unit C
823 Internal bus 824 ALE
825 SPCWR
826 WR
827 Logic element 830 Protection control circuit 850 Microcomputer 851 RAM
852 ROM
853 Operation mode detection circuit 854 Timer 855 Output data register 856 Selector 857 Peripheral selection register 858 Input / output control register 859 Write inhibit circuit 860 CPU (central processing unit)
861 Control signal generator 862 Operation mode control circuit 863 Data bus 864 I / O buffer 865 Operation mode setting port 866 Monitoring signal output port 867 I / O buffer 868 OR circuit 869 Reset signal receiving port 870 Reset circuit 871 Reset signal 879 Reset signal 880 Microcomputer 881 RAM
882 ROM
883 Operation mode detection circuit 884 Peripheral function circuit 885 Output data register 886 Operation mode control circuit 887 Input / output control register 888 Write inhibit circuit 889 Reset circuit 890 CPU (central processing unit)
891 Control signal generator 892 Data bus 893 I / O buffer 894 Operation mode setting port 895 Peripheral function circuit port 896 Monitoring signal output port 897 I / O buffer 898 Reset signal receiving port 899 I / O buffer 900 External reset signal 901 Monitoring Signal 902 Reset signal from the watchdog timer 903 Initialization module 904 Internal reset signal 905 Watchdog timer module 906 Peripheral function 1 module 907 Task control module 908 Peripheral function 2 module 909 Mode setting module 910 Display control module 915 From the watchdog timer Reset 916 Reset entry 917 Initialization module 918 Watchdog timer control module 921 Task control module 923 Mode setting module 925 Peripheral function control module

Claims (3)

複数の信号発生回路の中から外部へ信号を伝える前記信号発生回路を選択する選択回路を有するマイクロコンピュータであって制御プログラムにより処理を行う前記マイクロコンピュータに内蔵された動作モード制御回路であって、
少なくとも、制御信号発生部と、
前記制御信号発生部からの第1の出力信号に応答して、前記制御信号発生部からの第2の出力信号を保持し、保持した信号の論理値に応じた書込信号を発生する書込抑止回路と、
前記書込信号に応答して、前記制御信号発生部からの第3の出力信号を保持し、保持した信号の論理値に応じた制御信号を発生する制御回路とを備え、
記書込信号は、前記書込抑止回路が保持した信号の論理値が一方の論理値である場合は論理値が固定した信号であり、前記書込抑止回路が保持した信号の論理値が他方の論理値である場合は前記制御信号発生部からの前記第1の出力信号のバッファ信号であって、
前記制御信号は、少なくともデータレジスタ回路を含む複数の前記信号発生回路の中から、前記外部へ信号を伝える信号発生回路を選択する前記選択回路へ、供給されることを特徴とする動作モード制御回路。
A operation mode control circuit incorporated in the microcomputer that performs processing by a the control program a microcomputer to have a selection circuit for selecting the signal generating circuit for transmitting a signal to the outside from a plurality of signal generating circuit ,
At least a control signal generator;
In response to the first output signal from the control signal generator, the second output signal from the control signal generator is held and a write signal is generated according to the logical value of the held signal A deterrent circuit;
A control circuit that holds a third output signal from the control signal generator in response to the write signal and generates a control signal according to the logical value of the held signal;
Before Kishokomi signal, when the logic value of a signal the write inhibit circuit has held a one logic value is a signal whose logic value is fixed, the logic value of a signal the write inhibit circuit is held When the other logical value is the buffer signal of the first output signal from the control signal generator,
The operation mode control circuit is characterized in that the control signal is supplied to the selection circuit that selects a signal generation circuit for transmitting a signal to the outside from the plurality of signal generation circuits including at least a data register circuit. .
請求項1に記載した動作モード制御回路であって、
前記書込抑止回路が、前記制御信号発生部からの前記第1の出力信号に応答して、前記第1の出力信号のバッファ信号又は固定した信号を出力するバッファ手段と、
前記バッファ信号に応答して、前記制御信号発生部からの前記第2の出力信号を保持し、前記第2の出力信号の論理値に応じた論理信号を出力する保持手段とを備え、
前記バッファ手段は前記保持手段からの論理信号を受け取り、一方の論理値に応じて前記固定した信号を出力し、他方の論理値に応じて前記バッファ信号を出力することを特徴とする動作モード制御回路。
An operation mode control circuit according to claim 1,
A buffer means for outputting a buffer signal of the first output signal or a fixed signal in response to the first output signal from the control signal generator;
Holding means for holding the second output signal from the control signal generator in response to the buffer signal and outputting a logic signal corresponding to the logic value of the second output signal;
The buffer means receives a logic signal from the holding means, outputs the fixed signal according to one logic value, and outputs the buffer signal according to the other logic value. circuit.
少なくとも、請求項1又は請求項2に記載した動作モード制御回路と、
外部との信号の入出力を制御する信号入出力制御回路と、
前記動作モード制御回路からのデータレジスタ書込信号に応答して、前記動作モード制御回路からのデータ信号を保持するデータレジスタ回路と、
1つ以上の一定周期のクロックを発生可能なタイマ回路と、
前記動作モード制御回路からの前記制御信号に応じて、前記データレジスタ回路又は前記タイマ回路を選択する選択回路とを備え、
前記データレジスタ回路は、前記データ信号に応じた信号を、前記信号入出力制御回路へ出力することを特徴とするマイクロコンピュータ。
At least an operation mode control circuit according to claim 1 or claim 2;
A signal input / output control circuit for controlling input / output of signals with the outside;
A data register circuit that holds a data signal from the operation mode control circuit in response to a data register write signal from the operation mode control circuit;
A timer circuit capable of generating one or more periodic clocks;
A selection circuit that selects the data register circuit or the timer circuit in response to the control signal from the operation mode control circuit;
The microcomputer, wherein the data register circuit outputs a signal corresponding to the data signal to the signal input / output control circuit.
JP2009026154A 2003-07-31 2009-02-06 Operation mode control circuit and microcomputer Expired - Fee Related JP5045692B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2009026154A JP5045692B2 (en) 2003-07-31 2009-02-06 Operation mode control circuit and microcomputer

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP2003204301 2003-07-31
JP2003204301 2003-07-31
JP2009026154A JP5045692B2 (en) 2003-07-31 2009-02-06 Operation mode control circuit and microcomputer

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP2004017705A Division JP4294503B2 (en) 2003-07-31 2004-01-26 Operation mode control circuit, microcomputer including operation mode control circuit, and control system using the microcomputer

Publications (2)

Publication Number Publication Date
JP2009104653A JP2009104653A (en) 2009-05-14
JP5045692B2 true JP5045692B2 (en) 2012-10-10

Family

ID=40706194

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2009026154A Expired - Fee Related JP5045692B2 (en) 2003-07-31 2009-02-06 Operation mode control circuit and microcomputer

Country Status (1)

Country Link
JP (1) JP5045692B2 (en)

Family Cites Families (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4228502A (en) * 1977-06-29 1980-10-14 Hitachi, Ltd. Electronic computer system
JPS58155457A (en) * 1982-03-10 1983-09-16 Nec Corp Information processing device
US4807141A (en) * 1985-12-16 1989-02-21 Pitney Bowes Inc. Postage meter with microprocessor controlled reset inhibiting means
JPS63126018A (en) * 1986-11-17 1988-05-30 Hitachi Ltd Semiconductor integrated circuit
JPH0792793B2 (en) * 1987-04-17 1995-10-09 富士通テン株式会社 Micro computer
JP2978278B2 (en) * 1991-04-09 1999-11-15 三菱電機株式会社 Terminal function setting circuit
JPH08221381A (en) * 1995-02-13 1996-08-30 Oki Electric Ind Co Ltd Microcomputer
JPH0944467A (en) * 1995-07-27 1997-02-14 Sharp Corp Microcomputer
JPH10256488A (en) * 1997-03-13 1998-09-25 Nec Eng Ltd Operation mode setting circuit
JPH10340200A (en) * 1997-06-06 1998-12-22 Mitsubishi Electric Corp Information processor
JPH1166030A (en) * 1997-08-27 1999-03-09 Hitachi Ltd Semiconductor integrated circuit and micro-computer
JP2000181899A (en) * 1998-12-18 2000-06-30 Fujitsu Ltd Microprocessor, method for controlling shared terminal and method for executing reset processing

Also Published As

Publication number Publication date
JP2009104653A (en) 2009-05-14

Similar Documents

Publication Publication Date Title
US5233613A (en) Reliable watchdog timer
US5793774A (en) Flash memory controlling system
US6587916B2 (en) Microcomputer with built-in programmable nonvolatile memory
US5576650A (en) Reset circuit of electronic device
JP5014899B2 (en) Reconfigurable device
EP1324190B1 (en) Data processing system having a read-modify-write unit
JP4294503B2 (en) Operation mode control circuit, microcomputer including operation mode control circuit, and control system using the microcomputer
US9304943B2 (en) Processor system and control method thereof
US20090106609A1 (en) Semiconductor integrated circuit and debug mode determination method
JP2007249323A (en) Microcomputer
US6581146B1 (en) Serial command port method, circuit, and system including main and command clock generators to filter signals of less than a predetermined duration
CA2292991C (en) Watch dog timer system
EP1071997A1 (en) Peripheral device with access control
US6029248A (en) Locking system to protect a powered component interface from erroneous access by an attached, powered-off component
US20020120801A1 (en) Technique for capturing information
US7380165B2 (en) Assembly of electronic circuits comprising means for decontaminating error-contaminated parts
JP5045692B2 (en) Operation mode control circuit and microcomputer
JP2006074644A (en) Semiconductor circuit
EP0335494B1 (en) Watchdog timer
JPH11259195A (en) Bus noise prevention circuit
JPH08235073A (en) Microcomputer
JP4114004B2 (en) Semiconductor integrated circuit
JP3752970B2 (en) One-chip microcomputer device having a normal operation mode and a plurality of low power consumption operation modes
JPH09167117A (en) Microcomputer and real time system using the microcomputer
JPH10255490A (en) Reset control circuit of memory cell device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20090206

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20120327

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20120528

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: 20120619

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: 20120702

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

Free format text: PAYMENT UNTIL: 20150727

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313113

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313111

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees