JPS60140434A - Scheduler timer - Google Patents

Scheduler timer

Info

Publication number
JPS60140434A
JPS60140434A JP58250140A JP25014083A JPS60140434A JP S60140434 A JPS60140434 A JP S60140434A JP 58250140 A JP58250140 A JP 58250140A JP 25014083 A JP25014083 A JP 25014083A JP S60140434 A JPS60140434 A JP S60140434A
Authority
JP
Japan
Prior art keywords
output
register
registers
flip
microprocessor
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
JP58250140A
Other languages
Japanese (ja)
Inventor
Kiyoshi Takahashi
潔 高橋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NEC Corp
Original Assignee
NEC Corp
Nippon Electric Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NEC Corp, Nippon Electric Co Ltd filed Critical NEC Corp
Priority to JP58250140A priority Critical patent/JPS60140434A/en
Publication of JPS60140434A publication Critical patent/JPS60140434A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To decrease the number of timers by outputting a reset signal with a microprocessor receiving an output of an FF latching the leading of a reference clock generating circuit so as to represent the count of the reference clock into plural registers. CONSTITUTION:The leading of a clock generated from a reference clock generating circuit 1 is latched by the FF2, an input/output port 3 to the FF2 and a count setting RAM11 are controlled by the microprocessor (MPU)4, for example exciting phase switching time setting registers 9, 10 are provided respectively to two step motors 7, 8 so as to control the MPU4. That is, the MPU4 detects the output 1 of the FF2 and also outputs a reset signal to the FF2, and when the content of the register 9 is not zero, ''1'' is decremented one after another, and when the content reaches zero, the exciting phase of the motor 7 is switched. Similarly, in controlling the motor 8, the registers 9, 10 are used in place of timers.

Description

【発明の詳細な説明】 本発明は、マイクロプロセッサシステムにおけるタイミ
ング発生方法に関する。
DETAILED DESCRIPTION OF THE INVENTION The present invention relates to a timing generation method in a microprocessor system.

従来、マイクロプロセッサシステムにおいて被数個のス
テップモータを回転させる、又、複数個のマグネットを
動作させるためには、複数のモータ、複数のマグネット
それぞれ1つづつにタイマを使用して励磁時間をコント
ロールしていた。そのため多くのタイマを必要としてい
た。
Conventionally, in a microprocessor system, in order to rotate a number of step motors or operate multiple magnets, a timer is used for each of the multiple motors and multiple magnets to control the excitation time. Was. Therefore, many timers were required.

本発明は、従来必要とされていたタイマの数だけタイマ
カウントレジスタを用意し、これらレジスタにそれぞれ
必要なカウントを設定する。基本クロック発生回路から
パルスが入るたびに、このカウントを減算し苓になるま
で繰返す。
According to the present invention, timer count registers are prepared as many as the number of timers conventionally required, and necessary counts are set in each of these registers. Every time a pulse is received from the basic clock generation circuit, this count is subtracted and repeated until the count is reached.

カウントが零になった時、必要な時間が経過したものと
して、ステップモータの励磁相の切換、マグネットの励
磁、又はホールド等を行なう。
When the count reaches zero, it is assumed that the necessary time has elapsed, and the excitation phase of the step motor is switched, the magnet is excited, or held.

このように、タイマカウントレジスタを使うことにより
、タイマを必要最小限の数にとどめることができる。
In this way, by using the timer count register, the number of timers can be kept to the minimum necessary number.

本発明は、基本クロック波形を発生する回路と、そのク
ロックの立上シをラッチする、リセット入力付のフリッ
プ・フロック回路とそのフリップ・フロップの出力信号
をマイクロプロセッサシステムに入力する入力ボートと
、7リツグーフロツプにリセット信号を出力する出力ポ
ートと、カウント数を設定する複数のレジスタと入出力
ボートとレジスタを制御するマイクロプロセッサにより
構成される。
The present invention includes a circuit that generates a basic clock waveform, a flip-flop circuit with a reset input that latches the rising edge of the clock, and an input port that inputs the output signal of the flip-flop to a microprocessor system. It consists of an output port that outputs a reset signal to the 7 reset flop, multiple registers that set the count number, and a microprocessor that controls the input/output ports and registers.

本発明は、マイクロプロセッサシステムにおいて一定周
期で減算されるレジスタを設け、これをタイマのかわり
として第1」用し、単一発振源から多数のタイマを作シ
出すことンCある。
The present invention provides a microprocessor system with a register that is subtracted at regular intervals, and uses this register instead of a timer to generate a large number of timers from a single oscillation source.

次に本発明の実施例について図面を参照して説明する。Next, embodiments of the present invention will be described with reference to the drawings.

