JPH0423965B2 - - Google Patents

Info

Publication number
JPH0423965B2
JPH0423965B2 JP5798786A JP5798786A JPH0423965B2 JP H0423965 B2 JPH0423965 B2 JP H0423965B2 JP 5798786 A JP5798786 A JP 5798786A JP 5798786 A JP5798786 A JP 5798786A JP H0423965 B2 JPH0423965 B2 JP H0423965B2
Authority
JP
Japan
Prior art keywords
signal
output
circuit
carry
level
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired
Application number
JP5798786A
Other languages
Japanese (ja)
Other versions
JPS62214725A (en
Inventor
Masahiro Inaba
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.)
Koki Holdings Co Ltd
Original Assignee
Hitachi Koki 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 Hitachi Koki Co Ltd filed Critical Hitachi Koki Co Ltd
Priority to JP5798786A priority Critical patent/JPS62214725A/en
Publication of JPS62214725A publication Critical patent/JPS62214725A/en
Publication of JPH0423965B2 publication Critical patent/JPH0423965B2/ja
Granted legal-status Critical Current

Links

Landscapes

  • Measurement Of Length, Angles, Or The Like Using Electric Or Magnetic Means (AREA)
  • Transmission And Conversion Of Sensor Element Output (AREA)

Description

【発明の詳細な説明】 〔発明の利用分野〕 本発明は計数装置に係り、特にカウンタ回路と
マイクロコンピユータ回路とを組合わせて位置決
め装置などの現在位置情報を得るのに好適な計数
装置に関するものである。
[Detailed Description of the Invention] [Field of Application of the Invention] The present invention relates to a counting device, and particularly to a counting device suitable for obtaining current position information of a positioning device or the like by combining a counter circuit and a microcomputer circuit. It is.

〔発明の背景〕[Background of the invention]

従来のこの種の計数装置においては、インクレ
メンタル形エンコーダの2相信号出力からアブソ
リユート形の現在位置情報を得るため、カウンタ
回路とマイクロコンピユータ回路とを組合わせ、
マイクロコンピユータのソフトウエア処理によ
り、カウンタ回路にキヤリーあるいはボロー信号
が発生すれば、これに対応してマイクロコンピユ
ータ回路のメモリ内のカウント値記憶部の値をイ
ンクレメント、デクレメントし、上位桁の繰り上
げ、繰り下げを行い、カウンタ回路の出力を1の
桁、カウント値記憶部を10の桁以上の上位桁に割
り当て、多数の桁の現在位置を得ている。
In conventional counting devices of this type, in order to obtain absolute current position information from the two-phase signal output of an incremental encoder, a counter circuit and a microcomputer circuit are combined.
When a carry or borrow signal is generated in the counter circuit by the software processing of the microcomputer, the value in the count value storage section in the memory of the microcomputer circuit is incremented or decremented in response to this, and the upper digits are carried up. , is carried down, and the output of the counter circuit is assigned to the 1's digit, and the count value storage section is assigned to the upper digits of the 10's digit or higher, thereby obtaining the current positions of many digits.

すなわち、カウンタ回路のキヤリー、ボロー信
号出力は、マイクロコンピユータ回路の割り込み
入力信号として与えられ、エンコーダの2相信号
出力の位相から現在のカウント方向を判別する方
向判別回路の信号出力は、桁の繰り上げか繰り下
げかを判断する処理内容選択信号として入力され
ており、例えば、カウンタ回路にキヤリー信号が
発生した場合、カウンタ回路からマイクロコンピ
ユータ回路に割り込み信号が発生されると、マイ
クロコンピユータは所定の割り込み処理を実行
し、このとき、方向判別回路の処理内容選択信号
出力はカウントアツプを示すので、カウント値記
憶部をインクレメントし、10の桁の繰り上げを行
う。
In other words, the carry and borrow signal outputs of the counter circuit are given as interrupt input signals of the microcomputer circuit, and the signal output of the direction determination circuit that determines the current counting direction from the phase of the two-phase signal output of the encoder is used to carry up the digit. For example, if a carry signal is generated in the counter circuit, and an interrupt signal is generated from the counter circuit to the microcomputer circuit, the microcomputer will execute the specified interrupt process. At this time, the processing content selection signal output from the direction determining circuit indicates a count up, so the count value storage section is incremented and carried to the nearest ten.

