JPH038005A - Timer control system - Google Patents

Timer control system

Info

Publication number
JPH038005A
JPH038005A JP1143410A JP14341089A JPH038005A JP H038005 A JPH038005 A JP H038005A JP 1143410 A JP1143410 A JP 1143410A JP 14341089 A JP14341089 A JP 14341089A JP H038005 A JPH038005 A JP H038005A
Authority
JP
Japan
Prior art keywords
timer
unit
circuit
timer circuit
value
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
JP1143410A
Other languages
Japanese (ja)
Inventor
Katsuhiko Shioya
克彦 塩屋
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.)
Fujitsu Ltd
Original Assignee
Fujitsu 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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP1143410A priority Critical patent/JPH038005A/en
Publication of JPH038005A publication Critical patent/JPH038005A/en
Pending legal-status Critical Current

Links

Landscapes

  • Electronic Switches (AREA)

Abstract

PURPOSE:To enable timer control, which can exactly monitor time, by providing a timer circuit and a comparator register and guaranteeing the period width of a count pulse from one of set time for the respective circuit and register to time to detect a prescribed condition. CONSTITUTION:In such a timer system, a timer circuit 1 is provided, an initial value is directly set to this timer circuit, counting operation is executed and it is detected that a prescribed value is obtained. Otherwise, the circuit 1 and a comparator register 2 to set a comparing value to this circuit 1 are provided, the count value of the circuit 1 is compared with that of the register 2 and it is detected that the values are coincident. Then, the period width of a count pulse 2' from the circuit 1 is guaranteed at least from the time to set this initial value to the circuit 1 or from the time to set the comparing value to the register 2 to the time to detect the prescribed condition. Thus, the time monitoring operation of set time width can be executed without depending on the state of the timer circuit.

Description

【発明の詳細な説明】 〔概要〕 時刻表示機構を備えた計算機システムにおけるタイマ制
御方式に関し、 タイマ回路の状態に依存しないで、設定された時間幅の
時間監視動作を行わせることを目的とし、タイマ回路に
対して、直接初期値を設定して計数動作を行わせ、所定
の値になったことを検出するか、又は、タイマ回路と、
該タイマ回路に対する比較値を設定する比較レジスタと
を備えて、該タイマ回路の計数値と、上記比較レジスタ
とを比較して一致したことを検出するタイマ制御方式で
あって、上記初期値をタイマ回路に設定した時刻より、
又は、上記比較値を比較レジスタに設定した時刻より、
上記条件の検出迄の時刻に対して、少なくとも、上記タ
イマ回路の計数パルス■の周期の幅を保障するように構
成する。
[Detailed Description of the Invention] [Summary] Regarding a timer control method in a computer system equipped with a time display mechanism, an object of the present invention is to perform a time monitoring operation of a set time width without depending on the state of a timer circuit. Either directly set an initial value to the timer circuit, cause it to perform a counting operation, and detect when it reaches a predetermined value, or
The timer control method includes a comparison register for setting a comparison value for the timer circuit, and compares the count value of the timer circuit with the comparison register and detects that they match, From the time set in the circuit,
Or, from the time when the above comparison value is set in the comparison register,
The configuration is such that at least the width of the cycle of the counting pulse (2) of the timer circuit is guaranteed for the time up to the detection of the above condition.

〔産業上の利用分野〕[Industrial application field]

本発明は、時刻表示機構を備えた計算機システムにおけ
るタイマ制御方式に関する。
The present invention relates to a timer control method in a computer system equipped with a time display mechanism.

従来から、時刻表示機構、即ち、タイマによる時間監視
が、例えば、マルチプログラミングにおけるタスク切替
えのタイミングとか、課金の為のタイミング、或いは、
プログラムの暴走を検出するタイミング等に利用されて
いる。
Conventionally, time display mechanisms, that is, time monitoring using a timer, have been used to monitor, for example, the timing of task switching in multiprogramming, the timing for billing, or
It is used as a timing to detect program runaway.

然して、最近のプログラム構成の高精度化、複雑化に伴
って、できる限り精度のよい時間監視が要求されるよう
になってきた。
However, as program configurations have recently become more precise and complex, there has been a demand for time monitoring that is as accurate as possible.

〔従来の技術と発明が解決しようとする課題〕第3図は
従来のタイマ制御方式を説明する図であり、 (a)は
タイマ回路に初期値を設定する場合を示し、(b)は比
較レジスタに比較値を設定する場合を示している。
[Prior art and problems to be solved by the invention] Fig. 3 is a diagram explaining a conventional timer control system, in which (a) shows the case where an initial value is set in the timer circuit, and (b) shows a comparison. This shows a case where a comparison value is set in a register.

