JPS5835288B2 - timer circuit - Google Patents

timer circuit

Info

Publication number
JPS5835288B2
JPS5835288B2 JP53009502A JP950278A JPS5835288B2 JP S5835288 B2 JPS5835288 B2 JP S5835288B2 JP 53009502 A JP53009502 A JP 53009502A JP 950278 A JP950278 A JP 950278A JP S5835288 B2 JPS5835288 B2 JP S5835288B2
Authority
JP
Japan
Prior art keywords
timer
counter
circuit
period
bit
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
JP53009502A
Other languages
Japanese (ja)
Other versions
JPS54102939A (en
Inventor
正裕 栗山
一郎 中島
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 JP53009502A priority Critical patent/JPS5835288B2/en
Publication of JPS54102939A publication Critical patent/JPS54102939A/en
Publication of JPS5835288B2 publication Critical patent/JPS5835288B2/en
Expired legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)
  • Electronic Switches (AREA)

Description

【発明の詳細な説明】 本発明はタイマー回路に関する。[Detailed description of the invention] The present invention relates to timer circuits.

電子計算機等の処理装置において各種の時間監視のため
にタイマー回路が使用される。
Timer circuits are used in processing devices such as electronic computers to monitor various times.

このタイマー回路は処理装置内にハード的にもうけられ
る場合もあれば、また記憶装置内の特定領域がタイマー
領域として使用され、読出された内容を共通の演算回路
により計数して格納するという方法がとられる場合もあ
る。
This timer circuit may be provided in hardware within the processing device, or a specific area within the storage device may be used as a timer area, and the read contents may be counted and stored by a common arithmetic circuit. Sometimes it is taken.

いずれの場合においても、これらタイマーに対して更新
起動信号を発生するとき更新起動信号発生回路において
、その精度を高めるためにタイマー自体の更新周波数よ
りも高周波数の発振器を用い、この出力信号を計数回路
によって適当な回数だけ計数して所要の周期をもった更
新起動信号を発生するという方法が多く使用されている
In either case, when generating an update start signal for these timers, the update start signal generation circuit uses an oscillator with a higher frequency than the update frequency of the timer itself to increase the accuracy, and counts this output signal. A method is often used in which a circuit counts an appropriate number of times and generates an update activation signal with a required period.

ところで、タイマーの更新周期が無限小数となる場合、
適尚な精度がとれる桁で近似して、この近似値まで計数
して、これを更新周期とする方法が従来用いられてきた
By the way, if the timer update cycle is an infinite decimal number,
Conventionally, a method has been used in which an approximation is made using digits that provide appropriate accuracy, and the number is counted up to this approximate value, and this is used as the update period.

しかし、これでは時間と共に誤差が累積し、長時間たつ
と大きな誤差が生じてしまう。
However, with this method, errors accumulate over time, resulting in large errors occurring over a long period of time.

近似の時の桁数を多くして精度を高めようとするとハー
ドウェアの増加をまねき、これによっても誤差の累積を
なくすことはできず、本質的な解決にはならない。
Attempting to increase accuracy by increasing the number of digits in approximation will result in an increase in hardware, and this will not eliminate the accumulation of errors and will not provide an essential solution.

第1図は従来の回路例およびそのタイムチャートで更新
周期が1 / 3 m sの場合である。
FIG. 1 shows an example of a conventional circuit and its time chart, where the update period is 1/3 ms.

まず、8MHzの発振器で125ns周期のパルスを作
成し、これを4段分周回路で16倍の周期の2μs周期
のパルスに変換し、さらにこれを微分回路でカウンタ回
路計数用のパルスに変換する。
First, a pulse with a period of 125 ns is created using an 8 MHz oscillator, and this is converted into a pulse with a period of 2 μs, which is 16 times the period, using a 4-stage frequency divider circuit. This is then converted into a pulse for counting by the counter circuit using a differentiating circuit. .

カウンタ回路は8ビツトの2進カウンタで構成され、計
数開始時点にro 1011000J(10進の88)
の値がプリセットされる。
The counter circuit consists of an 8-bit binary counter, and at the start of counting, ro 1011000J (88 in decimal)
The value of is preset.

