JPS6323422A - Gray code counter - Google Patents

Gray code counter

Info

Publication number
JPS6323422A
JPS6323422A JP14321186A JP14321186A JPS6323422A JP S6323422 A JPS6323422 A JP S6323422A JP 14321186 A JP14321186 A JP 14321186A JP 14321186 A JP14321186 A JP 14321186A JP S6323422 A JPS6323422 A JP S6323422A
Authority
JP
Japan
Prior art keywords
counter
output
input
gray code
order
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
JP14321186A
Other languages
Japanese (ja)
Inventor
Shigeo Sakagami
茂生 阪上
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.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial 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 Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Publication of JPS6323422A publication Critical patent/JPS6323422A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To suppress the scale of hardware by using four kinds of functions depending whether two kinds of input pulses are respectively logical '1' or '0' so as to generate a carry output thereby attaining the cascade connection. CONSTITUTION:A carry output of a low-order 4-bit counter 33 is inputted to a count pulse input of a high-order 4-bit counter 32 at count operation and a carry output of a low-order 4-bit counter 33 outputs logical '1' when the counter is count operation and a counter output is 15 In decimal notation. In this case only, the high-order 4-bit counter 32 applies count and in other cases, the output of the high-order 4-bit counter 32 is held. In case of the presence of high-order connection to the counter in this way, the count operation by cascade connection is attained by connecting its carry output to the count pulse input of the high-order counter. Further, in case of the cascade connection, an OR circuit 34 aud an AND 35 are connected so as not to lose the preset function, hold function and clear function.

Description

【発明の詳細な説明】 産業上の利用分野 本発明は、ディジタル制御回路におけるグレイコードカ
ウンタに関するものである。
DETAILED DESCRIPTION OF THE INVENTION Field of the Invention The present invention relates to a Gray code counter in a digital control circuit.

従来の技術 従来のグレイコードカラ/りとしては、例えば特公昭6
0−32401号公報に示されている。
2. Description of the Related Art Conventional gray code colors include, for example,
0-32401.

第8図はこの従来のグレイコードカウンタの構成図を示
すものであり、36及び37は縦続接続されたDフリッ
プ70ツブ回路、38は帰還用ナントゲート、39は制
御用ナントゲートであり、制御用ナントゲート39に論
理1111+の制御信号CTが到来した時、Dフリップ
フロップ回路36及び37のトリガ端子に駆動信号とし
てのクロックパルスOPが入力されるごとに2ビツトの
グレイコード信号Z1及びZ2 を送出する。
FIG. 8 shows a configuration diagram of this conventional Gray code counter, in which 36 and 37 are cascade-connected D-flip 70-tub circuits, 38 is a Nandt gate for feedback, and 39 is a Nandt gate for control. When a logic 1111+ control signal CT arrives at the Nant gate 39, 2-bit Gray code signals Z1 and Z2 are generated every time a clock pulse OP as a drive signal is input to the trigger terminals of the D flip-flop circuits 36 and 37. Send.

発明が解決しようとする問題点 しかしながら、上記のような構成では、CTがLL 1
 !1の時カウント動作をし、CTが′”○”の時には
カウント動作をしないという機能しかないため、従来の
2進コードカウンタに比べてディジタル制御に用いにく
いという問題点を有していた。
Problems to be Solved by the Invention However, in the above configuration, CT is LL 1
! Since the only function is to perform a counting operation when CT is 1 and not to perform a counting operation when CT is ``○'', it has a problem that it is difficult to use for digital control compared to conventional binary code counters.

グレイコードは値の差が1である符号間の距離が1であ
るという特長を有するが、2進コードに比べて−・−ド
ウエアの構成が複雑になるという欠点を有していた。
Although the Gray code has the advantage that the distance between codes with a value difference of 1 is 1, it has the disadvantage that the structure of the hardware is more complicated than the binary code.

本発明はかかる点に鑑み、プリセット機能、ホールド機
能、クリア機能、カウント機能を備え、複数のカウンタ
の縦紐接続も可能であると贋う従来の2進コードカウン
タの機能を全て備えており、しかも従来の2進コードカ
ウンタと比べて・・−ドウエアの規模はあまり大きくな
らないようなグレイコードカウンタを提供することを目
的とする。
In view of this, the present invention has all the functions of a conventional binary code counter, including a preset function, a hold function, a clear function, and a count function, and also allows vertical string connection of multiple counters. Moreover, it is an object of the present invention to provide a Gray code counter whose hardware size is not so large compared to a conventional binary code counter.