しかしながら、かかる計数装置においては、位
置決め目標が、カウンタ回路がキヤリー、ボロー
信号を発生する1の位が0の節目の位置である場
合、位置決め動作の収束の過程で、この位置を中
心にカウントアツプ、カウントダウンが行われ、
このとき、エンコーダの回転方向の反転による高
速な1カウントのアツプダウンが発生すると、上
位桁の繰り上げ、繰り下げにマイクロコンピユー
タの処理が追従できず、カウントアツプ時のキヤ
リー信号でマイクロコンピユータが割り込み処理
を開始するが、処理の途上の方向判別回路の処理
内容選択信号出力をチエツクするタイミングにお
いては、出力がすでにカウントダウンを示してい
るので、10の桁は繰り下げを実行し、例えば、
10進カウンタであれば、10カウント分だけ現在位
置情報に誤りが生ずるという欠点があつた。
However, in such a counting device, if the positioning target is a node position where the 1's digit is 0 at which the counter circuit generates a carry/borrow signal, the count up is performed around this position in the process of convergence of the positioning operation. , a countdown takes place,
At this time, if a high-speed one-count up-down occurs due to the reversal of the encoder's rotational direction, the microcomputer's processing cannot keep up with the increment or increment of the higher-order digits, and the microcomputer starts interrupt processing with the carry signal when the count up occurs. However, at the timing when the processing content selection signal output of the direction discriminating circuit is checked in the middle of processing, the output already indicates a countdown, so the digit of 10 is carried down, and for example,
A decimal counter had the disadvantage that the current position information would be incorrect by 10 counts.

〔発明の目的〕[Purpose of the invention]

本発明の目的は、上記した従来技術の欠点をな
くし、エンコーダの回転方向の高速な反転による
カウント方向の変化に対して適切な処理を行うこ
とができ、現在位置情報に誤りを生じないように
できる計数装置を提供することにある。
An object of the present invention is to eliminate the above-mentioned drawbacks of the prior art, to be able to appropriately process changes in the counting direction due to high-speed reversal of the rotational direction of the encoder, and to prevent errors from occurring in current position information. Our goal is to provide a counting device that can.

〔発明の概要〕[Summary of the invention]

本発明の特徴は、アツプダウンカウンタのカウ
ント方向に対応した論理信号を出力する方向判別
回路と、キヤリーあるいはボロー信号によりトリ
ガされて上記方向判別回路の出力信号を記憶する
記憶回路とを備え、マイクロコンピユータは、上
記キヤリーあるいはボロー信号を割り込み信号と
して入力し、割り込みルーチンにより桁上げある
いは桁下げ処理を行い、また、上記方向判別回路
の信号出力と上記記憶回路の信号出力とが一致し
ているか否かを判断し、一致であれば上記方向判
別回路の出力に対応して桁上げあるいは桁下げを
実行し、不一致であれば桁の上げ下げは不実行と
する構成とした点にある。
The present invention is characterized by comprising a direction discrimination circuit that outputs a logic signal corresponding to the counting direction of an up-down counter, and a storage circuit that is triggered by a carry or borrow signal and stores the output signal of the direction discrimination circuit. The computer inputs the above-mentioned carry or borrow signal as an interrupt signal, performs carry-up or carry-down processing according to the interrupt routine, and also checks whether the signal output of the direction determination circuit and the signal output of the storage circuit match. If they match, a carry or a carry is executed in response to the output of the direction determining circuit, and if they do not match, the digit is not moved up or down.

〔発明の実施例〕[Embodiments of the invention]

以下本発明を第1図、第3図に示した実施例お
よび第2図を用いて詳細に説明する。
The present invention will be explained in detail below with reference to the embodiments shown in FIGS. 1 and 3 and FIG. 2.

