JPS63204424A - Timer device - Google Patents

Timer device

Info

Publication number
JPS63204424A
JPS63204424A JP62037382A JP3738287A JPS63204424A JP S63204424 A JPS63204424 A JP S63204424A JP 62037382 A JP62037382 A JP 62037382A JP 3738287 A JP3738287 A JP 3738287A JP S63204424 A JPS63204424 A JP S63204424A
Authority
JP
Japan
Prior art keywords
signal
data
output
register
ete
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.)
Granted
Application number
JP62037382A
Other languages
Japanese (ja)
Other versions
JP2517943B2 (en
Inventor
Sunao Furui
古居 素直
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.)
Sony Corp
Original Assignee
Sony 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 Sony Corp filed Critical Sony Corp
Priority to JP62037382A priority Critical patent/JP2517943B2/en
Publication of JPS63204424A publication Critical patent/JPS63204424A/en
Application granted granted Critical
Publication of JP2517943B2 publication Critical patent/JP2517943B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Measurement Of Predetermined Time Intervals (AREA)

Abstract

PURPOSE:To obtain plural output signals each having delay time small in difference regardless of the processing speed of a CPU, by supplying the common input signals and clock signals to plural timer circuits and setting different comparison data. CONSTITUTION:The external triggerable timers ETT 1 and ETT 2 which produce input signals start counting actions to produce signals ETE 1 and ETE 2 for each prescribed count value. Then new comparison data are set at the comparison registers incorporated into the ETT 1 and ETT 2 by the signal ETE 1 of a prescribed ordinal number. Thus the output signals having the prescribed time delays from input signals by the signal ETE 1 of the next ordinal number via output registers 8 and 9 and D type FF 10 and 11 respectively. As a result, plural output signals having slightly different delay times are obtained via a CPU having a low processing time.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 この発明は、外部からの入力信号をトリガーとして、自
動的にスタートするタイマ回路を使用したタイマ装置に
関する。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a timer device using a timer circuit that automatically starts when an external input signal is used as a trigger.

〔発明の概要〕[Summary of the invention]

この発明では、入力信号及びクロック信号が供給され、
人力信号で規定されるタイミングから比較データ及びク
ロッ、り信号の個数で定まる所定時間後に出力信号を発
生するタイマ回路を使用したタイマ装置において、入力
信号に対して、第1の時間遅れを持つ第1の出力信号と
、入力信号に対して第2の時間遅れを持つ第2の出力信
号とを得る場合に、第1及び第2のタイマ回路に同一の
比較データがセットされ、入力信号によって、第1及び
第2のタイマ回路が同時にスタートされ、一方のタイマ
回路から得られた所定時間後に、第1及び第2のタイマ
回路に対して互いに異なる比較データがセットされるも
ので、割り込み要因の増加が防止され、従って、処理時
間の短縮化を図るものである。
In this invention, an input signal and a clock signal are supplied,
In a timer device using a timer circuit that generates an output signal after a predetermined time determined by comparison data and the number of clock signals from a timing determined by a human input signal, a timer circuit having a first time delay with respect to an input signal is used. When obtaining one output signal and a second output signal having a second time delay with respect to the input signal, the same comparison data is set in the first and second timer circuits, and depending on the input signal, The first and second timer circuits are started at the same time, and after a predetermined time obtained from one of the timer circuits, different comparison data is set in the first and second timer circuits. This prevents the increase in the processing time, thereby shortening the processing time.

〔従来の技術〕[Conventional technology]

