JPH05183427A - Counter circuit - Google Patents

Counter circuit

Info

Publication number
JPH05183427A
JPH05183427A JP73692A JP73692A JPH05183427A JP H05183427 A JPH05183427 A JP H05183427A JP 73692 A JP73692 A JP 73692A JP 73692 A JP73692 A JP 73692A JP H05183427 A JPH05183427 A JP H05183427A
Authority
JP
Japan
Prior art keywords
circuit
flip
input
flop
output
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.)
Withdrawn
Application number
JP73692A
Other languages
Japanese (ja)
Inventor
Satoshi Kanazawa
聡 金沢
Shinji Imada
晋司 今田
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.)
Fujitsu Ltd
Original Assignee
Fujitsu 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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP73692A priority Critical patent/JPH05183427A/en
Publication of JPH05183427A publication Critical patent/JPH05183427A/en
Withdrawn legal-status Critical Current

Links

Landscapes

  • Manipulation Of Pulses (AREA)

Abstract

PURPOSE:To reduce the circuit scale with respect to the counter circuit counting up or down the prescribed number for each input of one clock especially. CONSTITUTION:An OR circuit 22 ORs 1st and 2nd enable signals EN1, EN2 to generate a new enable signal. Furthermore, enable signals EN1, EN2 are ANDed by an AND circuit 25 to generate a control signal. A new enable signal is inputted to AND circuits 28, 30, 32 to vary outputs of flip-flops 212-214. Furthermore, the control signal is inputted to an exclusive OR 261 provided to the input side of the flip-flop 211 outputting a bit value Q1 of the least significant digit in 4-bit counts by the control signals Q1-Q4 to fix the bit value Q1. Thus, the count is increased by '2' each by each one clock input.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明はカウンタ回路に係り、特
に1クロック入力毎に所定数カウントアップ又はカウン
トダウンするカウンタ回路に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a counter circuit, and more particularly to a counter circuit which counts up or down by a predetermined number for each clock input.

【0002】カウンタ回路は通常、クロックが1回入力
される毎に1つカウントアップ又はカウントダウンする
が、用途によっては1回のクロック入力に対して2つ又
はそれ以上の所定値ずつカウントアップ又はカウントダ
ウンすることが必要とされる。このような場合には、回
路規模を大きくすることなく、1回のクロック入力毎に
所定値ずつカウントアップ又はカウントダウンするカウ
ンタ回路が必要とされる。
A counter circuit normally counts up or down by one each time a clock is input, but depending on the application, it counts up or down by two or more predetermined values for one clock input. Is required to do. In such a case, a counter circuit that counts up or down by a predetermined value for each clock input is required without increasing the circuit scale.

【0003】[0003]

【従来の技術】図6は従来のカウンタ回路の一例の回路
図を示す。このカウンタ回路は大別してイネーブル信号
EN1が入力される第1のカウンタ1と、イネーブル信
号EN2が入力される第2のカウンタ2と、これら第1
及び第2のカウンタ1及び2の各出力信号が供給される
4ビット全加算器3よりなり、4ビット全加算器3より
1クロック入力毎に1カウントアップ又は2カウントア
ップするカウント値Q1〜Q4を出力する。
2. Description of the Related Art FIG. 6 shows a circuit diagram of an example of a conventional counter circuit. This counter circuit is roughly classified into a first counter 1 to which an enable signal EN1 is input, a second counter 2 to which an enable signal EN2 is input, and a first counter 1 of these.
And 4-bit full adder 3 to which the respective output signals of the second counters 1 and 2 are supplied, and count values Q1 to Q4 which are incremented by 1 or 2 for each clock input from the 4-bit full adder 3. Is output.

【0004】カウンタ1及び2の夫々は同一回路構成で
あり、4個のD型フリップフロップと4個の排他的論理
和回路と4個の2入力AND回路と1個の3入力AND
回路とよりなる。カウンタ1及び2の夫々のD型フリッ
プフロップには図7(A)に示す一定周期のクロックが
入力される。一方、前記イネーブル信号EN1が図7
(B)に、またイネーブル信号EN2が同図(E)に示
す如くに入力されるものとする。
Each of the counters 1 and 2 has the same circuit configuration and has four D-type flip-flops, four exclusive OR circuits, four 2-input AND circuits, and one 3-input AND circuit.
Consisting of a circuit. Clocks having a constant period shown in FIG. 7A are input to the D-type flip-flops of the counters 1 and 2, respectively. On the other hand, the enable signal EN1 shown in FIG.
It is assumed that the enable signal EN2 is input to (B) as shown in FIG.

【0005】この場合、イネーブル信号EN1がハイレ
ベルの期間、カウンタ1より4ビット全加算器3のA1
〜A4の4ビットに入力されるパルスは図7(C)に示
す如くになり、カウンタ1の出力カウント値は同図
(D)に示すごとく1クロック入力毎に“1”ずつカウ
ントアップしていく。
In this case, A1 of the 4-bit full adder 3 from the counter 1 is maintained while the enable signal EN1 is at the high level.
The pulse input to the 4 bits of A4 is as shown in FIG. 7C, and the output count value of the counter 1 is incremented by "1" for each clock input as shown in FIG. 7D. Go

【0006】一方、カウンタ2に入力されるイネーブル
信号EN2がハイレベルの期間、カウンタ2より4ビッ
ト全加算器3のB1〜B4の4ビットに入力されるパル
スは図7(F)に示す如くになり、カウンタ2は1クロ
ック入力される毎に“1”ずつカウントアップし、また
イネーブル信号EN2がローレベルの期間はカウントを
停止するため、カウンタ2の出力カウント値は同図
(G)に示す如くになる。4ビット全加算器3は上記の
入力A1〜A4とB1〜B4とを次表に示す真理値表に
基づいて全加算する。ただし、次表中、A1,B1,A
2,B2とC0の入力条件は、出力Q1,Q2と内部キ
ャリC2の値を決定する。A3,B3,A4,B4とC
2の入力条件は、出力Q3,Q4とキャリ出力C4の値
を決定する。
On the other hand, while the enable signal EN2 input to the counter 2 is at the high level, the pulses input from the counter 2 to the 4 bits of B1 to B4 of the 4-bit full adder 3 are as shown in FIG. 7 (F). The counter 2 counts up by "1" each time one clock is input, and stops counting while the enable signal EN2 is at a low level. Therefore, the output count value of the counter 2 is as shown in FIG. It becomes as shown. The 4-bit full adder 3 fully adds the inputs A1 to A4 and B1 to B4 based on the truth table shown in the following table. However, in the following table, A1, B1, A
The input conditions of 2, B2 and C0 determine the values of the outputs Q1, Q2 and the internal carry C2. A3, B3, A4, B4 and C
The input condition of 2 determines the values of the outputs Q3 and Q4 and the carry output C4.

