JPS5965788A - Timer counter - Google Patents

Timer counter

Info

Publication number
JPS5965788A
JPS5965788A JP57177066A JP17706682A JPS5965788A JP S5965788 A JPS5965788 A JP S5965788A JP 57177066 A JP57177066 A JP 57177066A JP 17706682 A JP17706682 A JP 17706682A JP S5965788 A JPS5965788 A JP S5965788A
Authority
JP
Japan
Prior art keywords
counter
signal
reference time
bit
time signal
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
JP57177066A
Other languages
Japanese (ja)
Other versions
JPH0446012B2 (en
Inventor
Teruaki Nakamura
輝昭 中村
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NEC Corp
Original Assignee
NEC Corp
Nippon Electric Co 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 NEC Corp, Nippon Electric Co Ltd filed Critical NEC Corp
Priority to JP57177066A priority Critical patent/JPS5965788A/en
Publication of JPS5965788A publication Critical patent/JPS5965788A/en
Publication of JPH0446012B2 publication Critical patent/JPH0446012B2/ja
Granted legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G04HOROLOGY
    • G04FTIME-INTERVAL MEASURING
    • G04F10/00Apparatus for measuring unknown time intervals by electric means

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Electronic Switches (AREA)

Abstract

PURPOSE:To simplify plural measuring operations having different resolution and measuring time range by wiring just the prescribed number of a bit to the output terminal group of a counter directly from the least significant digit or a prescribed upper digit in the form of plural groups to use the output of each group as a reference time signal having a different cycle. CONSTITUTION:A reference time signal generating circuit 10 generates a pulse train of the shortest cycle which is used when the measurement of the highest resolution is required. A counter 30 has a number of bits larger than those of a buffer register 41 and a 42. Therefore the position of each bit of the counter to be extracted is not limited to one, and signal lines a-d can be extracted. These signal lines are selected by selecting circuits 61 and 62 on the basis of the values stored in mode registers 21 and 22. The register 41 accepts and latches the count number of each time point by the indication of a signal 81, and a CPU50 measures the interval between two time points. It is possible to select optionally both range of the measurement and resolution according to a purpose since the signal line has the different reference time signal.

Description

【発明の詳細な説明】 本発明は一定周期の基準時間信号パルス列を用い、この
パルス数を計測することにより時間計側ヲ行なうタイマ
・カウンタに関する。
DETAILED DESCRIPTION OF THE INVENTION The present invention relates to a timer/counter that uses a reference time signal pulse train of a constant period and measures the number of pulses to perform a time counter.

タイマ・カウンタの主な構成は基準時間信号(一定周期
の基準信号パルス列)を発生する回路と該信号の変化に
同期してカウン1作を行なうカウンタとから成っている
。基準時間信号パルス列の周期によって計測時間の分解
能が決定する。nビットのカウンタを用いれば2.((
パルス周HA)の範囲内の時間が計測でき、その分解能
はパルス周期である。
The main structure of a timer/counter consists of a circuit that generates a reference time signal (a constant cycle reference signal pulse train) and a counter that performs one count operation in synchronization with changes in the signal. The resolution of measurement time is determined by the period of the reference time signal pulse train. If you use an n-bit counter, 2. ((
The time within the range of the pulse period HA) can be measured, and its resolution is the pulse period.

汎用性のタイマカウンタは多ni類の計測時間範囲、分
解能をもつことが要求される。l、81として集積化を
考えると同時にこれらの要求をみたそうとすると、榎数
閘の基準時間信号パルス発生回路およびa数個のカウン
タとを1チツプ上に設けることになるが、府にカウンタ
を多数設けることはチップサイズ上困難である。
A general-purpose timer counter is required to have a wide range of measurement time ranges and resolutions. If we try to meet these requirements while considering integration as 81, we will have to provide the reference time signal pulse generation circuit of the Enoki number of gates and a number of counters on one chip. It is difficult to provide a large number of them due to the chip size.

上記の事情をより明確にするために、従来のりイマカウ
ンタの1例を第1図に示して説明する。
In order to make the above situation clearer, an example of a conventional glue time counter will be explained with reference to FIG.

基準時間信号発生回路lOから周期がそれぞれ(lμs
・2μS)の組および(4μ818μ、)の組の基準時
間信号が発生している。いま(lμat2μs)の組の
信号を考えると、モードレジスタ21の設定により選択
回路11はいずれかの信号を選択して、カウンタ31は
このパルス列を順次カウントして行く。該カウンタ31
は8ビツト系では8ビツトの出力を外部端子により出力
している。
The period from the reference time signal generation circuit IO is (lμs
・2μS) and (4μ818μ,) sets of reference time signals are generated. Considering the current (lμat2μs) set of signals, the selection circuit 11 selects one of the signals according to the settings of the mode register 21, and the counter 31 sequentially counts this pulse train. The counter 31
In an 8-bit system, 8-bit output is output from an external terminal.

カウンタ31のカウンタFi継続的にカウントを続けて
いるが、所望の時間計測は以下のように行なう。すなわ
ち時刻1゛1にカウンタ31のカウント数をバッファレ
ジスタ41が1fllえば信号81の立上がり信号の際
に作動しその時刻l111のカウント数をラッチしこれ
をCPU5Qでよみとっておく。
The counter Fi of the counter 31 continues counting, and the desired time measurement is performed as follows. That is, if the buffer register 41 receives the count number of the counter 31 at time 111, it is activated at the rising edge of the signal 81, latches the count number at time l111, and reads it out by the CPU 5Q.

次に時刻1゛2に再び信号81の信号でその時刻T。Next, at time 1-2, the signal 81 is activated again at time T.

におけるカウント数をラッチし、CPL15Qでよみと
れば、両者のカウント数の差と選択された基準時間信号
の周期の積から時間間隔が容易にitt算される。基準
時間信号は4徨類もあるから、それらの選択によって時
間計測範囲と分解能とを任意に選ぶことができる。
If the count number is latched and read by the CPL 15Q, the time interval can be easily calculated from the product of the difference between the two count numbers and the period of the selected reference time signal. Since there are four types of reference time signals, the time measurement range and resolution can be arbitrarily selected by selecting them.

さらに時間計測の途中で基準時間信号を変化せしめるこ
とによってよ!ll複雑な被計測現象に対応した時間計
測も可11目になる。
Furthermore, by changing the reference time signal during time measurement! It is also possible to measure time corresponding to complex measured phenomena.

しかし用途が広艷になる程、基準時間信号を多数用意し
或いは計測時間範囲を変化するためビット数の異なるカ
ウンタを複数個備えておくなど、回路は榎雑なものにな
り半導体集積回路としてlチップ上に構成することは困
難になる。特にカウンタを複数個設置するのは集積化の
大゛きな障害になっている。さらにカウンタを駆動する
基準時間信号を切換える場合、例えばlμSの基準時間
信号でカウントデータがOから196まで駆動させ、そ
の時点で基準時間信号を2μsにした場合、カウントデ
ータ数からカウントデータ数に2μsを乗じただけで@
喘時間間隔を求めることはできず、切換えた時間までの
カウントデータで補市しなければならない。そのために
は基準時間信号の切換えのときのカウントデータを記1
意しておく回路が必要となり、時に切換えが煩雑な場合
は処理の時間等から事実上対応することが困難になる。
However, as the application becomes broader, the circuit becomes more complicated, such as preparing a large number of reference time signals or having multiple counters with different numbers of bits to change the measurement time range, making it difficult to use as a semiconductor integrated circuit. It becomes difficult to configure on a chip. In particular, installing multiple counters is a major obstacle to integration. Furthermore, when switching the reference time signal that drives the counter, for example, if the count data is driven from 0 to 196 with a reference time signal of lμS, and the reference time signal is set to 2μs at that point, the number of count data changes by 2μs. Just multiply by @
It is not possible to determine the time interval, and the count data up to the time of switching must be used for compensation. To do this, record the count data when switching the reference time signal.
A special circuit is required, and if the switching is complicated, it becomes difficult to deal with it due to the processing time and other factors.

本発明の目的は上記の欠点を除去し、−II!の基準時
間信号、およびこの基準時間信号により駆動される一個
のバイナリカウンタによって、実質的\ に分解能、計測時間範囲を異にする複数個の計測動作を
闇単になしうるようにしたタイマカウンタを提供するこ
とにある。
The object of the present invention is to eliminate the above-mentioned drawbacks and -II! Provided is a timer counter that can perform a plurality of measurement operations with substantially different resolutions and measurement time ranges using a reference time signal and one binary counter driven by this reference time signal. It's about doing.

本発明によるタイマカウンタは、それぞれただ一つの基
準時間信号発生回路と、該基準時間信号発生回路からの
パルスを計測し各ビットに−重みづけをしたカウンタと
を備え、該カウンタの出力端子弾に最下位桁からlI!
妾に、あるいは所定の上位の所から前記カウンタのビッ
ト数より少い−ず数のビット数だけ群として配線し、こ
れらの群を複数個設けることにより、各群の出力が周期
を異にする複数の基準時間信号として用いられることを
特徴とする。
Each of the timer counters according to the present invention includes a single reference time signal generating circuit and a counter that measures pulses from the reference time signal generating circuit and weights each bit. lI from the least significant digit!
By wiring a number of bits less than the number of bits of the counter as a group from the concubine or from a predetermined high-order place, and by providing a plurality of these groups, the output of each group has a different cycle. It is characterized by being used as a plurality of reference time signals.

以下本発明を図面を参照して詳しく説明する。The present invention will be explained in detail below with reference to the drawings.

第2図は本発明の一実施例の構成を示すブロック図であ
る。基準時間信号発生回路10は最も分解能の高い計1
+1Jが要求される場合に用いる最根の周期のパルス列
を発生し、カウンタ3oに入力する。カウンタ30はバ
イナリカウントとして継続してパルス故を計測しつづけ
る。このカウンタ3゜のビット数はバッファレジスタ4
1s42が8ビツトあればこれよりビット数を多く選ぶ
。従って8ビツトをとり出すカウンタの各ビットの位置
は一つではなくなる。第2図の実線1タリでは例えば第
3図のようにカウンタ30は図に示すように最下位桁3
0−1から最下位桁30−11までの11個のビット数
を有する。これにより8ビツトのイぎ号線をとり出すの
に最下位桁30−1から30−8までと9出す場合(a
) 、ビットを1つずらして3〇−2からと9出す場合
(b) 、以下ビットを2つずらす場合(C) 、ビッ
トを3つずらす場合(d)とし、これらをそれぞれ8ビ
ツトの信号線a + b y c r dとしてとり出
す。これらの信号線はモードレジスタ21w22に記憶
された値に某いヱ・1択回路61+62によりそれぞれ
選択される。いま基準時間信号発生回路がlμsであり
信号@aが選択されたとすると、2つの時刻で信号81
の指示によりそれぞれバッファレジスタ41で各時刻の
カウント数を受は入れラッチし、これを(、:i’LI
 50によってよみこむことにより2つの時刻間の時間
間隔を計測できる。計測+niλ囲は256μs以内で
分解能1 /I Sである。次に信号線すが選択された
場合は、30−2のビットから2μs遅れて出力し、3
0−3は40μs遅れる。以下それより上位の各ビット
出力は2μsを巣立に#貞して出力されるからあたかも
2μsの基準時間信号におけると同様の計測が可能であ
る。このとき計測1[α囲は512μS++岬能は2μ
Sである。以下信号1’5j c + dについても基
準時間信号が変わるから計測範囲、分W4能が目的によ
り任意に選定できる。
FIG. 2 is a block diagram showing the configuration of an embodiment of the present invention. The reference time signal generation circuit 10 has the highest resolution.
A pulse train of the rootmost period used when +1J is required is generated and input to the counter 3o. The counter 30 continues to measure pulse failure as a binary count. The number of bits of this counter 3° is the buffer register 4
If 1s42 is 8 bits, select a larger number of bits. Therefore, the position of each bit of the counter from which 8 bits are taken out is not one. In the case of the solid line 1 tally shown in FIG. 2, for example, as shown in FIG.
It has 11 bit numbers from 0-1 to the least significant digits 30-11. As a result, when extracting the 8-bit key line, the lowest digits 30-1 to 30-8 and 9 are output (a
), Shift one bit to get 9 from 30-2 (b), Shift 2 bits below (C), Shift 3 bits (d), and each of these is an 8-bit signal. Take out the line a + b y cr d. These signal lines are respectively selected by certain 1 selection circuits 61+62 according to the values stored in the mode register 21w22. Assuming that the reference time signal generation circuit is lμs and the signal @a is selected, the signal 81 is generated at two times.
The buffer register 41 receives and latches the count number at each time according to the instructions of (,:i'LI
50, the time interval between two times can be measured. The measurement +niλ range is within 256 μs and has a resolution of 1/IS. Next, when the signal line is selected, it is output with a delay of 2 μs from bit 30-2, and
0-3 is delayed by 40 μs. Thereafter, each higher-order bit output is output after waiting for 2 .mu.s, so it is possible to perform the same measurement as if it were a 2 .mu.s reference time signal. At this time, measurement 1 [α circumference is 512 μS++ + Misaki is 2 μS
It is S. Since the reference time signal changes for the signal 1'5j c + d below, the measurement range and the W4 function can be arbitrarily selected depending on the purpose.

以上詳しく説明したように従来の方法では基準時間信号
を腹数問元生するだめの分周回路が必要であり、回路は
複雑であり、またカウンタについては2Il!!iIの
8ビツトカウンタから116jの11ビツトカウンタに
なったから単にピッl−Hの減少のみならず付属回路等
も節約され、本発明による回路は集積化に最も適したも
のとなっている。また標準基準時間信号は一つであるか
ら第2図で信号線a”−dの切1実えがあった場合にも
カウンタ自1本のカウントデータtま有効である。従っ
て信号線の切換はCPU50のtljlJ nにより行
なわれるので切換回数が計測時間中にかなり多くてもC
PU50による時間計測の計算は簡単であるという利点
がある。
As explained in detail above, in the conventional method, a frequency dividing circuit is required to generate the base time signal from the base time signal, and the circuit is complicated. ! Since the 8-bit counter of iI has been changed to an 11-bit counter of 116j, not only the number of pins is reduced, but also additional circuits and the like are saved, making the circuit according to the present invention most suitable for integration. In addition, since there is only one standard reference time signal, even if signal lines a''-d are disconnected and connected in Fig. 2, the count data t of one counter itself is valid. is performed by tljlJn of the CPU 50, so even if the number of switching is quite large during the measurement time, C
There is an advantage that the time measurement calculation by the PU 50 is simple.

第1図の基準時間信号の切換Cよ2詞の1δ号、8i1
の切換で、第2図の本発明の実施例では8.(2個の信
号線の切換になりその点複雑となるが、第4図に示すよ
うに1ν1(J8NET(絶縁形屯界効果トランジスタ
)群を1吏えば周知の技術でd易に可能であり、これに
よるチップ面積の増−Aれ程間須にならない。第4図は
一方の選択回m6.1について示したが、他方の渕択回
路62も全く同じである。
Switching of the reference time signal in Fig. 1 C, two words 1δ, 8i1
With the switching of 8. in the embodiment of the present invention shown in FIG. (Although it is complicated because it involves switching two signal lines, it is easily possible with well-known technology by using one 1ν1 (J8NET (insulated field effect transistor) group as shown in Figure 4. The increase in chip area due to this does not require much time.Although FIG. 4 shows one selection circuit m6.1, the other selection circuit 62 is exactly the same.

この図で信号+1Jatbの各8ビツトの信号がモード
レジスタ21の出力21’によって切換えられ選択回路
61の出力61’としてされる。出力61’ldバツフ
7レジスタ41に人力される。
In this figure, each 8-bit signal of the signal +1 Jatb is switched by the output 21' of the mode register 21 and output as the output 61' of the selection circuit 61. The output 61'ld is manually input to the buffer 7 register 41.

なお第2図のバッファレジスタ41*42はカウンタ3
0のデータをよみとる機能をもつものとして説明したが
、これをデータを記1ytする機能を有し、記1はされ
たデータとカウンタ3、Oの選択指定されたデータでの
直のカウント数の比較を行ない、2つの値が一致した場
合に、一致信号を割込処理全要求する信号としてCPU
50に伝達する機能をもった比較器と置換として1吏則
する場合でも本発明による利点は全く損なわれない。
Note that buffer registers 41*42 in FIG. 2 are counter 3.
Although this was explained as having the function of reading the data of 0, it also has the function of writing the data. When the two values match, the CPU sends a match signal as a signal to request all interrupt processing.
Even if one comparator is substituted with a comparator having the function of transmitting data to 50, the advantages of the present invention will not be lost at all.

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

第1図は従来例を示すブロック図、第2図は本発明の一
央癩例を示すブロック図、第3図は第2図の回路でカウ
ンタ時間間隔の異なるノ(ルス列をと9出す方法を示す
例を肺示した図、第4図は第2図の選択回路を実現する
例を示す図である。 10・・・・・・基準時間信号発生回路、11,121
61y62・・・・・・選択回路、21,22・・・・
・・モードレジスタs  30.31 * 32・・・
・・・カウンタ、41゜42・・・・・・バッファレジ
スタ、50・・・・・・et’u0第1閉 yF)3圓 第40
Fig. 1 is a block diagram showing a conventional example, Fig. 2 is a block diagram showing an example of monoleprosy according to the present invention, and Fig. 3 is a block diagram showing a monolithic example of the present invention. FIG. 4 is a diagram showing an example of implementing the selection circuit of FIG. 2. 10...Reference time signal generation circuit, 11, 121
61y62...Selection circuit, 21, 22...
...Mode register s 30.31 * 32...
...Counter, 41゜42...Buffer register, 50...et'u0 1st close yF) 3 circles 40th

Claims (1)

【特許請求の範囲】[Claims] 一定の周期のパルス列を発生する基準時間信号パルス列
からのパルス数を計測し、2つの時刻内のパルス数から
該時刻間の時間をきめるタイマ・カウンタにおいて、そ
れぞれただ一つの基準時間信号発生回路と、該基準時間
信号発生回路からのパルスを計測し各ビットに重みづけ
をしたカウンタとを備え、該カウンタの出力端子群に最
下位桁から直接に、あるいは所定の上位の桁から前記カ
ウンタのビット数より少い一定数のビット数だけ群とし
て配線し、これらの群を複数個設けることにより、各(
洋の出力が周期を異にする複数の基準時間信号として用
いられることを特徴とするタイマ・カウンタ。
In a timer/counter that measures the number of pulses from a reference time signal pulse train that generates a pulse train of a constant period and determines the time between the two times from the number of pulses within two times, each has a single reference time signal generation circuit and , a counter that measures pulses from the reference time signal generation circuit and weights each bit, and outputs the bits of the counter directly from the least significant digit or from a predetermined upper digit to the output terminal group of the counter. Each (
1. A timer/counter characterized in that its output is used as a plurality of reference time signals having different periods.
JP57177066A 1982-10-08 1982-10-08 Timer counter Granted JPS5965788A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP57177066A JPS5965788A (en) 1982-10-08 1982-10-08 Timer counter

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP57177066A JPS5965788A (en) 1982-10-08 1982-10-08 Timer counter

Publications (2)

Publication Number Publication Date
JPS5965788A true JPS5965788A (en) 1984-04-14
JPH0446012B2 JPH0446012B2 (en) 1992-07-28

Family

ID=16024516

Family Applications (1)

Application Number Title Priority Date Filing Date
JP57177066A Granted JPS5965788A (en) 1982-10-08 1982-10-08 Timer counter

Country Status (1)

Country Link
JP (1) JPS5965788A (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5250677A (en) * 1975-10-22 1977-04-22 Yagi Antenna Co Ltd Directional variable antenna

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5250677A (en) * 1975-10-22 1977-04-22 Yagi Antenna Co Ltd Directional variable antenna

Also Published As

Publication number Publication date
JPH0446012B2 (en) 1992-07-28

Similar Documents

Publication Publication Date Title
US4229699A (en) Multiple clock selection system
US4564918A (en) Method and apparatus for measuring the time difference between two sampling times
US4264807A (en) Counter including two 2 bit counter segments connected in cascade each counting in Gray code
US4876704A (en) Logic integrated circuit for scan path system
US4160154A (en) High speed multiple event timer
US4354176A (en) A-D Converter with fine resolution
EP0064590B1 (en) High speed binary counter
JPS5965788A (en) Timer counter
US4096471A (en) Method and apparatus for transfer of asynchronously changing data words
US4795984A (en) Multi-marker, multi-destination timing signal generator
US7123679B2 (en) Counter having improved counting speed
US4815111A (en) Data receiving system
SU1506553A1 (en) Frequency to code converter
SU1386934A1 (en) Periodometer
JPS5934939Y2 (en) Memory addressing circuit
SU1653154A1 (en) Frequency divider
JPH0534409A (en) Test mode control signal generating circuit
JPH0517604Y2 (en)
JPH04244971A (en) Pulse interval measuring circuit
SU717715A1 (en) Arrangement for measuring time intervals in aperiodic pulse trains
JPS6126962Y2 (en)
SU1578810A1 (en) Converter of non-position code to binary code
SU1179318A1 (en) Device for rounding number
SU738177A1 (en) Circular register counter
SU1187142A1 (en) Digital averaging meter of time intervals