JPH04322310A - Information processor with interval timer - Google Patents

Information processor with interval timer

Info

Publication number
JPH04322310A
JPH04322310A JP3090953A JP9095391A JPH04322310A JP H04322310 A JPH04322310 A JP H04322310A JP 3090953 A JP3090953 A JP 3090953A JP 9095391 A JP9095391 A JP 9095391A JP H04322310 A JPH04322310 A JP H04322310A
Authority
JP
Japan
Prior art keywords
value
counter
down counter
interval timer
control unit
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
JP3090953A
Other languages
Japanese (ja)
Inventor
Keiichi Otani
大谷 景一
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
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 filed Critical NEC Corp
Priority to JP3090953A priority Critical patent/JPH04322310A/en
Publication of JPH04322310A publication Critical patent/JPH04322310A/en
Pending legal-status Critical Current

Links

Landscapes

  • Measurement Of Predetermined Time Intervals (AREA)

Abstract

PURPOSE:To inexpensively provide an interval timer capable of counting accurate time, to improve the reliability because of a small number of parts, and to easily design hardware by constituting the interval timer with the small number of parts without requiring complicated hardware. CONSTITUTION:This processor is provided with a means which sets a counted value to a down counter 5, a means which reports to a control part 2 that the down counter 5 is 0, and a means which reads the value of the down counter into the reported control part 2 and subtracts the counted value, which should be counted before the write of a calculated value to the down counter 5 after the read of the down counter 5 to the control part 2, from a preliminarily determined initial set value of the down counter 5 and adds the counted value from the report to counted value read as the value of the counter read into the control part 2 to the subtraction result and writes the obtained value in the down counter 5.

Description

【発明の詳細な説明】[Detailed description of the invention]

【0001】0001

【産業上の利用分野】本発明はインターバルタイマを有
する情報処理装置に関し、特に情報処理装置のインター
バルタイマを有する情報処理装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an information processing apparatus having an interval timer, and more particularly to an information processing apparatus having an interval timer.

【0002】0002

【従来の技術】従来のインターバルタイマを有する情報
処理装置は、以下のような2つの方式で実装されていた
。1つは、タイマが満了した場合、予め設定してある値
を自動的にタイマに設定する機能をハードウェアで実装
する。2つめは、タイマが満了した場合、コンピュータ
プログラム中でタイマの満了を検出し、コンピュータプ
ログラムによりタイマに値を再設定する。
2. Description of the Related Art Conventional information processing apparatuses having an interval timer have been implemented in the following two ways. One is to implement a function in hardware that automatically sets a preset value to the timer when the timer expires. Second, when the timer expires, the expiration of the timer is detected in the computer program and the value is reset in the timer by the computer program.

【0003】0003

【発明が解決しようとする課題】上述した従来のインタ
ーバルタイマを有する情報処理装置の1つでは、タイマ
が満了した場合、予め設定してある値を自動的にタイマ
に設定する機能をハードウェアにおいて実装しておかな
ければならない。
[Problems to be Solved by the Invention] One of the above-mentioned conventional information processing devices having an interval timer has a hardware function that automatically sets a preset value to the timer when the timer expires. Must be implemented.

【0004】また2つめでは、タイマが満了した場合、
タイマ値を再設定するまでに遅れが生じ、かつコンピュ
ータのプログラム走行状態によりその遅れ時間は動的に
変化するため、正確なインターバルタイマの実現が不可
能であった。
[0004] In the second case, when the timer expires,
Since there is a delay before the timer value is reset, and the delay time changes dynamically depending on the running state of the computer program, it has been impossible to realize an accurate interval timer.

【0005】[0005]