問題点を解決するための手段 本発明は、プリセット動作とホールド動作とクリア動作
とカウンタ動作のうちのどの動作をするかを判断する手
段と、カウンタ出力の偶奇を表わす信号を発生する手段
と、桁上げ出力を発生する手段とを備えたグレイコード
カウンタである。
Means for Solving the Problems The present invention provides means for determining which operation to perform among a preset operation, a hold operation, a clear operation, and a counter operation, and means for generating a signal representing whether the counter output is even or odd. 2. A Gray code counter having means for generating a carry output.

作用 本発明は、前記した構成により、2種類の入力パルスが
それぞれ“1″か0“かによって4種類の機能を使い分
け、桁上げ出力を発生することによって縦続接続を可能
とし、カウンタ出力の偶奇を表わす信号を発生すること
によって各ピノ)の反転条件を簡略化して・・−ドウエ
アの規模を抑制する。
Operation The present invention uses four types of functions depending on whether the two types of input pulses are "1" or 0, respectively, and generates a carry output to enable cascade connection, and even or odd counter outputs. By generating a signal representing , the inversion conditions for each pino are simplified, and the size of the doware is suppressed.

実施例 第1図は、本発明の第1の実施例におけるグレイコード
カウンタの構成を示すものである。第1図において、1
は最上位ビット入力端子、2は上位第2位ビット入力端
子、3は下位第2位ビット入力端子、4は最下位ビット
入力端子、6は最上位ビット出力端子、6は上位第2位
ビット出力端子、7は下位第2位ビット出力端子、8は
最下位ビット出力端子、9は桁上げ出力端子、10はプ
リセットパルス入力端子、11はカウントパルス入力端
子、12はクロックパルス入力端子、13は反転回路、
14. 15. 16. 17. 18,19゜20.
21は論理積回路、22.23は排他的論理和回路、2
4は論理和回路、26.26はDフリップフロップであ
る。
Embodiment FIG. 1 shows the configuration of a Gray code counter in a first embodiment of the present invention. In Figure 1, 1
is the most significant bit input terminal, 2 is the second most significant bit input terminal, 3 is the second least significant bit input terminal, 4 is the least significant bit input terminal, 6 is the most significant bit output terminal, 6 is the second most significant bit Output terminals, 7 is the lower second bit output terminal, 8 is the least significant bit output terminal, 9 is the carry output terminal, 10 is the preset pulse input terminal, 11 is the count pulse input terminal, 12 is the clock pulse input terminal, 13 is an inverting circuit,
14. 15. 16. 17. 18,19゜20.
21 is an AND circuit, 22.23 is an exclusive OR circuit, 2
4 is an OR circuit, and 26.26 is a D flip-flop.

以上のように構成された本実施例のグレイコードカウン
タについて、以下にその動作を説明する。
The operation of the Gray code counter of this embodiment configured as described above will be explained below.

