JPS6031062A - Pulse cycle measuring circuit - Google Patents

Pulse cycle measuring circuit

Info

Publication number
JPS6031062A
JPS6031062A JP13958683A JP13958683A JPS6031062A JP S6031062 A JPS6031062 A JP S6031062A JP 13958683 A JP13958683 A JP 13958683A JP 13958683 A JP13958683 A JP 13958683A JP S6031062 A JPS6031062 A JP S6031062A
Authority
JP
Japan
Prior art keywords
signal
circuit
output
counter
input
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.)
Granted
Application number
JP13958683A
Other languages
Japanese (ja)
Other versions
JPH0150866B2 (en
Inventor
Hidemi Oe
大江 秀美
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.)
NEC Home Electronics Ltd
NEC Corp
Original Assignee
NEC Home Electronics Ltd
Nippon 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 NEC Home Electronics Ltd, Nippon Electric Co Ltd filed Critical NEC Home Electronics Ltd
Priority to JP13958683A priority Critical patent/JPS6031062A/en
Publication of JPS6031062A publication Critical patent/JPS6031062A/en
Publication of JPH0150866B2 publication Critical patent/JPH0150866B2/ja
Granted legal-status Critical Current

Links

Landscapes

  • Measuring Frequencies, Analyzing Spectra (AREA)
  • Manipulation Of Pulses (AREA)

Abstract

PURPOSE:To make it possible to measure the cycles of two kinds of approaching input pulse signals, by providing an auxiliary counter for counting clock pulses generated during a period when two kinds of input signals are superposed, and correcting the count value of a main counter of the basis of the counted value. CONSTITUTION:When two input pulse signals A, B are inputted, output signal AB is sent out through an AND gate 6 and supplied to a microcomputer 5 and, at the same time, supplied to a latch circuit 4 as a control signal while supplied to a counter 2 as a reset signal through a delay circuit 1. The counter 2 counts clock pulses CP and resets every when an output signal is generated from the dalay circuit 1 to start new counting. A counted value Q directly before the counter 2 is reset is held to the latch circuit 4 and a value corresponding to the cycle between pulses of the output signal AB is successively held to the latch circuit 4. By correcting this counted value, the cycles of two kinds of approaching input pulse signals can be accurately measured.

Description

【発明の詳細な説明】 技術分野 本発明はパルス周期測定回路に関し、特にマイクロコン
ピュータを用いて複数種の入力パルス信号に対する周期
測定が行なえるパルス周期測定回路に関するものである
DETAILED DESCRIPTION OF THE INVENTION Technical Field The present invention relates to a pulse period measuring circuit, and more particularly to a pulse period measuring circuit capable of measuring periods of a plurality of types of input pulse signals using a microcomputer.

背影技術 近年、マイクロコンピュータの急速な発達に伴なって、
各種装置の制御部に、マイクロコンピュータが用いられ
ている。この場合、マイクロコンピュータを用いた装置
に於いては、各種センサから供給されるパルス信号を入
力として各種の制御を実行するわけであるが、人力パル
ス信号はその周期によって回転速度等の各種情報を表わ
している場合が多い。従って、マイクロコンピュータ分
用いて各種の入力パルス信号を扱うに際しては、まずパ
ルス信号の周期を検出する必要がある。
Background technology In recent years, with the rapid development of microcomputers,
Microcomputers are used in control units of various devices. In this case, devices using microcomputers use pulse signals supplied from various sensors as input to execute various controls, but human pulse signals can provide various information such as rotational speed depending on their cycle. It is often expressed. Therefore, when using a microcomputer to handle various input pulse signals, it is first necessary to detect the period of the pulse signals.

第1図は従来一般に用いられているマイクロコンピュー
タを用いたパルス周期測定回路の一例を示す回路図であ
る。同図に於いて1は図示しない例えば回転センサから
供給される車速をパルス周期として入カバルス信号へを
わずかに遅延して出力するディレィ回路、2はクロック
パルス発振回路3から発生されるクロックパルスOPを
計数するカウンタであって、ディレィ回路1の出力信号
A′によってリセットされる。
FIG. 1 is a circuit diagram showing an example of a conventional pulse period measuring circuit using a microcomputer. In the figure, 1 is a delay circuit (not shown) that outputs an input signal with a slight delay using the vehicle speed supplied from a rotation sensor as a pulse period, and 2 is a clock pulse OP generated from a clock pulse oscillation circuit 3. The counter is reset by the output signal A' of the delay circuit 1.

4はラッチ回路であって、入力パルス信号Aの供給時に
カウンタ2の計数値を保持する。5はマイクロコンピュ
ータであって、インタラブドボー) INTに入力パル
ス信号Aが供給された時に割込みモードとなってラッチ
回路4の計数出力信号を入カポ−)INを介して取シ込
む。
A latch circuit 4 holds the count value of the counter 2 when the input pulse signal A is supplied. Reference numeral 5 denotes a microcomputer, which enters an interrupt mode when the input pulse signal A is supplied to the interconnected board (INT) and receives the count output signal of the latch circuit 4 via the input capacitor (IN).

