JPH033019A - Timer - Google Patents

Timer

Info

Publication number
JPH033019A
JPH033019A JP1137942A JP13794289A JPH033019A JP H033019 A JPH033019 A JP H033019A JP 1137942 A JP1137942 A JP 1137942A JP 13794289 A JP13794289 A JP 13794289A JP H033019 A JPH033019 A JP H033019A
Authority
JP
Japan
Prior art keywords
initial value
count
counting
initial
timer
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
JP1137942A
Other languages
Japanese (ja)
Inventor
Masato Koura
小浦 正人
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.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric Corp
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 Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP1137942A priority Critical patent/JPH033019A/en
Publication of JPH033019A publication Critical patent/JPH033019A/en
Pending legal-status Critical Current

Links

Landscapes

  • Measurement Of Predetermined Time Intervals (AREA)

Abstract

PURPOSE:To reduce the load of software by allowing a counting initial value computing circuit to compute the initial value of counting to be executed next and apply the initial value to a load register. CONSTITUTION:The initial value of counting is set up in the load register 4 through a data bus 4 and then applied to a counter 3. On the other hand, an operation parameter for generating the initial value of each counting as a data string is applied to the counting initial value computing circuit 5 through a data bus 1. The circuit 5 calculates the data string or the counting initial value by using the operation parameter and sets up the calculated value in a reloading register 4. During the counting of clock pulses by the counter 3, the circuit 5 executes operation by using the applied operation parameter and applies the computed result to the register 4 as the initial value of counting to be executed next. Since the operation parameter is applied to the counting initial value computing circuit 5 only once, the load of software can be reduced.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明はコンピュータに内蔵されるタイマに関する。[Detailed description of the invention] [Industrial application field] The present invention relates to a timer built into a computer.

〔従来の技術〕[Conventional technology]

第3図は従来のコンピュータ内のタイマ2を示すブロッ
ク図である。
FIG. 3 is a block diagram showing a timer 2 in a conventional computer.

図においてタイマ2はリロードレジスタ4及びカウンタ
3を備えていて、計時に際してカウント初期値がデータ
バスl側からリロードレジスタ4に設定される。該リロ
ードレジスタ4に設定されたカウント初期値がカウンタ
3に与えられ、該カウンタ3は図示しないクロックパル
ス発生器から入力されるクロックパルスのカウントをこ
の初期値から開始する。カウントが終了するとカウンタ
3は限時に達したことをデータバス1側へ報じるととも
に前記カウント初期をリロードレジスタ4から取り込み
、再びクロックパルスをカウントする。
In the figure, a timer 2 includes a reload register 4 and a counter 3, and an initial count value is set in the reload register 4 from the data bus I side when counting time. The initial count value set in the reload register 4 is given to the counter 3, and the counter 3 starts counting clock pulses input from a clock pulse generator (not shown) from this initial value. When the count ends, the counter 3 notifies the data bus 1 that the time limit has been reached, takes in the initial count value from the reload register 4, and counts clock pulses again.

〔発明が解決しようとする課題〕[Problem to be solved by the invention]

しかしながらカウント終了後に引き続いて行うカウント
を異なるカウント初期値から開始する必要がある場合、
プログラムによって新しいカウント初期値をリロードレ
ジスタ4に設定すべく、プログラムにはカウント毎のカ
ウント初期値を規定しておく必要があるので、ソフトウ
ェアの負担が多大になるという問題があった。
However, if it is necessary to start the subsequent count from a different initial count value after the count ends,
In order for the program to set a new count initial value in the reload register 4, it is necessary to define the count initial value for each count in the program, which poses a problem in that the burden on the software becomes large.

またコンピュータ外部からの操作によって次順のカウン
ト初期値を変更する必要がある場合、外部操作に対処す
るためのプログラムが必要であるという問題があった。
Furthermore, when it is necessary to change the initial count value for the next sequence by an operation from outside the computer, there is a problem in that a program is required to handle the external operation.

