JPH0335856B2 - - Google Patents

Info

Publication number
JPH0335856B2
JPH0335856B2 JP56139445A JP13944581A JPH0335856B2 JP H0335856 B2 JPH0335856 B2 JP H0335856B2 JP 56139445 A JP56139445 A JP 56139445A JP 13944581 A JP13944581 A JP 13944581A JP H0335856 B2 JPH0335856 B2 JP H0335856B2
Authority
JP
Japan
Prior art keywords
signal
output
counting
circuit
flop
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
JP56139445A
Other languages
Japanese (ja)
Other versions
JPS5840929A (en
Inventor
Tsugio Ueda
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 JP56139445A priority Critical patent/JPS5840929A/en
Publication of JPS5840929A publication Critical patent/JPS5840929A/en
Publication of JPH0335856B2 publication Critical patent/JPH0335856B2/ja
Granted legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03KPULSE TECHNIQUE
    • H03K5/00Manipulating of pulses not covered by one of the other main groups of this subclass
    • H03K5/13Arrangements having a single output and transforming input signals into pulses delivered at desired time intervals
    • H03K5/135Arrangements having a single output and transforming input signals into pulses delivered at desired time intervals by the use of time reference signals, e.g. clock signals

Description

【発明の詳細な説明】 本発明は、計数回路に関し、特にクロツクパル
ス列のうちの所望個数のパルスが発生する間隔を
取出す計数回路に関する。
DETAILED DESCRIPTION OF THE INVENTION The present invention relates to a counting circuit, and more particularly to a counting circuit for determining the interval at which a desired number of pulses occur in a clock pulse train.

従来の計数回路は、パルス数を計数し、記憶す
る回路で、計数パルスを加えてからカウント動作
が終了するまでの時間は、使用しているフリツプ
フロツプ回路の性能によつてほぼ決まる。従つ
て、計数回路としてはそのカウント値を利用する
のが一般的な利用法であり、所望個数のパルスが
発生する間隔を利用する場合、例えば回転エンコ
ーダに利用しようとする場合には、そのままでは
利用できないという欠点があつた。
A conventional counting circuit is a circuit that counts and stores the number of pulses, and the time from when a counting pulse is applied until the counting operation is completed is approximately determined by the performance of the flip-flop circuit used. Therefore, the general usage of a counting circuit is to use the count value, and when using the interval at which a desired number of pulses are generated, for example, when trying to use it in a rotary encoder, it is necessary to use the count value as it is. The drawback was that it was not available.

本発明は上記欠点を除き、所望個数のクロツク
パルスの間隔を設定して、出力することのできる
計数回路を提供するものである。
The present invention eliminates the above drawbacks and provides a counting circuit which can set and output a desired number of clock pulses at intervals.

本発明による計数回路は、計数許可信号を保持
する保持手段と、この保持手段の出力に応答して
クロツク信号を伝達するゲート手段と、上記保持
手段の出力を上記ゲート手段の出力に現われたク
ロツク信号に同期してラツチするラツチ手段と、
上記ゲート手段の出力に現われたクロツク信号を
計数し所定の計数値を示す信号を発生するカウン
タと、このカウンタからの信号に応答して上記保
持手段およびラツチ手段をリセツトする手段とを
有し、上記ラツチ手段の出力を計数状態判別信号
として用いることを特徴としている。
The counting circuit according to the present invention includes a holding means for holding a counting permission signal, a gate means for transmitting a clock signal in response to the output of the holding means, and a clock signal appearing at the output of the gate means for transmitting the output of the holding means. latching means for latching in synchronization with the signal;
a counter for counting the clock signal appearing at the output of the gate means and generating a signal indicating a predetermined count value; and means for resetting the holding means and the latch means in response to the signal from the counter; It is characterized in that the output of the latch means is used as a counting state determination signal.

本発明の実施例について図面を用いて説明す
る。
Embodiments of the present invention will be described with reference to the drawings.

第1図は本発明の一実施例のブロツク図であ
る。この実施例の計数回路は、プリセツト・カウ
ント・データ11を入力してラツチ制御信号12
により保持するラツチ回路1と、桁上り信号21
とリセツト信号14との論理和をとるオア回路3
と、オア回路3の出力信号16でクリアされ、入
力される計数許可信号17の立上りを検出してカ
ウント値を出力する1ビツト・バイナリ・カウン
タ4と、リセツト信号14でクリアされ、1ビツ
ト・バイナリ・カウンタ4の出力信号18をJ端
子に、桁上り信号21をK端子に入力し、被計数
クロツクパルス信号15の立下りエツジを検出し
てJ及びK端子に入力された信号の組合せにより
定まる論理値を出力する立下りエツジ・トリガ型
J−Kフリツプフロツプ5と、J−Kフリツプフ
ロツプ5の出力信号19と被計数クロツクパルス
信号15との論理値をとるアンド回路6と、リセ
ツト信号14でクリアされ、アンド回路6の出力
信号20とラツチ回路1の出力信号13とを入力
してプリセツト値までカウントし、該プリセツト
値に達したら桁上り信号21を発生するNビツ
ト・バイナリ・カウンタ2と、オア回路3の出力
信号16でクリアされ、J−Kフリツプフロツプ
5の出力信号19をD端子に入力し、アンド回路
6からの出力信号20の立上りを検出して立上り
信号を発生し、Nビツト・バイナリ・カウンタ2
がカウント中か否かを単一のビツト情報のカウン
ト状態判別信号22として出力する立上りエツ
ジ・トリガ型Dフリツプフロツプ7とを含んで構
成されている。
FIG. 1 is a block diagram of one embodiment of the present invention. The counting circuit of this embodiment receives preset count data 11 and outputs a latch control signal 12.
latch circuit 1 held by and carry signal 21
and the reset signal 14.
and a 1-bit binary counter 4 which is cleared by the output signal 16 of the OR circuit 3 and outputs a count value by detecting the rising edge of the input counting permission signal 17; The output signal 18 of the binary counter 4 is input to the J terminal, the carry signal 21 is input to the K terminal, the falling edge of the clock pulse signal 15 to be counted is detected, and it is determined by the combination of the signals input to the J and K terminals. A falling edge-triggered J-K flip-flop 5 outputs a logical value, an AND circuit 6 takes a logical value between the output signal 19 of the J-K flip-flop 5 and the counted clock pulse signal 15, and a reset signal 14 clears the output signal. , an N-bit binary counter 2 which inputs the output signal 20 of the AND circuit 6 and the output signal 13 of the latch circuit 1, counts up to a preset value, and generates a carry signal 21 when the preset value is reached; It is cleared by the output signal 16 of the circuit 3, and the output signal 19 of the J-K flip-flop 5 is input to the D terminal, and the rising edge of the output signal 20 from the AND circuit 6 is detected to generate a rising signal.・Counter 2
The D flip-flop 7 includes a rising edge trigger type D flip-flop 7 which outputs a single bit information count state determination signal 22 indicating whether or not the count is in progress.

次に、この実施例の動作について第2図を用い
て正論理の場合について説明する。負論理の場合
は論理を逆にすれば良い。
Next, the operation of this embodiment will be explained in the case of positive logic using FIG. In the case of negative logic, just reverse the logic.

第2図は第1図に示す一実施例の各部に現われ
る信号の波形図である。
FIG. 2 is a waveform diagram of signals appearing in various parts of the embodiment shown in FIG. 1.

まず、Nビツトカウント値M(N,Mは整数で、
1≦N,0<M≦2N)に応じたプリセツト・カウ
ント・データ信号11をラツチ回路1に与え、ラ
ツチ制御信号12により一時的に保持する。ラツ
チ回路3のラツチ・データ出力信号13によりN
ビツト・バイナリ・カウンタ2にプリセツト・カ
ウント・データ13を与えプリセツト値を設定す
る。次に、Nビツト・バイナリ・カウンタ2、1
ビツト・バイナリ・カウンタ4、J−Kフリツプ
フロツプ5、Dフリツプフロツプ7にリセツト信
号14を与えてリセツトする(正論理“0”とす
る)。被計数クロツクパルス信号15をJ−Kフ
リツプフロツプ5、アンド回路6に与える。
First, N bit count value M (N, M are integers,
A preset count data signal 11 corresponding to 1≦N, 0<M≦2 N is applied to the latch circuit 1 and is temporarily held by the latch control signal 12. N by the latch data output signal 13 of the latch circuit 3
The preset count data 13 is given to the bit binary counter 2 to set the preset value. Next, N-bit binary counters 2, 1
A reset signal 14 is applied to the bit binary counter 4, JK flip-flop 5, and D flip-flop 7 to reset them (setting them to positive logic "0"). The counted clock pulse signal 15 is applied to a JK flip-flop 5 and an AND circuit 6.

次に、計数許可信号17を1ビツト・バイナ
リ・カウンタ4に与えると、1ビツト・バイナ
リ・カウンタ4の出力信号18は論理“1”にな
り、この出力信号18がJ−Kフリツプフロツプ
5のJ端子に入力される。J−Kフリツプフロツ
プ5のK端子には論理“0”が入力されているか
ら、J−Kフリツプフロツプ5のクロツクパルス
信号入力端子CPに被計数クロツクパルス信号1
5の立下がりエツジが与えられるとトリガされて
J−Kフリツプフロツプ5の出力端子Qから出力
される信号19は論理“1”となる。アンド回路
6は被計数クロツクパルス信号15と端子Qから
の信号19との論理積をとるから、アンド回路6
の出力信号20は被計数クロツクパルス信号15
と同じ波形の信号となる。
Next, when the counting permission signal 17 is applied to the 1-bit binary counter 4, the output signal 18 of the 1-bit binary counter 4 becomes logic "1", and this output signal 18 is applied to the J of the J-K flip-flop 5. input to the terminal. Since logic "0" is input to the K terminal of the J-K flip-flop 5, the clock pulse signal 1 to be counted is input to the clock pulse signal input terminal CP of the J-K flip-flop 5.
When the falling edge of 5 is applied, the signal 19 which is triggered and output from the output terminal Q of the JK flip-flop 5 becomes logic "1". Since the AND circuit 6 takes the AND of the counted clock pulse signal 15 and the signal 19 from the terminal Q, the AND circuit 6
The output signal 20 is the counted clock pulse signal 15.
The signal has the same waveform as .

アンド回路6からの出力信号20の立上りエツ
ジ信号が与えられると、Nビツト・バイナリ・カ
ウンタ2はカウントを開始する。同時にDフリツ
プフロツプ7はJ−Kフリツプフロツプ5の出力
信号19とアンド回路6の出力信号20とを受
け、信号20の立上りを検出して立上り信号(論
理“1”)を発生し、以後最終カウント値に相当
する信号20の立上り信号が与えられるまで、N
ビツト・バイナリ・カウンタ2がカウント中であ
ることを単一のビツト情報のカウント状態判別信
号22として出力する。
When the rising edge signal of the output signal 20 from the AND circuit 6 is applied, the N-bit binary counter 2 starts counting. At the same time, the D flip-flop 7 receives the output signal 19 of the J-K flip-flop 5 and the output signal 20 of the AND circuit 6, detects the rising edge of the signal 20, generates a rising signal (logic "1"), and thereafter outputs the final count value. N until a rising edge of signal 20 corresponding to N is given.
The fact that the bit binary counter 2 is counting is outputted as a count state determination signal 22 of single bit information.

Nビツト・バイナリ・カウンタ2はカウントを
継続し、プリセツト値Mの立上りエツジ信号をア
ンド回路6から受取ると立上り(論理“1”とな
る)カウント値がプリセツト値に達したことを桁
上り信号21として出力する。桁上り信号21は
オア回路3へ入力され、1ビツト・バイナリ・カ
ウンタ4の出力信号18は立下がる(論理“0”
となる)。桁上り信号21はJ−Kフリツプフロ
ツプ5のK端子にも入力されているから被計数ク
ロツクパルス信号15の立下りエツジを検出して
立下る信号を出力する。すなわち、論理“0”の
信号を出力する。この信号19はアンド回路6に
与えられ、アンド回路6の出力信号20は論理
“0”となり、Nビツト・バイナリ・カウンタ2
への被計数クロツクパルス15の供給が禁止され
る。これでカウント状態が終了する。再度計数を
実行する場合にはリセツト信号14を与えると、
上述の動作が繰返される。
The N-bit binary counter 2 continues counting, and when it receives the rising edge signal of the preset value M from the AND circuit 6, it rises (becomes logic "1") and outputs a carry signal 21 indicating that the count value has reached the preset value. Output as . The carry signal 21 is input to the OR circuit 3, and the output signal 18 of the 1-bit binary counter 4 falls (logic "0").
). Since the carry signal 21 is also input to the K terminal of the JK flip-flop 5, it detects the falling edge of the counted clock pulse signal 15 and outputs a falling signal. That is, a logic "0" signal is output. This signal 19 is given to the AND circuit 6, and the output signal 20 of the AND circuit 6 becomes logic "0", and the N-bit binary counter 2
The supply of clock pulses 15 to be counted is prohibited. This ends the counting state. When counting is to be performed again, a reset signal 14 is applied.
The above operations are repeated.

以上詳細に説明したように、本発明によれば、
所望個数のクロツクパルスの間隔を設定すること
ができ、設定された個数になるまでクロツクパル
スをカウントしている状態であるかカウントを終
了した状態であるかのカウント状態判別信号を単
一のビツト情報で出力して示すことのできる計数
回路が得られるのでその効果は大きい。
As explained in detail above, according to the present invention,
The interval between the desired number of clock pulses can be set, and a single bit information can be used to determine whether the clock pulses are being counted until the set number is reached or when the counting has ended. The effect is great because a counting circuit that can be output and displayed is obtained.

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

第1図は本発明の一実施例のブロツク図、第2
図は第1図に示す一実施例の各部に現われる信号
の波形図である。 1…ラツチ回路、2…Nビツト・バイナリ・カ
ウンタ、3…オア回路、4…1ビツト・バイナ
リ・カウンタ、5…J−Kフリツプフロツプ、6
…アンド回路、7…Dフリツプフロツプ、11…
プリセツト・カウント・データ、12…ラツチ制
御信号、13…ラツチ・データ出力信号、14…
リセツト信号、15…被計数クロツクパルス信
号、17…計数許可信号、21…桁上り信号、2
2…カウント状態判別信号。
FIG. 1 is a block diagram of one embodiment of the present invention, and FIG.
The figure is a waveform diagram of signals appearing in each part of the embodiment shown in FIG. 1. 1... Latch circuit, 2... N-bit binary counter, 3... OR circuit, 4... 1-bit binary counter, 5... J-K flip-flop, 6
...AND circuit, 7...D flip-flop, 11...
Preset count data, 12...Latch control signal, 13...Latch data output signal, 14...
Reset signal, 15...Clock pulse signal to be counted, 17...Counting permission signal, 21...Carry signal, 2
2...Count state determination signal.

Claims (1)

【特許請求の範囲】[Claims] 1 入力された計数許可信号を保持する保持手段
と、クロツク信号を受け前記保持手段からの計数
許可信号保持出力に応答して前記クロツク信号を
伝達するゲート手段と、前記保持手段からの前記
計数許可信号保持出力を前記ゲート手段の出力に
現われるクロツク信号に同期してラツチするラツ
チ手段と、前記ゲート手段の出力に現われるクロ
ツク信号を計数し所定の計数値となつたことを示
す信号を発生するカウンタと、前記カウンタから
の前記信号に応答して前記保持手段および前記ラ
ツチ手段をリセツト状態にする手段とを備え、前
記ラツチ手段の出力を計数状態判別信号として導
出したことを特徴とする計数回路。
1 holding means for holding the input counting permission signal; gate means for receiving a clock signal and transmitting the clock signal in response to the counting permission signal holding output from the holding means; and the counting permission signal from the holding means. A latch means for latching the signal holding output in synchronization with a clock signal appearing at the output of the gate means, and a counter for counting the clock signal appearing at the output of the gate means and generating a signal indicating that a predetermined count value has been reached. and means for resetting the holding means and the latch means in response to the signal from the counter, the output of the latch means being derived as a counting state determination signal.
JP56139445A 1981-09-04 1981-09-04 Counting circuit Granted JPS5840929A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP56139445A JPS5840929A (en) 1981-09-04 1981-09-04 Counting circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP56139445A JPS5840929A (en) 1981-09-04 1981-09-04 Counting circuit

Publications (2)

Publication Number Publication Date
JPS5840929A JPS5840929A (en) 1983-03-10
JPH0335856B2 true JPH0335856B2 (en) 1991-05-29

Family

ID=15245364

Family Applications (1)

Application Number Title Priority Date Filing Date
JP56139445A Granted JPS5840929A (en) 1981-09-04 1981-09-04 Counting circuit

Country Status (1)

Country Link
JP (1) JPS5840929A (en)

Also Published As

Publication number Publication date
JPS5840929A (en) 1983-03-10

Similar Documents

Publication Publication Date Title
JPS57173230A (en) Phase synchronizing circuit
GB2155737A (en) Data signal reading device
US4160154A (en) High speed multiple event timer
JPH0335856B2 (en)
GB1515740A (en) Zero code suppression in data transmission systems
JP2625249B2 (en) Frame detection circuit
JPS633230Y2 (en)
US4728816A (en) Error and calibration pulse generator
JPH06188872A (en) Synchronization protective circuit
JPS6135368A (en) Frequency discriminating device
JPH0311977Y2 (en)
JPS6347083Y2 (en)
JPS6221069Y2 (en)
JP2984802B2 (en) Input signal abnormality detection circuit
RU1798901C (en) Single-pulse frequency multiplier
SU799120A1 (en) Pulse shaping and delaying device
JPS6233394Y2 (en)
JPS639686B2 (en)
JPH05275994A (en) Pulse width modulating device
SU379975A1 (en) FUNCTIONAL VOLTAGE GENERATOR OF STEPPED FORM
SU1629972A1 (en) Pulse pack former with variable pulse repetition frequency
SU1679626A1 (en) Counting unit
JP2973613B2 (en) Programmable counter
SU1383463A1 (en) Device for forming pulse train
JPH04211814A (en) Microprocessor