JPH0552971A - Time measuring device - Google Patents

Time measuring device

Info

Publication number
JPH0552971A
JPH0552971A JP21075191A JP21075191A JPH0552971A JP H0552971 A JPH0552971 A JP H0552971A JP 21075191 A JP21075191 A JP 21075191A JP 21075191 A JP21075191 A JP 21075191A JP H0552971 A JPH0552971 A JP H0552971A
Authority
JP
Japan
Prior art keywords
signal
pulse signal
edge
counter
count value
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
JP21075191A
Other languages
Japanese (ja)
Other versions
JP3047261B2 (en
Inventor
Hideo Doi
英夫 土井
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.)
Yokogawa Electric Corp
Original Assignee
Yokogawa Electric Corp
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 Yokogawa Electric Corp filed Critical Yokogawa Electric Corp
Priority to JP3210751A priority Critical patent/JP3047261B2/en
Publication of JPH0552971A publication Critical patent/JPH0552971A/en
Application granted granted Critical
Publication of JP3047261B2 publication Critical patent/JP3047261B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Measurement Of Unknown Time Intervals (AREA)

Abstract

PURPOSE:To continuously measure the pulse width and cycle of a pulse signal. CONSTITUTION:An edge generating circuit 1 outputting an edge pulse signal on the basis of the rising/falling edge of a pulse signal, a counter 3 enabled by a measurement start signal and counting the pulse signal on the basis of a clock signal and disabled by a measurement stop signal to stop counting, a latch 5 temporarily holding the count value of the counter on the basis of the edge pulse signal of the edge generating circuit 1 and the clock signal and a memory 7 storing the count value held by the latch 5 are provided. The pulse width and cycle of the pulse signal are continuously measured on the basis of the count value stored in the memory 7.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は、パルス信号のパルス幅
と周期の時間をクロック信号に基づいて測定する時間測
定装置に関し、更に詳しくは、クロック信号に基づいて
カウンタが連続してパルス信号を計数した計数値をパル
ス信号の立ち上がり/立ち下がりエッジ毎にラッチに保
持し、この計数値に基づいてパルス信号のパルス幅と周
期を連続して時間測定するようにした時間測定装置に関
する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a time measuring device for measuring the pulse width and period of a pulse signal based on a clock signal. The present invention relates to a time measuring device that holds a counted value in a latch at each rising / falling edge of a pulse signal and continuously measures the pulse width and period of the pulse signal based on the counted value.

【0002】[0002]

【従来の技術】従来の時間測定装置は、カウンタが基準
クロックに基づいてパルス信号のパルス幅を計数し、そ
の結果を一旦メモリに記憶した後、このメモリに記憶し
た計数値をCPUが演算してパルス信号のパルス幅とし
て算出している。
2. Description of the Related Art In a conventional time measuring device, a counter counts the pulse width of a pulse signal based on a reference clock, temporarily stores the result in a memory, and then a CPU calculates the count value stored in this memory. Is calculated as the pulse width of the pulse signal.

【0003】図7は、従来の時間測定装置の動作を示す
タイムチャ−トで、(a)は被測定パルス信号S0 、
(c)はカウンタに入力される基準クロック信号CLK
0 、(f)は基準クロック信号CLK0 を計数するカウ
ンタのQ出力、(j)ライト信号WRである。 (1) カウンタは、被測定パルス信号S0 の立上がりによ
ってイネ−ブルとなり、クロック端子に入力されている
基準クロック信号CLK0 の計数を開始する。 (2) カウンタは、被測定パルス信号S0 が立ち下がると
ディセ−ブルとなり、カウンタが計数した値、この場合
はカウント“9”をメモリに出力する。 (3) カウンタは、計数値がメモリに書き込まれる間は計
数値を保持していて、ライト信号がメモリに与えられて
計数値が書き込まれた後に、リセット信号によって計数
値がクリアされる。
FIG. 7 is a time chart showing the operation of a conventional time measuring apparatus, in which (a) is a pulse signal to be measured S0,
(C) is the reference clock signal CLK input to the counter
0 and (f) are the Q output of the counter for counting the reference clock signal CLK0 and (j) the write signal WR. (1) The counter is enabled by the rise of the pulse signal S0 to be measured, and starts counting the reference clock signal CLK0 input to the clock terminal. (2) The counter becomes disabled when the pulse signal S0 to be measured falls, and outputs the value counted by the counter, in this case, the count "9", to the memory. (3) The counter holds the count value while the count value is written in the memory, and after the write signal is given to the memory and the count value is written, the count value is cleared by the reset signal.

