Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JPH0692990B2 - Digital cycle measuring circuit - Google Patents
[go: Go Back, main page]

JPH0692990B2 - Digital cycle measuring circuit - Google Patents

Digital cycle measuring circuit

Info

Publication number
JPH0692990B2
JPH0692990B2 JP60152246A JP15224685A JPH0692990B2 JP H0692990 B2 JPH0692990 B2 JP H0692990B2 JP 60152246 A JP60152246 A JP 60152246A JP 15224685 A JP15224685 A JP 15224685A JP H0692990 B2 JPH0692990 B2 JP H0692990B2
Authority
JP
Japan
Prior art keywords
clock
period
signal
measurement
cycle
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Lifetime
Application number
JP60152246A
Other languages
Japanese (ja)
Other versions
JPS6214066A (en
Inventor
周幸 岡本
英男 西島
正尊 関谷
純 小林
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.)
Hitachi Ltd
Original Assignee
Hitachi 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 Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP60152246A priority Critical patent/JPH0692990B2/en
Publication of JPS6214066A publication Critical patent/JPS6214066A/en
Publication of JPH0692990B2 publication Critical patent/JPH0692990B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Measuring Frequencies, Analyzing Spectra (AREA)

Description

【発明の詳細な説明】 〔発明の利用分野〕 本発明はディジタル速度測定回路に係り、特に高速・高
精度計測に好適な、コストパフォーマンス良好で消費電
力の少ないディジタル周期計測回路に関する。
Description: BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a digital speed measuring circuit, and more particularly to a digital cycle measuring circuit which is suitable for high speed and high accuracy measurement and has good cost performance and low power consumption.

〔発明の背景〕[Background of the Invention]

従来のディジタル周期計測装置はナショナルテクニカル
レポートVoL.28 No3,6,1982に記載のように単純な速
度比較カウンタとラッチ回路等で構成されていた。以下
にこれを詳細する。第8図は従来技術を説明する図であ
る。第8図中1はデコーダ、2はプリセット値発生回
路、3はパルス作成回路、4はプリセット回路、5はア
ンドゲート、6は速度比較カウンタ、7は最大計数値検
出ゲート、8は台形波出力ゲート、9は速度誤差ゲート
回路、10はラッチ回路である。また21〜25は電気信号で
あり、具体的には21:クロックパルス,22:FG信号,23:モ
ード指定入力,24:プリセットパルス,25:ラッチパルスで
ある。
A conventional digital period measuring device was composed of a simple speed comparison counter and a latch circuit as described in National Technical Report VoL.28 No3, 6, 1982. This is detailed below. FIG. 8 is a diagram illustrating a conventional technique. In FIG. 8, 1 is a decoder, 2 is a preset value generation circuit, 3 is a pulse generation circuit, 4 is a preset circuit, 5 is an AND gate, 6 is a speed comparison counter, 7 is a maximum count value detection gate, and 8 is a trapezoidal wave output. A gate, 9 is a speed error gate circuit, and 10 is a latch circuit. Further, 21 to 25 are electric signals, and specifically, 21: clock pulse, 22: FG signal, 23: mode designation input, 24: preset pulse, 25: latch pulse.

以下に本従来例の動作を説明するために、補足図第9図
を用いる。第9図における横軸は時間であり、30は速度
比較カウンタ(第9図6)の値、31は速度誤差ゲート回
路(第8図9)の値、32〜34はFG信号22を示している。
まず、本システムにおいてパルス作成回路(第8図3)
は、FG信号22をうけて、クロックパルス21からラッチパ
ルス25とプリセットパルス24とを作成する。この2つの
パルス時間的に重複せず連続しており、ラッチパルス25
は速度誤差ゲート回路9の出力をラッチ回路10にラッチ
し、プリセットパルス24は速度比較カウンタ6をプリセ
ットするタイミングを決定する。即ちまずプリセットパ
ルス24により速度比較カウンタ6はNPにプリセットされ
る。その後速度比較カウンタ6はクロックパルス21を計
数する。この計数値の模様は第9図30のようになるが、
計数値がNF=2n-1に達すると最大計数値検出ゲート7の
出力がロウに変化し、アンドゲート5は閉じてクロック
パルス21は速度比較カウンタ6に印加されなくなり、計
数値NFに保持される。台形波出力ゲート8は速度比較カ
ウンタ6の計数値がある範囲内にある場合のみ速度誤差
ゲート回路9を通して下位nビットを出力することによ
り、31のように台形波状に変化するディジタル出力を供
する。この台形波出力(9の出力)を次のFG信号で発生
するラッチパルス25でラッチすれば、ラッチ回路10の出
力はFG周期に比例して(台形波状に)変化する。例え
ば、FG周期が比較的長く第9図の32のような場合ラッチ
される値は37のように大きい値、標準時は36のような
値、短い場合は35のように小さい値となる。尚、この例
において、モード指定信号入力23により、デコーダ1は
各指定されたモードに対するプリセット値をプリセット
値発生回路2(具体的にはROM)から読み出す。
In order to explain the operation of this conventional example, FIG. 9 of the supplementary diagram will be used below. The horizontal axis in FIG. 9 is time, 30 is the value of the speed comparison counter (FIG. 9), 31 is the value of the speed error gate circuit (FIG. 8), and 32 to 34 are FG signals 22. There is.
First, the pulse generation circuit in this system (Fig. 8 3)
Receives the FG signal 22 and creates a latch pulse 25 and a preset pulse 24 from the clock pulse 21. These two pulses are continuous without overlapping in time, and latch pulse 25
Latches the output of the speed error gate circuit 9 in the latch circuit 10, and the preset pulse 24 determines the timing for presetting the speed comparison counter 6. That is, first, the speed comparison counter 6 is preset to NP by the preset pulse 24. After that, the speed comparison counter 6 counts the clock pulses 21. The pattern of this count value is as shown in Fig. 30, but
When the count value reaches NF = 2n -1 , the output of the maximum count value detection gate 7 changes to low, the AND gate 5 is closed and the clock pulse 21 is not applied to the speed comparison counter 6 and is held at the count value NF. It The trapezoidal wave output gate 8 outputs the lower n bits through the speed error gate circuit 9 only when the count value of the speed comparison counter 6 is within a certain range, thereby providing a digital output like 31 which changes into a trapezoidal wave. If this trapezoidal wave output (output of 9) is latched by the latch pulse 25 generated by the next FG signal, the output of the latch circuit 10 changes in proportion to the FG cycle (trapezoidal waveform). For example, when the FG cycle is relatively long, such as 32 in FIG. 9, the latched value is a large value such as 37, the standard time is a value such as 36, and the short value is a small value such as 35. In this example, the decoder 1 reads the preset value for each designated mode from the preset value generation circuit 2 (specifically, ROM) by the mode designation signal input 23.