先ず、(a)図に示した場合は、タイマ回路1に計数動
作を行わせる時の単位時間、例えば、1μsを周期とす
る基準パルスを計数して、例えば、1msの計数パルス
■を発生し、該計数パルス■をタイマ回路1で計数して
いる。
First, in the case shown in Figure (a), a reference pulse with a period of, for example, 1 μs, which is a unit time when the timer circuit 1 performs a counting operation, is counted, and a counting pulse of, for example, 1 ms is generated. , the counting pulses (2) are counted by a timer circuit 1.

ここで、ソフトウェアから、該タイマ回路1に初期値が
設定されると、所定の時間後にオーバフローが検出され
るこの方式では、該タイマ回路1に対する初期設定の値
(例えば、1計数値だけ少ない値)によっては、そのソ
フトウェアによる初期値の設定時刻が、基準タイマ3か
ら、計数パルスが出力される、例えば、1μs前である
と、1μS後に所定の値、即ち、オーバフローを出力し
てしまうという問題があった。
In this method, when an initial value is set for the timer circuit 1 by software, an overflow is detected after a predetermined time. ), if the initial value set by the software is, for example, 1 μs before the count pulse is output from the reference timer 3, the problem is that the predetermined value, that is, an overflow, will be output after 1 μS. was there.

又、(b)図の場合には、ソフトウェアから比較レジス
タ2に比較値が設定されると、該比較レジスタ2の値と
、タイマ回路1の値とが比較器(c)で比較され、一致
出力が得られることで、該ソフトウェアの要求する時間
監視が行われる。
In addition, in the case of figure (b), when a comparison value is set in comparison register 2 from software, the value of comparison register 2 and the value of timer circuit 1 are compared in comparator (c), and a match is found. Obtaining the output provides time monitoring required by the software.

然し、この従来方式においては、比較レジスタ2に設定
した時刻が、タイマ回路lの時刻と一致していた場合に
は、該ソフトウェアによる設定と同時に一致検出を行っ
てしまう問題があった。
However, in this conventional method, if the time set in the comparison register 2 coincides with the time of the timer circuit 1, there is a problem that coincidence detection is performed at the same time as the setting by the software.

例え、一致していなくても、1計数値少ない値が設定さ
れた場合で、基準タイマでの計数値が、計数パルスを出
力する1μs前の時刻に、該ソフトウェアから比較時間
が設定された場合には、1μs後に一致出力が得られて
しまうという問題があった。
Even if they do not match, if a value less than one count value is set, and the comparison time is set from the software to a time 1 μs before the count value of the reference timer outputs the count pulse. However, there was a problem in that a matching output was obtained after 1 μs.

従って、このような従来方式では、ソフトウェアの期待
する正確な時間監視ができなくなるという問題があった
Therefore, with such a conventional method, there is a problem that accurate time monitoring as expected by the software cannot be performed.

本発明は上記従来の欠点に鑑み、時刻表示8g、構を備
えた計算4段システムにおいて、タイマ回路の状態に依
存しないで、設定された時間幅の時間監視動作を行わせ
ることができるタイマ制御方式を堤供することを目的と
するものである。
In view of the above-mentioned conventional drawbacks, the present invention provides a timer control that allows a time monitoring operation of a set time width to be performed without depending on the state of the timer circuit in a four-stage calculation system equipped with an 8g time display. The purpose of this is to provide a method.

〔課題を解決するための手段〕[Means to solve the problem]

第1図は本発明の原理構成図であり、(a)はタイマ回
路に初期値を設定する場合を示し、(b)は比較レジス
タに比較値を設定する場合を示している。
FIG. 1 is a diagram showing the principle of the present invention, in which (a) shows a case where an initial value is set in a timer circuit, and (b) shows a case where a comparison value is set in a comparison register.

上記の問題点は下記の如くに構成されたタイマ制御方式
によって解決査れる。
The above problem can be solved by a timer control method configured as follows.

(1)時刻表示機構を備えた計算機システムにおいて、 タイマ回路1を備えて、該タイマ回路1に対して、直接
初#JJ(IIIを設定して計数動作を行わせ、所定の
値になったことを検出するか、又は、タイマ回路1と、
該タイマ回路りに対する比較値を設定する比較レジスタ
2とを備えて、該タイマ回路1の計数値よ、上記比較レ
ジスタ2とを比較して一致したことを検出するタイマ制
御方式であって、上記初期値をタイマ回路lに設定した
時刻より、又は、上記比較値を比較レジスタ2に設定し
た時刻より、上記条件の検出迄の時刻に対して、少なく
とも、上記タイマ回路ぞの計数パルス■の周期の幅を保
障するように構成する。
(1) In a computer system equipped with a time display mechanism, a timer circuit 1 is provided, and the first #JJ (III) is directly set for the timer circuit 1 to perform counting operation to reach a predetermined value. or a timer circuit 1;
a comparison register 2 for setting a comparison value for the timer circuit 1; the timer control method compares the count value of the timer circuit 1 with the comparison register 2 and detects that they match; From the time when the initial value is set in the timer circuit 1 or from the time when the above comparison value is set in the comparison register 2 until the detection of the above condition, at least the period of the counting pulse (■) of the above-mentioned timer circuit. It is configured to ensure the width of