第1図を参照すると、本発明の実施例は、基本クロック
発生回路1とその発生クロックの立上シをラッチするリ
セット入力付の7リツプ・70ツブ2と、フリップ−フ
ロップ2の出力信号を入力し、又、リセッ)6号を出力
する入出力ボート3と、時間設定用のカウントを設定す
るためのランダムアクセスメモリ11と2つのステップ
モータ7.8とそれらステップモータを駆動するドライ
バー回路6とステッピングモータ7の励磁相切換時間を
設定するレジスタ9と同じくステップモータ8用のレジ
スタ10と入出力ボート3とランダムアクセスメモリ1
1を制御するマイクロプロセッサ4とを含む。
Referring to FIG. 1, the embodiment of the present invention has a basic clock generating circuit 1, a 7-lip/70-tub 2 with a reset input that latches the rising edge of the generated clock, and an output signal of a flip-flop 2. An input/output boat 3 for inputting and outputting (reset) No. 6, a random access memory 11 for setting a count for time setting, two step motors 7.8, and a driver circuit 6 for driving the step motors. and a register 9 for setting the excitation phase switching time of the stepping motor 7, a register 10 for the step motor 8, an input/output board 3, and a random access memory 1.
1, and a microprocessor 4 that controls the 1.

次に第2図は、本実施例である2つのステップモータ7
.8を駆動する場合の励磁相の切換方法を示すフローチ
ャートである。本フローチャートに示されるプログラム
は装置全体を制御するプログラムのうちのスケジューラ
の部分に入れる。ここでスケジー−ラの周期が基本クロ
ックの周期よりも短いものにすれば、フリップ・フロッ
プ2の出力Qが1回立上るたびに、プロセッサ4はその
信号を脱落すことなく正確な時間のカウントを実行でき
る。
Next, FIG. 2 shows two step motors 7 according to this embodiment.
.. 8 is a flowchart showing a method for switching excitation phases when driving a motor. The program shown in this flowchart is included in the scheduler part of the program that controls the entire device. If the period of the scheduler is made shorter than the period of the basic clock, each time the output Q of the flip-flop 2 rises, the processor 4 can accurately count the time without dropping the signal. can be executed.

又第3図は、第1図で示される基本クロック発生回路1
と、その発生クロックの立上りをラッチするリセット入
力付のフリップ・フロップ2の出力波形を示すタイムチ
ャートである。
Further, FIG. 3 shows the basic clock generation circuit 1 shown in FIG.
2 is a time chart showing the output waveform of the flip-flop 2 with a reset input that latches the rising edge of the generated clock.

第2図のフロチャートにそって本実施例の動作祝明をす
る。プロセッサ4はフリップ・フロップ2の出力5がW
llになったのを検出すると、フリップ・フロップ2ヘ
リセット係号を出力し、タイマカウントレジスタ9の内
容が零かどうか判断する。ステップモータ7が停止中は
このレジスタ9は零になっているので次のステップモー
タ8の制御に移る。ステップモータ8が回転中はレジス
タ9が苓でないのでレジスタ9から1を減算し、その結
果が零かどうか判断する。もし零でなければステップモ
ータ8の制御に移る。この動作で基本クロックの周期と
タイマカウントレジスタ9に設定された数値を掛けた時
間が費やされた後、タイマカウントレジスタ9が岑にな
る。レジスタ9が零にガったら、プロセッサ4はステッ
プモータ7の励磁相を切換え、次の相を励磁し、ステッ
プモータ7を1転させる。その後に今励磁した相の励磁
時間をタイマカウントレジスタ9に設定する。
The operation of this embodiment will be congratulated in accordance with the flowchart shown in FIG. Processor 4 outputs W from flip-flop 2.
When it is detected that the value becomes 11, the flip-flop 2 outputs a heliset coefficient, and it is determined whether the contents of the timer count register 9 are zero. While the step motor 7 is stopped, this register 9 is set to zero, so control of the next step motor 8 is started. Since the register 9 is not set while the step motor 8 is rotating, 1 is subtracted from the register 9, and it is determined whether the result is zero. If it is not zero, the step motor 8 is controlled. After this operation consumes a time equal to the period of the basic clock multiplied by the value set in the timer count register 9, the timer count register 9 becomes empty. When the register 9 reaches zero, the processor 4 switches the excitation phase of the step motor 7, excites the next phase, and causes the step motor 7 to rotate once. Thereafter, the excitation time of the currently excited phase is set in the timer count register 9.

ステップモータ8の制御も上記と同様に行なう。The step motor 8 is also controlled in the same manner as described above.

本発明は、この様に、制御しようとするモータ。The present invention attempts to control a motor in this manner.

マグネット等にそれぞれタイマカウントレジスタを割付
けるだけでいくつでも任意にそれらの制御ハコタイマを
増設できる。
By simply assigning a timer count register to each magnet, etc., any number of control box timers can be added.

本発明は以上説明したように基本クロックとタイマカウ
ントレジスタを設定することにより、タイマの数を削減
する効果がある。
The present invention has the effect of reducing the number of timers by setting the basic clock and timer count register as described above.

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