【0004】[0004]

【発明が解決しようとする課題】このような従来の時間
測定装置は、カウンタが計数したパルス幅のデ−タをメ
モリに書き込むために時間が必要で、パルス幅を計数し
た後に連続して周期を計数することができないという欠
点を有していた。
In such a conventional time measuring device, it takes time to write the data of the pulse width counted by the counter into the memory, and the period is continuously counted after counting the pulse width. Had the drawback that it could not be counted.

【0005】本発明は、このような点に鑑みてなされた
もので、クロック信号に基づいてカウンタが連続してパ
ルス信号を計数した計数値をパルス信号の立上がり/立
ち下がりエッジ毎にラッチで保持し、このラッチが保持
したデ−タをメモリに記憶するようにしたもので、被測
定パルス信号のパルス幅と周期を連続して測定すること
ができる時間測定装置を提供することを目的としてい
る。
The present invention has been made in view of the above circumstances, and holds a count value obtained by continuously counting pulse signals by a counter based on a clock signal by a latch at each rising / falling edge of the pulse signal. The data held by the latch is stored in the memory, and an object thereof is to provide a time measuring device capable of continuously measuring the pulse width and period of the pulse signal under measurement. ..

【0006】[0006]

【課題を解決するための手段】このような目的を達成す
るために、本発明は、パルス信号の立ち上がりと立ち下
がりの時刻をクロック信号に基づいて連続的に測定する
時間測定装置であって、前記パルス信号の立ち上がり/
立ち下がりのエッジに基づいてエッジパルス信号を出力
するエッジ発生回路と、測定開始のスタ−ト信号によっ
てイネ−ブルとなり前記パルス信号を前記クロック信号
によって計数し、測定終了のストップ信号によってディ
セ−ブルとなり計数を停止するカウンタと、このカウン
タの計数値を前記エッジ発生回路のエッジパルス信号と
前記クロック信号に基づいて一時的に保持するラッチ
と、このラッチの保持した計数値を記憶するメモリと、
このメモリに前記ラッチの計数値を記憶するアドレスを
指定するアドレスカウンタと、を設け、前記メモリに記
憶した計数値に基づいて前記パルス信号のパルス幅及び
周期を連続して測定することを特徴としている。
In order to achieve such an object, the present invention is a time measuring device for continuously measuring the rising and falling times of a pulse signal based on a clock signal, Rise of the pulse signal /
An edge generation circuit that outputs an edge pulse signal based on a falling edge, and an enable signal by a start signal for starting measurement, the pulse signal is counted by the clock signal, and a disable signal by a stop signal at the end of measurement. A counter that stops counting, a latch that temporarily holds the count value of the counter based on the edge pulse signal of the edge generation circuit and the clock signal, and a memory that stores the count value held by the latch.
An address counter for designating an address for storing the count value of the latch is provided in the memory, and the pulse width and the cycle of the pulse signal are continuously measured based on the count value stored in the memory. There is.

【0007】[0007]

【作用】本発明の各構成要素は次のような作用をする。
エッジ発生回路は、被測定パルス信号に基づいて生成し
たエッジパルス信号をタイミング生成回路に出力する。
カウンタは、タイミング生成回路からのイネ−ブル信号
によってイネ−ブルになり、タイムベ−スから入力され
る基準クロック信号を計数する。ラッチは、カウンタが
計数している計数値を被測定パルス信号の立ち上がり/
立ち下りエッジ毎に保持する。メモリは、ラッチが保持
したカウンタの計数値を連続的に記憶する。アドレスカ
ウンタは、タイミング生成回路の出力するアドレスクロ
ック信号によってアドレスをインクリメントされ、メモ
リにアドレスを指定する。
Each component of the present invention operates as follows.
The edge generation circuit outputs the edge pulse signal generated based on the pulse signal under measurement to the timing generation circuit.
The counter is enabled by the enable signal from the timing generation circuit and counts the reference clock signal input from the time base. The latch uses the count value counted by the counter as the rising edge / pulse of the pulse signal under measurement.
Hold for each falling edge. The memory continuously stores the count value of the counter held by the latch. The address counter increments the address by the address clock signal output from the timing generation circuit and specifies the address in the memory.

【0008】[0008]