こうして、FG信号22の周期情報をラッチ回路10の出力と
してディジタル量に変換できる。ただし、ここにおいて
変換するFG周期の計測の粗さはクロック信号21の周期で
決定され、精度の良い計測のためには、高速動作の素子
を高い電圧あるいは大電流で動作させる必要がある。そ
のため、ある程度高周波のクロックになるとたとえ6dB
でも精度を上げるのに大幅なコストアップ、電力損失等
を要していた。
In this way, the cycle information of the FG signal 22 can be converted into a digital amount as the output of the latch circuit 10. However, the roughness of the measurement of the FG cycle to be converted here is determined by the cycle of the clock signal 21, and in order to perform accurate measurement, it is necessary to operate a high-speed operation element at a high voltage or a large current. Therefore, even if it is a high frequency clock to some extent, it is 6 dB
However, in order to improve the accuracy, a large cost increase and power loss were required.

〔発明の目的〕[Object of the Invention]

本発明の目的は簡単に精度を向上させられる(コストパ
フォーマンスの良い)ディジタル速度比較回路を提供す
ることにある。
An object of the present invention is to provide a digital speed comparison circuit whose accuracy can be easily improved (good cost performance).

〔発明の概要〕[Outline of Invention]

本発明の主眼は、 1)CG信号によるクロック信号のサンプリング値に基づ
いて最下位ビット情報を決定。
The main points of the present invention are: 1) The least significant bit information is determined based on the sampling value of the clock signal by the CG signal.

2)速度比較カウンタへのクロックの印加および停止タ
イミングをFG信号とクロック信号とに同期して決定。
2) Determine the clock application and stop timing for the speed comparison counter in synchronization with the FG signal and clock signal.

することにある。To do.

〔発明の実施例〕Example of Invention

以下、本発明の一実施例を第1図を用いて説明する。第
1図において50はパルス作成回路、51はLSB(最下位)
ラッチ回路である。このうち50は従来例のものと異な
り、やや複雑な制御をする。このパルス作成回路50の具
体的構成を第2図に示し、要部波形図を第3図に引用し
つつ以下に説明を加える。尚、第1図中80〜83は電子信
号であり、これらはパルス作成回路50の出力信号であ
る。各々80:ラッチパルス81:LSB(最下位ビット)情
報、82:整形クロックパルス、83:プリセットパルスを示
す。
An embodiment of the present invention will be described below with reference to FIG. In FIG. 1, 50 is a pulse generation circuit, 51 is LSB (lowest)
It is a latch circuit. Of these, 50 is a little complicated, unlike the conventional example. A concrete configuration of the pulse generating circuit 50 is shown in FIG. 2, and a description will be added below with reference to a waveform diagram of a main part in FIG. In FIG. 1, 80 to 83 are electronic signals, and these are output signals of the pulse generating circuit 50. 80: Latch pulse 81: LSB (least significant bit) information, 82: shaped clock pulse, 83: preset pulse, respectively.

本実施例の細かい動作説明の前に高精度計測の原理を第
9図によって説明する。第4図は最上段を原クロック信
号21とし、その周期をTとしたときに、同じnTの周期を
もつFG信号22の模様を(a)〜(d)に示したものであ
る。これらはクロック21の立上りエッジでカウントアッ
プされるカウンタによってnTという同一周期として計測
されるが、これらをさらに細かいT/2単位で計測する
と、それぞれは、(a):nT (b)nT,(c)nT−T/2,
(d)nT+T/2となる。これらの4つの場合を判定する
には、 1)連続した2つのFGエッジにおけるクロック21のサン
プリング値H,Lの関係によりLSB(T/2きざみの)情報を
得る。
Before explaining the detailed operation of this embodiment, the principle of high precision measurement will be described with reference to FIG. FIG. 4 shows patterns (a) to (d) of the FG signal 22 having the same nT cycle, where the uppermost stage is the original clock signal 21 and the cycle is T. These are measured as the same period of nT by a counter that counts up at the rising edge of the clock 21, but if these are measured in finer T / 2 units, they are (a): nT (b) nT, ( c) nT-T / 2,
(D) nT + T / 2. To determine these four cases, 1) LSB (T / 2 step) information is obtained from the relationship between the sampling values H and L of the clock 21 at two consecutive FG edges.

2)より高位の情報は整形クロックパルス82をカウント
して得る。
2) Higher information is obtained by counting the shaped clock pulses 82.

操作を行う。このうち整形クロックパルス82を得る一例
として次の手段がある。即ち、 1)FGエッジを検出して後、適当なタイミングT1でクロ
ックストップする。
Do the operation. Of these, the following means is one example of obtaining the shaped clock pulse 82. That is, 1) After detecting the FG edge, the clock is stopped at an appropriate timing T 1 .

2)その後適当なタイミングT2でクロックスタートす
る。
2) After that, clock start at an appropriate timing T 2 .

である。Is.

以下、T1,T2のタイミングを得る一例を次に説明する。Hereinafter, an example of obtaining the timings of T 1 and T 2 will be described.