【0007】[0007]

【表1】 [Table 1]

【0008】これにより、4ビット全加算器3の4ビッ
トの出力Q1,Q2,Q3及びQ4(ただし、Q4が最
上位、Q1が最下位)は図7(H)に示す如くになり、
カウント値が同図(I)に示す如くになる。すなわち、
従来のカウンタ回路は2つのイネーブル信号EN1及び
EB2が共にハイレベルの期間は1クロック入力毎に出
力Q1〜Q4による最終出力カウント値が図7(I)に
示す如く“2”ずつカウントアップし、イネーブル信号
EN1及びEN2の一方のみがハイレベルのときには1
クロック入力毎に出力カウント値が“1”ずつカウント
アップする。
As a result, the 4-bit outputs Q1, Q2, Q3 and Q4 (where Q4 is the highest and Q1 is the lowest) of the 4-bit full adder 3 are as shown in FIG.
The count value becomes as shown in FIG. That is,
In the conventional counter circuit, while the two enable signals EN1 and EB2 are both at the high level, the final output count value by the outputs Q1 to Q4 is incremented by "2" for each clock input, as shown in FIG. 7 (I). 1 if only one of the enable signals EN1 and EN2 is at high level
The output count value is incremented by "1" for each clock input.

【0009】[0009]

【発明が解決しようとする課題】しかるに、従来のカウ
ンタ回路では、2つのイネーブル信号EN1及びEN2
を夫々別個のカウンタ1及び2に別々に供給する必要が
あるため、同じ動作をするカウンタ1及び2が2回路必
要で回路規模が大きくなるという課題がある。
However, in the conventional counter circuit, two enable signals EN1 and EN2 are used.
Need to be separately supplied to the separate counters 1 and 2, respectively, so that there is a problem in that two circuits are required for the counters 1 and 2 that perform the same operation and the circuit scale becomes large.

【0010】本発明は上記の点に鑑みなされたもので、
2つのイネーブル信号から1つのイネーブル信号と制御
信号とを生成することにより、上記の課題を解決したカ
ウンタ回路を提供することを目的とする。
The present invention has been made in view of the above points,
It is an object of the present invention to provide a counter circuit that solves the above problems by generating one enable signal and a control signal from two enable signals.

【0011】[0011]

【課題を解決するための手段】図1は本発明の原理構成
図を示す。本発明は同図に示すように、m個(ただし、
mは2以上の整数)のフリップフロップ111 〜11m
の各々が、入力側に設けられたゲート回路121 〜12
m を介して互いに縦続接続され、m個のフリップフロッ
プ111 〜11m に外部よりクロックを印加して、フリ
ップフロップ111 〜11m からカウンタ値の各ビット
出力Q1〜Qmを取り出す構成のmビットのカウンタ回
路において、保持手段13とイネーブル信号生成回路1
4とを有する構成としたものである。
FIG. 1 is a block diagram showing the principle of the present invention. In the present invention, as shown in FIG.
(m is an integer of 2 or more) 11 1 to 11 m
Each of the gate circuits 12 1 to 12 provided on the input side.
through m connected in cascade to each other, by applying a clock from outside m flip-flops 11 1 to 11 m, the construction taking out each bit output Q1~Qm counter value from the flip-flop 11 1 to 11 m m In the bit counter circuit, holding means 13 and enable signal generation circuit 1
4 is provided.

【0012】ここで、保持手段13はフリップフロップ
111 〜11m のうち最下位よりn番目(ただし、n=
1,2,…,m)の桁のビット値Qnを出力するフリッ
プフロップの出力値を固定保持する。
Here, the holding means 13 is the nth from the least significant among the flip-flops 11 1 to 11 m (where n =
The output value of the flip-flop that outputs the bit value Qn of the digits 1, 2, ..., M) is held fixed.

【0013】イネーブル信号生成回路14はフリップフ
ロップ111 〜11m のうち保持手段13により出力値
が保持されるフリップフロップ以外のフリップフロップ
の入力側のゲート回路にイネーブル信号を供給する。
The enable signal generation circuit 14 supplies the enable signal to the gate circuits on the input side of the flip-flops other than the flip-flop whose output value is held by the holding means 13 among the flip-flops 11 1 to 11 m .

【0014】[0014]

【作用】本発明では保持手段13により最下位よりn番
目の桁のビット値を出力するフリップフロップの出力値
を固定保持するようにしているため、n番目の桁の計数
は禁止されることとなる。従って、本発明では、クロッ
クをカウントアップ又はカウントダウンするに際し、フ
リップフロップ111 〜11m の各出力端子からは1ク
ロック入力毎に2n カウントアップ又はカウントダウン
されるカウント値を示す各ビット出力が取り出される。
According to the present invention, the holding means 13 holds the output value of the flip-flop that outputs the bit value of the nth digit from the lowest, so that the counting of the nth digit is prohibited. Become. Therefore, in the present invention, when the clock is counted up or down, each bit output indicating the count value which is counted up or down by 2 n is input from each output terminal of the flip-flops 11 1 to 11 m. Be done.

【0015】[0015]

【実施例】図2は本発明の第1実施例の回路図を示す。
同図中、D型フリップフロップ211 〜214 の各クロ
ック端子には計数すべきクロックが共通に入力される。
図3(A)はこの外部入力クロックを示し、一定周期の
矩形波である。OR回路22は第1のイネーブル信号E
N1と第2のイネーブル信号EN2との論理和をとっ
て、イネーブル信号を生成する回路で前記イネーブル信
号生成回路14を構成している。
1 is a circuit diagram of a first embodiment of the present invention.
In the figure, clocks to be counted are commonly input to the clock terminals of the D-type flip-flops 21 1 to 21 4 .
FIG. 3A shows this external input clock, which is a rectangular wave with a constant period. The OR circuit 22 receives the first enable signal E
The enable signal generation circuit 14 is configured by a circuit that generates an enable signal by taking the logical sum of N1 and the second enable signal EN2.