【課題を解決するための手段】第1の発明のインターバ
ルタイマを有する情報処理装置は、カウンタの値が0に
なると、カウンタの最大値から再びカウントダウンを始
めるダウンカウンタと制御部とを有する情報処理装置に
おいて、ダウンカウンタにカウント値を設定する手段と
、ダウンカウンタが0になれば、これを制御部に報告す
る手段と、報告を受けた制御部に、ダウンカウンタの値
を読み込み、あらかじめ定められたダウンカウンタの初
期設定値から、制御部がダウンカウンタの読み込み後、
ダウンカウンタに計算値を書き込むまでにカウントされ
るべきカウント数を減算し、これに先に説明した制御部
に読み込んだカウンタの値である、報告からカウント値
読み込みまでの経過カウントとを加算して求められた値
をダウンカウンタに書き込む手段を備えて構成されてい
る。
[Means for Solving the Problems] An information processing device having an interval timer according to a first aspect of the invention includes a down counter that starts counting down again from the maximum value of the counter when the value of the counter becomes 0, and a control unit. The device includes means for setting a count value in a down counter, means for reporting this to a control unit when the down counter reaches 0, and means for reading the value of the down counter into a control unit that receives the report and setting a predetermined value. After the control unit reads the down counter from the initial setting value of the down counter,
Subtract the number of counts that must be counted before writing the calculated value to the down counter, and add to this the elapsed count from the report to the reading of the count value, which is the value of the counter read into the control unit described earlier. The device is configured to include means for writing the determined value into a down counter.

【0006】また、第2の発明のインターバルタイマを
有する情報処理装置は、第1の発明のダウンカウンタの
代りに単に経過時間を計れるカウンタを用い、制御部に
報告するカウンタの満了値を任意の値に設定するよう構
成されている。
Further, the information processing device having the interval timer of the second invention uses a counter that can simply measure elapsed time instead of the down counter of the first invention, and the expiration value of the counter to be reported to the control unit can be set to an arbitrary value. Configured to set to value.

【0007】[0007]

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

【0008】図1は本発明のインターバルタイマを有す
る情報処理装置の一実施例を示す情報処理装置のブロッ
ク図である。本実施例の情報処理装置は、制御部2と、
これに接続されるダウンカウンタ5と、ダウンカウンタ
5に設定するカウンタ値などを計算する演算部1と、ダ
ウンカウンタ5に設定するために用いられるカウンタ値
およびその補正値を記憶しておくカウンタ値記憶部3と
補正値記憶部4とから構成される。  図2は、本実施
例の情報処理装置のインターバルタイマの動作フロー図
である。
FIG. 1 is a block diagram of an information processing apparatus showing an embodiment of the information processing apparatus having an interval timer according to the present invention. The information processing device of this embodiment includes a control unit 2,
A down counter 5 connected thereto, an arithmetic unit 1 that calculates a counter value etc. to be set in the down counter 5, and a counter value that stores the counter value used to set the down counter 5 and its correction value. It is composed of a storage section 3 and a correction value storage section 4. FIG. 2 is an operation flow diagram of the interval timer of the information processing apparatus of this embodiment.

【0009】まず、制御部2は、カウンタ値記憶部3に
、目的とするインターバルタイムをダウンカウンタ5の
カウント周期で除算を施した値を記憶させ、補正値記憶
部4に、ダウンカウンタ5の値を読み込んだ後、ダウン
カウンタ5にカウンタ値を設定するまでの時間にダウン
カウンタ5がカウントする値を記憶させる。
First, the control unit 2 causes the counter value storage unit 3 to store a value obtained by dividing the target interval time by the count period of the down counter 5, and stores the value obtained by dividing the target interval time by the count period of the down counter 5 in the correction value storage unit 4. After reading the value, the value counted by the down counter 5 is stored during the time until the counter value is set in the down counter 5.