FGエッジが検出されてこのFGエッジ(以下、これを現FG
エッジという)とこれより1つの前のFGエッジとにおけ
るクロック21のサンプリング値の関係が判定されるが、
たとえば、T1としては、FGエッジが検出されてから、判
定されたかかるサンプリング値の関係に応じて、クロッ
ク21の0または1クロック後にクロックストップするタ
イミングとし、T2としては、判定された上記のサンプリ
ング値の関係に拘らず、現FGエッジが検出されて後の4
個目のクロック21からクロックスタートするタイミング
とする。具体的には、現FGエッジとこれより1つ前のFG
エッジとにおけるクロック21のサンプリング値の関係
は、H・H,L・L,L・H,H・Lの4通りであるが、そのう
ちのH・H,L・L,H・Lの場合には、T1をFGエッジが検出
されてからクロック21の1クロック後にクロックストッ
プするタイミングとし、L・Hの場合には、T1をFGエッ
ジが検出されてからクロック21の0クロック後にクロッ
クストップするタイミングとする。
An FG edge is detected and this FG edge (hereinafter, this FG edge
Edge) and the immediately preceding FG edge, the relationship between the sampling value of the clock 21 is determined.
For example, T 1 is the timing at which the clock is stopped 0 or 1 clocks after the clock 21 after the FG edge is detected, depending on the relationship of the determined sampling values, and T 2 is the determined timing. 4 after the current FG edge is detected, regardless of the relationship between the sampling values of
The clock starts from the 21st clock 21. Specifically, the current FG edge and the previous FG
There are four types of sampling values of the clock 21 at the edges, H ・ H, L ・ L, L ・ H, H ・ L, but in the case of H ・ H, L ・ L, H ・ L, Indicates that T 1 is the timing to stop the clock one clock 21 after the FG edge is detected, and in the case of LH, T 1 is the clock stop 0 clock 21 after the FG edge is detected. It is time to do it.

このようにして、FGエッジが検出される毎に、FGエッジ
21がT1からT2までの期間除かれて整形クロック82が生成
される。
In this way, each time an FG edge is detected, the FG edge
21 is removed from the period from T 1 to T 2 to generate the shaped clock 82.

以上のようにタイミングT1,T2を設定したときのプリセ
ット値mは2であり、第4図(a)〜(d)に示したFG
信号に対する整形クロック82を第4図(aa)〜(dd)に
示す。以下、これについて説明する。
The preset value m when the timings T 1 and T 2 are set as described above is 2, and the FG shown in FIGS.
A shaping clock 82 for a signal is shown in FIGS. 4 (a) to (dd). This will be described below.