【実施例】以下、図面を用いて本発明の一実施例を詳細
に説明する。図1は、本発明の時間測定装置の一実施例
を示す構成ブロック図である。図中、1はエッジ検出回
路で、被測定パルス信号S0 の立ち上がり/立ち下がり
エッジに基づいてエッジパルス信号S1 を生成し、タイ
ミング生成回路2に出力する。タイミング生成回路2
は、測定の開始と終了を指示するスタ−ト信号S2 とス
トップ信号S3 が入力されていて、スタ−ト信号S2 に
基づいて測定開始を指示する測定イネ−ブル信号S4 を
アクティブに同期式カウンタ3及びバッファ6に出力
し、ストップ信号S3 に基づいてインアクティブに出力
する。
An embodiment of the present invention will be described in detail below with reference to the drawings. FIG. 1 is a configuration block diagram showing an embodiment of the time measuring device of the present invention. In the figure, reference numeral 1 denotes an edge detection circuit, which generates an edge pulse signal S1 based on the rising / falling edge of the pulse signal S0 to be measured and outputs it to the timing generation circuit 2. Timing generation circuit 2
A start signal S2 and a stop signal S3 for instructing the start and end of the measurement are input, and a measurement enable signal S4 for instructing the start of the measurement based on the start signal S2 is activated in a synchronous counter. 3 and the buffer 6, and inactively output based on the stop signal S3.

【0009】同期式カウンタ3は、測定イネ−ブル信号
S4 が入力されてアクティブになるとタイムベ−ス4か
らクロック端子に入力されている基準クロックCLK0
の計数を開始し、測定イネ−ブル信号S4 がインアクテ
ィブに切り替わってディセ−ブルとなると基準クロック
CLK0 の計数を停止する。5は同期式カウンタ3の計
数したデ−タを保持するラッチで、エッジパルス信号S
1 と基準クロックCLK0 に基づいてタイミング生成回
路2がクロック端子に出力したラッチ信号S5 によって
計数値デ−タを保持する。すなわち、パルス信号S0 の
立ち上がり/立ち下がりの時点の同期式カウンタ3の計
数値を保持する。
The synchronous counter 3 receives the measurement enable signal S4 and becomes active, and the reference clock CLK0 input from the time base 4 to the clock terminal.
The counting of the reference clock CLK0 is stopped when the measurement enable signal S4 is switched to inactive and disabled. Reference numeral 5 is a latch for holding the data counted by the synchronous counter 3, which is an edge pulse signal S
Based on 1 and the reference clock CLK0, the timing generation circuit 2 holds the count value data by the latch signal S5 output to the clock terminal. That is, the count value of the synchronous counter 3 at the time of rising / falling of the pulse signal S0 is held.

【0010】ラッチ5に保持された計数値は、バッファ
6を介してメモリ7に入力され、バッファ8を介してア
ドレスカウンタ9が指定したアドレスにタイミング生成
回路2が出力するライト信号S6 によって書き込まれ
る。このアドレスカウンタ9がメモリ7に指定するアド
レスは、タイミング発生器2からのアドレスクロック信
号S7 によってインクリメントされる。
The count value held in the latch 5 is input to the memory 7 via the buffer 6 and written via the buffer 8 to the address designated by the address counter 9 by the write signal S6 output from the timing generation circuit 2. .. The address designated by the address counter 9 in the memory 7 is incremented by the address clock signal S7 from the timing generator 2.

【0011】尚、このライト信号S6 とアドレスクロッ
ク信号S7 は、タイミング生成回路2に入力されるクロ
ック信号CLK1 に基づいて生成される。
The write signal S6 and the address clock signal S7 are generated based on the clock signal CLK1 input to the timing generation circuit 2.

【0012】このようにして被測定パルス信号S0 のエ
ッジ毎の計数値デ−タがメモリ7に記憶された後、CP
U10は、メモリ7のアドレスを指定して計数値デ−タ
を読出し、演算によってパルス幅と周期の時間を算出す
る。
After the count value data for each edge of the pulse signal S0 to be measured is stored in the memory 7 in this manner, CP
U10 specifies the address of the memory 7 to read the count value data, and calculates the pulse width and the period time by calculation.