【0010】インターバルタイマを動作させるためにカ
ウンタ値記憶部3の値をダウンカウンタ5に書き込む。 ダウンカウンタ5は値が0になると、制御部2に報告す
る。報告を受けた制御部2は、演算部1において、カウ
ンタ値記憶部3に記憶されている値から補正値記憶部4
に記憶されている値を減算する。次に、制御部2は、ダ
ウンカウンタ5からカウンタ値を読み込み、演算部1に
おいて、前に説明した処理の演算結果と読み込んだカウ
ンタ値を加算し、ダウンカウンタ5に加算結果を書き込
む。
In order to operate the interval timer, the value of the counter value storage section 3 is written into the down counter 5. The down counter 5 reports to the control unit 2 when the value reaches 0. The control unit 2 that has received the report uses the calculation unit 1 to calculate the correction value storage unit 4 from the value stored in the counter value storage unit 3.
Subtract the value stored in . Next, the control unit 2 reads the counter value from the down counter 5, adds the calculation result of the process described above and the read counter value in the calculation unit 1, and writes the addition result to the down counter 5.

【0011】以後、ダウンカウンタ5の値が0になる度
に上記の手順でカウンタ値を再設定することにより、制
御部2の動作状態によりインターバルタイムが変動する
事なく、正確な計時が可能なインターバルタイマを実現
する事ができる。
[0011] From then on, by resetting the counter value according to the above procedure every time the value of the down counter 5 becomes 0, accurate time measurement is possible without changing the interval time depending on the operating state of the control unit 2. An interval timer can be realized.

【0012】以上の説明はインターバルタイマにダウン
カウンタ5を用いて本ダウンカウンタ5の値が0にたっ
たとき、制御部2に報告するようにしたが、インターバ
ルタイマとしてダウンカウンタに限定することなく、単
に経過時間を計れるカウンタを用いる方法でもよい。こ
のとき制御部2に報告するカウンタの満了値を任意の値
に設定できる。
In the above explanation, the down counter 5 is used as the interval timer, and when the value of the down counter 5 reaches 0, it is reported to the control section 2. However, the interval timer is not limited to the down counter. A method using a counter that can simply measure the elapsed time may also be used. At this time, the expiry value of the counter to be reported to the control unit 2 can be set to any value.

【0013】[0013]

【発明の効果】以上説明したように、本発明のインター
バルタイマを有する情報処理装置は、正確な計時が可能
なインターバルタイマを、複雑なハードウェアを必要と
せず、少ない部品で構成する事が可能であるため安価に
提供することが可能であり、さらには部品点数が少ない
ため信頼性が向上し、またハードウェアの設計も容易に
なるといった効果もある。
[Effects of the Invention] As explained above, the information processing device having the interval timer of the present invention allows an interval timer capable of accurate time measurement to be configured with a small number of parts without requiring complicated hardware. Therefore, it can be provided at a low cost, and since the number of parts is small, reliability is improved, and hardware design is also facilitated.

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

【図1】本発明のインターバルタイマを有する情報処理
装置の一実施例を示す情報処理装置のブロック図である
FIG. 1 is a block diagram of an information processing device showing an embodiment of the information processing device having an interval timer according to the present invention.

【図2】本実施例の情報処理装置のインターバルタイマ
の動作フロー図である。
FIG. 2 is an operation flow diagram of an interval timer of the information processing apparatus of the embodiment.

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

