JPS61290560A - Input signal sensing system - Google Patents

Input signal sensing system

Info

Publication number
JPS61290560A
JPS61290560A JP13195185A JP13195185A JPS61290560A JP S61290560 A JPS61290560 A JP S61290560A JP 13195185 A JP13195185 A JP 13195185A JP 13195185 A JP13195185 A JP 13195185A JP S61290560 A JPS61290560 A JP S61290560A
Authority
JP
Japan
Prior art keywords
register
input
output
gate
clocks
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP13195185A
Other languages
Japanese (ja)
Inventor
Toshio Kaneko
金子 利夫
Minoru Sugano
実 菅野
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
Tohoku Oki Electric Co Ltd
Original Assignee
Oki Electric Industry Co Ltd
Tohoku Oki Electric 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, Tohoku Oki Electric Co Ltd filed Critical Oki Electric Industry Co Ltd
Priority to JP13195185A priority Critical patent/JPS61290560A/en
Publication of JPS61290560A publication Critical patent/JPS61290560A/en
Pending legal-status Critical Current

Links

Landscapes

  • Bus Control (AREA)

Abstract

PURPOSE:To select only an effective signal, to reduce a program quantity, to reduce a burden applied to a CPU, and to execute an operation with a high efficiency by providing a chatter eliminating circuit and an effective level detecting circuit on all of plural input ports. CONSTITUTION:When a level variation from the outside appears in an input terminal P1 of an input port L1, F1 and F2 of an FF are operated by the first and the second clocks PHI1, PHI2 in four pieces of scan clocks, in order to discriminate whether its level variation is an effective variation or a chatter which becomes a fault. In case of a different state of the input terminal P1 has been sampled at two points of the fall of the clocks PHI1, PHI2, the output of an exclusive NOR gate E1 becomes '0', it is regarded as a chatter signal, and it is not executed to set the input port L1 to a register F3. Also, in case of P1 potential has sampled the same state at two points of a fall of the clocks PHI1, PHI2, the output of the NOR gate E1 becomes '1', its value is regarded as an effective level, and its state value is set to the register F3 at a rise of a scan clock PHI3.

Description

【発明の詳細な説明】 (産業上の利用分野) 本発明は入力信号センス方式に関し、特にCPUを用い
て複数の入力ポートの信号監視を行なうシステムにおけ
る入力信号センス方式に関するものである。
DETAILED DESCRIPTION OF THE INVENTION (Field of Industrial Application) The present invention relates to an input signal sensing method, and more particularly to an input signal sensing method in a system that uses a CPU to monitor signals at a plurality of input ports.

(従来の技術) 従来、この種入力信号センス方式の構成を示す代表例と
して第4図のブロック図に示されるものがある。これら
の中、まず、第4図(I)は、crty(中央処理装置
)がそのメインプログラムの中に入力信号センス・プロ
グラムを有していて、このプログラムによって自主的に
入力ポートの入力信号の変化状態を検知(センス)して
いた。
(Prior Art) A typical example of the configuration of this type of input signal sensing system is shown in the block diagram of FIG. 4. Among these, first of all, in FIG. 4 (I), the crty (central processing unit) has an input signal sense program in its main program, and this program autonomously controls the input signal of the input port. The changing state was detected (sense).

又、第4図ω)は、 CPUがメインプログラムの中に
タイマをセットするプログラムを持っておシ、このタイ
マによって割込みを発生させて入力ポートの入力信号状
態をセンスしていた。
Also, in Figure 4 ω), the CPU has a program in its main program that sets a timer, and this timer generates an interrupt to sense the state of the input signal at the input port.

そして、以上述べたように、従来の入力信号センス方式
においては、一定周期でのみ入力ポートをセンスしてお
シ、プログラムに依存するところが大きかった。
As described above, in the conventional input signal sensing method, the input port is sensed only at a fixed period, and it is largely dependent on the program.