この様に構成されたパルス周期測定回路に於いて、図示
しない回転センサから第1図に示す入カパルス信号人が
供給されると、ディレィ回路1はこの人力パルス16号
Nをわずかに遅延させたノぞルス信号に′全カウンタ2
のリセット入力端に供給してカウンタ2をリセットさせ
る。従って、クロック発振回路3から発生されるクロッ
クパルスCPを準次計数するカウンタ2は、パルス信号
N′が供給される毎にリセットされて人力パルス信号N
の各周期間に於けるクロックパルスCPの発生数を計数
して出力することになる。
In the pulse period measuring circuit configured in this manner, when the input pulse signal shown in FIG. 1 is supplied from a rotation sensor (not shown), the delay circuit 1 slightly delays this human power pulse No. 16 N. All counters 2 on the nozzle signal
is supplied to the reset input terminal of the counter 2 to reset the counter 2. Therefore, the counter 2 that counts the clock pulses CP generated from the clock oscillation circuit 3 is reset every time the pulse signal N' is supplied with the human pulse signal N.
The number of clock pulses CP generated during each cycle is counted and output.

一万、ラッチ回路4は入カバルス信号入によってラッチ
制御されるわけであるが、このラッチ回路4のラッチタ
イミングはカウンタ2のリセットタイミングの直前であ
るために、入カッぞルス信号Aの1周期間に於けるクロ
ックパルスの計数値がラッチ回路4に保持されることに
なる。また、入力パルス信号Nはマイクロコンピュータ
5のインタラブドボートINTに割り込み信号として供
給されることから、このマイクロコンピュータ5が割シ
込みモードとなってラッチ回路4の出力データを入カポ
−)INを介して取り込む。そして、このマイクロコン
ピュータ5は、取シ込まれたデータに予め定められてい
るクロックパルスOPの周期を乗算することによって、
入力パルス信号Aの周期をめて出力している。この様な
動作金入力信号Aの供給毎に実行することによって、入
カッ々ルス信号入の周期が順次測定されるわけである。
However, since the latch circuit 4 is latch-controlled by the input pulse signal A, the latch timing of the latch circuit 4 is immediately before the reset timing of the counter 2, so one round of the input pulse signal A is latched. The count value of clock pulses during the period is held in the latch circuit 4. In addition, since the input pulse signal N is supplied as an interrupt signal to the interlaced port INT of the microcomputer 5, the microcomputer 5 enters the interrupt mode and inputs the output data of the latch circuit 4 to the interconnected port INT. Import via. The microcomputer 5 then multiplies the input data by a predetermined cycle of the clock pulse OP, thereby
The input pulse signal A is output at regular intervals. By performing such an operation every time the input signal A is supplied, the cycle of the input signal A is sequentially measured.

しかしながら、上記構成によるパルス周期測定回路に於
いては、1種類の入力パルス信号に対する周期測定しか
行なうことが出来ず、2種類の人力パルス信号に対する
周期測定を行なう場合には、上記回路がもう一組必要に
なシ、これに伴なって回路が複雑でかつ高価なものとな
ってしまう。
However, the pulse period measurement circuit with the above configuration can only perform period measurement for one type of input pulse signal, and when performing period measurement for two types of human input pulse signals, the above circuit can only perform period measurement for one type of input pulse signal. Therefore, the circuit becomes complicated and expensive.

このような問題を解決するものとしては、第2図(a)
 、 (b)に示す2種の入力パルス信号&、Bをアン
ドゲートを介して取シ出した第2図(c)に示すパルス
信号ABを第1図に示すパルス周期測定回路に供給する
ことが考えられる。
As a solution to this problem, the method shown in Figure 2 (a)
, supplying the pulse signal AB shown in FIG. 2(c) obtained by taking out the two types of input pulse signals & and B shown in (b) through an AND gate to the pulse period measuring circuit shown in FIG. is possible.

しかしながら、ただ単に両人カパルス信号人、Bの論理
和をめて供給すると、両人力パルス信号A、Bが近接し
ている場合に問題が生ずる。つまシ、第2図(a) 、
 (b)に示す2wiの入力パルス信号A、Bの論理和
をめた第2図(c)に示すパルス信号へBを第1図に示
すパルス周期測定回路に供給して各人力パルス信号A、
Bの周期を測定する場合には、入力パルス信号A、Bの
各立ち上り時点t!〜t6の各時点間に於ける時間を順
次測定し、同一人カノ々ルス信号の立ち上υ時点間の測
定値を加算処理することによって周期をめる必要がある
。これに対して、両人力パルス信号A、Bが時点is 
、 t6に示す様に近接すると、論理和をめたパルス信
号ABは、第2図(C)に時点t4と16間に示す様に
入力パルス信号A、Bの”L″′′勘間ねられた1個の
′L”信号となってしまう。この結果、時点t5部分に
於ける立ち上りが消されるために、ラッチ回路4は時点
t5に於けるラッチ処理が行なわれずに時点t6に於い
てラッチされる不部分が生ずる。
However, if the two-man power pulse signals A and B are simply summed and supplied, a problem will occur if the two-man power pulse signals A and B are close to each other. Tsumashi, Figure 2 (a),
The 2wi input pulse signals A and B shown in (b) are logically summed to produce the pulse signal shown in FIG. 2 (c), and B is supplied to the pulse period measuring circuit shown in FIG. ,
When measuring the cycle of input pulse signals A and B, each rising time t! of input pulse signals A and B is measured. It is necessary to determine the period by sequentially measuring the time between each time point from t6 to t6, and adding the measured values between the rise time points υ of the same person's canolus signal. On the other hand, both human power pulse signals A and B are at the time point is
, when they approach each other as shown at t6, the pulse signal AB obtained by the logical sum becomes the "L"'' difference between the input pulse signals A and B as shown between time t4 and time 16 in FIG. 2(C). As a result, since the rising edge at time t5 is erased, the latch circuit 4 does not latch at time t5, and the latch circuit 4 outputs a single 'L' signal at time t6. A latched portion results.