【0013】図2は、本発明の時間測定装置のエッジ検
出回路1を抽出して示した回路図である。図中、11は
排他的論理和回路で、一方の入力端子には被測定パルス
信号S0 が直接に入力されるようになっていて、他方の
入力端子には被測定パルス信号S0 がディレイライン1
2を介して入力されるようになっている。すなわち、排
他的論理和回路11は、被測定パルス信号S0 の立ち上
がりエッジに対し、ディレイ時間幅のエッジパルス信号
S1 を出力すことになる。
FIG. 2 is a circuit diagram showing an extracted edge detection circuit 1 of the time measuring apparatus of the present invention. In the figure, 11 is an exclusive OR circuit, and the measured pulse signal S0 is directly input to one input terminal and the measured pulse signal S0 is input to the other input terminal of the delay line 1
It is designed to be input via 2. That is, the exclusive OR circuit 11 outputs the edge pulse signal S1 having the delay time width with respect to the rising edge of the measured pulse signal S0.

【0014】図3は、本発明の時間測定装置のタイミン
グ生成回路2を抽出して示した回路図である。図中、2
1はD端子とクロック端子に共通のハイレベル信号が印
加されているD型フリップフロップで、プリセット端子
(PR)にスタ−ト信号S2が入力されるとアクティブ
の測定イネ−ブル信号S4 を反転端子Q(以下、Q*端
子と省略)から同期式カウンタ、アドレスカウンタ等に
出力し、クリア端子(CLR)にストップ信号S3 が入
力されると測定イネ−ブル信号S4 が反転してインアク
ティブとなる。
FIG. 3 is a circuit diagram showing an extracted timing generation circuit 2 of the time measuring device of the present invention. 2 in the figure
Reference numeral 1 is a D-type flip-flop to which a high level signal common to the D terminal and the clock terminal is applied. When the start signal S2 is input to the preset terminal (PR), the active measurement enable signal S4 is inverted. When the stop signal S3 is input to the synchronous counter, address counter, etc. from the terminal Q (hereinafter abbreviated as Q * terminal) and the stop signal S3 is input to the clear terminal (CLR), the measurement enable signal S4 is inverted and becomes inactive Become.

【0015】22はD端子にハイレベル信号が印加され
たD型フリップフロップで、エッジパルス信号S1 がク
ロック端子に入力され、Q出力がD型フリップフロップ
23のD端子に接続されている。D型フリップフロップ
23は、タイムベ−スからインバ−タ231 を介して基
準クロック信号CLK0 がクロック端子に入力され、D
型フリップフロップ21のQ出力がクリア端子に接続さ
れ、Q出力がラッチ信号S5 としてラッチ5に接続され
ている。
Reference numeral 22 denotes a D-type flip-flop having a high-level signal applied to the D-terminal. The edge pulse signal S1 is input to the clock terminal and the Q output is connected to the D-terminal of the D-type flip-flop 23. In the D-type flip-flop 23, the reference clock signal CLK0 is input to the clock terminal from the time base through the inverter 231 and D
The Q output of the flip-flop 21 is connected to the clear terminal, and the Q output is connected to the latch 5 as the latch signal S5.

【0016】232 は負論理のORゲ−トで、一方の入
力端子にはD型フリップフロップ23のQ*出力が接続
され、他方の入力端子にはD型フリップフロップ21の
Q出力が接続されている。このORゲ−ト232 の出力
信号は、D型フリップフロップ22のクリア端子に接続
されている。
Reference numeral 232 is a negative logic OR gate, one input terminal of which is connected to the Q * output of the D-type flip-flop 23, and the other input terminal of which is connected to the Q-output of the D-type flip-flop 21. ing. The output signal of the OR gate 232 is connected to the clear terminal of the D-type flip-flop 22.

【0017】24はD端子にハイレベル信号が印加され
たD型フリップフロップで、エッジパルス信号S1 がク
ロック端子に入力され、Q出力がD型フリップフロップ
25のD端子に接続されている。D型フリップフロップ
25は、クロック端子にクロック信号CLK1 が入力さ
れ、クリア端子にD型フリップフロップ21のQ出力が
接続され、Q出力がANDゲ−ト251 の一方の入力端
子に接続されている。
Reference numeral 24 is a D-type flip-flop having a high-level signal applied to the D-terminal, the edge pulse signal S1 is input to the clock terminal, and the Q output is connected to the D-terminal of the D-type flip-flop 25. The clock signal CLK1 is input to the clock terminal of the D-type flip-flop 25, the Q output of the D-type flip-flop 21 is connected to the clear terminal, and the Q output is connected to one input terminal of the AND gate 251. ..

