JP2740350B2 - Timer correction circuit - Google Patents
Timer correction circuitInfo
- Publication number
- JP2740350B2 JP2740350B2 JP2309612A JP30961290A JP2740350B2 JP 2740350 B2 JP2740350 B2 JP 2740350B2 JP 2309612 A JP2309612 A JP 2309612A JP 30961290 A JP30961290 A JP 30961290A JP 2740350 B2 JP2740350 B2 JP 2740350B2
- Authority
- JP
- Japan
- Prior art keywords
- timer
- counter
- unit
- data
- circuit
- 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 - Lifetime
Links
Landscapes
- Microcomputers (AREA)
Description
【発明の詳細な説明】 〔産業上の利用分野〕 本発明は補正回路、特に、タイマへのデータセット時
の遅れ分の補正を行なうタイマ補正回路に関する。Description: BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a correction circuit, and more particularly, to a timer correction circuit for correcting a delay when data is set in a timer.
従来、この種のタイマへのデータセット時の遅れ分の
補正は、セットすべきデータの転送などによる遅れ分を
あらかじめ計算などにより算出しておき、セットすべき
データにこの遅れ分を加算し結果をタイマにセットする
か、あるいは、セットすべきデータの転送等により遅れ
が生じる場合、タイマへのデータセットを2回以上行な
い1回当りの時間の差を算出し、遅れ分としてタイマに
加算することによって補正を行なっていた。Conventionally, to compensate for the delay when setting data to this type of timer, the delay due to the transfer of data to be set is calculated in advance, and this delay is added to the data to be set. Is set in the timer, or if a delay occurs due to the transfer of data to be set, the data is set in the timer two or more times, the time difference per time is calculated, and the difference is added to the timer as the delay. The correction was performed by this.
上述した従来のタイマ補正回路は、あらかじめ計算等
により算出した遅れ分、あるいはタイマへのデータセッ
トを連続して2回以上行ない1回当りのタイマへのデー
タセットに要する時間を算出し、これを遅れ分としてタ
イマへ加算することにより行なっているので、セットす
べきデータをバス経由で転送する場合などは、すぐにバ
スが使用できるとは限らないため、実際の遅れ分と上記
手段で算出した遅れ分とで差が生じてしまい、補正が適
切でない場合が存在するという欠点がある。The above-described conventional timer correction circuit calculates the delay amount calculated in advance or the time required for data setting to the timer per one time by continuously performing data setting to the timer two or more times. Since the delay is added to the timer, when the data to be set is transferred via the bus, it is not always possible to use the bus immediately. There is a drawback that a difference occurs between the delay and the delay, and there is a case where the correction is not appropriate.
本発明のタイマ補正回路は、第1(または第2)のタ
イマユニットの時間データを第2(または第1)のタイ
マユニットへ転送するものであって、時間カウント等を
行なうタイマと、タイマ補正開始指示信号にもとづいて
前記タイマのクロックに同期してカウント動作を行なう
カウンタと、前記タイマ補正開始指示信号にもとづいて
前記第1(または第2)のタイマユニットの時間データ
をラッチするメモリユニットと、書込み指示信号にもと
づいて前記カウンタの出力と前記メモリユニットの出力
とを加算し加算値を前記タイマに書込む書込み回路と、
前記カウンタへのカウント終了,リセット指示とタイマ
補正開始指示信号と前記書込み指示信号とを生成するタ
イマ制御回路とを含んで構成される。A timer correction circuit according to the present invention transfers time data of a first (or second) timer unit to a second (or first) timer unit. A counter for performing a count operation in synchronization with a clock of the timer based on a start instruction signal; and a memory unit for latching time data of the first (or second) timer unit based on the timer correction start instruction signal. A write circuit for adding the output of the counter and the output of the memory unit based on a write instruction signal and writing the added value to the timer;
A timer control circuit for generating a count end and reset instruction to the counter, a timer correction start instruction signal, and the write instruction signal is provided.
次に本発明について図面を参照して説明する。 Next, the present invention will be described with reference to the drawings.
第1図は本発明の一実施例を含むブロック図である。 FIG. 1 is a block diagram including an embodiment of the present invention.
1aはタイマ補正用のカウンタ、2aはタイマへの書込み
データとカウンタ1aの値を加算し、結果をタイマに書込
む書込み回路であり、3aは時間カウントあるいは時計機
能を有するタイマ、4aはタイマ3aから値を読出す読出し
回路、5aはカウンタ1aに対してカウント開始指示51a、
カウント終了指示52a、カウンタリセット指示53aの各出
力、及びタイマ3aへの書込み指示54a、タイマ3aのカウ
ント指示55a、タイマ3aからの読出し指示56aの各出力、
更に他ユニットからのタイマ補正開始指示6の受付け及
び他ユニットへのタイマ補正開始指示7の出力を行なう
タイマ制御回路であり、8はクロック信号、9はタイマ
3aへの書込みデータ等の送受を行なうバス、10はメモリ
ユニットである。1a is a counter for timer correction, 2a is a writing circuit for adding the data to be written to the timer and the value of the counter 1a and writing the result to the timer, 3a is a timer having a time counting or clock function, and 4a is a timer 3a A reading circuit for reading a value from the counter 5a;
Each output of a count end instruction 52a, a counter reset instruction 53a, a write instruction 54a to the timer 3a, a count instruction 55a of the timer 3a, a respective output of a read instruction 56a from the timer 3a,
Furthermore, a timer control circuit for receiving a timer correction start instruction 6 from another unit and outputting a timer correction start instruction 7 to another unit, 8 is a clock signal, 9 is a timer
A bus for transmitting and receiving write data and the like to and from 3a, and 10 is a memory unit.
本実施例では上述したカウンタ1a、書込み回路2a、タ
イマ3a、読出し回路4a、タイマ制御回路5aによりタイマ
ユニットA20が構成されるものとする。In this embodiment, it is assumed that the timer unit A20 includes the above-described counter 1a, write circuit 2a, timer 3a, read circuit 4a, and timer control circuit 5a.
そして、タイマユニットA20と同様にタイマユニットB
30がカウンタ1b、書込み回路2b、タイマ3b、読出し回路
4b、タイマ制御回路5bにより構成され(いずれも図示せ
ず)、バス9、メモリユニット10を介してタイマ値の送
受が可能である。Then, like timer unit A20, timer unit B
30 is a counter 1b, a write circuit 2b, a timer 3b, a read circuit
4b, a timer control circuit 5b (both are not shown), and a timer value can be transmitted and received via the bus 9 and the memory unit 10.
次に本発明の動作についてタイムチャートを用いて説
明する。Next, the operation of the present invention will be described using a time chart.
第2図はタイマユニットB30からタイマユニットA20に
データをセットするときのタイムチャートである。FIG. 2 is a time chart when data is set from the timer unit B30 to the timer unit A20.
タイマユニットB30のタイマ3bはステージS1〜S9間で
“5"〜“13"までクロック8の立上りで順次カウントさ
れる。ステージS2でタイマユニットB30からタイマユニ
ットA20に対して、タイマ補正開始指示6が出力され
る。The timer 3b of the timer unit B30 is sequentially counted from "5" to "13" at the rising edge of the clock 8 between the stages S1 to S9. At stage S2, timer correction start instruction 6 is output from timer unit B30 to timer unit A20.
そして、タイマ制御回路5aでタイマ補正開始指示6か
らカウント開始指示51aが生成されカウンタ1aに出力さ
れる。Then, the timer control circuit 5a generates a count start instruction 51a from the timer correction start instruction 6, and outputs the count start instruction 51a to the counter 1a.
カウンタ1aはカウント開始指示51aにより、クロック
8の立上りで順次カウントを開始する。ステージS3でタ
イマユニットBの読出し回路4bからバス9にタイマ3bの
値“7"が出力され、メモリユニット10に書込まれる。The counter 1a sequentially starts counting at the rising edge of the clock 8 according to the count start instruction 51a. At stage S3, the value "7" of the timer 3b is output from the read circuit 4b of the timer unit B to the bus 9 and written into the memory unit 10.
この時、タイマ3bはすでに“8"になっている。また、
タイマユニットA20のカウンタ1aは“2"になっている。At this time, the timer 3b is already "8". Also,
The counter 1a of the timer unit A20 is "2".
次に、ステージS6でメモリユニット10からタイマ3aに
書込むべきデータ“7"が読出され、書込み回路2a内のレ
ジスタ21aに格納される。ステージS7で書込み指示54aに
より、カウンタ1aとレジスタ21aが加算されて結果“12"
がタイマ3aに格納される。Next, at stage S6, data "7" to be written to the timer 3a is read from the memory unit 10 and stored in the register 21a in the write circuit 2a. At the stage S7, the counter 1a and the register 21a are added by the write instruction 54a, and the result “12” is obtained.
Is stored in the timer 3a.
ステージS8での各タイマの値はともに“12"である。
尚、タイマ値の読出しタイミング、メモリユニットへの
格納、及びメモリユニットからの読出しタイミングは必
ずしも本タイムチャートの限りではない。The value of each timer in stage S8 is both "12".
Note that the read timing of the timer value, the storage in the memory unit, and the read timing from the memory unit are not necessarily limited to the timing chart.
以上説明したように本発明は、タイマ補正用のカウン
タを持ち、タイマにセットすべきデータを転送する時間
等をカウントし、タイマにデータを書込むとき書込むべ
きデータとカウンタの値とを加算し、結果をタイマに書
込むことにより、タイマへのデータセット時の補正を正
確に行なうことができる効果がある。As described above, the present invention has a counter for timer correction, counts the time for transferring data to be set to the timer, and adds the data to be written and the value of the counter when writing data to the timer. However, by writing the result to the timer, there is an effect that correction at the time of data setting to the timer can be accurately performed.
第1図は本発明の一実施例を含むブロック図、第2図は
第1図に示すタイマユニットBからタイマユニットAへ
タイマ値をセットするときのタイムチャートである。 1a,1b……カウンタ、2a,2b……書込み回路、21a,21b…
…レジスタ、3a,3b……タイマ、4a,4b……読出し回路、
5a,5b……タイマ制御回路、51a,51b……カウント開始指
示、52a,52b……カウント終了指示、53a,53b……カウン
タリセット指示、54a,54b……タイマへの書込み指示、5
5a,55b……タイマのカウント指示、56a,56b……タイマ
からの読出し指示、6,7……タイマ補正開始指示、8…
…クロック、9……バス、10……メモリユニット。FIG. 1 is a block diagram including an embodiment of the present invention, and FIG. 2 is a time chart when a timer value is set from a timer unit B to a timer unit A shown in FIG. 1a, 1b: Counter, 2a, 2b: Write circuit, 21a, 21b:
… Register, 3a, 3b …… timer, 4a, 4b …… readout circuit,
5a, 5b ... timer control circuit, 51a, 51b ... count start instruction, 52a, 52b ... count end instruction, 53a, 53b ... counter reset instruction, 54a, 54b ... timer write instruction, 5
5a, 55b: Timer count instruction, 56a, 56b: Read instruction from timer, 6, 7: Timer correction start instruction, 8:
... clock, 9 ... bus, 10 ... memory unit.
Claims (1)
間データを第2(または第1)のタイマユニットへ転送
するものであって、時間カウント等を行なうタイマと、
タイマ補正開始指示信号にもとづいて前記タイマのクロ
ックに同期してカウント動作を行なうカウンタと、前記
タイマ補正開始指示信号にもとづいて前記第1(または
第2)のタイマユニットの時間データをラッチするメモ
リユニットと、書込み指示信号にもとづいて前記カウン
タの出力と前記メモリユニットの出力とを加算し加算値
を前記タイマに書込む書込み回路と、前記カウンタへの
カウント終了,リセット指示とタイマ補正開始指示信号
と前記書込み指示信号とを生成するタイマ制御回路とを
含むことを特徴とするタイマ補正回路。1. A timer for transferring time data of a first (or second) timer unit to a second (or first) timer unit, wherein the timer performs time counting and the like.
A counter for performing a count operation in synchronization with a clock of the timer based on a timer correction start instruction signal, and a memory for latching time data of the first (or second) timer unit based on the timer correction start instruction signal A unit, a write circuit for adding the output of the counter and the output of the memory unit based on a write instruction signal, and writing the added value to the timer; a count end / reset instruction to the counter; And a timer control circuit for generating the write instruction signal.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2309612A JP2740350B2 (en) | 1990-11-15 | 1990-11-15 | Timer correction circuit |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2309612A JP2740350B2 (en) | 1990-11-15 | 1990-11-15 | Timer correction circuit |
Publications (2)
Publication Number | Publication Date |
---|---|
JPH04180113A JPH04180113A (en) | 1992-06-26 |
JP2740350B2 true JP2740350B2 (en) | 1998-04-15 |
Family
ID=17995127
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2309612A Expired - Lifetime JP2740350B2 (en) | 1990-11-15 | 1990-11-15 | Timer correction circuit |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2740350B2 (en) |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPS61269737A (en) * | 1985-05-24 | 1986-11-29 | Hitachi Ltd | Correcting circuit for timer interruption |
-
1990
- 1990-11-15 JP JP2309612A patent/JP2740350B2/en not_active Expired - Lifetime
Also Published As
Publication number | Publication date |
---|---|
JPH04180113A (en) | 1992-06-26 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP2740350B2 (en) | Timer correction circuit | |
JPS5570920A (en) | Memory control system | |
JPS6316711A (en) | Timing device | |
JP2850671B2 (en) | Variable delay circuit | |
JPS624960Y2 (en) | ||
US5485233A (en) | Information recording device | |
JPH0664483B2 (en) | Pulse counter | |
JPH07104851B2 (en) | Data processing device | |
JP2615004B2 (en) | Integrated sequential access memory circuit | |
JPS5972845A (en) | Asynchronous data receiving circuit | |
JPS59131214A (en) | Signal delay circuit | |
JPS61243527A (en) | Bit buffer circuit | |
JPS63131735A (en) | Multiplex frame aligner | |
JP3047136B2 (en) | Real-time output timer with automatic output reversal function | |
JP2957821B2 (en) | Transmission memory control circuit | |
JPS6236933A (en) | Frame phase correction circuit | |
JPH02104152A (en) | Data signal receiving equipment | |
JPS62125589A (en) | Semiconductor integrated circuit | |
JPH01238343A (en) | Buffer memory | |
JPH0561640A (en) | Speed converter | |
JPS61286914A (en) | Timing signal generating system | |
JPH0720055B2 (en) | Digital time division multiple integration circuit | |
JPS5927358A (en) | Hardware tracing device | |
JPS61103240A (en) | Bit buffer circuit | |
JPS6267633A (en) | First in first out memory control circuit |