本発明はこのような問題を解決するためになされたもの
であって、第1発明はカウント毎のカウント初期値を演
算してリロードレジスタに設定し、また第2発明は外部
操作によって入力されたカウント初期値をプログラムを
介さずに直接リロードレジスタに設定する構成とするこ
とによりソフトウェアの負担を軽減したタイマを提供す
ることを目的とする。
The present invention has been made to solve such problems, and the first invention calculates the initial count value for each count and sets it in the reload register, and the second invention calculates the initial count value for each count and sets it in the reload register. It is an object of the present invention to provide a timer that reduces the burden on software by having a configuration in which an initial count value is directly set in a reload register without going through a program.

〔課題を解決するための手段〕 第1発明のタイマはカウント初期値演算回路を備えるこ
とを特徴とする。
[Means for Solving the Problems] The timer of the first invention is characterized in that it includes a count initial value calculation circuit.

第2発明のタイマはリロードレジスタに対するカウント
初期値の設定を行わせる回路をプログラム側とコンピュ
ータ外部側との間で切り替える切替回路を備えることを
特徴とする。
The timer according to the second aspect of the invention is characterized in that it includes a switching circuit that switches between a program side and an external side of the computer for setting a count initial value for a reload register.

〔作用] 第1発明のタイマは、カウント初期値演算回路にカウン
ト初期値演算のためのパラメータが与えられると、カウ
ント初期値を演算してその値をリロードレジスタに設定
する。
[Operation] When the count initial value calculation circuit is given parameters for count initial value calculation, the timer of the first invention calculates the count initial value and sets the value in the reload register.

第2発明のタイマは、外部からの操作によってカウント
初期値が入力されると、これをリロードレジスタに設定
すべく切替回路が動作する。
In the timer of the second aspect of the invention, when an initial count value is input by an external operation, the switching circuit operates to set this value in the reload register.

〔実施例〕〔Example〕

以下、本発明をその一実施例を示す図面に基づいて説明
する。
DESCRIPTION OF THE PREFERRED EMBODIMENTS The present invention will be explained below based on drawings showing one embodiment thereof.

第1図は、第1発明のタイマ2の構成を示すブロック図
である。タイマ2は図示しないクロックパルス発生器か
ら入力されるクロックパルスのカウントを行うカウンタ
3とJ亥カウンタ3にカウント初期値を与えるリロード
レジスタ4と次順のカウント初期値を演算するカウント
初期値演算回路2とで構成されている。
FIG. 1 is a block diagram showing the configuration of the timer 2 of the first invention. The timer 2 includes a counter 3 that counts clock pulses input from a clock pulse generator (not shown), a reload register 4 that provides a count initial value to the J counter 3, and a count initial value calculation circuit that calculates the next sequential count initial value. It is composed of 2.

このタイマ2を備えるコンピュータのプログラムにより
設定されているカウント初期値は従来同様データバスl
を介してリロードレジスタ4に設定され、ここからカウ
ンタ3に与えられる。一方、カウント毎のカウント初期
値をデータ列として発生させるための演算パラメータは
データバス1を介してカウント初期値演算回路5に与え
られる。
The initial count value set by the program of the computer equipped with this timer 2 is the same as the conventional one.
It is set in the reload register 4 via the reload register 4, and is applied to the counter 3 from there. On the other hand, calculation parameters for generating a count initial value for each count as a data string are applied to the count initial value calculation circuit 5 via the data bus 1.

カウント初期値演算回路5はこの演算パラメータを用い
て上述のデータ列又はカウント初a 4fLを算出し、
これをリロードレジスタ4に設定させる。
The count initial value calculation circuit 5 calculates the above-mentioned data string or count initial value a 4fL using this calculation parameter,
This is set in the reload register 4.