本実施例のグレイコードカウンタは、端子10から入力
されるプリセットパルスと、端子11から入力されるカ
ウントパルスとの“1”と5”0″の組合わせによって
、プリセット機能とホールド機能とカウント機能とクリ
ア機能との4つの機能を果たす。第2図に、プリセント
パルスとカウントパルスとの“1″と′0″のそれぞれ
の組合わせにおいて、本実施例のグレイコードカウンタ
の果たす機能を示す。プリセントパルスが“1″で、カ
ウントパルスが“0″の時、14の論理積回路は“1″
を出力し、15と16の論理積回路は“○″を出力する
ため、17の論理積回路は端子1から入力された最上位
ビットのデータを出力し、18と19の論理積回路は1
70 Itを出力する。従って、端子1から入力された
最上位ビットのデータが、論理和回路24を通して、D
フリップ70ツブ25に入力される。上位第2位ビット
、下位第2位ビット、最下位ビットについても、最上位
ビットと同様にして、2,3.4の端子から入力された
各ビットのデータが、それぞれのビットのDフリップ7
0ツブに入力される。一方、排他的論理和回路23は、
1+  2+  3,4の端子から入力される4ビツト
のデータ中に含まれる“1′ゝの数がOまたは2の時は
”o”を出力し、入力データ中の“1″2の数が1また
は3の時は“1″2を出力する。従って、Dフリップ7
0ツブ26には、入力データ中の“1″の数の偶奇を表
わすデータが入力される。
The gray code counter of this embodiment has a preset function, a hold function, and a count function by the combination of "1", 5", and 0" of the preset pulse input from the terminal 10 and the count pulse input from the terminal 11. It performs four functions: and a clear function. Fig. 2 shows the function performed by the Gray code counter of this embodiment in each combination of "1" and '0' of the precent pulse and the count pulse. When the pulse is “0”, the 14 AND circuits are “1”
Since the AND circuits 15 and 16 output "○", the AND circuit 17 outputs the most significant bit data input from terminal 1, and the AND circuits 18 and 19 output 1.
Outputs 70 It. Therefore, the data of the most significant bit input from terminal 1 passes through the OR circuit 24 to D
It is input to the flip 70 knob 25. As for the upper 2nd bit, the lower 2nd bit, and the least significant bit, in the same way as for the most significant bit, the data of each bit input from the terminals 2, 3.
It is input to 0 knob. On the other hand, the exclusive OR circuit 23 is
1+ 2+ When the number of "1'" included in the 4-bit data input from terminals 3 and 4 is O or 2, "o" is output, and if the number of "1" 2 in the input data is When it is 1 or 3, it outputs "1" 2. Therefore, D flip 7
Data representing whether the number of "1"s in the input data is even or odd is input to the 0-tube 26.

この時、クロックパルスが立上ると、それぞれのDフリ
ップフロップは、1. 2. 3. 4の端子からの入
力データ及び、入力データ中の“1″の数の偶奇を表わ
すデータを出力する。
At this time, when the clock pulse rises, each D flip-flop changes to 1. 2. 3. The input data from the terminal No. 4 and data representing whether the number of "1"s in the input data is even or odd are output.

第3図は、1. 2. 3. 4の端子に入力されるデ
ータがf+ 11o o 17の場合における本実施例
のグレイコードカウンタの動作を示すタイムチャートで
ある。第3図においてaは端子12から入力されるクロ
ックパルス、bは端子10から人力されるプリセットパ
ルス、Cは端子11から入力されるカウントパルス、d
、θ、  f’、  gは、5,6゜7.8の端子から
出力されるデータ、hばDフリップフロップ2eの出力
、1は端子9から出力される桁上げ出力である。以下で
は、最上位ビット出力を05、上位第2位ビット出力を
G2 、下位第2位ビット出力を01、最下位ビット出
力をGo、Dフリップフロップ26の出力をG、と呼ぶ
。第3図において、プリセットパルスが1″で、カラン
トパルスが“0”で、クロックパルスが立上る瞬間jに
おいて、グレイコードカウンタに入力値“’1100”
が入力される。
Figure 3 shows 1. 2. 3. 4 is a time chart showing the operation of the Gray code counter of this embodiment when the data input to the terminal No. 4 is f+ 11o o 17. In FIG. 3, a is a clock pulse input from terminal 12, b is a preset pulse manually input from terminal 10, C is a count pulse input from terminal 11, and d
, θ, f', g are data output from the terminals 5, 6 degrees 7.8, h is the output of the D flip-flop 2e, and 1 is the carry output output from the terminal 9. Hereinafter, the most significant bit output will be referred to as 05, the second most significant bit output as G2, the second least significant bit output as 01, the least significant bit output as Go, and the output of the D flip-flop 26 as G. In Fig. 3, the preset pulse is 1", the current pulse is "0", and at the instant j when the clock pulse rises, the input value "'1100" is input to the Gray code counter.
is input.

次にホールド機能について説明する。プリセントパルス
とカウントパルスとが共に“0″の時、15の論理積回
路は11 、11を出力し、14と16のカウンタは“
o″を出力するため、18の論理積回路はG3を出力し
、17と19の論理積回路は”0″を出力する。従って
、論理和回路24を通して、Dフリップ70ツブ25に
は、G3が入力され、次のクロックパルスの立上りエツ
ジにおいて、G5は変化しない。G 21 G + l
 G Q+ G −1についても変化せず、カウンタの
