JPH0232645B2 - - Google Patents

Info

Publication number
JPH0232645B2
JPH0232645B2 JP58110228A JP11022883A JPH0232645B2 JP H0232645 B2 JPH0232645 B2 JP H0232645B2 JP 58110228 A JP58110228 A JP 58110228A JP 11022883 A JP11022883 A JP 11022883A JP H0232645 B2 JPH0232645 B2 JP H0232645B2
Authority
JP
Japan
Prior art keywords
external clock
signal
microprocessor
clock
status
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Lifetime
Application number
JP58110228A
Other languages
Japanese (ja)
Other versions
JPS603015A (en
Inventor
Kyonobu Abe
Yoshio Sakata
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.)
Oki Electric Industry Co Ltd
Original Assignee
Oki Electric Industry Co 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 Oki Electric Industry Co Ltd filed Critical Oki Electric Industry Co Ltd
Priority to JP58110228A priority Critical patent/JPS603015A/en
Publication of JPS603015A publication Critical patent/JPS603015A/en
Publication of JPH0232645B2 publication Critical patent/JPH0232645B2/ja
Granted legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)
  • Manipulation Of Pulses (AREA)

Description

【発明の詳細な説明】 (技術分野) 本発明は、マイクロプロセツサを用いた回路に
おいて、外部回路と外部クロツクによつて作られ
るステータス情報を監視し、クロツク断を検出す
るクロツク断検出方式に関するものである。
DETAILED DESCRIPTION OF THE INVENTION (Technical Field) The present invention relates to a clock disconnection detection method for monitoring status information generated by an external circuit and an external clock and detecting a clock disconnection in a circuit using a microprocessor. It is something.

(従来技術) 第1図は従来例を示すもので、マイクロプロセ
ツサを用いて外部クロツクに同期した信号を作成
する回路の一構成例を示すブロツク図で、図中、
μ−CPUはストアード・プログラム形式を採り、
各種演算を司どるマイクロプロセツサ、I/Oは
各種データの入出力を扱う入出力装置であつて、
アドレスバスA−BUS、データバスD−BUSを
介してマイクロプロセツサμ−CPUに接続され
ている装置である。又、F/F1,F/F2はD
形エツジトリガータイプのフリツプフロツプで、
F/F1は同期信号作成用であり、F/F2はマ
イクロプロセツサμ−CPUにクロツクの状態を
知らせるステータス用である。
(Prior Art) Fig. 1 shows a conventional example, and is a block diagram showing an example of the configuration of a circuit that uses a microprocessor to create a signal synchronized with an external clock.
μ-CPU uses a stored program format,
A microprocessor is responsible for various calculations, and I/O is an input/output device that handles input and output of various data.
This device is connected to a microprocessor μ-CPU via an address bus A-BUS and a data bus D-BUS. Also, F/F1 and F/F2 are D
An edge trigger type flip-flop.
F/F1 is for creating a synchronization signal, and F/F2 is for status informing the microprocessor μ-CPU of the clock status.

第2図は第1図で示した回路のタイムチヤート
で、図中、Aはa0、a1、a2、a3……のパルス列よ
り成る外部クロツクを示すもので、以下Bは入出
力装置I/Oの出力信号を、Dはフリツプフロツ
プF/F1より作成された同期信号を、Sはフリ
ツプフロツプF/F2より作成されたステータス
(状態)信号を、Rはリセツト信号を各々示して
いる。
Figure 2 is a time chart of the circuit shown in Figure 1. In the figure, A indicates an external clock consisting of a pulse train of a 0 , a 1 , a 2 , a 3 . . . , and B indicates the input/output. D indicates the output signal of the device I/O, D indicates the synchronization signal generated by the flip-flop F/F1, S indicates the status signal generated by the flip-flop F/F2, and R indicates the reset signal.