【0018】26はD端子にANDゲ−ト251 の出力
が接続されたD型フリップフロップで、インバ−タ26
1 を介してクロック端子にクロック信号CLK1 が入力
され、クリア端子にD型フリップフロップ21のQ出力
が入力され、Q出力がD型フリップフロップ27のD端
子に出力されるとともにQ*出力がライト信号S6 とし
てメモリ7に出力される。D型フリップフロップ27
は、クロック端子にクロック信号CLK1 が入力され、
クリア端子にD型フリップフロップ21のQ出力が接続
され、Q*出力がアドレスクロック信号S7 としてアド
レスカウンタ8に接続されている。
Reference numeral 26 is a D-type flip-flop in which the output of the AND gate 251 is connected to the D terminal.
The clock signal CLK1 is input to the clock terminal via 1, the Q output of the D-type flip-flop 21 is input to the clear terminal, the Q output is output to the D terminal of the D-type flip-flop 27, and the Q * output is written. The signal S6 is output to the memory 7. D-type flip-flop 27
The clock signal CLK1 is input to the clock terminal,
The Q output of the D-type flip-flop 21 is connected to the clear terminal, and the Q * output is connected to the address counter 8 as the address clock signal S7.

【0019】241 は負論理のORゲ−トで、一方の入
力端子にはD型フリップフロップ27のQ*出力が接続
され、他方の入力端子にはD型フリップフロップ21の
Q出力が接続されている。このORゲ−ト241 の出力
信号は、D型フリップフロップ24のクリア端子に接続
される。
Numeral 241 is an OR gate of negative logic. One input terminal is connected to the Q * output of the D-type flip-flop 27, and the other input terminal is connected to the Q-output of the D-type flip-flop 21. ing. The output signal of the OR gate 241 is connected to the clear terminal of the D-type flip-flop 24.

【0020】図4は、本発明の時間測定装置の動作を示
すタイムチャ−トで、(a)は被測定パルス信号S0 、
(b)はエッジ検出回路が出力するエッジパルス信号S
1 、(c)はタイムベ−スの発生する基準クロック信号
CLK0 、(d)はタイミング生成回路に入力されるス
タ−ト信号S2 、(e)はタイミング生成回路が出力す
る測定イネ−ブル信号S4 、(f)は同期式カウンタの
Q出力、(g)はタイミング生成回路が出力するラッチ
信号S5 、(h)はラッチのQ出力、(i)はタイミン
グ生成回路に入力されるクロック信号CLK1 、(j)
はタイミング生成回路が出力するライト信号S6 、
(k)はタイミング生成回路が出力するアドレスクロッ
ク信号S7 、(l)はアドレスカウンタのQ出力、
(m)はタイミング生成回路に入力されるストップ信号
S3 である。尚、クロック信号CLK1 は、基準クロッ
ク信号CLK0 等と特に同期する必要はなく、メモリの
アクセス時間に応じてなるべく速いものを用いれば、極
端に短かな被測定パルス周期の測定も可能になる。
FIG. 4 is a time chart showing the operation of the time measuring device of the present invention, in which (a) is the pulse signal to be measured S0,
(B) is an edge pulse signal S output from the edge detection circuit
1, (c) is the reference clock signal CLK0 generated by the time base, (d) is the start signal S2 input to the timing generation circuit, and (e) is the measurement enable signal S4 output by the timing generation circuit. , (F) is the Q output of the synchronous counter, (g) is the latch signal S5 output from the timing generation circuit, (h) is the Q output of the latch, (i) is the clock signal CLK1 input to the timing generation circuit, (J)
Is a write signal S6 output from the timing generation circuit,
(K) is the address clock signal S7 output from the timing generation circuit, (l) is the Q output of the address counter,
(M) is a stop signal S3 input to the timing generation circuit. The clock signal CLK1 does not have to be particularly synchronized with the reference clock signal CLK0 and the like, and an extremely short measured pulse period can be measured by using a clock signal that is as fast as possible according to the access time of the memory.