【0016】AND回路23は上記の第1及び第2のイ
ネーブル信号EN1及びEN2の論理積をとって制御信
号を生成する回路で、ゲート回路24及びAND回路2
5と共に前記した保持手段13を構成している。D型フ
リップフロップ211 〜21 4 の各Q出力端子は2入力
排他的論理和回路261 〜264 を介して自己のデータ
入力端子に接続されている。
The AND circuit 23 has the above-mentioned first and second inverters.
The control signal is obtained by taking the logical product of the enable signals EN1 and EN2.
Signal generation circuit, which is a gate circuit 24 and an AND circuit 2
5 together with the holding means 13 described above. D type
Lip flop 211~ 21 FourEach Q output terminal has 2 inputs
Exclusive OR circuit 261~ 26FourOwn data through
It is connected to the input terminal.

【0017】D型フリップフロップ211 のQ出力端子
は2入力OR回路27を通して2入力AND回路28の
一方の入力端子に接続されている。D型フリップフロッ
プ212 のQ出力端子は2入力AND回路29の一方の
入力端子に接続される一方、D型フリップフロップ21
3 のQ出力端子及びOR回路27の出力端子と共に3入
力AND回路31の各入力端子に接続されている。
The Q output terminal of the D-type flip-flop 21 1 is connected to one input terminal of the 2-input AND circuit 28 through the 2-input OR circuit 27. The Q output terminal of the D-type flip-flop 21 2 is connected to one input terminal of the 2-input AND circuit 29, while the D-type flip-flop 21 2 is connected.
The three Q output terminals and the output terminal of the OR circuit 27 are connected to each input terminal of the three-input AND circuit 31.

【0018】2入力AND回路32の一方の入力端子に
はAND回路31の出力端子が接続され、AND回路3
2の他方の入力端子にはAND回路28,30と共にO
R回路22の出力端子に接続されている。フリップフロ
ップ211 ,212 ,213 及び214 の各Q出力端子
からカウント値の各ビット出力Q1,Q2,Q3及びQ
4が取り出される。Q1は4ビットカウント値の最下位
桁のビット(LSB)で、以下Q2,Q3,Q4の順で
上位桁となりQ4が最上位桁のビット(MSB)であ
る。
The output terminal of the AND circuit 31 is connected to one input terminal of the 2-input AND circuit 32, and the AND circuit 3
O of the other input terminal of 2 together with AND circuits 28 and 30.
It is connected to the output terminal of the R circuit 22. Each bit output Q1, Q2, Q3 and Q of the count value from each Q output terminal of the flip-flops 21 1 , 21 2 , 21 3 and 21 4.
4 is taken out. Q1 is the least significant bit (LSB) of the 4-bit count value. Below, Q2 is the most significant digit in the order of Q2, Q3 and Q4, and Q4 is the most significant bit (MSB).

【0019】本実施例は前記m=4の例で、4個のフリ
ップフロップ211 〜214 のうち、最下位より1番目
(n=1)の桁のビット値Q1を出力するフリップフロ
ップ211 の出力値が固定保持され、またフリップフロ
ップ211 のQ出力端子が、フリップフロップ212
入力側のOR回路27、AND回路28及び排他的論理
和回路(EX−OR回路)262 よりなるゲート回路の
入力端に接続されたアップカウンタである。
This embodiment is an example of the above-mentioned m = 4, and of the four flip-flops 21 1 to 21 4 , the flip-flop 21 which outputs the bit value Q1 of the first (n = 1) digit from the lowest order. The output value of 1 is held fixed, and the Q output terminal of the flip-flop 21 1 is from the OR circuit 27, the AND circuit 28 and the exclusive OR circuit (EX-OR circuit) 26 2 on the input side of the flip-flop 21 2. Is an up-counter connected to the input terminal of the gate circuit.

【0020】次に本実施例の動作について図3のタイム
チャートを併せ参照して説明する。第1のイネーブル信
号EN1は、ハイレベルの時、通常の1カウントアップ
動作をカウンタ回路にさせるための信号である。第2の
イネーブル信号EN2は第1のイネーブル信号EN1が
入力されているときに、カウンタ回路に2カウントアッ
プか1カウントアップかを選択的に行なわせる信号であ
る。
Next, the operation of this embodiment will be described with reference to the time chart of FIG. The first enable signal EN1 is a signal for causing the counter circuit to perform a normal 1 count-up operation when it is at a high level. The second enable signal EN2 is a signal that causes the counter circuit to selectively perform 2 count up or 1 count up when the first enable signal EN1 is input.

【0021】第1のイネーブル信号EN1及び第2のイ
ネーブル信号EN2は夫々OR回路22に入力されて論
理和をとられ、かつ、AND回路23に入力されて論理
積をとられる。第1のイネーブル信号EN1は図3
(B)に示す如く時刻t1 から時刻t6 までハイレベル
であり、また第2のイネーブル信号EN2が時刻t1
らt2 、t3 からt4 、t5 からt6 の期間の夫々にお
いてのみハイレベルであるものとすると、OR回路22
からは第1のイネーブル信号EN1が取り出されてAN
D回路28,30及び32に夫々供給される。
The first enable signal EN1 and the second enable signal EN2 are input to the OR circuit 22 to be ORed, and to the AND circuit 23 to be ANDed. The first enable signal EN1 is shown in FIG.
As shown in (B), it is at a high level from time t 1 to time t 6 , and the second enable signal EN2 is in each of the periods from time t 1 to t 2 , t 3 to t 4 , and t 5 to t 6 . Assuming that only the high level, the OR circuit 22
The first enable signal EN1 is extracted from
It is supplied to the D circuits 28, 30 and 32, respectively.