プリセットされた88から計数開始したカウンタ回路は
255まで計数したときキャリーを発生する。
The counter circuit starts counting from a preset value of 88 and generates a carry when it counts up to 255.

このキャリー信号がタイマー更新起動信号となり図示し
ないタイマーを更新させる。
This carry signal becomes a timer update start signal and updates a timer (not shown).

タイマー更新起動信号が発せられるとカウンタ回路は再
び「01011000」の値がプリセットされ、この値
から計数を開始していく。
When the timer update activation signal is issued, the counter circuit is again preset to the value "01011000" and starts counting from this value.

このカウンタ回路は2μsのパルスで計数され「88」
の値から「255」の値まで167サイクル計数するの
でタイマー更新起動信号は2μ5X167=334μS
毎に発生することになる。
This counter circuit counts "88" with 2 μs pulses.
Since 167 cycles are counted from the value of "255", the timer update activation signal is 2μ5 x 167 = 334μS
It will occur every time.

一方、目標とする更新周期は1 / 3 m sで0.
3333・・・・・・msの無限小数となるので第1図
の回路ではタイマーの更新ごとに0.00133・・・
・・・msの誤差が生ずることになる。
On the other hand, the target update period is 1/3 ms and 0.
3333... is an infinite decimal number of ms, so in the circuit shown in Figure 1, every time the timer is updated, it is 0.00133...
...An error of ms will occur.

本発明は上記欠点を解決し、精度の高いタイマー回路を
実現することを目的とし、そのため本発明はタイマーの
更新周波数よりも高周波数の信号を出力する発振器をそ
なえ、該発振器の出力信号を所定の値まで計数して所要
の周期を有するタイマー更新起動信号を発生するタイマ
ー回路において、上記発振器の出力信号を所定の値まで
計数し、タイマー更新起動信号を生成する第1のカウン
タ手段と上記タイマー更新起動信号を所定回数計数する
第2のカウンタ手段と上記第1のカウンタ手段に固定デ
ータをセットせしめるプリセット手段とを具備し、上記
第1のカウンタ手段の特定ビットを除くビット位置に上
記プリセット手段から固定データを初期値としてセット
せしめ、上記第1のカウンタ手段の該特定ビット位置に
上記第2のカウンタ手段の特定ビットを初期値としてセ
ットせしめ、上記第1のカウンタ手段から生成されるタ
イマー更新起動信号の周期を呵変にしたことを特徴とす
る。
SUMMARY OF THE INVENTION An object of the present invention is to solve the above drawbacks and realize a highly accurate timer circuit. Therefore, the present invention includes an oscillator that outputs a signal with a higher frequency than the update frequency of the timer, and the output signal of the oscillator is set to a predetermined value. A timer circuit that counts the output signal of the oscillator up to a predetermined value and generates a timer update start signal having a required period, the timer circuit comprising: a first counter means that counts the output signal of the oscillator up to a predetermined value and generates the timer update start signal; and the timer. A second counter means for counting the update start signal a predetermined number of times, and a preset means for setting fixed data in the first counter means, and the preset means sets the bit position of the first counter means except for a specific bit. to set fixed data as an initial value, set a specific bit of the second counter means as an initial value in the specific bit position of the first counter means, and update the timer generated from the first counter means. It is characterized in that the cycle of the activation signal is varied.

以下、本発明を実施例により詳細に説明する。Hereinafter, the present invention will be explained in detail with reference to Examples.

第2図は本発明による第1の実施例の回路およびそのタ
イムチャートである。
FIG. 2 shows a circuit and a time chart of the first embodiment of the present invention.

