JPH0834417B2 - Input control circuit - Google Patents

Input control circuit

Info

Publication number
JPH0834417B2
JPH0834417B2 JP62278013A JP27801387A JPH0834417B2 JP H0834417 B2 JPH0834417 B2 JP H0834417B2 JP 62278013 A JP62278013 A JP 62278013A JP 27801387 A JP27801387 A JP 27801387A JP H0834417 B2 JPH0834417 B2 JP H0834417B2
Authority
JP
Japan
Prior art keywords
circuit
signal
input
output
input signal
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
JP62278013A
Other languages
Japanese (ja)
Other versions
JPH01120115A (en
Inventor
善久 生田
Original Assignee
三田工業株式会社
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 三田工業株式会社 filed Critical 三田工業株式会社
Priority to JP62278013A priority Critical patent/JPH0834417B2/en
Publication of JPH01120115A publication Critical patent/JPH01120115A/en
Publication of JPH0834417B2 publication Critical patent/JPH0834417B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Description

【発明の詳細な説明】 (イ)産業上の利用分野 この発明は、例えばチャタリングやノイズを含む外部
入力信号を受けても、それらを除去して出力する入力制
御回路に関し、たとえば、マイクロコンピュータのI/O
ポートに使用される。
TECHNICAL FIELD The present invention relates to an input control circuit that removes and outputs an external input signal including chattering and noise, for example, in a microcomputer. I / O
Used for port.

(ロ)従来の技術 一般にマイクロコンピュータを使用した各種機器、例
えば電子写真複写機においては、スイッチやリレー等を
用いた周辺回路からの信号がマイクロコンピュータに入
力されるようになっているが、その入力信号にはチャタ
リングやノイズが含まれるため、それらによってマイク
ロコンピュータが誤動作しないよう入力信号を処理する
必要がある。そこで従来、入力信号をコンデンサと抵抗
からなる積分回路で遅延させて処理する方法やマイクロ
コンピュータ内のソフトウェアによって処理する方法が
提案されている。
(B) Prior Art Generally, in various devices using a microcomputer, for example, in an electrophotographic copying machine, signals from peripheral circuits using switches, relays, etc. are input to the microcomputer. Since the input signal contains chattering and noise, it is necessary to process the input signal so that the microcomputer does not malfunction. Therefore, conventionally, a method of delaying an input signal by an integrating circuit composed of a capacitor and a resistor and a method of processing it by software in a microcomputer have been proposed.

(ハ)発明が解決しようとする問題点 ところで、周辺回路から入力される信号は、その信号
の種類に応じてチャタリングやノイズの周波数や継続期
間が異なるので、誤動作・誤検知なく速やかに信号を処
理するためには、各入力信号の種類に応じた処理が必要
となる。しかしながら、コンデンサと抵抗等による積分
回路では、その時定数を入力信号の種類に応じて個々に
変更あるいは調整することは容易ではなく、またソフト
フェアによる処理においては、入力信号の種類に対応す
る処理が頻繁となり、CPUの負担が大きくなるという問
題点があった。
(C) Problems to be solved by the invention By the way, since the frequency and duration of chattering and noise of the signal input from the peripheral circuit differ depending on the type of the signal, the signal can be promptly output without malfunction or false detection. In order to process, processing according to the type of each input signal is required. However, it is not easy to individually change or adjust the time constant of the integration circuit using capacitors and resistors according to the type of input signal, and in the processing by software, the processing corresponding to the type of input signal is not possible. There was a problem that it became frequent and the burden on the CPU increased.

この発明は、このような事情を考慮してなされたもの
で、入力信号の種類に対応して適切に信号処理を容易に
行うことが可能な入力制御回路を提供するものである。
The present invention has been made in consideration of such circumstances, and provides an input control circuit capable of easily and appropriately performing signal processing in accordance with the type of input signal.

(ニ)問題点を解決するための手段 この発明は、外部入力信号をシフトパルスに同期して
初段から最終段に向かって順次シフトする複数段の直列
レジスタと、前記レジスタの初段からの任意の段数を指
定する指定回路と、指定された各段の論理値を比較しそ
れらの論理値が一致した時点で出力する比較回路と、比
較回路の出力を受けて前記レジスタの初段の論理値を取
り込むラッチ回路を備え、外部入力信号を遅延させ不要
信号を除去して真の外部入力信号値として出力すること
を特徴とする入力制御回路である。
(D) Means for Solving the Problems The present invention is directed to a plurality of serial registers that sequentially shift an external input signal from the first stage to the last stage in synchronization with a shift pulse, and an arbitrary serial register from the first stage of the registers. A designated circuit that designates the number of stages, a comparison circuit that compares the logical values of the designated stages and outputs when the logical values match, and a logical value of the first stage of the register is received in response to the output of the comparison circuit. An input control circuit comprising a latch circuit, delaying an external input signal, removing an unnecessary signal, and outputting as a true external input signal value.

(ホ)作用 レジスタに外部入力信号が入力されると、シフトパル
スに同期して順次シフトされる。指定回路によって指定
された段数の論理値が比較回路によって比較され、それ
らが一致した時点で外部入力信号の論理値がラッチ回路
に取り込まれて出力される。つまり外部入力信号は、指
定回路によって指定された段数のレジスタのシフト期間
だけ同じ論理値を持続することが確認された上で出力さ
れる。従って、入力信号に含まれるチャタリングやノイ
ズ期間に対応してレジスタの段数を指定すれば、外部入
力信号はチャタリングやノイズが適切に除去されて出力
されることになる。
(E) Operation When an external input signal is input to the register, it is sequentially shifted in synchronization with the shift pulse. The comparison circuit compares the logical values of the number of stages designated by the designating circuit, and when they match, the logical value of the external input signal is taken into the latch circuit and output. That is, the external input signal is output after it is confirmed that the same logical value is maintained for the shift period of the register having the number of stages designated by the designation circuit. Therefore, if the number of stages of the register is designated in accordance with the chattering or noise period included in the input signal, the chattering or noise is appropriately removed and the external input signal is output.

(ヘ)実施例 以下、図面に示す実施例に基づいて、この発明を詳述
する。これによって、この発明が限定されるものではな
い。
(F) Embodiment Hereinafter, the present invention will be described in detail based on an embodiment shown in the drawings. This does not limit the present invention.

第1図はこの発明をCPUの入力処理に適用する場合の
一実施例を示す電気回路図であり、1は入力信号を受け
るバッファ、2はバッファ1からの入力をクロックパル
スCLOCKによって順次シフトし各シフト信号B0〜B4を出
力するシフトレジスタ、3a〜3dはそれぞれ信号B0とB1、
B1とB2、B2とB3、B3とB4が入力され信号D1〜D4を出力す
るExclusivelyOR回路(以下EX・OR回路という)、4はC
PUからのデータ信号DATAによって入力される指定信号を
ラッチし書き込み指定出力▲▼を受けたときに信号
C1〜C4として出力するレジスタ、5a〜5dはそれぞれ信号
C1〜C4と信号D1〜D4の各対が入力されるAND回路、6はA
ND回路5a〜5dの出力E1〜E4が入力されるOR回路、7はOR
回路6の出力Fとクロック信号CLOCKが入力されるAND回
路、8は信号B0をAND回路7の出力Gを受けた時に出力
すると共に保持するフリップフロップ回路、9はフリッ
プフロップ回路8の出力YをCPUからの読み出し指定出
力▲▼を受けたときに信号Y1として出力する3ステ
ート・バッファである。
FIG. 1 is an electric circuit diagram showing an embodiment in which the present invention is applied to an input processing of a CPU. 1 is a buffer for receiving an input signal, 2 is an input from the buffer 1 sequentially shifted by a clock pulse CLOCK. A shift register that outputs each shift signal B0 to B4, 3a to 3d are signals B0 and B1, respectively.
Exclusively OR circuit that inputs B1 and B2, B2 and B3, B3 and B4 and outputs signals D1 to D4 (hereinafter referred to as EX / OR circuit), 4 is C
Signal when the designated signal input by the data signal DATA from the PU is latched and the write designated output ▲ ▼ is received.
Registers output as C1 to C4, 5a to 5d are signals
AND circuit to which each pair of C1 to C4 and signals D1 to D4 is input, 6 is A
OR circuit to which outputs E 1 to E 4 of ND circuits 5a to 5d are input, 7 is an OR circuit
An AND circuit to which the output F of the circuit 6 and the clock signal CLOCK are input, 8 is a flip-flop circuit that outputs and holds the signal B0 when the output G of the AND circuit 7 is received, and 9 is an output Y of the flip-flop circuit 8. It is a three-state buffer that outputs as signal Y 1 when it receives the read designation output ▲ ▼ from the CPU.

第2図は第1図の実施例の動作を示すタイムチャート
であり、入力信号Xが「1」から「0」にチャタリング
波形を有して変化するとき、そのチャタリング波形が除
去されて信号Yとして出力される状況を示す。つまり、
入力信号Xがシフトレジスタ2に読み込まれ順次シフト
されると、その出力信号B0〜B4は第2図のようになる。
そして、これらの信号B0〜B4が一対ずつ入力されるEX・
OR回路3a〜3dの出力D1〜D4は第2図に示すように入力が
不一致のときに「1」となり入力が一致したときに
「0」となる。ところで今、レジスタ4の出力C1,C2が
「1」でC3,C4が「0」となるように、レジスタ4がCPU
からのデータ信号DATAによってセットされていると、AN
D回路5c,5dの出力E3,E4は入力D3,D4の如何にかかわらず
常に「0」となる。一方、AND回路5a,5bは入力D1,D2が
それぞれ「0」のときのみ出力E1,E2が「0」となる。
つまり、信号B0,B1,B2の論理値が共に0に一致したとき
にOR回路6の出力Fが「0」となり、AND回路7はこの
信号Fとクロック信号が共に「0」になった時「1」の
信号Gを出力する。従って、フリップフロップ回路8は
信号Gが「1」になった時に信号B0を読み込み信号Yと
して出力すると共にその状態を保持する。3ステート・
バッファ9はCPUから読みだし指定出力▲▼が出力
された時にフリップフロップ8に保持されている信号Y
を信号Y1として出力する。
FIG. 2 is a time chart showing the operation of the embodiment shown in FIG. 1. When the input signal X changes from "1" to "0" with a chattering waveform, the chattering waveform is removed and the signal Y is removed. Indicates the situation that is output as. That is,
When the input signal X is read into the shift register 2 and sequentially shifted, the output signals B0 to B4 are as shown in FIG.
Then, these signals B0 to B4 are input in pairs
The outputs D1 to D4 of the OR circuits 3a to 3d are "1" when the inputs do not match and "0" when the inputs match, as shown in FIG. By the way, now, register 4 is a CPU so that outputs C1 and C2 of register 4 are "1" and C3 and C4 are "0".
When set by the data signal DATA from
The outputs E3, E4 of the D circuits 5c, 5d are always "0" regardless of the inputs D3, D4. On the other hand, in the AND circuits 5a and 5b, the outputs E1 and E2 are "0" only when the inputs D1 and D2 are "0", respectively.
That is, when the logical values of the signals B0, B1 and B2 all match 0, the output F of the OR circuit 6 becomes "0", and the AND circuit 7 outputs "0" when both the signal F and the clock signal become "0". The signal G of "1" is output. Therefore, the flip-flop circuit 8 outputs the signal B0 as the read signal Y and holds the state when the signal G becomes "1". 3 states
The buffer 9 outputs the signal Y held in the flip-flop 8 when the designated output ▲ ▼ read from the CPU is output.
Is output as signal Y1.

このようにして入力信号Xは十分に安定した値になっ
た後、すなわち時間Td(第2図)だけ遅延させた後に検
出されるので、時間Tdの間に生じるチャタリングやノイ
ズが入力信号Xから除去されることになる。なお、この
遅延時間Tdは前述のようにCPUからのデータ信号DATAに
よってレジスタ4の出力を設定することにより任意に制
御することが可能であり、入力信号Xのチャタリングや
ノイズの状況に対応させることができる。また、時間Td
はクロックパルスの周期を変化させることによっても、
もちろん調整可能である。
In this way, the input signal X is detected after it has reached a sufficiently stable value, that is, after being delayed by the time Td (FIG. 2), so that chattering and noise occurring during the time Td are generated from the input signal X. Will be removed. The delay time Td can be arbitrarily controlled by setting the output of the register 4 by the data signal DATA from the CPU, as described above, and can be adjusted according to the chattering of the input signal X or the situation of noise. You can Also, time Td
By changing the period of the clock pulse,
Of course it is adjustable.

第3図はこの発明の他の実施例を示し、第1図の入力
制御回路を基本回路として構成した複数の入出力が可能
なプログラマブルI/Oポートの電気回路図である。同図
において、PA0〜PAnは外部接続用入出力端子、PB0〜PB7
はCPUのデータバスDB0〜DB7に接続される端子,K1〜K7
は第1図において破線Kで囲んで示した入力処理回路、
L1〜L7は端子PA0〜PA7からの信号を入力処理回路K1〜K7
に入力するバッファ(第1図におけるバッファ1に相当
する)、M1〜M7は入力処理回路K1〜K7の出力を受けてデ
ータバスDB0〜DB7へ出力する3ステート・バッファ(第
1図のバッファ9に相当する)、F1〜F7はデータバスDB
0〜DB7から出力される信号を保持するフリップフロップ
回路、J1〜J7はフリップフロップ回路F1〜F7の出力を端
子PA0〜PA7へ出力する3ステート・バッファ、11はCPU
のデータバスDB0〜DB7の信号を受けて3ステート・バッ
ファJ1〜J7を制御し端子PA0〜PA7の入出力を設定するレ
ジスタ、12はCPUのデータバスDB0〜DB7の信号を受けて
入力処理回路K1〜K7の処理時間を設定するレジスタ(第
1図のレジスタ4に相当する)、13はCPUからのアドレ
スバス信号AB0〜AB7を受けてレジスタ11及び12を制御す
るデコーダ、14はCPUからの書き込み指定出力▲▼
とデコーダ13の出力を受けそれらが共に「1」のときに
フリップフロップF1〜F7をセットするAND回路である。
FIG. 3 shows another embodiment of the present invention and is an electric circuit diagram of a programmable I / O port capable of a plurality of inputs / outputs, which is constructed by using the input control circuit of FIG. 1 as a basic circuit. In the figure, PA 0 to PA n are input / output terminals for external connection, PB 0 to PB 7
Is a pin connected to the CPU data buses DB 0 to DB 7 , K 1 to K 7
Is an input processing circuit surrounded by a broken line K in FIG.
L 1 ~L 7 is input process signals from the terminal PA 0 ~PA 7 circuit K 1 ~K 7
A buffer (corresponding to the buffer 1 in FIG. 1), M 1 to M 7 receives the outputs of the input processing circuits K 1 to K 7 and outputs them to the data buses DB 0 to DB 7 (three state buffers). (Corresponding to the buffer 9 in FIG. 1), F 1 to F 7 are data buses DB
Flip-flop circuit for holding signals output from 0 to DB 7 , J 1 to J 7 are 3-state buffers that output the outputs of the flip-flop circuits F 1 to F 7 to terminals PA 0 to PA 7 , and 11 is a CPU
Data bus DB 0 controls the signal receiving and 3-state buffer J 1 through J 7 of to DB 7 register sets the input and output terminals PA 0 ~PA 7 of 12 data buses DB 0 to DB 7 of the CPU A register (corresponding to the register 4 in FIG. 1) for setting the processing time of the input processing circuits K 1 to K 7 in response to the signal No. 13 and a register 11 for receiving the address bus signals AB 0 to AB 7 from the CPU. Decoders controlling 12 and 12, 14 is a write designation output from the CPU ▲ ▼
Is an AND circuit which receives the outputs of the decoder 13 and the decoder 13 and sets the flip-flops F 1 to F 7 when they are both “1”.

このように構成することによって、データバスDB0〜D
B7から入力される信号は、フリップフロップF1〜F7に一
旦保持され、レジスタ11によって指示されるタイミング
に端子PA0〜PA7へ出力される。一方、端子PA0〜PA7から
入力される信号は第1図に示す入力信号Xと同様に入力
処理回路K1〜K7を介して処理された後に、CPUからの読
み出し指定出力▲▼のタイミングに合わせてデータ
バスDB0〜DB7に出力されチャタリングやノイズが除去さ
れることになる。このようにして、第1図に示す入力制
御回路を用いたプログラマブルI/Oポートが構成され
る。また、第3図に示すプログラマブルI/Oポートはす
べてロジック回路から構成されるので、容易にLSI化す
ることが可能である。
With this configuration, the data buses DB 0 to D
The signal input from B 7 is once held in the flip-flops F 1 to F 7 , and output to the terminals PA 0 to PA 7 at the timing designated by the register 11. On the other hand, after the signal inputted from the terminal PA 0 ~PA 7 is processed through an input signal X as well as the input processing circuit K 1 ~K 7 shown in FIG. 1, the read designated output from the CPU ▲ ▼ of Chattering and noise will be output to the data buses DB 0 to DB 7 at the timing. In this way, a programmable I / O port using the input control circuit shown in FIG. 1 is constructed. Further, since the programmable I / O ports shown in FIG. 3 are all composed of logic circuits, they can be easily made into an LSI.

(ト)発明の効果 この発明によれば、入力信号に含まれるチャタリング
やノイズが確実に除去される入力制御回路がハードウェ
アによって構成され、CPUは処理された信号を必要なと
きに読み込むだけでよく、信号のソフトウェアによる処
理がほとんど不要となる。更に、入力信号の種類に応じ
て入力処理時間つまりチャタリングやノイズの除去時間
が任意に設定される。また、ロジックで構成することが
可能であるためLSI化が容易である。
(G) Effect of the Invention According to the present invention, the input control circuit that reliably removes chattering and noise included in the input signal is configured by hardware, and the CPU simply reads the processed signal when necessary. Well, little software processing of the signal is required. Further, the input processing time, that is, the chattering or noise removal time is arbitrarily set according to the type of the input signal. In addition, since it can be configured with logic, it can be easily integrated into an LSI.

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

第1図はこの発明の一実施例を示す回路図、第2図は第
1図の動作を説明するタイムチャート、第3図はこの発
明の他の実施例を示す電気回路図である。 1……バッファ、2……シフトレジスタ、3a〜3d……Ex
clusivelyOR回路、4……レジスタ、5a〜5d……AND回
路、6……OR回路、7……AND回路、8……フリップフ
ロップ、9……3ステート・バッファ。
FIG. 1 is a circuit diagram showing an embodiment of the present invention, FIG. 2 is a time chart for explaining the operation of FIG. 1, and FIG. 3 is an electric circuit diagram showing another embodiment of the present invention. 1 ... buffer, 2 ... shift register, 3a-3d ... Ex
Exclusively OR circuit, 4 ... Register, 5a-5d ... AND circuit, 6 ... OR circuit, 7 ... AND circuit, 8 ... Flip-flop, 9 ... 3-state buffer.

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】外部入力信号をシフトパルスに同期して初
段から最終段に向かって順次シフトする複数段の直列レ
ジスタと、前記レジスタの初段からの任意の段数を指定
する指定回路と、指定された各段の論理値を比較しそれ
らの論理値が一致した時点で出力する比較回路と、比較
回路の出力を受けて前記レジスタの初段の論理値を取り
込むラッチ回路を備え、外部入力信号を遅延させ不要信
号を除去して真の外部入力信号値として出力することを
特徴とする入力制御回路。
1. A serial register having a plurality of stages for sequentially shifting an external input signal from a first stage to a last stage in synchronization with a shift pulse, and a designation circuit for designating an arbitrary number of stages from the first stage of the register. Comparing the logic values of each stage and outputting when the logic values match, and a latch circuit that receives the output of the comparison circuit and captures the logic value of the first stage of the register, delays the external input signal An input control circuit characterized by removing unnecessary signals and outputting as a true external input signal value.
JP62278013A 1987-11-02 1987-11-02 Input control circuit Expired - Lifetime JPH0834417B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP62278013A JPH0834417B2 (en) 1987-11-02 1987-11-02 Input control circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP62278013A JPH0834417B2 (en) 1987-11-02 1987-11-02 Input control circuit

Publications (2)

Publication Number Publication Date
JPH01120115A JPH01120115A (en) 1989-05-12
JPH0834417B2 true JPH0834417B2 (en) 1996-03-29

Family

ID=17591421

Family Applications (1)

Application Number Title Priority Date Filing Date
JP62278013A Expired - Lifetime JPH0834417B2 (en) 1987-11-02 1987-11-02 Input control circuit

Country Status (1)

Country Link
JP (1) JPH0834417B2 (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0221317A (en) * 1988-07-08 1990-01-24 Fujitsu Ltd Input signal processing system
JP2803167B2 (en) * 1989-05-31 1998-09-24 日本電気株式会社 Control line instantaneous interruption recognition prevention circuit
JPH03268563A (en) * 1990-03-16 1991-11-29 Mita Ind Co Ltd Laser beam controller
JPH0475121A (en) * 1990-07-17 1992-03-10 Mitsubishi Electric Corp Input interface circuit for automobile
EP0479537B1 (en) * 1990-10-03 1999-01-20 Canon Kabushiki Kaisha Image formation apparatus
JPH04158619A (en) * 1990-10-23 1992-06-01 Nec Corp Input circuit

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5246749A (en) * 1975-10-11 1977-04-13 Nippon Syst Kogyo Kk Noise eliminator

Also Published As

Publication number Publication date
JPH01120115A (en) 1989-05-12

Similar Documents

Publication Publication Date Title
US5489865A (en) Circuit for filtering asynchronous metastability of cross-coupled logic gates
JP2576366B2 (en) Variable delay buffer circuit
JPH0834417B2 (en) Input control circuit
JPH0758609A (en) Glitch suppression circuit and method thereof
JP3380329B2 (en) Digital data arbitration device
US6202185B1 (en) Methods and apparatus for facilitating scan testing of circuitry
JP2853612B2 (en) Semiconductor storage device
JPS581810B2 (en) latch circuit
JP2545986B2 (en) Logical path multiplexing method
KR100237298B1 (en) Interrupt signal generating control apparatus
JPH1185306A (en) Clock switch circuit
JPH01212018A (en) Pulse noise elimination circuit
JP3245869B2 (en) Polarity selection processing circuit
JP3765644B2 (en) Sequential circuit
JP2664109B2 (en) Real-time port
JPH0486116A (en) Digital signal processing circuit
JPH04259114A (en) Logic circuit
JPH04360217A (en) Method for reading counter
JPH0767070B2 (en) Select circuit
JPS62211766A (en) Reading circuit
JPH0560136B2 (en)
JPH04237208A (en) Monostable multivibrator circuit
JPH1197988A (en) Clock switching circuit
JPH05243923A (en) Noise elimination circuit
JPH04369321A (en) Microwave oven