【0022】また、AND回路23からは図3(C)に
示す如く、第2のイネーブル信号EN2と同一波形の制
御信号が取り出され、ゲート回路24及びAND回路2
5に夫々供給される。これにより、ゲート回路24から
は第1のイネーブル信号EN1がハイレベルの期間にお
いて、時刻t1 〜t2 ,t3 〜t4 及びt5 〜t6 の各
期間ローレベルで、時刻t2 〜t3 、t4 〜t5 の各期
間ハイレベルのパルスが取り出され、EX−OR回路2
1 に入力される。また、AND回路25からは図3
(C)に示す制御信号と同じ波形の信号が取り出され、
EX−OR回路27に入力される。
As shown in FIG. 3C, a control signal having the same waveform as the second enable signal EN2 is taken out from the AND circuit 23, and the gate circuit 24 and the AND circuit 2 are operated.
5 are supplied respectively. Thus, from the gate circuit 24, during the period when the first enable signal EN1 is at the high level, it is at the low level during each of the times t 1 to t 2 , t 3 to t 4 and t 5 to t 6 , and at the time t 2 to. The high-level pulse is taken out in each period of t 3 , t 4 to t 5 , and the EX-OR circuit 2
It is input to 6 1 . Further, from the AND circuit 25, as shown in FIG.
A signal having the same waveform as the control signal shown in (C) is taken out,
It is input to the EX-OR circuit 27.

【0023】時刻t1 においては、それ以前の初期リセ
ット動作によってD型フリップフロップ211 〜214
の各々がリセットされているため、フリップフロップ2
1 〜214 の各Q出力端子の出力信号Q1〜Q4は夫
々ローレベルである。従って、時刻t1 〜t2 の期間は
EX−OR回路261 の2入力信号はいずれもローレベ
ルだから、EX−OR回路261 よりフリップフロップ
211 のデータ入力端子に印加される信号もローレベル
となる。このため、フリップフロップ211 のQ出力端
子の出力信号Q1は、図3(D)に示す如くクロック
(同図(A))が入力されてもローレベルで変化しない
(ローレベルに保持される)。
At time t 1 , the D-type flip-flops 21 1 to 21 4 are caused by the initial reset operation before that.
Flip-flop 2 because each of
The output signals Q1 to Q4 from the Q output terminals 1 1 to 21 4 are low level, respectively. Therefore, since the two input signals of the EX-OR circuit 26 1 are all at the low level during the period from time t 1 to t 2, the signal applied from the EX-OR circuit 26 1 to the data input terminal of the flip-flop 21 1 is also low. It becomes a level. Therefore, the output signal Q1 at the Q output terminal of the flip-flop 21 1 does not change at a low level (is held at a low level) even if a clock (FIG. 3A) is input as shown in FIG. 3D. ).

【0024】一方、EX−OR回路27には上記の時刻
1 〜t2 の期間はAND回路25よりハイレベル、フ
リップフロップ211 のQ出力端子よりローレベルの信
号が入力されるから、その出力信号はハイレベルとな
り、AND回路28,29を夫々ゲート開状態とする。
従って、OR回路22から取り出された第1のイネーブ
ル信号EN1がAND回路28を通してEX−OR回路
262 の一方の入力端子に入力される。
On the other hand, the EX-OR circuit 27 receives a high-level signal from the AND circuit 25 and a low-level signal from the Q output terminal of the flip-flop 21 1 during the time t 1 to t 2 described above. The output signal becomes high level, and the AND circuits 28 and 29 are opened.
Therefore, the first enable signal EN1 extracted from the OR circuit 22 is input to one input terminal of the EX-OR circuit 26 2 through the AND circuit 28.

【0025】これにより、EX−OR回路262 からは
その他方の入力端子に入力されるフリップフロップ21
2 のQ出力端子からの出力信号Q2 と逆相の信号が取り
出されてフリップフロップ212 のデータ入力端子に印
加されるため、上記の出力信号Q2 は図3(E)に示す
如く、時刻t1 〜t2 の期間内ではクロックの立上りが
入力される毎に反転する。
As a result, the flip-flop 21 input from the EX-OR circuit 26 2 to the other input terminal
Since a signal having a phase opposite to that of the output signal Q 2 from the Q output terminal 2 is taken out and applied to the data input terminal of the flip-flop 21 2 , the output signal Q 2 is as shown in FIG. Within the period from time t 1 to t 2 , it is inverted every time the rising edge of the clock is input.

【0026】上記の時刻t1 〜t2 の期間内では、前述
したようにAND回路29はゲート開状態とされ、また
第1のイネーブル信号EN1によってAND回路30及
び32は夫々ゲート開状態とされているから、上記の出
力信号Q2はAND回路29及び30を夫々通してEX
−OR回路263 の一方の入力端子に印加される。
During the time t 1 to t 2 described above, the AND circuit 29 is in the gate open state as described above, and the AND circuits 30 and 32 are in the gate open state by the first enable signal EN1. Therefore, the above-mentioned output signal Q2 is passed through the AND circuits 29 and 30 respectively and EX
It is applied to one input terminal of the OR circuit 26 3 .

【0027】EX−OR回路263 はフリップフロップ
213 のQ出力端子からの出力信号Q3 と上記出力信号
2 との排他的論理和をとって得られた信号をフリップ
フロップ213 のデータ入力端子に印加する。これによ
り、フリップフロップ213 の出力信号Q3は図3
(F)に示す如く、出力信号Q2を1/2分周した波形
となる。
The EX-OR circuit 26 3 outputs the signal obtained by the exclusive OR of the output signal Q 3 from the Q output terminal of the flip-flop 21 3 and the output signal Q 2 to the data of the flip-flop 21 3 . Apply to the input terminal. As a result, the output signal Q3 of the flip-flop 21 3 is
As shown in (F), the output signal Q2 has a waveform divided by 1/2.

【0028】AND回路31は時刻t1 〜t2 の期間内
ではEX−OR回路27の出力信号がハイレベルである
から、出力信号Q2及びQ3の論理積をとった信号を出
力する。このAND回路31の出力信号はゲート開状態
とされているAND回路32を通してEX−OR回路2
4 に供給され、ここでフリップフロップ214 のQ出
力端子からの出力信号Q4と排他的論理和をとられた
後、フリップフロップ214 のデータ入力端子に印加さ
れる。
Since the output signal of the EX-OR circuit 27 is at a high level during the period from time t 1 to t 2 , the AND circuit 31 outputs a signal which is the logical product of the output signals Q2 and Q3. The output signal of the AND circuit 31 is passed through the AND circuit 32 whose gate is in an open state to the EX-OR circuit 2
Is supplied to 6 4, wherein after being XORed with the output signal Q4 from the Q output terminal of flip-flop 21 4, applied to the data input terminal of the flip-flop 21 4.