また、カウンタ2は時点15時点に於けるリセット処理
を受けなくなるために、時点t4〜t6間のクロックパ
ルスCPを計数し、この誤った計数値が時点t6に於い
てラッチ回路4に保持されてしまう。この様に、内入力
信号&jBが近接された場会には、ラッチ回w64に対
するラッチ制御およびカウンタ2に対するリセット制御
が得られなくなるために、周期測定が不能となってしま
う。
In addition, since the counter 2 is no longer subjected to the reset process at time 15, it counts clock pulses CP between time t4 and t6, and this erroneous count value is held in the latch circuit 4 at time t6. Put it away. In this way, when the inner input signal &jB is brought close to each other, it becomes impossible to obtain latch control for the latch circuit w64 and reset control for the counter 2, making period measurement impossible.

発明の開示 従って、本発明による目的は、簡単な構成でちゃなから
近接して発生される2種の入力パルス信号に対する周期
測定が確実に行なえる入力パルス周期測定回路を提供す
ることである。
DISCLOSURE OF THE INVENTION Accordingly, an object of the present invention is to provide an input pulse period measuring circuit that can reliably measure the periods of two types of input pulse signals generated in close proximity to each other with a simple configuration.

この様な目的を達成するために本発明は、2種の入力パ
ルス信号に対する重なシ期間に発生されるクロックパル
スを計数する補助カウンタを設け、この補助カウンタの
計数値を用いて主となるカウンタの計数値を修正するこ
とによシ近接する2棟人カパルス信号の周期を正確に測
定するものである。
In order to achieve such an object, the present invention provides an auxiliary counter that counts clock pulses generated during overlapping periods for two types of input pulse signals, and uses the counted value of this auxiliary counter to By correcting the count value of the counter, the period of the coupler signals from two adjacent buildings can be accurately measured.

従って、この様に構成されたノ々ルス周期測定回路に於
いては、従来のパルス周期測定回路にわずかな部品を加
えるのみで、近接して発生される2種人カッ々ルス信号
の周期を確実に測定することが出来る優れた効果を有す
る。
Therefore, in the Knolls period measuring circuit configured in this way, by adding only a few parts to the conventional pulse period measuring circuit, it is possible to measure the period of the two kinds of Knolls signals generated in close proximity. It has excellent effects that can be measured reliably.

発明を実施するだめの最良な形態 第3図は本発明によるパルス周期測定回路の一実施例を
示す回路図であって、第1図と同一部分は同記号を用い
て示しである。同図に於いて6は入力パルス信号A、H
の論理積をめ、その出力信号ABをディレィ回路1、ラ
ッチ回路4およびマイクロコンピュータ5のインタラブ
ドボートINTに供給するアンドゲート、7は入力パル
ス信号A、Hの論理和をめるオアグー)、8はワンショ
ットマルチノ々イブレータ回路であって、トンパータ9
を介して供給されるオアゲート7の出力信号0によって
トリガされる。そして、このワンショットマルチノ々イ
ブレータ回路8のセット出力端Qから発生される出力信
号りはマイクロコンピュータ5の入力ボートP1oに供
給されるとともに、そのパルス幅は入力パルス信号&、
Bの重なυ期間に対して十分に長くなる様に設定されて
いる。10は入カッ々ルス信号A、Bを入力として排他
的論理和をめるエクスクル−ジブオアゲート、11はエ
クスクル−ジブオアゲート10から発生される出力信号
Eをワンショットマルチノ々イブレータ回路8から発生
される出力信号りとの一致をめるアンドゲート、12は
クロック発振回路3から発生されるクロックパルスOF
とアンドゲート11の出力信号Fとの一致をめるアンド
ゲート、13は補助カウンタであって、アンドゲート1
2を介して供給されるクロックパルスを計数し、この計
数値をマイクロコンピュータ5の入力端INに供給する
とともに、マイクロコンピュータ5の出力ポートPit
から発生されるリセット信号R8によシ計数値がリセッ
トされる。
BEST MODE FOR CARRYING OUT THE INVENTION FIG. 3 is a circuit diagram showing an embodiment of a pulse period measuring circuit according to the present invention, and the same parts as in FIG. 1 are indicated using the same symbols. In the same figure, 6 is the input pulse signal A, H
AND gate which calculates the logical product of the input pulse signals A and H and supplies the output signal AB to the delay circuit 1, the latch circuit 4, and the interconnected port INT of the microcomputer 5; 8 is a one-shot multi-novel circuit;
It is triggered by the output signal 0 of the OR gate 7, which is supplied via the OR gate 7. The output signal generated from the set output terminal Q of this one-shot multi-nobulator circuit 8 is supplied to the input port P1o of the microcomputer 5, and its pulse width is equal to the input pulse signal &,
It is set to be sufficiently long for the overlapping υ period of B. Reference numeral 10 denotes an exclusive-Jib-OR gate that inputs the input signals A and B and performs an exclusive OR, and reference numeral 11 denotes an output generated from the one-shot multi-noise ibrator circuit 8, which receives the output signal E generated from the exclusive-Jib-OR gate 10. 12 is a clock pulse OF generated from the clock oscillation circuit 3;
and the output signal F of the AND gate 11, and 13 is an auxiliary counter;
2, and supplies this counted value to the input terminal IN of the microcomputer 5, as well as the output port Pit of the microcomputer 5.
The count value is reset by the reset signal R8 generated from the reset signal R8.

