JPS6313503Y2 - - Google Patents

Info

Publication number
JPS6313503Y2
JPS6313503Y2 JP17831582U JP17831582U JPS6313503Y2 JP S6313503 Y2 JPS6313503 Y2 JP S6313503Y2 JP 17831582 U JP17831582 U JP 17831582U JP 17831582 U JP17831582 U JP 17831582U JP S6313503 Y2 JPS6313503 Y2 JP S6313503Y2
Authority
JP
Japan
Prior art keywords
circuit
signal
period
output signal
time
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
Application number
JP17831582U
Other languages
Japanese (ja)
Other versions
JPS5982871U (en
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 filed Critical
Priority to JP17831582U priority Critical patent/JPS5982871U/en
Publication of JPS5982871U publication Critical patent/JPS5982871U/en
Application granted granted Critical
Publication of JPS6313503Y2 publication Critical patent/JPS6313503Y2/ja
Granted legal-status Critical Current

Links

Landscapes

  • Measuring Frequencies, Analyzing Spectra (AREA)

Description

【考案の詳細な説明】 技術分野 本考案は周期測定回路に関し、特に多種入力信
号の周期を互いに独立して測定するための周期測
定回路に関するものである。
[Detailed Description of the Invention] Technical Field The present invention relates to a period measuring circuit, and more particularly to a period measuring circuit for independently measuring the periods of various input signals.

背景技術 周期測定回路は、入力信号の周期を測定するこ
とによつて、例えば回転速度等の物理量測定を行
なうものである。例えば自動車の電子制御装置に
於いては、車輪の回転を検出するセンサーから発
せられる回転パルス信号の周期を測定することに
より車輪の回転速度を算出しており、またエンジ
ンの点火パルス周期を測定することにより回転速
度を算出し、これらの算出値を基にして各種の制
御を行なつている。このように、自動車の電子制
御装置においては、周期測定回路が必要不可欠な
ものとなつており、特に近年においては電子制御
の複雑化および前後輪の回転を検出してブレーキ
操作時の車輪ロツクを防止するアンチスキツド装
置の導入等に伴なつて、周期測定を必要とする信
号の数も多くなつている。
BACKGROUND ART A period measuring circuit measures a physical quantity such as rotational speed by measuring the period of an input signal. For example, in the electronic control system of a car, the rotational speed of the wheel is calculated by measuring the period of the rotation pulse signal emitted from the sensor that detects the rotation of the wheel, and the ignition pulse period of the engine is also calculated. The rotational speed is thereby calculated, and various controls are performed based on these calculated values. As described above, cycle measurement circuits have become indispensable in electronic control systems for automobiles.Especially in recent years, electronic control has become more complex and the rotation of the front and rear wheels can be detected to lock the wheels during brake operation. With the introduction of antiskid devices to prevent skidding, the number of signals that require period measurement is also increasing.

第1図は従来一般に用いられているマイクロプ
ロセツサーを用いた周期測定回路の一例を示す回
路図であつて、カウンタ1はクロツク発振回路2
から供給される基準クロツクパルスCPを順次計
数しており、デイレイ回路3を介して多少遅らさ
れた入力信号INが供給される毎に計数値がリセ
ツトされる。従つて、このカウンタ1は入力信号
INの各周期間に於けるクロツクパルスCPの数を
計数していることになり、その計数値はリセツト
される直前に入力信号INをラツチ制御入力とす
るラツチ回路4に保持される。
FIG. 1 is a circuit diagram showing an example of a period measuring circuit using a microprocessor commonly used in the past, in which a counter 1 is connected to a clock oscillation circuit 2.
The reference clock pulse CP supplied from the circuit 3 is sequentially counted, and the count value is reset each time an input signal IN delayed to some extent is supplied via the delay circuit 3. Therefore, this counter 1 receives the input signal
This means that the number of clock pulses CP during each period of IN is counted, and the counted value is held in the latch circuit 4 which uses the input signal IN as a latch control input immediately before being reset.

一方、入力信号INをインタラプト信号とする
マイクロプロセツサー5は、入力信号INが供給
される毎にデータバスDBを介して供給されるラ
ツチ回路4の出力値を取り込み、そのデータに基
準クロツクパルスCPの周期を乗算する演算処理
を実行することにより入力信号の周期を求めて送
出する。このような処理を入力信号INが供給さ
れる毎に繰り返し実行することにより、入力信号
INの各周期を順次測定することが出来るもので
ある。
On the other hand, the microprocessor 5, which uses the input signal IN as an interrupt signal, takes in the output value of the latch circuit 4 supplied via the data bus DB every time the input signal IN is supplied, and uses that data as the reference clock pulse CP. The period of the input signal is determined and sent by performing arithmetic processing to multiply the period of the input signal. By repeating this process every time the input signal IN is supplied, the input signal
Each cycle of IN can be measured sequentially.

しかしながら、上記構成による周期測定回路に
於いては、多種の入力信号に対する周期測定を行
なうことが出来ず、周期測定を必要とする信号の
種類が多い例えば自動車の電子制御回路に用いる
のには不適である。
However, the period measuring circuit with the above configuration cannot perform period measurements on a wide variety of input signals, and is therefore unsuitable for use in electronic control circuits of automobiles, for example, where there are many types of signals that require period measurement. It is.

これに対して、各入力信号の種別毎に入力信号
によつてクリアされて基準クロツク信号を計数す
るカウンタと、この各カウンタのリセツト直前に
於ける計数値をそれぞれ保持するラツチ回路とを
設け、各入力信号の論理和信号によりマイクロプ
ロセツサーを割り込み状態として各ラツチ回路の
出力値を取り込ませることも考えられるが、マイ
クロプロセツサーはインタラプト信号を受けてか
ら次のインタラプト信号の受け入れが可能となる
までに再インタラプト時間T1を必要とする。つ
まり、マイクロプロセツサーはインタラプト信号
を受け入れるとデータを取り込んで処理を行なつ
た後に元のルーチンに戻つて次のインタラプト信
号が受けられる状態となる。従つて、複数入力信
号が互いに時間T1以下の間隔で供給された場合
には、ラツチ回路の出力値をマイクロプロセツサ
ーに取り込めなくなる問題を有している。
On the other hand, a counter that is cleared by the input signal and counts the reference clock signal for each type of input signal, and a latch circuit that holds the count value immediately before each counter is reset are provided. It is also possible to put the microprocessor into an interrupt state using the OR signal of each input signal and have it take in the output value of each latch circuit, but the microprocessor can only accept the next interrupt signal after receiving the interrupt signal. A re-interrupt time T 1 is required until this happens. That is, when the microprocessor receives an interrupt signal, it takes in the data and processes it, then returns to the original routine and becomes ready to receive the next interrupt signal. Therefore, if a plurality of input signals are supplied at intervals of less than time T1 , there is a problem that the output value of the latch circuit cannot be taken into the microprocessor.

考案の開示 従つて、本考案による目的は、時間的に近接し
て発生される多種の入力信号に対してもそれぞれ
の周期を測定することが出来る周期測定回路を提
供することである。
DISCLOSURE OF THE INVENTION Accordingly, an object of the present invention is to provide a period measuring circuit that can measure the periods of various input signals generated close to each other in time.

このような目的を達成するために本考案は、多
種入力信号の論理和を求めるとともに、この論理
和信号がマイクロプロセツサーの再インタラプト
期間T1以下に近接している場合には予め定めら
れた期間T2にわたつて遅延させることにより両
信号を再インタラプト期間T1以上とする処理を
行なつて多入力信号に対する合成入力信号を作
り、この合成入力信号の各周期間に発生される基
準クロツクパルスの計数値を前記合成入力信号が
インタラプト信号としてマイクロプロセツサーに
供給される毎に順次に取り込ませ、マイクロプロ
セツサーはインタラプト信号が属する入力信号の
種別の判別と遅延の有無を判別するとともに、同
種入力信号に応じたインタラプト信号の発生間に
於ける前記基準クロツクパルスの計数値を求め、
かつ前記期間T2にわたる遅延処理の有無から修
正を加えて各入力信号に対する周期の測定値を算
出して出力するものである。
In order to achieve such an objective, the present invention calculates the logical sum of various input signals, and if this logical sum signal is close to the re-interrupt period T1 of the microprocessor, the predetermined A synthesized input signal for multiple input signals is created by delaying both signals over a period T 2 for a re-interrupt period T 1 or more, and a reference signal generated between each period of this synthesized input signal is processed. Each time the synthesized input signal is supplied to the microprocessor as an interrupt signal, the count value of the clock pulse is sequentially taken in, and the microprocessor determines the type of input signal to which the interrupt signal belongs and determines whether there is a delay. At the same time, determine the count value of the reference clock pulse between the generation of the interrupt signal in response to the same type of input signal,
Further, the measurement value of the period for each input signal is calculated and outputted by making corrections based on the presence or absence of delay processing over the period T2 .

このように構成された周期測定回路に於いて
は、複数種の入力信号に対するそれぞれの周期測
定が行なえるために、従来のように入力信号別に
測定回路を設ける必要がなくなり、これに伴なつ
て複数種の入力信号に対する周期をそれぞれ測定
する場合に於けるコストが大幅に低下する。ま
た、同一回路を利用して複数種の入力信号に対す
る周期測定を行なうものであるために、回路が簡
略化されて装置の小型化に適したものとなる等の
種々優れた効果を有する。
In the period measurement circuit configured in this way, it is possible to measure the periods of multiple types of input signals, so there is no need to provide a measurement circuit for each input signal as in the past. The cost when measuring the periods of multiple types of input signals is significantly reduced. In addition, since the same circuit is used to measure the periods for a plurality of types of input signals, it has various excellent effects, such as simplifying the circuit and making it suitable for downsizing the device.

考案を実施するための最良の形態 以下本考案に係る周期測定回路を図面を用いて
詳述する。
BEST MODE FOR CARRYING OUT THE INVENTION The period measuring circuit according to the present invention will be described in detail below with reference to the drawings.

第2図は本考案による周期測定回路の一実施例
を示す回路図であつて、第1図と同一部分は同記
号を用いて示してある。同図に於いて、6は負論
理の2種入力信号A,Bを入力とするアンドゲー
トであつて、入力信号に対する論理和信号Cを出
力する。7は第1モノマルチバイブレータ回路で
あつて、アンドゲート6から発生される出力信号
の後縁によりトリガされて、マイクロプロセツサ
ー5の再インタラプト期間T1の時間幅を有する
パルスを発生する。そして、この第1モノマルチ
バイブレータ回路7はその動作中に再びトリガさ
れると、この時点から再び期間T1にわたつて出
力を発生し続けるトリガタイプとなつている。8
はアンドゲート6の出力信号Cと第1モノマルチ
バイブレータ7のセツト出力信号Q1とを入力と
して出力信号Dを発生する第1ゲート回路例えば
オアゲート、9はアンドゲート6の出力信号Cと
モノマルチバイブレータ回路7のリセツト出力信
1とを入力とする第3ゲート回路例えばオア
ゲート、10はオアゲート9の出力信号Eによつ
てトリガされる第2モノマルチバイブレータ回路
であつて、入力信号A,Bの周期に対して十分に
短い時間幅T2の出力信号Fを発生する。11は
後縁微分回路であつて、第2モノマルチバイブレ
ータ回路10から供給されるセツト出力信号Q2
の後縁を微分することにより幅の狭い出力信号G
を発生する。12は第1ゲート回路例えばオアゲ
ート8の出力信号Dと後縁微分回路11の出力信
号Gを入力として合成入力信号Hを発生する第2
ゲート回路例えばオアゲートであつて、その合成
入力信号Hはデイレイ回路3の入力端、ラツチ回
路4のラツチ制御入力端Lおよびマイクロプロセ
ツサー5のインタラプト端子にそれぞれ供
給される。13は第2モノマルチバイブレータ回
路10のセツト出力信号Q2を入力とする後縁デ
イレイ回路であつて、入力信号の後縁を予め定め
られた時間だけ遅延した後にマイクロプロセツサ
ー5の入力ポートP1に供給する。なお、マイク
ロプロセツサー5はその入力ポートP10,P20に入
力信号A,Bが供給されている。
FIG. 2 is a circuit diagram showing an embodiment of the period measuring circuit according to the present invention, and the same parts as in FIG. 1 are indicated using the same symbols. In the figure, numeral 6 is an AND gate that receives two types of negative logic input signals A and B, and outputs a logical sum signal C for the input signals. Reference numeral 7 denotes a first monomultivibrator circuit, which is triggered by the trailing edge of the output signal generated from the AND gate 6 and generates a pulse having a time width of the re-interrupt period T1 of the microprocessor 5. When the first mono-multivibrator circuit 7 is triggered again during its operation, it is of a trigger type that continues to generate an output for a period T1 from this point onwards. 8
9 is a first gate circuit that receives the output signal C of the AND gate 6 and the set output signal Q1 of the first mono-multivibrator 7 and generates the output signal D, for example, an OR gate; A third gate circuit receives the reset output signal 1 of the vibrator circuit 7, for example, an OR gate; 10 is a second monomultivibrator circuit triggered by the output signal E of the OR gate 9; An output signal F having a time width T 2 that is sufficiently short with respect to the period is generated. Reference numeral 11 denotes a trailing edge differentiator circuit, which receives a set output signal Q 2 supplied from the second monomultivibrator circuit 10.
By differentiating the trailing edge of G
occurs. 12 is a first gate circuit; for example, a second gate circuit receives the output signal D of the OR gate 8 and the output signal G of the trailing edge differentiating circuit 11 and generates a composite input signal H;
The gate circuit is, for example, an OR gate, and its composite input signal H is supplied to the input terminal of the delay circuit 3, the latch control input terminal L of the latch circuit 4, and the interrupt terminal of the microprocessor 5, respectively. 13 is a trailing edge delay circuit that receives the set output signal Q2 of the second mono multivibrator circuit 10, and delays the trailing edge of the input signal by a predetermined time and then outputs the input port of the microprocessor 5. Supply P 1 . Input signals A and B are supplied to the microprocessor 5 at its input ports P 10 and P 20 .

このように構成された周期測定回路に於いて、
第3図a,bに示す入力信号A(A1〜A3)および
入力信号B(B1〜B3)が負論理信号として供給さ
れると、この両信号を入力とするアンドゲート6
からは第3図cに示すように、両信号に対する論
理和が出力信号Cとして送出される。出力信号C
が発生されるとその立ち上りによつて第1モノマ
ルチバイブレータ回路7がトリガされるために、
セツト出力信号Q1は第3図dに示すようにトリ
ガされる毎に時間幅T1のパルスとなつて送出さ
れることになる。ただし、入力信号A,Bが第3
図a,bにA2,B2およびB3,A3で示すように時
間T1以内に近接して発生される場合には、第3
図dに時点t1−t2間および時点t3−t4間に於いて
それぞれ示すようにトリガされた出力信号とな
る。そして、この第1モノマルチバイブレータ回
路7のセツト出力信号Q1は、オアゲート8に於
いてアンドゲート6の出力信号Cとの論理和が求
められることにより第3図eに示すように、アン
ドゲート6の出力信号Cから時間T1以内に近ず
いて供給される入力信号B2,A3に対応する信号
が取り除かれた状態の出力信号Dが発生される。
In the period measuring circuit configured in this way,
When input signals A (A 1 to A 3 ) and input signals B (B 1 to B 3 ) shown in FIG.
As shown in FIG. 3c, the logical sum of both signals is sent out as an output signal C. Output signal C
When is generated, the first mono-multivibrator circuit 7 is triggered by the rising edge.
The set output signal Q1 is sent out in the form of a pulse with a duration T1 each time it is triggered, as shown in FIG. 3d. However, input signals A and B are
As shown by A 2 , B 2 and B 3 , A 3 in Figures a and b, if they occur close to each other within time T 1 , the third
The triggered output signals are as shown in FIG. d between times t 1 and t 2 and between times t 3 and t 4 , respectively. The set output signal Q1 of the first mono-multivibrator circuit 7 is logically summed with the output signal C of the AND gate 6 in the OR gate 8, so that it is connected to the AND gate as shown in FIG. 3e. An output signal D is generated from which the signals corresponding to the input signals B 2 and A 3 which are supplied within time T 1 from the output signal C of 6 are removed.

一方、オアゲート9は第1モノマルチバイブレ
ータ回路7は第3図fに示す第1モノマルチバイ
ブレータ回路7のリセツト出力信号1とアンド
ゲート6の出力信号Cを入力することにより、時
間T1以内に近ずいて供給される入力信号B2,A3
に対応する信号のみを取り出して第3図gに示す
ように出力信号Eとして送出する。そして、この
出力信号Eは、その後縁に於いて第2モノマルチ
バイブレータ回路10をトリガすることにより、
入力信号A,Bの周期に対して十分に短かく、か
つ近接して発生される入力信号B2,A3を時間T1
を越えるように離すに十分な時間T2の時間幅を
有する予め定められた一定値の出力信号Fを第3
図hに示すように発生させる。このようにして発
生された出力信号Fは、後縁微分回路11に於い
て微分されることにより、第3図iに示すように
出力信号Eを時間T2にわたつて遅延した状態の
出力信号Gが発生される。そして、この出力信号
Gは、第2ゲート回路例えばオアゲート12にお
いてオアゲート8の出力信号Dと合成されること
により第3図jに示す合成入力信号Hが出力され
る。この場合、合成入力信号Hは時間T1を越え
た間隔で供給される入力信号A1,B1,A2,B3
そのまま合成され、時間T1以内に近接して供給
される入力信号B2,A3は一定時間T2にわたつて
遅延された状態で合成されることにより時間T1
(再インタラプト時間)を越えた時間間隔の入力
信号に変換されていることになる。従つて、この
合成入力信号Hをインタラプト信号として用いた
場合には、マイクロプロセツサー5はその都度イ
ンタラプト動作を実行してデーターの取り込みを
行なつてくれることになる。つまり、合成入力信
号Hがデイレイ回路3を介してカウンタ1のクリ
ア端子CLに供給されると、このカウンタ1は合
成入力信号Hの各周期間に於いて発生される基準
クロツクパルスCPを順次計数して出力し、合成
入力信号Hをラツチ制御信号とするラツチ回路4
はカウンタ1のリセツト直前に於ける計数値を順
次ラツチして出力する。そして、マイクロプロセ
ツサー5は、インタラプト信号入力端に合
成入力信号Hが供給される毎にインタラプトモー
ドとなつてラツチ回路4の出力信号、つまり第3
図jに示す合成入力信号HのA1,B1,A2,B2′,
B3,A3′間に於いてそれぞれ発生される基準クロ
ツクパルスCPを計数するカウンタ1の計数値が
取り込まれることになる。
On the other hand, the OR gate 9 inputs the reset output signal 1 of the first mono multivibrator circuit 7 and the output signal C of the AND gate 6 shown in FIG . Input signals B 2 , A 3 provided in close proximity
Only the signal corresponding to is extracted and sent as the output signal E as shown in FIG. 3g. This output signal E then triggers the second mono multivibrator circuit 10 at its trailing edge, thereby
Input signals B 2 and A 3 that are generated sufficiently short and close to the period of input signals A and B are expressed as time T 1
A third output signal F of a predetermined constant value having a time width T2 sufficient to separate the
Generate as shown in Figure h. The output signal F generated in this manner is differentiated in the trailing edge differentiator 11, thereby producing an output signal delayed from the output signal E by a time T2 , as shown in FIG. 3i. G is generated. Then, this output signal G is combined with the output signal D of the OR gate 8 in a second gate circuit, for example, the OR gate 12, thereby outputting a combined input signal H shown in FIG. 3J. In this case, the composite input signal H is the input signals A 1 , B 1 , A 2 , B 3 supplied at intervals exceeding time T 1 are combined as they are, and the input signals supplied closely within time T 1 are combined as they are. B 2 and A 3 are synthesized after being delayed for a certain period of time T 2 so that the time T 1
(re-interrupt time). Therefore, when this composite input signal H is used as an interrupt signal, the microprocessor 5 executes the interrupt operation each time to capture data. That is, when the composite input signal H is supplied to the clear terminal CL of the counter 1 via the delay circuit 3, the counter 1 sequentially counts the reference clock pulses CP generated during each cycle of the composite input signal H. latch circuit 4 which outputs the synthesized input signal H as a latch control signal.
sequentially latches and outputs the counted values of counter 1 immediately before being reset. Each time the composite input signal H is supplied to the interrupt signal input terminal, the microprocessor 5 enters the interrupt mode and outputs the output signal of the latch circuit 4, that is, the third
A 1 , B 1 , A 2 , B 2 ', of the composite input signal H shown in Figure j.
The count values of counter 1, which counts the reference clock pulses CP generated between B 3 and A 3 ', are taken in.

一方、後縁デイレイ回路13は第2モノマルチ
バイブレータ回路10から発生される出力信号F
の後縁を遅延して出力することにより、その時点
に於いて発生される合成入力信号B2′,A3′が一定
時間T2にわたつて遅延されていることを示す遅
延判別信号Iとしてマイクロプロセツサー5の入
力ポートP1に供給する。
On the other hand, the trailing edge delay circuit 13 receives the output signal F generated from the second monomultivibrator circuit 10.
By delaying the trailing edge and outputting it, a delay discrimination signal I indicating that the composite input signals B 2 ′ and A 3 ′ generated at that point have been delayed for a certain period of time T 2 is obtained. It is supplied to the input port P1 of the microprocessor 5.

次にマイクロプロセツサー5の動作を第4図、
第5図に示すフローチヤートを用いて説明する。
まず、合成入力信号Hが発生されると、マイクロ
プロセツサー1はインタラプトモードの動作を開
始して第4図に示すステツプS1に移行することに
より入力ポートP10に信号が供給されているか否
かの判別を行なう。ここで、ステツプS1に於ける
判別がイエスであつた場合には、ステツプS2に移
行して入力信号Bが供給されていることを認識す
る。また、ステツプS1に於ける判別がノーであつ
た場合には、ステツプS3に移行して入力ポート
P20に信号が供給されているか否かを判別する。
そして、この判別結果がイエスであつた場合には
ステツプS4に移行して入力信号Aが供給されてい
ることを認識し、判別結果がノーであつた場合に
はステツプS5に移行して入力信号A,Bが同時に
供給されていることを認識する。以上が、入力信
号A,Bの供給状態の判別動作である。
Next, the operation of the microprocessor 5 is shown in Figure 4.
This will be explained using the flowchart shown in FIG.
First, when the composite input signal H is generated, the microprocessor 1 starts operating in interrupt mode and moves to step S1 shown in FIG . It is determined whether or not. Here, if the determination in step S1 is YES, the process moves to step S2 and it is recognized that input signal B is being supplied. Also, if the determination in step S 1 is NO, the process moves to step S 3 and the input port
Determine whether a signal is supplied to P20 .
If the result of this determination is YES, the process proceeds to step S4 , where it is recognized that input signal A is being supplied, and if the result of this determination is no, the process proceeds to step S5 . Recognize that input signals A and B are supplied simultaneously. The above is the operation for determining the supply status of input signals A and B.

次に、第5図に示すフローチヤートを用いて入
力信号の周期計算動作を説明する。周期計算動作
がスタートされると、ステツプS6に於いて入力ポ
ートP1に遅延判別信号Iが供給されているか否
かが判別される。この判別結果がノーであつた場
合には、ステツプS7に移行して前回の計数値取り
込み時に於ける入力ポートP1の信号を示すフラ
グINTEの状態を判別し、その判別結果がノーで
あつた場合には、ステツプS8に於いてラツチ回路
4に保持されているカウンタ1の計数値Nを真の
周期に対する計数値N0とし、基準クロツクパル
スCPを基としてその周期を算出する。また、ス
テツプS7に於ける判別がイエスであつた場合に
は、ステツプS9に移行して計数値Nに一定時間
T2に相当する基準クロツクパルスCPの計数値
NT2を加算した値を直の周期に対する計数値Nと
して周期を算出する。つまり、フラグINTFが
“1”であつた場合には、前回の合成入力信号H
が一定時間T2だけ遅らされていたことを示して
いる。従つて、今回に於ける真の周期は遅延時間
T2だけ短かくなつているものであり、これに対
してステツプS9ではかかる計数値N0の補正がな
されて周期が求められている。そして、ステツプ
S10に移行してフラグINTFを“0”に戻すこと
により、今回の合成入力信号Hが次の真の周期を
求める場合に入力信号に周期していることを示す
ようにセツトする。
Next, the operation of calculating the period of the input signal will be explained using the flowchart shown in FIG. When the cycle calculation operation is started, it is determined in step S6 whether or not the delay determination signal I is supplied to the input port P1 . If the result of this determination is no, the process moves to step S7 , where the state of the flag INTE indicating the signal at input port P1 at the time of the previous count value acquisition is determined, and if the result of this determination is no, the process proceeds to step S7. If so, in step S8 , the count value N of the counter 1 held in the latch circuit 4 is set as the count value N0 for the true period, and the period is calculated based on the reference clock pulse CP. In addition, if the determination in step S7 is YES, the process moves to step S9 and the count value N is set for a certain period of time.
Count value of reference clock pulse CP corresponding to T 2
The period is calculated by using the value obtained by adding N T2 as the count value N for the direct period. In other words, if the flag INTF is "1", the previous combined input signal H
is delayed by a certain period of time T 2 . Therefore, the true period in this case is the delay time
The period is shortened by T 2 , and in step S 9 this count value N 0 is corrected to obtain the period. And the steps
By moving to S10 and returning the flag INTF to "0", it is set to indicate that the current combined input signal H is periodic to the input signal when calculating the next true period.

一方、ステツプS6に於ける判別がイエスであつ
た場合には、今回の合成入力信号Hが一定時間
T2にわたつて遅延されていることを表わすため
に、ステツプS11に於いて計数値Nから一定時間
T2に相当する計数値NT2を差し引いた値を真の周
期に対する計数値N0として取り込んで周期の算
出を行なう。そして、かかる処理が完了したなら
ば、ステツプS12に移行してフラグINTFを“1”
にセツトして次の周期算出時にNT2の加算が必要
であることを示す。
On the other hand, if the determination in step S6 is YES, the current combined input signal H is
In step S11 , the count value N is delayed for a certain period of time to indicate that it has been delayed for T2 .
The period is calculated by taking in the value obtained by subtracting the count value N T2 corresponding to T 2 as the count value N 0 for the true period. When this processing is completed, the process moves to step S12 and the flag INTF is set to "1".
is set to indicate that an addition of N T2 is required when calculating the next cycle.

このような動作を順次実行することにより、2
種の入力信号に対するそれぞれの周期測定が、両
信号が近接している場合に於いても求められるこ
とになる。
By sequentially performing these operations, 2
Respective period measurements for different input signals will be determined even if both signals are in close proximity.

なお、上記実施例に於いては、2種入力信号を
扱う場合についてのみ説明したが、本考案はこれ
に限定されるものではなく、2種以上の入力信号
に対する周期測定に対しても同様に行なえるもの
である。ただしこの場合には、インタラプト信号
の供給時に供給されている入力信号の種別を判別
するために入力信号を取り込むための入力ポート
P10,P20が種別の増加に伴なつて増やす必要が生
ずる。
In the above embodiment, only the case where two types of input signals are handled has been described, but the present invention is not limited to this, and can similarly be applied to period measurement for two or more types of input signals. It can be done. However, in this case, an input port is used to capture the input signal in order to determine the type of input signal being supplied when the interrupt signal is supplied.
It becomes necessary to increase P 10 and P 20 as the number of types increases.

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

第1図は従来の周期測定回路の一例を示す回路
図、第2図は本考案による周期測定回路の一実施
例を示す回路図、第3図a〜jは第2図に示す回
路の各部動作波形図、第4図、第5図は第2図に
示す回路の動作を示すフローチヤート図である。 1……カウンタ、2……クロツク発振回路、3
……デイレイ回路、4……ラツチ回路、5……マ
イクロプロセツサー、6……アンドゲート、7,
10……第1、第2モノマルチバイブレータ回
路、8……第1ゲート回路(オアゲート)、9…
…第3ゲート回路(オアゲート)、12……第2
ゲート回路(オアゲート)、11……後縁微分回
路、13……後縁デイレイ回路。
FIG. 1 is a circuit diagram showing an example of a conventional period measuring circuit, FIG. 2 is a circuit diagram showing an embodiment of the period measuring circuit according to the present invention, and FIGS. 3 a to 3 j are parts of the circuit shown in FIG. Operation waveform diagrams, FIGS. 4 and 5 are flowcharts showing the operation of the circuit shown in FIG. 2. 1...Counter, 2...Clock oscillation circuit, 3
...Delay circuit, 4...Latch circuit, 5...Microprocessor, 6...And gate, 7,
10...First and second mono multivibrator circuits, 8...First gate circuit (OR gate), 9...
...Third gate circuit (OR gate), 12...Second
Gate circuit (OR gate), 11... trailing edge differential circuit, 13... trailing edge delay circuit.

Claims (1)

【実用新案登録請求の範囲】[Scope of utility model registration request] 周期を測定しようとする各種入力信号の後縁に
よつてトリガされて時間幅T1のパルスを発生す
るリトリガタイプの第1モノマルチバイブレータ
回路と、この第1モノマルチバイブレータ回路の
出力発生期間以外の時点に於いて供給される前記
入力信号を取り出す第1ゲート回路と、前記第1
モノマルチバイブレータ回路の出力発生期間に供
給される前記入力信号を取り出す第3ゲート回路
と、この第3ゲート回路の出力信号によりトリガ
されて予め定められた時間幅T2のパルスを発生
する第2モノマルチバイブレータ回路と、この第
2モノマルチバイブレータ回路から発生される出
力信号の後縁に同期して発生されるパルス信号と
前記第1ゲート回路の出力信号との論理和を求め
る第2ゲート回路と、この第2ゲート回路の出力
信号を多少遅らせた信号をクリア信号として基準
クロツクパルスを計数するカウンタと、前記第2
ゲート回路の出力信号発生時に於ける前記カウン
タの計数値をラツチするラツチ回路と、前記第2
モノマルチバイブレータ回路から発生される出力
信号の後縁を遅延して遅延判別信号を発生する後
縁デイレイ回路と、前記第2ゲート回路の出力信
号によりインタラプトモードとなつて前記ラツチ
回路の出力信号、前記遅延判別信号および前記各
入力信号を取り込むマイクロプロセツサーとを備
え、前記時間幅T1は前記マイクロプロセツサー
の再インタラプト時間以上とし、前記時間T2
各入力信号の周期よりも十分に短かくかつ近接し
て供給される入力信号を前記時間T1を越える時
間にわたつて離すために十分な時間に設定されて
おり、前記マイクロプロセツサーはインタラプト
モード時における入力信号の種別判別を行なつて
同一種別の入力信号間の計数値を算出し、この計
数値を前記遅延判別信号の有無に応じて前記時間
幅T2に応じた修正を加えた後に前記基準クロツ
クパルスを基として周期を算出して出力すること
を特徴とする周期測定回路。
A retrigger type first mono multivibrator circuit that generates a pulse with a time width T 1 triggered by the trailing edge of various input signals whose period is to be measured, and an output generation period of this first mono multivibrator circuit. a first gate circuit that takes out the input signal supplied at a time other than the first gate circuit;
a third gate circuit that takes out the input signal supplied during the output generation period of the mono-multivibrator circuit; and a second gate circuit that is triggered by the output signal of the third gate circuit and generates a pulse with a predetermined time width T2 . a mono multivibrator circuit, and a second gate circuit for calculating the logical sum of the pulse signal generated in synchronization with the trailing edge of the output signal generated from the second mono multivibrator circuit and the output signal of the first gate circuit. a counter that counts reference clock pulses using a signal obtained by slightly delaying the output signal of the second gate circuit as a clear signal;
a latch circuit that latches the counted value of the counter when the output signal of the gate circuit is generated;
a trailing edge delay circuit that delays the trailing edge of the output signal generated from the mono-multivibrator circuit to generate a delayed discrimination signal; and an output signal of the latch circuit that is set in interrupt mode by the output signal of the second gate circuit; a microprocessor that takes in the delay discrimination signal and each of the input signals, the time width T 1 is longer than the re-interrupt time of the microprocessor, and the time T 2 is longer than the period of each input signal. The microprocessor is set to a time sufficient to separate input signals that are supplied in short and close proximity to each other for a time exceeding the time T1 , and the microprocessor is configured to be able to determine the type of input signal in the interrupt mode. The count value between the input signals of the same type is calculated, and after the count value is modified according to the time width T2 depending on the presence or absence of the delay discrimination signal, the period is calculated based on the reference clock pulse. A period measurement circuit characterized by calculating and outputting.
JP17831582U 1982-11-25 1982-11-25 Period measurement circuit Granted JPS5982871U (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP17831582U JPS5982871U (en) 1982-11-25 1982-11-25 Period measurement circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP17831582U JPS5982871U (en) 1982-11-25 1982-11-25 Period measurement circuit

Publications (2)

Publication Number Publication Date
JPS5982871U JPS5982871U (en) 1984-06-04
JPS6313503Y2 true JPS6313503Y2 (en) 1988-04-16

Family

ID=30387172

Family Applications (1)

Application Number Title Priority Date Filing Date
JP17831582U Granted JPS5982871U (en) 1982-11-25 1982-11-25 Period measurement circuit

Country Status (1)

Country Link
JP (1) JPS5982871U (en)

Also Published As

Publication number Publication date
JPS5982871U (en) 1984-06-04

Similar Documents

Publication Publication Date Title
JPH047471B2 (en)
US4447883A (en) Coincidence-error correcting apparatus and method
JPS59196470A (en) Detection of wheel speed and/or wheel acceleration/deceleration
JPH0417390B2 (en)
JPS6313503Y2 (en)
JPS63302369A (en) Apparatus for detecting abnormality of number-of-rotation sensor
US3840277A (en) Anti-skid brake system
JPH1183883A (en) Wheel speed computation device
JP2712045B2 (en) Rotational speed measuring device
JP3488782B2 (en) Vehicle wheel speed calculation device
JPS628059A (en) System for detecting pulse input signal
JPH0150866B2 (en)
JPH0329749Y2 (en)
JPS6258941B2 (en)
JPH10226328A (en) Device for detecting unevenness of road surface
JPH0646381U (en) Wheel speed measuring device
JP3077187B2 (en) Pulse repetition interval measurement circuit
JPH05172864A (en) Pulse cycle measuring method and device
JPS62188977A (en) Signal cycle measurement
JPH0120393B2 (en)
JPS61257019A (en) Differential counter circuit
JPH05203685A (en) Input signal detection circuit
JPS6345547B2 (en)
JPS6161633B2 (en)
JPH07283721A (en) Calculation method for pulse signal cycle