第2図において1は8MHzの発振器であり、125n
s周期のパルスを発生するもの、2は4段分周回路であ
り、入力の125ns周期のパルスを16倍の2μs周
期のパルスに落すもの、3は微分回路、4は8ビツトの
2進カウンタ、5はプリセットデータ作成回路であり、
ビット「0101100」を2進カウンタ4の上位7ビ
ツトにセットするもの、6は2ビツトからなる3進の補
助カウンタであり、ビットOの値が8ビツト2進カウン
タの最下位ビットにセットされるものである。
In Figure 2, 1 is an 8MHz oscillator, and 125n
2 is a 4-stage frequency divider circuit that reduces the input 125 ns period pulse to 16 times the 2 μs period pulse, 3 is a differentiating circuit, and 4 is an 8-bit binary counter. , 5 is a preset data creation circuit;
Bit ``0101100'' is set to the upper 7 bits of binary counter 4, 6 is a ternary auxiliary counter consisting of 2 bits, and the value of bit O is set to the least significant bit of the 8-bit binary counter. It is something.

第2図の回路はタイマー更新起動信号を1/3ms周期
で発生するものであり、その動作は以下の通りである。
The circuit shown in FIG. 2 generates a timer update activation signal at a cycle of 1/3 ms, and its operation is as follows.

発振器1で作成された125ns周期のパルスは4段分
周回路2および微分回路3により、8ビツト2進カウン
タ4を歩進させるための2μsのパルスに変換される。
A 125 ns period pulse generated by the oscillator 1 is converted by a 4-stage frequency divider circuit 2 and a differentiator circuit 3 into a 2 μs pulse for incrementing an 8-bit binary counter 4.

一方、8ビツト2進カウンク4はプリセットデータ作成
回路5および3進カウンタ6により初期値が設定される
ものであり、いま3進カウンタ6の値がIf o II
+ (ビットOがII () ll、ビット1がIt
I II )で、8ビツト2進カウンタ4には初期値「
01011000j(10進の88)がプリセットされ
ているものとする。
On the other hand, the initial value of the 8-bit binary counter 4 is set by the preset data creation circuit 5 and the ternary counter 6, and the value of the ternary counter 6 is now If o II.
+ (bit O is II () ll, bit 1 is It
I II), the 8-bit binary counter 4 has the initial value "
It is assumed that 01011000j (88 in decimal) is preset.

プリセットされた88から計数開始したカウンタ回路は
255まで計数したときキャリーを発生する。
The counter circuit starts counting from a preset value of 88 and generates a carry when it counts up to 255.

このキャリー信号がタイマー更新起動信号となり図示し
ないタイマーを更新する。
This carry signal becomes a timer update start signal and updates a timer (not shown).

さらにこのときタイマー更新起動信号により3進カウン
タ6が計数され、3進カウンタ6の値はIt 01 I
IからIt 1 () IIに変化する。
Furthermore, at this time, the ternary counter 6 is counted by the timer update activation signal, and the value of the ternary counter 6 is It 01 I
It changes from I to It 1 () II.

一方、8ビツト2進カウンク4は255まで計数したと
き再びプリセットされるが、最下位ビットには3進カウ
ンタ6のビットOの変更前の値がセットされる。
On the other hand, when the 8-bit binary counter 4 has counted up to 255, it is preset again, but the value before the change of bit O of the ternary counter 6 is set in the least significant bit.

従って、8ビツト2進カウンタ4には前回と同様に初期
値として「01011000」(10進の88)がプリ
セットされる。
Therefore, the 8-bit binary counter 4 is preset to "01011000" (88 in decimal) as the initial value as in the previous case.

プリセットされた88から計数開始した8ビツト2進カ
ウンタ4は255まで計数したとき再びキャリーを発生
し、前回と同様にこのキャリー信号がタイマー更新起動
信号となり図示しないタイマーを更新する。
The 8-bit binary counter 4, which started counting from the preset value of 88, generates a carry again when it counts up to 255, and similarly to the previous time, this carry signal becomes a timer update activation signal and updates a timer (not shown).

さらにタイマー更新起動信号により3進カウンタ6が計
数され、3進カウンタ6の値はII 10 IfからI
I 00 Itに変化する。
Furthermore, the ternary counter 6 is counted by the timer update activation signal, and the value of the ternary counter 6 is changed from II 10 If to I
It changes to I 00 It.