第1図は本発明の計数装置の一実施例を示すブ
ロツク図で、第2図はキヤリー信号発生直後に回
転方向が反転してボロー信号が出力される過程の
第1図の各部信号出力状態を示すタイムチヤート
である。第1図において、1は直流電源、2は位
置決め用モータ、3はモータ2の出力軸に直結し
た2相信号を出力するロータリーエンコーダ、4
〜7はそれぞれトランジスタであり、8〜11は
それぞれトランジスタ4〜7に並列に接続したフ
ライトバツク用ダイオードであり、H形ブリツジ
回路を形成している。12〜15はそれぞれトラ
ンジスタ4〜7のベースに接続した抵抗器、16
〜19はそれぞれバツフアドライバである。20
はマイクロコンピユータ回路で、バツフアドライ
バ16〜19にそれぞれトランジスタ4〜7のオ
ン信号21〜24を出力している。すなわち、マ
イクロコンピユータ回路20からオン信号22,
24が出力されると、トランジスタ4,7がオン
し、位置決め用モータ2は時計方向に回転し、一
方、オン信号21,23が出力されると、トラン
ジスタ5,6がオンし、位置決め用モータ2は反
時計方向に回転し、これらにより位置決め動作が
行われる。
Fig. 1 is a block diagram showing an embodiment of the counting device of the present invention, and Fig. 2 shows the signal output state of each part in Fig. 1 during the process in which the rotation direction is reversed immediately after the carry signal is generated and a borrow signal is output. This is a time chart showing. In Figure 1, 1 is a DC power supply, 2 is a positioning motor, 3 is a rotary encoder that outputs a two-phase signal and is directly connected to the output shaft of motor 2, and 4
7 to 7 are transistors, and 8 to 11 are flight back diodes connected in parallel to transistors 4 to 7, respectively, forming an H-type bridge circuit. 12-15 are resistors connected to the bases of transistors 4-7, respectively; 16
-19 are buffer drivers, respectively. 20
is a microcomputer circuit which outputs ON signals 21 to 24 for transistors 4 to 7 to buffer drivers 16 to 19, respectively. That is, the on signal 22 from the microcomputer circuit 20,
When 24 is output, transistors 4 and 7 are turned on, and the positioning motor 2 rotates clockwise.On the other hand, when on signals 21 and 23 are output, transistors 5 and 6 are turned on, and the positioning motor 2 is turned on. 2 rotates counterclockwise, and positioning operation is performed by these.