以下、第1図、第2図を用いて、外部クロツク
に同期した信号を形成する動作について説明す
る。
The operation of forming a signal synchronized with an external clock will be described below with reference to FIGS. 1 and 2.

第1図に示す構成において、マイクロプロセツ
サμ−CPUの指令によつて入出力装置I/Oよ
りフリツプフロツプF/F1,F/F2に第2図
にて示す出力信号Bが“H”レベルの信号として
送出されると、外部クロツクAのその後の信号a1
の到来によりフリツプフロツプF/F1では同期
信号Dを、フリツプフロツプF/F2では外部ク
ロツクAの状態を示すステータス信号Sを各々作
成することになる。その後、マイクロプロセツサ
μ−CPUは入出力装置I/Oを介してフリツプ
フロツプF/F2で作成され、出力されたステー
タス信号Sを読み込み、“H”レベルであればフ
リツプフロツプF/F1より同期信号Dが送出さ
れていることを判断する。この判断の後、マイク
ロプロセツサμ−CPUはこれまで送出していた
出力信号Bを“L”レベルにするとともに、リセ
ツト信号Rを送出し、初期状態に戻る制御を行つ
ていた。
In the configuration shown in FIG. 1, the output signal B shown in FIG. 2 is set to "H" level from the input/output device I/O to flip-flops F/F1 and F/F2 by a command from the microprocessor μ-CPU. When sent out as a signal, the subsequent signal a 1 of external clock A
With the arrival of the external clock A, the flip-flop F/F1 generates a synchronizing signal D, and the flip-flop F/F2 generates a status signal S indicating the state of the external clock A. Thereafter, the microprocessor μ-CPU reads the status signal S generated and output from the flip-flop F/F2 via the input/output device I/O, and if it is at "H" level, the synchronization signal D is sent from the flip-flop F/F1. is being sent. After this determination, the microprocessor .mu.-CPU sets the output signal B, which had been sent out so far, to the "L" level, and sends out the reset signal R, thereby performing control to return to the initial state.

第3図は、以上述べた動作の手順を示すフロー
チヤートである。
FIG. 3 is a flowchart showing the procedure of the operation described above.

しかしながら、これまで述べて来た如き制御構
成では何らかの障害により外部クロツクAが到来
せず、消滅した場合には、同期信号Dおよびステ
ータス信号Sは“H”レベルに変化出来ず、した
がつて、第3図で示したフローチヤートにおける
“ステータスリード”処理フロー、換言すると図
中のおよびの処理を繰り返すことになる。す
なわち、マイクロプロセツサμ−CPUはあたか
も停止した様な状態に陥いることになる等の問題
点があつたのである。
However, in the control configuration as described above, if the external clock A does not arrive or disappears due to some failure, the synchronization signal D and the status signal S cannot change to the "H" level. The "status read" process flow in the flowchart shown in FIG. 3, in other words, the processes at and in the figure are repeated. That is, there were problems such as the microprocessor μ-CPU falling into a state as if it had stopped.

(発明の目的) 本発明はこのような点を考慮してなされたもの
であつて、障害等の原因により外部クロツクが消
滅した場合でもマイクロプロセツサをあたかも停
止している如き状態に陥いることを防ぎ、他の処
理ルーチンを処理させることを目的とする。
(Objective of the Invention) The present invention has been made in consideration of the above points, and it is possible to prevent the microprocessor from falling into a state as if it were stopped even if the external clock disappears due to a cause such as a failure. The purpose is to prevent this and allow other processing routines to process.

(発明の構成) すなわち、ステータス信号の読み取り回数を計
数し、その値があらかじめ設定した一定の回数に
達した時にクロツク断と判断して次の処理に移る
ように構成したもので、これにより上述の目的を
達成するのである。以下、図面を用いて本発明を
詳細に説明する。
(Structure of the Invention) In other words, the device is configured to count the number of times the status signal is read, and when the value reaches a preset certain number of times, it is determined that the clock is disconnected and the process moves to the next process. to achieve the purpose of Hereinafter, the present invention will be explained in detail using the drawings.