14.15は入力パルス信号A、Bをそれぞれ入力とし
て立ち上9部分をわずかに遅延式せる立ち上シデイレイ
回路であって、その出力信号はマイクロコンピュータ5
の入力ポートP!G+psoにそれぞれ供給される。
14.15 is a rising edge delay circuit which inputs input pulse signals A and B and slightly delays the rising 9 portions, and its output signal is sent to the microcomputer 5.
Input port P! G+pso are respectively supplied.

この様に構成された入力パルス周期測定回路に於いて、
例えば第4図(、) 、 (b)に示す第1.第2人カ
パルス信号A、Bが供給されると、この第1.第2人カ
パルス信号A、Bはアンドゲート回路6に於いて一致が
められることによシ、第4図(C)に示す出力信号五B
が送出される。そして、この出力信号ABは、マイクロ
コンビュ−タ5のインタラブドポートINTに供給され
るとともに、ラッチ回路4にラッチ制御信号として供給
される。また、この出力信号λBはディレィ回路1に於
いてわずかに遅延された後に、カウンタ2にリセット信
号として供給される。
In the input pulse period measuring circuit configured in this way,
For example, the first example shown in FIGS. When the second person coupler signals A and B are supplied, this first person coupler signals A and B are supplied. Since the second person coupler signals A and B are matched in the AND gate circuit 6, the output signal 5B shown in FIG. 4(C) is generated.
is sent. This output signal AB is supplied to the interlaced port INT of the microcomputer 5, and is also supplied to the latch circuit 4 as a latch control signal. Further, this output signal λB is slightly delayed in the delay circuit 1 and then supplied to the counter 2 as a reset signal.

ここで、カウンタ2はクロック発振回路3から発生され
るクロックパルスOPを計数シており、ディレィ回路1
から出力信号が発生される毎にリセ′ットされて新たな
計数を開始する。そして、このカウンタ2のリセットに
わずかに先立って、カウンタ2のリセッ)[前に於ける
計数値Qがラッチ回路4に保持されることになる。
Here, the counter 2 counts the clock pulses OP generated from the clock oscillation circuit 3, and the counter 2 counts the clock pulses OP generated from the clock oscillation circuit 3.
Each time an output signal is generated from , it is reset and starts a new counting. Then, slightly prior to resetting the counter 2, the count value Q before the resetting of the counter 2 is held in the latch circuit 4.

そして、カウンタ2は直前の出力信号&Bとの間に於け
るクロックパルスOPO数を計数しているために、ラッ
チ回路4には出力信号λBの各パルス間の周期に応じた
値が順次保持されることになる。
Since the counter 2 counts the number of clock pulses OPO between the output signal &B and the immediately preceding output signal &B, the latch circuit 4 sequentially holds values corresponding to the period between each pulse of the output signal λB. That will happen.

一万、オアゲート7は入力パルス信号A、Bを入力とす
ることによシ、第4図(d)に示す様に両人力パルス信
号A、Hの’L”期間に於ける重な9部分が出力信号0
として取シ出される。そして、この出力信号Cは、イン
ノ々−夕9を介してワンショットマルチノ々イブレータ
回路8をトリガするために、ワンショットマルチノ々イ
ブレータ回路8は出力信号(c)の立ち下り部分に於い
てトリガされることにより、第4図(e)に示す様に予
め定められた時間幅Tの出力を発生してマイクロコンピ
ュータ5の入カポ−) Ploに両入力パルス信号A、
Bの′L″期間に重な)が生じていることを示す信号と
して供給される。この揚台、ワンショットマルチノ々イ
ブレータ回路8の設定時間Tは、両人力パルス信号&、
Hの“L″期間対する最大厘なり期間よりも十分に長く
なる様に予め定められている。
10,000, OR gate 7 inputs input pulse signals A and B, and as shown in FIG. is the output signal 0
It is taken out as. This output signal C triggers the one-shot multi-nobrator circuit 8 via the input signal (c), so the one-shot multi-nobrator circuit 8 is triggered at the falling edge of the output signal (c). As a result, an output with a predetermined time width T is generated as shown in FIG. 4(e), and both input pulse signals A and Plo are input to the microcomputer 5.
It is supplied as a signal indicating that a signal (which overlaps with the ``L'' period of B) is occurring.The setting time T of this platform and one-shot multi-nobulator circuit 8 is determined by the two-person power pulse signal &;
It is predetermined in advance to be sufficiently longer than the maximum period for the "L" period of H.