25,26はそれぞれロータリーエンコーダ3
の2相信号φA、φBの入力端子であり、27は
φA信号の立上がりでパルスを出力するマルチバ
イブレータ、28はφA信号の論理を反転するノ
ツトゲート、29はノツトゲート28の出力信号
の立上がりでパルスを出力するマルチバイブレー
タである。30,31はそれぞれナンドゲート、
32はカウンタ回路となるアツプダウンカウンタ
で、ナンドゲート30はマルチバイブレータ27
のQ信号およびφB信号を入力し、アツプダウン
カウンタ32にアツプカウント信号33を出力
し、ナンドゲート31はマルチバイブレータ29
のQ信号およびφB信号を入力し、アツプダウン
カウンタ32にダウンカウント信号34を出力す
る。35は方向判別回路で、ナンドゲート36,
37の2つのゲートの交差結合によりラツチ回路
が構成してあり、方向信号38をマイクロコンピ
ユータ回路20に出力する。すなわち、アツプカ
ウント時にはアツプカウント信号33によりナン
ドゲート36の入力端の1つが“L”レベルにな
ると、“H”レベルの方向信号38を出力し、反
対にダウンカウント時であればダウンカウント信
号34によりナンドゲート37の入力端の1つが
“L”レベルになり、“L”レベルの方向信号38
を出力する。39,40はそれぞれアツプダウン
カウンタ32のキヤリー信号、ボロー信号であ
り、41はこれらの信号39,40のアンドを取
るアンドゲートで、42はアンドゲート41の出
力信号の立上がりでトリガされる第1の伝達回路
となるD型フリツプフロツプで、そのD入力端子
はプルアツプされ、論理入力は“H”レベルに固
定されており、トリガによりQ出力端子から
“H”レベルのセツト信号43が出力される。4
4はマルチバイブレータで、その出力端子か
ら、フリツプフロツプ42のセツト信号43の立
上がりにより“L”レベルのパルス信号が割り込
み信号45としてマイクロコンピユータ回路20
の割り込み入力端子に出力される。46はセツト
信号43の立上がりでトリガされる第2の記憶回
路となるD型フリツプフロツプで、そのD入力端
子には方向信号38が入力され、Q出力端子から
方向ラツチ信号47がマイクロコンピユータ回路
20に出力される。50はマイクロコンピユータ
回路20から出力されるリセツト信号で、フリツ
プフロツプ42のクリア入力端子CLRに出力さ
れる。51はアツプダウンカウンタ32からマイ
クロコンピユータ回路20に出力される例えば、
1バイトの現在位置情報の最下位情報で、52は
マイクロコンピユータ回路20内に設けられてい
る記憶部となるランダム・アクセス、メモリ
(RAM)であり、現在位置情報の上位情報を記
憶している。
25 and 26 are rotary encoders 3, respectively.
27 is a multivibrator that outputs a pulse at the rising edge of the φA signal, 28 is a not gate that inverts the logic of the φA signal, and 29 is an input terminal that outputs a pulse at the rising edge of the output signal of the not gate 28. It is a multi-vibrator that outputs. 30 and 31 are Nand Gate, respectively.
32 is an up-down counter serving as a counter circuit, and NAND gate 30 is a multivibrator 27.
inputs the Q signal and φB signal of , outputs the up count signal 33 to the up down counter 32,
It inputs the Q signal and the φB signal, and outputs the down count signal 34 to the up down counter 32. 35 is a direction discrimination circuit, NAND gate 36,
A latch circuit is constructed by cross-coupling two gates 37, and outputs a direction signal 38 to the microcomputer circuit 20. That is, when one of the input terminals of the NAND gate 36 becomes "L" level due to the up count signal 33 during up counting, the direction signal 38 at the "H" level is output; One of the input terminals of the NAND gate 37 becomes "L" level, and the direction signal 38 of "L" level
Output. 39 and 40 are a carry signal and a borrow signal of the up-down counter 32, respectively; 41 is an AND gate that ANDs these signals 39 and 40; and 42 is a first The D-type flip-flop serves as a transmission circuit, and its D input terminal is pulled up, its logic input is fixed at the "H" level, and a set signal 43 at the "H" level is output from the Q output terminal in response to a trigger. 4
4 is a multivibrator, and when the set signal 43 of the flip-flop 42 rises, a pulse signal of "L" level is sent from the output terminal of the multivibrator to the microcomputer circuit 20 as an interrupt signal 45.
output to the interrupt input pin. Reference numeral 46 denotes a D-type flip-flop which serves as a second storage circuit that is triggered by the rising edge of the set signal 43; the direction signal 38 is input to its D input terminal, and the direction latch signal 47 is sent to the microcomputer circuit 20 from its Q output terminal. Output. A reset signal 50 is output from the microcomputer circuit 20 and is output to the clear input terminal CLR of the flip-flop 42. 51 is output from the up-down counter 32 to the microcomputer circuit 20, for example,
This is the lowest information of 1 byte of current position information, and 52 is a random access memory (RAM) which is a storage section provided in the microcomputer circuit 20 and stores upper information of the current position information. .

