JPH0442018A - Up/down counter apparatus - Google Patents

Up/down counter apparatus

Info

Publication number
JPH0442018A
JPH0442018A JP15078690A JP15078690A JPH0442018A JP H0442018 A JPH0442018 A JP H0442018A JP 15078690 A JP15078690 A JP 15078690A JP 15078690 A JP15078690 A JP 15078690A JP H0442018 A JPH0442018 A JP H0442018A
Authority
JP
Japan
Prior art keywords
pulse
count
output
pulse input
counter
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
JP15078690A
Other languages
Japanese (ja)
Other versions
JPH07119621B2 (en
Inventor
Akihiko Wakimoto
昭彦 脇本
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.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi 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 Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP2150786A priority Critical patent/JPH07119621B2/en
Publication of JPH0442018A publication Critical patent/JPH0442018A/en
Publication of JPH07119621B2 publication Critical patent/JPH07119621B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Transmission And Conversion Of Sensor Element Output (AREA)

Abstract

PURPOSE:To reflect the phase relationship of pulse input signals having the phase difference in detail on the value of a counter by generating double-edge pulses at the rise-ups and fall-downs of two pulse input signals. CONSTITUTION:Double-edge-pulse generating circuits 1a and 1b generate pulses for both edges of the rise-ups and the fall-downs of pulse input signals A and B. The circuit 1a outputs the pulse Pc, and the circuit 1n outputs the pulses Pa. A phase detecting circuit 4 outputs the pulses Pd for the pulse input signals A and B. A control circuit 5 receives the output pulses Pc, Pa and Pd of the circuits 1a, 1b and 4, forms an up-count/down-count controlling output Pe and a counted output Pf based on the pulses and sends the outputs into a counter 3. Thus, the counted value of the up/down counter is changed at every time the pulse input signals A and B are changed. The state of the change in pulse input signal is reflected on the counted value of the up/down counter in detail.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 この発明はマイクロコンピュータ等の半導体装置におい
て、位相差のある2相パルスをその位相関係に従ってア
ップあるいはダウンカウントするアップダウンカウンタ
装置に関するものである。
[Detailed Description of the Invention] [Field of Industrial Application] The present invention relates to an up/down counter device for counting up or down two-phase pulses having a phase difference according to the phase relationship in a semiconductor device such as a microcomputer. .

〔従来の技術〕[Conventional technology]

第4図はこの種の従来のアップダウンカウンタ装置の構
成を示すブロック図である。図において、A、Bは位相
差のあるパルス入力信号である。1はパルス入力信号B
の立ち上がり、立ち下がりの両エツジに対してパルスを
発生させる両エツジパルス発生回路で、同図に示すよう
にパルス入力信号Bが入力されており、パルスPaを出
力する。
FIG. 4 is a block diagram showing the configuration of this type of conventional up/down counter device. In the figure, A and B are pulse input signals with a phase difference. 1 is pulse input signal B
As shown in the figure, this double-edge pulse generation circuit generates pulses for both rising and falling edges, and as shown in the figure, a pulse input signal B is input thereto, and a pulse Pa is output.

2はAND回路で、パルス入力信号Aと両エツジパルス
発生回路1の出力が入力されており、パルスpbを出力
する。3はカウンタで、カウント人力Tとアップカウン
トするかダウンカウントするかを制御するアップカウン
トダウンカウント制御人力UDを備えており、AND回
路2の出力がカウント人力Tに、パルス入力信号Bがア
ップカウントダウンカウント制御人力UDに接続されて
いる。
2 is an AND circuit to which the pulse input signal A and the output of both edge pulse generation circuits 1 are input, and outputs a pulse pb. 3 is a counter, which is equipped with a counting human power T and an up count/down counting control human power UD that controls whether to count up or down; Connected to control human power UD.

第5図は第4図で示したアップダウンカウンタ装置の動
作を示すタイミングチャートである。以下同図を参照し
て動作を説明する。なおパルス入力信号A、Bは位相の
ずれたもので、同図に示すようにパルス入力信号Aより
パルス入力信号Bの方が位相が遅れているものとして説
明する。
FIG. 5 is a timing chart showing the operation of the up/down counter device shown in FIG. 4. The operation will be explained below with reference to the same figure. Note that the pulse input signals A and B are out of phase, and the explanation will be made assuming that the pulse input signal B is delayed in phase than the pulse input signal A as shown in the figure.

まスパルス入力信号Aが“H”レベルの間にパルス入力
信号Bに“L′から“H”の立ち上がりエツジB1が発
生すると、両エツジパルス発生回路1からパルスPa2
が発生する。このパルスPa2はAND回路2に入力さ
れるが、このときパルス入力信号Aは“H”レベルであ
るためAND回路2からもパルスPa2と同じパルスP
b2が出力され、このパルスPb2がカウンタ3のカウ
ント人力Tに入力される。
When a rising edge B1 from "L' to "H" occurs in pulse input signal B while pulse input signal A is at "H" level, pulse Pa2 is generated from both edge pulse generation circuits 1.
occurs. This pulse Pa2 is input to the AND circuit 2, but since the pulse input signal A is at "H" level at this time, the same pulse P as the pulse Pa2 is also input from the AND circuit 2.
b2 is output, and this pulse Pb2 is input to the counting force T of the counter 3.

ここで、カウンタ3はアップカウントダウンカウント制
御人力UDが“H″のときアップカウント、“L2のと
きダウンカウントするものとする。
Here, it is assumed that the counter 3 counts up when the up-count/down-count control human power UD is "H" and counts down when it is "L2".

またカウント人力Tの立ち下がりをカウント有効エツジ
とする。今、パルスPb2がカウンタ3に入力されたと
きアップカウントダウンカウント制御人力UDに接続さ
れているパルス入力信号Bのレベルは“H”であるのて
、パルスPb2の立ち下がりでカウンタ3はアップカウ
ントする。
Further, the falling edge of the count force T is defined as the effective edge of the count. Now, when the pulse Pb2 is input to the counter 3, the level of the pulse input signal B connected to the up-count/down-count control human power UD is "H", so the counter 3 counts up at the fall of the pulse Pb2. .

次にパルス入力信号Aが“L”に立ち下がったあとに、
パルス入力信号Bに“H゛から“L”の立ち下がりエツ
ジB2が発生すると、両エツジパルス発生回路1からパ
ルスPa4が発生する。このときパルス入力信号Aは“
L°レベルであるためAND回路2の出力にはパルスP
a4と同しようなパルスは発生せず、AND回路2の出
力は“L”レベルのままとなってカウンタ3のカウント
人力Tにはカウント有効エツジは発生しない。
Next, after the pulse input signal A falls to “L”,
When a falling edge B2 from "H" to "L" occurs in the pulse input signal B, a pulse Pa4 is generated from both edge pulse generation circuits 1. At this time, the pulse input signal A becomes "
Since it is at L° level, the output of AND circuit 2 has a pulse P.
A pulse similar to a4 is not generated, the output of the AND circuit 2 remains at the "L" level, and no valid count edge is generated in the counting force T of the counter 3.

続いて再びパルス入力信号Aが“H″に立ち上がったあ
とにパルス入力信号Bに“L′から“H。
Subsequently, after the pulse input signal A rises to "H" again, the pulse input signal B changes from "L" to "H".

の立ち上がりエツジB3が発生すると、立ち上がりエツ
ジB1と同様な考え方からカウンタ3のカウント入力T
ヘパルスPb6が入力され、カウンタ3のアップカウン
トダウンカウント制御人力UDも入力パルス信号Bが“
H”レベルであることから“H”となりカウンタ3はエ
ツジB3に対応してアップカウントする。
When the rising edge B3 occurs, the count input T of the counter 3 is calculated based on the same idea as the rising edge B1.
The input pulse Pb6 is input to the counter 3, and the input pulse signal B is
Since it is at the "H" level, it becomes "H" and the counter 3 counts up in response to edge B3.

第5図ではパルス入力信号Aよりパルス入力信号Bの方
が位相か遅れているものとして説明したが、逆にパルス
入力信号Aよりパルス入力信号Bの方が位相が進んでい
る場合、パルス入力信号Bの“L2の期間にカウント人
力Tにカウント有効エツジが発生してカウンタ3がダウ
ンカウントする以外は上の説明と全く同様の考えが成り
立つ。
In Fig. 5, the explanation was made assuming that the pulse input signal B is delayed in phase than the pulse input signal A, but conversely, if the pulse input signal B is ahead in phase than the pulse input signal A, the pulse input signal Exactly the same idea as the above explanation holds true, except that during the "L2" period of the signal B, a valid count edge occurs in the counter force T and the counter 3 counts down.

〔発明が解決しようとする課題〕[Problem to be solved by the invention]

従来のアップダウンカウンタ装置は以上のように構成さ
れているので、2つのパルス入力信号ABのうち一方、
この場合パルス入力信号Bのエツジしかカウントするこ
とができなかった。さらにもう一方のパルス入力信号、
この場合パルス入力信号Aのレベルが“H”か“L”か
のどちらかの期間、この場合“H″の期間にはいったパ
ルス入力信号Bのエツジのみをカウントしていた。つま
り従来のアップダウンカウンタ装置では、パルス入力信
号Aのレベルが“H″の期間に入ったパルス入ノj信号
Bの立ち下かりエツジのみがカウンタ3のカウント有効
エツジになっていた。そのため、カウンタ3の値はパル
ス入力信号Bの1周期ごとにしか変化しないので、カウ
ンタ3の値をみたとき、そのアップカウント、ダウンカ
ウントの区別によってどちらのパルス入力信号Aあるい
はBの位相が遅れているのかということは分っても、そ
の詳細な位相関係か検出てきないという問題があった。
Since the conventional up/down counter device is configured as described above, one of the two pulse input signals AB,
In this case, only the edges of the pulse input signal B could be counted. Furthermore, the other pulse input signal,
In this case, only the edges of the pulse input signal B that entered the period when the level of the pulse input signal A was either "H" or "L", in this case the "H" period, were counted. In other words, in the conventional up/down counter device, only the falling edge of the pulse input signal B during the period in which the level of the pulse input signal A is "H" is the effective counting edge of the counter 3. Therefore, since the value of counter 3 changes only every cycle of pulse input signal B, when looking at the value of counter 3, the phase of either pulse input signal A or B is delayed depending on whether it is up-counting or down-counting. The problem was that even if it was possible to determine whether the phase relationship was present, the detailed phase relationship could not be detected.

この発明は上記のような問題点を解消するためになされ
たもので、位相差のあるパルス入力信号の位相関係がき
め細かくカウンタの値に反映されるアップダウンカウン
タ装置を得ることを目的としている。
The present invention was made to solve the above-mentioned problems, and an object of the present invention is to provide an up-down counter device in which the phase relationship of pulse input signals having a phase difference is minutely reflected in the counter value.

〔課題を解決するための手段〕[Means to solve the problem]

この発明に係るアップダウンカウンタ装置は、第1 第
2のパルス入力信号の各々の立ち上がり。
The up/down counter device according to the present invention detects each rising edge of the first and second pulse input signals.

立ち下がりの両エツジでカウントパルスを発生させる手
段と、第1.第2のパルス入力信号の位相関係に従って
アップカウントダウンカウント制御信号を生成する手段
と、カウントパルスをアップカウントダウンカウント制
御信号に従ってアップカウント或いはダウンカウントす
るアップダウンカウンタとを備えて構成されている。
means for generating count pulses on both falling edges; The device includes means for generating an up-count/down-count control signal according to the phase relationship of the second pulse input signal, and an up-down counter that counts up or down the count pulse according to the up-count/down-count control signal.

〔作用〕[Effect]

この発明においては、第1 第2のパルス入力信号の各
々の立ち上がり、立ち下がりの両エツジでカウントパル
スを発生させ、このカウントパルスをアップダウンカウ
ンタでカウントするようにしているので、第1.第2の
パルス入力信号に変化があるごとにアップダウンカウン
タのカウント値も変化することになり、第1.第2のパ
ルス入力信号の変化の様子が詳細にアップダウンカウン
タのカウント値に反映するようになる。
In this invention, a count pulse is generated at both the rising and falling edges of each of the first and second pulse input signals, and this count pulse is counted by an up/down counter. Every time there is a change in the second pulse input signal, the count value of the up/down counter also changes. The state of change in the second pulse input signal is reflected in detail on the count value of the up/down counter.

〔実施例〕〔Example〕

以下この発明の一実施例を説明する。第1図はこの発明
によるアップダウンカウンタ装置の一実施例の構成を示
すブロック図である。図においてA、Bは位相差のある
パルス入力信号である。1a、lbはそれぞれパルス入
力信号A、Bの立ち上かり、立ち下がりの両エツジに対
してパルスを発生させる両エツジパルス発生回路で、同
図に示すように両゛エツジパルス発生回路1aはパルス
入力信号Aが入力されており、パルスPcを出力し、両
エツジパルス発生回路1bはパルス入力信号Bが入力さ
れており、パルスPaを出力する。4は2つのパルス入
力信号A、BのレベルがH”あるいは“L2に揃ったと
き“H”レベル、一方が“H”、他方が“L”となった
ときは“L2レベルを出力する位相検出回路で、パルス
入力信号A。
An embodiment of this invention will be described below. FIG. 1 is a block diagram showing the configuration of an embodiment of an up/down counter device according to the present invention. In the figure, A and B are pulse input signals with a phase difference. 1a and lb are double-edge pulse generation circuits that generate pulses for both the rising and falling edges of pulse input signals A and B, respectively. A is input, and outputs a pulse Pc. Both edge pulse generation circuits 1b receive a pulse input signal B, and output a pulse Pa. 4 is a phase that outputs the "H" level when the levels of the two pulse input signals A and B are equal to "H" or "L2", and outputs the "L2 level" when one becomes "H" and the other becomes "L" Pulse input signal A in the detection circuit.

Bが入力されており、パルスPdを出力する。5は両エ
ツジパルス発生回路1.a、1.bのそれぞれの出力パ
ルスPc、Pa、および位相検出回路4の出力パルスP
dを受け、これらに基づいてアップカウントダウンカウ
ント制御出力Peおよびカウント出力Pfを生成するカ
ウンタ制御回路である。カウンタ3はアップカウントダ
ウンカウント制御人力UDおよびカウント人力Tを備え
ており、カウンタ制御回路5の2つの出力Pe、Pfが
それぞれカウンタ3のアップカウントダウンカウント制
御人力UD、カウント人力Tに人力されている。
B is input, and pulse Pd is output. 5 is a double edge pulse generation circuit 1. a.1. The respective output pulses Pc and Pa of b, and the output pulse P of the phase detection circuit 4
d, and generates an up-count/down-count control output Pe and a count output Pf based on these. The counter 3 includes an up-count/down-count control human power UD and a count human power T, and the two outputs Pe and Pf of the counter control circuit 5 are input to the up-count/down count control human power UD and the count human power T of the counter 3, respectively.

第2図は第1図で示したアップダウンカウンタ装置の動
作を示すタイミングチャートである。以下同図を参照し
て動作を説明する。なお、パルス入力信号A、Bは位相
のずれたもので、同図に示すようにパルス入力信号Aよ
りパルス入力信号Bの方が位相が遅れているものとして
説明する。
FIG. 2 is a timing chart showing the operation of the up/down counter device shown in FIG. The operation will be explained below with reference to the same figure. The pulse input signals A and B are out of phase, and the explanation will be made assuming that the pulse input signal B is delayed in phase than the pulse input signal A, as shown in the figure.

位相検出回路4はパルス入力信号A、Bのレベルが“H
”あるいは“L″に揃っているとき“L。
The phase detection circuit 4 detects that the level of the pulse input signals A and B is “H”.
” or “L” when all are aligned.

レベル、一方が“H“他方が“L”となったとき”H”
レベルを出力するので、その出力パルスPdは第2図に
示すようになる。また両エツジパルス発生回路1aおよ
びlbはパルス入力信号A。
Level: “H” when one is “H” and the other is “L”
Since the level is outputted, the output pulse Pd becomes as shown in FIG. Further, both edge pulse generation circuits 1a and lb receive pulse input signal A.

Bのそれぞれの立ち上がり、立ち下がりに対応したパル
スを出力するので、その出力パルスPc。
Since a pulse corresponding to each rise and fall of B is output, the output pulse Pc.

Paは第2図に示すようになる。つまり、両エツジパル
ス発生回路1aからは、パルス入力信号Aの立ち上がり
エツジAI、A3に対し、てパルスPcl、Pc5が発
生し、パルス入力信号Aの立ち下かりエツジA2.A4
に対してパルスPc3゜Pc7が発生する。同様に両エ
ツジパルス発生回路1bからは、パルス入力信号Bの立
ち上かりエツジ、立ち丁がりエツジBl、B2.B3.
B4に対してパルスPa2.Pa4.Pa6.Pa8が
発生する。
Pa becomes as shown in FIG. That is, from both edge pulse generating circuits 1a, pulses Pcl and Pc5 are generated for rising edges AI and A3 of pulse input signal A, and pulses Pcl and Pc5 are generated for falling edges A2 and A3 of pulse input signal A, respectively. A4
Pulses Pc3 and Pc7 are generated. Similarly, from both edge pulse generation circuits 1b, the rising edge, falling edge B1, B2 . B3.
B4 with pulse Pa2. Pa4. Pa6. Pa8 occurs.

以上のような出力バルスPc、Pa、Pdがカウンタ制
御回路5に入力され、カウンタ制御回路5はこれらのパ
ルスPc、Pa、Pdに基づいてアップカウントダウン
カウント制御出力Peおよびカウント出力Pfを作り出
す。これらの出力のうちカウント出ノJPfは図のよう
にパルスPcとパルスPaを合わせたものになる。一方
、アップカウントダウンカウント制御出力Peは、パル
ス入力信号A、Bの位相関係によって“H゛レベルなっ
たり“L°レベルになったりする。つまり図示のように
パルス入力信号Aよりパルス入力信号Bの方が遅れてい
るような位相関係であればアップカウントダウンカウン
ト制御出力Peは“H”レベルとなり、図示とは逆にパ
ルス入力信号Aよリパルス入力信号Bの方が進んでいる
ような位相関係であればアップカウントダウンカウント
制御出力Peは“Lルーベルとなる。
The output pulses Pc, Pa, and Pd as described above are input to the counter control circuit 5, and the counter control circuit 5 generates an up-count-down count control output Pe and a count output Pf based on these pulses Pc, Pa, and Pd. Among these outputs, the count output JPf is a combination of the pulse Pc and the pulse Pa as shown in the figure. On the other hand, the up-count/down-count control output Pe changes to "H" level or "L° level" depending on the phase relationship between the pulse input signals A and B. In other words, if the phase relationship is such that pulse input signal B lags behind pulse input signal A as shown in the figure, the up-count-down count control output Pe will be at "H" level, and contrary to what is shown in the figure, pulse input signal B will lag behind pulse input signal A. If the phase relationship is such that the repulse input signal B is ahead, the up count down count control output Pe becomes "L rubel".

第3図は第1図で示したカウンタ制御回路5の一実施例
を示す回路図である。同図に示すように、位相検出回路
4の出力パルスPdと、両エツジパルス発生回路1aの
出力パルスPcと、両エツジパルス発生回路1bの出力
パルスPaがアップダウン切替信号発生回路6に与えら
れており、アップダウン切替信号発生回路6の2つの出
力パルスPg、Phがそれぞれ、R−Sフリップフロッ
プから成るアップダウン切替回路7の入力SおよびRに
与えられている。また、両エツジパルス発生回路1aの
出力パルスPcと両エツジパルス回路1bの出力パルス
PaがOR回路8に与えられている。さらに、アップダ
ウン切替回路7の出力Qのパルスがアップカウントダウ
ンカウント制御出力Peとしてカウンタ3のアップカウ
ントダウンカウント制御人力UDに、OR回路8の出力
パルスがカウント出力Pfとしてカウンタ3のカウント
人力Tに与えられている。
FIG. 3 is a circuit diagram showing one embodiment of the counter control circuit 5 shown in FIG. 1. As shown in the figure, the output pulse Pd of the phase detection circuit 4, the output pulse Pc of the both edge pulse generation circuit 1a, and the output pulse Pa of the both edge pulse generation circuit 1b are applied to the up/down switching signal generation circuit 6. , two output pulses Pg and Ph of the up-down switching signal generation circuit 6 are respectively applied to inputs S and R of an up-down switching circuit 7 consisting of an R-S flip-flop. Further, the output pulse Pc of the both edge pulse generating circuit 1a and the output pulse Pa of the both edge pulse circuit 1b are applied to the OR circuit 8. Further, the pulse of the output Q of the up/down switching circuit 7 is applied to the up/down count control output Pe of the counter 3 as an up/down count control output Pe, and the output pulse of the OR circuit 8 is applied as the count output Pf to the counting force T of the counter 3. It is being

次にカウンタ制御回路5の一実施例の動作について説明
する。アップダウン切替信号発生回路6は、位相検出回
路4の出力パルスPdか“Hルーベルのとき、両エツジ
パルス発生回路1aの出力パルスPcをアップダウン切
替回路7への出力パルスphとして、両エツジパルス発
生回路1bの出力パルスPaをアップダウン切替回路7
への出力パルスPgとしてそれぞれ出力する。逆に、位
相検出回路4の出力パルスPdが“L″レベルとき、両
エツジパルス発生回路1aの出力パルスPcをアップダ
ウン切替回路7への出力パルスPgとして、両エツジパ
ルス発生回路1bの出力パルスPaをアップダウン切替
回路7への出力パルスphとしてそれぞ゛れ出力する。
Next, the operation of one embodiment of the counter control circuit 5 will be described. When the output pulse Pd of the phase detection circuit 4 is "H", the up/down switching signal generation circuit 6 outputs the output pulse Pc of the both edge pulse generation circuit 1a as the output pulse ph to the up/down switching circuit 7, and outputs the output pulse Pc of the both edge pulse generation circuit 1a to the up/down switching circuit 7. 1b output pulse Pa up/down switching circuit 7
The output pulses are output as output pulses Pg. Conversely, when the output pulse Pd of the phase detection circuit 4 is at "L" level, the output pulse Pc of the both edge pulse generation circuit 1a is set as the output pulse Pg to the up/down switching circuit 7, and the output pulse Pa of the both edge pulse generation circuit 1b is set as the output pulse Pg to the up/down switching circuit 7. Each of them is outputted as an output pulse ph to the up/down switching circuit 7.

R−Sフリップフロップからなるアップダウン切替回路
7は、セット人力Sへ入力されるアップダウン切替信号
発生回路6の出力パルスPgのみが1H゛レベルのとき
出力Qに“H#レベルを出力し、リセット人力Rへ入力
されるアップダウン切替信号発生回路6の出力パルスp
hのみが“H”レベルのとき出力Qに“L” レベルを
出力する。
The up/down switching circuit 7 consisting of an R-S flip-flop outputs "H# level" to the output Q when only the output pulse Pg of the up/down switching signal generation circuit 6 inputted to the set human power S is at the 1H level. Output pulse p of the up/down switching signal generation circuit 6 input to the reset human power R
When only h is at the "H" level, the output Q is outputted at the "L" level.

百出力パルスPg、Phとも“L“レベルのときは出力
Qの状態は変化しない。
When both the output pulses Pg and Ph are at the "L" level, the state of the output Q does not change.

第2図に示す実施例のように、パルス入力信号Aよりパ
ルス入力信号Bの方か位相が遅れているような場合は、
位相検出回路4の出力パルスPdが“H″ベルとき、両
エツジパルス発生回路1aの出力パルスPcは常に“L
”レベルで、両エツジパルス発生回路1bの出力パルス
Paは“H”あるいは“L″レベルなる。逆に、位相検
出回路4の出力パルスPdが“L“レベルのとき、両エ
ツジパルス発生回路1aの出力パルスPcは“H”ある
いは“L″レベル、両エツジパルス発生回路1bの出力
パルスPaは常に“L°レベルとなる。このため、アッ
プダウン切替回路7の入力パルスPgは“H”レベル、
“L”レベルの繰り返し、入力パルスphは常に“L”
レベルとなり、アップダウン切替回路7の出力パルスで
あるアップカウントダウンカウント制御出力Peは常に
“H″レベルなる。
As in the embodiment shown in FIG. 2, if pulse input signal B is delayed in phase than pulse input signal A,
When the output pulse Pd of the phase detection circuit 4 is "H", the output pulse Pc of both edge pulse generation circuits 1a is always "L".
” level, the output pulse Pa of both edge pulse generation circuits 1b becomes “H” or “L” level. Conversely, when the output pulse Pd of the phase detection circuit 4 is “L” level, the output pulses of both edge pulse generation circuits 1a become “H” or “L” level. The pulse Pc is always at the "H" or "L" level, and the output pulse Pa of both edge pulse generating circuits 1b is always at the "L° level." Therefore, the input pulse Pg of the up/down switching circuit 7 is at "H" level.
“L” level repeats, input pulse ph is always “L”
The up/down count control output Pe, which is the output pulse of the up/down switching circuit 7, is always at the "H" level.

第1図に示す実施例とは逆に、パルス入力信号Aよりパ
ルス入力信号Bの方が位相が遅れているような場合は、
上の説明と同様な考え方から、アップダウン切替回路7
の出力パルスであるアップカウントダウンカウント制御
出力Peは常に“L。
Contrary to the embodiment shown in FIG. 1, if pulse input signal B is delayed in phase than pulse input signal A,
From the same idea as the above explanation, up/down switching circuit 7
The up-count-down count control output Pe, which is the output pulse, is always “L”.

レベルとなる。level.

また、OR回路8は両エツジパルス発生回路1aの出力
パルスPcと両エッンパルス発生回路1bの出力パルス
Paを入力し、パルスPcとパルスPaを合わせたよう
なパルスをカウント出力Pfとして、カウンタ3のカウ
ント人力Tに出力する。
Further, the OR circuit 8 inputs the output pulse Pc of both edge pulse generation circuits 1a and the output pulse Pa of both edge pulse generation circuits 1b, and outputs a pulse such as a combination of pulses Pc and pulse Pa as a count output Pf, and outputs the pulses of the counter 3. Output to human power T.

カウンタ制御回路5て生成されたアップカウントダウン
カウント制御出力Peおよびカウント出力Pfは、カウ
ンタ3のアップカウントダウンカウント制御人力UDお
よびカウント人力Tに与えられている。ここで、カウン
タ3はアップカウントダウンカウント制御人力UDが“
H”のときアップカウント、“Loのときダウンカウン
トするものとする。また、カウント人力Tの立ち下がり
をカウント有効エツジとする。第2図の実施例では、パ
ルス入力信号Aよりパルス入力信号Bの方が遅れており
、カウンタ制御回路5から出力され制御回路5のカウン
ト出力Pfの立ち下がりでアップカウントする。このよ
うにして、パルス入力信号A、Bのすべてのエツジに応
答してカウンタ3でアップカウントが行われる。一方、
第2図とは逆にパルス入力信号Aよりパルス入力信号B
の方が進んでいるような位相関係であれば、カウンタ3
はパルス入力信号A、Bのすべてのエツジに応答してダ
ウンカウントすることになる。
The up-count/down-count control output Pe and count output Pf generated by the counter control circuit 5 are given to the up-count/down count control human power UD and the count human power T of the counter 3. Here, the counter 3 has an up count down count control manual UD of “
When it is "H", it counts up, and when it is "Lo", it counts down. Further, the falling edge of the count force T is defined as the effective edge of the count. In the embodiment shown in FIG. 2, the pulse input signal B lags behind the pulse input signal A, is output from the counter control circuit 5, and is counted up at the fall of the count output Pf of the control circuit 5. In this way, the counter 3 counts up in response to all edges of the pulse input signals A and B. on the other hand,
Contrary to Fig. 2, the pulse input signal B is lower than the pulse input signal A.
If the phase relationship is such that
will count down in response to all edges of pulse input signals A and B.

このように本実施例では、パルス入力信号A。Thus, in this embodiment, the pulse input signal A.

B間の位相の進み、遅れの関係に応じて従来と同様にカ
ウンタ3をアップカウントあるいはダウンカウントさせ
るとともに、従来と異なり、パルス入力信号A、Bのす
べてのエツジに応答して、カウンタ3でカウントが行わ
れるようにしている。
The counter 3 counts up or down in the same way as in the past, depending on the phase lead or lag relationship between pulse input signals A and B. I'm making sure the count is done.

したがって、カウンタ3のカウント値からアップカウン
ト、ダウンカウントのいずれが行われているのかを知る
ことにより従来と同様にパルス入力信号A、B間の位相
の進み、遅れの関係を検出することができるのは勿論、
パルス入力信号A、  Bの変化の様子が詳細にカウン
タ3のカウント値に反映するようになって、該カウント
値の変化の様子からパルス入力信号A、Hの詳細な位相
関係をも検出することが可能となる。すなわち、本発明
によれば、単にパルス入力信号A、Bのどちらの位相が
遅れているかということだけてはなく、位相のずれがど
れ位なのかということをも正確に検出てきるようになる
Therefore, by knowing from the count value of the counter 3 whether up-counting or down-counting is being performed, it is possible to detect the relationship between phase advance and lag between pulse input signals A and B in the same manner as before. Of course,
The manner in which the pulse input signals A and B change is reflected in detail in the count value of the counter 3, and the detailed phase relationship between the pulse input signals A and H can also be detected from the manner in which the count value changes. becomes possible. In other words, according to the present invention, it is possible to accurately detect not only which of the pulse input signals A and B is delayed in phase, but also the extent of the phase shift. .

なお、上記実施例ではカウンタ3のアップカウントダウ
ンカウント制御人力UDが′H”のときアップカウント
、“L”のときダウンカウントとしたが、その極性は反
対であってもよい。またカウンタ3のカウント有効エツ
ジを立ち下がりとしたが、立ち上がりとしても同様の効
果が得られる。
In the above embodiment, when the up-count/down-count control UD of the counter 3 is 'H', it is counted up, and when it is 'L', it is counted down, but the polarity may be reversed. Although the effective edge is set as a falling edge, the same effect can be obtained even if it is a rising edge.

〔発明の効果〕〔Effect of the invention〕

以上説明したように、この発明によれば、第1第2のパ
ルス入力信号の各々の立ち上がり、立ち下がりの両エツ
ジでカウントパルスを発生させる手段と、このカウント
パルスをアップカウントダウンカウント制御信号に従っ
てアップ或いはダウンカウントするアップダウンカウン
タを設け、第1、第2のパルス入力信号に変化があるご
とにアップダウンカウンタのカウント値も変化するよう
にしたので、第1.第2のパルス入力信号の変化の様子
が詳細にアップダウンカウンタのカウント値に反映する
ようになり、正確で精度の高い2つのパルス入力信号の
位相関係が検出できるという効果がある。
As described above, according to the present invention, there is provided a means for generating a count pulse at both the rising and falling edges of each of the first and second pulse input signals, and a means for generating a count pulse at both the rising and falling edges of each of the first and second pulse input signals; Alternatively, an up-down counter that counts down is provided, and the count value of the up-down counter changes every time there is a change in the first and second pulse input signals. The state of change in the second pulse input signal is reflected in detail in the count value of the up/down counter, and there is an effect that the phase relationship between the two pulse input signals can be detected accurately and with high precision.

【図面の簡単な説明】 第1図はこの発明によるアップダウンカウンタ装置の一
実施例を示すブロック図、第2図は第1図のアップダウ
ンカウンタ装置の動作を示すタイミングチャート、第3
図は第1図で示したカウンタ制御回路5の一実施例を示
すブロック図、第4図は従来のアップダウンカウンタ装
置を示すブロック図、第5図は第4図のアップダウンカ
ウンタ装置の動作を示すタイミングチャートである。 図において1.la、lbは両エツジパルス発生口路、
2はAND回路、3はカウンタ、4は位相検出回路、5
はカウンタ制御回路である。 なお、各図中同一符号は同一または相当部分を示す。
[BRIEF DESCRIPTION OF THE DRAWINGS] FIG. 1 is a block diagram showing an embodiment of the up-down counter device according to the present invention, FIG. 2 is a timing chart showing the operation of the up-down counter device of FIG. 1, and FIG.
1 is a block diagram showing an embodiment of the counter control circuit 5 shown in FIG. 1, FIG. 4 is a block diagram showing a conventional up-down counter device, and FIG. 5 is an operation of the up-down counter device shown in FIG. 4. FIG. In the figure 1. la and lb are both edge pulse generation ports,
2 is an AND circuit, 3 is a counter, 4 is a phase detection circuit, 5
is a counter control circuit. Note that the same reference numerals in each figure indicate the same or corresponding parts.

Claims (1)

【特許請求の範囲】[Claims] (1)第1のパルス入力信号と第2のパルス入力信号と
を入力とするアップダウンカウンタ装置であって、 前記第1、第2のパルス入力信号の各々の立ち上がり、
立ち下がりの両エッジでカウントパルスを発生させる手
段と、 前記第1、第2のパルス入力信号の位相関係に従ってア
ップカウントダウンカウント制御信号を生成する手段と
、 前記カウントパルスを前記アップカウントダウンカウン
ト制御信号に従ってアップカウント或いはダウンカウン
トするアップダウンカウンタとを備えるアップダウンカ
ウンタ装置。
(1) An up-down counter device that receives a first pulse input signal and a second pulse input signal, the rise of each of the first and second pulse input signals,
means for generating a count pulse at both falling edges; means for generating an up-count-down count control signal according to the phase relationship of the first and second pulse input signals; and means for generating the count pulse according to the up-count-down count control signal. An up/down counter device comprising an up/down counter that counts up or counts down.
JP2150786A 1990-06-07 1990-06-07 Up-down counter device Expired - Fee Related JPH07119621B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2150786A JPH07119621B2 (en) 1990-06-07 1990-06-07 Up-down counter device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2150786A JPH07119621B2 (en) 1990-06-07 1990-06-07 Up-down counter device

Publications (2)

Publication Number Publication Date
JPH0442018A true JPH0442018A (en) 1992-02-12
JPH07119621B2 JPH07119621B2 (en) 1995-12-20

Family

ID=15504403

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2150786A Expired - Fee Related JPH07119621B2 (en) 1990-06-07 1990-06-07 Up-down counter device

Country Status (1)

Country Link
JP (1) JPH07119621B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008224440A (en) * 2007-03-13 2008-09-25 Jtekt Corp Bearing rotation detecting apparatus

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS55127214U (en) * 1979-03-05 1980-09-09
JPS5836364U (en) * 1981-09-01 1983-03-09 日本電気株式会社 Displacement direction identification circuit

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS55127214U (en) * 1979-03-05 1980-09-09
JPS5836364U (en) * 1981-09-01 1983-03-09 日本電気株式会社 Displacement direction identification circuit

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008224440A (en) * 2007-03-13 2008-09-25 Jtekt Corp Bearing rotation detecting apparatus

Also Published As

Publication number Publication date
JPH07119621B2 (en) 1995-12-20

Similar Documents

Publication Publication Date Title
JPH0522274A (en) Digital phase detector
US4455587A (en) Electronic control circuit for the formation of a monostable switching behavior in a bistable relay
JPH0442018A (en) Up/down counter apparatus
JPH0232799A (en) Electric stepping motor having load angle regulator and its operation
JPH0374325B2 (en)
RU2220468C1 (en) Phase-difference relay
EP0415047B1 (en) Precision timing circuit
RU2220471C1 (en) Phase-difference relay
JPH03219723A (en) Up-down counter device
RU2248637C2 (en) Phase-and-frequency relay
SU963033A1 (en) Shaft angular position-to-phase discrete increment converter
RU2213387C1 (en) Phase-frequency relay
SU1758846A1 (en) Reference frequency generator
JPH03265468A (en) Phase control circuit
JPS60256294A (en) Constant rate break period pulse correcting unit
JPS61225660A (en) Moving direction discriminating circuit
SU1027799A1 (en) Phase discriminator
JPH0522277A (en) Synchronizing circuit
SU1141509A2 (en) Device for adjusting frequency of one voltage source to frequency of another voltage source
JPS63205517A (en) Output signal generating circuit for shaft encoder
CA2238093C (en) Direct digital frequency synthesizer using pulse gap shifting technique
SU421132A1 (en) DIVIDER WITH VARIABLE COEFFICIENT DIVISION
SU1354443A1 (en) Amplitude synchroselector
RU2231156C1 (en) Differential-phase relay
SU1697211A1 (en) Device for control over thyristors connected in parallel opposition

Legal Events

Date Code Title Description
S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313111

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

LAPS Cancellation because of no payment of annual fees