(発明が解決しようとする問題点) しかしながら、上記構成の入力信号センス方式では、入
力ポートをセンスするための動作に対して設定すべきプ
ログラムの量が大きくなJl)、 したがって、CPU
の負担が増大し、又、プログラム処理のため入力信号の
変化に対応して敏速な応答が出来ず、更に、CPUが入
力デートをセンスした時に、入力ポートにチャツタ信号
が現われた場合でありても、CPUはチャツタ信号の存
在を判別することが出来ず、誤ったデータを検出してし
まうという問題点があった。
(Problems to be Solved by the Invention) However, in the input signal sensing method with the above configuration, the amount of programs that must be set for the operation for sensing the input port is large.
In addition, due to program processing, it is not possible to respond quickly to changes in input signals, and furthermore, when the CPU senses an input date, a chatter signal appears at the input port. However, there was a problem in that the CPU was unable to determine the presence of chatter signals and detected incorrect data.

この発明は、前記従来技術が持っていた問題点をすべて
除去し、プログラム量の減縮とCPUの負担の軽減を図
シ、入力ポートにおいてチャツタなどの不必要な信号を
除去して有効な信号のみを選択し、CPUが入力信号の
状態変化に対応して敏速な応答ができる優れた入力信号
センス方式を提供することを目的とする。
This invention eliminates all the problems that the prior art had, reduces the amount of programs and reduces the load on the CPU, and eliminates unnecessary signals such as chatter at the input port so that only valid signals are used. It is an object of the present invention to provide an excellent input signal sensing method that allows a CPU to quickly respond to changes in the state of an input signal.

(問題点を解決するための手段) この発明は前記問題点を解決するために、割込みコント
ローラを用いてCPUにより複数の入力ポートの信号監
視を行なうシステムにおいて、すべての入力ポートは、
入力端子に並列に接続されかつ同一周期で異なる位相の
スキャン・クロックの第1.第2クロックによりそれぞ
れ動作するフリラグ・フロッグF□ 、F、と、このフ
リップ・フロラ7’F1pF*の出力が同一レベルの場
合にのみ動作するイクスクルーシプ・フアーゲートE□
とから成るチャツタ信号除去回路と、該チャツタ信号除
去回路から出力された有効レベル信号と前記スキャン・
クロックの第3.第4クロックとのアンドダートA1 
mAmの各出力により動作するレジスタI’s  、F
n と、前記フリップ・フロップF工の出力信号をレジ
スタF3に入力せしめると共に、レジスタF3の出力を
レジスタF4に入力せしめ、レジスタF3とレジスタF
4の各出力レベルが不一致の場合にのみ動作するイクス
クルーシプーオア・f−トE、と、このオア11ダート
E2からの出力により動作するフラグレジスタF、とか
ら成る有効レベル検出回路とを備え、前記スキャンクロ
ックのスキャン・サイクルを繰返すことにより複数の入
力ポートで選択した有効レベル信号をオア・r−トo1
を介して割込みコントローラに送信し、該割込みコント
ロータによってCPUに知らせることにより複数の入力
ポートの信号監視を行なうこととしたものである。
(Means for Solving the Problems) In order to solve the above problems, the present invention provides a system in which signals of a plurality of input ports are monitored by a CPU using an interrupt controller.
The first . of scan clocks connected in parallel to the input terminals and having the same period but different phases. The exclusive furgate E□ operates only when the outputs of the flip-lag frogs F□, F, which are operated by the second clock, and the output of this flip-flora 7'F1pF* are at the same level.
a chatter signal removal circuit comprising a chatter signal removal circuit, and an effective level signal output from the chatter signal removal circuit and the scan signal.
3rd clock. And dirt A1 with the 4th clock
Registers I's and F operated by each output of mAm
n and the output signal of the flip-flop F are input to register F3, and the output of register F3 is input to register F4, and register F3 and register F are input.
an effective level detection circuit consisting of an exclusive or f-to E that operates only when the respective output levels of four do not match, and a flag register F that operates based on the output from this or 11-dart E2. By repeating the scan cycle of the scan clock, the valid level signals selected at the plurality of input ports are OR-r-to-o1.
The signals of a plurality of input ports are monitored by transmitting the signal to the interrupt controller via the interrupt controller and notifying the CPU by the interrupt controller.

