JPS593704B2 - Period comparison circuit - Google Patents

Period comparison circuit

Info

Publication number
JPS593704B2
JPS593704B2 JP10666576A JP10666576A JPS593704B2 JP S593704 B2 JPS593704 B2 JP S593704B2 JP 10666576 A JP10666576 A JP 10666576A JP 10666576 A JP10666576 A JP 10666576A JP S593704 B2 JPS593704 B2 JP S593704B2
Authority
JP
Japan
Prior art keywords
register
period
comparison
adder
clock data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired
Application number
JP10666576A
Other languages
Japanese (ja)
Other versions
JPS5332775A (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 JP10666576A priority Critical patent/JPS593704B2/en
Publication of JPS5332775A publication Critical patent/JPS5332775A/en
Publication of JPS593704B2 publication Critical patent/JPS593704B2/en
Expired legal-status Critical Current

Links

Description

【発明の詳細な説明】 本発明はディジタル的に信号の周期を比較する回路に関
するものである。
DETAILED DESCRIPTION OF THE INVENTION The present invention relates to a circuit that digitally compares the periods of signals.

周期を比較するには、クロックで駆動されるカウンタを
入力信号でもつてゲートすることにより、比較結果を得
ることが出来る。
To compare periods, the comparison result can be obtained by gating a clock-driven counter with an input signal.

しかしこの様な方法では、カウンタはこれ専用のものを
必要とし、さらに基準周期と比較するには、基準周期の
大きさに応じた一定時間の遅延を得る遅延回路を必要と
する。遅延回路をディジタルで構成するには、シフトレ
ジスタの長さ、又はカウンタのフィードバックを基準周
期の大きさに応じて変える必要がある。
However, such a method requires a counter dedicated to this purpose, and furthermore, in order to compare with a reference period, a delay circuit is required to obtain a fixed time delay corresponding to the size of the reference period. In order to configure the delay circuit digitally, it is necessary to change the length of the shift register or the feedback of the counter depending on the size of the reference period.

又、クロック周波数を変える方法も有るが、安定な周波
数を得る為に水晶発振回路等を用いると、5 可変は容
易でない。本発明の目的は、上記従来技術の欠点を無く
し、構成簡単にして多くの目的に使うのに適した周期比
較回路を提供するにある。
There is also a method of changing the clock frequency, but if a crystal oscillation circuit or the like is used to obtain a stable frequency, it is not easy to change the clock frequency. SUMMARY OF THE INVENTION An object of the present invention is to eliminate the drawbacks of the above-mentioned prior art and to provide a period comparator circuit which has a simple structure and is suitable for use for many purposes.

本発明の要点は、比較入力u(を)が入つて来たと10
きの刻時データxl(を)を第1のレジスタに取υ込み
、刻時データxl(を)と基準周期に対応する刻時デー
タの増分aとを加減算器で加算することにより、基準周
期に対する刻時データX2(を+1)を算出し、第2の
レジスタに蓄える。
The main point of the present invention is that when the comparison input u() comes in, 10
The reference period is calculated by importing the current clock data xl() into the first register and adding the clock data xl() and the clock data increment a corresponding to the reference period using an adder/subtractor. The clock data X2 (+1) is calculated and stored in the second register.

そして次の比15較入力u(を+1)が入つて来たとき
の刻時データxl(を+1)を第1のレジスタに取わ込
み、加減算器で刻時データxl(を+1)と上記X2(
を+1)とを減算することにより、周期比較を行ない、
比較結果y(を+1)を得るものである。20すなわち
、 x2(を+1)■xl(を)+a y(を+1)■ xl(を+1)−x2(を+1)を加
減算器で算出することにより、基準周期に対して正負の
周期比較結果を得ることが出来る。
Then, take in the clock data xl (+1) when the next comparison input u (+1) is input into the first register, and use the adder/subtractor to convert the clock data xl (+1) to the above. X2(
Perform period comparison by subtracting +1) and
The comparison result is y(+1). 20 In other words, by calculating x2 (+1) xl (+1) xl (+1) xl (+1) - x2 (+1) using an adder/subtractor, the positive and negative period comparison results with respect to the reference period are obtained. can be obtained.

25第1図に示す一実施例により本発明を具体的に説明
する。
25 The present invention will be specifically explained with reference to an embodiment shown in FIG.

比較入力uが入力端子5に入つて来たとき、入力端子1
からのクロックパルスによつて駆動されるカウンタ2の
出力である刻時データを第1のレ刃 ジスタ3に取り込
む。
When comparison input u comes into input terminal 5, input terminal 1
The clock data which is the output of the counter 2 driven by the clock pulse from the first register 3 is taken into the first register 3.

ここでカウンタ2は、周期比較する入力信号の周期より
大きい周期を得る様に適当な大きさNに選ぶことが出来
る。又カウンタ2の底は加減算器Tで用いる底と同じで
有ればよく、2進、10進等周期比較データを扱うのに
万 適した任意の底を用いて良い。そして第2のレジス
タ4の内容を基準周期の刻時データとして、第1のレジ
スタ3と第2のレジスタ4の値とを加減算器7でカウン
タ2の大きさと同じ値Nを法として減算を行ない、第3
のレジスタ8に周期比較結果yを入力するものである。
Here, the counter 2 can be selected to have an appropriate size N so as to obtain a period larger than the period of the input signal whose period is to be compared. The base of the counter 2 only needs to be the same as the base used by the adder/subtractor T, and any base suitable for handling periodic comparison data such as binary or decimal may be used. Then, using the contents of the second register 4 as clock data of the reference period, the values of the first register 3 and the second register 4 are subtracted by an adder/subtractor 7 modulo a value N, which is the same as the size of the counter 2. , 3rd
The period comparison result y is inputted into the register 8 of.

そして第1のレジスタ3とメモリ6の内容である基準周
期に対する刻時データの増分aとを加減算器7で加算し
て、次の周期比較入力に対する基準周期刻時データを算
出し、レジスタ4に蓄える。周期比較結果yをデイジタ
ル量として扱うにはレジスタ8の内容を出力すれば良い
。さらに、周期比較結果yに比例するアナログ量を得る
ためにパルス幅密度変調信号zを得るには、カウンタ2
の出力である刻時データを周期比較結果yでゲートする
ことにより容易に求められる。
Then, the adder/subtractor 7 adds the first register 3 and the increment a of the clock data with respect to the reference cycle, which is the content of the memory 6, to calculate the reference cycle clock data for the next cycle comparison input. store. In order to treat the cycle comparison result y as a digital quantity, it is sufficient to output the contents of the register 8. Furthermore, in order to obtain the pulse width density modulation signal z in order to obtain an analog quantity proportional to the period comparison result y, the counter 2
can be easily obtained by gating the clock data which is the output of , using the period comparison result y.

第2図はそのゲート回路9の一例であり、Aに回路を、
Bにその動作波形を示す。同図は刻時データを4ピツト
にした場合を示す。端子群11には、上記レジスタ8か
らの位相比較データy:QA,QB,QC,QDが入力
される。QAは最下位、QDは最上位である。端子群1
2には刻時データ0A,0B,0C,0Dが入力される
。0Aは最下位、0Dは最上位である。
FIG. 2 is an example of the gate circuit 9, with a circuit at A,
Figure B shows its operating waveform. The figure shows a case where the clock data is divided into four pits. Phase comparison data y: QA, QB, QC, QD from the register 8 is input to the terminal group 11 . QA is the lowest rank and QD is the highest rank. Terminal group 1
Clock data 0A, 0B, 0C, and 0D are input to 2. 0A is the lowest rank and 0D is the highest rank.

位相比較データyの各デジツトQA,QB,QC,QD
はANDゲート群14に於いてインバータ群13を経た
刻時データによつてゲートされて、それらの出力は0R
ゲート15にて集められ、位相比較データyに応じたパ
ルス幅密度変調パルス信号zを端子10に得る。同図b
に位相比較データyの幾つかの場合についてのパルス幅
密度変調パルスzの波形を示す。図のaは刻時データを
示し、B,c,d,eは位相比較データyの各デジツト
がQDQCQB″QA,″QDQCOBσA,σDηC
QBQA,′QDOC′Q.BQAの各場合におけるパ
ルス幅密度変調パルスzの波形を示す。以上のように本
発明によれば、基準周期と比較するのに、基準周期の大
きさに応じた遅延回路を必要とすること無く、また専用
のカウンタを必要としない。
Each digit QA, QB, QC, QD of phase comparison data y
are gated by the clock data passed through the inverter group 13 in the AND gate group 14, and their output is 0R.
A pulse width density modulated pulse signal z, which is collected at a gate 15 and corresponds to the phase comparison data y, is obtained at a terminal 10. Figure b
3 shows waveforms of pulse width density modulation pulses z for several cases of phase comparison data y. In the figure, a indicates clock data, and B, c, d, and e indicate that each digit of phase comparison data y is QDQCQB''QA,''QDQCOBσA, σDηC.
QBQA,'QDOC'Q. The waveform of the pulse width density modulation pulse z in each case of BQA is shown. As described above, according to the present invention, comparison with the reference period does not require a delay circuit corresponding to the size of the reference period, nor does it require a dedicated counter.

メモリ6の内容を変えることにより多くの目的に簡単に
応用出来る。
By changing the contents of the memory 6, it can be easily applied to many purposes.

従つて、集積回路化を計つた場合もメモリ6の内容を変
えるためには1枚のマスク変更等で容易に変更可能で、
集積回路化にも適し応用範囲は広い。さらに、メモリ6
に複数個の定数を記憶させて、メモリのアドレス切換等
により異なつた基準周期に対して使用出来る。
Therefore, even if integrated circuits are planned, the contents of the memory 6 can be easily changed by changing one mask, etc.
It is also suitable for integrated circuits and has a wide range of applications. Furthermore, memory 6
By storing a plurality of constants in the memory, it is possible to use them for different reference periods by switching memory addresses or the like.

又、複数個の周期比較を同時に行う場合、同一のカウン
タを使用出来、回路の簡略化が計れる。
Furthermore, when comparing a plurality of periods at the same time, the same counter can be used and the circuit can be simplified.

さらに多くの場合周期比較を行う信号の周期が加減算時
間に比して十分大きく、遅延による問題等を生ずること
無く、加減算器は時分割で共用することが出来る。
Furthermore, in many cases, the period of the signal for period comparison is sufficiently large compared to the addition/subtraction time, and the adder/subtractor can be shared in a time-division manner without causing problems due to delay.

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

第1図は本発明による一実施例を示すプロツク図、第2
図は第1図の実施例においてパルス幅密度変調信号を得
る為のゲート回路の例を示す図である。 1・・・・・・クロツク入力信号、2・・・・・・カウ
ンタ、3・・・・・・第1のレジスタ、4・・・・・・
第2のレジスタ、5・・・・・・比較信号入力端子、6
・・・・・・メモリ、7・・・・・・加減算器、8・・
・・・・第3のレジスタ、9・・・・・・ゲート回路、
10・・・・・・出力端子。
FIG. 1 is a block diagram showing one embodiment of the present invention, and FIG.
This figure is a diagram showing an example of a gate circuit for obtaining a pulse width density modulation signal in the embodiment of FIG. 1. 1...Clock input signal, 2...Counter, 3...First register, 4...
Second register, 5... Comparison signal input terminal, 6
...Memory, 7...Adder/subtractor, 8...
...Third register, 9...Gate circuit,
10...Output terminal.

Claims (1)

【特許請求の範囲】[Claims] 1 クロック信号で駆動されるカウンタと、比較入力信
号が入つて来たときに前記カウンタの出力である刻時デ
ータを取り込む第1のレジスタと、基準周期の刻時デー
タを蓄える第2のレジンタと、前記第1と第2のレジス
タのデータの差を求める加減算器と、該加減算器の出力
である周期比較結果を蓄える第3のレジスタと、基準周
期の刻時データの一周期分に対応する定数を記憶するメ
モリとを有し、該メモリの内容と前記第1のレジスタの
内容とを前記加減算器で加算して前記第2のレジスタに
入れることを特徴とする周期比較回路。
1. A counter driven by a clock signal, a first register that captures clock data that is the output of the counter when a comparison input signal is input, and a second register that stores clock data of a reference period. , an adder/subtracter for calculating the difference between the data in the first and second registers, a third register for storing the period comparison result which is the output of the adder/subtractor, and a third register corresponding to one period of clock data of the reference period. 1. A cycle comparison circuit comprising: a memory for storing a constant; the contents of the memory and the contents of the first register are added by the adder/subtractor and the result is stored in the second register.
JP10666576A 1976-09-08 1976-09-08 Period comparison circuit Expired JPS593704B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP10666576A JPS593704B2 (en) 1976-09-08 1976-09-08 Period comparison circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP10666576A JPS593704B2 (en) 1976-09-08 1976-09-08 Period comparison circuit

Publications (2)

Publication Number Publication Date
JPS5332775A JPS5332775A (en) 1978-03-28
JPS593704B2 true JPS593704B2 (en) 1984-01-25

Family

ID=14439363

Family Applications (1)

Application Number Title Priority Date Filing Date
JP10666576A Expired JPS593704B2 (en) 1976-09-08 1976-09-08 Period comparison circuit

Country Status (1)

Country Link
JP (1) JPS593704B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS62236382A (en) * 1986-03-31 1987-10-16 ゼネラル・モ−タ−ス・コ−ポレ−シヨン Pwm type motor operating circuit with rfi suppressor

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6128070U (en) * 1984-07-26 1986-02-19 パイオニア株式会社 digital frequency phase comparator

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS62236382A (en) * 1986-03-31 1987-10-16 ゼネラル・モ−タ−ス・コ−ポレ−シヨン Pwm type motor operating circuit with rfi suppressor

Also Published As

Publication number Publication date
JPS5332775A (en) 1978-03-28

Similar Documents

Publication Publication Date Title
JPS5923614A (en) Dimension filter circuit
US4031476A (en) Non-integer frequency divider having controllable error
US4860238A (en) Digital sine generator
JPS58121827A (en) Pulse generating circuit
US3757261A (en) Integration and filtration circuit apparatus
US3678258A (en) Digitally controlled electronic function generator utilizing a breakpoint interpolation technique
JPS593704B2 (en) Period comparison circuit
JPH0376494B2 (en)
JPH0219021A (en) Digital pulse width modulation circuit
JP2000258473A (en) Reactive power computing device and reactive energy measuring device
US3313927A (en) Pulse width comparator
JP3089646B2 (en) PWM output circuit
JPS5828786B2 (en) A device that converts a digital video signal into a pulse width modulated or pulse number modulated brightness control signal
US3456099A (en) Pulse width multiplier or divider
JPS5840421Y2 (en) Digital differential analyzer
JP2687349B2 (en) Digital PLL circuit
US5883530A (en) Methods and devices for generating cycled waveforms of nonsingle period
US3657635A (en) Digital phase shift frequency synthesizer
JPS6352808B2 (en)
US4156916A (en) Pulse burst processing system and apparatus
JP3001623B2 (en) PWM type D / A converter
JPH08330914A (en) Waveform generator
JPS58114104A (en) Analog interpolating circuit
SU1108441A1 (en) Digital function generator
SU1088008A1 (en) Digital function generator