8ビツト2進カウンタ4は255まで計数したとき再び
プリセットされ、最下位ビットには3進カウンタ6のビ
ット0の変更前の値II I IIがセットされる。
When the 8-bit binary counter 4 counts up to 255, it is again preset, and the least significant bit is set to the value II II II of bit 0 of the ternary counter 6 before the change.

このため8ビツト2進カウンタ4には前々回および前回
とは異なり、初期値として「01011001J(10
進89)がプリセットされる。
Therefore, the 8-bit binary counter 4 has an initial value of "01011001J (10
89) is preset.

プリセットされた89から計数開始した8ビツト2進カ
ウンタ4は前回までと同様に255まで計数したとき再
びキャリーを発生し、このキャリー信号がタイマー更新
起動信号となり図示しないタイマーを更新する。
The 8-bit binary counter 4, which started counting from the preset 89, generates a carry again when it counts up to 255 as before, and this carry signal becomes a timer update starting signal to update a timer (not shown).

さらにタイマー更新起動信号により3進カウンタ6が計
数され、3進カウンタ6の値はII OOIIから”0
111に変化する。
Furthermore, the ternary counter 6 counts based on the timer update activation signal, and the value of the ternary counter 6 changes from II OOII to "0".
Changes to 111.

また、8ビツト2進カウンタ4の次のプリセット値はr
ololloooJ(10進の88)となり最初に戻る
ことになる。
Also, the next preset value of the 8-bit binary counter 4 is r
It becomes ololloooJ (88 in decimal) and returns to the beginning.

このように、8ビツト2進カウンタ4は88から255
まで167サイクルだけ計数する2つの期間と89から
255まで166サイクルだけ計数する1つの期間とを
有する。
Thus, the 8-bit binary counter 4 is 88 to 255
There are two periods in which 167 cycles are counted from 89 to 255, and one period in which 166 cycles are counted from 89 to 255.

即ち、タイマー更新起動信号の発生周期は3回のうち2
回は334μS周期であり、3回のうち1回は332μ
S周期となる。
In other words, the generation cycle of the timer update activation signal is 2 out of 3.
The cycle is 334μS, and one of the three times is 332μS.
It becomes S period.

これにより連続する3個のタイマー更新起動信号が正確
に1 m sの期間に発生するため誤差の累積はなくな
る。
As a result, three consecutive timer update activation signals are generated within a period of exactly 1 ms, so that there is no accumulation of errors.

つまり、第1の実施例の方法は、タイマーの更新周期が
T / nのとき連続n回の更新のうち、最初のn−1
回は従来と同様に近似された周期T/n+α(αは誤差
)で更新し、残りの1回はカウント数を変え、T/n−
α(n−1)だけの間隔で更新するようにしたものであ
る。
In other words, in the method of the first embodiment, when the update period of the timer is T/n, the first n-1 of consecutive n updates are performed.
The times are updated at the approximate period T/n+α (α is the error) as before, and the remaining times are updated by changing the count number and T/n−
The information is updated at intervals of α(n-1).

このようにするとn回で (T/n+α) (n−1)+T/n−0t(n −1
)=Tだけの時間を更新することになり、更新周期はT
/nとなり誤差はOとなる。
In this way, (T/n+α) (n-1)+T/n-0t(n-1
) = T time is updated, and the update period is T
/n, and the error is O.

(n−1)回目までの更新中に現われる誤差について考
えると、αそのものは従来と同程度の値であるが、全体
の時間からみれば無視しうるものとなる。
Considering the error that appears during the (n-1)th update, α itself is about the same value as in the past, but it can be ignored in terms of the overall time.

次に、第3図は本発明による第2の実施例の回路および
そのタイムチャートである。
Next, FIG. 3 shows a circuit of a second embodiment according to the present invention and its time chart.

第3図において1ないし3は第2図の同一番号と同一物
を示す。
In FIG. 3, 1 to 3 indicate the same items as the same numbers in FIG.