マイクロコンピュータにおいて、第5図に示すように、
入力信号の立ち上がりエツジから正確な時間遅れT(例
えば900IIs)を持つ出力信号を発生するために、
ETT (External TriggerbleT
imer )と称されるタイマ回路を使用したタイマ装
置が知られている。
In a microcomputer, as shown in Figure 5,
In order to generate an output signal with a precise time delay T (e.g. 900 IIs) from the rising edge of the input signal,
ETT (External TriggerbleT
A timer device using a timer circuit called ``timer'' is known.

第6図は、従来のタイマ装置の一例を示し、第6図にお
いて、破線で囲んで示す21がタイマ回路(ETT)で
あ為。ETT21には、例えばマイクロコンピュータの
内部バス22からの比較データが供給される。この比較
データは、ETT21の内部のデータレジスタ23に取
り込まれ、データレジスタ23から比較レジスタ24に
転送される。比較レジスタ24からの比較データが一致
検出回路25に供給される!−一致検出回路25は、カ
ウンタ26の計数データが供給され、比較データ及び計
数データの両者が一致すると、検出信号ETEが一敗検
出回路25から発生する。
FIG. 6 shows an example of a conventional timer device. In FIG. 6, reference numeral 21 surrounded by a broken line is a timer circuit (ETT). The ETT 21 is supplied with comparison data from, for example, an internal bus 22 of the microcomputer. This comparison data is taken into the data register 23 inside the ETT 21 and transferred from the data register 23 to the comparison register 24. The comparison data from the comparison register 24 is supplied to the coincidence detection circuit 25! - The match detection circuit 25 is supplied with the count data of the counter 26, and when both the comparison data and the count data match, a detection signal ETE is generated from the one-defeat detection circuit 25.

カウンタ26には、ロジック回路29を介されたクロッ
ク信号が供給される。ロジック回路29には、入力端子
27からの入力信号と入力端子28からのクロック信号
とが供給され、ロジック回路29によって、入力信号の
例えば立ち上がりエツジからクロック信号がカウンタ2
6に供給され、カウンタ26の計数動作がスタートする
。クロック信号は、一定の周期例えば1μsの周期を有
するものである。比較データ及び計数データの両者は、
8ビツトのデータである。
The counter 26 is supplied with a clock signal via a logic circuit 29. The logic circuit 29 is supplied with an input signal from the input terminal 27 and a clock signal from the input terminal 28, and the logic circuit 29 converts the clock signal from the rising edge of the input signal to the counter 2.
6, and the counting operation of the counter 26 starts. The clock signal has a constant period, for example, a period of 1 μs. Both comparative data and counting data are
This is 8-bit data.

ETT21からの信号ETEは、Dフリップフロップ3
1のクロック入力とされる。Dフリップフロップ31の
データ入力として、出力レジスタ30のデータが供給さ
れる。出力レジスタ30には、内部バス22からのデー
タが格納されており、信号ETHによって、出力レジス
タ30からDフリップフロップ3エヘデータが転送され
、バッファ32を介して出力端子33に出力信号が得ら
れる。このDフリップフロップ31.バッファ32は、
出力ポートを構成する。
The signal ETE from ETT21 is sent to D flip-flop 3.
1 clock input. Data from the output register 30 is supplied as a data input to the D flip-flop 31 . The output register 30 stores data from the internal bus 22, and the data is transferred from the output register 30 to the D flip-flop 3E by the signal ETH, and an output signal is obtained at the output terminal 33 via the buffer 32. This D flip-flop 31. The buffer 32 is
Configure output ports.

更に、−数構出回路25からの信号ETEが出力端子3
4に取り出されると共に、比較レジスタ24及びカウン
タ26に対してロード信号として供給される。比較レジ
スタ24及びカウンタ26には、信号ETEによって、
所定の初期値がロードされる。また、ETT21からの
信号ETEがCPU (図示せず)に供給される。CP
tJは、信号F、 T Eが発生すると、割り込みプロ
グラムを走らせる。CPUは、データレジスタ23への
データの書き込みや、モードの切り替えを内部バス22
を通じて制御する。
Furthermore, the signal ETE from the -number output circuit 25 is output to the output terminal 3.
4 and is also supplied to the comparison register 24 and counter 26 as a load signal. The comparison register 24 and the counter 26 are provided with the following signals by the signal ETE.
Predetermined initial values are loaded. Further, a signal ETE from the ETT 21 is supplied to the CPU (not shown). C.P.
tJ runs an interrupt program when signals F and TE occur. The CPU writes data to the data register 23 and switches modes using the internal bus 22.
control through.

第5図に示すように、入力信号に対してT(900μs
)の遅れを持つ出力信号を得る場合の動作について、第
7図及び第8図を参照して説明する。
As shown in Fig. 5, T (900 μs
The operation when obtaining an output signal with a delay of ) will be described with reference to FIGS. 7 and 8.

第7図のフローチャートは、入力が発生する前の準備処
理と、信号ETEが発生してなされる割り込み処理との
夫々の手順を示している。準備処理では、データレジス
タ23に比較データとして250μsと対応する(FA
)(16進表示)がセントされる(ステップ■)。次に
、比較レジスタ24にデータレジスタ23の内容が転送
される(ステップ■)。
The flowchart in FIG. 7 shows the steps of the preparation process before the input is generated and the interrupt process performed after the signal ETE is generated. In the preparation process, 250 μs is stored as comparison data in the data register 23 (FA
) (in hexadecimal) is sent (step ■). Next, the contents of the data register 23 are transferred to the comparison register 24 (step 2).

入力信号が発生すると、カウンタ26が計数動作を開始
し、カウンタ26の計数データが一致検出回路25に供
給される。この計数データが〔FA〕に到達すると、−
数構出回路25から信号ETEが発生する。信号ETE
は、割り込みプログラムを走らせる。割り込みプログラ
ムでは、割り込み回数Niが2かどうか調べられる(ス
テップ■)。(Ni=2)の場合には、データレジスタ
23に対して、150μsと対応する比較データ〔96
〕がセットされる(ステップ■)。
When the input signal is generated, the counter 26 starts counting, and the count data of the counter 26 is supplied to the coincidence detection circuit 25. When this count data reaches [FA], -
A signal ETE is generated from several output circuits 25. Signal ETE
runs the interrupt program. The interrupt program checks whether the number of interrupts Ni is 2 (step ■). (Ni=2), the comparison data [96
] is set (step ■).

ステップ■において(Ni≠2)の時には、(Ni=3
)かどうか調べられる(ステップ■)。
In step ■, when (Ni≠2), (Ni=3
) can be checked (step ■).

割り込み回数Niが3回目の場合には、出力レジスタ3
0に対してローレベルがセットされる(ステップ■)。
If the number of interrupts Ni is the third, output register 3
A low level is set to 0 (step ■).

上述の動作を第8図を参照して説明すると、第8図Aが
入力信号を示し、この入力信号の立ち上がりエツジから
ETT21のカウンタ26が計数動作を開始する。出力
レジスフ30には、第8図Fに示すように、ハイレベル
のデータがセットされている。データレジスタ23及び
比較レジスタ24には、第8図C及び第8図りに夫々示
すように、前以て250μsと対応する8ビツトデータ
[FA)がセントされている。従って、カウンタ26の
計数データが(FA)になる毎に第8図Bに示す信号E
TEが発生する。
The above operation will be explained with reference to FIG. 8. FIG. 8A shows an input signal, and the counter 26 of the ETT 21 starts counting from the rising edge of this input signal. High level data is set in the output register 30, as shown in FIG. 8F. 8-bit data [FA] corresponding to 250 .mu.s is stored in advance in the data register 23 and the comparison register 24, as shown in FIGS. 8C and 8, respectively. Therefore, every time the count data of the counter 26 reaches (FA), the signal E shown in FIG.
TE occurs.

2回目の信号ETEにより、データレジスタ23には、
第8図Cに示すように、比較データ〔96)(150μ
s>がセットされる。従って、3回目の信号ETHによ
り比較レジスタ24には、新たな比較データ〔96〕が
セットされる。この3回目の信号ETEによって、出力
レジスタ30には、第8図Eに示すように、ローレベル
がセットされる。
Due to the second signal ETE, the data register 23 has the following information:
As shown in Figure 8C, comparative data [96] (150 μ
s> is set. Therefore, new comparison data [96] is set in the comparison register 24 by the third signal ETH. This third signal ETE sets the output register 30 to a low level as shown in FIG. 8E.

この出力レジスタ30のデータが4回目の信号ETHに
より、Dフリップフロップ31に取り込まれるので、第
8Naに示すように、3回目の信号ETEが発生してか
ら150pS後に、出力信号がローレベルに立ち下がる
。従って、入力信号のエツジから(T=250μsX3
+150μ5=900μs)の時間遅れを持つ出力信号
を得ることができる。
Since the data of this output register 30 is taken into the D flip-flop 31 by the fourth signal ETH, the output signal goes to low level 150 pS after the third signal ETE is generated, as shown in the 8th Na. Go down. Therefore, from the edge of the input signal (T=250μs×3
An output signal with a time delay of +150 μ5 = 900 μs) can be obtained.

上述のタイマ装置は、第5図に示すように、入力信号に
対して時間遅れTを持つ一つの出力信号を得るものであ
る。より複雑な場合として、第4図に示すように、人力
信号(第4図A)に対して時間遅れTl(例えば900
j!a)を持つ第1の出力信号(第4図B)及び入力信
号に対して第2の時間遅れT2(例えば910μs)を
持つ第2の出力信号(第4図C)の両者を得る場合につ
いて説明する。
The above-mentioned timer device obtains one output signal having a time delay T with respect to the input signal, as shown in FIG. As a more complicated case, as shown in FIG. 4, a time delay Tl (for example, 900
j! Regarding the case of obtaining both a first output signal (FIG. 4B) with a) and a second output signal (FIG. 4C) with a second time delay T2 (for example, 910 μs) with respect to the input signal. explain.

第9図は、第4図に示す関係を持つ第1及び第2の出力
信号を得るために考えられる構成の一例を示す。第6図
に示す構成に対して、出力レジスタ35.Dフリップフ
ロップ36.バッファ37が付加され、バッファ37か
ら第2の出力信号用の出力端子38が風呂されている。
FIG. 9 shows an example of a possible configuration for obtaining the first and second output signals having the relationship shown in FIG. 4. For the configuration shown in FIG. 6, output register 35. D flip-flop36. A buffer 37 is added, from which an output terminal 38 for a second output signal is connected.

〔発明が解決しようとする問題点〕[Problem that the invention seeks to solve]

第9図の構成においても、前述のタイマ装置と同様の動
作により、時間遅れT1を持つ第1の出力信号に関する
制御に対して1個の信号ETEの遅れを持たせて第2の
出力信号に関する制御を行うことにより、二つの出力信
号を得ることができる。しかしながら、第4図に示す例
のように、(TI=900μ5)(T2=910μs)
のように、時間遅れT1とT2との差が小さい場合には
、この時間差(10μa)の間で出力レジスタ35の書
き替えを行う必要がある。このことは、CPUの処理速
変がかなり速いことを要求し、上記の例のように、lO
μ3の時間差しかない時には、出力レジスタ35の書き
替え処理が不可能である。
In the configuration of FIG. 9 as well, by the same operation as the above-described timer device, the control regarding the second output signal is delayed by one signal ETE with respect to the control regarding the first output signal having the time delay T1. By performing the control, two output signals can be obtained. However, as in the example shown in FIG. 4, (TI=900μ5) (T2=910μs)
When the difference between the time delays T1 and T2 is small, as shown in FIG. 2, it is necessary to rewrite the output register 35 during this time difference (10 μa). This requires the processing speed of the CPU to change quite quickly, and as in the example above,
When there is only a time difference of μ3, it is impossible to rewrite the output register 35.

従って、この発明の目的は、入力信号に対して、時間差
がかなり小さい遅れ時間を夫々持つ二つ又はそれ以上の
複数の出力信号を得ることができるタイマ装置を提供す
ることにある。
SUMMARY OF THE INVENTION Accordingly, it is an object of the present invention to provide a timer device that can obtain two or more output signals each having a delay time with a fairly small time difference with respect to an input signal.

〔問題点を解決するための手段〕[Means for solving problems]

この発明では、入力信号及びクロック信号が供給され、
入力信号で規定されるタイミングから比較データ及びク
ロック信号の個数で定まる所定時間後に出力信号を発生
するタイマ回路(ETT)を使用したタイマ装置におい
て、第1のタイマ回路ETTI及び第2のタイマ回路E
TT2が設けられ、第1及び第2のタイマ回路ETTl
及びETT2に同一の比較データが夫々セットされ、第
1及び第2のタイマ回路ETTI、ETT2が人力信号
によって同時にスタートされ、第1及び第2のタイマ回
路ETTI、ETT2の一方から得られた所定の時間後
に、第1及び第2のタイマ回路ETTI、ETT2に対
して、互いに異なる比較データがセットされ、入力信号
に対して第1の時間遅れT1を持つ第1の出力信号が得
られると共に、入力信号に対して第2の時間遅れT2を
持つ第2の出力信号が得られる。
In this invention, an input signal and a clock signal are supplied,
In a timer device using a timer circuit (ETT) that generates an output signal after a predetermined time determined by comparison data and the number of clock signals from a timing determined by an input signal, a first timer circuit ETTI and a second timer circuit E are provided.
TT2 is provided, and first and second timer circuits ETTl
The same comparison data is set in ETT and ETT2, and the first and second timer circuits ETTI and ETT2 are started simultaneously by a human input signal, and the predetermined data obtained from one of the first and second timer circuits ETTI and ETT2 is set. After a period of time, different comparison data are set in the first and second timer circuits ETTI and ETT2, and a first output signal having a first time delay T1 with respect to the input signal is obtained, and the input A second output signal is obtained with a second time delay T2 relative to the signal.

〔作用〕[Effect]

二つのタイマ回1ETT1及びETT2が設けられ、夫
々に対して共Jの入力信号及びクロック信号が供給され
、同時にタイマ動作が開始される。
Two timer circuits 1ETT1 and ETT2 are provided, to which the input signal J and the clock signal are both supplied, and the timer operations are started at the same time.

また、ETTl及びETT2に同一の比較データが最初
にセットされているので、同一のタイミングで信号ET
E 1及びETE2が発生する。第1の出力信号の人力
信号に対する時間遅れT1と第2の出力信号の入力信号
に対する時間遅れT2とが(T2>Tl)とすると、最
初にセットされた同一の比較データで定まる時間が複数
回、繰り返された所定時間後にETTI及びETT2に
対して、互いに異なる比較データがセットされる。この
比較データによって、時間遅れT1及びT2が最終的に
規定される。
In addition, since the same comparison data is initially set in ETT1 and ETT2, the signal ETT1 and ETT2 are set at the same timing.
E1 and ETE2 occur. If the time delay T1 of the first output signal with respect to the human input signal and the time delay T2 of the second output signal with respect to the input signal are (T2>Tl), the time determined by the same comparison data set initially is repeated multiple times. , different comparison data are set for ETTI and ETT2 after repeated predetermined times. This comparison data ultimately defines the time delays T1 and T2.

この発明では、時間遅れTl後に第2の出力信号を得る
ための出カバソファの書き替えを行うのと異なり、出力
バッファを書き替えるのに充分な時間が確保され、CP
Uの処理速度がさほど高速である必要がない。また、割
り込みプログラムは、一方のETT (タイマ回路)か
らの信号ETEにより走るので、両方のETTの信号で
割り込みプログラムを走らせるのと異なり、割り込み要
因が増えることを防止でき、全処理時間中に占める割り
込み処理時間を短(できる。従って、処理速度が遅いC
PUの場合に他の時間精度を要する処理ができなくなる
不都合を回避することができる。
In this invention, unlike rewriting the output buffer to obtain the second output signal after the time delay Tl, sufficient time is secured to rewrite the output buffer, and the CP
The processing speed of U does not need to be very high. In addition, since the interrupt program is run by the signal ETE from one ETT (timer circuit), unlike running the interrupt program by the signals from both ETTs, it is possible to prevent the number of interrupt factors from increasing, and during the entire processing time. The interrupt processing time occupied can be reduced. Therefore, the processing speed of C
In the case of PU, it is possible to avoid the inconvenience of not being able to perform other processes that require time precision.

〔実施例〕〔Example〕

以下、この発明の一実施例について図面を参照して説明
する。この一実施例は、第4図に示すように、入力信号
(第4図A)に対して時間遅れT1 (例えば900.
1/3)を持つ第1の出力信号(第4図B)及び入力信
号に対して第2の時間遅れT2(例えば910μs)を
持つ第2の出力信号(第4図C)の両者を得る場合に対
してこの発明を通用したものである。
An embodiment of the present invention will be described below with reference to the drawings. In this embodiment, as shown in FIG. 4, the input signal (FIG. 4A) is delayed by a time T1 (for example, 900 .
1/3) (Fig. 4B) and a second output signal (Fig. 4C) with a second time delay T2 (e.g. 910 μs) relative to the input signal. This invention is applicable to all cases.

第1図に示すように、第1のタイマ回路(ETT : 
External Triggerble Timer
と称する)l及び第2のETT2とが設けられる。ET
Tl及びETT2には、内部バス3を介して比較データ
がセットされる。また、入力端子4からの入力信号及び
入力端子5からの一定周期(1μs)のクロック信号が
ETTI及びETT2に供給される。ETTI及びET
T2は、比較データが内部バス3からデータレジスタを
介して比較レジスタにセットされ、また、人力信号の立
ち上がりエツジと同期したタイミングからクロック信号
がカウンタにより計数され、カウンタの計数値と比較レ
ジスタにセットされた比較データとが一致検出回路によ
り比較され、両者が一致する時に信号ETE1及びET
E2を夫々発生する。
As shown in FIG. 1, the first timer circuit (ETT:
External Trigger Timer
)l and a second ETT2 are provided. E.T.
Comparison data is set in Tl and ETT2 via the internal bus 3. Further, an input signal from the input terminal 4 and a clock signal with a constant period (1 μs) from the input terminal 5 are supplied to the ETTI and the ETT2. ETTI and ET
In T2, the comparison data is set in the comparison register from the internal bus 3 via the data register, and the clock signal is counted by the counter from the timing synchronized with the rising edge of the human input signal, and the count value of the counter and the comparison register are set. The comparison data thus obtained are compared by a coincidence detection circuit, and when the two match, signals ETE1 and ET are
E2 is generated respectively.

ETTlからの信号ETE 1は、Dフリップフロップ
10のクロック入力とされる。DフリップフロップlO
のデータ人力として、出力レジスタ8のデータが供給さ
れる。出力レジスタ8には、内部バス3からのデータが
格納されており、信号ETEIによって、出力レジスタ
8からDフリップフロップ10へデータが転送され、バ
ッファ12を介して出力端子14に第1の出力信号が得
られる。このDフリップフロップ10.バッファ12は
、出力ポートを構成する。
The signal ETE 1 from ETTl is used as the clock input of the D flip-flop 10. D flip-flop lO
The data in the output register 8 is supplied as the data input. The output register 8 stores data from the internal bus 3, and the data is transferred from the output register 8 to the D flip-flop 10 by the signal ETEI, and the first output signal is sent to the output terminal 14 via the buffer 12. is obtained. This D flip-flop10. Buffer 12 constitutes an output port.

史に、ETTIからの信号ETE 1が出力端子6に取
り出されると共に、ETTlのデータレジスタ及びカウ
ンタに対してロード信号として供給される。比較レジス
タ及びカウンタには、信号ETEIによって、所定の初
期値がロードされる。
Historically, the signal ETE1 from ETTI is taken out to the output terminal 6 and is supplied as a load signal to the data register and counter of ETT1. The comparison register and counter are loaded with predetermined initial values by signal ETEI.

また、ETTlからの信号ETE lがCPU (図示
せず)に供給される。CPUは、信号ETE 1が発生
すると、割り込みプログラムを走らせる。
Further, a signal ETE1 from ETT1 is supplied to the CPU (not shown). The CPU runs the interrupt program when the signal ETE1 occurs.

cpvは、ETTl及びETT2のデータレジスタへの
データの書き込みや、モードの切り替えを内部バス3を
通じて制御する。
cpv controls writing of data to the data registers of ETT1 and ETT2 and mode switching through the internal bus 3.

ETT2は、ETTlと同様の構成とされ、E′「T2
からの信号ETE2が出力端子7に取り出されると共に
、Dフリップフロップ11のクロック入力とされる。D
フリップフロップ11には、出力レジスタ9からのデー
タが供給され、Dフリップフロップ11の出力信号がバ
ッファ13を介して出力端子15に第2の出力信号とし
て取り出される、CPUは、ETTlからの信号ETE
Iのみによる割り込みを許可し、信号ETE2による割
り込みを許可しない。
ETT2 has the same configuration as ETTl, and E'"T2
A signal ETE2 from the D flip-flop 11 is taken out to the output terminal 7 and is also used as a clock input to the D flip-flop 11. D
The data from the output register 9 is supplied to the flip-flop 11, and the output signal of the D flip-flop 11 is taken out as a second output signal to the output terminal 15 via the buffer 13.
Interrupts caused only by I are allowed, and interrupts caused by signal ETE2 are not allowed.

第4図に示すように、入力信号(第4図A)に対してT
I(900μs)の遅れを持つ第1の出力信号(第4図
B)及び入力信号に対してT2(910μs)の遅れを
持つ第2の出力信号(第4図C)を得る場合の動作につ
いて、第2図及び第3図を参照して説明する。
As shown in Figure 4, for the input signal (Figure 4A)
Regarding the operation when obtaining the first output signal (Figure 4B) with a delay of I (900 μs) and the second output signal (Figure 4C) with a delay of T2 (910 μs) with respect to the input signal , will be explained with reference to FIGS. 2 and 3.

第2図のフローチャートは、入力が発生する前の準備処
理と、信号ETE 1が発生してなされる割り込み処理
との夫々の手11V1を示している。準備処理では、E
TTlのデータレジスタに比較データとして250μs
と対応する[FA)(16進表示)がセットされる(ス
テップ■)。同様に、ETT2のデータレジスタに25
0μsと対応するCFA3  (16進表示)がセット
される(ステップ■)。次に、ETTIの比較レジスタ
にデータレジスタの内容が転送される(ステップ■)。
The flowchart of FIG. 2 shows steps 11V1 of the preparation process before the input is generated and the interrupt process performed after the signal ETE1 is generated. In the preparation process, E
250μs as comparison data in the data register of TTl
[FA] (in hexadecimal) corresponding to is set (step ■). Similarly, 25 is added to the data register of ETT2.
CFA3 (in hexadecimal notation) corresponding to 0 μs is set (step ■). Next, the contents of the data register are transferred to the comparison register of the ETTI (step ■).

同様に、ETT2の比較レジスタにデータレジスタの内
容が転送される(ステップ■)。
Similarly, the contents of the data register are transferred to the comparison register of ETT2 (step 2).

入力信号が発生すると、ETTl及びETT 2のカウ
ンタが計数動作を開始し、カウンタの計数データが(F
A)に到達すると、信号ETE1及びETE2が発生す
る。信号ETEIのみが割り込みプログラムを走らせる
。割り込みプログラムでは、割り込み回数Nfが2かど
うか調べられる(ステップ■)。(Ni=2)の場合に
は、ETTlのデータレジスタに対して、150μsと
対応する比較データ〔96〕がセットされる(ステップ
■)。次に、ETT2のデータレジスタに16Q ps
と対応するデータCAO〕がセットされる(ステップ■
)。
When an input signal is generated, the counters of ETT1 and ETT2 start counting operation, and the count data of the counters becomes (F
When A) is reached, signals ETE1 and ETE2 are generated. Only the signal ETEI runs the interrupt program. The interrupt program checks whether the number of interrupts Nf is 2 (step ■). In the case of (Ni=2), comparison data [96] corresponding to 150 μs is set in the data register of ETTl (step ■). Next, 16Q ps is sent to the data register of ETT2.
and the corresponding data CAO] are set (step ■
).

ステップ■において(Ni≠2)の時には、(Ni=3
)かどうか調べられる(ステップ■)。
In step ■, when (Ni≠2), (Ni=3
) can be checked (step ■).

割り込み回数Niが3回目の場合には、出力レジスタ8
に対してローレベルがセントされる(ステップ■)。次
に、出力レジスタ9に対してローレベルがセットされる
(ステップ[相])。
When the number of interrupts Ni is the third, output register 8
A low level is sent to (step ■). Next, a low level is set for the output register 9 (step [phase]).

上述の動作を第3図のタイムチャートを参照して説明す
ると、第3図Aが人力信号を示し、この入力信号の立ち
上がりエツジからETTl及びETT2のカウンタが計
数動作を開始する。出力レジスタ8には、第3図Hに示
すように、ハイレベルのデータがセットされ、出力レジ
スタ9には、第3図Jに示すように、ハイレベルのデー
タがセットされている。ETTl及びETT2のデータ
レジスタ及び比較レジスタには、第3図り、第3図E、
第3図F及び第3図Gに夫々示すように、前取て250
I!sと対応する8ピントデータ〔FA〕がセットされ
ている。従って、ETT l及びETT2からは、夫々
のカウンタの計数データが(FA)になる毎に第3図B
及び第3図Cに夫々示す信号ETEI及びETE2が発
生する。
The above operation will be explained with reference to the time chart of FIG. 3. FIG. 3A shows a human input signal, and the counters of ETT1 and ETT2 start counting operations from the rising edge of this input signal. High level data is set in the output register 8, as shown in FIG. 3H, and high level data is set in the output register 9, as shown in FIG. 3J. The data registers and comparison registers of ETTl and ETT2 include Figure 3, Figure 3E,
As shown in Figure 3F and Figure 3G, respectively, the front 250
I! 8 focus data [FA] corresponding to s is set. Therefore, from ETT1 and ETT2, each time the count data of each counter becomes (FA),
and signals ETEI and ETE2 shown in FIG. 3C, respectively, are generated.

2回目の信号E T E’ 1により、ETTlのデー
タレジスタには、第3図りに示すように、比較データ(
96)(150μs)がセットされる。従って、3回目
の信号ETE 1により、ETTlの比較レジスタには
、新たな比較データ〔96〕がセントされる。この3回
目の信号ETE 1によって、出力レジスタ8には、第
3図Hに示すように、ローレベルがセットされる。
By the second signal E T E' 1, the comparison data (
96) (150 μs) is set. Therefore, new comparison data [96] is sent to the comparison register of ETTl by the third signal ETE1. This third signal ETE1 sets the output register 8 to a low level as shown in FIG. 3H.

一方、2回目の信号ETE 1により、ETT 2のデ
ータレジスタには、第3図Hに示すように、比較データ
(AO)(1601!s)がセットされる。
On the other hand, the comparison data (AO) (1601!s) is set in the data register of ETT 2 by the second signal ETE 1, as shown in FIG. 3H.

従って、3回目の信号ETEIにより、ETT2の比較
レジスタには、新たな比較データ(AO)がセントされ
る。この3回目の信号ETE 1によって、出力レジス
タ9には、第3図Jに示すように、ローレベルがセット
される。
Therefore, new comparison data (AO) is sent to the comparison register of ETT2 by the third signal ETEI. This third signal ETE1 sets the output register 9 to a low level as shown in FIG. 3J.

出力レジスタ8のデータが4回目の信号E T Elに
より、Dフリップフロップ10に取り込まれるので、第
3[ff1rに示すように、3回目の信号E置が発生し
てから150μs後に、第1の出力信号がローレベルに
立ち下がる。従って、入力信号のエツジから(T= 2
50μsX 3 + 150μ5=900μs)の時間
遅れを持つ第1の出力信号が得られる。
Since the data in the output register 8 is taken into the D flip-flop 10 by the fourth signal E T El, as shown in the third [ff1r], 150 μs after the third signal E is generated, the first The output signal falls to low level. Therefore, from the edge of the input signal (T=2
A first output signal with a time delay of 50 μs×3+150 μ5=900 μs) is obtained.

同様に、出力レジスタ9のデータが4回目の信号ETE
1により、Dフリップフロップ11に取り込まれるので
、第3図Kに示すように、3回目の信号ETE 1が発
生してから160pS後に、第2の出力信号がローレベ
ルに立ち下がる。従って、入力信号のエツジから(T=
250μaX3+150μ5=910//a)の時間遅
れを持つ第2の出力信号が得られる。
Similarly, the data in the output register 9 is the fourth signal ETE.
1 is taken into the D flip-flop 11, so that the second output signal falls to a low level 160 pS after the third signal ETE1 is generated, as shown in FIG. 3K. Therefore, from the edge of the input signal (T=
A second output signal is obtained with a time delay of 250μaX3+150μ5=910//a).

尚、この発明は、入力信号に対して、互いに異なる時間
遅れを持つ3個以上の出力信号を得る場合にも、この一
実施例と同様に通用することができる。
It should be noted that the present invention can be applied similarly to this embodiment even when three or more output signals having mutually different time delays are obtained with respect to an input signal.

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

この発明は、複・数のタイマ回路が共通の入力信号及び
クロック信号に同期して動作し、また、一つのタイマ回
路からの信号ETE 1のみを使用して割り込みプログ
ラムが走る構成とされている。
In this invention, a plurality of timer circuits operate in synchronization with a common input signal and a common clock signal, and an interrupt program is run using only the signal ETE1 from one timer circuit. .

従って、この発明に依れば、僅かに異なる遅れ時間を有
する複数の出力信号が処理速度が遅いCPUによって得
ることができる。また、この発明では、割り込み要因が
増えないので、処理時間が長くなることを防止できる。
Therefore, according to the invention, a plurality of output signals having slightly different delay times can be obtained by a slow CPU. Furthermore, according to the present invention, since the number of interrupt factors does not increase, it is possible to prevent the processing time from increasing.

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

第1図はこの発明の一実施例のブロック図、第2図は一
実施例の動作を示すフローチャート、第3図は一実施例
の動作を示すタイムチャート、第4図は一実施例の入力
信号及び出力信号の関係を示す波形図、第5図はこの発
明に使用できるタイマ回路の説明に用いる波形図、第6
図はこの発明に使用できるタイマ回路のブロック図、第
7図及び第8図はこの発明に使用できるタイマ回路の説
明に用いるフローチャート及びタイムチャートである。 図面における主要な符号の説明 1.2:ETT、3:内部バス、4:入力信号の入力端
子、5:クロック信号の入力端子、8゜9:出力レジス
タ、10.l’l:Dフリップフロップ、tt、ts:
出力端子。 代理人   弁理士 杉 浦 正 知 第1団 第3図 フロー十ヤート 第2図 第4図 (二900JJS) 第5図 タイム、+、−) 竿8図 手続補正量 目 昭和62年 5月 6日 で 1、事件の表示 昭和62年特許願第37382号 2、発明の名称 タイマ装置 3、補正をする者 事件との関係  特許出願人 住所 東京部品用区北品用6丁目7番35号名称 (2
18)ソニー株式会社 代表取締役 大賀 典雄 4、代理人 〒170 住所 東京都豊島区東池袋1丁目48番10号」 昭和62年 4月28日 6、補正の対象 図面の簡単な説明の欄       ・′ソーーーーー
’)(’、 5.−r 7、補正の内容 明細書中、第20頁、第11行、「タイムチャート」の
後に下記を加入する。 「、第9図はこの発明の説明の参考に用いたタイマ装置
の他の例のブロック図」
Fig. 1 is a block diagram of an embodiment of the present invention, Fig. 2 is a flowchart showing the operation of the embodiment, Fig. 3 is a time chart showing the operation of the embodiment, and Fig. 4 is the input of the embodiment. FIG. 5 is a waveform diagram showing the relationship between signals and output signals; FIG. 5 is a waveform diagram used to explain the timer circuit that can be used in the present invention; FIG.
The figure is a block diagram of a timer circuit that can be used in this invention, and FIGS. 7 and 8 are flowcharts and time charts used to explain the timer circuit that can be used in this invention. Explanation of main symbols in the drawings 1. 2: ETT, 3: Internal bus, 4: Input signal input terminal, 5: Clock signal input terminal, 8°9: Output register, 10. l'l: D flip-flop, tt, ts:
Output terminal. Agent Patent Attorney Tadashi Sugiura 1st Group Figure 3 Flow 10 Yards Figure 2 Figure 4 (2900JJS) Figure 5 Time, +, -) Figure 8 Procedure Correction Amount May 6, 1985 1. Indication of the case Patent Application No. 37382 of 1988 2. Name of the invention Timer device 3. Person making the amendment Relationship to the case Patent applicant address 6-7-35, Kitashinyo, Tokyo Parts Co., Ltd. Name ( 2
18) Sony Corporation Representative Director Norio Oga 4, Agent 170 Address 1-48-10 Higashiikebukuro, Toshima-ku, Tokyo” April 28, 1986 6, Column for a brief explanation of the drawing subject to the amendment ') (', 5.-r 7. In the description of contents of the amendment, page 20, line 11, the following is added after "Time chart". ", Figure 9 is for reference in the explanation of this invention. Block diagram of another example of the timer device used

Claims (1)

【特許請求の範囲】 入力信号及びクロック信号が供給され、上記入力信号で
規定されるタイミングから比較データ及び上記クロック
信号の個数で定まる所定時間後に出力信号を発生するタ
イマ回路を使用したタイマ装置において、 第1のタイマ回路及び第2のタイマ回路を設け、上記第
1及び第2のタイマ回路に同一の比較データを夫々セッ
トし、上記第1及び第2のタイマ回路を入力信号によっ
て同時にスタートさせ、上記第1及び第2のタイマ回路
の一方から得られた所定の時間後に、上記第1及び第2
のタイマ回路に対して、互いに異なる比較データをセッ
トするようになし、上記入力信号に対して第1の時間遅
れを持つ第1の出力信号を得ると共に、上記入力信号に
対して第2の時間遅れを持つ第2の出力信号を得るよう
にしたことを特徴とするタイマ装置。
[Claims] A timer device using a timer circuit that is supplied with an input signal and a clock signal and generates an output signal after a predetermined time determined by comparison data and the number of the clock signals from the timing defined by the input signal. , a first timer circuit and a second timer circuit are provided, the same comparison data is set in the first and second timer circuits, respectively, and the first and second timer circuits are started simultaneously by an input signal. , after a predetermined time obtained from one of the first and second timer circuits, the first and second timer circuits
By setting different comparison data to the timer circuits, a first output signal having a first time delay with respect to the input signal is obtained, and a second time delay with respect to the input signal is obtained. A timer device characterized in that a second output signal with a delay is obtained.
JP62037382A 1987-02-20 1987-02-20 Timer device Expired - Fee Related JP2517943B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP62037382A JP2517943B2 (en) 1987-02-20 1987-02-20 Timer device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP62037382A JP2517943B2 (en) 1987-02-20 1987-02-20 Timer device

Publications (2)

Publication Number Publication Date
JPS63204424A true JPS63204424A (en) 1988-08-24
JP2517943B2 JP2517943B2 (en) 1996-07-24

Family

ID=12495974

Family Applications (1)

Application Number Title Priority Date Filing Date
JP62037382A Expired - Fee Related JP2517943B2 (en) 1987-02-20 1987-02-20 Timer device

Country Status (1)

Country Link
JP (1) JP2517943B2 (en)

Also Published As

Publication number Publication date
JP2517943B2 (en) 1996-07-24

Similar Documents

Publication Publication Date Title
US4503490A (en) Distributed timing system
KR920007905B1 (en) Direct memory access controller
US4807117A (en) Interruption control apparatus
JPS63204424A (en) Timer device
JP3099927B2 (en) Microcomputer
JP2624388B2 (en) DMA device
JP2625249B2 (en) Frame detection circuit
KR900000476B1 (en) Micro processor
JPH0573296A (en) Microcomputer
KR100239446B1 (en) Test circuit of frequency composition unit having autoloachaing function
SU1280631A1 (en) Device for connecting information sources with common bus
JPH0580089A (en) Timer device
JPH03188514A (en) Counting circuit
JP2615504B2 (en) Microcontroller
KR100244471B1 (en) Direct memory access controller and control method
JPS62113245A (en) Operation monitoring device for signal processor
JPH03164960A (en) Dma transfer control circuit
JPS63211449A (en) Device number setting system
JPS6152702A (en) Sequence controller
JPH0150927B2 (en)
JPH0427730B2 (en)
JPH02219118A (en) Timer device
JPH01276240A (en) Timer counter
JPH04192037A (en) Semiconductor integrated circuit
JPH01106148A (en) Multi-port memory device

Legal Events

Date Code Title Description
LAPS Cancellation because of no payment of annual fees