(2)上記タイマ制御方式であって、上記タイマ回路1
で計数動作を行わせる時の単位時間周期の基準パルス■
を発生する基準タイマ3と、該基準タイマ3からの出力
される基準パルス■を計数するユニットタイマ4と、 該ユニットタイマ4から出力されるユニットパルス■を
計数する上記タイマ回路1とを設けて、ソフトウェアか
ら特定の初期値を上記タイマ回路1に設定すると共に、
上記ユニットタイマ4をリセットし、上記タイマ回路1
からの特定値、例えば、オーバフローを検出するように
構成する。
(2) The above-mentioned timer control method, wherein the above-mentioned timer circuit 1
Reference pulse of unit time period when performing counting operation in ■
A reference timer 3 that generates , a unit timer 4 that counts the reference pulses outputted from the reference timer 3, and the above-mentioned timer circuit 1 that counts the unit pulses outputted from the unit timer 4 are provided. , while setting a specific initial value to the timer circuit 1 from software,
The unit timer 4 is reset, and the timer circuit 1 is reset.
The configuration is configured to detect a specific value, for example, an overflow, from the .

(3)上記タイマ制御方式であって、上記タイマ回路1
で計数動作を行わせる時の単位時間周期の基準パルス■
を発生する基準タイマ3と、該基準タイマ3からの出力
される基準パルス■を計数するユニットタイマ4ど、 該ユニットタイマ4から出力されるユニットパルス■を
計数する上記タイマ回路1と、ソフトウェアから特定の
比較値を設定する上記比較レジスタ2と、 上記ソフトウェアにより、上記比較レジスタ2に比較値
を設定したタイミングで、上記ユニットタイマ4の値を
ユニットレジスタ5とを設けて、上記ユニットレジスタ
5とユニットタイマ4との値が一致した時点以降で、上
記タイマ回路1と、上記比較レジスタ2との一致を検出
するように構成する。
(3) In the above-mentioned timer control method, the above-mentioned timer circuit 1
Reference pulse of unit time period when performing counting operation in ■
A reference timer 3 that generates , a unit timer 4 that counts the reference pulses outputted from the reference timer 3, the timer circuit 1 that counts the unit pulses outputted from the unit timer 4, and software. The above-mentioned comparison register 2 sets a specific comparison value, and the unit register 5 stores the value of the unit timer 4 at the timing when the comparison value is set in the comparison register 2 by the software. The configuration is such that a match between the timer circuit 1 and the comparison register 2 is detected after the time when the values of the unit timer 4 match.

〔作用〕[Effect]

即ち、本発明によれば、時刻表示機構を備えた計算機シ
ステムにおいて、第1図(a)に示したタイマ回路に初
期値を設定する場合には、ソフトウェアからのタイマ書
き込み動作時に、ソフトウェアから見えるタイマ回路に
初期が設定されると同時に、該タイマ回路に計数パルス
を送出するユニットタイマがリセットされるので、該ユ
ニットタイマから桁上げが発生する迄、該タイマ回路で
の計数動作は行われないことになり、該ユニットタイマ
の計数の範囲内、即ち、タイマ回路での計数パルス■の
周期の幅の保障を行うことができる。
That is, according to the present invention, when setting an initial value to the timer circuit shown in FIG. 1(a) in a computer system equipped with a time display mechanism, the timer circuit shown in FIG. At the same time that the initial value is set in the timer circuit, the unit timer that sends counting pulses to the timer circuit is reset, so no counting operation is performed in the timer circuit until a carry occurs from the unit timer. Therefore, it is possible to ensure that the width of the period of the counting pulse (2) in the timer circuit is within the counting range of the unit timer.