次に、エクスクル−ジブオアゲート10は両入力信号人
、Bを入力とすることによシ、不一致部分をIIHII
とする第4図(f)に示す出力信号Eが発生する。そし
て、この出力信号Eは、アンドゲート11に於いてL”
期間の重な多発生を示す出力信号りとの一致がめられる
ことによシ、第4図tglに示す様に肉入力信号A、H
の1H″期間と1L”期間の重なり部分、つまシ両入カ
ッ七ルス信号&、Bの時間差を示す出力信号Fが発生さ
れることになる。従って、この両人力パルス信号A、B
の“I−”期間が電なJ) @rつだ揚台に於ける時間
差Txが出力信号Fによってめられれば、両人力パルス
信号&、Bの重なシによる測定不能部分を演算処理によ
ってめられることになる。つまシ、アンドゲート11の
出力信号Fは、アンドゲート12に於いてクロックパル
スCPとの一致がめられ、その出力が補助カウンタ13
のクロック入力端OKに供給される。従って、補助カウ
ンタ13は肉入力信号N、Bの@H″期間と“L#期間
の重な夛期間Txに発生されるクロックパルスOPを計
数し、そのtt 数値Qxをマイクロコンピュータ5の
入力端子INF供給され、マイクロコンピュータ5に取
シ込まれると出力ポートF’ttから発生されるリセッ
ト制御信号FLSにより補助カウンタ13の計数値Qx
がクリアされる。従って、オアゲート7、ワンショット
マルチノ々イブレータ回路8およびインノ々−夕9は肉
入力信号A、Bの“L″期間重なシ合ったことを検出す
る重なシ検出部16を構成し、エクスクル−ジブオアゲ
ート10゜アンドゲート11は肉入力信号A、Bの″″
L#期間重なり時に於ける入力信号A、B間の時間差を
める時間差検出部17を構成していることになる。そし
て、この時間差検出部17の出力信号Fの発生期間にク
ロック発振回路3から発生されるクロックパルスCPが
補助カウンタ13に計数されることになる。
Next, the exclude-jib-or-gate 10 inputs both the input signals and inputs B, and removes the mismatched portion from IIHII.
An output signal E shown in FIG. 4(f) is generated. Then, this output signal E is outputted to the AND gate 11 at a low level.
As shown in FIG. 4 tgl, the meat input signals A, H are
An output signal F is generated which indicates the time difference between the input pulse signals & and B during the overlapping portion of the 1H'' period and the 1L'' period. Therefore, both human power pulse signals A and B
If the time difference Tx at the lifting platform is determined by the output signal F, the unmeasurable portion due to the overlap of the two-person force pulse signal &B can be calculated by calculation. You will be punished. The output signal F of the AND gate 11 is matched with the clock pulse CP in the AND gate 12, and its output is sent to the auxiliary counter 13.
is supplied to the clock input terminal OK. Therefore, the auxiliary counter 13 counts the clock pulses OP generated during the overlapping period Tx of the @H" period and the "L# period of the meat input signals N and B, and inputs the tt value Qx to the input terminal of the microcomputer 5. INF is supplied to the microcomputer 5, and the count value Qx of the auxiliary counter 13 is reset by the reset control signal FLS generated from the output port F'tt.
is cleared. Therefore, the OR gate 7, the one-shot multi-novel circuit 8, and the innovator 9 constitute an overlap detection section 16 that detects that the "L" periods of the flesh input signals A and B overlap. - Jib or gate 10° and gate 11 is ``'' of meat input signals A and B.
This constitutes a time difference detection section 17 that calculates the time difference between input signals A and B when the L# period overlaps. Clock pulses CP generated from the clock oscillation circuit 3 during the generation period of the output signal F of the time difference detection section 17 are counted by the auxiliary counter 13.

一万、立ち上シディレイ回路14.15は、入力パルス
信号A、Bを多少遅延させた後に出力信号p、/ 、 
B/としてマイクロコンピュータ5の入カポ−) P2
O+ Paoに供給される。
10,000, the rise delay circuits 14 and 15 delay the input pulse signals A and B to some extent, and then output the output signals p, /,
Input capo of microcomputer 5 as B/) P2
O+ Supplied to Pao.

ここで、アンドゲート6の出力信号ABは、マイクロコ
ンピュータ5のインタラシトポートINTに供給されて
いることから、入力パルス信号ん、Bのいずれかあるい
は両方が1L#になるとマイクロコンピュータ5は割シ
込み制御が加えられて割シ込みモードとなる。そして、
このマイクロコンピュータ5が割シ込みモードになると
、入カポ−) Pzo + Psoの状態を判別するこ
とによって、つまシ″″L”状態の入カポ−)P10+
P3oを判別することによって割シ込みが加えられた入
力パルス信号の種別を判別する。この様にして入力パル
ス信号の種別が判別されたならば、この人力パルス信号
の種別を入力番号N1 ラッチ回路4の出力信号が表わ
す計数値をQとして内部のメモリに例えば第5図に示す
様に順次書き込まれる。つまシ、メモリは2ノ々イトを
1組として片方に入力種別、他方に計数値Qが記憶され
る。そして、このメモリは番地OOにデータが書き込ま
れる毎に番地がシフトされて最も古いデータがオード−
フローされることによ択最も新しいデータを基準として
予め定められた数のデータが常に保持されることになる
。例えば第6図(、) (b)に示す入力パルス信号A
、Bが供給された場合には、第6図(c)に示す出力信
号ABの各パルス間に於けるクロックパルスCPの計数
値が保持されるラッチ回路4の出力値Qが入力種別(A
またはB)とともに第7図に示す様にメモリに保持され
ることになる。
Here, since the output signal AB of the AND gate 6 is supplied to the interrupt port INT of the microcomputer 5, when either or both of the input pulse signals N and B become 1L#, the microcomputer 5 interrupts the interrupt signal. Interrupt control is added to enter interrupt mode. and,
When this microcomputer 5 enters the interrupt mode, by determining the state of the input capo (Pzo + Pso), the input capo (Pzo + Pso) is in the "L" state.
By determining P3o, the type of input pulse signal to which the interrupt has been added is determined. Once the type of the input pulse signal is determined in this way, the type of the human pulse signal is set as the input number N1, the count value represented by the output signal of the latch circuit 4 is set as Q, and is stored in the internal memory as shown in FIG. 5, for example. are written sequentially. In the memory, input type is stored in one set and count value Q is stored in the other. Each time data is written to address OO, the address of this memory is shifted, and the oldest data is
By being flowed, a predetermined number of data are always held based on the newest data. For example, the input pulse signal A shown in FIG.
, B are supplied, the output value Q of the latch circuit 4 that holds the counted value of the clock pulse CP between each pulse of the output signal AB shown in FIG.
or B) will be held in the memory as shown in FIG.