1    演算部 2    制御部 3    カウンタ値記憶部 4    補正値記憶部 5    ダウンカウンタ 1 Arithmetic unit 2 Control section 3 Counter value storage section 4 Correction value storage section 5 Down counter

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】  ダウンカウンタと制御部とを含み前記
ダウンカウンタの値が0になると前記制御部に報告しカ
ウンタの最大値から再びカウントダウンを始めるインタ
ーバルタイマを有する情報処理装置において、前記ダウ
ンカウンタが0になったことの報告を受けた制御部は前
記ダウンカウンタの値を読み込み、前記報告から前記読
み込みまでの経過カウント数と前記ダウンカウンタの初
期設定値との和に対して前記読み込みから前記ダウンカ
ウンタに計算値を書き込むまでにカウントされるべきカ
ウント数を減算して計算値を求め、前記計算値を前記ダ
ウンカウンタに書き込むことを特徴とするインターバル
タイマを有する情報処理装置。
1. An information processing device comprising a down counter and a control unit, and an interval timer that reports to the control unit when the value of the down counter reaches 0 and starts counting down again from the maximum value of the counter, wherein the down counter is Upon receiving the report that the down counter has become 0, the control unit reads the value of the down counter, and calculates the down counter value from the reading to the sum of the elapsed count from the report to the reading and the initial setting value of the down counter. An information processing device having an interval timer, characterized in that the calculated value is obtained by subtracting the number of counts to be counted before writing the calculated value to the counter, and the calculated value is written to the down counter.
【請求項2】  カウンタにカウント値を設定する手段
と、前記カウンタのインターバルタイム経過時のカウン
タ値を制御部に報告する手段と、報告を受けた制御部に
前記カウンタの値を読み込む手段と、該インターバルタ
イム経過時のカウンタ値から前記読み込みまでにカウン
トされるカウント数と読み込みからカウンタに書き込む
までにカウントされるべきカウント数とをインターバル
タイムカウント数から減算する手段と、減算して得られ
たカウンタ値を前記カウンタに書き込む手段とを含むこ
とを特徴とするインターバルタイマを有する情報処理装
置。
2. Means for setting a count value in a counter, means for reporting the counter value of the counter when an interval time has elapsed to a control unit, and means for reading the value of the counter into the control unit that has received the report; means for subtracting from the interval time count the number of counts to be counted up to the reading and the number of counts to be counted from the time of reading to the time of writing to the counter from the counter value when the interval time has elapsed; An information processing device having an interval timer, comprising: means for writing a counter value into the counter.
JP3090953A 1991-04-23 1991-04-23 Information processor with interval timer Pending JPH04322310A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP3090953A JPH04322310A (en) 1991-04-23 1991-04-23 Information processor with interval timer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP3090953A JPH04322310A (en) 1991-04-23 1991-04-23 Information processor with interval timer

Publications (1)

Publication Number Publication Date
JPH04322310A true JPH04322310A (en) 1992-11-12

Family

ID=14012852

Family Applications (1)

Application Number Title Priority Date Filing Date
JP3090953A Pending JPH04322310A (en) 1991-04-23 1991-04-23 Information processor with interval timer

Country Status (1)

Country Link
JP (1) JPH04322310A (en)

Similar Documents

Publication Publication Date Title
KR20040068971A (en) High accuracy method for determining the frequency of a pulse input signal over a wide frequency range
US6543000B1 (en) Interrupt management system with timers and controller able to detect the interrupt missed and generate appropriate warning signal for error handling
JPH04322310A (en) Information processor with interval timer
JP2584990Y2 (en) Pulse width measurement device
JPH0534474A (en) Measurement timer device
JP2604562B2 (en) Pulse interval measuring device
JP2595718B2 (en) In-circuit emulator
KR950013602B1 (en) Frequency measuring device
JPH05241891A (en) Tracer circuit
JPS5741709A (en) Operation monitor device
JPS58169375A (en) Cylinder pulse counting device
JP3523059B2 (en) Horizontal synchronization signal frequency detection method and horizontal synchronization signal frequency detection circuit
JPH0454249B2 (en)
KR900002606A (en) Fault Detection and Recovery Method for Real-Time Clocks
JP2929698B2 (en) Microcomputer
JPS63204185A (en) Digital rate meter
JPH0480834A (en) Performance measuring circuit
JPH04367954A (en) Cache memory control circuit
JPH03119449A (en) Calculating device
JPS6375944A (en) Information processor
JPH04151742A (en) Firmware operational ratio measuring circuit
JPS6250922A (en) Fdd simulator
JPS5741710A (en) Operation monitor device
JPH06160530A (en) Counting rate meter
JPH0340116A (en) Timer circuit