(作用) 本発明によれば、以上のように入力信号センス回路を構
成したので、入力端子にチャツタ等の不規則な信号が入
力しても、入力ポート内ではそのチャツタ信号除去回路
がチャツタ信号等を除去するように働き、このチャツタ
信号除去回路以降の有効レベル検出回路は有効レベル信
号のみを選択して検出するように作用する。そして、こ
の有効レベル信号は割込みコントローラIRCを介して
CPUに、入力ポートに有効なレベル変化があったこと
を知らせるから、CPUはこの時だけレジスタF3の出
力を検出してフラグレジスタFseクリアし、次の入力
ポートの入力端子P□の状態変化に備える。したがって
、前記問題点を除去できるのである。
(Function) According to the present invention, since the input signal sensing circuit is configured as described above, even if an irregular signal such as chatter is input to the input terminal, the chatter signal removal circuit in the input port detects the chatter signal. The effective level detection circuits subsequent to this chatter signal removing circuit operate to select and detect only effective level signals. Then, this valid level signal notifies the CPU via the interrupt controller IRC that there has been a valid level change at the input port, so the CPU detects the output of register F3 only at this time and clears the flag register Fse. Prepare for the state change of the input terminal P□ of the next input port. Therefore, the above problem can be eliminated.

(実施例) 以下本発明の一実施例を図面を用いて説明する。(Example) An embodiment of the present invention will be described below with reference to the drawings.

第1図は本発明の一実施例の概略構成を示すブロック図
で、同図において、1は入力ポートで複数のうちの一つ
が代表して画かれておシ、2は割込みコントローラ、4
3はCPUで内部にメインプログラム4を有している。
FIG. 1 is a block diagram showing a schematic configuration of an embodiment of the present invention. In the figure, 1 is an input port, one of which is drawn as a representative, 2 is an interrupt controller, and 4 is an input port.
3 is a CPU which has a main program 4 inside.

第2図は本発明の実施例を示す回路図であって、図中、
L1〜Lnは入力デート、P1〜Pnは入力ポートL1
〜Lnの入力端子で、入力ポートL2〜Lnは入力/−
) Lユと全く同様に構成されてシシ、その回路構成を
入力ポートム工について代表して図示されている。
FIG. 2 is a circuit diagram showing an embodiment of the present invention, and in the figure,
L1 to Ln are input dates, P1 to Pn are input ports L1
~Ln input terminals, input ports L2~Ln are input/-
) The circuit configuration is shown as a representative example of the input port.

まず、入力ポートL0において、F□ 、F2はそれぞ
れフリップ・フロッグで、両方のD端子が入カポート端
子P工に接続されているので、入力の状態変化がそのま
まD端子に現われ、スキャン・クロックφ、及びφ2が
G端子に接続され、φ□ 、φ、が@1”の状態時にD
端子の状態値をQ端子にセットする。E□はイクスクル
ーシプ・ノア・ダートであシ、フリップ・フロッグF1
及びF2の出力が同じ場合にのみ出力が′1”となシ、
その出力がアンド・グー)Aエ y A 2に接続され
ている。アンド・ゲートAよ 、A2はスキャン・クロ
ックのφ3及びφ4が′1”の時だけイクスクルーシプ
・ノア・ゲートE8の出力11″を出力する。F3 、
F4はそれぞれフリップ・フロップで、アンド・r −
) A□ gA2の出力がそれぞれG端子に接続され、
アンド・ダートA□ tA2の出力がそれぞれ@1′の
時にフリップ・フロップF□ IF、の出力をQ端子に
出力する。
First, in the input port L0, F□ and F2 are each flip-frog, and both D terminals are connected to the input port terminal P, so a change in the state of the input appears as it is at the D terminal, and the scan clock φ , and φ2 are connected to the G terminal, and when φ□ and φ are @1'', D
Set the terminal status value to the Q terminal. E□ is Exclusive Noah Dart Ash, Flip Frog F1
The output is '1' only when the outputs of F2 and F2 are the same,
Its output is connected to A2. AND gate A, A2 outputs the output 11'' of exclusive NOR gate E8 only when scan clocks φ3 and φ4 are ``1''. F3,
F4 are flip-flops, and r −
) A□ gA2 outputs are connected to the G terminal, respectively,
When the output of AND dirt A□ tA2 is @1', the output of flip-flop F□ IF is output to the Q terminal.