又、第1図(b)に示した比較レジスタに比較値を設定
して、該比較レジスタの値とタイマ回路との一致検出に
よる時間監視を行う場合には、ソフトウェアからのタイ
マ書き込み動作時に、ソフトウェアから見える比較レジ
スタに比較値が設定されるタイミングにおいて、ユニッ
トタイマの値がユニットレジスタに設定され、該ユニッ
トレジスタの値とユニットタイマの値が一致した以鋒に
おいて、タイマ回路と比較レジスタとの一致検出が行わ
れるように動作するので、少なくとも、該ユニットタイ
マでの再計数の範囲内、即ち、タイマ回路での計数パル
ス■の周期の幅の保障を行うことができる。
Furthermore, when a comparison value is set in the comparison register shown in FIG. 1(b) and time monitoring is performed by detecting a match between the value of the comparison register and the timer circuit, at the time of timer write operation from software, At the timing when the comparison value is set in the comparison register visible to the software, the value of the unit timer is set in the unit register, and after the value of the unit register and the value of the unit timer match, the timer circuit and the comparison register are connected. Since the operation is performed such that coincidence detection is performed, it is possible to at least guarantee that the range of re-counting by the unit timer, that is, the period width of the counting pulse (2) in the timer circuit is guaranteed.

このように動作する為、通常のタイマ回路に若干の論理
回路を追加するだけで、正確な時間監視を行うことがで
きる効果がある。
Because it operates in this way, it has the effect of allowing accurate time monitoring by simply adding a few logic circuits to a normal timer circuit.

〔実施例〕〔Example〕

以下本発明の実施例を図面によって詳述する。 Embodiments of the present invention will be described in detail below with reference to the drawings.

前述の第1図は本発明の原理構成図であり、第2図は本
発明の一実施例を示した図であり、(a)はタイマ回路
に初期値を設定する場合を示し、′(b)は比較レジス
タに比較値を設定する場合を示しており、基準タイマ3
とタイマ回路1.又は、基準タイマ3とタイマ回路1と
比較レジスタ2の他に、該基準タイマ3からる基準パル
ス■を計数してタイマ回路1に計数パルス■を送出する
ユニットタイマ4.及び、ユニットレジスタ5とを設け
て、タイマ回路1に初期値を設定するタイミングでユニ
ットタイマ4をリセットする手段、及び、比較レジスタ
2に比較値を設定するタイミングで、ユニットタイマ4
の(直をユニットレジスタ5に設定し、ユニットレジス
タ5の値とユニットタイマ4の値とが一致した以降にお
いて、比較レジスタ2とタイマ回路1との比較を行う手
段が、本発明を実施するのに必要な手段である。尚、全
図を通して同じ符号は同じ対象物を示している。
The above-mentioned FIG. 1 is a diagram showing the principle configuration of the present invention, and FIG. 2 is a diagram showing an embodiment of the present invention. b) shows a case where a comparison value is set in the comparison register, and reference timer 3
and timer circuit 1. Alternatively, in addition to the reference timer 3, timer circuit 1, and comparison register 2, there is also a unit timer 4. which counts the reference pulses from the reference timer 3 and sends the counting pulses to the timer circuit 1. and means for resetting the unit timer 4 at the timing of setting the initial value in the timer circuit 1, and means for resetting the unit timer 4 at the timing of setting the comparison value in the comparison register 2.
The means for carrying out the present invention is a means for performing a comparison between the comparison register 2 and the timer circuit 1 after the value of the unit register 5 and the value of the unit timer 4 match. The same reference numerals indicate the same objects throughout the figures.

以下、第1図を参照しながら第2図によって本発明のタ
イマ制御方式を説明する。
Hereinafter, the timer control system of the present invention will be explained with reference to FIG. 2 while referring to FIG.

先ず、(a)図に示した実施例は、プログラムから見え
るタイマ回路1に初期値を設定し、該タイマ回路1が所
定値、例えば、オーバフロ〜を出力するのを検出するも
のである。
First, the embodiment shown in Figure (a) sets an initial value in a timer circuit 1 visible to the program, and detects when the timer circuit 1 outputs a predetermined value, for example, overflow.

本発明においては、基準タイマ3から出力される基準パ
ルス■(例えば、1μs周期)を計数して、タイマ回路
lで計数動作を行う為の計数パルス■(例えば、Ims
周期)を出力するユニットタイマ4を設ける。
In the present invention, the reference pulse (for example, 1 μs cycle) output from the reference timer 3 is counted, and the counting pulse (for example, Ims) is used for counting the counting operation in the timer circuit l.
A unit timer 4 is provided which outputs a period).

ここで、従来と同じように、ソフトウェア(プログラム
)から見えるタイマ回路1に初期値を設定するときの書
き込み信号(1−WE)に基づいて、タイマ回路1に初
期値を設定すると同時に、該ユニットタイマ4をリセッ
トする。
Here, as in the past, the initial value is set in the timer circuit 1 based on the write signal (1-WE) when setting the initial value in the timer circuit 1 visible from the software (program), and at the same time, the unit Reset timer 4.

