[go: up one dir, main page]

JP2003069419A - Counter circuit - Google Patents

Counter circuit

Info

Publication number
JP2003069419A
JP2003069419A JP2001259560A JP2001259560A JP2003069419A JP 2003069419 A JP2003069419 A JP 2003069419A JP 2001259560 A JP2001259560 A JP 2001259560A JP 2001259560 A JP2001259560 A JP 2001259560A JP 2003069419 A JP2003069419 A JP 2003069419A
Authority
JP
Japan
Prior art keywords
circuit
signal
counter
input
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.)
Pending
Application number
JP2001259560A
Other languages
Japanese (ja)
Inventor
Kazuoki Usami
一起 宇佐美
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.)
Oki Electric Industry Co Ltd
Original Assignee
Oki Electric Industry 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 Oki Electric Industry Co Ltd filed Critical Oki Electric Industry Co Ltd
Priority to JP2001259560A priority Critical patent/JP2003069419A/en
Publication of JP2003069419A publication Critical patent/JP2003069419A/en
Pending legal-status Critical Current

Links

Landscapes

  • Electronic Switches (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide a counter circuit that can revise a count for carrying with a simple configuration and count a plurality of kinds of cardinal numbers. SOLUTION: A counter 10 comprises carrying circuits 141 to 14j-1 including JKFF circuits 121 to 12k and a 2-input AND circuit. A signal '1' is given to input terminals Jx , Kx of each JKFF circuit 12x and a clock signal CLK is given to a clock input terminal CP1 of the JKFF circuit 121 . An output terminal Qx of the JKFF circuit 12x is connected to a clock input terminal CPx+1 of the JKFF circuit 12x+1 of the next stage. The output value of each output terminal Qx is each bit signal qx of the count. When a control signal is at '1' and the count is '10' in decimal notation, since the counter 10 outputs a clear signal, the signal is carried over and the counter 10 acts like a decimal counter. When the control signal is at '0', no carry over is conducted and the counter 10 acts like a hexadecimal counter.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、カウンタ回路に係
り、より詳しくは、パルス信号をカウントするカウンタ
回路に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a counter circuit, and more particularly to a counter circuit that counts pulse signals.

【0002】[0002]

【従来の技術】従来、LSI等に含まれるパルス信号の
パルス数をカウントするカウンタ回路は、通常フリップ
フロップ(FF)回路を複数個用いて構成され、1桁を
表すのに必要なFF回路の段数N(Nは整数)に応じて
N進カウンタとして動作する。例えば、16(24)進
数カウンタの場合には、1桁あたり4段のFF回路をカ
スケード接続した構成となり、j(jは整数)桁のカウ
ントを行う場合には、4×j個のFF回路をカスケード
接続した構成となる。
2. Description of the Related Art Conventionally, a counter circuit that counts the number of pulses of a pulse signal included in an LSI or the like is usually formed by using a plurality of flip-flop (FF) circuits, and is a FF circuit required to represent one digit. It operates as a 2 N- ary counter according to the number of stages N (N is an integer). For example, in the case of a 16 (2 4 ) base number counter, it is configured such that four stages of FF circuits are cascaded for each digit, and when counting j (j is an integer) digits, 4 × j FFs are used. The circuit is cascade-connected.

【0003】一方、10進数カウンタのように、基数が
Nでない場合には、1桁当たり4段のFF回路にさら
に桁上げ回路を設け、10個目のパルスが入力される毎
に、桁上げ回路により次段(次桁)のカウンタの先頭の
FF回路に桁上げしていた。
On the other hand, when the radix is not 2 N like a decimal number counter, a carry circuit is further provided in the four-stage FF circuit per digit, and a digit is added every time the tenth pulse is input. The carry circuit carried the carry to the leading FF circuit of the counter at the next stage (next digit).

【0004】このような10進カウンタを図8に示す。
図8に示すように、カウンタ回路100は、k(=4×
j)個のJKフリップフロップ(JKFF)回路121
〜12kと、桁上げ回路141〜14j-1とで構成されて
いる。桁上げ回路14は、2入力のAND(論理積)回
路で構成されている。
FIG. 8 shows such a decimal counter.
As shown in FIG. 8, the counter circuit 100 has k (= 4 ×
j) JK flip-flop (JKFF) circuits 12 1
.About.12 k and carry circuits 14 1 to 14 j-1 . The carry circuit 14 is composed of a two-input AND (logical product) circuit.

【0005】各JKFF回路12xの入力端子Jx及び入
力端子Kx(x:1〜k)には、所定電圧Vcc(ハイ
レベル:「1」)が入力され、JKFF回路121のク
ロック入力端子CP1にクロック信号CLKが入力され
る。JKFF回路12xの出力端子Qxは、次段のJKF
F回路12x+1のパルス入力端としてのクロック入力端
子CPx+1に接続されている。そして、各出力端子Qx
出力値が、カウント値の各ビット信号qxとなる。すな
わち、カウント値は、q1を最下位ビットLSB(Least
Significant Bit)、qkを最上位ビットMSB(Most
Significant Bit)として、2進数でqkk-1…q21
で表される。
A predetermined voltage Vcc (high level: "1") is input to the input terminal J x and the input terminal K x (x: 1 to k) of each JKFF circuit 12 x , and the JKFF circuit 12 1 receives the clock input. The clock signal CLK is input to the terminal CP 1 . The output terminal Q x of the JKFF circuit 12 x is the JKF of the next stage.
It is connected to a clock input terminal CP x + 1 as a pulse input terminal of the F circuit 12 x + 1 . Then, the output value of each output terminal Q x becomes each bit signal q x of the count value. That is, the count value is q 1 with the least significant bit LSB (Least
Significant Bit), q k is the most significant bit MSB (Most
Significant Bit) as a binary number q k q k-1 ... q 2 q 1
It is represented by.

【0006】JKFF回路124m+1〜124m+4(m=
0、1、2、…j−1)のクリア信号入力端としてのク
リア端子Cには、桁上げ回路14m+1の出力端子が接続
されている。JKFF回路124m+2の出力端子Q
4m+2は、桁上げ回路14m+1の一方の入力端子に接続さ
れており、JKFF回路124m+4の出力端子Q4m+4は、
桁上げ回路14m+1の他方の入力端子に接続されてい
る。
JKFF circuit 12 4m + 1 to 12 4m + 4 (m =
The output terminal of the carry circuit 14 m + 1 is connected to the clear terminal C as a clear signal input terminal of 0, 1, 2, ... J-1). Output terminal Q of JKFF circuit 12 4m + 2
4m + 2 is connected to one input terminal of the carry circuit 14 m + 1, the output terminal Q 4m + 4 of JKFF circuit 12 4m + 4 is
It is connected to the other input terminal of the carry circuit 14 m + 1 .

【0007】図8に示したJKFF回路は、入力端子
J,Kが共に「1」の場合には、クロック入力端子CP
に入力されるクロック信号CLKの立下りで出力端子Q
の出力が反転し、クリア端子Cに入力されるクリア信号
の立下りで出力端子Wの出力がクリアされる(「0」に
なる)順序回路である。
The JKFF circuit shown in FIG. 8 has a clock input terminal CP when the input terminals J and K are both "1".
At the falling edge of the clock signal CLK input to the output terminal Q
Is an inverted circuit, and the output of the output terminal W is cleared (becomes "0") at the falling edge of the clear signal input to the clear terminal C.

【0008】従って、クロック信号CLKの立下りでJ
KFF回路121の出力端子Q1からの出力信号が反転
し、出力端子Q1からの出力信号の立下りで出力端子Q2
からの出力信号が反転し、以下同様の動作が繰り返され
ることによりパルス数がカウントアップされていく。そ
して、10個目のパルスが入力されカウント値が10進
数で「10」になった場合、すなわち2進数で「101
0」になった場合には、出力端子Q2、Q4の出力信号が
共に「1」になり、桁上げ回路141の出力が「1」に
なって出力端子Q1〜Q4からの出力信号リセットされて
「0」になると共に、JKFF回路125の出力端子Q5
の出力信号が「1」になり、次桁へ桁上げされる。
Therefore, at the falling edge of the clock signal CLK, J
Output signal is inverted from the output terminal to Q 1 KFF circuit 12 1, the output at the falling edge of the output signal from the output terminal Q 1 terminal Q 2
The output signal from is inverted, and the same operation is repeated thereafter, so that the number of pulses is incremented. Then, when the tenth pulse is input and the count value becomes “10” in decimal, that is, “101” in binary.
If it becomes 0 ", the output signal of the output terminal Q 2, Q 4 become both" 1 ", the output of the carry circuit 14 1 is" 1 "since it from the output terminal Q 1 to Q 4 is the output signal reset with becomes "0", the output terminal Q 5 of JKFF circuit 12 5
The output signal of becomes "1" and is carried to the next digit.

【0009】[0009]

【発明が解決しようとする課題】しかしながら、上記の
ようなカウンタ回路では、桁上げを行うカウント値を変
更することができないため、基数が固定されてしまい、
他の基数のカウントを行いたい場合には余分にカウンタ
を設けなければならず、柔軟性に欠ける。また、スイッ
チ回路を設けて基数が2Nのカウンタと基数が2Nでない
カウンタを切り換える構成のカウンタもあるが、回路規
模が大きくなり、さらに、基数が2Nでないカウンタ同
士を切り換えるのは回路構成が複雑になる。
However, in the above counter circuit, the radix is fixed because the count value for carrying a carry cannot be changed.
If another radix is to be counted, an extra counter has to be provided, which is inflexible. There are also construction of a counter for switching the counter base to provide a power switch circuit is not a 2 N counters and radix 2 N, but increases the circuit scale further switch the counter each other radix is not 2 N circuit configuration Becomes complicated.

【0010】本発明は、上記事実に鑑みて成されたもの
であり、簡単な構成で桁上げを行うカウント値を変更す
ることができ、複数種類の基数のカウントを行うことが
可能なカウンタ回路を提供することを目的とする。
The present invention has been made in view of the above facts, and is capable of changing the count value for carrying a carry with a simple structure and capable of counting a plurality of types of radix. The purpose is to provide.

【0011】[0011]

【課題を解決するための手段】上記目的を達成するため
に、請求項1記載の発明は、パルス列が入力されるパル
ス入力端と、パルスが入力されることにより現在の出力
信号の反転出力信号を前記パルスのカウント値のビット
信号として出力する出力端と、出力端からの出力信号を
クリアするためのクリア信号が入力されるクリア信号入
力端と、を含む複数の順序回路を、前段の前記順序回路
の出力端を次段の前記順序回路のパルス入力端に接続し
たカウンタと、前記カウント値が予め定めた所定値にな
った場合に、入力された制御信号に基づいて前記クリア
信号を出力する桁上げ手段と、を備えたことを特徴とす
る。
In order to achieve the above object, the present invention according to claim 1 provides a pulse input terminal to which a pulse train is input, and an inverted output signal of the current output signal by inputting the pulse. A plurality of sequential circuits including an output end for outputting as a bit signal of the pulse count value and a clear signal input end to which a clear signal for clearing the output signal from the output end is input, A counter in which the output end of the sequential circuit is connected to the pulse input end of the next sequential circuit, and when the count value reaches a predetermined value, the clear signal is output based on the input control signal. And a carry means for carrying out.

【0012】カウンタは、複数の順序回路を備えてい
る。この順序回路は、パルス入力端、出力端、及びクリ
ア信号入力端を含んでおり、入力端にパルスが入力され
ると、現在の出力信号の反転出力信号が出力端から出力
される。この反転出力信号が、パルスのカウント値のビ
ット信号となる。出力端からの出力信号は、クリア信号
入力端にクリア信号が入力されることによりクリアされ
る。このような複数の順序回路は、前段の順序回路の出
力端が次段の順序回路のパルス入力端に接続されてい
る。これにより、パルスが入力される毎にカウントアッ
プされ、各順序回路の出力端から出力されるビット信号
によパルスのカウント値を得ることができる。例えば、
このカウンタをN個の順序回路で構成した場合、当該カ
ウンタは、基数が2Nである2N進カウンタとして機能す
る。
The counter includes a plurality of sequential circuits. This sequential circuit includes a pulse input end, an output end, and a clear signal input end. When a pulse is input to the input end, an inverted output signal of the current output signal is output from the output end. This inverted output signal becomes a bit signal of the pulse count value. The output signal from the output end is cleared by inputting the clear signal to the clear signal input end. In such a plurality of sequential circuits, the output terminal of the sequential circuit of the previous stage is connected to the pulse input terminal of the sequential circuit of the next stage. As a result, each time a pulse is input, it is counted up, and the pulse count value can be obtained by the bit signal output from the output terminal of each sequential circuit. For example,
When this counter is composed of N sequential circuits, the counter functions as a 2 N base counter having a base of 2 N.

【0013】桁上げ手段は、カウント値が予め定めた所
定値になった場合に、入力された制御信号に基づいてク
リア信号を出力する機能を有する。例えば、所定値を2
Nでない値Mとし、カウント値が所定値Mになった場合
にクリア信号を出力する。これにより、各順序回路の出
力信号がクリアされるため、基数をMとするM進カウン
タとして機能する。そして、クリア信号が出力されるか
否かは、入力された制御信号により決定される。すなわ
ち、制御信号により、2N進カウンタとM進カウンタと
が切り替えられる。これにより、基数が異なるカウンタ
を制御信号によって容易に切り替えることができる。
The carry means has a function of outputting a clear signal based on the input control signal when the count value reaches a predetermined value. For example, the predetermined value is 2
A value M other than N is set, and a clear signal is output when the count value reaches a predetermined value M. As a result, the output signal of each sequential circuit is cleared, so that it functions as an M-ary counter whose base is M. Then, whether or not the clear signal is output is determined by the input control signal. That is, the 2 N- ary counter and the M-ary counter are switched by the control signal. This makes it possible to easily switch counters having different radixes by the control signal.

【0014】順序回路は、請求項2に記載したように、
JKフリップフロップ回路とすることができる。この場
合、J入力端及びK入力端にハイレベルが入力されるよ
うに構成する。これにより、パルス入力端にパルスが入
力される毎に出力端からの出力信号が反転する。
The sequential circuit has, as described in claim 2,
It can be a JK flip-flop circuit. In this case, a high level is input to the J input terminal and the K input terminal. This causes the output signal from the output end to be inverted every time a pulse is input to the pulse input end.

【0015】また、請求項3に記載したように、前記桁
上げ手段は、前記所定値に対応するビット信号及び前記
制御信号を入力信号とし、前記クリア信号を出力信号と
するAND回路とすることができる。これにより、簡単
な構成で基数が異なるカウンタを容易に切り替えること
ができる。
Further, as described in claim 3, the carry means is an AND circuit having the bit signal and the control signal corresponding to the predetermined value as input signals and the clear signal as an output signal. You can This makes it possible to easily switch counters having different radix with a simple configuration.

【0016】また、請求項4記載のように、前記桁上げ
手段は、異なる前記所定値に対応するビット信号を各々
入力信号とする複数のAND回路と、前記制御信号に基
づいて前記AND回路の何れかの出力信号を前記クリア
信号として選択する選択手段と、を含む構成としてもよ
い。
According to a fourth aspect of the present invention, the carry means includes a plurality of AND circuits each having a bit signal corresponding to the different predetermined value as an input signal, and the AND circuit based on the control signal. A selection unit that selects any output signal as the clear signal may be included.

【0017】これにより、異なる基数のカウンタを制御
信号によって容易に切り替えることができる。従って、
基数が2N同士のカウンタの切り替えや、基数が2Nのカ
ウンタと基数が2Nでないカウンタとの切り替えを容易
に行うことができ、また、3つ以上の基数が異なるカウ
ンタを切り替えることも可能となる。
This makes it possible to easily switch counters of different radix according to the control signal. Therefore,
Radix and switching of the 2 N between counter, radix can be easily performed to switch between the counter counter and radix 2 N is not 2 N, also possible that more than two groups switch between different counters Becomes

【0018】また、請求項5記載のように、前記カウン
タ及び前記桁上げ手段を複数備えた構成とすることによ
り、複数桁のカウントを行うことができる。
Further, as described in claim 5, a plurality of digits can be counted by providing a plurality of the counters and the carry means.

【0019】[0019]

【発明の実施の形態】[第1実施形態]以下、図面を参
照して本発明の第1実施形態について説明する。図1に
は、本発明を適用したカウンタ回路10が示されてい
る。なお、図8に示したカウンタ回路100と同一部分
には同一符号を付し、その詳細な説明を省略する。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS [First Embodiment] A first embodiment of the present invention will be described below with reference to the drawings. FIG. 1 shows a counter circuit 10 to which the present invention is applied. The same parts as those of the counter circuit 100 shown in FIG. 8 are designated by the same reference numerals, and detailed description thereof will be omitted.

【0020】カウンタ回路10は、桁上げ回路161
16j-1が3入力のAND回路である以外は、図8に示
すカウンタ回路10と同様であるため、回路構成につい
ては説明を省略する。
The counter circuit 10 includes carry circuits 16 1 ...
Since the counter circuit 10 is the same as the counter circuit 10 shown in FIG. 8 except that 16 j-1 is a 3-input AND circuit, description of the circuit configuration will be omitted.

【0021】桁上げ回路161〜16j-1の第1の入力端
子には、JKFF回路124m+2の出力端子Q4m+2が、第
2の入力端子には、JKFF回路124m+4の出力端子Q
4m+4が接続されている。また、第3の入力端子には、外
部からの制御信号CTLが入力される。従って、制御信
号CTLがハイレベル、すなわち「1」の場合には、図
8に示したカウンタ回路100と同様の動作を行い、制
御信号CTLがローレベル、すなわち「0」の場合に
は、16(=24)進カウンタとして動作する。
[0021] The first input terminal of the carry circuit 16 1 ~ 16 j-1, the output terminal Q 4m + 2 JKFF circuit 12 4m + 2 is the second input terminal, JKFF circuit 12 4m + 4 output terminals Q
4m + 4 is connected. Further, the control signal CTL from the outside is input to the third input terminal. Therefore, when the control signal CTL is at high level, that is, "1", the same operation as the counter circuit 100 shown in FIG. 8 is performed, and when the control signal CTL is at low level, that is, "0", 16 (= 2 4 ) Operates as a base counter.

【0022】次に、本実施形態の作用について説明す
る。
Next, the operation of this embodiment will be described.

【0023】図2には、制御信号CTLが「1」の場合
のタイミングチャートを、図3には、制御信号CTLが
「0」の場合のタイミングチャートをそれぞれ示した。
まず、制御信号が「1」の場合について説明する。
FIG. 2 shows a timing chart when the control signal CTL is "1", and FIG. 3 shows a timing chart when the control signal CTL is "0".
First, the case where the control signal is "1" will be described.

【0024】クロック信号CLKがJKFF回路121
のクロック入力端子CP1に入力されると、図2に示す
ように、クロック信号CLKの立下りでJKFF回路1
1の出力端子Q1からの出力信号が反転し、出力端子Q
1からの出力信号の立下りで出力端子Q2からの出力信号
が反転し、以下同様の動作が繰り返されることによりパ
ルス数が順次カウントアップされていく。
The clock signal CLK is the JKFF circuit 12 1
2 is input to the clock input terminal CP 1 of the JKFF circuit 1 at the falling edge of the clock signal CLK, as shown in FIG.
2 1 of the output signal from the output terminal Q 1 is inverted, the output terminal Q
At the fall of the output signal from 1 , the output signal from the output terminal Q 2 is inverted, and the same operation is repeated thereafter, so that the number of pulses is sequentially counted up.

【0025】例えば、6個目のパルスが入力されたtA
の時点では、クロック信号CLKの立下りで出力端子Q
1からの出力信号、すなわちビット信号q1が「0」にな
り立ち下がるため、出力端子Q2からの出力信号、すな
わちビット信号q2が「1」になる。また、ビット信号
3は「1」、ビット信号q4は「0」のままである。従
って、カウント値は10進数で「6」となる。
For example, t A when the sixth pulse is input
At the time of, the output terminal Q
Since the output signal from 1 , that is, the bit signal q 1 becomes “0” and falls, the output signal from the output terminal Q 2 , that is, the bit signal q 2 becomes “1”. The bit signal q 3 remains “1” and the bit signal q 4 remains “0”. Therefore, the count value is "6" in decimal.

【0026】そして、tBの時点で10個目のパルスが
立ち下がると、ビット信号q1が「0」になると共に、
ビット信号q2が「1」になる。このとき、ビット信号
4も「1」であるので、桁上げ回路161から出力され
るクリア信号CLRが「1」になってビット信号q1
4からの出力信号がリセットされて「0」になる。こ
れにより、ビット信号q4が立ち下がるので、ビット信
号q5が「1」になる。すなわち桁上げされる。なお、
クリア信号CLRは、ビット信号q2、q4が立ち下がる
ので瞬時に立ち下がる。
When the tenth pulse falls at time t B , the bit signal q 1 becomes "0" and
The bit signal q 2 becomes “1”. At this time, since the bit signal q 4 is also “1”, the clear signal CLR output from the carry circuit 16 1 becomes “1” and the bit signals q 1 to
The output signal from q 4 is reset to “0”. As a result, the bit signal q 4 falls, and the bit signal q 5 becomes “1”. That is, carry is carried. In addition,
The clear signal CLR instantly falls because the bit signals q 2 and q 4 fall.

【0027】このように、制御信号CTLが「1」の場
合には、カウンタ回路10は、10進カウンタとして機
能する。
In this way, when the control signal CTL is "1", the counter circuit 10 functions as a decimal counter.

【0028】一方、制御信号が「0」の場合には、図3
に示すように、桁上げ回路161からのクリア信号CL
Rは「0」のままであるため、10個目のパルスが入力
されても桁上げされず、16個目のパルスが入力された
Cの時点でビット信号q4が立下り、ビット信号q5
「1」になる、すなわち桁上げされる。
On the other hand, when the control signal is "0",
As shown in, the clear signal CL from the carry circuit 16 1
Since R remains “0”, no carry is carried out even if the 10th pulse is inputted, and the bit signal q 4 falls at the time point t C when the 16th pulse is inputted and the bit signal q 4 falls. q 5 becomes “1”, that is, carry is carried.

【0029】このように、制御信号CTLが「0」の場
合には、カウンタ回路10は、16進カウンタとして機
能する。
As described above, when the control signal CTL is "0", the counter circuit 10 functions as a hexadecimal counter.

【0030】本実施形態によれば、制御信号CTLを
「1」又は「0」にして桁上げを有効又は無効にするこ
とにより、回路規模を大きくすることなく、基数が2N
でない10進カウンタ又は基数が2Nである16進カウ
ンタを容易に切り替えることができる。
According to the present embodiment, the control signal CTL is set to "1" or "0" to enable or disable the carry, so that the radix is 2 N without increasing the circuit scale.
A non-decimal counter or a hexadecimal counter with a radix of 2 N can easily be switched.

【0031】なお、本実施形態では、10進カウンタ又
は16進カウンタを切り替える場合について説明した
が、これに限らず、他の基数のカウンタを切り替える場
合についても本発明を適用可能である。また、本実施形
態では、フリップフロップ回路としてJKフリップフロ
ップ回路を用い、桁上げ回路としてAND回路を用いた
場合について説明したが、本発明はこれに限定されるも
のではない。
In the present embodiment, the case where the decimal counter or the hexadecimal counter is switched has been described, but the present invention is not limited to this and the present invention can be applied to the case where the counter of another radix is switched. Further, although the case where the JK flip-flop circuit is used as the flip-flop circuit and the AND circuit is used as the carry circuit has been described in the present embodiment, the present invention is not limited to this.

【0032】[第2実施形態]次に、本発明の第2実施
形態について説明する。第2実施形態では、共に基数が
N進数でないカウンタを切り替えることができるカウ
ンタ回路について説明する。なお、第1実施形態で説明
したカウンタ回路10と同一部分には同一符号を付し、
その詳細な説明は省略する。
[Second Embodiment] Next, a second embodiment of the present invention will be described. In the second embodiment, a counter circuit capable of switching counters whose bases are not both 2 N base numbers will be described. The same parts as those of the counter circuit 10 described in the first embodiment are designated by the same reference numerals,
Detailed description thereof will be omitted.

【0033】図4には、第2実施形態に係るカウンタ回
路20の回路図を示した。図4に示すように、カウンタ
回路20は、切替桁上げ回路22を備えている。切替桁
上げ回路22は、図5に示すように、2入力のAND回
路24、26、及びセレクタ28で構成されている。
FIG. 4 shows a circuit diagram of the counter circuit 20 according to the second embodiment. As shown in FIG. 4, the counter circuit 20 includes a switching carry circuit 22. As shown in FIG. 5, the switch carry circuit 22 is composed of two-input AND circuits 24 and 26 and a selector 28.

【0034】AND回路24の一方の入力端子は、JK
FF回路121の出力端子Q1が接続されており、他方の
入力端子は、JKFF回路123の出力端子Q3が接続さ
れている。
One input terminal of the AND circuit 24 has a JK
FF circuit 12 first output and terminal Q 1 is connected, the other input terminal, an output terminal Q 3 of the JKFF circuit 12 3 are connected.

【0035】AND回路26の一方の入力端子は、JK
FF回路122の出力端子Q2が接続されており、他方の
入力端子は、JKFF回路124の出力端子Q4が接続さ
れている。
One input terminal of the AND circuit 26 has JK
FF circuit 12 and second output terminal Q 2 is connected, the other input terminal, the output terminal Q 4 of the JKFF circuit 12 4 is connected.

【0036】AND回路24の出力端子は、セレクタ2
8の第1の入力端子に接続され、AND回路26の出力
端子は、セレクタ28の第2の入力端子に接続されてい
る。また、セレクタ28の第3の入力端子には、制御信
号CTLが入力される。セレクタ28の出力端子は、J
KFF回路121〜124のクリア端子Cに接続されると
共に、インバータ30の入力端子に接続されている。イ
ンバータ30の出力端子は、JKFF回路125のクロ
ック入力端子CP5に接続されている。
The output terminal of the AND circuit 24 is the selector 2
8 is connected to the first input terminal of the AND circuit 26, and the output terminal of the AND circuit 26 is connected to the second input terminal of the selector 28. The control signal CTL is input to the third input terminal of the selector 28. The output terminal of the selector 28 is J
It is connected to the clear terminals C of the KFF circuits 12 1 to 12 4 and also to the input terminal of the inverter 30. The output terminal of the inverter 30 is connected to the clock input terminal CP 5 of the JKFF circuit 12 5 .

【0037】セレクタ28は、制御信号CTLが「0」
の場合には、AND回路24の出力を出力信号として選
択し、制御信号CTLが「1」の場合には、AND回路
26の出力を出力信号として選択する。セレクタ28か
らの出力信号は、クリア信号CLRとしてJKFF回路
121〜124のクリア端子Cに出力される。なお、その
他の構成は、図1に示したカウンタ回路10と同様であ
るため、回路構成については説明を省略する。
In the selector 28, the control signal CTL is "0".
In the case of, the output of the AND circuit 24 is selected as the output signal, and when the control signal CTL is "1", the output of the AND circuit 26 is selected as the output signal. The output signal from the selector 28 is output as a clear signal CLR to the clear terminals C of the JKFF circuits 12 1 to 12 4 . The rest of the configuration is the same as that of the counter circuit 10 shown in FIG. 1, so description of the circuit configuration will be omitted.

【0038】次に、本実施形態の作用について説明す
る。
Next, the operation of this embodiment will be described.

【0039】図6には、制御信号CTLが「0」の場合
のタイミングチャートを、図7には、制御信号CTLが
「1」の場合のタイミングチャートをそれぞれ示した。
まず、制御信号が「0」の場合について説明する。
FIG. 6 shows a timing chart when the control signal CTL is "0", and FIG. 7 shows a timing chart when the control signal CTL is "1".
First, the case where the control signal is “0” will be described.

【0040】クロック信号CLKがJKFF回路121
のクロック入力端子CP1に入力されると、図6に示す
ように、クロック信号CLKの立下りでJKFF回路1
1の出力端子Q1からの出力信号が反転し、出力端子Q
1からの出力信号の立下りで出力端子Q2からの出力信号
が反転し、以下同様の動作が繰り返されることによりパ
ルス数が順次カウントアップされていく。
The clock signal CLK is the JKFF circuit 12 1
When input to the clock input terminal CP 1 of the JKFF circuit 1 at the falling edge of the clock signal CLK, as shown in FIG.
2 1 of the output signal from the output terminal Q 1 is inverted, the output terminal Q
At the fall of the output signal from 1 , the output signal from the output terminal Q 2 is inverted, and the same operation is repeated thereafter, so that the number of pulses is sequentially counted up.

【0041】例えば、2個目のパルスが入力されたtD
の時点では、クロック信号CLKの立下りで出力端子Q
1からの出力信号、すなわちビット信号q1が「0」にな
り立ち下がるため、出力端子Q2からの出力信号、すな
わちビット信号q2が「1」になる。また、ビット信号
3は「0」、ビット信号q4は「0」のままである。従
って、カウント値は10進数で「2」となる。
For example, t D when the second pulse is input
At the time of, the output terminal Q
Since the output signal from 1 , that is, the bit signal q 1 becomes “0” and falls, the output signal from the output terminal Q 2 , that is, the bit signal q 2 becomes “1”. The bit signal q 3 remains “0” and the bit signal q 4 remains “0”. Therefore, the count value is "2" in decimal.

【0042】そして、tEの時点で5個目のパルスが立
ち下がると、ビット信号q1が「1」になる。このと
き、ビット信号q3も「1」であるので、桁上げ回路2
1のAND回路24の出力が「1」になる。また、制
御信号CTLが「0」であるため、AND回路24の出
力がクリア信号CLRとして選択され、JKFF回路1
1〜124のクリア端子C及びインバータ30に「1」
が出力される。これにより、ビット信号q1〜q4からの
出力信号がリセットされて「0」になり、インバータ3
0の出力信号CARは「1」から「0」になるため、ビ
ット信号q5が「1」になる。すなわち桁上げされる。
なお、クリア信号CLRは、ビット信号q1、q3が立ち
下がるので瞬時に立ち下がる。
Then, when the fifth pulse falls at time t E , the bit signal q 1 becomes "1". At this time, since the bit signal q 3 is also “1”, the carry circuit 2
The output of the AND circuit 24 of 2 1 becomes "1". Further, since the control signal CTL is “0”, the output of the AND circuit 24 is selected as the clear signal CLR, and the JKFF circuit 1
“1” for the clear terminals C of 2 1 to 12 4 and the inverter 30
Is output. As a result, the output signals from the bit signals q 1 to q 4 are reset to “0” and the inverter 3
Since the output signal CAR 0 becomes "0" from "1" bit signal q 5 becomes "1". That is, carry is carried.
The clear signal CLR instantly falls because the bit signals q 1 and q 3 fall.

【0043】このように、制御信号CTLが「0」の場
合には、カウンタ回路10は、5進カウンタとして機能
する。
As described above, when the control signal CTL is "0", the counter circuit 10 functions as a quinary counter.

【0044】一方、制御信号が「1」の場合には、図7
に示すように、tFの時点で10個目のパルスが立ち下
がると、ビット信号q1が「0」になると共に、ビット
信号q2が「1」になる。このとき、ビット信号q4
「1」であるので、桁上げ回路221のAND回路26
の出力が「1」になる。また、制御信号CTLが「1」
であるため、AND回路26の出力がクリア信号CLR
として選択され、JKFF回路121〜124のクリア端
子C及びインバータ30に「1」が出力される。これに
より、ビット信号q1〜q4からの出力信号がリセットさ
れて「0」になり、インバータ30の出力信号CARは
「1」から「0」になるため、ビット信号q5が「1」
になる。すなわち桁上げされる。なお、クリア信号CL
Rは、ビット信号q2、q4が立ち下がるので瞬時に立ち
下がる。
On the other hand, when the control signal is "1", as shown in FIG.
As shown in, when the tenth pulse falls at time t F , the bit signal q 1 becomes “0” and the bit signal q 2 becomes “1”. At this time, since the bit signal q 4 is also “1”, the AND circuit 26 of the carry circuit 22 1
Output becomes "1". Further, the control signal CTL is "1".
Therefore, the output of the AND circuit 26 is the clear signal CLR.
, And “1” is output to the clear terminals C of the JKFF circuits 12 1 to 12 4 and the inverter 30. Thus, the output signal from the bit signals q 1 to q 4 is reset is "0", the output signal CAR of the inverter 30 becomes "0" from "1" bit signal q 5 is "1"
become. That is, carry is carried. The clear signal CL
R falls instantly because the bit signals q 2 and q 4 fall.

【0045】このように、制御信号CTLが「1」の場
合には、カウンタ回路10は、第1実施形態で説明した
のと同様の10進カウンタとして機能する。
In this way, when the control signal CTL is "1", the counter circuit 10 functions as a decimal counter similar to that described in the first embodiment.

【0046】本実施形態では、次段(次桁)のカウンタ
の初段のJKFF回路のクロック入力端子CPに、前段
のカウンタの最終段のJKFF回路の出力信号を入力さ
せるのではなく、切替桁上げ回路22の反転出力信号を
入力させるように構成している。これにより、上記のよ
うに必要ビット数の異なる5進カウンタ(必要ビット数
3ビット)と10進カウンタ(必要ビット数4ビット)
とを切り替えることができ、柔軟性に富んだカウンタ回
路を得ることができる。従って、あらゆる基数のカウン
トを1つのカウンタ回路で実現することができ、LSI
回路全体の小型化、低コスト化を図ることができる。
In this embodiment, the output signal of the final stage JKFF circuit of the preceding counter is not input to the clock input terminal CP of the initial stage JKFF circuit of the next stage (next digit) counter. It is configured to receive the inverted output signal of the circuit 22. As a result, as described above, a quinary counter (necessary bit number 3 bits) and a decimal counter (necessary bit number 4 bits) having different required bit numbers are provided.
And can be switched, and a highly flexible counter circuit can be obtained. Therefore, counting of all radix can be realized by one counter circuit.
It is possible to reduce the size and cost of the entire circuit.

【0047】なお、本実施形態では、5進カウンタ又は
10進カウンタを切り替える場合について説明したが、
これに限らず、他の2Nでない基数のカウンタ同士を切
り替える場合についても本発明を適用可能である。ま
た、本実施形態では、フリップフロップ回路としてJK
フリップフロップ回路を用い、切替桁上げ回路としてA
ND回路及びセレクタを用いた場合について説明した
が、本発明はこれに限定されるものではない。
In this embodiment, the case of switching the quinary counter or the decimal counter has been described.
The present invention is not limited to this, and the present invention can be applied to the case of switching between counters having a radix other than 2 N. In addition, in the present embodiment, a JK is used as the flip-flop circuit.
A flip-flop circuit is used as a switching carry circuit.
Although the case where the ND circuit and the selector are used has been described, the present invention is not limited to this.

【0048】[0048]

【発明の効果】以上説明したように、本発明によれば、
簡単な構成で桁上げを行うカウント値を変更することが
でき、複数種類の基数のカウントを行うことができる、
という効果を有する。
As described above, according to the present invention,
It is possible to change the count value that carries a carry with a simple configuration, and it is possible to count multiple types of radix.
Has the effect.

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

【図1】 第1実施形態に係るカウンタ回路の回路図で
ある。
FIG. 1 is a circuit diagram of a counter circuit according to a first embodiment.

【図2】 第1実施形態に係るカウンタ回路の各信号を
示すタイミングチャートである。
FIG. 2 is a timing chart showing each signal of the counter circuit according to the first embodiment.

【図3】 第1実施形態に係るカウンタ回路の各信号を
示すタイミングチャートである。
FIG. 3 is a timing chart showing each signal of the counter circuit according to the first embodiment.

【図4】 第2実施形態に係るカウンタ回路の回路図で
ある。
FIG. 4 is a circuit diagram of a counter circuit according to a second embodiment.

【図5】 切替桁上げ回路の回路図である。FIG. 5 is a circuit diagram of a switch carry circuit.

【図6】 第2実施形態に係るカウンタ回路の各信号を
示すタイミングチャートである。
FIG. 6 is a timing chart showing each signal of the counter circuit according to the second embodiment.

【図7】 第2実施形態に係るカウンタ回路の各信号を
示すタイミングチャートである。
FIG. 7 is a timing chart showing each signal of the counter circuit according to the second embodiment.

【図8】 従来におけるカウンタ回路の回路図である。FIG. 8 is a circuit diagram of a conventional counter circuit.

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

10、20、100 カウンタ回路 12x JKFF回路(順序回路) 14、16 桁上げ回路(桁上げ手段) 22 切替桁上げ回路(桁上げ手段) 24、26 AND回路 28 セレクタ(選択手段) 30 インバータ10, 20, 100 Counter circuit 12 x JKFF circuit (sequential circuit) 14, 16 Carry circuit (carrying means) 22 Switching carry circuit (carrying means) 24, 26 AND circuit 28 Selector (selecting means) 30 Inverter

Claims (5)

【特許請求の範囲】[Claims] 【請求項1】 パルス列が入力されるパルス入力端と、
パルスが入力されることにより現在の出力信号の反転出
力信号を前記パルスのカウント値のビット信号として出
力する出力端と、出力端からの出力信号をクリアするた
めのクリア信号が入力されるクリア信号入力端と、を含
む複数の順序回路を、前段の前記順序回路の出力端を次
段の前記順序回路のパルス入力端に接続したカウンタ
と、 前記カウント値が予め定めた所定値になった場合に、入
力された制御信号に基づいて前記クリア信号を出力する
桁上げ手段と、 を備えたカウンタ回路。
1. A pulse input end to which a pulse train is input,
A clear signal to which an inverted output signal of the current output signal is output as a bit signal of the count value of the pulse when a pulse is input, and a clear signal for clearing the output signal from the output end is input. A plurality of sequential circuits including an input end, a counter in which the output end of the sequential circuit of the preceding stage is connected to the pulse input end of the sequential circuit of the next stage, and the count value reaches a predetermined value And a carry means for outputting the clear signal based on the input control signal.
【請求項2】 前記順序回路はJKフリップフロップ回
路であり、J入力端及びK入力端にハイレベルが入力さ
れることを特徴とする請求項1記載のカウンタ回路。
2. The counter circuit according to claim 1, wherein the sequential circuit is a JK flip-flop circuit, and a high level is input to the J input terminal and the K input terminal.
【請求項3】 前記桁上げ手段は、前記所定値に対応す
るビット信号及び前記制御信号を入力信号とし、前記ク
リア信号を出力信号とするAND回路であることを特徴
とする請求項1又は2記載のカウンタ回路。
3. The carry circuit is an AND circuit that uses the bit signal and the control signal corresponding to the predetermined value as input signals and the clear signal as an output signal. The described counter circuit.
【請求項4】 前記桁上げ手段は、異なる前記所定値に
対応するビット信号を各々入力信号とする複数のAND
回路と、前記制御信号に基づいて前記AND回路の何れ
かの出力信号を前記クリア信号として選択する選択手段
と、を含むことを特徴とする請求項1又は2記載のカウ
ンタ回路。
4. The carry means includes a plurality of ANDs, each of which has a bit signal corresponding to a different predetermined value as an input signal.
3. The counter circuit according to claim 1, further comprising a circuit and a selection unit that selects one of the output signals of the AND circuit as the clear signal based on the control signal.
【請求項5】 前記カウンタ及び前記桁上げ手段を複数
備えたことを特徴とする請求項1〜4の何れか1項に記
載のカウンタ回路。
5. The counter circuit according to claim 1, further comprising a plurality of the counters and the carry means.
JP2001259560A 2001-08-29 2001-08-29 Counter circuit Pending JP2003069419A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2001259560A JP2003069419A (en) 2001-08-29 2001-08-29 Counter circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2001259560A JP2003069419A (en) 2001-08-29 2001-08-29 Counter circuit

Publications (1)

Publication Number Publication Date
JP2003069419A true JP2003069419A (en) 2003-03-07

Family

ID=19086914

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2001259560A Pending JP2003069419A (en) 2001-08-29 2001-08-29 Counter circuit

Country Status (1)

Country Link
JP (1) JP2003069419A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7289591B2 (en) * 2004-12-06 2007-10-30 Hynix Semiconductor Inc. Counter circuit for controlling off-chip driver

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7289591B2 (en) * 2004-12-06 2007-10-30 Hynix Semiconductor Inc. Counter circuit for controlling off-chip driver

Similar Documents

Publication Publication Date Title
US6826249B1 (en) High-speed synchronous counters with reduced logic complexity
Maitra et al. Maximum nonlinearity of symmetric Boolean functions on odd number of variables
Bhardwaj et al. Breaking the 2n-bit carry propagation barrier in residue to binary conversion for the [2/sup n/-1, 2/sup n/, 2/sup n/+ 1] modula set
JPH06216762A (en) Asynchronous counter
US7149275B1 (en) Integrated circuit and method of implementing a counter in an integrated circuit
TW589804B (en) Method for establishing Gray code and related counter circuit
JP2003069419A (en) Counter circuit
EP0186866A2 (en) Majority circuit
US6617986B2 (en) Area efficient, sequential gray code to thermometer code decoder
TW200415847A (en) Impedance matching circuit
JP3474492B2 (en) D / A converter circuit
JP2643316B2 (en) Counter and configuration method thereof
JP3936476B2 (en) Code generator
TW480819B (en) Modularized single transition counter
JP2968629B2 (en) Maximum period sequence code generation circuit
JP2833885B2 (en) PN code generation circuit
US10243580B1 (en) Digital to analog converter with iterative stepping to each output value
JPH03164866A (en) Hash encoding circuit
JP2001184895A (en) Address generating circuit, address generating device and address generating method
SU1140249A1 (en) Stage of digital store
JPH02113619A (en) Pulse generation circuit
JPH02148913A (en) digital divider
JPH01290314A (en) Error pulse counter circuit
JPH04293315A (en) Counter circuit
JPH02266428A (en) Divider