F2はイクスクルーシブ・オア・ダートであって、フリ
ップ・フロップF3とフリップ・70ツブF4の出力が
異なる場合にのみ″1”を出力する。
F2 is exclusive-or-dirt, and outputs "1" only when the outputs of flip-flop F3 and flip-flop F4 are different.

F、はフリップ・フロップから成石フラグレジスタでD
端子が常時ハイレベルにされておシ、イクスクルーシブ
・オア・ゲートE2の出力がそのG端子に接続され、F
2の出力が“1 ″になると、出力端子Qに@1”がセ
ットされる。
F is the flip-flop to D in the crystal flag register.
The output of exclusive OR gate E2 is connected to its G terminal, and the F terminal is always kept at high level.
When the output of 2 becomes "1", @1" is set to the output terminal Q.

なお、前述のように、他の入力−一トL、〜Lnも入力
ポートL1と同様に構成されている。
Note that, as described above, the other input ports L, -Ln are also configured in the same manner as the input port L1.

そして、各入力ポートL1〜L からの出力はオア・ゲ
ートO工に入力し、このオア・ダート0!の出力が割込
みコントローラIRCに接続され、この出力がCPUに
接続されている。
Then, the output from each input port L1 to L is input to the OR gate O, and this OR dirt 0! The output of is connected to the interrupt controller IRC, and this output is connected to the CPU.

次に、以上のように構成された本システムの動作につい
て説明する。
Next, the operation of this system configured as above will be explained.

今、入力ポートL□の入力端子P□に外部からのレベル
変化が現われると、そのレベル変化が有効な変化なのか
あるいは障害となるチャツタなのかを識別することが必
要であシ、このため、同一周期で位相の異なる4個のス
キャン・クロックの中の第1.第2クロックすなわちφ
1とφ2によりフリップ・70ツゾF□ IF2を動作
させる。
Now, when a level change from the outside appears at the input terminal P□ of the input port L□, it is necessary to identify whether the level change is a valid change or a chatter that is an obstacle. The first scan clock among four scan clocks with the same period and different phases. The second clock i.e. φ
1 and φ2 operate the flip 70TZO F□ IF2.

このスキャン・クロックと入力端子P1の電位は第3図
の波形図に示される関係にあるものとする。
It is assumed that this scan clock and the potential of the input terminal P1 have a relationship as shown in the waveform diagram of FIG.

そして、φ□の立ち下シとφ2の立ち下シの2点で入力
端子P1の異なる状態をサンプルした場合すなわちt□
時にはイクスクルーシブ・ノア・ゲートE□の出力は@
 0  #となシ、これをチャツタ信号とみなして入力
ポートL1のレジスタF3へのセットは行なわない。
If we sample different states of the input terminal P1 at two points: the falling edge of φ□ and the falling edge of φ2, that is, t□
Sometimes the output of exclusive Noah gate E□ is @
0 #, this is regarded as a chatter signal and is not set in register F3 of input port L1.

しかし、フリップ・フロラ7°F1 、F27jEφ□
の立ち下シとφ2の立ち下シの2点でP□電位の同一状
態をサンプルした場合すなわちt2時にはイクスクルー
シプ・ノア・ゲートE□の出力が“1”となシ、その値
を有効なレベルとみなしてスキ′ヤンOクロックφ3の
立ち上シでレジスタF1へその状態値をセットする。
However, flip flora 7°F1, F27jEφ□
If the same state of P□ potential is sampled at two points, the falling edge of The state value is set in the register F1 at the rising edge of the scan O clock φ3.

そして、イクスクルーシプ・オア・ダートE2により、
入力ポートレジスタF、の内容は前回の入力ポートレジ
スタF4のサンプル状態値と比較され、両者が同一の場
合はイクスクルーシプ・オア・ゲートE、の出力は“O
#となシ、フラグレジスタF、はセットされず、両者が
不一致の場合だけF2の出力が“1#となシ、そのタイ
ミングでフラグレジスタvsK” 1″がセットされる
And with Exclusive or Dirt E2,
The contents of input port register F, are compared with the previous sampled state value of input port register F4, and if they are the same, the output of exclusive-or gate E is “O”.
# and flag register F are not set, and only when the two do not match, the output of F2 becomes "1#", and at that timing, flag register vsK "1" is set.