【0029】これにより、フリップフロップ214 の出
力信号Q4は図3(G)に示す如く、出力信号Q3を1
/2分周した波形となる。出力信号Q1〜Q4は夫々4
ビットのカウンタ値の各ビット値を示す。この出力信号
Q1〜A4で表わされる4ビットのカウンタ値は10進
数で表わすと図3(H)に示す如くになり,時刻t1
後のクロック入力時点から時刻t2 直後のクロック入力
時点までの期間では、初期値が“2”で、1クロック入
力毎に値が“2”ずつカウントアップする。
As a result, the output signal Q4 of the flip-flop 21 4 changes to the output signal Q3 of 1 as shown in FIG.
The waveform is divided by two. Output signals Q1 to Q4 are 4 respectively
Each bit value of the bit counter value is shown. The 4-bit counter value represented by the output signals Q1 to A4 is represented by a decimal number as shown in FIG. 3 (H), and is from the clock input time immediately after time t 1 to the clock input time immediately after time t 2 . In the period, the initial value is "2" and the value is incremented by "2" for each clock input.

【0030】続いて、時刻t2 からt3 までの図3
(C)に示す如く制御信号がローレベルの期間では、ゲ
ート回路24からはハイレベルの信号が取り出されてE
X−OR回路261 の出力信号をハイレベルとする。ま
た、これと同時にAND回路25からローレベルの信号
が取り出されてEX−OR回路27の出力信号をローレ
ベルとする。
[0030] Subsequently, as shown in FIG. 3 from the time t 2 to t 3
As shown in (C), when the control signal is at a low level, a high level signal is taken out from the gate circuit 24 and E
The output signal of the X-OR circuit 26 1 is set to high level. At the same time, a low level signal is taken out from the AND circuit 25 and the output signal of the EX-OR circuit 27 is set to low level.

【0031】これにより、時刻t2 直後のクロックの立
上り時点でフリップフロップ211 の出力信号Q1が図
3(D)に示す如くハイレベルとなる。また、EX−O
R回路27の出力信号がローレベルとなり、AND回路
28の出力信号もローレベルとなるため、EX−OR回
路262 の出力信号はその時点でフリップフロップ21
2 の出力信号Q2がローレベルのときにはローレベルと
なる。このため、時刻t2 直後のクロックの立上り時点
でフリップフロップ212 の出力信号Q2は引続きロー
レベルとされる。
As a result, the output signal Q1 of the flip-flop 21 1 becomes high level as shown in FIG. 3D at the rising edge of the clock immediately after time t 2 . In addition, EX-O
The output signal of the R circuit 27 becomes low level, the output signal of the AND circuit 28 also becomes low level, EX-OR circuit 26 and second output signal the flip-flop 21 at the time
When the output signal Q2 of 2 is low level, it becomes low level. Therefore, the output signal Q2 of the flip-flop 21 2 is continuously set to the low level at the rising edge of the clock immediately after the time t 2 .

【0032】また、フリップフロップ213 及び214
の各出力信号Q3及びQ4は図3(F),(G)に示す
如く夫々ハイレベルとされる。前記出力信号Q1がハイ
レベルになると、EX−OR回路261 の出力信号がロ
ーレベルになるため、次のクロック入力立上り時点でフ
リップフロップ211 の出力信号Q1がローレベルにな
る。また、出力信号Q1がハイレベルのときにはAND
回路28の出力信号もハイレベルとなり、このとき出力
信号Q2がローレベルのときにはEX−OR回路262
からハイレベルの信号がフリップフロップ212 のデー
タ入力端子に印加される。
Also, the flip-flops 21 3 and 21 4
The respective output signals Q3 and Q4 are set to the high level as shown in FIGS. When the output signal Q1 goes high, the output signal of the EX-OR circuit 26 1 goes low, so that the output signal Q1 of the flip-flop 21 1 goes low at the next rising edge of the clock input. When the output signal Q1 is at high level, AND
The output signal of the circuit 28 also becomes high level. At this time, when the output signal Q2 is low level, the EX-OR circuit 26 2
Is applied to the data input terminal of the flip-flop 21 2 .

【0033】これにより、フリップフロップ212 のQ
出力端子からは時刻t2 の後2番目に入力されるクロッ
クの立上り時点で今度は図3(E)に示す如くハイレベ
ルとなる。一方、出力信号Q3及びQ4は引き続きハイ
レベルとされる。従って、4ビットのカウント値は図3
(H)に示す如く、時刻t2 からt3 までの制御信号ロ
ーレベル期間は、フリップフロップ211 の出力保持状
態が解除されてフリップフロップ211 の出力信号Q1
はクロック入力毎に反転するために、“1”ずつカウン
トアップする。
As a result, the Q of the flip-flop 21 2 is
At the rising edge of the second clock input from the output terminal after the time t 2 , this time it becomes high level as shown in FIG. 3 (E). On the other hand, the output signals Q3 and Q4 are continuously set to the high level. Therefore, the 4-bit count value is shown in FIG.
As shown in (H), the control signal low-level period from time t 2 to t 3, the flip-flop 21 1 Output holding state of being released flip-flop 21 1 of the output signal Q1
Inverts every clock input, and therefore counts up by "1".

【0034】以下、上記と同様にして、時刻t3 〜t4
の制御信号ハイレベル期間は図3(H)に示す如く時刻
3 直後から時刻t4 直後のクロック入力毎に“2”ず
つカウントアップするカウント値が得られ、時刻t4
5 の制御信号ローレベル期間は時刻t4 直後時刻t5
直後のクロック入力毎に“1”ずつカウントアップする
カウント値が得られる。
Thereafter, similarly to the above, the times t 3 to t 4 are reached.
Control signal high-level period of "2" by the count value that counts up to the time t 3 for each of the clock input time t 4 after immediately after as shown in FIG. 3 (H) is obtained, the time t 4 ~
control signal low-level period is a time of t 5 t 4 after time t 5
A count value that increments by "1" is obtained for each subsequent clock input.