このようにしてメモリに保持された各種データは、番地
の新しい側から隣接する同一人力種別の計数値Qを2個
取り出し、その間に於ける計数値Qの総和をめてクロッ
クツ七ルスCPの周期を乗算することによって周期がめ
られる。
The various data held in the memory in this way are obtained by taking two adjacent count values Q of the same manual type from the newer address side, and calculating the sum of the count values Q between them to determine the period of the clock pulse CP. The period can be found by multiplying by .

例えば第6図(a)に示す入力パルス信号Aの周期To
をめる場合には、番地01と02に保持されている計数
値Ql、Q2の加算値にクロックツ七ルスCPの周期を
乗算することによってめられることになυ、マイクロコ
ンピュータ5はこの様な処理を順次実行しながら各人カ
ッRルス信号入、Bの周期を測定して出力する。
For example, the period To of the input pulse signal A shown in FIG. 6(a)
, it is determined by multiplying the sum of the count values Ql and Q2 held at addresses 01 and 02 by the period of the clock pulse CP. While sequentially executing the process, each person's callus signal input and B cycles are measured and output.

ここで、上記説明は入力パルス信号A、Bの1L”期間
が互いに菫なり曾わない場合であるが。
Here, the above explanation assumes that the 1L'' periods of the input pulse signals A and B do not overlap each other.

菫なシ什う場合には第4図(、)に示す入カパルス信号
入の立ち上多部分がアンドゲート6によって消されてし
まうために、第4図(a)にTxで示す入力、oルス信
号A、B間の周期測定が行なえなくなる。このために、
かかる条件の場合には周期の算出に特殊な処理が加えら
れる。以下、第8図に示すフローチャートを用いて説明
する。
In the case of a violet signal, the rising edge of the input pulse signal shown in FIG. It becomes impossible to measure the period between the pulse signals A and B. For this,
In the case of such conditions, special processing is added to the period calculation. The process will be explained below using the flowchart shown in FIG.

マイクロコンピュータ5は、割シ込みモードになると第
8図に示すステップS1に移行してます入カポ−)PI
Oの状態を判別する。ここで、入カポ−) ptoに供
給されるワンショットマルチノ々イブレータ8の出力信
号りが″H#であれば入力パルス信号入、Bの”L1期
間が互いに重なシ什っていることを示している。そして
、このステップ81に於ける判別がNOであった場合に
は、ステップS2に移行して入カポ−) Proの状態
を判別する。ここで、割り込みがかけられる条件は入カ
ッぞルス信号A、Bのいずれか、あるいは両方が同時に
入力された場合である。従って、ステップS2に於ける
判断がNOであった場合には、入力、uルス信号Bが入
力されたことにな)、ステップS3に於いて入力種別と
してBがNoに取シ込まれる。また、ステップ83に於
ける判別がYESであった場合には、ステップ84に於
いて入力種別としてAがNOに取シ込まれる。
When the microcomputer 5 enters the interrupt mode, it moves to step S1 shown in FIG.
Determine the state of O. Here, if the output signal of the one-shot multi-nobrator 8 supplied to the input capo PTO is "H#", it means that the "L1 period of the input pulse signal input and B overlaps with each other". It shows. If the determination in step 81 is NO, the process moves to step S2 and the state of the input card (Pro) is determined. Here, the condition for causing an interrupt is when either or both of the input pulse signals A and B are input at the same time. Therefore, if the determination in step S2 is NO, it means that the input pulse signal B has been input), and B is taken in as the input type in step S3. Further, if the determination in step 83 is YES, then in step 84, A is input as the input type.

次に、ステップ85に於いては割シ込み状態を判別して
おシ、割シ込みが解かれるとステップS6に移行する。
Next, in step 85, the interrupt state is determined, and when the interrupt is released, the process moves to step S6.

ステップS6に於いては、ラッチ回路4の出力信号りを
計数値Qoとして記憶した後にリターンされることによ
り、通常の重なシが生じない状態に於ける各種データの
メモリへの取多込み処理が完了する。
In step S6, the output signal of the latch circuit 4 is stored as the count value Qo and then returned, so that the process of loading various data into the memory in a state where normal overlaps do not occur is performed. is completed.

次に、入力パルス信号A、Hの#L”期間が重なシ什っ
た場合には、ステップS1に於ける判断がYESとなっ
てステップSフに移行する。ステップS7に於いては入
カポ−) proの状態を判別し、判別結果がNOであ
る場合には入力パルス信号Bが先行していることを表わ
すために、ステップSSに於いてNo=B、N、=人を
セットする。
Next, if the #L'' periods of the input pulse signals A and H overlap, the determination in step S1 becomes YES and the process moves to step S. (Capo) Determine the state of pro, and if the determination result is NO, set No = B, N, = person in step SS to indicate that input pulse signal B is leading. .