この動作により、該タイマ回路1はユニットタイマ4か
ら桁上げが発生しないと計数動作が行われない為、該ユ
ニットタイマ4の計数の周期、例えば、上記1msの時
間幅の保障を行うことができる。
Due to this operation, the timer circuit 1 does not perform a counting operation unless a carry occurs from the unit timer 4, so it is possible to guarantee the counting period of the unit timer 4, for example, the above-mentioned time width of 1 ms. .

従って、プログラムがタイマ回路1に初期値をセットし
た直後に、ユニットタイマ4から計数パルス■が出力さ
れ、該タイマ回路Iがユニットタイマ4 からの計数パ
ルス■を計数して、正規の時間監視の為の計数パルス力
月パルス少なくなるような状態にユニットタイマ4がカ
ウントアツプしていても、該プログラムがタイマ回路1
に初期値をセットする時点で、該ユニットタイマ4の値
はリセットされるので、最低、該ユニットタイマ4の計
数の周期分、即ち、上記誤動作置の保障を取ることがで
きることが分かる。
Therefore, immediately after the program sets the initial value in the timer circuit 1, the counting pulse ■ is output from the unit timer 4, and the timer circuit I counts the counting pulse ■ from the unit timer 4 to perform regular time monitoring. Even if unit timer 4 is counting up in such a state that the counting pulse power for
Since the value of the unit timer 4 is reset when the initial value is set to , it is understood that at least the period of counting of the unit timer 4 can be guaranteed, that is, the above-mentioned malfunction can be guaranteed.

次に、(b)図に示した実施例は、プログラムからのタ
イマ比較値と、タイマ回路1のタイマ値との比較を行い
一致検出を行うものである。
Next, the embodiment shown in FIG. 2B compares the timer comparison value from the program with the timer value of the timer circuit 1 to detect a match.

本発明においては、図示されている如くに、基準タイマ
3から出力される基準パルスの(例えば、1μs周期)
を計数して、タイマ回路1で計数動作を行う為の計数パ
ルス■(例えば、1ms周期)を出力するユニットタイ
マ4と、プログラムが比較レジスタ2に比較値を設定す
るタイミングで、上記ユニットタイマ4の値を設定する
ユニットレジスタ5を設ける。
In the present invention, as shown in the figure, the reference pulse output from the reference timer 3 (for example, 1 μs period)
The unit timer 4 counts and outputs a counting pulse (for example, 1 ms cycle) for performing a counting operation in the timer circuit 1, and the unit timer 4 A unit register 5 is provided to set the value of .

この実施例においては、以下のように動作する。This embodiment operates as follows.