また、7は9ビツトの2進カウンタ、8はビット「00
100001」を9ビツト2進カウンタ7の上位8ビツ
トにセットするためのプリセットデータ作成回路、9は
4ビツトからなる9進の補助カウンタでありビット3の
値が9ビツト2進カウンタの最下位ビットにセットされ
るものである。
Also, 7 is a 9-bit binary counter, and 8 is bit ``00''.
100001" to the upper 8 bits of the 9-bit binary counter 7. 9 is a 4-bit 9-bit auxiliary counter, and the value of bit 3 is the least significant bit of the 9-bit binary counter. It is set to .

第3図の回路はタイマー更新起動信号を8/9ms周期
で発生するものである。
The circuit shown in FIG. 3 generates a timer update activation signal at a cycle of 8/9 ms.

第3図の回路の動作は第2図の回路動作とほぼ同様であ
り容易に理解されるので詳細な動作説明は省略するが、
第3図のタイムチャートに示すように9ビツト2進カウ
ンタ7のプリセット値を変えることによりタイマー更新
起動信号を9回のうち5回は888μs周期で、9回の
うち4回は890μS周期で発生するようにしたもので
ある。
The operation of the circuit in FIG. 3 is almost the same as the circuit operation in FIG. 2 and is easily understood, so a detailed explanation of the operation will be omitted.
As shown in the time chart in Figure 3, by changing the preset value of the 9-bit binary counter 7, the timer update activation signal is generated five times out of nine times at an 888 μs period, and four times out of nine times at an 890 μs period. It was designed to do so.

これにより連続する9個のタイマー更新起動信号が正確
に8 m sの期間に発生するため誤差の累積はなくな
る。
As a result, nine consecutive timer update activation signals are generated within a period of exactly 8 ms, so that there is no accumulation of errors.

つまり、第2の実施例の方法は、タイマーの更新周期が
T / nのとき連続n回の更新のうち、たとえば偶数
番目はtlという周期、奇数番目はt2という周期とい
うように2種類の周期を適当に組合せて更新するように
したものである。
In other words, in the method of the second embodiment, when the update period of the timer is T/n, out of n consecutive updates, two types of periods are used, for example, a period of tl for an even number and a period of t2 for an odd number. It is updated by appropriately combining the following.

として、周期t1でi回更新し、周期t2でj回更新す
るようにすれば となり、n回でTだけ更新することになり誤差はOとな
る。
If it is updated i times in period t1 and j times in period t2, it will be updated by T in n times, and the error will be O.

αそのものは従来技術と同程度の値であり、t、とt2
を交互に組合せることにより、この2回の更新だけでも
従来よりはるかに精度はよくなり、また全体の時間から
みれば、この誤差は無視しつるものとなる。
α itself has a value similar to that of the conventional technology, and t and t2
By alternately combining these, the accuracy is much better than before even with just these two updates, and in terms of the overall time, this error can be ignored.

以上のように本発明によれば、はとんどハードウェアを
増加せずに非常に高精度のタイマー回路が容易にできる
利点を有する。
As described above, the present invention has the advantage that a very high precision timer circuit can be easily constructed without increasing hardware.

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

第1図は従来の回路例およびそのタイムチャート、第2
図は本発明による第1の実施例の回路およびそのタイム
チャート、第3図は本発明による第2の実施例の回路お
よびタイムチャートである。 図中、1は発振器、2は分周回路、3は微分回路、4は
8ビツト2進カウンタ、5はプリセットデータ作成回路
、6は3進カウンタ、7は9ビツト2進カウンタ、8は
プリセットデータ作成回路、9は9進カウンタである。
Figure 1 shows a conventional circuit example and its time chart, and Figure 2 shows a conventional circuit example and its time chart.
The figure shows a circuit and a time chart of a first embodiment of the present invention, and FIG. 3 shows a circuit and a time chart of a second embodiment of the present invention. In the figure, 1 is an oscillator, 2 is a frequency dividing circuit, 3 is a differentiation circuit, 4 is an 8-bit binary counter, 5 is a preset data creation circuit, 6 is a ternary counter, 7 is a 9-bit binary counter, and 8 is a preset In the data creation circuit, 9 is a 9-ary counter.

Claims (1)