また、ステップS7に於ける判別がYF3であった場合
には、ステップS9に移行して入力ポートpeaの状態
を判別する。そして、このステップS9に於ける判別結
果がYESであった場合には、ステップS7に戻す処理
を繰り返させて入力ポートP2GおよびPSOのいずれ
かが“H”となるのを待ち、ステップ8・の判断がNo
になるステップ810に移行してNo−&、N1=B 
をセットする。次にステップ811に於いては割シ込み
モードの解除を判別しておシ、このステップSttの判
別がNoになるとステップSl鵞に移行する。ステップ
Sl鵞に於いては、Qoに補助カウンタ13の計数値Q
xをセットしb QlにL −Qxをセットする。つま
j’、Qxには第4図1alにTxで示す入カパルス信
号&、B間に発生されるクロックパルスOPの発生数カ
L −Qxとしてめられて記憶されることになる。
Further, if the determination in step S7 is YF3, the process moves to step S9 and the state of the input port pea is determined. If the determination result in step S9 is YES, the process returns to step S7 and waits for either input port P2G or PSO to become "H". Judgment is no
The process moves to step 810 where No-&, N1=B.
Set. Next, in step 811, it is determined whether to cancel the interrupt mode, and if the determination in step Stt becomes No, the process moves to step Sl. In step Sl, Qo is the count value Q of the auxiliary counter 13.
Set x and set b Ql to L - Qx. In other words, the number L-Qx of clock pulses OP generated between the input pulse signals & and B shown as Tx in FIG. 4 1al is determined and stored in j' and Qx.

この様にして取シ込まれた各入力種別と計数値は、隣接
する同一人力種別の計数値に対する総和がめられ、これ
を基にしてクロックパルスCPの予め定められた周期と
の関係に於いて各人力パルス信号A、Hの周期がそれぞ
れめられる。そしてこの場合、近年に於いては2個のカ
ウンタ、ラッチ回路、クロック発振回路およびディレィ
回路をも内蔵するマイクロコンピュータが作られておシ
、この様なワンチップマイクロコンピュータを用いた場
合には、わずかな回路部品を附加するのみで良いことに
なシ、よシ簡略化されたものとなる。
Each input type and count value taken in in this way is summed with respect to the count value of the same adjacent manual type, and based on this, the summation is calculated in relation to the predetermined period of the clock pulse CP. The period of each human power pulse signal A, H is determined. In this case, in recent years, microcomputers have been created that also incorporate two counters, a latch circuit, a clock oscillation circuit, and a delay circuit, and when such a one-chip microcomputer is used, The advantage is that only a few circuit parts need to be added, which greatly simplifies the process.

以上説明した様に、本発明によるパルス周期゛測定回路
に於いては、簡単な構成でありながら、互いにその一部
が重なり合う状態で供給される2種の人力パルス信号に
対しても、その各周期を確実に測定することが出来る優
れた効果を有する。
As explained above, although the pulse period measurement circuit according to the present invention has a simple configuration, it can be used for two types of human pulse signals that are supplied partially overlapping each other. It has an excellent effect of being able to reliably measure the period.

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

第1図は従来のパルス周期測定回路の一例を示す回路図
、第2図(a)〜(c)は2種の人力パルス信号に対す
る周期測定の従来例を説明するだめの波形図、第3図は
本発明によるパルス周期測定回路の一実施例を示す回路
図、第4図(a)〜(g)、第6図(、)〜(c)は第
3図に示す回路の動作を説明するための各部動作波形図
、第5図、第7図は第3図に示すマイクロコンピュータ
のデータ保持状態を示す図、第8図は第3図に示す回路
の動作を示すフローチャートである。 1・・・ディレィ回路、2・・・カウンタ、3・・・ク
ロック発振回路、4・・・ランチ回路、5・・・マイク
ロコンピュータ、6,11.12・・・アンドゲート、
7・・・オアゲート、8・・・ワンショットマルチノ々
イブレータ回路、9・・・インノ々−タ、10・・・エ
クスクル−ジブオアゲート、13・・・補助カウンタ、
14.15・・・立ち上シディレイ回路、16・・・重
なシ検出部、17・・・時間差検出回路。 第5図 第6図 第7図
FIG. 1 is a circuit diagram showing an example of a conventional pulse period measurement circuit, FIGS. 2(a) to (c) are waveform diagrams illustrating conventional examples of period measurement for two types of human pulse signals, and FIG. The figure is a circuit diagram showing an embodiment of the pulse period measuring circuit according to the present invention, and Figures 4 (a) to (g) and Figures 6 (,) to (c) explain the operation of the circuit shown in Figure 3. 5 and 7 are diagrams showing the data holding state of the microcomputer shown in FIG. 3, and FIG. 8 is a flowchart showing the operation of the circuit shown in FIG. 3. DESCRIPTION OF SYMBOLS 1... Delay circuit, 2... Counter, 3... Clock oscillation circuit, 4... Launch circuit, 5... Microcomputer, 6, 11.12... AND gate,
7... OR gate, 8... One-shot multi-novelizer circuit, 9... Inverter, 10... Excludor gate, 13... Auxiliary counter,
14.15... Startup delay circuit, 16... Overlapping shift detection section, 17... Time difference detection circuit. Figure 5 Figure 6 Figure 7

Claims (1)