【0035】本実施例では、このように2つのイネーブ
ル信号EN1及びEN2から生成した制御信号の論理値
に応じて“1”又は“2”ずつカウントアップする4ビ
ットカウンタ回路であって、図6に示した従来回路に比
較して1/2倍の規模で回路を構成することができる。
In the present embodiment, the 4-bit counter circuit which counts up by "1" or "2" according to the logical value of the control signal generated from the two enable signals EN1 and EN2 in this way is shown in FIG. It is possible to configure the circuit on a scale half that of the conventional circuit shown in FIG.

【0036】図4は本発明の第2実施例の回路図を示
す。同図中、図2と同一回路構成部分には同一符号を付
し、その説明を省略する。図4において、D型フリップ
フロップ211 は、そのXQ出力端子がD型フリップフ
ロップ212 の入力側のEX−OR回路262 、AND
回路42と共に入力側ゲート回路を構成している2入力
OR回路41の入力端に接続されている。
FIG. 4 shows a circuit diagram of the second embodiment of the present invention. In the figure, the same circuit components as those in FIG. 2 are designated by the same reference numerals, and the description thereof will be omitted. In FIG. 4, D-type flip-flop 21 1, its XQ output terminal of the input side of the D-type flip-flop 21 2 EX-OR circuit 26 2, the AND
It is connected to the input end of a 2-input OR circuit 41 that constitutes an input side gate circuit together with the circuit 42.

【0037】OR回路41は他方の入力端子がAND回
路25の出力端子に接続され、出力端子がAND回路4
2の一方の入力端子に接続されている。
The other input terminal of the OR circuit 41 is connected to the output terminal of the AND circuit 25, and the output terminal thereof is the AND circuit 4
2 is connected to one of the input terminals.

【0038】フリップフロップ212 のXQ出力端子は
2入力AND回路43の一方の入力端子に接続される一
方、フリップフロップ213 のXQ出力端子及びフリッ
プフロップ211 のXQ出力端子と共に3入力AND回
路45の入力端子に夫々接続されている。
The XQ output terminal of the flip-flop 21 2 is connected to one input terminal of the 2-input AND circuit 43, while the XQ output terminal of the flip-flop 21 3 and the XQ output terminal of the flip-flop 21 1 are connected to the 3-input AND circuit. 45 input terminals are respectively connected.

【0039】2入力AND回路44,46は夫々OR回
路22の出力端子が一方の入力端子に接続され、他方の
入力端子にはAND回路43,45の出力端子が接続さ
れ、更に各出力端子はEX−OR回路263 ,264
介してフリップフロップ21 3 ,214 のデータ入力端
子に接続されている。フリップフロップ211 〜21 4
のQ出力端子からは4ビットカウント値の各ビット値Q
1〜Q4が取り出される。
The 2-input AND circuits 44 and 46 are OR times, respectively.
The output terminal of path 22 is connected to one input terminal and the other
The output terminals of the AND circuits 43 and 45 are connected to the input terminals.
Further, each output terminal has an EX-OR circuit 26.3, 26FourTo
Through the flip-flop 21 3, 21FourData input end
Connected to the child. Flip-flop 211~ 21 Four
From the Q output terminal of each bit value Q of the 4-bit count value
1 to Q4 are taken out.

【0040】次に本実施例の動作について図5を併せ参
照して説明する。図5(B)に示す如く時刻t11から時
刻t16までの期間、第1のイネーブル信号EN1がハイ
レベルで、第2のイネーブル信号EN2は時刻t11〜t
12,t13〜t14,t15〜t16の各期間で夫々ハイレベ
ル、それ以外の期間でローレベルであるものとする。す
ると、AND回路23からは図3(C)に示す如く、時
刻t11〜t16の期間内で第2のイネーブル信号EN2と
同一波形の制御信号が取り出される。
Next, the operation of this embodiment will be described with reference to FIG. As shown in FIG. 5B, during the period from time t 11 to time t 16 , the first enable signal EN1 is at high level and the second enable signal EN2 is at time t 11 to t 16.
It is assumed that each of the periods t 12 , t 13 to t 14 , and t 15 to t 16 is at the high level, and the other periods are at the low level. Then, the AND circuit 23 as shown in FIG. 3 (C), the control signal of the second enable signal EN2 and the same waveform is taken out over a period of time t 11 ~t 16.

【0041】図5(A)に示す一定周期のクロックがク
ロック入力端子に印加されるD型フリップフロップ21
1 〜214 の各々は、時刻t11以前にリセットされてい
るため、時刻t11では各Q出力端子の出力信号Q1〜Q
4は図5(D),(F),(G),(H)に示す如くロ
ーレベルであり、フリップフロップ211 のXQ出力端
子からの信号は同図(E)に示す如くハイレベルであ
る。
A D-type flip-flop 21 shown in FIG. 5A, to which a clock having a constant cycle is applied to a clock input terminal.
1 to 21 4 each, because they are reset at time t 11 before the output signals of the at time t 11 Q output terminal Q1~Q
4 is at a low level as shown in FIGS. 5 (D), (F), (G), and (H), and the signal from the XQ output terminal of the flip-flop 21 1 is at a high level as shown in FIG. 5 (E). is there.

【0042】また、時刻t11〜t12の期間はEX−OR
回路261 の出力信号がローレベルであるため、フリッ
プフロップ261 のQ,XQの各出力端子はクロックが
入力されても変化せず固定保持される。従って、この時
刻t11〜t12の期間内ではOR回路41にはフリップフ
ロップ211 のXQ出力端子からハイレベルの信号(図
5(E))とAND回路25からハイレベルの信号とが
夫々継続的に出力されるため、OR回路41の出力信号
はハイレベルとなり、AND回路42を通してEX−O
R回路262 の一方の入力端子に印加される。
Further, during the period from time t 11 to t 12 , EX-OR
Since the output signal of the circuit 26 1 is low level, the output terminals of Q and XQ of the flip-flop 26 1 do not change even when a clock is input and are fixedly held. Therefore, during the period from time t 11 to t 12 , the OR circuit 41 receives the high-level signal from the XQ output terminal of the flip-flop 21 1 (FIG. 5E) and the high-level signal from the AND circuit 25, respectively. Since it is continuously output, the output signal of the OR circuit 41 becomes high level, and the EX-O signal is output through the AND circuit 42.
It is applied to one input terminal of the R circuit 26 2 .