カウンタ3がクロックパルスをカウントしている間にカ
ウント初期値演算回路5は、与えられた演算パラメータ
を用いて演算を行い、その結果を次に行うカウントのカ
ウント初期値としてリロードレジスタ4に与える。カウ
ンタ3がカウントを終了すると限時に達したことをデー
タバス1へ出力するとともに次のカウントを開始すべく
リロードレジスタ4に設定されているカウント初期値が
カウンタ3へ取り込まれる。カウンタ3は両前のカウン
トのカウント初期値とは異なった新しいカウント初期値
を用いてカウントを開始する。
While the counter 3 is counting clock pulses, the count initial value calculation circuit 5 performs calculation using the given calculation parameters, and provides the result to the reload register 4 as the count initial value for the next count. When the counter 3 finishes counting, it outputs to the data bus 1 that the time limit has been reached, and the initial count value set in the reload register 4 is taken into the counter 3 in order to start the next count. Counter 3 starts counting using a new count initial value different from the count initial values of both previous counts.

次に第2発明のタイマ2について第2図に基づいて説明
する。
Next, the timer 2 of the second invention will be explained based on FIG. 2.

このタイマ2はリロードレジスタ4及びカウンタ3の外
にデータバス1からのカウント初期値人力と周辺回路8
からの初期値人力とを切り替える切替回路7を備えてい
る。周辺回路8は、ローカルバス6を介して切替回路7
に接続している。周辺回路8は例えばへ10変換器等で
あり、図示しない外部装置に接続されていて、外部操作
によってカウント初期値となるデータが与えられる。切
替回路7は、このような周辺回路8を介して外部から与
えられるカウント初期値と、プログラムに規定されてい
るカウント初期値とを切り替えてリロードレジスタ4に
設定すべく、データバス1とローカルバス6とを切り替
える。カウンタ3がクロツクパルスをカウントしている
間に外部操作によってカウント初期値が周辺回路8へ入
力されると、周辺回路8はこれを切替回路7に報じる。
This timer 2 includes a reload register 4 and a counter 3 as well as an initial count value from the data bus 1 and a peripheral circuit 8.
A switching circuit 7 is provided for switching between the initial value and the manual input. The peripheral circuit 8 is connected to the switching circuit 7 via the local bus 6.
is connected to. The peripheral circuit 8 is, for example, a to-10 converter, etc., and is connected to an external device (not shown), and is supplied with data serving as an initial count value by external operation. The switching circuit 7 switches between the data bus 1 and the local bus in order to switch between the initial count value given from the outside via the peripheral circuit 8 and the initial count value specified in the program and set it in the reload register 4. Switch between 6 and 6. When the initial count value is input to the peripheral circuit 8 by external operation while the counter 3 is counting clock pulses, the peripheral circuit 8 reports this to the switching circuit 7.

そうすると切替回路7は、データバス1からローカルバ
ス6に切り替えて、新しいカウント初期値をリロードレ
ジスタ4に設定する。リロードレジスタ4は新しいカウ
ント初期値をカウンタ3に与え、該カウンタ3は前記カ
ウント初期値を用いてクロックパルスをカウントする。
Then, the switching circuit 7 switches from the data bus 1 to the local bus 6 and sets a new count initial value in the reload register 4. The reload register 4 provides a new initial count value to the counter 3, which uses the initial count value to count clock pulses.

〔発明の効果] 以上説明したとおり第1発明のタイマは、カウント初期
値演算回路が次に行うカウントの初期値を演算してリロ
ードレジスタに与えるので、カウント毎に初期値が異な
る場合であっても、演算のパラメータをカウント初期値
演算回路に一度与えるだけでよくソフトウェアの負担が
少ない。
[Effects of the Invention] As explained above, in the timer of the first invention, the count initial value calculation circuit calculates the initial value of the next count and gives it to the reload register, so even if the initial value is different for each count, Also, the load on the software is small because the calculation parameters only need to be given once to the count initial value calculation circuit.

また第2発明のタイマは、外部から与えられるカウント
初期値をリロードレジスタに設定することができるので
、外部の操作によるカウント初期値の変更にプログラム
を必要としない。
Further, in the timer of the second invention, since the initial count value given from the outside can be set in the reload register, no program is required to change the initial count value by external operation.

このように第1及び第2発明のタイマは共にソフトウェ
アの負担増なしにカウント初期値を変更できるという効
果がある。
In this way, both the timers of the first and second inventions have the advantage that the initial count value can be changed without increasing the burden on software.

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