(発明の実施例) 第4図は本発明によるクロツク断検出方式を説
明するブロツク図であり、図中、ALUは論理演
算回路であり、REGはレジスタであり、マイク
ロプロセツサμ−CPUに内蔵される。その他、
I/O、A−BUS、D−BUS、F/F1とF/
F2は各々順に入出力装置、アドレスバス、デー
タバス、フリツプフロツプで、第1図の場合とそ
の構成は同じである。
(Embodiment of the invention) FIG. 4 is a block diagram explaining the clock interruption detection method according to the present invention. In the figure, ALU is a logic operation circuit and REG is a register, which is built in the microprocessor μ-CPU be done. others,
I/O, A-BUS, D-BUS, F/F1 and F/
F2 is an input/output device, an address bus, a data bus, and a flip-flop, respectively, and their configurations are the same as in the case of FIG. 1.

第5図は本発明による外部クロツク断検出方式
の動作手順を示すフローチヤートで、同図ので
示した処理は、あらかじめ設定した数、すなわ
ち、マイクロプロセツサμ−CPUがステータス
を読む回数をレジスタREGにセツトする処理を
示している。
FIG. 5 is a flowchart showing the operating procedure of the external clock disconnection detection method according to the present invention. This shows the process of setting the

ここで、上記ステータスを読む回数としては、
マイクロプロセツサμ−CPUのクロツク周波数
と外部クロツクの周波数で決定される値であり、
第2図で示したタイムチヤートにおいて、入出力
装置I/Oの出力信号Bが外部クロツクAの直後
に送出される最悪の場合(この場合、ステータス
が“1”になるまで時間は外部クロツク1サイク
ル分に相当する)を考慮して決定されるもので、
到来する外部クロツクAの1サイクルの時間内で
第5図の〜で示した一連の処理を何回繰り返
し処理出来るかをあらかじめ算出し、その回数以
上の値を選択し、前記レジスタREGにセツトす
ることになる。以下、第4図、第5図および第2
図を用いて動作について説明する。
Here, the number of times the above status is read is:
It is a value determined by the clock frequency of the microprocessor μ-CPU and the frequency of the external clock.
In the time chart shown in Figure 2, the worst case is that the output signal B of the input/output device I/O is sent immediately after the external clock A (in this case, the time until the status becomes "1" is the external clock 1). (corresponding to the number of cycles).
Calculate in advance how many times the series of processes indicated by ~ in Figure 5 can be repeated within one cycle of the incoming external clock A, select a value that is greater than that number of times, and set it in the register REG. It turns out. Below, Figure 4, Figure 5 and Figure 2
The operation will be explained using figures.