さらに、φ4の立ち上シで、今、サンプルした入力ポー
トレジスタF、の状態値を次の比較のためにレジスタF
4ヘセットしておく。
Furthermore, at the rising edge of φ4, the state value of the input port register F, which has just been sampled, is transferred to the register F for the next comparison.
Set it to 4.

なお、入力端子P□に有効なレベル変化があったことは
フラグレジスタF6のQ端子からMlmlの信号が出力
され、オア・f−)01を通って割込みコントローラI
RCを使用してCPHに知らせる。
In addition, to indicate that there has been a valid level change at the input terminal P□, a signal Mlml is output from the Q terminal of the flag register F6, and is sent to the interrupt controller I through OR/f-)01.
Inform CPH using RC.

CPUはこの時だけレジスタF3を検知してフラグレジ
スタF、をクリアし、次の入力端子P、における状態変
化に備える。
Only at this time, the CPU detects register F3, clears flag register F, and prepares for the next state change at input terminal P.

以上が本発明に係る入力信号センス方式における入力ポ
ートの1スキヤン・サイクル間の動作内容であって、こ
の動作をスキャン・サイクル毎に繰返し行なっているの
である。
The above is the operation of the input port during one scan cycle in the input signal sensing method according to the present invention, and this operation is repeated every scan cycle.

(発明の効果) 以上説萌したように本発明によれば、複数の入力ポート
すべてにチャツタ除去回路と有効レベル検出回路とを設
けることによって、°有効な信号のみを選出し、この信
号を割込みコントローラによってCPUに報知すること
によ、り CPUを動作させる回路方式としたので、プ
ログラム量を少なくすることが可能となfi、CPUに
かかる負担が少なくなシ、高効率の下でCPUを稼動す
ることが可能となったほか、入力ポートにおける入力レ
ベルの変化に対するCPUの応答が迅速化されるなどの
効果が期待できる。
(Effects of the Invention) As explained above, according to the present invention, by providing a chatter removal circuit and a valid level detection circuit for all of the plurality of input ports, only valid signals are selected and this signal is used as an interrupt signal. By using a circuit system that operates the CPU by notifying the CPU by the controller, it is possible to reduce the amount of programs, reduce the burden on the CPU, and operate the CPU with high efficiency. In addition, it is possible to expect effects such as speeding up the CPU's response to changes in the input level at the input port.

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

第1図は本発明i−−実施例を示すブロック図、第2図
は本発明主要部の具体的構成を示す回路図、第3図は本
発明主要部の波形図、第4図は従来方式を示すブロック
図である。 F□〜F、・・・フリップ・フロッグ、E工・・・イク
スクルーシプ・ノア・ゲート、E2・・・イクスクルー
シプ・オア・ダート、A□ gA2・・・アンド・グー
)、O□・・・オア・グー)% p、〜Pn・・・入力
端子、L1〜Ln・・・入力ポート。
Fig. 1 is a block diagram showing an embodiment of the present invention, Fig. 2 is a circuit diagram showing a specific configuration of the main part of the present invention, Fig. 3 is a waveform diagram of the main part of the present invention, and Fig. 4 is a conventional It is a block diagram showing a method. F□~F,...Flip frog, E-engine...exclusive noah gate, E2...exclusive or dirt, A□ gA2...and goo), O□ ...or goo)% p, ~Pn...input terminal, L1~Ln...input port.

Claims (1)