プログラムから比較レジスタ2にタイマ比較値を設定す
るとき、タイマ回路1の値は°0010 (161で、
ユニットタイマの値は02FF (161’ で、比較
設定データが“0011゜0゛であったとする。
When setting the timer comparison value in comparison register 2 from the program, the value of timer circuit 1 is °0010 (161,
Assume that the value of the unit timer is 02FF (161') and the comparison setting data is "0011°0".

プログラムからの比較値の書き込み信号(COMPWE
)が有効になって、比較レジスタ2に上記の比較設定デ
ータ °0011 (+61”が設定されたとき、本発
明においては、該書き込み信号(COMP−WE)によ
って、その時のユニットタイマの値’02FF +1 
&)が、ユニットレジスタ5に設定され、自身は030
0 (161’ にカウントアツプする。従って、比較
器(C)6では一致信号(EQ2)は出力されない。
Comparison value write signal (COMPWE) from the program
) is enabled and the above comparison setting data °0011 (+61") is set in the comparison register 2, in the present invention, the current unit timer value '02FF' is set by the write signal (COMP-WE). +1
&) is set in unit register 5, and itself is 030.
0 (161'). Therefore, the comparator (C) 6 does not output a match signal (EQ2).

この状態で、該ユニットタイマ4から計数パルス■が出
力され、タイマ回1路1のイ直が“0011(+61に
なったよき比較器(C)7が動作して一致信号(E旧)
が有効になるが、上記一致信号(EQ2)が出力されて
いないので、論理積回路(AND) 8の出力(8口3
)は有効にはならない。
In this state, the counting pulse ■ is output from the unit timer 4, and the comparator (C) 7 operates, and the I value of the timer circuit 1 circuit 1 becomes "0011 (+61)", and the coincidence signal (E old) is activated.
becomes valid, but since the above coincidence signal (EQ2) is not output, the output of AND circuit (AND) 8 (8 ports 3
) is not valid.

従来方式においては、タイマ回路1と比較レジスタ2と
の比較動作のみであるので、上記のように、タイマ回路
1の値が’0010 (+ 6) ’→’0011 N
 6)の間での一致検出が、最小、上記基準パルス■の
周3tl′I(1μs)で行われてしまうことがある。
In the conventional method, only the comparison operation between timer circuit 1 and comparison register 2 is performed, so as mentioned above, the value of timer circuit 1 changes from '0010 (+6)' to '0011 N'.
In some cases, the coincidence detection between 6) and 6) is carried out at the minimum time of 3tl'I (1 μs) of the reference pulse ①.

(ユニットタイマ4での計数が桁上げを行う1μs前で
あった場合) 本発明の場合、上記のように、タイマ回路Iと比較レジ
スタ2との間で一致が検出されても(EQI・°1°)
、ユニットタイマ4とユニットレジスタ5の値とが一致
(EQ2=’l’) した出力信号が保持されて、論理
積回路(AND) 8をゲートしないと、該タイマ回路
1の一致出力(8口3)は得られない。
(When the count in the unit timer 4 is 1 μs before carry-up) In the case of the present invention, as described above, even if a match is detected between the timer circuit I and the comparison register 2 (EQI ° 1°)
, if the output signal in which the values of unit timer 4 and unit register 5 match (EQ2='l') is held and the AND circuit (AND) 8 is not gated, the matching output (8 bits) of the timer circuit 1 will be output. 3) cannot be obtained.

即ち、本発明においては、ユニットタイマ4が、’03
00 (1−1″から次の “02FF +16)” 
となる迄の少なくとも、999μsの時間後に、上記論
理積回路(AND) 8を有効とするように動作するの
で、該ユニットタイマ4での計数周期の幅を保障するこ
とができる。
That is, in the present invention, the unit timer 4
00 (1-1″ to next “02FF +16)”
Since the AND circuit (AND) 8 is activated at least after a time of 999 μs, the width of the counting period in the unit timer 4 can be guaranteed.

従って、プログラムがタイマ回路1のタイマ値を読み出
し、その値に監視時間を加算した値を比較レジスタ2に
設定した直後に、ユニットタイマ4から計数パルス■が
出力され、該タイマ回路1が計数パルスを計数して、正
規の時間監視の為の計数パルスが1パルス少な(なった
としても、論理積回路(AND) 8での一致検出が行
われるのは、少なくとも、該ユニットタイマ4の値が、
上記プログラムが比較レジスタ2に比較値を設定した時
と同じ値になった時点以降であるので、最低、該ユニッ
トタイマ4の計数の周期分、即ち、上記娯動作分の保障
を取ることができることが分かる。
Therefore, immediately after the program reads the timer value of the timer circuit 1 and sets the value obtained by adding the monitoring time to that value in the comparison register 2, the unit timer 4 outputs the counting pulse ■, and the timer circuit 1 outputs the counting pulse Even if the count pulse for regular time monitoring becomes one pulse less, the coincidence detection in the AND circuit (AND) 8 is performed at least as long as the value of the unit timer 4 is ,
Since this is after the time when the above program reaches the same value as when the comparison value is set in the comparison register 2, it is possible to guarantee at least the counting period of the unit timer 4, that is, the above-mentioned entertainment operation. I understand.

この方式では、上記基準タイマ3で計数している基準パ
ルス■の周期を短くして、当該ユニットタイマ4の桁数
(ビット数)を増加させることにより、更に、時間監視
の精度を向上させることができる。
In this method, the accuracy of time monitoring can be further improved by shortening the period of the reference pulse ■ counted by the reference timer 3 and increasing the number of digits (number of bits) of the unit timer 4. I can do it.

このように、本発明は、時刻表示機構を備えた計算機シ
ステムにおいて、基準タイマとタイマ回路、又は、基準
タイマとタイマ回路と比較レジスタの他に、該基準タイ
マからの基準パルスのを計数してタイマ回路に計数パル
ス■を送出するユニットタイマ、及び、ユニットレジス
タとを設けて、タイマ回路に初期値を設定するタイミン
グでユニットタイマをリセットするか1又は、比較レジ
スタに比較値を設定するタイミングで、ユニットタイマ
の値をユニットレジスタに設定し、ユニットレジスタの
(直とユニットタイマの4Mとが一致した以降において
、比較レジスタとタイマ回路との比較を行うようにして
、タイマ回路の計数パルス■の周期の時間幅の保障をと
り、タイマ回路の状態の如何にかかわらず、該タイマ回
路において正しい計数を行うことができるようにした所
に特徴がある。
As described above, the present invention provides a computer system equipped with a time display mechanism in which, in addition to a reference timer and a timer circuit, or a reference timer and a timer circuit and a comparison register, the reference pulses from the reference timer are counted. A unit timer that sends a counting pulse ■ and a unit register are provided in the timer circuit, and the unit timer is reset at the timing when the initial value is set in the timer circuit, or when the comparison value is set in the comparison register. , the value of the unit timer is set in the unit register, and after the value of the unit register ((direct) and 4M of the unit timer match, the comparison register and the timer circuit are compared, and the count pulse of the timer circuit is The feature is that the time width of the cycle is guaranteed so that correct counting can be performed in the timer circuit regardless of the state of the timer circuit.

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

以上、詳細に説明したように、本発明のタイマ制御方式
は、時刻表示機構を備えた計算機システムにおいて、タ
イマ回路を備えて、該タイマ回路に対して、直接初期値
を設定して計数動作を行わせ、所定の値になったことを
検出するか、又は、タイマ回路と、該タイマ回路に対す
る比較値を設定する比較レジスタとを備えて、該タイマ
回路の計数値と、上記比較レジスタとを比較して一致し
たことを検出するタイマ制御方式であって、上記初期値
をタイマ回路に設定した時刻より、又は、上記比較値を
比較レジスタに設定した時刻より、上記条件の検出迄の
時刻に対して、少なくとも、上記タイマ回路の計数パル
ス■の周期の幅を保障するように構成したものであるの
で、通常のタイマ回路に若干の論理回路を追加するだけ
で、正確な時間監視を行うことができる効果がある。
As explained above in detail, the timer control method of the present invention is a computer system equipped with a time display mechanism, which is equipped with a timer circuit, and directly sets an initial value to the timer circuit to perform a counting operation. or detect that a predetermined value has been reached, or provide a timer circuit and a comparison register for setting a comparison value for the timer circuit, and compare the counted value of the timer circuit and the comparison register. This is a timer control method that compares and detects a match, from the time when the above initial value is set in the timer circuit, or from the time when the above comparison value is set in the comparison register, until the time when the above condition is detected. On the other hand, since it is configured to ensure at least the width of the period of the counting pulse (■) of the timer circuit, accurate time monitoring can be performed simply by adding a few logic circuits to a normal timer circuit. It has the effect of

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

第1図は本発明の原理構成図 第2図は本発明の一実施例を示した図。 第3図は従来のタイマ制御方式を説明する図である。 図面において、 1はタイマ回路、    2は比較レジスタ。 3は発振器、又は、基準タイマ。 4はユニ・ンI・タイマ 5はユニントレジスタ、6,7は比較器(C)。 8は論理積回路(AND)。 ■ハ基準パルス、   ■は計数ハ/L/ス。 をそれぞれ示す。 第 図 本発明の原理構成図 第 1 図 プログラムからアクセス プログラムからアクセス 従来のタイマ制獅方式を説明する凹 第3囲 Figure 1 is a diagram of the principle configuration of the present invention. FIG. 2 is a diagram showing an embodiment of the present invention. FIG. 3 is a diagram illustrating a conventional timer control method. In the drawing, 1 is a timer circuit, 2 is a comparison register. 3 is an oscillator or reference timer. 4 is Uni-I timer 5 is a unit register, 6 and 7 are comparators (C). 8 is a logical product circuit (AND). ■C reference pulse, ■ is counting C/L/S. are shown respectively. No. figure Principle configuration diagram of the present invention Figure 1 Accessed programmatically Accessed programmatically Concave explaining the conventional timer control method Box 3

Claims (3)

【特許請求の範囲】[Claims] (1)時刻表示機構を備えた計算機システムにおいて、 タイマ回路(1)を備えて、該タイマ回路(1)に対し
て、直接初期値を設定して計数動作を行わせ、所定の値
になったことを検出するか、又は、タイマ回路(1)と
、該タイマ回路(2)に対する比較値を設定する比較レ
ジスタ(2)とを備えて、該タイマ回路(1)の計数値
と、上記比較レジスタ(2)とを比較して一致したこと
を検出するタイマ制御方式であって、 上記初期値をタイマ回路(1)に設定した時刻より、又
は、上記比較値を比較レジスタ(2)に設定した時刻よ
り、上記条件の検出迄の時刻に対して、少なくとも、上
記タイマ回路(2)の計数パルス([2])の周期の幅
を保障することを特徴とするタイマ制御方式。
(1) In a computer system equipped with a time display mechanism, a timer circuit (1) is provided, and an initial value is directly set for the timer circuit (1) to cause it to perform a counting operation until a predetermined value is reached. or a timer circuit (1) and a comparison register (2) for setting a comparison value for the timer circuit (2); This is a timer control method that detects a match by comparing the above initial value with the comparison register (2). A timer control method, characterized in that at least the period width of the counting pulse ([2]) of the timer circuit (2) is guaranteed from a set time until the detection of the above condition.
(2)上記タイマ制御方式であって、上記タイマ回路(
1)で計数動作を行わせる時の単位時間周期の基準パル
ス([1])を発生する基準タイマ(3)と、該基準タ
イマ(3)からの出力される基準パルス([1])を計
数するユニットタイマ(4)と、該ユニットタイマ(4
)から出力されるユニットパルス([2])を計数する
上記タイマ回路(1)とを設けて、 ソフトウェアから特定の初期値を上記タイマ回路(1)
に設定すると共に、上記ユニットタイマ(4)をリセッ
トし、上記タイマ回路(1)からの所定値を検出するこ
とを特徴とする請求項1に記載のタイマ制御方式。
(2) The above-mentioned timer control method, which comprises the above-mentioned timer circuit (
A reference timer (3) that generates a reference pulse ([1]) of a unit time period when performing counting operation in step 1), and a reference pulse ([1]) output from the reference timer (3). The unit timer (4) for counting and the unit timer (4)
) and the above-mentioned timer circuit (1) that counts the unit pulse ([2]) output from
2. The timer control method according to claim 1, wherein the unit timer (4) is reset and a predetermined value from the timer circuit (1) is detected.
(3)上記タイマ制御方式であって、上記タイマ回路(
1)で計数動作を行わせる時の単位時間周期の基準パル
ス([1])を発生する基準タイマ(3)と、該基準タ
イマ(3)からの出力される基準パルス([1])を計
数するユニットタイマ(4)と、該ユニットタイマ(4
)から出力されるユニットパルス([2])を計数する
上記タイマ回路(1)と、ソフトウェアから特定の比較
値を設定する上記比較レジスタ(2)と、 上記ソフトウェアにより、上記比較レジスタ(2)に比
較値を設定したタイミングで、上記ユニットタイマ(4
)の値を設定するユニットレジスタ(5)とを設けて、 上記ユニットレジスタ(5)とユニットタイマ(4)と
の値が一致した時点以降で、上記タイマ回路(1)と、
上記比較レジスタ(2)との一致を検出することを特徴
とする請求項1に記載のタイマ制御方式。
(3) The above-mentioned timer control method, which comprises the above-mentioned timer circuit (
A reference timer (3) that generates a reference pulse ([1]) of a unit time period when performing counting operation in step 1), and a reference pulse ([1]) output from the reference timer (3). The unit timer (4) for counting and the unit timer (4)
) The above-mentioned timer circuit (1) counts unit pulses ([2]) output from the above-mentioned comparison register (2), which sets a specific comparison value from software; At the timing when the comparison value is set, the above unit timer (4
), and after the values of the unit register (5) and the unit timer (4) match, the timer circuit (1) and
2. The timer control system according to claim 1, wherein a match with said comparison register (2) is detected.
JP1143410A 1989-06-06 1989-06-06 Timer control system Pending JPH038005A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP1143410A JPH038005A (en) 1989-06-06 1989-06-06 Timer control system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP1143410A JPH038005A (en) 1989-06-06 1989-06-06 Timer control system

Publications (1)

Publication Number Publication Date
JPH038005A true JPH038005A (en) 1991-01-16

Family

ID=15338125

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1143410A Pending JPH038005A (en) 1989-06-06 1989-06-06 Timer control system

Country Status (1)

Country Link
JP (1) JPH038005A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003040156A (en) * 2001-07-30 2003-02-13 Bridgestone Corp Rubber crawler without cored bar

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003040156A (en) * 2001-07-30 2003-02-13 Bridgestone Corp Rubber crawler without cored bar

Similar Documents

Publication Publication Date Title
JPH0743653B2 (en) Interrupt controller
US4523289A (en) Time interval measuring system
KR20040068971A (en) High accuracy method for determining the frequency of a pulse input signal over a wide frequency range
JPH038005A (en) Timer control system
JP2737645B2 (en) Program debug device
JPS6051141B2 (en) Program runaway detection method
KR100207481B1 (en) Detecting time adjustment equipment to detect data during desire period
JPH07260845A (en) Pulse period measuring circuit
JPH0751631Y2 (en) CPU runaway detection circuit
JPS632353B2 (en)
JPH02150942A (en) Bus abnormality detecting circuit
JP2557785Y2 (en) Single chip microcomputer
JPH0894660A (en) Pulse measuring apparatus
JPH0356984A (en) Revolution speed change detecting device
JPH04225432A (en) Interruption processing time control system for one-chip microcomputer
JPH0365739A (en) Control device
JPS61286933A (en) Information processor
JPH04117096A (en) Microcomputer
JPH06195245A (en) Monitor timer device
JPH04106637A (en) Stall detection circuit
JPH05328451A (en) Remote controller reception circuit
JPH01283641A (en) Interruption controller
JPH0120393B2 (en)
JPH0638593B2 (en) Reset signal discrimination circuit
JPS58125127A (en) Signal input device of microcomputer