【0021】(10)タイミング生成回路2は、入力された
スタ−ト信号S2 に基づいて、測定イネ−ブル信号S4
を同期式カウンタ3、ラッチ5、バッファ6、8及びア
ドレスカウンタ9に出力する。 (11)測定イネ−ブル信号S4 が入力されて測定可能な状
態になってから、エッジ回路1は、被測定パルス信号S
0 に基づいて生成したエッジパルス信号S1 をタイミン
グ生成回路2に出力する。
(10) The timing generation circuit 2 receives the measurement enable signal S4 based on the input start signal S2.
Is output to the synchronous counter 3, the latch 5, the buffers 6 and 8, and the address counter 9. (11) After the measurement enable signal S4 is input and the state becomes measurable, the edge circuit 1 changes the measured pulse signal S4.
The edge pulse signal S1 generated based on 0 is output to the timing generation circuit 2.

【0022】(12)タイミング生成回路2は、エッジパル
ス信号S1 と続いてタイムベ−ス4から入力される基準
クロック信号CLK0 の立ち下がりによって生成したラ
ッチ信号S5 をラッチ5に出力する。 (13)ラッチ5は、ラッチ信号S5 が入力されると、その
時の同期式カウンタ3の計数値を保持する。この場合
は、計数値“1”の値が保持される。
(12) The timing generation circuit 2 outputs to the latch 5 the edge pulse signal S1 and the latch signal S5 generated by the trailing edge of the reference clock signal CLK0 input from the time base 4. (13) When the latch signal S5 is input, the latch 5 holds the count value of the synchronous counter 3 at that time. In this case, the value of the count value "1" is held.

【0023】(14)一方、タイミング生成回路2は、エッ
ジパルス信号S1 が入力された後に入力されるクロック
信号CLK1 の立ち下がりによって生成したライト信号
S6 をメモリ7に出力し、ラッチ5が保持した計数値
“1”をメモリ7に書き込む。
(14) On the other hand, the timing generation circuit 2 outputs the write signal S6 generated by the fall of the clock signal CLK1 input after the input of the edge pulse signal S1 to the memory 7, and the latch 5 holds it. The count value “1” is written in the memory 7.

【0024】(15)更に、タイミング生成回路2は、クロ
ック信号CLK1 の次の立ち上がりによって生成したア
ドレスクロック信号S7 をアドレスカウンタ9に出力す
る。
(15) Further, the timing generation circuit 2 outputs the address clock signal S7 generated by the next rising edge of the clock signal CLK1 to the address counter 9.

【0025】(16)アドレスカウンタ9は、クロック端子
に入力されたアドレスクロック信号S7 によってメモリ
7のアドレスをインクリメントする。 (17)被測定パルス信号S0 が立ち下ると、エッジ検出回
路1は、被測定パルス信号S0 に基づいた生成したエッ
ジパルス信号S1 をタイミング生成回路2に出力する。
(16) The address counter 9 increments the address of the memory 7 by the address clock signal S7 input to the clock terminal. (17) When the measured pulse signal S0 falls, the edge detection circuit 1 outputs the edge pulse signal S1 generated based on the measured pulse signal S0 to the timing generation circuit 2.

【0026】(18)タイミング生成回路2は、エッジパル
ス信号S1 と続いてタイムベ−ス4から入力される基準
クロック信号CLK0 の立ち下がりによって生成したラ
ッチ信号S5 をラッチ5に出力する。 (19)ラッチ5は、ラッチ信号S5 が入力されると、その
時の同期式カウンタ2の計数値を保持する。この場合
は、計数値“16”の値が保持される。以下、(14)〜(1
6)のプロセスが繰り返される。
(18) The timing generation circuit 2 outputs to the latch 5 the latch signal S5 generated by the fall of the edge pulse signal S1 and subsequently the reference clock signal CLK0 input from the time base 4. (19) When the latch signal S5 is input, the latch 5 holds the count value of the synchronous counter 2 at that time. In this case, the value of the count value "16" is held. Below, (14) ~ (1
The process of 6) is repeated.

【0027】図5は、図4で説明した被測定パルス信号
のデ−タがメモリに書き込まれた様子を示したもので、
図6は、メモリに書き込まれたデ−タに基づいてCPU
が演算によって被測定パルス信号のパルス幅及び周期を
算出する説明図である。
FIG. 5 shows a state in which the data of the pulse signal to be measured described in FIG. 4 is written in the memory.
FIG. 6 shows the CPU based on the data written in the memory.
FIG. 3 is an explanatory diagram for calculating the pulse width and period of the pulse signal under measurement by calculation.