【特許請求の範囲】[Claims] CPUにより複数の入力ポートの信号監視を行なうシス
テムにおいて、すべての入力ポートは、入力端子に並列
に接続されかつ、同一周期で異なる位相のスキャン・ク
ロックの第1、第2クロックによりそれぞれ動作させら
れるフリップフロップF_1、F_2と、このフリップ
フロップF_1、F_2の出力が同一レベルの場合にの
み動作するイクスクルーシブ・ノア・ゲートE_1とか
ら成るチャッタ信号除去回路と、該チャッタ信号除去回
路から出力された有効レベル信号と前記スキャン・クロ
ックの第3、第4クロックとのアンドゲートA_1、A
_2の各出力により動作するレジスタF_3、F_4と
、前記フリップ・フロップF_1の出力信号をレジスタ
F_3に入力せしめると共に、レジスタF_3の出力を
レジスタF_4に入力せしめ、レジスタF_3とレジス
タF_4の各出力レベルが不一致の場合にのみ動作する
イクスクルーシブ・オア・ゲートE_2と、このオア・
ゲートE_2からの出力により動作するフラグレジスタ
F_5とから成る有効レベル検出回路とを備え、前記ス
キャン・クロックのスキャン・サイクルを繰返すことに
より複数の入力ポートで選択された有効レベル信号をオ
ア・ゲートO_1を介して割込みコントローラIRCに
送信し、該割込みコントローラによってCPUに報知す
ることにより複数の入力ポートの信号監視を行なうこと
を特徴とする入力信号センス方式。
In a system in which signals of multiple input ports are monitored by a CPU, all input ports are connected to input terminals in parallel and are respectively operated by the first and second clocks of scan clocks having the same period and different phases. A chatter signal removal circuit consisting of flip-flops F_1 and F_2 and an exclusive NOR gate E_1 that operates only when the outputs of the flip-flops F_1 and F_2 are at the same level; AND gates A_1, A of the valid level signal and the third and fourth clocks of the scan clocks;
The output signals of registers F_3 and F_4 operated by the respective outputs of register F_2 and the flip-flop F_1 are inputted to register F_3, and the output of register F_3 is inputted to register F_4, so that each output level of register F_3 and register F_4 is Exclusive or gate E_2, which operates only in case of mismatch, and this or gate
and a flag register F_5 operated by the output from the gate E_2, and by repeating the scan cycle of the scan clock, the valid level signals selected at the plurality of input ports are detected by the OR gate O_1. An input signal sensing method characterized in that signals of a plurality of input ports are monitored by transmitting signals to an interrupt controller IRC via an interrupt controller and notifying a CPU by the interrupt controller.
JP13195185A 1985-06-19 1985-06-19 Input signal sensing system Pending JPS61290560A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP13195185A JPS61290560A (en) 1985-06-19 1985-06-19 Input signal sensing system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP13195185A JPS61290560A (en) 1985-06-19 1985-06-19 Input signal sensing system

Publications (1)

Publication Number Publication Date
JPS61290560A true JPS61290560A (en) 1986-12-20

Family

ID=15070020

Family Applications (1)

Application Number Title Priority Date Filing Date
JP13195185A Pending JPS61290560A (en) 1985-06-19 1985-06-19 Input signal sensing system

Country Status (1)

Country Link
JP (1) JPS61290560A (en)

Similar Documents

Publication Publication Date Title
US6321289B1 (en) Apparatus for automatically notifying operating system level applications of the occurrence of system management events
US6463492B1 (en) Technique to automatically notify an operating system level application of a system management event
JPS61290560A (en) Input signal sensing system
JPS61105147A (en) Clock interruption detection circuit
JPS5914005A (en) Sequence controlling system by microcomputer
JPH03250226A (en) Watchdog timer
JPS61193224A (en) Sequence fault detector for polyphase clock
JP3068317B2 (en) Microcomputer
JPS6184111A (en) Clock interruption detecting circuit
JPS61107811A (en) State supervisory circuit
JPH0498540A (en) Processor load monitoring system
SU1387000A1 (en) Device for generating instruction flag
JPS62232016A (en) Clock break detecting circuit
JPS62216048A (en) Runaway detecting system for processor
JPH0277854A (en) Resetting system for microprocessor
JPH03157739A (en) Performance measuring system for epu
JPH02171814A (en) High speed counter
JPH04122157A (en) Fault state detection circuit
JPH01123329A (en) Interrupting circuit
JPS61241848A (en) Fault detecting circuit for electronic computer
JPH0452977B2 (en)
JPH01290041A (en) Interruption control circuit
JPH04286036A (en) Watch dog timer device
JPS62190537A (en) Program execution monitor method
JPH02234240A (en) Information processor