説明上、第4図(a)〜(d)に示す各FG信号の右側に
図示するエッジを現FGエッジとし、左側のエッジを1つ
前のFGエッジとする。1つ前のFGエッジが供給される
と、タイミングT1からT2までクロック21が除かれ、タイ
ミングT2から、第4図(aa)〜(dd)に示すように、第
4図(a)〜(d)に示したFG信号に対する整形クロッ
ク82が始まる。そして、現FGエッジが検出されると、現
FGエッジとこれより1つ前のFGエッジとにおけるクロッ
ク21のサンプリング値の関係が、 第4図(a)に示したFG信号では、H・H 第4図(b)に示したFG信号では、L・L 第4図(c)に示したFG信号では、L・H 第4図(d)に示したFG信号では、H・L と判定される。
For the sake of explanation, the edge shown on the right side of each FG signal shown in FIGS. 4A to 4D is the current FG edge, and the left edge is the immediately preceding FG edge. When preceding FG edge is supplied, the clock 21 from the timing T 1 to T 2 is removed from the timing T 2, as shown in FIG. 4 (aa) ~ (dd), 4 (a The shaping clock 82 for the FG signal shown in FIGS. When the current FG edge is detected, the current
The relationship between the sampling value of the clock 21 at the FG edge and the FG edge immediately before the FG edge is H / H in the FG signal shown in FIG. 4 (a), and in the FG signal shown in FIG. 4 (b). , L • L With the FG signal shown in FIG. 4 (c), L • H is judged as H • L with the FG signal shown in FIG. 4 (d).

そこで、かかる判定結果により、現FGエッジが検出され
てからのタイミングT1は、第4図(a),(b),
(d)に示すFG信号に対しては、現FGエッジが検出され
てからクロック21の1クロック後にクロックストップす
るタイミングとし、第4図(c)に示すFG信号に対して
は、現FGエッジが検出されてからクロック21の0クロッ
ク後にクロックストップするタイミングとする。従っ
て、第4図(a),(b),(d)に示すFG信号に対す
る整形クロック82が夫々第4図(aa),(bb),(dd)
に示すようになるのにに対し、第4図(c)に示すFG信
号に対する整形クロック82は、第4図(cc)に示すよう
に、1個少ないことになる。即ち、1つ前のFGエッジを
基準としたタイミングT2から現FGエッジを基準としタイ
ミングT1までの整形クロック82のクロック数は、第4図
(aa),(bb),(dd)に示す整形クロック82で(n−
m)個とすると、第4図(cc)に示す整形クロック82で
は(n−m−1)個となる。
Therefore, the timing T 1 after the current FG edge is detected is shown in FIGS. 4 (a), (b),
For the FG signal shown in (d), the timing is to stop the clock one clock 21 after the detection of the current FG edge. For the FG signal shown in FIG. 4 (c), the current FG edge is set. It is the timing to stop the clock 0 clocks after the clock 21 is detected. Therefore, the shaping clocks 82 for the FG signal shown in FIGS. 4 (a), (b), and (d) are respectively shown in FIGS. 4 (aa), (bb), and (dd).
In contrast to FIG. 4 (c), the shaping clock 82 for the FG signal shown in FIG. 4 (c) is reduced by one as shown in FIG. 4 (cc). That is, the number of shaping clocks 82 from the timing T 2 with reference to the immediately preceding FG edge to the timing T 1 with reference to the current FG edge is as shown in FIGS. 4 (aa), (bb), and (dd). In the shown shaping clock 82 (n-
m), the shaping clock 82 shown in FIG. 4 (cc) has (n−m−1) pieces.

ここで、タイミングT2から次のタイミングT1までの整形
クロック82のカウント数を前記のLSB情報よりも上位の
情報とする。そして、上記のプリセット値がmであると
き、mまでは予めカウントされているとして、タイミン
グT2から次のタイミングT1までの整形クロック82を(m
+1)の値からカウント開始する。これにより、現FGエ
ッジからタイミングT1までの整形クロック82の周期T単
位のカウント数は、第4図(a),(b),(c),
(d)に示すFG信号に対して夫々nT,nT,(n−1)T,nT
となる。
Here, the count number of the shaping clock 82 from the timing T 2 to the next timing T 1 is set as information higher than the LSB information. When the preset value is m, the shaping clock 82 from the timing T 2 to the next timing T 1 is (m
Counting starts from the value of +1). As a result, the count number of the shaping clock 82 from the current FG edge to the timing T 1 in units of period T is shown in FIGS. 4 (a), (b), (c)
For the FG signal shown in (d), nT, nT, (n-1) T, nT respectively.
Becomes

次に、上記のLSB情報を得る方法について説明する。Next, a method for obtaining the above LSB information will be described.

同じFG信号について、連続した2つのFGエッジにおける
原クロック21の2つのサンプリング値の排他的論理和を
とると、第4図(a),(b),(c),(d)に示す
FG信号に対して夫々L,L,H,Hとなり、かかる排他的論理
和がLのときには、LSB情報(T/2きざみ)を0×(T/
2)とし、排他的論理和がHのときには、LSB情報(T/2
きざみ)を1×(T/2)とする。これにより、 第4図(a)のFG信号の周期=nT+0×(T/2)=nT 第4図(b)のFG信号の周期=nT+0×(T/2)=nT 第4図(c)のFG信号の周期=(n−1)T+1×(T/
2)=nT−T/2 第4図(d)のFG信号の周期=nT+1×(T/2)=nT+T
/2 と計測され、T/2きざみの計測が可能となる。
The exclusive OR of two sampling values of the original clock 21 at two consecutive FG edges for the same FG signal is shown in FIGS. 4 (a), (b), (c) and (d).
It becomes L, L, H, H respectively for the FG signal, and when such exclusive OR is L, the LSB information (T / 2 step) is 0 × (T /
2) and when the exclusive OR is H, the LSB information (T / 2
Set the step size to 1 × (T / 2). As a result, the period of the FG signal in FIG. 4 (a) = nT + 0 × (T / 2) = nT. The period of the FG signal in FIG. 4 (b) = nT + 0 × (T / 2) = nT. ) FG signal cycle = (n-1) T + 1 × (T /
2) = nT−T / 2 FG signal cycle in FIG. 4 (d) = nT + 1 × (T / 2) = nT + T
It is measured as / 2, and it becomes possible to measure in T / 2 increments.

次に上記動作を実現する実施例第2図を説明する。第2
図中、60,61,62,63はフリップフロップ(FF)であり、
前者3つはD−FF、最後はRS−FFである。さらに64はカ
ウンタ、65〜70は論理ゲート(特に65はアンドゲートと
して説明する)、71はアドゲート、72は排他的論理話
(エクスクルーシブ オア)ゲートである。また80〜87
は電気信号である。
Next, FIG. 2 showing an embodiment for realizing the above operation will be described. Second
In the figure, 60, 61, 62 and 63 are flip-flops (FF),
The former three are D-FF and the last are RS-FF. Further, 64 is a counter, 65 to 70 are logic gates (specifically, 65 is described as an AND gate), 71 is an add gate, and 72 is an exclusive logic talk (exclusive OR) gate. Again 80-87
Is an electrical signal.

図中初期状態ではフリップフロップ60はリセットされ
はハイ、カウンタ64のリセット信号87はハイとなり、カ
ウンタの各ビット出力(たとえば最下位からQ1,Q2…と
する)は全ロウである。なぜなら、論理ゲート65によ
り、適当なカウンタ出力(たとえばQ2,Q3)の積をフリ
ップフロップ60のリセットに帰還することにより、必ず
フリップフロップ60はリセットされ、そのQ出力はハイ
となって安定となるからである。論理ゲート65でアンド
する入力はクロックストップ期間(例では2クロックな
いし3クロック分)より大きければ任意である(たとえ
ばQ2,Q3を選択すれば、2+4=6でリセットする)。
次にFG信号22の立上りエッジではフリップフロップ60は
D入力(データ入力)ハイをとりこみ、Q出力ハイ、
出力ロウに反転する。すると信号87はロウであるからク
ロック21に従ってカウンタ64はカウント動作を進める。
このカウント情報とクロック21および、前述した連続す
るFG信号でのクロックのサンプリング値とでフリップフ
ロップ63を動作せしめる。
In the initial state in the figure, the flip-flop 60 is reset to be high, the reset signal 87 of the counter 64 is to be high, and each bit output of the counter (for example, Q 1 , Q 2 ... from the least significant) is all low. This is because the logic gate 65 always returns the product of an appropriate counter output (for example, Q 2 and Q 3 ) to the reset of the flip-flop 60, so that the flip-flop 60 is always reset and its Q output becomes high and stable. It is because The input to be ANDed by the logic gate 65 is arbitrary as long as it is longer than the clock stop period (in the example, 2 clocks or 3 clocks) (for example, if Q 2 and Q 3 are selected, it is reset at 2 + 4 = 6).
Next, at the rising edge of the FG signal 22, the flip-flop 60 takes in the D input (data input) high, the Q output high,
Invert to output low. Then, since the signal 87 is low, the counter 64 advances the counting operation according to the clock 21.
The flip-flop 63 is operated by the count information, the clock 21, and the sampling value of the clock with the continuous FG signal described above.

フリップフロップ61,62はFG信号22の連続した2つの立
上りエッジにおけるクロック21のサンプリング値を検出
し、この立上りエッジがクロック21の周期のほぼ前半部
にあるか残りの後半部にあるかを判定するものであっ
て、フリップフロップ62のQ出力は1つ前の立上りエッ
ジでのサンプリング値を、フリップフロップ61のQ出力
はこの次の立上りエッジ(即ち、上記での現FGエッジ)
でのサンプリング値を夫々示す。従って、これらフリッ
プフロップ61,62のQ出力の組合せがH・H,L・L,L・H,H
・Lのいずれかになるが、このことは第4図(a),
(b),(c),(d)あるいは第4図(aa),(b
b),(cc),(dd)に対応する。
The flip-flops 61 and 62 detect the sampling value of the clock 21 at two consecutive rising edges of the FG signal 22, and determine whether the rising edge is in the first half of the cycle of the clock 21 or in the second half of the cycle. The Q output of the flip-flop 62 is the sampling value at the immediately preceding rising edge, and the Q output of the flip-flop 61 is the next rising edge (that is, the current FG edge above).
The sampling values at are shown respectively. Therefore, the combination of the Q outputs of these flip-flops 61 and 62 is H · H, L·L, L · H, H.
・ It will be either L, but this is shown in Fig. 4 (a),
(B), (c), (d) or Fig. 4 (aa), (b
It corresponds to b), (cc), and (dd).

さらに、論理ゲート70は、FG信号22の連続した2つの立
上りエッチにおけるクロック21のサンプリング値の関係
を判別するものであって、フリップフロップ61,62のQ
出力の組合せがH・H,L・L,H・Lである場合と、L・H
である場合とを判別する。
Further, the logic gate 70 is for determining the relationship between the sampling values of the clock 21 in two consecutive rising edges of the FG signal 22, and the Q of the flip-flops 61 and 62.
When the combination of outputs is H ・ H, L ・ L, H ・ L, and when L ・ H
Is determined.

論理ゲート67は第4図で説明したタイミングT2を決める
ものであって、カウンタ64が値4を計数してクロック21
がハイのとき、ハイトなる信号85(第3図)を出力する
(具体的には、カウンタ64のQ3とクロック21とのアンド
をとればよい)。
The logic gate 67 determines the timing T 2 described with reference to FIG.
When is high, a high signal 85 (FIG. 3) is output (specifically, Q3 of the counter 64 and the clock 21 are ANDed).

論理ゲート66は第4図で説明したタイミングT1を決める
ものでって、論理ゲート70の出力に応じて、カウンタ64
の値が1または0でクロック21のロウ期間ハイとなる第
3図に示す信号84あるいは84′を出力する。
The logic gate 66 determines the timing T 1 described with reference to FIG. 4, and according to the output of the logic gate 70, the counter 64
The signal 84 or 84 'shown in FIG. 3 which is high during the low period of the clock 21 when the value is 1 or 0 is output.

論理ゲート66の出力84あるいは84′はフリップフロップ
63をセットし、論理ゲート67の出力85はフリップフロッ
プ63をリセットする。これにより、フリップフロップ63
の出力は、第3図に信号86あるいは86′として示すよ
うに、T1〜T2期間あるいはT1′〜T2期間ロウとなる。こ
の信号86あるいは86′と原クロック21とをアンドゲート
71に供給することにより、第3図に信号82あるいは82′
として示すように、T1〜T2期間あるいはT1′〜T2期間ク
ロック21が除かれた整形クロック82が得られる。即ち、
第4図(aa),(bb),(cc),(dd)に示すような整
形クロック82が得られることになる。
The output 84 or 84 'of the logic gate 66 is a flip-flop.
63 is set and the output 85 of the logic gate 67 resets the flip-flop 63. This makes the flip-flop 63
Output, 'as indicated, T 1 through T 2 period or T 1' signal 86 or 86 in FIG. 3 becomes through T 2 period wax. AND gate this signal 86 or 86 'with the original clock 21.
The signal 82 or 82 'in FIG.
As shown below, the shaping clock 82 is obtained by removing the clock 21 during the T 1 to T 2 period or the T 1 ′ to T 2 period. That is,
The shaping clock 82 as shown in FIGS. 4 (aa), (bb), (cc), and (dd) is obtained.

以上のように、フリップフロップ60,63、カウンタ64、
論理ゲート65〜67,70及びアンドゲート71が、フリップ
フロップ61,62の判定結果を用いて、整形クロック82を
生成、出力する手段を構成している。
As described above, the flip-flops 60, 63, the counter 64,
The logic gates 65 to 67, 70 and the AND gate 71 constitute means for generating and outputting the shaping clock 82 using the judgment results of the flip-flops 61, 62.

また、排他的論理和ゲート72はフリップフロップ61,62
のQ出力が供給され、先に説明したLSB情報81を生成す
る。
The exclusive OR gate 72 is a flip-flop 61, 62.
Is supplied to generate the LSB information 81 described above.

なお、論理ゲート68,69は夫々、カウンタ64の値から、
フリップフロップ63の出力がロウ期間、第1図におけ
るラッチパルス80とプリセットパルス83とを生成する。
In addition, the logic gates 68 and 69 respectively calculate from the value of the counter 64
The output of the flip-flop 63 generates the latch pulse 80 and the preset pulse 83 in FIG. 1 during the low period.

次に、第1図に示すこの実施例の動作について説明す
る。
Next, the operation of this embodiment shown in FIG. 1 will be described.

パルス形成回路50でFG信号の立上りエッジが検出される
と、パルス形成回路50は、これまで整形クロック82を出
力して、アンドゲート5を介し、速度比較カウンタ6に
供給していたが、この立上りエッジとこれより1つ前の
立上りエッジにおけるクロック21のサンプリング値の関
係を判定し、この判定に応じたLSB情報81を生成、出力
するとともに、上記のタイミングT1を設定し、これまで
のFG信号の周期に出力していた整形クロック82の出力を
停止する。これまでのFG信号の周期に供給された整形ク
ロック82の個数は、プリセット回路4による速度比較カ
ウンタ6のプリセット値をmとすると、第4図で説明し
たように、(n−m)あるいは(n−m−1)であり、
これにmを加えた計数値nあるいは(n−1)が速度誤
差ゲート回路9を介してラッチ回路10に供給される。
When the pulse forming circuit 50 detects the rising edge of the FG signal, the pulse forming circuit 50 outputs the shaping clock 82 so far and supplies it to the speed comparison counter 6 via the AND gate 5. The relationship between the rising edge and the sampling value of the clock 21 at the immediately preceding rising edge is determined, the LSB information 81 corresponding to this determination is generated and output, and the above timing T 1 is set. The output of the shaping clock 82 that has been output in the cycle of the FG signal is stopped. Assuming that the preset value of the speed comparison counter 6 by the preset circuit 4 is m, the number of the shaping clocks 82 supplied in the cycle of the FG signal so far is (nm) or ((m-m)) as described with reference to FIG. n-m-1),
The count value n or (n-1) obtained by adding m to this is supplied to the latch circuit 10 via the speed error gate circuit 9.