第1図は本発明の一実施例を部分的にブロック図でボし
た回路図。第2図はプロセッサ4の動作フローチャート
。第3図は基本クロック発生回路1とフリップ・フロッ
プ2の出力波形を示したタイムチャートである。 ■・・・・・・基本クロック発生口路、2・川・・クリ
ップ・フロップ、3・・山・入出力ボート、4・・団・
マイクロプロセッサ、5・・団・フリップ・フロップの
出力信号、6・・・・・・ドライバー回路、7・・・・
・・ステップモータ、8・・・・・・ステップモータ、
9・・・・・・ステップモータ7川タイマカウントレジ
スタ、10・・・・・・ステップモータ8用タイマカウ
ントレジスタ、11・・・・・・ランダムアクセスメモ
リ。 第2閏
FIG. 1 is a circuit diagram partially showing an embodiment of the present invention as a block diagram. FIG. 2 is an operation flowchart of the processor 4. FIG. 3 is a time chart showing the output waveforms of the basic clock generation circuit 1 and the flip-flop 2. ■・・・Basic clock generation route, 2. River: Clip flop, 3. Mountain, input/output boat, 4. Group.
Microprocessor, 5... Group flip-flop output signal, 6... Driver circuit, 7...
...Step motor, 8...Step motor,
9... Step motor 7 timer count register, 10... Timer count register for step motor 8, 11... Random access memory. 2nd leap

Claims (1)

【特許請求の範囲】[Claims] 基本クロックを発生する基本クロック発生回路と、その
クロックの立上りをラッチするリセット入力付の7リツ
プ・フロップ回路と、そのフリップ−フロップ回路の出
力信号をマイクロプロセッサシステムに入力する入力ボ
ートと、フリップ−70ツブにリセット信号を出力する
出力ポートと、カウント数を設定する複数のレジスタと
、入出力ボートレジスタを制御するマイクロプロセッサ
とを有し、特に基本クロックのカウントを、プログラム
スケジューラにより上記軸数レジスタに表わす様にした
スケジューラ会タイマ。
A basic clock generation circuit that generates a basic clock, a 7-lip-flop circuit with a reset input that latches the rising edge of the clock, an input port that inputs the output signal of the flip-flop circuit to the microprocessor system, and a flip-flop circuit that inputs the output signal of the flip-flop circuit to the microprocessor system. It has an output port that outputs a reset signal to the 70-tube, multiple registers that set the count number, and a microprocessor that controls the input/output boat register. Scheduler meeting timer as shown in .
JP58250140A 1983-12-27 1983-12-27 Scheduler timer Pending JPS60140434A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP58250140A JPS60140434A (en) 1983-12-27 1983-12-27 Scheduler timer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP58250140A JPS60140434A (en) 1983-12-27 1983-12-27 Scheduler timer

Publications (1)

Publication Number Publication Date
JPS60140434A true JPS60140434A (en) 1985-07-25

Family

ID=17203411

Family Applications (1)

Application Number Title Priority Date Filing Date
JP58250140A Pending JPS60140434A (en) 1983-12-27 1983-12-27 Scheduler timer

Country Status (1)

Country Link
JP (1) JPS60140434A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100458706C (en) * 2006-12-11 2009-02-04 宁波菊风系统软件有限公司 A scheduling method for timer

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS4991147A (en) * 1972-12-29 1974-08-30
JPS52113644A (en) * 1976-03-19 1977-09-22 Nec Corp Microprogram control unit
JPS52123145A (en) * 1976-04-09 1977-10-17 Fujitsu Ltd Time monitor system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS4991147A (en) * 1972-12-29 1974-08-30
JPS52113644A (en) * 1976-03-19 1977-09-22 Nec Corp Microprogram control unit
JPS52123145A (en) * 1976-04-09 1977-10-17 Fujitsu Ltd Time monitor system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100458706C (en) * 2006-12-11 2009-02-04 宁波菊风系统软件有限公司 A scheduling method for timer

Similar Documents

Publication Publication Date Title
JPS63301624A (en) Pulse series frequency demultiplying circuit
JPS5914396A (en) Drive device for pulse motor
JPH06318123A (en) Semiconductor integrated circuit
KR930010689B1 (en) Clock signal converting circuit
JPS60140434A (en) Scheduler timer
JP3777242B2 (en) Motor control device
JP2658549B2 (en) Microcomputer
KR910013678A (en) Drive controller of stepping motor
JPH05315898A (en) Trigger synchronization circuit
JPH0538195A (en) Integrated circuit for controlling step motor
JP2960120B2 (en) Pulse generator
JPS63127302A (en) Electronic equipment
JP2754654B2 (en) Microcomputer output control circuit
KR970008366B1 (en) Control circuit of stepping motor
JPH0637609A (en) Pulse generating circuit
JPH07129272A (en) Clock speed control circuit
JPS62285697A (en) Control circuit for stepping motor
JPH02307395A (en) Method of starting stepping motor
JPH01136571A (en) Control method for inverter device
JPH05344111A (en) Clock control circuit
JPH07264894A (en) Control circuit for stepping motor
JPH06110826A (en) Dma control method/device for information processor
JPS621317A (en) Pulse width modulation signal generator
JPH0613848A (en) Frequency control circuit
KR930020256A (en) Inverse mixing and parallel conversion method of mixed serial data and apparatus