【0043】これにより、EX−OR回路262 の出力
信号は時刻t11からハイレベルとなり、時刻t11の直後
に入力されるクロックパルスによりフリップフロップ2
2 のQ出力端子の出力信号Q2はハイレベルへ変化
し、それに伴ってEX−OR回路262 の出力はローレ
ベルへ変化する。従って、時刻t11の直後のクロックパ
ルス入力時点から時刻t12直後のクロックパルス入力時
点までの期間内では、クロックパルスが入力される毎に
フリップフロップ212 の出力信号Q2が図5(F)に
示す如く反転する。
[0043] Thus, the output signal of the EX-OR circuit 26 2 is comprised of the time t 11 to the high level, the flip-flop 2 by an input clock pulse immediately after time t 11
The output signal Q2 from the Q output terminal of 1 2 changes to high level, and the output of the EX-OR circuit 26 2 changes to low level accordingly. Therefore, during the period from the clock pulse input time immediately after time t 11 to the clock pulse input time immediately after time t 12 , the output signal Q2 of the flip-flop 21 2 is changed to the output signal Q2 of FIG. Reverse as shown in.

【0044】一方、時刻t11でEX−OR回路263
264 の各出力信号がハイレベルに変化するため、フリ
ップフロップ213 及び214 の各Q出力端子からは図
5(G)及び(H)に示す如く時刻t11直後のクロック
パルス入力時点でハイレベルとなる出力信号Q3及びQ
4が取り出される。このようにして、上記の期間内では
出力信号Q1はローレベルに固定保持される一方、出力
信号Q2,Q3及びQ4が夫々クロック入力毎に図5
(F),(G)及び(H)に示す如く変化するため、4
ビットカウント値は同図(I)に示す如く、初期値が
“14“で以後クロック入力毎に“2”ずつカウントダ
ウンしていき“4”までカウントダウンする値が得られ
る。
On the other hand, at time t 11 , the EX-OR circuit 26 3 ,
Since each output signal of 26 4 changes to the high level, the Q output terminals of the flip-flops 21 3 and 21 4 are input from the Q output terminals at the clock pulse input point immediately after time t 11 as shown in FIGS. High-level output signals Q3 and Q
4 is taken out. In this way, the output signal Q1 is fixedly held at the low level within the above-mentioned period, while the output signals Q2, Q3 and Q4 are respectively inputted at each clock input.
Since it changes as shown in (F), (G) and (H), 4
As shown in FIG. 3I, the bit count value has an initial value of "14", and thereafter, the value is counted down by "2" at each clock input, and the value is counted down to "4".

【0045】続く時刻t12からt13までの制御信号ロー
レベル期間は前記第1実施例と同様に最下位ビットの信
号Q1を出力するフリップフロップ211 のQ出力端子
から図5(D)に示す如くクロックパルスの立上り入力
毎に反転する信号が取り出される。また、出力信号Q2
〜Q4は図5(F)〜(H)に示す如く変化するため、
カウント値は同図(I)に示す如く“3”,“2”と変
化する。
During the subsequent control signal low level period from time t 12 to time t 13 , the Q output terminal of the flip-flop 21 1 for outputting the signal Q1 of the least significant bit is changed to the state shown in FIG. 5D as in the first embodiment. As shown, a signal that is inverted at each rising input of the clock pulse is taken out. Also, the output signal Q2
Since ~ Q4 changes as shown in Figs. 5 (F) to (H),
The count value changes to "3" and "2" as shown in FIG.

【0046】続く時刻t13からt14までの制御信号ハイ
レベル期間は時刻t11からt12までと同様にクロック入
力毎に“2”ずつカウントダウンする(ただし、“0”
の次は“14”)。更に時刻t14から時刻t15までの制
御信号ローレベル期間は、期間t12からt13までと同様
に、図5(I)に示す如くカウント値はクロック入力毎
に“1”ずつカウントダウンする。
During the subsequent control signal high level period from time t 13 to t 14 , the clock signal is counted down by "2" for each clock input (however, "0") as at time t 11 to t 12.
Next is "14"). Furthermore, the control signal low-level period from the time t 14 to time t 15, similarly to the period t 12 to t 13, the count value as shown in FIG. 5 (I) counts down by "1" every clock input.

【0047】このように、本実施例によれば、2つのイ
ネーブル信号EN1及びEN2から生成した制御信号
(図5(C))の論理値に応じて“1”又は“2”ずつ
カウントダウンするカウントダウン回路を、従来に比較
して1/2倍の規模で実現することができる。
As described above, according to the present embodiment, the countdown for counting down by "1" or "2" according to the logical value of the control signal (FIG. 5C) generated from the two enable signals EN1 and EN2. The circuit can be realized on a scale half that of the conventional one.

【0048】なお、本発明は以上の実施例に限定される
ものではなく、最下位よりn番目の桁のビット値を出力
するフリップフロップの出力を固定保持することによ
り、クロック入力毎に2n ずつカウントアップ又はカウ
ントダウンする回路を実現できる。
The present invention is not limited to the above embodiment, but the output of the flip-flop that outputs the bit value of the nth digit from the least significant is fixedly held, and 2 n is input for each clock input. It is possible to realize a circuit that counts up or counts down by one.

【0049】[0049]

【発明の効果】上述の如く、本発明によれば、2つのイ
ネーブル信号から一つのイネーブル信号と一つの制御信
号を生成し、制御信号により最下位よりn番目の桁のビ
ット値を出力するフリップフロップの出力値を固定保持
するようにしたため、従来に比べて約半分の回路規模で
カウント値が1クロック入力毎に2n ずつ変化するカウ
ンタ回路を構成することができ、またカウント値の変化
単位を2n 及び“1”のいずれか一方に容易に変更でき
る等の特長を有するものである。
As described above, according to the present invention, a flip-flop that generates one enable signal and one control signal from two enable signals and outputs the bit value of the nth digit from the lowest order by the control signal. Since the output value of the counter is held fixed, it is possible to configure a counter circuit in which the count value changes by 2 n for each clock input with about half the circuit scale of the conventional one, and the unit for changing the count value Is easily changed to either 2 n or "1".

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