パルス形成回路50は、上記設定されたタイミングT1と先
に説明したタイミングT2との間の期間整形クロック82の
出力を停止するが、この期間に、まず、ラッチパルス80
を発生してラッチ回路10に速度誤差ゲート回路9を介し
た計数値nあるいは(n−1)をラッチし、また、LSB
ラッチ回路51にLSB情報81をラッチする。これにより、F
G信号の1周期のディジタル値がラッチ回路10とLSBラッ
チ路51とによって得られる。
The pulse forming circuit 50 stops the output of the shaping clock 82 during the period between the timing T 1 set above and the timing T 2 described above.
Is generated to latch the count value n or (n-1) through the speed error gate circuit 9 in the latch circuit 10, and LSB.
The LSB information 81 is latched in the latch circuit 51. This gives F
The digital value of one cycle of the G signal is obtained by the latch circuit 10 and the LSB latch path 51.

しかる後、パルス作成回路50はプリセットパルス83を発
生し、プリセット回路4の値mを速度比較カウンタ6に
プリセットし、次いで、タイミングT2になると、整形ク
ロック82を出力して速度比較カウンタ6が(m+1)か
ら計数を開始するようにする。
Thereafter, the pulse generation circuit 50 generates a preset pulse 83, presets the value m of the preset circuit 4 in the speed comparison counter 6, and then, at the timing T 2 , outputs the shaping clock 82 and the speed comparison counter 6 outputs. The counting is started from (m + 1).

