JPH0226068Y2 - - Google Patents
Info
- Publication number
- JPH0226068Y2 JPH0226068Y2 JP11732582U JP11732582U JPH0226068Y2 JP H0226068 Y2 JPH0226068 Y2 JP H0226068Y2 JP 11732582 U JP11732582 U JP 11732582U JP 11732582 U JP11732582 U JP 11732582U JP H0226068 Y2 JPH0226068 Y2 JP H0226068Y2
- Authority
- JP
- Japan
- Prior art keywords
- input pulse
- input
- pulse signal
- falling
- 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.)
- Expired
Links
- 230000004069 differentiation Effects 0.000 claims description 5
- 238000012544 monitoring process Methods 0.000 claims description 2
- 238000010586 diagram Methods 0.000 description 2
- 238000005259 measurement Methods 0.000 description 1
Landscapes
- Measuring Frequencies, Analyzing Spectra (AREA)
Description
【考案の詳細な説明】
本考案はパルス周期測定回路に関し、特にマイ
クロコンピユータを用いて複数のパルス信号周期
を測定する複数パルス周期測定回路に関するもの
である。DETAILED DESCRIPTION OF THE INVENTION The present invention relates to a pulse period measuring circuit, and more particularly to a multiple pulse period measuring circuit that measures a plurality of pulse signal periods using a microcomputer.
近年、マイクロコンピユータの急速な発達に伴
なつて各種装置の制御部にマイクロコンピユータ
が用いられている。この場合、マイクロコンピユ
ータを用いた装置に於いては、各種センサから供
給されるパルス信号を入力として各種制御を行な
うわけであるが、このパルス信号にはその周期に
よつて回転速度等の各種情報を表わしているもの
が比較的多くある。従つて、マイクロコンピユー
タを用いて各種の入力パルス信号を扱うに際して
は、パルス信号の周期を検出する必要がある。 In recent years, with the rapid development of microcomputers, microcomputers are being used in control units of various devices. In this case, devices using microcomputers perform various controls using pulse signals supplied from various sensors as input, and these pulse signals contain various information such as rotational speed depending on their cycle. There are relatively many things that represent this. Therefore, when handling various input pulse signals using a microcomputer, it is necessary to detect the period of the pulse signals.
この場合、従来一般に用いられているパルス周
期測定回路に於いては、各入力パルス信号毎に独
立した回路を用いてパルス周期の測定を行なつて
いる。 In this case, in the pulse period measuring circuit commonly used in the past, an independent circuit is used for each input pulse signal to measure the pulse period.
しかしながら、上記構成に於いては回路構成が
複雑であるとともに、多数の入力パルス信号を扱
う場合には入力パルス信号の入力数に一致するパ
ルス周期測定回路が必要となるために極めて複雑
でかつ高価なものとなつてしまう問題を有してい
る。 However, in the above configuration, the circuit configuration is complicated, and when handling a large number of input pulse signals, a pulse period measurement circuit that matches the number of input pulse signals is required, making it extremely complicated and expensive. It has the problem of becoming a thing.
従つて、本考案による目的は、簡単な構成であ
りながら、複数の入力パルス信号に対するパルス
周期測定が容易に行なえる複数パルス周期測定回
路を提供することである。以下、図面を用いて本
考案による複数パルス周期測定回路を詳細に説明
する。 SUMMARY OF THE INVENTION Accordingly, an object of the present invention is to provide a multiple pulse period measuring circuit which has a simple configuration and can easily measure pulse periods for a plurality of input pulse signals. Hereinafter, the multiple pulse period measuring circuit according to the present invention will be described in detail with reference to the drawings.
第1図は本考案による複数パルス周期測定回路
の一実施例を示す回路図である。同図に於いて1
はカウンタユニツトであつて、この場合には第1
〜第3カウンタからなる3個のカウンタが収容さ
れている。そして、このカウンタユニツトは、入
力ポートCSに供給されるモードセレクト信号MS
によつて各種のカウンタモードになるものである
が、この場合には通常のカウンタモードとして使
用する。つまり、第1〜第3カウンタは、それぞ
れのカウンタに対応する入力ポートG1〜G3に供
給される入力パルス信号IN1〜IN3の“H”期間
に於いてのみクロツクパルスCLKを順次計数し、
入力パルス信号IN1〜IN3が“L”に反転すると
その計数値が固定され、入力パルス信号IN1〜
IN3が再び“H”に立ち上るとリセツトされて計
数を開始する。2a〜2cは入力パルス信号IN1
〜IN3をそれぞれ入力して立ち下り微分信号(後
縁微分信号)を出力する立ち下り微分回路、3は
前記立ち下り微分回路2a〜2cの出力信号を入
力として論理和を求めるノアゲート、4はマイク
ロコンピユータであつて、その内部にはノアゲー
ト3の出力信号によりインタラプタモードになる
と始動し立ち下り微分回路2a〜2cの内どの回
路から出力があつたか監視する手段と、カウンタ
ユニツト1内の第1〜第3カウンタの中から出力
のあつた立ち下り微分回路に対応する入力パルス
信号をカウントしたカウンタを選択する手段と、
選択されたカウンタの保持している計数値を取り
込む手段と、この取り込んだ計数値を演算して入
力パルス信号の周期を測定する手段とがプログラ
ムされている。そして、立ち下り微分回路2a〜
2cの出力信号を入力ポートP10〜P12に入力し、
ノアゲート3の出力信号をインタラプト用の入力
ポートP13に入力している。なお、P14はカウンタ
ユニツト1の入力ポートCSにモードセレクト信
号MSを供給する出力ポート、P15,P16はカウン
タユニツト1の入力ポートA0,A1に第1〜第3
カウンタを指定するアドレス信号を供給する出力
ポート、P17はカウンタユニツト1の計数値をデ
ータバスDBを介して取り込む入力ポート、P18,
P19はカウンタユニツト1の入力ポートB1,B2に
リード・ライト信号を供給する出力ポートであ
る。 FIG. 1 is a circuit diagram showing an embodiment of a multiple pulse period measuring circuit according to the present invention. In the same figure, 1
is a counter unit, and in this case, the first
- Three counters consisting of a third counter are accommodated. This counter unit then receives the mode select signal MS supplied to the input port CS.
Various counter modes can be selected depending on the mode, but in this case, it is used as a normal counter mode. In other words, the first to third counters sequentially count the clock pulse CLK only during the "H" period of the input pulse signals IN1 to IN3 supplied to the input ports G1 to G3 corresponding to the respective counters. ,
When the input pulse signals IN 1 to IN 3 are inverted to "L", the count value is fixed, and the input pulse signals IN 1 to IN 3 are inverted to "L".
When IN3 rises to "H" again, it is reset and starts counting. 2a to 2c are input pulse signals IN 1
~ IN 3 is a falling differential circuit that inputs each signal and outputs a falling differential signal (trailing edge differential signal), 3 is a NOR gate that receives the output signals of the falling differential circuits 2a to 2c and calculates a logical sum, and 4 is a It is a microcomputer, and internally includes a means for monitoring which circuit among the falling differential circuits 2a to 2c receives an output, which is activated when the interrupter mode is set by the output signal of the NOR gate 3, and a first circuit in the counter unit 1. - means for selecting a counter from among the third counters that counted the input pulse signal corresponding to the output falling differential circuit;
A means for taking in the count value held by the selected counter and a means for calculating the read count value and measuring the period of the input pulse signal are programmed. Then, the falling differentiation circuit 2a~
Input the output signal of 2c to input ports P10 to P12 ,
The output signal of NOR gate 3 is input to input port P13 for interrupt. Note that P14 is an output port that supplies the mode select signal MS to the input port CS of the counter unit 1, and P15 and P16 are the output ports that supply the first to third input ports A0 and A1 of the counter unit 1.
Output port that supplies an address signal specifying the counter; P17 is an input port that takes in the count value of counter unit 1 via data bus DB; P18 ,
P19 is an output port that supplies read/write signals to the input ports B1 and B2 of the counter unit 1.
このように構成された回路に於いて、入力パル
ス信号IN1〜IN3が供給されると、カウンタユニ
ツト1の第1〜第3カウンタが入力ポートG1〜
G3に供給される入力パルス信号IN1〜IN3の“H”
期間に於いてクロツクパルスCLKを順次計数す
る。そして、この計数値は対応する入力パルス信
号が“L”に反転するとロツクされる。 In the circuit configured in this way, when the input pulse signals IN 1 to IN 3 are supplied, the first to third counters of the counter unit 1 are connected to the input ports G 1 to G 1 .
“H” of input pulse signals IN 1 to IN 3 supplied to G 3
The clock pulses CLK are sequentially counted during the period. This count value is then locked when the corresponding input pulse signal is inverted to "L".
一方、立ち下り微分回路2a〜2cは、入力パ
ルス信号IN1〜IN3の立ち下り部分(後縁)を微
分して出力をマイクロコンピユータ4の入力ポー
トP10〜P12に供給している。そして、立ち下り微
分回路2a〜2cのいずれかから“H”レベルの
出力信号が発生されると、ノアゲート3の出力が
“L”に反転してマイクロコンピユータ4の入力
ポートP13にインタラプト信号が供給される。マ
イクロコンピユータ4はインタラプト信号が供給
されると、インタラプトモードとなつて入力ポー
トP10〜P12の信号を読み取り、立ち下り微分パル
スが供給されている入力ポートを判別する。そし
て、マイクロコンピユータ4は立ち下り微分パル
スが供給された入力ポートに対応して出力ポート
P15,P16からアドレス信号ASを発生することに
よつてカウンタを指定し、この指定されたカウン
タの計数値を読み込んで2倍し、クロツクパルス
CLKの周期を基として対応する入力信号IN1〜
IN3の周期を求めて出力する。つまり、入力パル
ス信号が立ち下る毎にこの入力信号の供給時から
クロツクパルスCLKを計数しているカウンタの
動作を停止させて、その計数値を保持する。一
方、マイクロコンピユータ4は、入力パルス信号
の立ち下り時にインタラプトが加えられて、立ち
下り微分パルスが発生された入力パルス信号を判
別し、この入力パルス信号によつて制御されるカ
ウンタの計数値を取り込んで演算することにより
入力パルス信号の周期を算出しているものであ
る。そして、この様な動作を入力パルス信号が立
ち下る毎に行なうことによつて、複数の入力パル
ス信号に対する周期測定が行なえることになる。 On the other hand, the falling differentiation circuits 2a to 2c differentiate the falling portions (trailing edges) of the input pulse signals IN1 to IN3 and supply outputs to the input ports P10 to P12 of the microcomputer 4. When an "H" level output signal is generated from any of the falling differential circuits 2a to 2c, the output of the NOR gate 3 is inverted to "L" and an interrupt signal is sent to the input port P13 of the microcomputer 4. Supplied. When the microcomputer 4 is supplied with the interrupt signal, it enters the interrupt mode, reads the signals of the input ports P10 to P12 , and determines the input port to which the falling differential pulse is supplied. Then, the microcomputer 4 outputs an output port corresponding to the input port to which the falling differential pulse is supplied.
A counter is specified by generating an address signal AS from P 15 and P 16 , and the count value of this specified counter is read and doubled, and the clock pulse is
The corresponding input signal IN 1 ~ based on the period of CLK
Find and output the period of IN 3 . That is, every time the input pulse signal falls, the operation of the counter that has been counting the clock pulses CLK since the input signal is stopped, and the counted value is held. On the other hand, the microcomputer 4 determines the input pulse signal in which an interrupt is added at the falling edge of the input pulse signal and a falling differential pulse is generated, and calculates the count value of the counter controlled by this input pulse signal. The period of the input pulse signal is calculated by importing and calculating. By performing such an operation every time the input pulse signal falls, it is possible to measure the period of a plurality of input pulse signals.
なお、上記実施例に於いては、複数個のカウン
タが一体化されたカウンタユニツトを用いたが、
本考案はこれに限定されるものではなく、各カウ
ンタが独立したものを用いても良いことは言うま
でもない。 Note that in the above embodiment, a counter unit in which a plurality of counters were integrated was used.
It goes without saying that the present invention is not limited to this, and that each counter may be independent.
以上説明した様に、この考案による複数パルス
周期測定回路によれば、簡単な構成でありなが
ら、複数の入力パルス信号に対するパルス周期の
測定が容易にかつ確実に行なえる優れた効果を有
する。 As explained above, the multiple pulse period measuring circuit according to the present invention has an excellent effect of easily and reliably measuring the pulse periods for a plurality of input pulse signals, although it has a simple configuration.
図は本考案による複数パルス周期測定回路の一
実施例を示す回路図である。
1……カウンタユニツト、2a〜2c……立ち
下り微分回路、3……ノアゲート、4……マイク
ロコンピユータ。
The figure is a circuit diagram showing an embodiment of a multiple pulse period measuring circuit according to the present invention. 1... Counter unit, 2a to 2c... Falling differential circuit, 3... Noah gate, 4... Microcomputer.
Claims (1)
入力パルス信号の供給時間に於けるクロツクパル
スを計数するとともに、入力パルス信号の断時に
計数値を保持する複数のカウンタと、前記入力パ
ルス信号の立ち下り微分回路と、この各立ち下り
微分回路の出力信号を入力としてその論理和出力
を発生するゲート回路と、前記複数のカウンタと
前記複数の立ち下り微分回路と前記ゲート回路と
に接続される複数の入出力ポートを備えたマイク
ロコンピユータとを有し、該マイクロコンピユー
タは前記ゲート回路の論理和出力によりインタラ
プタモードになると始動し複数の前記立ち下り微
分回路の内どの回路から信号が出力されたかを監
視する手段と、複数の前記カウンタの中から出力
のあつた前記立ち下り微分回路に対応する入力パ
ルス信号をカウントした前記カウンタを選択する
手段と、選択された前記カウンタの保持している
前記計数値を取り込む手段と、この取り込んだ前
記計数値を演算することにより前記入力パルス信
号の周期を測定する手段とを備えたことを特徴と
する複数パルス周期測定回路。 A plurality of counters that are reset when an input pulse signal is supplied and count clock pulses during the supply time of the input pulse signal, and hold the counted value when the input pulse signal is interrupted, and a falling differentiation circuit for the input pulse signal. and a gate circuit that receives the output signal of each of the falling differentiation circuits and generates an OR output thereof, and a plurality of input/outputs connected to the plurality of counters, the plurality of falling differentiation circuits, and the gate circuit. and a microcomputer equipped with a port, the microcomputer being started when it enters the interrupter mode by the OR output of the gate circuit, and monitoring which circuit out of the plurality of falling differential circuits has outputted the signal. and means for selecting, from among the plurality of counters, the counter that counted the input pulse signal corresponding to the outputted falling differential circuit, and capturing the counted value held by the selected counter. and means for measuring the period of the input pulse signal by calculating the loaded count value.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP11732582U JPS5921773U (en) | 1982-07-31 | 1982-07-31 | Multiple pulse period measurement circuit |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP11732582U JPS5921773U (en) | 1982-07-31 | 1982-07-31 | Multiple pulse period measurement circuit |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPS5921773U JPS5921773U (en) | 1984-02-09 |
| JPH0226068Y2 true JPH0226068Y2 (en) | 1990-07-17 |
Family
ID=30270124
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP11732582U Granted JPS5921773U (en) | 1982-07-31 | 1982-07-31 | Multiple pulse period measurement circuit |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPS5921773U (en) |
-
1982
- 1982-07-31 JP JP11732582U patent/JPS5921773U/en active Granted
Also Published As
| Publication number | Publication date |
|---|---|
| JPS5921773U (en) | 1984-02-09 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| EP0468454B1 (en) | Interrupt controller | |
| US4538235A (en) | Microcomputer retriggerable interval counter | |
| US5630172A (en) | Data transfer control apparatus wherein an externally set value is compared to a transfer count with a comparison of the count values causing a transfer of bus use right | |
| US5233573A (en) | Digital data processor including apparatus for collecting time-related information | |
| JPH0226068Y2 (en) | ||
| KR100249073B1 (en) | Digital Timer Device and Method | |
| JPS5924269A (en) | Pulse period measuring system using microcomputer | |
| JPS6411977B2 (en) | ||
| JPH0727804A (en) | Pulse width measurement circuit | |
| JP2990111B2 (en) | Timer circuit | |
| SU1520589A1 (en) | Device for monitoring instability of rotary speed of magnetic disk of storage | |
| JPH0329749Y2 (en) | ||
| JP2599805B2 (en) | DMA controller | |
| SU1103221A1 (en) | Code comparison device | |
| JPH0751631Y2 (en) | CPU runaway detection circuit | |
| JPH0231248A (en) | Data processor | |
| JPH0476127B2 (en) | ||
| JPH0635998B2 (en) | Capture device | |
| JPS60664Y2 (en) | display device | |
| SU1206834A1 (en) | Indication device | |
| JPH0316313A (en) | Detector for missing pulse | |
| JPH0120393B2 (en) | ||
| JPS6152503B2 (en) | ||
| JPS58182770A (en) | State history storage device | |
| JPS59106144U (en) | Toner remaining amount detection device |