第3図は第1図のマイクロコンピユータ回路2
0におけるソフトウエア処理の一実施例を示すフ
ロチヤートである。次に、上記の構成における動
作について第2図、第3図を参照しながら説明す
る。第2図に示すように、φB信号26がφA信号
25よりも位相が進んでいるアツプカウントの状
態にあると、φA信号25の立上がりでマルチバ
イブレータ27がトリガされ、ナンドゲート30
の一入力端子に“H”レベルのパルスが出力され
る。このとき、ナンドゲート30の他の入力端子
には“H”レベルのφB信号26が到来するので、
ナンドゲート30は“L”レベルのアツプカウン
ト信号33を方向判別回路35およびカウンタ3
2に出力し、方向判別回路35の方向信号38は
“H”レベルの状態を保ち、カウンタ32はアツ
プカウント信号33の立上がりにおいてカウント
アツプを実行する。この状態では、φA信号25
の立下がりでマルチバイブレータ29がトリガさ
れ、ナンドゲート31の一入力端子に“H”レベ
ルのパルスが出力されるが、他の入力端子のφB
信号26は、このタイミングにおいて“L”レベ
ルにあるので、ナンドゲート31のダウンカウン
ト信号34は“H”レベルの状態に保たれてい
る。カウンタ32のカウントアツプの途上でカウ
ンタ32がオーバーフローすると、“L”レベル
のキヤリー信号39が出力され、フリツプフロツ
プ42からは“H”レベルのセツト信号43がマ
ルチバイブレータ44およびフリツプフロツプ4
6に出力される。この瞬間の方向信号38はアツ
プカウントであるから“H”レベルにあり、方向
ラツチ信号47は“H”レベルに固定される。マ
ルチバイブレータ44の“L”レベルの割り込み
信号出力45によつてマイクロコンピユータ回路
20は割り込み処理を実行する。
Figure 3 shows the microcomputer circuit 2 in Figure 1.
1 is a flowchart showing an example of software processing in 0. Next, the operation of the above configuration will be explained with reference to FIGS. 2 and 3. As shown in FIG. 2, when the φB signal 26 is in an up-count state leading in phase to the φA signal 25, the multivibrator 27 is triggered at the rising edge of the φA signal 25, and the NAND gate 30
An "H" level pulse is output to one input terminal of. At this time, the "H" level φB signal 26 arrives at the other input terminal of the NAND gate 30, so
The NAND gate 30 outputs the "L" level up count signal 33 to the direction determining circuit 35 and the counter 3.
The direction signal 38 of the direction determining circuit 35 remains at the "H" level, and the counter 32 counts up when the up count signal 33 rises. In this state, the φA signal 25
The multivibrator 29 is triggered by the fall of φB, and a high level pulse is output to one input terminal of the NAND gate 31, but
Since the signal 26 is at the "L" level at this timing, the down count signal 34 of the NAND gate 31 is kept at the "H" level. When the counter 32 overflows while the counter 32 is counting up, a carry signal 39 of "L" level is output, and a set signal 43 of "H" level is output from the flip-flop 42 to the multivibrator 44 and the flip-flop 4.
6 is output. At this moment, the direction signal 38 is at the "H" level since it is an up count, and the direction latch signal 47 is fixed at the "H" level. The microcomputer circuit 20 executes interrupt processing in response to the "L" level interrupt signal output 45 of the multivibrator 44.

第3図のフローチヤートにしたがつて割り込み
処理を説明すると、まず、方向ラツチ信号47の
チエツクを行い、ここでは“H”レベルであるか
ら、方向信号38が“H”レベルであるか否かの
判断処理に進む。このときまでにロータリーエン
コーダ3の回転方向の反転がないとすれば、方向
信号38の論理出力は“H”レベルにあり、現在
位置情報の上位情報のインクレメント処理へ進
む。すなわち、RAM52のN番地に記憶されて
いる上位の位置情報をインクレメントし、この結
果、キヤリー信号が発生すれば、RAM52のN
−1番地に記憶されているさらに上位の位置情報
をインクレメントし、現在位置情報を更新し、処
理の終りにおいて、リセツト信号50の“L”レ
ベルのパルス出力処理を実行し、フリツプフロツ
プ42を一旦クリアし、新たなキヤリー信号39
あるいはボロー信号40によりフリツプフロツプ
42がセツトされ、割り込み信号45が発生でき
るようにし、処理を終了する。
To explain the interrupt processing according to the flowchart of FIG. 3, first, the direction latch signal 47 is checked, and since it is at the "H" level here, it is determined whether the direction signal 38 is at the "H" level or not. Proceed to judgment processing. If there is no reversal of the rotational direction of the rotary encoder 3 by this time, the logical output of the direction signal 38 is at the "H" level, and the process proceeds to increment processing of the higher-order information of the current position information. That is, if the upper position information stored in the N address of the RAM 52 is incremented and a carry signal is generated as a result, the N address of the RAM 52 is incremented.
The higher position information stored at address -1 is incremented, the current position information is updated, and at the end of the process, the reset signal 50 is outputted as an "L" level pulse, and the flip-flop 42 is temporarily turned off. Clear and new carry signal 39
Alternatively, the flip-flop 42 is set by the borrow signal 40, allowing the interrupt signal 45 to be generated, and the process is terminated.