このようにして、整形クロック82をT1〜T2の期間遮断す
ることにより、ラッチ回路10とLSBラッチ回路51とのラ
ッチや速度比較カウンタ6のプリセットを行なうことが
でき、しかも、速度比較カウンタ6はFG信号22の周期の
計数を行なうことができる。かかるラッチ回路10とLSB
ラッチ回路51とのラッチや速度比較カウンタ6のプリセ
ットはクロック21の少なくとも2周期で行なうことがで
きるから、速度比較カウンタ6のプリセット値mは2以
上であればよい。
In this way, by interrupting the shaping clock 82 for the period of T 1 to T 2 , the latch between the latch circuit 10 and the LSB latch circuit 51 and the presetting of the speed comparison counter 6 can be performed, and the speed comparison counter 6 can be preset. 6 can count the period of the FG signal 22. Such a latch circuit 10 and LSB
Since the latching with the latch circuit 51 and the presetting of the speed comparison counter 6 can be performed in at least two cycles of the clock 21, the preset value m of the speed comparison counter 6 may be 2 or more.

最後に、論理ゲート70,66,67の具体的構成を第5図に示
し、一実施例の説明を終わる。第5図中100〜106はイン
バータ、107〜109はナンドゲート、110,111はアンドゲ
ートであり、120〜122は電気信号ラインである。ここで
信号120はフリップフロップ62,61のQ出力がL.Hである
場合、つまり第4図Cの場合のみハイとなり、ゲート10
7を開き、他の場合ロウとなってゲート108を開く。従っ
て、信号121,122は第3図84′84の逆極性信号となって
上述の操作が可能となる。
Finally, the specific structure of the logic gates 70, 66, 67 is shown in FIG. 5, and the description of one embodiment is completed. In FIG. 5, 100 to 106 are inverters, 107 to 109 are NAND gates, 110 and 111 are AND gates, and 120 to 122 are electric signal lines. Here, the signal 120 becomes high only when the Q output of the flip-flops 62 and 61 is LH, that is, in the case of FIG.
Open 7, otherwise go low to open gate 108. Therefore, the signals 121 and 122 become reverse polarity signals of 84'84 in FIG. 3 and the above-described operation becomes possible.

さて次に本発明の他の実施例を第6図により説明する。Now, another embodiment of the present invention will be described with reference to FIG.