すなわち、上記セツトした状態において、マイ
クロプロセツサμ−CPUが入出力装置I/Oを
介してフリツプフロツプF/F1,F/F2に第
2図にて示す出力信号Bを“H”レベル信号とし
て送出すると、マイクロプロセツサμ−CPUの
論理演算回路ALUは第5図の〜で示す処理
を一連の動作として繰り返すことになる。この
後、フリツプフロツプF/F1,F/F2に外部
クロツクAのクロツクa1が到来すると、フリツプ
フロツプF/F1からは同期信号Dが送出され、
それとともにフリツプフロツプF/F2からはス
テータス信号Sが“L”レベより変化して“H”
レベルとなり、入出力装置I/Oに送出される。
この変化したステータス信号Sは、マイクロプロ
セツサμ−CPUにて読み取られ、論理演算回路
ALUにて演算の上、入出力装置I/Oからの出
力信号Bを“L”レベルとし、それとともに入出
力装置I/Oに対してリセツト信号を送出するよ
うに指令を出す。このリセツト信号Rの送出によ
りステータス信号Sが“L”レベルとなる。入出
力装置I/Oからの出力信号Bが“L”レベルと
なつていることにより外部クロツクAの次のクロ
ツクa2の到来によつて同期信号Dは“L”レベル
に変化し、したがつて、外部クロツクAに同期し
た1クロツク分の巾の信号(パルス)を得られた
ことになるのである。
That is, in the above set state, the microprocessor μ-CPU sends the output signal B shown in FIG. 2 as an "H" level signal to the flip-flops F/F1 and F/F2 via the input/output device I/O. Then, the logic operation circuit ALU of the microprocessor .mu.-CPU repeats the processing shown by .about. in FIG. 5 as a series of operations. After that, when clock a1 of external clock A arrives at flip-flops F/F1 and F/F2, synchronization signal D is sent from flip-flop F/F1.
At the same time, the status signal S from the flip-flop F/F2 changes from the "L" level to "H".
level and is sent to the input/output device I/O.
This changed status signal S is read by the microprocessor μ-CPU and is sent to the logic operation circuit.
After the calculation in the ALU, the output signal B from the input/output device I/O is set to "L" level, and at the same time, a command is issued to the input/output device I/O to send a reset signal. By sending this reset signal R, the status signal S becomes "L" level. Since the output signal B from the input/output device I/O is at the "L" level, the synchronization signal D changes to the "L" level with the arrival of the next clock a2 of the external clock A. This means that a signal (pulse) with a width of one clock synchronized with external clock A can be obtained.

ここで、上記一連の処理動作において、何らか
の障害発生により外部クロツクAが消滅し、到来
がない場合にはマイクロプロセツサμ−CPUの
論理演算回路ALUは前記第5図で示す〜の
処理を繰り返すことになる。そして、繰り返した
回数が既述の如くしてレジスタREGにあらかじ
めセツトした値を越えた時に、外部クロツク断と
判断するのである。すなわち、レジスタREGの
設定値が“零”になると、論理演算回路ALUで
は外部クロツク断と判断してその後の処理を第5
図に示す如く、の処理に移行し、クロツク断
時の処理を行い、その後、次のステツプへ処理を
進めることになるのである。
Here, in the above series of processing operations, if the external clock A disappears due to the occurrence of some kind of failure and there is no arrival, the logic operation circuit ALU of the microprocessor μ-CPU repeats the processing shown in FIG. 5 above. It turns out. Then, when the number of repetitions exceeds the value preset in the register REG as described above, it is determined that the external clock has failed. In other words, when the set value of the register REG becomes "zero", the logic operation circuit ALU determines that the external clock has been disconnected, and the subsequent processing is performed by the fifth clock.
As shown in the figure, the process moves to step 1, performs processing when the clock is cut off, and then proceeds to the next step.

このように、障害等による外部クロツク消滅に
よるクロツク断の際でも、システム全体の動作に
何ら影響を与えることなく継続して処理を実施す
るので、マイクロプロセツサの有効運用が図れる
のである。
In this way, even if the clock is cut off due to disappearance of the external clock due to a failure or the like, processing continues without affecting the operation of the entire system, so the microprocessor can be used effectively.

第6図は本発明によるクロツク断検出方式の他
の例の動作手順を示すフローチヤートであり、第
7図はその時のタイムチヤートを示すものであ
る。
FIG. 6 is a flow chart showing the operating procedure of another example of the clock interruption detection method according to the present invention, and FIG. 7 shows a time chart at that time.