【図1】本発明の原理構成図である。FIG. 1 is a principle configuration diagram of the present invention.

【図2】本発明の第1実施例の回路図である。FIG. 2 is a circuit diagram of a first embodiment of the present invention.

【図3】図2の動作説明用タイムチャートである。FIG. 3 is a time chart for explaining the operation of FIG.

【図4】本発明の第2実施例の回路図である。FIG. 4 is a circuit diagram of a second embodiment of the present invention.

【図5】図4の動作説明用タイムチャートである。5 is a time chart for explaining the operation of FIG.

【図6】従来の一例の回路図である。FIG. 6 is a circuit diagram of a conventional example.

【図7】図6の各部のタイムチャートである。FIG. 7 is a time chart of each part of FIG.

【符号の説明】[Explanation of symbols]

111 〜11m フリップフロップ 121 〜12m ゲート回路 13 保持手段 14 イネーブル信号生成回路 211 〜214 D型フリップフロップ11 1 to 11 m flip-flop 12 1 to 12 m gate circuit 13 holding means 14 enable signal generation circuit 21 1 to 21 4 D-type flip-flop

Claims (3)

【特許請求の範囲】[Claims] 【請求項1】 m個(ただし、mは2以上の整数)のフ
リップフロップ(111 〜11m )の各々が、入力側に
設けられたゲート回路(121 〜12m )を介して互い
に縦続接続され、該m個のフリップフロップ(111
11m )に外部よりクロックを印加して、該m個のフリ
ップフロップ(111 〜11m )からカウント値の各ビ
ット出力を取り出す構成のmビットのカウンタ回路にお
いて、 前記m個のフリップフロップ(111 〜11m )のうち
最下位よりn番目(但し、n=1,2,…,m)の桁の
ビット値を出力するフリップフロップの出力値を固定保
持する保持手段(13)と、 該m個のフリップフロップ(111 〜11m )のうち該
保持手段(13)により出力値が保持されるフリップフ
ロップ以外のフリップフロップの入力側のゲート回路に
イネーブル信号を供給するイネーブル信号生成回路(1
4)とを有することを特徴とするカウンタ回路。
1. Each of m (where m is an integer of 2 or more) flip-flops (11 1 to 11 m ) is mutually connected via a gate circuit (12 1 to 12 m ) provided on the input side. The m flip-flops (11 1 to
11 m ), an m-bit counter circuit configured to take out each bit output of the count value from the m flip-flops (11 1 to 11 m ) by externally applying a clock, Holding means (13) for fixedly holding the output value of the flip-flop that outputs the bit value of the n-th (n = 1, 2, ..., M) digit from the lowest of 11 1 to 11 m ); An enable signal generation circuit that supplies an enable signal to a gate circuit on the input side of a flip-flop other than the flip-flop whose output value is held by the holding means (13) among the m flip-flops (11 1 to 11 m ). (1
4) and a counter circuit.
【請求項2】 前記m個のフリップフロップ(111
11m )はD型フリップフロップ(211 〜214 )で
あり、1クロック入力毎に“1”又は”2”ずつカウン
トアップするアップカウンタを構成することを特徴とす
る請求項1記載のカウンタ回路。
2. The m flip-flops (11 1 to
11. A counter according to claim 1, wherein 11 m ) is a D-type flip-flop (21 1 to 21 4 ), which constitutes an up-counter which counts up by "1" or "2" for each clock input. circuit.
【請求項3】 前記m個のフリップフロップ(111
11m )はD型フリップフロップ(211 〜214 )で
あり、1クロック入力毎に“1”又は“2”ずつカウン
トダウンするダウンカウンタを構成することを特徴とす
る請求項1記載のカウンタ回路。
3. The m flip-flops (11 1 to
11. A counter circuit according to claim 1, wherein 11 m ) is a D-type flip-flop (21 1 to 21 4 ), which constitutes a down counter which counts down by "1" or "2" for each clock input. ..
JP73692A 1992-01-07 1992-01-07 Counter circuit Withdrawn JPH05183427A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP73692A JPH05183427A (en) 1992-01-07 1992-01-07 Counter circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP73692A JPH05183427A (en) 1992-01-07 1992-01-07 Counter circuit

Publications (1)

Publication Number Publication Date
JPH05183427A true JPH05183427A (en) 1993-07-23

Family

ID=11482010

Family Applications (1)

Application Number Title Priority Date Filing Date
JP73692A Withdrawn JPH05183427A (en) 1992-01-07 1992-01-07 Counter circuit

Country Status (1)

Country Link
JP (1) JPH05183427A (en)

Similar Documents

Publication Publication Date Title
JPH04336308A (en) Single-chip microcomputer
US4241408A (en) High resolution fractional divider
JPH1198007A (en) Frequency divider
JPH05183427A (en) Counter circuit
JPH04239819A (en) Synchronous counter
JP2757714B2 (en) Frame pulse generation circuit
JPS63227119A (en) Digital variable frequency dividing circuit
JP2530663B2 (en) Divider circuit
JP2689539B2 (en) Divider
KR0153112B1 (en) Counter enable to program
JP2794950B2 (en) Integrator circuit
JPH03171820A (en) 2n-1 frequency dividing circuit
JP2719071B2 (en) Timing control signal generation circuit
JPH0683066B2 (en) Counter circuit
JPH0237822A (en) Frequency dividing circuit
JPH06224748A (en) Variable frequency divider circuit
JP2570562Y2 (en) Synchronous counter
JPH0529924A (en) 1/9 frequency divider circuit
JP2692976B2 (en) Synchronous counter
JPH02113619A (en) Pulse generating circuit
JPH06310996A (en) Sequence signal generating circuit
JPH05108199A (en) Timer circuit
JPH0220175B2 (en)
JPS61109316A (en) Pattern generating circuit
JPH01126821A (en) Digital type triangle wave generating circuit

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 19990408