第6図において、150〜155はフリップフロップであり、
150はT−フリップフロップ、151〜154はD−フリップ
フロップ、155はRS−フリップフロップである。156〜16
2はナンドゲート、163〜164はインバータ、165〜167は
アンドゲート、168はエクスクルーシブオアゲートであ
り、180〜186は電気信号である。さて以下に第6図の要
部波形図を第7図に引用しつつ説明を加える。まず、原
クロック信号21と、FG信号22との関係が第7図(e)と
(f)のような場合を考える。即ち、連続した2つのFG
の立上りエッジにおけるクロック21のサンプリング値が
H.H,L.Lであり、それ以前(図示せず)のサンプリング
値がHであるときである。まず、(e)の場合、FGのエ
ッジにおけるクロック21のサンプリング値は継続してH
であるから、フリップフロップ152のQ出力信号180もH
である。よってナンドゲート159が開いておる上、ナン
ドゲート160の出力ハイであるから、信号181はクロック
21と同極性である。次に、インバータ163のため、FG信
号22のロウ期間はフリップフロップ150,151にはリセッ
トがかかっている。そのためナンドゲート156の出力は
ハイであり、ナンドゲート157には、信号182が出力され
る。そして、FG信号22の立上り後はフリップフロップ15
0,151のリセットが解除され、この2ビットでカウント
動作を開始する。カウント中152にトリガ入力が入る
が、データ信号180はHのままである。また、カウント
中フリップフロップ155には、信号183(フリップフロッ
プ150のQ出力)と信号184(フリップフロップ151のQ
出力)とがH・Lのときセット入力、H・Hのときリセ
ット入力が印加されるから、フリップフロップ155の
出力は信号185のようになり、これと信号181とのアンド
出力186は信号21と同極性で図のように入力される。こ
れに対し、(f)の場合には、図示されているよりもさ
らに先行するFG信号エッジでのクロックのサンプリング
値がH,であるが、(図示されている部分に至って)続い
てLに変化する。これにより信号180は図のようにHか
らLに反転するから、この時ナンドゲート160が開いて
逆極性のクロックを通すようになるから、信号181,182
は第7図のようになる。こうして信号185の期間はクロ
ック半周期分短縮し、出力信号186の極性は反転する。
こうしてFG信号22と出力クロック186との時間的関係は
一致する。この動作は換言すれば、前実施例で行ってい
た出力クロックのオンオフタイミングを、クロックの極
性を反転させることで行うこととなる。本実施例では言
及しなかったが、フリップフロップ153,154、エクスク
ルーシブオアゲート168の動作は前実施例と同様であ
る。また、ゲート遅延量をうまく考慮すれば、出力クロ
ック(たとえば信号168)をFG信号22でサンプリングし
た値をLSB情報(たとえばエクスクルーシブオアゲート1
68の出力)とすることも可能である。
In FIG. 6, 150 to 155 are flip-flops,
Reference numeral 150 is a T-flip-flop, 151 to 154 are D-flip-flops, and 155 is an RS-flip-flop. 156-16
2 is a NAND gate, 163-164 are inverters, 165-167 are AND gates, 168 is an exclusive OR gate, and 180-186 are electric signals. Now, description will be added below with reference to the waveform chart of the main part of FIG. 6 in FIG. First, consider a case where the relationship between the original clock signal 21 and the FG signal 22 is as shown in FIGS. 7 (e) and 7 (f). That is, two consecutive FGs
The sampling value of clock 21 at the rising edge of
HH, LL, and the sampling value before (not shown) is H. First, in the case of (e), the sampling value of the clock 21 at the edge of FG continues to be H.
Therefore, the Q output signal 180 of the flip-flop 152 is also H
Is. Therefore, because NAND gate 159 is open and the output of NAND gate 160 is high, signal 181 is clocked.
It has the same polarity as 21. Next, because of the inverter 163, the flip-flops 150 and 151 are reset during the low period of the FG signal 22. Therefore, the output of the NAND gate 156 is high, and the signal 182 is output to the NAND gate 157. After the FG signal 22 rises, the flip-flop 15
The reset of 0, 151 is released, and the counting operation is started by these 2 bits. Although the trigger input is input to 152 during counting, the data signal 180 remains H. Further, the counting flip-flop 155 has a signal 183 (Q output of the flip-flop 150) and a signal 184 (Q of the flip-flop 151).
Output) is H · L, and the reset input is applied when H · H, the output of the flip-flop 155 becomes like the signal 185, and the AND output 186 of this and the signal 181 is the signal 21. Input with the same polarity as shown in the figure. On the other hand, in the case of (f), the sampling value of the clock at the FG signal edge that precedes the one shown in the figure is H, but (to the part shown in the figure) continues to L. Change. As a result, the signal 180 is inverted from H to L as shown in the figure, and at this time, the NAND gate 160 opens to allow the clock of the opposite polarity to pass.
Is as shown in FIG. In this way, the period of the signal 185 is shortened by a half cycle of the clock, and the polarity of the output signal 186 is inverted.
Thus, the temporal relationship between the FG signal 22 and the output clock 186 matches. In other words, this operation is performed by inverting the polarity of the clock, which is the on / off timing of the output clock that was performed in the previous embodiment. Although not mentioned in this embodiment, the operations of the flip-flops 153 and 154 and the exclusive OR gate 168 are the same as those in the previous embodiment. If the gate delay amount is taken into consideration, the value obtained by sampling the output clock (for example, signal 168) with FG signal 22 is used as LSB information (for example, exclusive OR gate 1).
The output of 68) is also possible.

〔発明の効果〕〔The invention's effect〕

本発明によれば、従来は精度を要する周期計測にはクロ
ックを上げるしか手がなく、たとえ6dBでも精度向上さ
せるのにカウンタ列を構成する素子を全部高速動作でき
るようばく大な電力消費をまねいたり、高価な高速素子
の使用や素子レイアウトの難しさによるLSIチップ面積
の増大をまねいていたのに対し、上記した配慮が不要と
ななり、電力、コスト的に3〜5割削減の効果がある。
According to the present invention, conventionally, there is no choice but to raise the clock for period measurement that requires accuracy, and even if the accuracy is improved by 6 dB, it is necessary to operate all the elements that form the counter array at high speed, resulting in a large power consumption. Although the LSI chip area was increased due to the use of expensive high-speed elements and the difficulty of element layout, the above-mentioned consideration is not required, and the power and cost are reduced by 30 to 50%. .

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