【特許請求の範囲】[Claims] 1 タイマーの更新周波数よりも高周波数の信号を出力
する発振器をそなえ、該発振器の出力信号を所定の値ま
で計数して所要の周期を有するタイマー更新起動信号を
発生するタイマー回路において上記発振器の出力信号を
所定の値まで計数しタイマー更新起動信号を生成する第
1のカウンタ手段と上記タイマー更新起動信号を所定回
数計数する第2のカウンタ手段と上記第1のカウンタ手
段に固定データをセットせしめるプリセット手段とを具
備し、上記第1のカウンタ手段の特定ビットを除くビッ
ト位置に上記プリセット手段から固定データを初期値と
してセットせしめ、上記第1のカウンタ手段の該特定ビ
ット位置に上記第2のカウンタ手段の特定ビットを初期
値としてセットせしめ、上記第1のカウンタ手段から生
成されるタイマー更新起動信号の周期を可変にしたこと
を特徴とするタイマー回路。
1 In a timer circuit that is equipped with an oscillator that outputs a signal with a higher frequency than the update frequency of the timer, and that counts the output signal of the oscillator up to a predetermined value and generates a timer update start signal having a required period, the output of the oscillator a first counter means for counting signals up to a predetermined value and generating a timer update start signal; a second counter means for counting the timer update start signal a predetermined number of times; and a preset for setting fixed data in the first counter means. means for setting fixed data as an initial value from the presetting means to bit positions other than a specific bit of the first counter means, and setting the fixed data to the specific bit position of the first counter means as an initial value; A timer circuit characterized in that a specific bit of the means is set as an initial value, and the period of the timer update activation signal generated from the first counter means is made variable.
JP53009502A 1978-01-31 1978-01-31 timer circuit Expired JPS5835288B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP53009502A JPS5835288B2 (en) 1978-01-31 1978-01-31 timer circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP53009502A JPS5835288B2 (en) 1978-01-31 1978-01-31 timer circuit

Publications (2)

Publication Number Publication Date
JPS54102939A JPS54102939A (en) 1979-08-13
JPS5835288B2 true JPS5835288B2 (en) 1983-08-02

Family

ID=11722007

Family Applications (1)

Application Number Title Priority Date Filing Date
JP53009502A Expired JPS5835288B2 (en) 1978-01-31 1978-01-31 timer circuit

Country Status (1)

Country Link
JP (1) JPS5835288B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04105481U (en) * 1991-02-25 1992-09-10 国際電気株式会社 Connector for wiring connection

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04105481U (en) * 1991-02-25 1992-09-10 国際電気株式会社 Connector for wiring connection

Also Published As

Publication number Publication date
JPS54102939A (en) 1979-08-13

Similar Documents

Publication Publication Date Title
US4564918A (en) Method and apparatus for measuring the time difference between two sampling times
US4443887A (en) Frequency-dividing circuit
JPS5931897B2 (en) frequency synthesizer
US4031476A (en) Non-integer frequency divider having controllable error
JPS57173230A (en) Phase synchronizing circuit
US4244027A (en) Digital open loop programmable frequency multiplier
US4145667A (en) Phase locked loop frequency synthesizer using digital modulo arithmetic
JPS5835288B2 (en) timer circuit
JPH1198007A (en) Frequency divider
US3745315A (en) Ripple-through counters having minimum output propagation delay times
US5130921A (en) Digital controller for scanned actual condition signals
JP2908080B2 (en) Variable frequency divider
JP3309875B2 (en) Encoder divider circuit
JPS61140215A (en) Pulse generating circuit
US4164712A (en) Continuous counting system
SU1471189A2 (en) Square difference computer
SU708513A1 (en) Variable division factor frequency divider
SU1100621A1 (en) Function generator
SU1659986A1 (en) Linear interpolator
SU1631518A1 (en) Digital linear interpolator
SU536599A1 (en) Pulse number dividing device
SU1072755A1 (en) Pulse repetition frequency multiplier
SU1150755A1 (en) Pulse repetition frequency divider
SU1029403A1 (en) Multichannel pulse generator
SU1742812A1 (en) Extreme indicator