出力は保持される。
Next, the hold function will be explained. When both the pre-cent pulse and the count pulse are "0", the AND circuit of 15 outputs 11, 11, and the counters of 14 and 16 output "
o", the AND circuit 18 outputs G3, and the AND circuits 17 and 19 output "0". Therefore, through the OR circuit 24, the D flip 70 tube 25 receives G3. is input, and at the rising edge of the next clock pulse, G5 does not change.G 21 G + l
GQ+G-1 also remains unchanged, and the output of the counter is held.

即ち、第3図において、コからkの間では、カウンタの
出力は“110o”のままである。
That is, in FIG. 3, the output of the counter remains "110o" from C to k.

次にクリア機能について説明する。プリセットパルスと
カウントパルスとが共に“1″の時、14と15と16
の論理積回路は全て“O”を出力するため、17と18
と19の論理積回路は全て′”O″′を出力する。従っ
て、論理和回路24全通して、Dフリップフロッグ25
には“○”が入力され、次のクロックパルスの立上りエ
ツジにおいて、G3は”oすとなる。G2. G4.G
ot G+についても同様で、カウンタの出力はクリア
される。即ち、第3図において、gの瞬間にカウンタ出
力は、“′○○oO”となる。
Next, the clear function will be explained. When both the preset pulse and count pulse are “1”, 14, 15, and 16
Since all AND circuits output “O”, 17 and 18
and 19 AND circuits all output ``O''''. Therefore, the entire OR circuit 24 passes through the D flip-flop 25.
“○” is input to G3, and at the rising edge of the next clock pulse, G3 becomes “o”.G2.G4.G
The same goes for ot G+, and the counter output is cleared. That is, in FIG. 3, the counter output becomes "'○○oO" at the moment g.

次にカウント機能について説明する。第4図に、10進
数の0から32に対応するグレイコード及びそれに対応
する下位4ビツトカウンタのG−1を示す。第5図に、
グレイコードを用いてカウントする時の各ビットの反転
条件を示す。本実施例のグレイコードカウンタでは、グ
レイコードの他に、カウンタ出力の偶奇を表わすG、を
内部で発生している。G、を用いると、グレイコードを
カウントする時にば、GoはG、が“○″の時に反転す
ればよいことが、第4図よシわかる。例えば、カウンタ
出力が10進表示で0の時にはG、は“0″であるので
、次のクロックパルスの立上りエツジでGoは反転し、
カウンタ出力は10進表示の1となる。また、カウンタ
出力が1o進表示で1の時には、G、は“1”であるの
で、次のクロックパルスの立上りエツジでGoは反転し
ない。G1については、Go=1かつG1=1の時のみ
、次のクロックパルスの立上りエツジにおいて反転し、
この反転条件を満たさない時には、G1は保持される。
Next, the count function will be explained. FIG. 4 shows the Gray code corresponding to decimal numbers 0 to 32 and the corresponding lower 4-bit counter G-1. In Figure 5,
The conditions for inverting each bit when counting using Gray code are shown. In addition to the Gray code, the Gray code counter of this embodiment internally generates G, which indicates whether the counter output is even or odd. It can be seen from FIG. 4 that when G is used, when counting the Gray code, Go can be inverted when G is "○". For example, when the counter output is 0 in decimal notation, G is "0", so Go is inverted at the rising edge of the next clock pulse,
The counter output becomes 1 in decimal notation. Furthermore, when the counter output is 1 in 10-base representation, G is "1", so Go is not inverted at the rising edge of the next clock pulse. Regarding G1, it is inverted at the rising edge of the next clock pulse only when Go=1 and G1=1,
When this reversal condition is not satisfied, G1 is held.

G2は、G1=1かつGQ =OかつG−1=1の時の
み、次のクロックパルスの立上リエッジにおいて反転す
る。G3はG2=1かつG1=0かつGQ =QかつQ
1==1の時のみ、次のクロックパルスの立上りエツジ
において反転する。この第5図だ示される計数アルゴリ
ズムを具現化したのが第1図である。
G2 is inverted on the rising edge of the next clock pulse only when G1=1 and GQ=O and G-1=1. G3 is G2=1 and G1=0 and GQ =Q and Q
Only when 1==1 does it invert on the rising edge of the next clock pulse. FIG. 1 embodies the counting algorithm shown in FIG. 5.

端子10から入力されるプリセントパルスが1“OI′
で、端子11から入力されるカウントパルスが“1″の
時、14と15の論理積回路は“0”を出力するため、
17と18の論理積回路は“0”を出力する。従って、
論理和回路24を通してDフリップ70ツブ25には、
論理積回路19の出力データが入力される。一方、論理
積回路21はG2゜G、、 G、)、 G  、=1の
時のみ、1を出力するので、22の排他的論理和回路は
、G2・G1・Go−G、−の時にはG3を出力する。
The present pulse input from terminal 10 is 1"OI'
So, when the count pulse input from terminal 11 is "1", the AND circuit of 14 and 15 outputs "0", so
The AND circuit of 17 and 18 outputs "0". Therefore,
Through the OR circuit 24 to the D flip 70 tube 25,
Output data of the AND circuit 19 is input. On the other hand, since the AND circuit 21 outputs 1 only when G2゜G,, G,), G, = 1, the exclusive OR circuit 22 outputs 1 when G2, G1, Go-G, -. Output G3.

故に、Dフ’J ノブフロップ25には、G2. G1
. Go、 G 、 = 1の時には、G3の反転デー
タが入力され、G2” GI’ GO”−j=Oの時に
は、G3が入力され、次のクロックパルスの立上りエツ
ジにおいて、第5図の計数アルゴリズムにもとづいてカ
ウント動作をする。G2゜G、、Goも第6図の計数ア
ルゴリズムに基づいて、第1図の構成によってカウント
動作をする。
Therefore, Df'J knob flop 25 has G2. G1
.. When Go, G, = 1, the inverted data of G3 is input, and when G2"GI'GO"-j = O, G3 is input, and at the rising edge of the next clock pulse, the counting algorithm of Fig. 5 is executed. The counting operation is performed based on the following. G2°G, . . . Go also performs counting operations based on the counting algorithm shown in FIG.

第6図は、本発明の第2の実施し]1におけるグレイコ
ードカウンタの構成を示すものである。第6図において
、1から26は第1図と同じ内容のものである。40は
、上位偶奇データ入力端子で、上位接続するカウンタに
入力されるデータ中の“1″の数が、偶数であれば“○
“ゝが入力され、奇数であれば“°1″が入力される。
FIG. 6 shows the configuration of the Gray code counter in the second embodiment 1 of the present invention. In FIG. 6, numerals 1 to 26 have the same contents as in FIG. 40 is an upper even-odd data input terminal, and if the number of "1"s in the data input to the counter connected to the upper order is an even number, "○" is input.
“ゝ” is input, and if it is an odd number, “°1” is input.

41は、カウンタ入力偶奇データ出力端子で、端子1.
 2. 3. 4から入力されるデータ中の0111の
数が、偶数であれば”0″2が出力され、奇数であれば
′”1 ″が出力される。42ば、排他的論理和回路で
ある。本実施例のグレイコードカウンタを1段で使用す
る時には、端子40からは”o’が入力され、第1の実
施例のグレイコードカウンタと同様にして、プリセット
動作、ホールド動作、クリア動作、カウント動作をする
41 is a counter input even-odd data output terminal;
2. 3. If the number of 0111s in the data input from 4 is an even number, "0"2 is output, and if it is odd, "1" is output. 42 is an exclusive OR circuit. When the Gray code counter of this embodiment is used in one stage, "o" is input from the terminal 40, and in the same way as the Gray code counter of the first embodiment, preset operation, hold operation, clear operation, and counting are performed. take action.

次に縦続接続について説明する。第7図に、本実施例の
グレイコードカウンタを2個縦続接続して8ビツトのグ
レイコードカウンタを構成する場合の接続図を示す。第
7図において、27はプリセット値入力端子、28はグ
レイコードカウンタ出力端子、29はクロックパルス入
力端子、3゜はカウントパルス入力端子、31はプリセ
ットパルス入力端子、32は上位4ピントカウンタ、3
3は下位4ビツトカウンタ、34は論理和回路、35は
論理積回路である。以下、上位4ビツトカウンタのGO
,Gl・G2・G5を04・Cr5. G6. G7と
呼ぶ。
Next, cascade connections will be explained. FIG. 7 shows a connection diagram when two Gray code counters of this embodiment are connected in series to form an 8-bit Gray code counter. In FIG. 7, 27 is a preset value input terminal, 28 is a gray code counter output terminal, 29 is a clock pulse input terminal, 3° is a count pulse input terminal, 31 is a preset pulse input terminal, 32 is an upper 4 pint counter, 3
3 is a lower 4-bit counter, 34 is an OR circuit, and 35 is an AND circuit. Below is the GO of the upper 4 bit counter.
, Gl/G2/G5 to 04/Cr5. G6. It's called G7.

カウント動作時(プリセットパルスが11011で、し
かもカウントパルスが“1″の時)には、下位4ビツト
カウンタの桁上げ出力が上位4ビツトカウンタのカウン
トパルス入力に入力される。下位4ビツトカウンタの桁
上げ出力は、カウンタがカウント動作中でカウンタ出力
が10進表示で15の時(カウントパルスが“1″′で
、しかもε2゜01・GO・G、=1の時)に、“1″
を出力する。
During counting operation (when the preset pulse is 11011 and the count pulse is "1"), the carry output of the lower 4-bit counter is input to the count pulse input of the upper 4-bit counter. The carry output of the lower 4-bit counter occurs when the counter is in counting operation and the counter output is 15 in decimal notation (when the count pulse is "1'' and ε2゜01・GO・G,=1) ``1''
Output.

この時のみ上位4ビツトカウンタはカウント動作をし、
その他の時には、上位4ビツトカウンタの出力は保持さ
れる。このように、カウンタに上位接続がある場合には
、その桁上げ出力を上位カウンタのカウントパルス入力
に接続することによって、縦続接続によるカウント動作
が可能となる。
Only at this time, the upper 4-bit counter performs counting operation,
At other times, the output of the upper 4-bit counter is held. In this way, when a counter has an upper-level connection, by connecting its carry output to the count pulse input of the upper-level counter, a cascade-connected counting operation becomes possible.

即ち、第3図において、β以降で下位カウンタはカウン
ト動作し、mからnの間で下位カウンタの桁上げ出力が
′”1”となり、その信号が、上位カウンタのカウント
パルス入力に入力されることKより、その時、上位カウ
ンタもカウント動作をする。カウンタの上位接続がない
場合には、第7図に示されるようにカウンタの桁上げ出
力を、プリセットパルス入力に入力すればよい。これに
よって、カウンタ出力が10進表示で15で、カウント
パルス入力が′”1″の時、プリセットパルス入力が1
111+となり次のクロックパルスの立上りエツジにお
いてカウンタ出力はクリアされる。この接続がない場合
には、カウンタ出力は”13,14゜15.15,14
,13.12・・・・・・″のようにカウントダウン動
作をすることになる。
That is, in FIG. 3, the lower counter performs a counting operation after β, and the carry output of the lower counter becomes ``1'' between m and n, and that signal is input to the count pulse input of the upper counter. From K, at that time, the upper counter also performs a counting operation. If the counter is not connected to an upper level, the carry output of the counter may be input to the preset pulse input as shown in FIG. With this, when the counter output is 15 in decimal notation and the count pulse input is ``1'', the preset pulse input is 1.
111+, and the counter output is cleared at the rising edge of the next clock pulse. If this connection is not made, the counter output will be “13, 14° 15.15, 14
, 13.12...''.

縦続接続をしている場合にも、プリセット機能。Preset function even when cascading connections.

ホールド機能、クリア機能を損なわないように、論理和
回路34及び論理積回路36が接続されている。これに
よって、プリセットバルスが“1+1でカウントパルス
が“○”の時には、上位カウンタも下位カウンタもプリ
セットされ、プリセットパルスが“1″でカウントパル
スもN′1″の時には、上位カウンタも下位カウンタも
クリアされる。
An OR circuit 34 and an AND circuit 36 are connected so as not to impair the hold function and clear function. As a result, when the preset pulse is "1+1" and the count pulse is "○", both the upper and lower counters are preset, and when the preset pulse is "1" and the count pulse is N'1", both the upper and lower counters are preset. cleared.

プリセットパルスが1“Q″でカウントパルスも” o
 ”の時には、上位カウンタも下位カウンタもホールド
される。第7図においては、カウンタの外部に論理和回
路や論理積回路を接続することで縦続接続を可能にして
いるが、これらの回路をカウンタ出力に設ければ、外部
回路の接続なしで、複数のカウンタ間の接続だけで、縦
続接続をしている時にも、カウンタば、プリセット機能
、ホールド機能、クリア機能、カウント機能を果たす。
The preset pulse is 1 “Q” and the count pulse is also “o”
”, both the upper and lower counters are held. In Fig. 7, cascade connection is possible by connecting an OR circuit or an AND circuit outside the counter, but these circuits cannot be connected to the counter. If provided at the output, the counters can perform preset, hold, clear, and count functions without the need for external circuit connections and by simply connecting multiple counters, even when connected in cascade.

発明の詳細 な説明したように、本発明によれば、2進コードカウン
タと同程度の規模のハードウェアで、2進コードカウン
タの機能を全く損なわないグレイコードカウンタを構成
することができる。このようなグレイコードカウンタを
IC化して、従来の2進コードカウンタに置換えると、
その実用的効果は大きい。
As described in detail, according to the present invention, it is possible to construct a Gray code counter that does not impair the functionality of a binary code counter at all, using hardware of the same scale as a binary code counter. If such a Gray code counter is made into an IC and replaced with a conventional binary code counter,
Its practical effects are great.

本発明のグレイコードカウンタを、画像情報の記憶装置
などのように近接するアドレスのデータ間に非常に大き
な相関があるデータを記憶しているメモリーのアドレス
カウンタとして有用である。
The Gray code counter of the present invention is useful as an address counter for a memory that stores data that has a very large correlation between data at adjacent addresses, such as an image information storage device.

従来の2進コードカウンタでは、メモリーからの転送レ
ートを高速にした時に、アドレスカウンタ出力からメモ
リーのアドレス入力までの各ビットのわずかな遅延時間
の差によって、アドレスが1ビット程度誤まったデータ
にアクセスしてしまった場合に、設計者の意図とは全く
異なるアドレスのデータを出力するという問題点を有し
ていた。
With conventional binary code counters, when the transfer rate from memory is increased, the address may be incorrect by about 1 bit due to the slight delay time difference between each bit from the address counter output to the memory address input. When accessed, there is a problem in that data at an address completely different from the designer's intention is output.

本発明のグレイコードカウンタをアドレスカウンタとし
て用いると、メモリーのアドレス入力が1ビット程度誤
まっていても、真のアドレスに近接したアドレスのデー
タにアクセスすることになり、画像情報などのように近
接するアドレスのデータ間に大きな差がない情報が記憶
されている場合には、真のデータと大きな差がないデー
タがメモリーから出力されることになる。
When the Gray code counter of the present invention is used as an address counter, even if the address input to the memory is incorrect by about 1 bit, data at an address close to the true address will be accessed. If information is stored that does not have a large difference between the data at the address, the data that does not have a large difference from the true data will be output from the memory.

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

第1図は本発明における第1の実施例のグレイコードカ
ウンタの構成図、第2図はグレイコードカウンタの機能
説明図、第3図は同実施例の動作を示すタイムチャート
、第4図、第5図はカウント機能の説明図、第6図は本
発明における第2の実施例のグレイコードカウンタの構
成図、第7図は同実施例のグレイコードカウンタを縦続
接続する時の接続図、第8図は従来のグレイコードカウ
ンタの構成図である。 1.2,3.4・・・・・・プリセット値入力端子、5
゜6、 7. 8・・・・・・カウンタ出力端子、9・
・・・・・桁上げ出力端子、1Q・・・・・・プリセッ
トパルス入力端子、11・・・・・・カウントパルス入
力端子、12・・・・・・クロックパルス入力端子、2
1・・・・・・論理積回路、26・・・・・・Dフリッ
プフロップ、40・・・・・・上位偶奇データ入力端子
、41・・・・・・カウンタ入力偶奇データ出力端子。 代理人の氏名 弁理士 中 尾 敏 男 ほか1名第2
図 の  笹 ε99 旦らら9・ミ 第4図     第5図 第7図 第8図 l
FIG. 1 is a configuration diagram of a Gray code counter according to a first embodiment of the present invention, FIG. 2 is a functional explanatory diagram of the Gray code counter, FIG. 3 is a time chart showing the operation of the same embodiment, and FIG. FIG. 5 is an explanatory diagram of the counting function, FIG. 6 is a configuration diagram of the Gray code counter of the second embodiment of the present invention, and FIG. 7 is a connection diagram when the Gray code counters of the same embodiment are connected in cascade. FIG. 8 is a block diagram of a conventional Gray code counter. 1.2, 3.4... Preset value input terminal, 5
゜6, 7. 8...Counter output terminal, 9.
...Carry output terminal, 1Q...Preset pulse input terminal, 11...Count pulse input terminal, 12...Clock pulse input terminal, 2
1...AND circuit, 26...D flip-flop, 40...Upper even-odd data input terminal, 41...Counter input even-odd data output terminal. Name of agent: Patent attorney Toshio Nakao and 1 other person 2nd
Fig. Sasa ε99 Danrara 9/mi Fig. 4 Fig. 5 Fig. 7 Fig. 8 l

Claims (1)

【特許請求の範囲】[Claims] プリセット動作とホールド動作とクリア動作とカウント
動作を選択する手段と、カウンタ出力データの偶数/奇
数を表わす信号を発生する手段と、カウント動作時の各
ビットの反転条件を判定する手段と、カウンタの縦続接
続を可能にする桁上げ出力を発生する手段とを備えたこ
とを特徴とするグレイコードカウンタ。
A means for selecting a preset operation, a hold operation, a clear operation, and a counting operation, a means for generating a signal representing an even/odd number of counter output data, a means for determining an inversion condition for each bit during a counting operation, A Gray code counter comprising means for generating a carry output to enable cascade connection.
JP14321186A 1986-03-20 1986-06-19 Gray code counter Pending JPS6323422A (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP6230186 1986-03-20
JP61-62301 1986-03-20

Publications (1)

Publication Number Publication Date
JPS6323422A true JPS6323422A (en) 1988-01-30

Family

ID=13196167

Family Applications (1)

Application Number Title Priority Date Filing Date
JP14321186A Pending JPS6323422A (en) 1986-03-20 1986-06-19 Gray code counter

Country Status (1)

Country Link
JP (1) JPS6323422A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0341813A (en) * 1989-07-10 1991-02-22 Hitachi Ltd Timing signal generating circuit
JPH04223618A (en) * 1990-12-25 1992-08-13 Matsushita Electron Corp Semiconductor device
EP1829811A2 (en) 2006-03-04 2007-09-05 Kobelco Cranes Co., Ltd. Working machine
JP2018160817A (en) * 2017-03-23 2018-10-11 セイコーエプソン株式会社 Counter circuit, measuring device, and physical quantity sensor

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0341813A (en) * 1989-07-10 1991-02-22 Hitachi Ltd Timing signal generating circuit
JPH04223618A (en) * 1990-12-25 1992-08-13 Matsushita Electron Corp Semiconductor device
EP1829811A2 (en) 2006-03-04 2007-09-05 Kobelco Cranes Co., Ltd. Working machine
US7419064B2 (en) 2006-03-04 2008-09-02 Kobelco Cranes Co., Ltd Working machine
JP2018160817A (en) * 2017-03-23 2018-10-11 セイコーエプソン株式会社 Counter circuit, measuring device, and physical quantity sensor

Similar Documents

Publication Publication Date Title
JPS6323422A (en) Gray code counter
JP2668180B2 (en) Absolute value comparison device
JPS61253918A (en) Logic circuit
JPH0653818A (en) Multi-bit gray code counter
JPH0332212A (en) Signal processing circuit for multiplication
JPS63279619A (en) Semiconductor circuit
JPS63163654A (en) Device for selecting input/output unit
JPS6184123A (en) Logical intergrated circuit
JP2687793B2 (en) Error rate alarm circuit with hysteresis
SU369715A1 (en) THIRD POTENTIAL TRIGGER
JP2513021B2 (en) Signed digit number sign judgment circuit
JPH02201538A (en) Counter
JPS58121867A (en) Run length decoder
JPS61144128A (en) Serial data decoding circuit
JPH04192720A (en) Digital counter circuit
JPS5843049A (en) Correcting system of micro electronic computer
JPS5824819B2 (en) Hiyoji Seigiyohoushiki
JPH0779247B2 (en) Decode circuit
JPH0635668A (en) Full adder
JPS61105119A (en) Multi-line type multi-value logic circuit
JPS607815B2 (en) Overflow detection and correction circuit
JPH01284116A (en) Electronic circuit
JPH04227582A (en) Address counter
JPS6392987A (en) Display device
JPS6079829A (en) Code converting circuit