第1図、第2図は本発明の一実施例を示すブロック図、
第3図、第4図は要部波形図、第5図は一実施例のブロ
ック構成図の一例、第6図は本発明の他の実施例のブロ
ック図、第7図は第6図の要部の波形を示す波形図、第
8図は従来技術のブロック図、第9図は従来技術の動作
説明図である。 51……ラッチ回路 50……パルス作成回路 66,67……論理ゲート 61,62,63,150〜155……フリップフロップ 64……カウンタ 72,168……エクスクルーシブオアゲート
1 and 2 are block diagrams showing an embodiment of the present invention,
3 and 4 are waveform diagrams of main parts, FIG. 5 is an example of a block configuration diagram of one embodiment, FIG. 6 is a block diagram of another embodiment of the present invention, and FIG. 7 is of FIG. FIG. 8 is a waveform diagram showing waveforms of essential parts, FIG. 8 is a block diagram of a conventional technique, and FIG. 9 is an operation explanatory diagram of the conventional technique. 51 …… Latch circuit 50 …… Pulse creation circuit 66,67 …… Logic gate 61,62,63,150 to 155 …… Flip-flop 64 …… Counter 72,168 …… Exclusive OR gate

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】被計測信号の周期が開始する毎に所定値m
にプリセットされ整形クロックを計数する計数手段と該
プリセット時点の直前での該計数手段の計数値を取り込
むラッチ手段とを用いることにより、該被計測信号の周
期を計測して、その計測結果をディジタル値で得るよう
にしたディジタル周期計測回路において、 該被計測信号の順次の計測周期開始時点が原クロックの
周期のほぼ前半部にあるか残りの後半部にあるかを判定
する判定手段と、 該判定手段の判定結果により、該被計測信号の順次の2
つの計測周期開始時点がいずれも該原クロックの周期の
ほぼ前半部または残りの後半部にあるとき、前記ディジ
タル値での最下位ビットとする“0"ビットを生成し、該
被計測信号の順次の2つの計測周期開始時点のいずれか
一方が該原クロックの周期のほぼ前半部にあって他方が
残りの後半部にあるとき、該最下位ビットとする“1"ビ
ットを生成する最下位ビット生成手段と、 該判定手段の判定結果により、該被計測信号の順次の2
つの計測周期開始時点がいずれも該原クロックの周期の
ほぼ前半部または残りの後半部にあるとき、あるいは該
被計測信号の順次の2つの計測周期開始時点のうちの先
行する計測周期開始時点が該原クロックの周期のほぼ前
半部にあってこれに続く後続の計測周期開始時点が該原
クロックの周期の残りの後半部にあるとき、該後続の計
数周期開始時点が検出されて後、前記原クロックをm個
除いて前記整形クロックとし、また、該被計測信号の順
次の2つの計測周期開始時点のうちの先行する計測周期
開始時点が該原クロックの周期の前記残りの後半部にあ
ってこれに続く計測周期開始時点が該原クロックの周期
の前記ほぼ前半部にあるとき、前記原クロックを、該後
続の計数周期開始時点が検出されて後、上記m個除く場
合よりも1個前から(m+1)個除いて前記整形クロッ
クとし、夫々前記計数手段に供給する計数クロック出力
手段と を設け、 前記ラッチ手段のラッチタイミング及び前記計数手段の
プリセットタイミングを前記原クロックをm個もしくは
(m+1)個除いた期間に設定し、 前記ラッチ手段にラッチされるディジタル値に前記最下
位ビット生成手段で得られる前記最下位ビットを付加し
て前記計測結果とすることを特徴とするディジタル周期
計測回路。
1. A predetermined value m every time the period of a signal under measurement starts.
By using the counting means preset for counting the shaping clock and the latch means for fetching the count value of the counting means immediately before the preset time point, the period of the measured signal is measured and the measurement result is digitally measured. A digital period measuring circuit that obtains a value, and a determining unit that determines whether the start time point of the sequential measurement period of the signal under measurement is in the first half of the period of the original clock or in the second half of the remaining period. According to the determination result of the determination means, the sequential 2
When the start time of one measurement cycle is in the first half of the cycle of the original clock or the latter half of the cycle, the "0" bit which is the least significant bit in the digital value is generated and the measured signal is sequentially output. The least significant bit that generates the "1" bit, which is the least significant bit, when one of the two measurement cycle start points of is in the first half of the period of the original clock and the other is in the remaining second half. Depending on the generation means and the determination result of the determination means, the sequential measurement of the measured signal is performed.
When one of the two measurement cycle start times is in the first half or the remaining second half of the cycle of the original clock, or when the preceding measurement cycle start time of the two successive measurement cycle start times of the measured signal is When the subsequent measurement cycle start time point in the first half of the period of the original clock and the subsequent measurement cycle start time in the remaining second half of the period of the original clock, after the subsequent counting cycle start time point is detected, The original clock is removed by m to form the shaped clock, and the preceding measurement cycle start time of the two successive measurement cycle start times of the measured signal is in the remaining second half of the cycle of the original clock. When the next measurement cycle start time is in the substantially first half of the cycle of the original clock, one original clock is generated after the subsequent counting cycle start time is detected. Before Counting clock output means for supplying the shaping clocks to the counting means respectively except (m + 1) are provided, and the latch timing of the latch means and the preset timing of the counting means are m original clocks or (m + 1). A digital cycle measuring circuit, wherein the measurement result is obtained by setting a period excluding the number and adding the least significant bit obtained by the least significant bit generating means to the digital value latched by the latch means.
JP60152246A 1985-07-12 1985-07-12 Digital cycle measuring circuit Expired - Lifetime JPH0692990B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP60152246A JPH0692990B2 (en) 1985-07-12 1985-07-12 Digital cycle measuring circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP60152246A JPH0692990B2 (en) 1985-07-12 1985-07-12 Digital cycle measuring circuit

Publications (2)

Publication Number Publication Date
JPS6214066A JPS6214066A (en) 1987-01-22
JPH0692990B2 true JPH0692990B2 (en) 1994-11-16

Family

ID=15536290

Family Applications (1)

Application Number Title Priority Date Filing Date
JP60152246A Expired - Lifetime JPH0692990B2 (en) 1985-07-12 1985-07-12 Digital cycle measuring circuit

Country Status (1)

Country Link
JP (1) JPH0692990B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0474702A (en) * 1990-07-10 1992-03-10 Matsushita Electric Ind Co Ltd Indoor oxygen enrichment method

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS53103777A (en) * 1977-02-22 1978-09-09 Teraoka Seikosho Kk Measured quantity detecting system for digital measuring device
JPS57161666A (en) * 1981-03-31 1982-10-05 Sony Corp Circuit for detecting interval of signal inversion

Also Published As

Publication number Publication date
JPS6214066A (en) 1987-01-22

Similar Documents

Publication Publication Date Title
JPH0854481A (en) Time interval measuring apparatus
US3909714A (en) Frequency measuring circuit
JP2684644B2 (en) Frequency test circuit and test method
JPH03134574A (en) Pulse duration measurement method and circuit
KR980009909U (en) Counter control device with time measurement function between signal pulses
US4331926A (en) Programmable frequency divider
JPH0692990B2 (en) Digital cycle measuring circuit
JPH10170564A (en) Clock frequency measurement circuit, and method therefor
JP3458457B2 (en) Vehicle speed detection device
JPS62261215A (en) Pulse generating circuit
JP2775822B2 (en) Inverter on-delay circuit
JPS6348456B2 (en)
JPS6324409A (en) Pulse edge coincidence detector
KR950002296B1 (en) Pwm signal apparatus of motor controll system
JP3036115B2 (en) Digital to analog converter
KR950012308B1 (en) Motor control circuit
JP2819127B2 (en) Phase measurement circuit
SU752797A1 (en) Programmable code to time interval converter
JP2554064B2 (en) Pulse counting method
SU1522404A1 (en) Ac voltage-to-code converter
JP3297759B2 (en) Evaluation method of phase comparator
JPH0278967A (en) Period measuring circuit
JPH0836007A (en) Time interval measuring device
SU693274A1 (en) Device for measuring parameters of digital semiconductor elements
JP2734861B2 (en) DTMF circuit

Legal Events

Date Code Title Description
EXPY Cancellation because of completion of term