この例では、これまで第4図、第5図を用いて
説明した実施例でのレジスタ(REG)の他にも
う1つのレジスタ機能を追加構成したものであ
る。この構成によつて、作成する同期信号を、外
部クロツクのn倍の任意のパルス幅として選択出
来るようにした例を示すのである。詳述すると、
所望するパルス巾、例えば第7図に例として示す
外部クロツクAの2倍のパルス巾の同期信号Dを
作成する場合、この“2”を第6図のの処理に
示す如くレジスタAにセツトする。この後は、論
理演算回路ALUはこれまで説明した実施例と同
様に〜の処理を行い、その際、クロツク断の
判断を行い、に示す処理にて、上記セツトした
レジスタAにて何クロツク分の同期信号が送出さ
れたか否かを判断し、所望するパルス巾、この場
合は2クロツク巾の同期信号を得るのである。
In this example, another register function is added in addition to the register (REG) in the embodiment described using FIGS. 4 and 5. With this configuration, an example will be shown in which the synchronization signal to be created can be selected to have an arbitrary pulse width n times that of the external clock. In detail,
When creating a synchronizing signal D with a desired pulse width, for example twice the pulse width of external clock A shown in FIG. 7 as an example, set "2" in register A as shown in the process of FIG. 6. . After this, the logic operation circuit ALU performs the processing of ~ in the same manner as in the embodiments described so far, and at that time, it determines whether the clock is disconnected. It is determined whether or not a synchronization signal has been sent, and a synchronization signal with a desired pulse width, in this case two clock widths, is obtained.

このように、第6図に示す動作手順により、第
4図に示したマイクロプロセツサμ−CPUにレ
ジスタREGの他にレジスタA(図示せず)を追加
し、構成することによつて、任意の巾の同期信号
が得られるとともに、クロツク断の判断、処理が
得られ、先の実施例と同様の効果が期待出来るの
である。
In this way, by adding and configuring the microprocessor μ-CPU shown in FIG. 4 with a register A (not shown) in addition to the register REG, according to the operating procedure shown in FIG. It is possible to obtain a synchronizing signal with a width of 100 kHz, and also to judge and process clock disconnections, so that the same effects as in the previous embodiment can be expected.

(発明の効果) 以上、詳細に述べたように本発明によれば、外
部クロツク消滅によるクロツク断の障害があつて
も、マイクロプロセツサを停止(実際には、ステ
ータス読み取りフローの処理を実行している)さ
せることなく他の処理ルーチンを処理出来る等の
効果が期待されるのである。
(Effects of the Invention) As described above in detail, according to the present invention, even if there is a clock disconnection failure due to the disappearance of the external clock, the microprocessor is stopped (actually, the process of the status reading flow is executed). This is expected to have the effect of allowing other processing routines to be processed without having to do so.

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

第1図は従来の外部クロツクに同期した信号の
作成回路の一構成例を示すブロツク図、第2図は
第1図で示した回路のタイムチヤート、第3図は
第1図で示した回路のフローチヤート、第4図は
本発明の一実施例を示すブロツク図、第5図は第
4図でのフローチヤート、第6図は本発明の他の
実施例のフローチヤート、第7図はその時のタイ
ムチヤートである。 μ−CPUはマイクロプロセツサ、I/Oは入
出力装置、A−BUSはアドレスバス、D−BUS
はデータバス、F/F1,F/F2はフリツプフ
ロツプ、ALUは論理演算回路、REGはレジスタ
である。
Figure 1 is a block diagram showing an example of the configuration of a conventional signal generation circuit synchronized with an external clock, Figure 2 is a time chart of the circuit shown in Figure 1, and Figure 3 is the circuit shown in Figure 1. 4 is a block diagram showing one embodiment of the present invention, FIG. 5 is a flowchart of FIG. 4, FIG. 6 is a flowchart of another embodiment of the present invention, and FIG. 7 is a flowchart of another embodiment of the present invention. This is a time chart from that time. μ-CPU is a microprocessor, I/O is an input/output device, A-BUS is an address bus, D-BUS
is a data bus, F/F1 and F/F2 are flip-flops, ALU is a logic operation circuit, and REG is a register.

Claims (1)

