JPS6251525B2 - - Google Patents

Info

Publication number
JPS6251525B2
JPS6251525B2 JP55016375A JP1637580A JPS6251525B2 JP S6251525 B2 JPS6251525 B2 JP S6251525B2 JP 55016375 A JP55016375 A JP 55016375A JP 1637580 A JP1637580 A JP 1637580A JP S6251525 B2 JPS6251525 B2 JP S6251525B2
Authority
JP
Japan
Prior art keywords
output
pulse
signal
operation signal
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.)
Expired
Application number
JP55016375A
Other languages
Japanese (ja)
Other versions
JPS56114441A (en
Inventor
Mineo Akashi
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NEC Corp
Original Assignee
Nippon Electric Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nippon Electric Co Ltd filed Critical Nippon Electric Co Ltd
Priority to JP1637580A priority Critical patent/JPS56114441A/en
Publication of JPS56114441A publication Critical patent/JPS56114441A/en
Publication of JPS6251525B2 publication Critical patent/JPS6251525B2/ja
Granted legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03KPULSE TECHNIQUE
    • H03K21/00Details of pulse counters or frequency dividers
    • H03K21/08Output circuits
    • H03K21/12Output circuits with parallel read-out

Landscapes

  • Communication Control (AREA)
  • Manipulation Of Pulses (AREA)

Description

【発明の詳細な説明】 本発明は計算機、マイクロコンピユータなどの
データ処理システム(以下システムと呼ぶ)に接
続又は内蔵される計数回路に関する。
DETAILED DESCRIPTION OF THE INVENTION The present invention relates to a counting circuit connected to or incorporated in a data processing system (hereinafter referred to as a system) such as a computer or a microcomputer.

かかるシステムが、たとえば電圧・回転数等の
アナログ量の信号を扱う場合、その信号は一般に
A/Dコンバータ・磁気センサーなどによりパル
ス信号に変換して扱われる。この様な場合その量
はパルス信号を計数する計数回路にて累計され処
理システムに読取られる。
When such a system handles analog signals such as voltage and rotational speed, the signals are generally converted into pulse signals by an A/D converter, magnetic sensor, etc. and then handled. In such a case, the amount is accumulated in a counting circuit that counts the pulse signals and read by the processing system.

アナログ量からパルス信号への変換回路は各種
提供されており本発明には直接開係無いため具体
的な説明は省略し、以下高レベル又は低レベルの
2値論理信号に変換されたパルス信号をもとに説
明を行う。
Various circuits for converting analog quantities into pulse signals are available, and since they are not directly related to the present invention, a detailed explanation will be omitted.Hereinafter, a pulse signal converted into a high-level or low-level binary logic signal will be described. I will explain based on this.

第1図は従来の計数回路の例を示す図で、nビ
ツトパルスカウンタ(CNT)1には計数回路へ
の入力パルス信号CP及びシステムからのリセツ
ト操作信号RESが入力され、システム入力用ア
ンドゲート(G1〜Go)2〜4はカウンタ
(CNT)1からの計数出力とシステムからの読取
操作信号RDが入力され、その出力D1〜Doはシス
テムへのデータ入力となる。システムは計数回路
が計数を開始する前にリセツト操作信号RESを
発生してカウンタ1をクリアする。カウンタ4は
入力パルスCPの立下がり時にトリガされて計数
を行い、入力したパルス数を計数した結果を常に
アンドゲート(G1〜Go)2〜4に供給する。シ
ステムは必要なタイミングで読取操作信号RDを
発生し、アンドゲート出力D1〜Doを介して計数
結果を読取り、所定のデータ処理を行う。
Figure 1 is a diagram showing an example of a conventional counting circuit, where an n-bit pulse counter (CNT) 1 receives an input pulse signal CP to the counting circuit and a reset operation signal RES from the system, and an AND gate for system input. The counting output from the counter (CNT) 1 and the reading operation signal RD from the system are input to (G 1 -G o ) 2 - 4, and the outputs D 1 -D o serve as data inputs to the system. The system generates a reset operation signal RES to clear counter 1 before the counting circuit starts counting. The counter 4 is triggered at the falling edge of the input pulse CP to perform counting, and always supplies the result of counting the number of input pulses to the AND gates ( G1 to G0 ) 2 to 4. The system generates the read operation signal RD at the necessary timing, reads the counting results via the AND gate outputs D1 to D0 , and performs predetermined data processing.

第2図は第1図に示した回路の動作を示すタイ
ムチヤートでCPは入力パルス信号、CNTはカウ
ンタ出力、RDは読取操作信号、Dはアンドゲー
トG1〜Go出力を示し、ONT及びDは複数ビツト
であるため変化のタイミング及び2進化コードに
て表現されている。カウンタ1は入力パルス信号
CPの立下り時にトリガされ、その出力はK−
1、K、K+1と計数値が変化する。
Figure 2 is a time chart showing the operation of the circuit shown in Figure 1, where CP is the input pulse signal, CNT is the counter output, RD is the read operation signal, D is the AND gate G 1 to G o output, ONT and Since D is a plurality of bits, it is expressed by the timing of change and a binary code. Counter 1 is the input pulse signal
Triggered on the falling edge of CP, its output is K-
The count value changes from 1 to K to K+1.

システムからの読取操作信号RDが低レベルの
期間Lでは、アンドゲートG1〜Goは閉じておりそ
の出力Dは0で、読取操作信号RDが高レベルの
期間THにおいてのみカウンタの計数値が出力さ
れる。
During the period L when the read operation signal RD from the system is at a low level, AND gates G 1 to G o are closed and their output D is 0, and the count value of the counter is only during the period T when the read operation signal RD is at a high level. is output.

入力パルス信号CPと読取操作信号RDは非同期
にカウンタ1およびアンドゲート2〜4に入力さ
れるので、読取操作信号RDが高レベルの期間TH
に入力パルス信号が立下つた場合、これに応答し
てカウンタは計数を行い期間TH内でアンドゲー
ト出力が変化する。
Since the input pulse signal CP and the read operation signal RD are asynchronously input to the counter 1 and the AND gates 2 to 4, the read operation signal RD is at a high level during the period T H
When the input pulse signal falls, the counter performs counting in response to this, and the AND gate output changes within the period TH .

一般にシステムが読取操作信号RDを出力して
いる期間に読取られるデータは変化しないものと
して設計されており、読取られるデータが変化す
る場合、正確なデータの読取が行なわれない読取
エラーを起こす。
Generally, the system is designed so that the data read during the period when the read operation signal RD is output does not change, and if the data read changes, a read error occurs in which the data is not read accurately.

前述の様な読取エラーの発生の確率は低いと考
えられるがシステムは誤つたデータを読取つても
誤りの判断は出来ないため、多くの処理にその誤
つたデータが使用される可能性がありシステムの
動作に重大な障害を与える。
Although the probability of a reading error like the one described above is thought to be low, the system cannot determine whether it is an error even if it reads incorrect data, so there is a possibility that the incorrect data will be used for many processes, and the system seriously impede the operation of the

本発明の目的は、入力パルス信号と読取操作信
号とが非同期に発生する計数回路の同期化を計
り、パルス計数結果を読取る時の読取エラーを防
止することにある。
An object of the present invention is to synchronize a counting circuit in which an input pulse signal and a reading operation signal are generated asynchronously, and to prevent reading errors when reading pulse counting results.

本発明は入力されるパルス信号を計数し、その
計数結果を読取操作信号に応答して出力する計数
回路において、入力パルス信号およびその反転信
号を夫々入力し、読取操作信号が発生されている
期間は閉じ、発生されていない期間は開くように
動作するゲート回路と、該ゲート回路の出力によ
つてセツトおよびリセツトされるフリツプ・フロ
ツプとを設け、該フリツプ・フロツプの出力をカ
ウントパルス信号として計数するようにしたこと
を特徴とするものである。
The present invention provides a counting circuit that counts input pulse signals and outputs the counting result in response to a read operation signal, and in which the input pulse signal and its inverted signal are respectively input, and the period during which the read operation signal is generated. A gate circuit is provided, which operates so that the pulse is closed and opened when no pulse is being generated, and a flip-flop is set and reset by the output of the gate circuit, and the output of the flip-flop is counted as a count pulse signal. It is characterized by the fact that it is made to do so.

第3図を開いて本発明の計数回路の一実施例を
示す。2個の反転回路I1,I2と、2個のアンドゲ
ートA1,A2と、セツトリセツトフリツプフロツ
プF/Fで構成されるパルス制御回路5(図中点
線で囲つて示す)を第1図に示した回路のパルス
信号の入力段に追加し、パルス信号CPを読取操
作信号RDによつてパルス制御回路で制御し、制
御された出力パルスCKをカウントパルスとして
カウンタ1に供給する。
Opening FIG. 3, one embodiment of the counting circuit of the present invention is shown. Pulse control circuit 5 (shown surrounded by a dotted line in the figure) consisting of two inverting circuits I 1 and I 2 , two AND gates A 1 and A 2 , and a reset flip-flop F/F. is added to the pulse signal input stage of the circuit shown in Figure 1, the pulse signal CP is controlled by the pulse control circuit by the reading operation signal RD, and the controlled output pulse CK is supplied to the counter 1 as a count pulse. do.

前述以外の符号は第1図と同様である。 Reference numerals other than those mentioned above are the same as in FIG. 1.

パルス制御回路5は、パルス信号CPを反転回
路I1およびアンドゲートA1に入力し、反転回路I1
の出力をアンドゲートA2に入力し、読取操作信
号RDを入力とする反転回路I2の出力をアンドゲ
ートA1とA2の両方に入力し、アンドゲートA1
力をフリツプフロツプのセツト入力端に、アンド
ゲートA2出力をリセツト入力端に夫々入力する
事により構成される。
The pulse control circuit 5 inputs the pulse signal CP to the inverting circuit I1 and the AND gate A1 , and the inverting circuit I1
The output of the inverting circuit I2 , which receives the read operation signal RD , is input to both the AND gates A1 and A2 , and the output of the AND gate A1 is connected to the set input terminal of the flip-flop. It is constructed by inputting the two outputs of AND gate A to the reset input terminal.

システムからの読取操作信号RDが低レベルの
場合、反転回路I2出力は高レベルで、アンドゲー
トA1とA2はともに開いており、入力パルスCPが
高レベルの時に反転回路I1の出力は低レベル、ア
ンドゲートA1の出力は高レベル、アンドゲート
A2の出力は低レベルとなり、フリツプフロツプ
F/Fはセツトされ、その出力CKは高レベルと
なる。入力パルスCPが低レベルの時には反転回
路I1の出力は高レベル、アンドゲートA1の出力は
低レベル、アンドゲートA2の出力は高レベルと
なり、フリツプフロツプF/Fはリセツトされ、
その出力CKは低レベルとなる。この結果、シス
テムからの読取操作信号RDがなければ、入力パ
ルスCPはそのままカウントパルスCKとしてカウ
ンタ1に入力される。
When the read operation signal RD from the system is at a low level, the inverting circuit I 2 output is at a high level, and the AND gates A 1 and A 2 are both open, and when the input pulse CP is at a high level, the output of the inverting circuit I 1 is low level, and the output of AND gate A 1 is high level, and gate
The output of A2 goes low, the flip-flop F/F is set, and its output CK goes high. When the input pulse CP is at low level, the output of inverting circuit I1 is at high level, the output of AND gate A1 is at low level, the output of AND gate A2 is at high level, and the flip-flop F/F is reset.
Its output CK becomes low level. As a result, if there is no read operation signal RD from the system, the input pulse CP is directly input to the counter 1 as the count pulse CK.

一方、システムから読取操作信号RDが出力さ
れ、そのレベルが高レベルになると、反転回路I2
の出力は低レベルで、アンドゲートA1とA2はと
もに閉じられ、入力パルスCPはアンドゲートA1
とA2によつて禁止される。よつて、この間フリ
ツプフロツプF/Fは以前の状態を保持し、パル
ス制御回路によつてカウンタの計数動作が阻止さ
れる。
On the other hand, when the read operation signal RD is output from the system and its level becomes high level, the inversion circuit I 2
The output of is low level, AND gates A 1 and A 2 are both closed, and the input pulse CP is the AND gate A 1
and prohibited by A 2 . Therefore, during this time, the flip-flop F/F maintains its previous state, and the counting operation of the counter is inhibited by the pulse control circuit.

第4図は第3図に示した実施例の動作を示すタ
イムチヤートでCPは入力パルス信号、CKはパル
ス制御回路から出力されるカウントパルス信号、
CNTはカウンタ出力、RDは読取操作信号、Dは
アンドゲート出力を示す。
FIG. 4 is a time chart showing the operation of the embodiment shown in FIG. 3, where CP is an input pulse signal, CK is a count pulse signal output from the pulse control circuit,
CNT indicates the counter output, RD indicates the read operation signal, and D indicates the AND gate output.

システムからの読取操作信号RDが低レベルの
期間TLにおいては、入力パルス信号CPはパルス
制御回路を伝搬してそのまま出力CKとなり、カ
ウンタはパルス制御回路出力CKの立下り時にト
リガされ計数を行なう。システムから読取操作信
号RDが出力され、レベルが高レベルとなる期間
Hにおいては、入力パルス信号CPの変化はパル
ス制御回路で伝搬が阻止され、その出力CKの変
化は保留され、同時にアンドゲートG1〜Goは開
きその出力Dにカウンタの計数値が出力される。
During the period T L when the read operation signal RD from the system is at a low level, the input pulse signal CP propagates through the pulse control circuit and becomes the output CK as it is, and the counter is triggered and counts when the pulse control circuit output CK falls. . During the period T H when the read operation signal RD is output from the system and the level is high, the pulse control circuit blocks the change in the input pulse signal CP from propagating, the change in the output CK is suspended, and at the same time the AND gate G 1 to G o are opened and the count value of the counter is outputted to the output D thereof.

本発明の計数回路によれば、読取操作信号が出
力され、そのレベルが高レベルである期間TH
は、その間に入力パルス信号CPが立下つた場合
においても、パルス制御回路にてカウンタ1への
カウントパルスCKの変化は保留されるためカウ
ンタ計数値は変化せず、アンドゲートの出力Dが
乱されることはない。従つて、システムには正確
なデータが読取られ、読取エラーは生じない。な
お、読取完了後は読取操作信号RDが低レベルと
なるので、アンドゲートA1とA2とが開き、フリ
ツプフロツプはリセツトされる。従つて、その出
力CKはこの時点で立下り、カウンタ1は計数値
を+1する。よつて、計数誤差も生じない。な
お、正確に計数動作を行なわしめるためには、読
取操作信号の高レベル期間は入力パルス信号CP
の間隔より短くしなければならない。
According to the counting circuit of the present invention, during the period T H in which the reading operation signal is output and the level thereof is high, even if the input pulse signal CP falls during that period, the pulse control circuit outputs the signal to the counter 1. Since the change in the count pulse CK is suspended, the counter count value does not change, and the output D of the AND gate is not disturbed. Therefore, accurate data is read into the system and no reading errors occur. Note that after the reading is completed, the read operation signal RD becomes low level, so the AND gates A1 and A2 are opened and the flip-flop is reset. Therefore, the output CK falls at this point, and the counter 1 increments the count value by 1. Therefore, no counting error occurs. In addition, in order to perform counting operations accurately, the input pulse signal CP must be maintained during the high level period of the read operation signal.
must be shorter than the interval.

なお、実施例はパルス制御回路により、非同期
の入力パルス信号を読取操作信号に同期させ、パ
ルス計数結果の読取時における読取りエラーを防
止するものであるが、計数回路に対するシステム
の操作にはカウンタのリセツトやカウンタへの初
期データの設定などもあり、それらの操作におい
ても本発明の操作信号による同期化を実施でき
る。
In the embodiment, a pulse control circuit synchronizes an asynchronous input pulse signal with a reading operation signal to prevent reading errors when reading pulse counting results, but the system operation for the counting circuit requires a counter. There are also operations such as resetting and setting initial data to a counter, and these operations can also be synchronized using the operation signal of the present invention.

例えば、カウンタの値をリセツトする場合には
システムからリセツト操作信号が計数回路に供給
され、また、切期データを設定する場合には設定
すべきデータの信号とデータ設定操作信号が供給
される。ここで、リセツト操作やデータ設定操作
の信号と入力パルス信号と入力パルス信号の変化
が競合すると、カウンタの値が目的の値に設定で
きない誤動作が発生する。しかるに、実施例の読
取操作信号とともにリセツト操作信号やデータ設
定操作信号の論理和をとつてパルス制御回路に供
給すればリセツトやデータ設定の操作を行つてい
る時にカウンタの計数動作を保留させることがで
き、前述の競合が発生しなくなり、誤動作を防止
できる。
For example, when resetting the counter value, a reset operation signal is supplied from the system to the counting circuit, and when setting cut-off data, a data signal to be set and a data setting operation signal are supplied. Here, if the reset operation or data setting operation signal, the input pulse signal, and the change in the input pulse signal conflict with each other, a malfunction occurs in which the counter value cannot be set to the desired value. However, if the logical sum of the reset operation signal and data setting operation signal together with the reading operation signal of the embodiment is supplied to the pulse control circuit, it is possible to suspend the counting operation of the counter while performing the reset or data setting operation. This eliminates the aforementioned conflict and prevents malfunctions.

また、フリツプフロツプは入力パルスCPの立
上りでセツトされ、立下りでリセツトされる例を
示したが、逆に立上りでリセツトされ、立下りで
セツトされるものであつてもよい。
Further, although an example has been shown in which the flip-flop is set at the rising edge of the input pulse CP and reset at the falling edge, it may be reset at the rising edge and set at the falling edge.

また、カウンタは立下り時にトリガされて計数
するものでなくとも、立上り時にトリガされるも
のであつてもよい。
Further, the counter does not have to be triggered to count at the falling edge, but may be triggered at the rising edge.

以上述べた様に本発明によれば誤動作の無い計
数回路が容易に実現可能である。
As described above, according to the present invention, a counting circuit without malfunction can be easily realized.

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

第1図は従来の計数回路の例を示す図、第2図
は第1図に示した回路の動作を示すタイムチヤー
ト、第3図は本発明のカウンタ回路の一実施例
図、第4図は第3図に示した実施例の動作を示す
タイムチヤート、 1……nビツトパルスカウンタ、2〜4……シ
ステム入力用アンドゲート、5……パルス制御回
路、I1,I2……反転回路、A1,A2……アンドゲー
ト、F/F……セツトリセツトフリツプフロツ
プ、CP……入力パルス信号、CNT……カウンタ
出力、RD……読取操作信号、D,D1〜Do……ア
ンドゲート出力、CK……パルス制御回路出力、
RES……リセツト操作信号。
FIG. 1 is a diagram showing an example of a conventional counting circuit, FIG. 2 is a time chart showing the operation of the circuit shown in FIG. 1, FIG. 3 is a diagram showing an embodiment of the counter circuit of the present invention, and FIG. 4 is a time chart showing the operation of the embodiment shown in FIG. 3, 1...n-bit pulse counter, 2-4... AND gate for system input, 5... pulse control circuit, I1 , I2 ...inversion Circuit, A 1 , A 2 ...AND gate, F/F ... Set reset flip-flop, CP ... Input pulse signal, CNT ... Counter output, RD ... Read operation signal, D, D 1 ~ D o ...And gate output, CK...Pulse control circuit output,
RES...Reset operation signal.

Claims (1)

【特許請求の範囲】[Claims] 1 入力されるパルス信号の数を計数し、読取操
作信号に応答して計数結果を出力する計数回路に
おいて、前記パルス信号およびその反転信号を
夫々入力とし、前記読取操作信号が発生されてい
ない期間は開き、発生されている期間は閉じるよ
うに動作するゲート回路と、前記ゲート回路の出
力によつてセツトおよびリセツトされるフリツ
プ・フロツプとを設け、該フリツプ・フロツプの
出力をカウントパルス信号として計数することを
特徴とする計数回路。
1. In a counting circuit that counts the number of input pulse signals and outputs the counting result in response to a read operation signal, the pulse signal and its inverted signal are respectively input, and the period during which the read operation signal is not generated. A gate circuit is provided that operates to open and close during a period in which a pulse is generated, and a flip-flop is set and reset by the output of the gate circuit, and the output of the flip-flop is counted as a count pulse signal. A counting circuit characterized by:
JP1637580A 1980-02-13 1980-02-13 Counting circuit Granted JPS56114441A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP1637580A JPS56114441A (en) 1980-02-13 1980-02-13 Counting circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP1637580A JPS56114441A (en) 1980-02-13 1980-02-13 Counting circuit

Publications (2)

Publication Number Publication Date
JPS56114441A JPS56114441A (en) 1981-09-09
JPS6251525B2 true JPS6251525B2 (en) 1987-10-30

Family

ID=11914539

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1637580A Granted JPS56114441A (en) 1980-02-13 1980-02-13 Counting circuit

Country Status (1)

Country Link
JP (1) JPS56114441A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH01235042A (en) * 1988-03-15 1989-09-20 Pioneer Electron Corp Optical pickup device

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4689575A (en) * 1985-07-15 1987-08-25 Rca Corporation Clock synchronization circuit for a computer timer
JPS62203420A (en) * 1986-03-03 1987-09-08 Fanuc Ltd Counter circuit

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS4942274A (en) * 1972-03-03 1974-04-20

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS4942274A (en) * 1972-03-03 1974-04-20

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH01235042A (en) * 1988-03-15 1989-09-20 Pioneer Electron Corp Optical pickup device

Also Published As

Publication number Publication date
JPS56114441A (en) 1981-09-09

Similar Documents

Publication Publication Date Title
US5278957A (en) Data transfer circuit for interfacing two bus systems that operate asynchronously with respect to each other
US5398270A (en) Data coincidence detecting circuit
US4160154A (en) High speed multiple event timer
JP2695535B2 (en) Timer input control circuit and counter control circuit
JPS581458B2 (en) digital input device
JPS6251525B2 (en)
US4789959A (en) Delay circuit for a real time clock
JPH043132B2 (en)
JPH0284812A (en) Duty factor discrimination circuit
JPH06197009A (en) Counter with output latch function
JP2638337B2 (en) Error counter circuit
JPS5941336B2 (en) buffer memory device
JPS6212518B2 (en)
JP3097404B2 (en) Status reading circuit by microcomputer
SU1202045A1 (en) Delay device
JPH0563524A (en) Signal input circuit
JP2924100B2 (en) State transition circuit
GB2050011A (en) Improvements In or Relating to Devices for Reducing Irrational Base Codes to Minimal Form
JP2924968B2 (en) Time interactive simulation device
SU1444937A1 (en) Divider of pulse recurrence rate with variable pulse duration
JPS6233394Y2 (en)
SU1495772A1 (en) Device for piece-linear approximation
SU395989A1 (en) Accumulating Binary Meter
SU980279A1 (en) Time interval-to-digital code converter
JPH0250652B2 (en)