第1図は第1発明に係るタイマの構成を示すブロック図
、第2図は第2発明に係るタイマの構成を示すブロック
図、第3図は従来のタイマの構成を示すブロック図であ
る。 l・・・データバス 2・・・タイマ 3・・・カウン
タ4・・・リロードレジスタ 5・・・カウント初期値
演算回路 7・・・切替回路 なお、図中、同一符号は同一、又は相当部分を示す。
FIG. 1 is a block diagram showing the structure of a timer according to the first invention, FIG. 2 is a block diagram showing the structure of the timer according to the second invention, and FIG. 3 is a block diagram showing the structure of a conventional timer. l...Data bus 2...Timer 3...Counter 4...Reload register 5...Count initial value calculation circuit 7...Switching circuit Note that in the figures, the same reference numerals indicate the same or equivalent parts. shows.

Claims (2)

【特許請求の範囲】[Claims] (1)クロックパルスをカウントするカウンタと、該カ
ウンタにカウント初期値を与えるリロードレジスタとを
備えたタイマにおいて、 前記カウント初期値を演算してそれを前記リロードレジ
スタに設定するカウント初期値演算回路を備えることを
特徴とするタイマ。
(1) In a timer equipped with a counter that counts clock pulses and a reload register that provides an initial count value to the counter, an initial count calculation circuit that calculates the initial count value and sets it in the reload register. A timer characterized by:
(2)コンピュータが実行すべきプログラムに規定され
たカウント初期値が設定されるリロードレジスタと、該
リロードレジスタより与えられたカウント初期値からク
ロックパルスをカウントするカウンタとを備えたタイマ
において、 前記プログラムに規定されたカウント初期値と前記コン
ピュータの外部から与えられるカウント初期値とを切り
替えて前記リロードレジスタに設定する切替回路を備え
ることを特徴とするタイマ。
(2) In a timer comprising a reload register in which an initial count value specified in a program to be executed by a computer is set, and a counter that counts clock pulses from the initial count value given by the reload register, the program 1. A timer comprising a switching circuit that switches between a count initial value defined in the above and a count initial value given from outside the computer and sets the same in the reload register.
JP1137942A 1989-05-31 1989-05-31 Timer Pending JPH033019A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP1137942A JPH033019A (en) 1989-05-31 1989-05-31 Timer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP1137942A JPH033019A (en) 1989-05-31 1989-05-31 Timer

Publications (1)

Publication Number Publication Date
JPH033019A true JPH033019A (en) 1991-01-09

Family

ID=15210308

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1137942A Pending JPH033019A (en) 1989-05-31 1989-05-31 Timer

Country Status (1)

Country Link
JP (1) JPH033019A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008062681A (en) * 2006-09-05 2008-03-21 Daifuku Co Ltd Folding cart

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008062681A (en) * 2006-09-05 2008-03-21 Daifuku Co Ltd Folding cart

Similar Documents

Publication Publication Date Title
JPH04336308A (en) Single-chip microcomputer
US4771223A (en) Motor speed control system
JPH033019A (en) Timer
JPH0972238A (en) Timer device
JPH05313776A (en) Pulse generation circuit
JPS608920A (en) Electronic computer
JPH0427730B2 (en)
JPS576241A (en) Cooking apparatus of electronic control type
JPH0573296A (en) Microcomputer
JP2631541B2 (en) Programmable controller
RU1786486C (en) Microprogram control unit
JPH07120166B2 (en) Sequence control device
JPH04143833A (en) Timer circuit for microcomputer
JPS5930303B2 (en) Multiplying circuit for numerical value n
JPH0756862A (en) System for synchronizing multiprocessor system
KR0155199B1 (en) Slip-mode binary counter
JP2517943B2 (en) Timer device
JPS59168548A (en) Program execution delaying device
JPS59106005A (en) Programmable controller
JPS62194522A (en) Clock output circuit
JPH1185465A (en) Arithmetic control unit
JPH025133A (en) Variable operation speed type computer system
JPS5985539A (en) Division processor
JPS61220001A (en) Sequence control/direct digital control mixing type process control method
JPS6143302A (en) Sequence controller