【特許請求の範囲】 1 ストアードプログラム形式を採り、各種演算
を司どるマイクロプロセツサを用いて外部クロツ
クと同期した信号を作成する回路において、 外部クロツクと同期した信号を作成する第1の
手段(F/F1)と、外部クロツクの状態を示す
ステータス信号を作成する第2の手段(F/F
2)と、第2の手段により作成されたステータス
信号をマイクロプロセツサに読み込む第3の手段
(I/O)と、あらかじめ選択した一定値を記憶
する第4の手段(REG)と、第4の手段に記憶
された値を順に減ずる第5の手段(ALU)とを
配し、 外部クロツクと同期した信号を作成しようとす
る時点より前記第2の手段によるステータス信号
が作成されるまでの間、第3および第5の主段を
繰り返し、その回数が第4の手段に設定された値
が零になつた時点で外部クロツク断と判定する如
く構成したことを特徴とするクロツク断検出方
式。
[Claims] 1. In a circuit that uses a stored program format and uses a microprocessor that controls various operations to create a signal synchronized with an external clock, a first means for creating a signal synchronized with an external clock ( F/F1) and a second means (F/F1) for creating a status signal indicating the state of the external clock.
2), third means (I/O) for reading the status signal created by the second means into the microprocessor, fourth means (REG) for storing a preselected constant value; and a fifth means (ALU) that sequentially subtracts the values stored in the means, from the time when a signal synchronized with the external clock is created until the status signal is created by the second means. , the third and fifth main stages are repeated, and when the number of repetitions reaches a value set in the fourth means becomes zero, it is determined that an external clock has been interrupted.
JP58110228A 1983-06-21 1983-06-21 Clock break detection system Granted JPS603015A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP58110228A JPS603015A (en) 1983-06-21 1983-06-21 Clock break detection system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP58110228A JPS603015A (en) 1983-06-21 1983-06-21 Clock break detection system

Publications (2)

Publication Number Publication Date
JPS603015A JPS603015A (en) 1985-01-09
JPH0232645B2 true JPH0232645B2 (en) 1990-07-23

Family

ID=14530336

Family Applications (1)

Application Number Title Priority Date Filing Date
JP58110228A Granted JPS603015A (en) 1983-06-21 1983-06-21 Clock break detection system

Country Status (1)

Country Link
JP (1) JPS603015A (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2811184B2 (en) * 1988-09-22 1998-10-15 東芝セラミックス株式会社 Quartz tube manufacturing equipment
DE3913875C1 (en) * 1989-04-27 1990-08-09 Heraeus Quarzschmelze Gmbh, 6450 Hanau, De

Also Published As

Publication number Publication date
JPS603015A (en) 1985-01-09

Similar Documents

Publication Publication Date Title
JPH0232645B2 (en)
JPH01246602A (en) Special function unit for programmable controller
JPH01164114A (en) Resistor device
JPH0573296A (en) Microcomputer
JPH0430815Y2 (en)
JP2953713B2 (en) Semiconductor integrated circuit
JPS5911424A (en) Processing circuit of interruption signal
JPS62162104A (en) Flow chart type programmable controller
JP3405513B2 (en) Redundant controller for programmable controller
JPS6156814B2 (en)
JPS6269352A (en) Microprocessor
JP2001325870A (en) Input circuit for control signal
JPS5935241A (en) Interruption control system
JPS6310272A (en) Processing system for equi-load logic circuit
JPS60183647A (en) Watchdog timer
JPH04270441A (en) Data processor
JPH0530151A (en) Hdlc procedure data transmission device
JPH04112225A (en) Integrated circuit device
JPH04131954A (en) Peripheral device
JPH07297857A (en) Mode switching interface circuit
JPH0210418A (en) Synchronizing logic circuit
JPH0784669A (en) Circuit device for decision of generation point of time of control signal supplied from microprocessor device
JPH03294970A (en) Logical simulation method
JPH0240747A (en) Data input/output method for microcomputer
JPS62117054A (en) Confirmation system for state of input and output device