【特許請求の範囲】[Claims] (1)複数種の被測定人力パルス信号に対する論理和を
める第1ゲート回路と、クロックパルスを計数するとと
もに前記第1ゲート回路の出力信号をわずかに遅延した
信号によってリセットされる主カウンタと、仁の主カウ
ンタの計数値をそのリセット直前に於いて保持するラッ
チ回路と、前記被測定人力パルス信号の重な多発生を検
出して出力を発生する重なシ検出部と、この重な)検出
部の出力発生時にのみ被測定人力パルス信号の時間差に
応じたパルスを発生する時間差検出部と、この時間差検
出部の出力発生期間に於ける前記クロックパルスの発生
数を計数する補助カウンタと、前記第1ゲート回路の出
力信号を割シ込み制御信号として前記ラッチ回路の出力
値および補助カウンタの計数値を取シ込むマイクロコン
ピュータとを備え、前記マイクロコンピュータは割り込
みモード時に於ける被測定人力パルス信号を監視するこ
とによって入力パルス信号の種別を判別してこの判別さ
れた種別と前記ラッチ回路の出力信号とを組として順次
記憶し、前記型なり検出部の出力発生時にはラッチ回路
の出力値から補助カウンタの計数値を減算した値と入力
パルス信号の種別とを組とし、更に補助カウンタの計数
値と入力パルス信号の種別とを組として記憶し、記憶さ
れたデータの中から隣接する最も新しい同一種別間の計
数値総和とクロックパルス周期から各入カッ々ルス信号
の周期を演算して出力することを特徴とするパルス周期
測定回路。
(1) A first gate circuit that performs a logical sum on multiple types of human input pulse signals to be measured, and a main counter that counts clock pulses and is reset by a signal obtained by slightly delaying the output signal of the first gate circuit. , a latch circuit that holds the counted value of the main counter immediately before its reset, an overlapping detection section that detects overlapping occurrences of the human power pulse signal to be measured and generates an output, and this overlapping circuit. ) a time difference detection unit that generates a pulse according to the time difference of the human power pulse signal to be measured only when the output of the detection unit is generated; and an auxiliary counter that counts the number of clock pulses generated during the output generation period of the time difference detection unit; , a microcomputer that inputs the output value of the latch circuit and the count value of the auxiliary counter by using the output signal of the first gate circuit as an interrupt control signal, and the microcomputer receives the output value of the latch circuit and the count value of the auxiliary counter as an interrupt control signal, and the microcomputer receives the output value of the latch circuit and the count value of the auxiliary counter. The type of the input pulse signal is determined by monitoring the pulse signal, and the determined type and the output signal of the latch circuit are sequentially stored as a set, and when the shape detection section generates an output, the output value of the latch circuit is The value obtained by subtracting the count value of the auxiliary counter from the input pulse signal type is set as a set, and the count value of the auxiliary counter and the type of input pulse signal are stored as a set. A new pulse period measuring circuit is characterized in that it calculates and outputs the period of each input pulse signal from the sum of count values of the same type and the clock pulse period.
JP13958683A 1983-07-31 1983-07-31 Pulse cycle measuring circuit Granted JPS6031062A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP13958683A JPS6031062A (en) 1983-07-31 1983-07-31 Pulse cycle measuring circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP13958683A JPS6031062A (en) 1983-07-31 1983-07-31 Pulse cycle measuring circuit

Publications (2)

Publication Number Publication Date
JPS6031062A true JPS6031062A (en) 1985-02-16
JPH0150866B2 JPH0150866B2 (en) 1989-10-31

Family

ID=15248713

Family Applications (1)

Application Number Title Priority Date Filing Date
JP13958683A Granted JPS6031062A (en) 1983-07-31 1983-07-31 Pulse cycle measuring circuit

Country Status (1)

Country Link
JP (1) JPS6031062A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS63169826A (en) * 1987-01-07 1988-07-13 Mitsubishi Electric Corp Counter circuit
JPH0214017U (en) * 1988-07-11 1990-01-29
JPH02130130U (en) * 1989-03-31 1990-10-26

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS63169826A (en) * 1987-01-07 1988-07-13 Mitsubishi Electric Corp Counter circuit
JPH0214017U (en) * 1988-07-11 1990-01-29
JPH02130130U (en) * 1989-03-31 1990-10-26

Also Published As

Publication number Publication date
JPH0150866B2 (en) 1989-10-31

Similar Documents

Publication Publication Date Title
US7360109B2 (en) Measuring the interval of a signal using a counter and providing the value to a processor
JPS6031062A (en) Pulse cycle measuring circuit
JP2600598B2 (en) Pulse width judgment circuit
JPS62239247A (en) Electronic computer
JPH0271190A (en) Method for time calibration of computer system
JPH0635998B2 (en) Capture device
JP2604562B2 (en) Pulse interval measuring device
JPH0229457Y2 (en)
JPH0894660A (en) Pulse measuring apparatus
JPS59155766A (en) Pulse cycle measuring circuit
JPH0658386B2 (en) Counter device
US20060112316A1 (en) Method of monitoring status of processor
JPH0231248A (en) Data processor
SU1680078A1 (en) Thermometer
SU1522059A1 (en) Apparatus for measuring disbalance
JPS61175736A (en) Microcomputer for program evaluation
JPH07260845A (en) Pulse period measuring circuit
SU877547A1 (en) Device for diagnostic checking
RU1830532C (en) Device for assessment of computations accuracy
JPH05333956A (en) Timer circuit
JPH0933579A (en) Frequency measuring circuit
SU1394164A1 (en) Meter of delay line wave impedance
JP3368506B2 (en) Alarm detection circuit with timer
JPH06195245A (en) Monitor timer device
JPS6298265A (en) Speed detecting device