次に、本発明の要点である高速な1カウントの
アツプダウンに対する動作について説明する。マ
ルチバイブレータ44の“L”レベルの割り込み
信号出力45によつてマイクロコンピユータ回路
20は割り込み処理を実行し、第3図のフローチ
ヤートにしたがつて方向ラツチ信号47のチエツ
クを行い、このとき、方向ラツチ信号47は
“H”レベルであるから、方向信号38か“H”
レベルであるか否かの判断処理に進むまでは、前
述の同じであるが、この時点以前において、ロー
タリーエンコーダ3の回転方向の反転が起こり、
カウンタ32にボロー信号が発生し、カウントダ
ウン中であると、方向信号38の論理出力は、第
1番目のダウンカウント信号34により、それま
での“H”レベルから“L”レベルに反転してい
るので、現在位置情報のインクレメント処理は行
わず、リセツト信号50の“L”レベルのパルス
出力処理のみを実行して処理を終了する。
Next, the operation for high-speed one-count up-down, which is the main point of the present invention, will be explained. The microcomputer circuit 20 executes interrupt processing in response to the "L" level interrupt signal output 45 of the multivibrator 44, and checks the direction latch signal 47 according to the flowchart in FIG. Since the latch signal 47 is at the "H" level, the direction signal 38 is also at the "H" level.
The process is the same as described above until proceeding to the process of determining whether or not the level is reached, but before this point, the rotation direction of the rotary encoder 3 is reversed,
When a borrow signal is generated in the counter 32 and the countdown is in progress, the logic output of the direction signal 38 is inverted from the previous "H" level to the "L" level by the first down count signal 34. Therefore, the current position information is not incremented, only the "L" level pulse output processing of the reset signal 50 is performed, and the processing is ended.

以上の説明においては、アツプカウントによる
キヤリー信号39発生の直後に起きたダウンカウ
ントの処理について述べたが、ダウンカウントに
よるボロー信号40の発生の直後にアツプカウン
トが発生しても、同様にして現在位置情報の上位
情報の不用な繰り下げ処理は実行されないことは
明らかである。
In the above explanation, we have talked about the down count processing that occurred immediately after the carry signal 39 was generated due to the up count, but even if the up count occurs immediately after the generation of the borrow signal 40 due to the down count, the current It is clear that unnecessary lowering of the upper-level information of the location information is not performed.

〔発明の効果〕〔Effect of the invention〕

上記した本発明によれば、マイクロコンピユー
タ回路に方向ラツチ信号と方向信号を出力し、割
り込み処理の中でこの2つの信号の論理状態を判
断し、ロータリーエンコーダの反転の有無をチエ
ツクし、もし、反転が発生しているならば、現在
位置情報の上位情報の不用な繰り上げ、繰り下げ
処理を実行しないようにしたから、現在位置情報
に誤りを生じることがなく、常に正確な位置決め
が可能であるという効果がある。
According to the present invention described above, the direction latch signal and the direction signal are output to the microcomputer circuit, the logical states of these two signals are determined during interrupt processing, and the presence or absence of inversion of the rotary encoder is checked. If a reversal has occurred, unnecessary incrementation and decrement of the upper information of the current location information is not performed, so there is no error in the current location information, and accurate positioning is always possible. effective.

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

第1図は本発明の計数装置の一実施例を示すブ
ロツク図、第2図はキヤリー信号発生直後に回転
方向が反転してボロー信号が出力される過程の第
1図の各部信号出力状態を示すタイムチヤート、
第3図は第1図のマイクロコンピユータ回路にお
けるソフトウエア処理の一実施例を示すフローチ
ヤートである。 2……位置決め用モータ、3……ロータリーエ
ンコーダ、20……マイクロコンピユータ回路、
25……φA信号、26……φB信号、27,2
9,44……マルチバイブレータ、32……アツ
プダウンカウンタ、35……方向判別回路、4
2,46……フリツプフロツプ、51……現在位
置情報、52……RAM。
Fig. 1 is a block diagram showing an embodiment of the counting device of the present invention, and Fig. 2 shows the signal output state of each part in Fig. 1 during the process in which the rotation direction is reversed immediately after the carry signal is generated and a borrow signal is output. Time chart showing,
FIG. 3 is a flowchart showing one embodiment of software processing in the microcomputer circuit of FIG. 2...Positioning motor, 3...Rotary encoder, 20...Microcomputer circuit,
25...φA signal, 26...φB signal, 27,2
9, 44...Multi-vibrator, 32...Up-down counter, 35...Direction discrimination circuit, 4
2, 46...Flip-flop, 51...Current position information, 52...RAM.