【0028】メモリは、アドレス“0000”にデ
−タDT1 、すなわち最初の立ち上がり時の計数値
“1”が書き込まれ、アドレス“0001”にデ−
タDT2、すなわち,次ぎの立ち下りの時の計数値“1
6”が書き込まれ、アドレス“0002”に2回目
の立ち上がりの時の計数値“28”が書き込まれる。こ
のようにして、交互に出力される被測定パルス信号S0
の立ち上がり/立ち下りの時の計数値がメモリに書き込
まれていく。
In the memory, the data DT1 is written to the address "0000 H ", that is, the count value "1" at the first rising, and the data is written to the address "0001 H ".
DT2, that is, the count value "1" at the time of the next fall
6 "is written, and the count value" 28 "at the second rising is written in the address" 0002 H ". In this way, the measured pulse signal S0 alternately output.
The count value at the time of rising / falling of is written in the memory.

【0029】メモリに書き込まれたデ−タDTn (nは
1以上の整数)は、CPUによって次式に示される演算
がおこなわれ、任意の時点のパルス巾及び周期が求めら
れる。 尚、tは基準クロック信号CLK0 の周期、T
wi (i は1以上の整数)はパルス幅、Tci (i は1
以上の整数)は周期である。 Twi =(DTn+1 −DT)t Tci =(DT2n+1−DT2n−1)t
The data DTn (n is an integer of 1 or more) written in the memory is subjected to an operation represented by the following equation by the CPU to obtain a pulse width and a cycle at arbitrary times. Note that t is the cycle of the reference clock signal CLK0, T
wi (i is an integer of 1 or more) is the pulse width, and Tci (i is 1
The integers above are the periods. Twi = (DT n + 1 -DT n ) t Tci = (DT 2n + 1 -DT 2n-1 ) t

【0030】[0030]

【発明の効果】以上、詳細に説明したように、本発明の
時間測定装置は、クロック信号に基づいてカウンタが連
続してパルス信号を計数した計数値をパルス信号の立ち
上がり/立ち下がりエッジ毎にラッチに保持し、このパ
ルス信号の計数値に基づいて時間測定するようにしたた
め、連続してパルス信号の立ち上がり/立ち下がり時間
を測定できる。このため、パルス信号のパルス幅及び周
期が連続して変化するような場合でも、パルス信号の変
化に追従して正確な測定を行うことができる。
As described in detail above, in the time measuring apparatus of the present invention, the counter continuously counts the pulse signals based on the clock signal and outputs the count value at each rising / falling edge of the pulse signal. Since it is held in the latch and the time is measured based on the count value of the pulse signal, the rising / falling time of the pulse signal can be continuously measured. Therefore, even when the pulse width and period of the pulse signal continuously change, accurate measurement can be performed by following the change in the pulse signal.

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

【図1】本発明の時間測定装置の一実施例を示す構成ブ
ロック図である。
FIG. 1 is a configuration block diagram showing an embodiment of a time measuring device of the present invention.

【図2】本発明の時間測定装置のエッジ検出回路を抽出
して示した回路図である。
FIG. 2 is a circuit diagram showing an extracted edge detection circuit of the time measuring device of the present invention.

【図3】本発明の時間測定装置のタイミング生成回路を
抽出して示した回路図である。
FIG. 3 is a circuit diagram showing an extracted timing generation circuit of the time measuring device of the present invention.

【図4】本発明の時間測定装置の動作を示すタイムチャ
−トである。
FIG. 4 is a time chart showing the operation of the time measuring device of the present invention.

【図5】図4で説明した被測定パルス信号のデ−タがメ
モリに書き込まれた様子を示したものである。
5 is a diagram showing a state in which the data of the pulse signal under measurement described in FIG. 4 is written in a memory.

【図6】メモリに書き込まれたデ−タに基づいてCPU
が演算によってパルス幅及び周期を算出する説明図であ
る。
FIG. 6 is a CPU based on the data written in the memory
FIG. 3 is an explanatory diagram for calculating a pulse width and a cycle by calculation.

【図7】従来の時間測定装置の動作を示すタイムチャ−
トである。
FIG. 7 is a time chart showing the operation of a conventional time measuring device.
It is

【符号の説明】[Explanation of symbols]

1 エッジ検出回路 2 タイミング生成回路 3 同期式カウンタ 4 タイムベ−ス 5 ラッチ 7 メモリ 10 CPU 1 Edge Detection Circuit 2 Timing Generation Circuit 3 Synchronous Counter 4 Time Base 5 Latch 7 Memory 10 CPU

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】 パルス信号の立ち上がりと立ち下がりの
時刻をクロック信号に基づいて連続的に測定する時間測
定装置であって、 前記パルス信号の立ち上がり/立ち下がりのエッジに基
づいてエッジパルス信号を出力するエッジ発生回路と、 測定開始のスタ−ト信号によってイネ−ブルとなり前記
パルス信号を前記クロック信号によって計数し、測定終
了のストップ信号によってディセ−ブルとなり計数を停
止するカウンタと、 このカウンタの計数値を前記エッジ発生回路のエッジパ
ルス信号と前記クロック信号に基づいて一時的に保持す
るラッチと、 このラッチの保持した計数値を記憶するメモリと、 このメモリに前記ラッチの計数値を記憶するアドレスを
指定するアドレスカウンタと、 を設け、前記メモリに記憶した計数値に基づいて前記パ
ルス信号のパルス幅及び周期を連続して測定することを
特徴とした時間測定装置。
1. A time measuring device for continuously measuring the rising and falling times of a pulse signal based on a clock signal, which outputs an edge pulse signal based on the rising / falling edge of the pulse signal. An edge generating circuit, a counter that is enabled by a start signal for measurement and counts the pulse signal by the clock signal, and a counter that is disabled by a stop signal at the end of measurement and stops counting, and a counter of this counter. A latch for temporarily holding a numerical value based on the edge pulse signal of the edge generation circuit and the clock signal, a memory for storing the count value held by the latch, and an address for storing the count value of the latch in this memory And an address counter that specifies, and based on the count value stored in the memory, A time measuring device characterized by continuously measuring a pulse width and a cycle of the pulse signal.
JP3210751A 1991-08-22 1991-08-22 Time measuring device Expired - Lifetime JP3047261B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP3210751A JP3047261B2 (en) 1991-08-22 1991-08-22 Time measuring device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP3210751A JP3047261B2 (en) 1991-08-22 1991-08-22 Time measuring device

Publications (2)

Publication Number Publication Date
JPH0552971A true JPH0552971A (en) 1993-03-02
JP3047261B2 JP3047261B2 (en) 2000-05-29

Family

ID=16594525

Family Applications (1)

Application Number Title Priority Date Filing Date
JP3210751A Expired - Lifetime JP3047261B2 (en) 1991-08-22 1991-08-22 Time measuring device

Country Status (1)

Country Link
JP (1) JP3047261B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015512086A (en) * 2012-02-01 2015-04-23 マイクロチップ テクノロジー インコーポレイテッドMicrochip Technology Incorporated Input capture peripheral with gating logic

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015512086A (en) * 2012-02-01 2015-04-23 マイクロチップ テクノロジー インコーポレイテッドMicrochip Technology Incorporated Input capture peripheral with gating logic

Also Published As

Publication number Publication date
JP3047261B2 (en) 2000-05-29

Similar Documents

Publication Publication Date Title
JPH08211165A (en) Pulse-duration measuring device
JP3047261B2 (en) Time measuring device
KR950006468A (en) Periodic measuring device
JPS60170949A (en) Multiclock generating device
JP2019124478A (en) Time measuring circuit
JPH0735791A (en) Time measuring instrument
JP2645197B2 (en) Flow measurement device
JP2765232B2 (en) Semiconductor logic integrated circuit
JP2005278088A5 (en)
JP3223884B2 (en) Duty ratio determination circuit and duty ratio determination method
JP2009098019A (en) Timing circuit
JPH0541947B2 (en)
JPH0727804A (en) Pulse width measurement circuit
KR200222679Y1 (en) Apparatus for selective detecting rising edge and falling edge of input signal
JP2003075479A (en) Clock source, time measuring apparatus, tester and oscillator
JP2007121063A (en) Frequency measurement circuit
JPH0510992A (en) Phase difference measurement device
JP2004198337A (en) Rotation period measuring instrument
JPH0933579A (en) Frequency measuring circuit
SU1691891A1 (en) Buffer memory
JPH01212368A (en) Pulse width measuring circuit
JPH0645894A (en) Delay pulse generating circuit
JPH07104006A (en) Measured waveform storing device
JPS59210378A (en) Frequency measuring instrument
JP2002372572A (en) Method of detecting change point of signal outputted by semiconductor device, method of testing semiconductor device, device for testing semiconductor device, and time measuring device