Claims (1)

【特許請求の範囲】[Claims] 1 エンコーダからの2相信号を入力してアツプ
ダウンカウントを行うアツプダウンカウンタと、
該カウンタの最下位情報を入力してキヤリーある
いはボロー信号により桁上げあるいは桁下げを行
うマイクロコンピユータとよりなるものにおい
て、前記アツプダウンカウンタのカウント方向に
対応した論理信号を出力する方向判別回路と、前
記キヤリーあるいはボロー信号によりトリガされ
て前記方向判別回路の出力信号を記憶する記憶回
路とを備え、前記マイクロコンピユータは、前記
キヤリーあるいはボロー信号を割り込み信号とし
て入力し、割り込みルーチンにより桁上げあるい
は桁下げ処理を行い、また、前記方向判別回路の
信号出力と前記記憶回路の信号出力とが一致して
いるか否かを判断し、一致であれば前記方向判別
回路の出力に対応して桁上げあるいは桁下げを実
行し、不一致であれば桁の上げ下げは不実行とす
る構成としたことを特徴とする計数装置。
1. An up-down counter that inputs the two-phase signal from the encoder and performs up-down counting;
A direction determining circuit that outputs a logic signal corresponding to the counting direction of the up-down counter, in a microcomputer that inputs the lowest information of the counter and carries up or down with a carry or borrow signal; and a memory circuit that is triggered by the carry or borrow signal and stores the output signal of the direction determination circuit, and the microcomputer inputs the carry or borrow signal as an interrupt signal and performs a carry or a carry down according to an interrupt routine. It also determines whether the signal output of the direction discrimination circuit and the signal output of the storage circuit match, and if they match, performs a carry or a digit in response to the output of the direction discrimination circuit. A counting device characterized by having a configuration in which the digit is lowered and if there is a discrepancy, the digit is not raised or lowered.
JP5798786A 1986-03-14 1986-03-14 Counter Granted JPS62214725A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP5798786A JPS62214725A (en) 1986-03-14 1986-03-14 Counter

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP5798786A JPS62214725A (en) 1986-03-14 1986-03-14 Counter

Publications (2)

Publication Number Publication Date
JPS62214725A JPS62214725A (en) 1987-09-21
JPH0423965B2 true JPH0423965B2 (en) 1992-04-23

Family

ID=13071359

Family Applications (1)

Application Number Title Priority Date Filing Date
JP5798786A Granted JPS62214725A (en) 1986-03-14 1986-03-14 Counter

Country Status (1)

Country Link
JP (1) JPS62214725A (en)

Also Published As

Publication number Publication date
JPS62214725A (en) 1987-09-21

Similar Documents

Publication Publication Date Title
JP3173174B2 (en) Speed detector
US5325341A (en) Digital timer apparatus and method
US5233573A (en) Digital data processor including apparatus for collecting time-related information
JPS6266322A (en) Data bus buffer control circuit
JPH07152586A (en) Circular priority encoder
JP2939028B2 (en) Counter circuit for absolute position control of robot
JPS63253220A (en) Measuring instrument for angle of rotation
JPS62214725A (en) Counter
JPH05328734A (en) Microcomputer having built-in motor control circuit
JP2692976B2 (en) Synchronous counter
JPH0580604B2 (en)
JPS6161060A (en) Two-phase pulse directivity discriminating circuit
JPH0753312Y2 (en) Pulse counting device
JPH04225409A (en) Microcomputer system
JPH0653818A (en) Multi-bit gray code counter
JPH05276023A (en) Ic built-in counter circuit and one-chip microcomputer
JPS58120167A (en) Detection of speed
JP3248369B2 (en) Rotary body position detection circuit
JPH0234613Y2 (en)
JP2582470B2 (en) Flexible disk drive
KR890004858Y1 (en) Rotation direction discrimination and rotation counting circuit of motor
JPS63198814A (en) Speed, position, rotation direction detection method
KR940007148B1 (en) Rotational frequency circuit for electric motor
JPS6314497Y2 (en)
JPH065175B2 (en) Absolute type encoder