JPS60225066A - Vehicle speed detector - Google Patents

Vehicle speed detector

Info

Publication number
JPS60225066A
JPS60225066A JP8229984A JP8229984A JPS60225066A JP S60225066 A JPS60225066 A JP S60225066A JP 8229984 A JP8229984 A JP 8229984A JP 8229984 A JP8229984 A JP 8229984A JP S60225066 A JPS60225066 A JP S60225066A
Authority
JP
Japan
Prior art keywords
interrupt
pulse
time
vehicle speed
mode
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
JP8229984A
Other languages
Japanese (ja)
Other versions
JPH0141944B2 (en
Inventor
Akira Miyazaki
晃 宮崎
Hiroyuki Konishi
博之 小西
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.)
Denso Ten Ltd
Original Assignee
Denso Ten 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 Denso Ten Ltd filed Critical Denso Ten Ltd
Priority to JP8229984A priority Critical patent/JPS60225066A/en
Publication of JPS60225066A publication Critical patent/JPS60225066A/en
Publication of JPH0141944B2 publication Critical patent/JPH0141944B2/ja
Granted legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01PMEASURING LINEAR OR ANGULAR SPEED, ACCELERATION, DECELERATION, OR SHOCK; INDICATING PRESENCE, ABSENCE, OR DIRECTION, OF MOVEMENT
    • G01P3/00Measuring linear or angular speed; Measuring differences of linear or angular speeds
    • G01P3/42Devices characterised by the use of electric or magnetic means
    • G01P3/44Devices characterised by the use of electric or magnetic means for measuring angular speed
    • G01P3/48Devices characterised by the use of electric or magnetic means for measuring angular speed by measuring frequency of generated current or voltage
    • G01P3/481Devices characterised by the use of electric or magnetic means for measuring angular speed by measuring frequency of generated current or voltage of pulse signals
    • G01P3/489Digital circuits therefor

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Measuring Frequencies, Analyzing Spectra (AREA)

Abstract

PURPOSE:To get rid of effect from chattering and noises without use of any complicated filter by providing an interrupt mode for the rising and falling to calculate the vehicle speed from the time of receiving a pulse. CONSTITUTION:When interrupt is initiated at the rising time t1 of a pulse P1, it is switched over to the rising trigger mode. This allows the triggering of interrupt at the rising time t7 of a pulse P4 at the next time. Subsequently, interrupt is trigered at the rising time t8 of a pulse P2. At the next step 11, the interrupt mode is changed to the falling trigger mode. then, interrupt is triggered at the falling time t2 of the pulse P2 an done again at the falling of a pulse P5. The change of the interrupt mode is made. Then, interrupt is triggered at the rising time t9 of a pulse P30. Subsequently, interrupt is triggered at the rising time of a pulse P31 and then done at the falling thereof. It is changed to the rising trigger mode from the falling trigger mode. In the end, the time t1, t5 and t3 is memorized in the falling processing and time t8 and t10 done in the rising processing. Thus, the effect of chattering or the like can be reduced using either of the processings.

Description

【発明の詳細な説明】 発明の技術分野 本発明は自動車の車速を検出する方法に関し、特に車速
に比例した繰返し周波数のパルス信号を発生する車速セ
ンサの前記パルス信号を処理して車速を検出する車速検
出方法に関するものである。
DETAILED DESCRIPTION OF THE INVENTION Technical Field of the Invention The present invention relates to a method for detecting the vehicle speed of an automobile, and more particularly to a method for detecting the vehicle speed by processing a pulse signal of a vehicle speed sensor that generates a pulse signal with a repetition frequency proportional to the vehicle speed. This invention relates to a vehicle speed detection method.

従来技術と問題点 従来のこの種車速検出方法は、例えば第1図(a)に示
すように車速に比例した繰返し周波数のパルス信号(P
I、P2.P3は各パルスを示す)をマイクロコンピュ
ータの割込み端子に入力し、パルス信号の立下がりで割
込みをかけ、この割込みのタイミングtl−t3を検出
することによりパルス信号の周期酸は周波数を測定する
ことで行なわれている。
Prior Art and Problems This type of conventional vehicle speed detection method uses a pulse signal (P) with a repetition frequency proportional to the vehicle speed, as shown in FIG.
I, P2. P3 indicates each pulse) is input to the interrupt terminal of the microcomputer, an interrupt is generated at the falling edge of the pulse signal, and the frequency of the periodic acid of the pulse signal can be measured by detecting the timing tl-t3 of this interrupt. It is carried out in

ところで、周方向にN、S極が交互に着磁された磁石を
自動車の速度ケーブルにより車速に応じて回転させ、こ
の磁石に近接したリードスイッチのオン、オフ状態をパ
ルス信号として得る形式の車速センサ等においては、第
1図(b)に示すように、リードスイッチのチャタリン
グによる幅の狭いパルスP5.P6やノイズによる幅の
狭いパルスP4が現れることが多い。なお、同図(b)
のパルスP30. P31はチャタリングパルスP6に
よりパルスP3が分割された状態を示す。この為、例エ
ハハルス信号の1′のレベルからo”のレベルへの立下
がりで割込みをかけると、正常なパルスの立下がり時刻
B、t2.t3に割込みがかかる他、チャタリングによ
るパルスP5.P6によって時刻t5.t6にも割込み
がかかり、更にノイズパルスP4によっても割込みがか
かってしまい、従来の方法では割込みがかかった時のタ
イミングを単純に正規のパルス信号の立下がりと判別す
るものであるから、恰もt1〜t4.t2〜t5.t6
〜L3が一つの周期であると認識され、算出される速度
の精度が極端に悪(なってしまう欠点があ4た。
By the way, the vehicle speed is determined by rotating a magnet whose N and S poles are alternately magnetized in the circumferential direction according to the vehicle speed using the speed cable of the vehicle, and obtaining the on/off state of a reed switch near the magnet as a pulse signal. In sensors, etc., as shown in FIG. 1(b), narrow pulses P5. P6 and a narrow pulse P4 due to noise often appear. In addition, the same figure (b)
Pulse P30. P31 indicates a state in which pulse P3 is divided by chattering pulse P6. For this reason, for example, if an interrupt is generated at the fall of the Ehahals signal from the 1' level to the o'' level, an interrupt will be generated at the falling time of the normal pulse B, t2.t3, as well as the pulse P5.P6 due to chattering. Therefore, an interrupt is generated at times t5 and t6, and an interrupt is also generated by the noise pulse P4, so in the conventional method, the timing when the interrupt occurs is simply determined as the falling edge of a normal pulse signal. Therefore, t1~t4.t2~t5.t6
- L3 is recognized as one cycle, and the accuracy of the calculated speed is extremely poor.

このような問題点を改善する為の一方法としては、パル
ス信号にハードウェア的にフィルタをかけ、チャタリン
グによるパルスを除去したのちマイクロコンピュータの
割込み端子に入力することが考えられる。しかしながら
、標準的な車速センサのパルス信号におけるチャタリン
グによるパルスの幅の最大値は、正規のパルスの高速時
におけるレベル”1”、レベル“θ″の最小パルス幅で
ある1 m5ecに近くなるので、単純なRCフィルタ
ではチャタリングパルスだけを確実に除去することが困
難であり、複雑なフィルタを必要とする欠点がある。
One possible way to improve this problem is to apply a hardware filter to the pulse signal to remove pulses due to chattering before inputting it to the interrupt terminal of the microcomputer. However, the maximum value of the pulse width due to chattering in the pulse signal of a standard vehicle speed sensor is close to 1 m5ec, which is the minimum pulse width of the regular pulse at level "1" and level "θ" at high speed. It is difficult to reliably remove only chattering pulses with a simple RC filter, and there is a drawback that a complicated filter is required.

発明の目的 本発明はこのような従来の欠点を改善したものであり、
その目的は、複雑なフィルタを使用しなくてもチャタリ
ング及びノイズによる影響を十分に除去し得るようにす
ることにある。
Purpose of the Invention The present invention improves these conventional drawbacks, and
The purpose is to be able to sufficiently remove the effects of chattering and noise without using complex filters.

発明の構成 本発明の要旨とするところは、車速に比例した繰返し周
波数のパルス信号を発生する車速センサの前記パルス信
号を処理して車速を検出する車速検出方法において、割
込み端子に加わる信号の立上がりで割込みがかかる第1
の割込みモードと前記割込み端子に加わる信号の立下が
りで割込みがかかる第2の割込みモードとをプログラム
により選択することができるマイクロコンピュータの前
記割込み端子に前記パルス信号を入力し、第1゜第2の
割込みモードにおいて割込み時から所定時間だけ前記パ
ルス信号のレベルが変化しないか否かを判別させ、変化
したときは速やかに割込み処理を終了させ、変化しない
ときは割込みモードを反対モードに変更すると共に少な
くともいずれか一方の割込みモードにおいて割込み時或
はこれに関連する時間をパルス受付時間として一時的に
記憶させて割込み処理を終了させ、複数回の割込み処理
により順次記憶されたパルス受付時間から車速を算出さ
せるようにした車速検出方法にある。
Structure of the Invention The gist of the present invention is to provide a vehicle speed detection method for detecting vehicle speed by processing a pulse signal of a vehicle speed sensor that generates a pulse signal with a repetition frequency proportional to the vehicle speed. The first one that is interrupted by
The pulse signal is inputted to the interrupt terminal of a microcomputer that can select by program an interrupt mode in which an interrupt mode occurs and a second interrupt mode in which an interrupt occurs at the falling edge of a signal applied to the interrupt terminal. In the interrupt mode, it is determined whether or not the level of the pulse signal does not change for a predetermined period of time from the time of the interrupt, and when it changes, the interrupt processing is immediately terminated, and when it does not change, the interrupt mode is changed to the opposite mode, and In at least one of the interrupt modes, the time of the interrupt or the time related thereto is temporarily stored as the pulse reception time and the interrupt processing is terminated, and the vehicle speed is determined from the pulse reception time sequentially stored through multiple interrupt processing. The problem lies in the vehicle speed detection method that calculates the vehicle speed.

本発明の作用を第2図(a)のパルス信号波形図を参照
して説明する。同図(a)は第1図(b)と同一波形で
あり、正規のパルスPI、P2゜以外に、ノイズパルス
P4.チャタリングパルスP5.チャタリングパルスP
6によって分割されたパルスP30. P31とが現れ
ている。
The operation of the present invention will be explained with reference to the pulse signal waveform diagram of FIG. 2(a). 1(a) has the same waveform as FIG. 1(b), and in addition to the regular pulses PI and P2°, there are noise pulses P4. Chattering pulse P5. Chattering pulse P
Pulse P30.6 divided by P30. P31 appears.

説明の便宜上、当初マイクロコンピュータは第2図(b
)に示すように割込み端子に加わる信号の立下がりで割
込みがかかる立下がりトリガモードになっているとする
。また、信号の変化なしを判断する前記所定時間として
はノイズパルスの幅が狭いことからチャタリングの最大
時間T(例えば1 m5ec)が設定される。
For convenience of explanation, the microcomputer was originally designed as shown in Figure 2 (b).
), it is assumed that the mode is a falling trigger mode in which an interrupt occurs at the falling edge of the signal applied to the interrupt terminal. Furthermore, since the width of the noise pulse is narrow, the maximum chattering time T (for example, 1 m5ec) is set as the predetermined time for determining whether there is no change in the signal.

マイクロコンピュータは、先ずパルスP1の立下がり時
(tl)で割込みをかけられると、この割込み処理にお
いて割込み時から所定時間Tだけパルス信号のレベルが
変化しないか否かを判別する。パルスP1はチャタリン
グを生じていない正規のパルスであり、このような場合
はパルスP1の立下がり時(tl)で割込みがかかった
後所定時間Tはパルス信号のレベルは変化しない。何故
ならば、パルスの@θ″レベルの幅の最小値はT(l 
m5ec)以上となるからである。このようなときはマ
イクロコンピュータは割込み時(tl)或は判別を終了
した時刻(tl+T)をパルス受付時間として一時的に
記憶すると共にプログラムにより割込みモードを割込み
端子に加わる信号の立上がりで割込みがかかる立上がり
トリガモードに切換える。従って、次はパルスP4の立
上がり時(tl)で割込みがかけられる。しかし、パル
スP4はノイズパルスであり、割込み時(tl)から所
定時間T以内にパルス信号のレベルは変化するので、割
込み処理は速やかに終了され、パルス受付処理及び割込
みモードの変更は行なわれない。
When the microcomputer is first interrupted at the falling edge (tl) of the pulse P1, it determines in this interrupt processing whether the level of the pulse signal does not change for a predetermined time T from the time of the interrupt. The pulse P1 is a regular pulse without chattering, and in such a case, the level of the pulse signal does not change for a predetermined time T after an interrupt is generated at the falling edge (tl) of the pulse P1. This is because the minimum width of the @θ″ level of the pulse is T(l
m5ec) or more. In such a case, the microcomputer temporarily stores the time of the interrupt (tl) or the time when the discrimination ends (tl+T) as the pulse reception time, and also sets the interrupt mode by the program to generate an interrupt at the rising edge of the signal applied to the interrupt terminal. Switch to rising trigger mode. Therefore, next time, an interrupt is generated at the rising edge of pulse P4 (tl). However, since the pulse P4 is a noise pulse and the level of the pulse signal changes within a predetermined time T from the time of the interrupt (tl), the interrupt processing is promptly terminated, and the pulse reception processing and interrupt mode change are not performed. .

この為、次もパルスP2の立上がり時(t8)で割込み
がかけられることになる。このパルスP2は正規のパル
スであり、割込み時(t8)から所定時間Tだけパルス
信号のレベルは変化しないので、割込み時(t8)或は
判別を終了した時刻(t8+T)がパルス受付時間とし
て一時的に記憶され、且つ割込みモードが立下がりトリ
ガモードに変更される。
Therefore, an interrupt will be generated next time at the rising edge of pulse P2 (t8). This pulse P2 is a regular pulse, and the level of the pulse signal does not change for a predetermined time T from the time of the interrupt (t8), so the time of the interrupt (t8) or the time when the determination is finished (t8+T) is temporarily the pulse reception time. is stored and the interrupt mode is changed to falling trigger mode.

次は、パルスP2の立下がり(t2)で割込みがかけら
れるが、直後にチャタリングパルスP5が出現している
ので、所定時間′rだけ変化することはなくパルス受付
処理2割込みモード変更処理は行なわれない。そして、
パルスP5の立下がりで割込みがかけられたとき、割込
み時(t5)から所定時間だけパルス信号のレベルが変
化しないことから、割込み時(t5)或は時刻(t 5
 +T)がパルス受付時間として一時的に記憶され且つ
割込みモードが変更される。従って、次はパルスP30
の立上がり時(t9)に割込みがかけられる。
Next, an interrupt is generated at the falling edge of pulse P2 (t2), but since chattering pulse P5 appears immediately after, it does not change for a predetermined time 'r, and pulse reception processing 2 interrupt mode change processing is performed. Not possible. and,
When an interrupt is generated at the falling edge of pulse P5, the level of the pulse signal does not change for a predetermined period of time from the time of the interrupt (t5).
+T) is temporarily stored as the pulse acceptance time and the interrupt mode is changed. Therefore, next pulse P30
An interrupt is generated at the rising edge of (t9).

しかしパルスP30はチャタリングパルスP6により幅
の狭いものとなっているので、パルス受付処理1割込み
モードの変更処理は行なわれない。従って、次のパルス
P31の立上がり時(110)で割込みがかけられ、割
込み時(tlO)或は時刻(tl0+T)が一時的に記
憶されると共に割込みモードの変更が行なわれる。次は
、パルスP31の立下がりで割込みがかけられ、割込み
時(t3)或は時刻(t3+T)が一時的に記憶される
と共に割込みモードが立下がりトリガモードから立上が
りトリガモートへ変更される。
However, since the pulse P30 has a narrower width due to the chattering pulse P6, the pulse reception process 1 interrupt mode change process is not performed. Therefore, an interrupt is generated at the next rising edge of pulse P31 (110), and the interrupt time (tlO) or time (tl0+T) is temporarily stored and the interrupt mode is changed. Next, an interrupt is generated at the falling edge of the pulse P31, and the interrupt time (t3) or time (t3+T) is temporarily stored, and the interrupt mode is changed from the falling trigger mode to the rising trigger mode.

結局、以上の処理では、立下がりトリガモードの割込み
処理において、時刻(tl)或は時刻(t 1 +T)
 、時刻(t5)或は時刻(15−)T)。
After all, in the above processing, in the falling trigger mode interrupt processing, the time (tl) or the time (t 1 +T)
, time (t5) or time (15-)T).

時刻(t3)或は時刻(t3+T)がそれぞれ記憶され
、立上がりトリガモードの割込み処理において、時刻(
t8)或は時刻(t8+T)、時刻(tlO)或は時刻
(tlo+T)がそれぞれ記憶されることになる。従っ
て、立下がりトリガモードで記憶されたパルス受付時間
或は立上がりトリガモードで記憶されたパルス受付時間
のいずれか一方を用いることにより、チャタリング及び
ノイズによる影響を軽減でき、従来方法より精度良く車
速を検出することができるものである。なお、以上の説
明では、立上がりモードと立下がりモードのいずれでも
パルス受付処理を行なったが、いずれか一方の処理を省
略しても良い。また、車速の算出の仕方としては、直前
のパルス受付時間から今回のパルス受付時間を引いた値
により1パルス毎に算出しても良く、或は複数パルスの
周期の平均により算出しても良い。
The time (t3) or the time (t3+T) is stored respectively, and in the interrupt processing in the rising trigger mode, the time (t3) or the time (t3+T) is stored.
t8), time (t8+T), time (tlO), or time (tlo+T), respectively. Therefore, by using either the pulse reception time stored in the falling trigger mode or the pulse reception time stored in the rising trigger mode, the effects of chattering and noise can be reduced, and vehicle speed can be determined more accurately than conventional methods. It is something that can be detected. In the above description, pulse reception processing was performed in both the rising mode and the falling mode, but either one of the processings may be omitted. Furthermore, the vehicle speed may be calculated for each pulse by subtracting the current pulse reception time from the previous pulse reception time, or it may be calculated by averaging the cycles of multiple pulses. .

発明の実施例 第3図は本発明を実施する装置のハードウェア構成の一
例を示すブロック図であり、1は図示しない速度ケーブ
ルにより車速に応して回転される磁石で、その周方向に
はN、S極が交互に合計4極着磁されている。リードス
イッチ2は磁石1に近接した場所に配置され、磁石1の
回転に応じてオン、オフ動作を行なう。リードスイッチ
2の一端は接地され、他端は増幅、波形整形、レベル調
整等を行なうバッファ3に接続され、バッファ3から第
2図(a)に示したようなパルス信号が得られる。マイ
クロコンピュータ4は、割込み端子INTに加わる入力
信号の立下がりで割込みがかかる立下がりトリガモード
と、入力信号の立上がりで割込みがかかる立上がりトリ
ガモードとをプログラムにより選択することができる割
込み機能をを有すると共に、ROM、RAM等がCPL
Iと同一チップに集積化された所謂1チツプマイクロコ
ンピユータである。また割込み端子INTの入力しヘル
を読取る機能をも有している。このような機能を有する
マイクロコンピュータは従来から良く知られている。マ
イクロコンピュータ4は検出した車速をその出力ポート
から外部に送出する車速検出専用のマイクロコンピュー
タであっても良く、他の処理をも行なう所謂自動車のエ
ンジン制御用や燃料噴射用等のマイクロコンピュータで
あっても良い。なお、■cは電源である。
Embodiment of the Invention FIG. 3 is a block diagram showing an example of the hardware configuration of a device implementing the present invention. Reference numeral 1 denotes a magnet that is rotated according to the vehicle speed by a speed cable (not shown), and in the circumferential direction of the magnet. The N and S poles are magnetized alternately for a total of 4 poles. The reed switch 2 is placed close to the magnet 1 and turns on and off in response to the rotation of the magnet 1. One end of the reed switch 2 is grounded, and the other end is connected to a buffer 3 that performs amplification, waveform shaping, level adjustment, etc., and a pulse signal as shown in FIG. 2(a) is obtained from the buffer 3. The microcomputer 4 has an interrupt function that allows a program to select a falling trigger mode in which an interrupt occurs at the falling edge of an input signal applied to the interrupt terminal INT, and a rising trigger mode in which an interrupt occurs at the rising edge of the input signal. In addition, ROM, RAM, etc. are CPL
It is a so-called one-chip microcomputer integrated on the same chip as I. It also has the function of inputting the interrupt terminal INT and reading the health signal. Microcomputers having such functions have been well known. The microcomputer 4 may be a microcomputer dedicated to vehicle speed detection that sends the detected vehicle speed to the outside from its output port, or may be a microcomputer for so-called automobile engine control, fuel injection, etc. that also performs other processing. It's okay. Note that ■c is a power supply.

マイクロコンピュータ4は、現在の割込みモードに応じ
て第2図(a)に示したようなパルス信号の“1”レベ
ルから“0”レベルへの立下がり或は0”レベルから“
1″レベルへの立上がりで割込みがかけられ、例えば第
4図に示すような割込み処理を実施する。即ち、割込み
がかかると、先ず現在のモードが立上がりトリガモード
か否かをフラグ等を見て判別しくSt)、立下がりトリ
ガモードであればステップ32以下の立下がりモード処
理を実行し、立上がりトリガモードであればステップ3
8以下の立上がりモード処理を実行する。
The microcomputer 4 responds to the falling of the pulse signal from the "1" level to the "0" level or from the "0" level to the "0" level as shown in FIG. 2(a), depending on the current interrupt mode.
An interrupt is generated when the voltage rises to the 1'' level, and the interrupt processing as shown in FIG. If it is the falling trigger mode, execute the falling mode processing from step 32 onwards, and if it is the rising trigger mode, execute the falling mode processing in step 3.
Execute rising mode processing of 8 or less.

立下がりモード処理においては、先ず、RAM領域に設
定した第1のループカウンタLPCIの値をnとする(
S2)。このnは、チャタリングの最大時間(T)を、
ステップS3→S4→S5−33を一巡するのに要する
実行時間で割った値である。なお、所定時間Tの計測は
内蔵タイマ等のハードウェアタイマを使用することもで
きる。次に、割込み端子INTのレベルつまりバッファ
3から出力されているパルス信号のレベルが“0”か否
かを判別しくS2)、“1”であれば割込み時から所定
時間T以内にパルス信号のレベルが変化したので割込み
処理を終了してメインルーチンへ復帰する。また、割込
み端子INTのレベルが“O”であれば第1のループカ
ウンタLPCIの値を1だけ減算しくS4)、ループカ
ウンタLPCIの値が零か否かを判別する(S5)処理
をループカウンタLPCIの内容が零になるか或は割込
み端子INTのレベルが1”になるまで繰返す。そして
、第1のループカウンタLPCIの内容が零になる前に
割込み端子INTのレベルが1′になったら割込み処理
を終了し、割込み端子INTのレベルが“1”になる前
にループカウンタLPCIの内容が零になったら、立上
がりトリガモードに切換えると共に(S6)、車速パル
ス受付処理を実行しくS7)、メインルーチンへ復帰す
る。車速パルス受付処理とは、今回の割込みがかかった
時刻あるいは第1のループカウンタLPCIの内容が零
となった時刻をRAM等のある領域に一時的に記憶する
処理をいう。
In the falling mode process, first, the value of the first loop counter LPCI set in the RAM area is set to n (
S2). This n is the maximum chattering time (T),
This is the value divided by the execution time required to complete one cycle of steps S3→S4→S5-33. Note that a hardware timer such as a built-in timer can also be used to measure the predetermined time T. Next, it is determined whether the level of the interrupt terminal INT, that is, the level of the pulse signal output from the buffer 3, is "0" or not (S2). If it is "1", the pulse signal is Since the level has changed, interrupt processing is ended and the process returns to the main routine. Furthermore, if the level of the interrupt terminal INT is "O", the value of the first loop counter LPCI is subtracted by 1 (S4), and the process of determining whether the value of the loop counter LPCI is zero (S5) is performed as a loop counter. Repeat until the content of LPCI becomes zero or the level of the interrupt terminal INT becomes 1'. Then, if the level of the interrupt terminal INT becomes 1' before the content of the first loop counter LPCI becomes zero, When the interrupt processing is finished and the contents of the loop counter LPCI become zero before the level of the interrupt terminal INT becomes "1", the mode is switched to the rising trigger mode (S6), and the vehicle speed pulse reception processing is executed (S7). Return to the main routine.Vehicle speed pulse reception processing is processing that temporarily stores the time when the current interrupt occurs or the time when the content of the first loop counter LPCI becomes zero in a certain area such as RAM. .

また、立上がりモード処理においては、先ず、RAM領
域に設定した第2のループカウンタLPC2の値をn”
とする。このn゛は、チャタリングの最大時間(T)を
、ステップS9→SIO→Sll→S9を一巡するのに
要する実行時間で割った値である。次に、割込み端子I
NTのレベルが“1”か否かを判別しくS9)、“θ″
′であれば割込み処理を終了してメインルーチンへ復帰
する。また、割込み端子INTのレベル力ぴ1″であれ
ば第2のループカウンタLPC2の値を1だけ減算しく
310)、ループカウンタLPC2の値が零か否かを判
別する(S11)処理をループカウンタLPC2の内容
が零になるか或は割込み端子TNTのレベルが0″にな
るまで繰返す。そして、第2のループカウンタL P 
C2の内容が零になる前に割込み端子INTのレベルが
“0”になったら割込み処理を終了し、割込み端子IN
Tのレベルが0″になる前にループカウンタLPCIの
内容が零になったら、立下がリトリガモードに切換え(
S12)、メインルーチンへ復帰する。
In addition, in the rising mode processing, first, the value of the second loop counter LPC2 set in the RAM area is set to n''
shall be. This n' is the value obtained by dividing the maximum chattering time (T) by the execution time required to go through steps S9→SIO→Sll→S9. Next, interrupt terminal I
To determine whether the NT level is “1” or not, S9), “θ”
', the interrupt processing ends and returns to the main routine. Also, if the level of the interrupt terminal INT is 1'', the value of the second loop counter LPC2 is subtracted by 1 (310), and the process of determining whether the value of the loop counter LPC2 is zero (S11) is performed as a loop counter. This process is repeated until the contents of LPC2 become zero or the level of the interrupt terminal TNT becomes 0''. Then, the second loop counter L P
If the level of the interrupt terminal INT becomes "0" before the contents of C2 become zero, the interrupt processing ends, and the interrupt terminal
If the contents of the loop counter LPCI become zero before the level of T becomes 0'', the falling edge switches to retrigger mode (
S12), return to the main routine.

なお、メインルーチンにおいては、割込み処理において
順次一時的に記憶されたパルス受付時間に基づき公知の
方法にて車速を検出するものである。
In the main routine, the vehicle speed is detected by a known method based on the pulse reception times that are sequentially and temporarily stored in the interrupt process.

なお、第4図は立下がりトリガモード時に受付処理を行
なったが、立上がりトリガモード時に受付処理を行なっ
ても良い。また、バッファ3の出力を割込み端子INT
と入力ポートに入力し、パルス信号のレベルが変化する
か否かを入力ポートのレベルを監視することにより行な
っても良い。
Although the acceptance process is performed in the falling trigger mode in FIG. 4, the acceptance process may be performed in the rising trigger mode. Also, the output of buffer 3 is connected to the interrupt terminal INT.
This may be done by inputting the pulse signal into the input port and monitoring the level of the input port to see if the level of the pulse signal changes.

発明の詳細 な説明したように、本発明によれば、ハードウェアによ
る複雑なフィルタを外部に設けなくても、チャタリング
による影響およびノイズによる影響を除去することがで
きる利点があり、経済的な車速検出が可能となる。また
、チャタリングの中には例えば100μsec毎にオン
、オフを繰返しチャタリング継続時間が1 m5ecを
越えるようなチャタリングがあるが、本発明ではこのよ
うなチャタリングによる影響も除去することができる利
点がある。
As described in detail, the present invention has the advantage of being able to eliminate the effects of chattering and noise without the need for externally providing a complicated filter using hardware, and can reduce vehicle speeds at economical speeds. Detection becomes possible. Furthermore, some types of chattering include, for example, chattering that is repeatedly turned on and off every 100 μsec and whose duration exceeds 1 m5 ec, but the present invention has the advantage of being able to eliminate the effects of such chattering.

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

第1図は従来の車速検出方法の説明図、第2図は本発明
の車速検出方法の説明図、第3図は本発明を実施する装
置のハードウェア構成の一例を示すブロック図、第4図
はマイクロコンピュータ4の割込み処理の一例を示すフ
ローチャートである。 1は磁石、2はリードスイッチ、3はバッファ、・1)
)4はマイクロコンピュータである。 特許出願人富士通テン株式会社 代理人弁理士玉蟲久五部外1名 第 1 口 t+ t?is 第 2 口
FIG. 1 is an explanatory diagram of a conventional vehicle speed detection method, FIG. 2 is an explanatory diagram of a vehicle speed detection method of the present invention, FIG. 3 is a block diagram showing an example of the hardware configuration of a device implementing the present invention, and FIG. The figure is a flowchart showing an example of interrupt processing by the microcomputer 4. 1 is a magnet, 2 is a reed switch, 3 is a buffer, ・1)
)4 is a microcomputer. Patent Applicant Fujitsu Ten Ltd. Representative Patent Attorney Tamamushi 5 1 person outside the department No. 1 t+t? is second mouth

Claims (1)

【特許請求の範囲】[Claims] 車速に比例した繰返し周波数のパルス信号を発生する車
速センサの前記パルス信号を処理して車速を検出する車
速検出方法において、割込み端子に加わる信号の立上が
りで割込みがかかる第1の割込みモードと前記割込み端
子に加わる信号の立下がりで割込みがかかる第2の割込
みモードとをプログラムにより選択することができるマ
イクロコンピュータの前記割込み端子に前記パルス信号
を入力し、第1.第2の割込みモードにおいて割込み時
から所定時間だけ前記パルス信号のレベルが変化しない
か否かを判別させ、変化したときは速やかに割込み処理
を終了させ、変化しないときは割込みモードを反対モー
ドに変更すると共に少なくともいずれか一方の割込みモ
ードにおいて割込み時或はこれに関連する時間をパルス
受付時間として一時的に記憶させて割込み処理を終了さ
せ、複数回の割込み処理により順次記憶されたパルス受
付時間から車速を算出させるようにしたことを特徴とす
る車速J11−喝方法。
In the vehicle speed detection method of detecting vehicle speed by processing the pulse signal of a vehicle speed sensor that generates a pulse signal with a repetition frequency proportional to the vehicle speed, a first interrupt mode in which an interrupt occurs at the rising edge of a signal applied to an interrupt terminal; The pulse signal is input to the interrupt terminal of a microcomputer that can select by program a second interrupt mode in which an interrupt occurs at the falling edge of a signal applied to the terminal; In the second interrupt mode, it is determined whether or not the level of the pulse signal does not change for a predetermined period of time from the time of the interrupt, and if it changes, the interrupt processing is promptly terminated, and if it does not change, the interrupt mode is changed to the opposite mode. At the same time, in at least one of the interrupt modes, the time of the interrupt or the time related thereto is temporarily stored as the pulse reception time, and the interrupt processing is terminated, and the pulse reception time sequentially stored through multiple interrupt processing is A vehicle speed J11 method characterized in that the vehicle speed is calculated.
JP8229984A 1984-04-24 1984-04-24 Vehicle speed detector Granted JPS60225066A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP8229984A JPS60225066A (en) 1984-04-24 1984-04-24 Vehicle speed detector

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP8229984A JPS60225066A (en) 1984-04-24 1984-04-24 Vehicle speed detector

Publications (2)

Publication Number Publication Date
JPS60225066A true JPS60225066A (en) 1985-11-09
JPH0141944B2 JPH0141944B2 (en) 1989-09-08

Family

ID=13770668

Family Applications (1)

Application Number Title Priority Date Filing Date
JP8229984A Granted JPS60225066A (en) 1984-04-24 1984-04-24 Vehicle speed detector

Country Status (1)

Country Link
JP (1) JPS60225066A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2016082840A (en) * 2014-10-22 2016-05-16 マーレエレクトリックドライブズジャパン株式会社 Battery charger
FR3067888A1 (en) * 2017-06-14 2018-12-21 Safran Aircraft Engines METHOD FOR PROCESSING A ROTATION SPEED SIGNAL OF A NOISE AFFECTED AIRCRAFT ENGINE SHAFT

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2016082840A (en) * 2014-10-22 2016-05-16 マーレエレクトリックドライブズジャパン株式会社 Battery charger
FR3067888A1 (en) * 2017-06-14 2018-12-21 Safran Aircraft Engines METHOD FOR PROCESSING A ROTATION SPEED SIGNAL OF A NOISE AFFECTED AIRCRAFT ENGINE SHAFT
EP3418753A1 (en) * 2017-06-14 2018-12-26 Safran Aircraft Engines Method for processing a rotational speed signal of an aircraft engine shaft affected by noise
US10830786B2 (en) 2017-06-14 2020-11-10 Safran Aircraft Engines Processing method for a rotation speed signal of an aircraft engine shaft affected by noise

Also Published As

Publication number Publication date
JPH0141944B2 (en) 1989-09-08

Similar Documents

Publication Publication Date Title
KR20040068971A (en) High accuracy method for determining the frequency of a pulse input signal over a wide frequency range
US4009443A (en) Method and apparatus for providing primary coincidence correction during particle analysis utilizing time generation techniques
US3936741A (en) Method and apparatus for providing primary coincidence correction during particle analysis utilizing time generation techniques
US5982290A (en) Automatic recognition of different types of liquid level sensors
JPS60225066A (en) Vehicle speed detector
JPH03140872A (en) False operation preventing circuit for measuring device
JPS60225067A (en) Vehicle speed detection
JPH0141943B2 (en)
US5313199A (en) Method for detecting and correcting pulse noise in multifunctional remote control transmitter
JP2661048B2 (en) Speed detector
JPS60122375A (en) Measuring method of vehicle speed
JP2653189B2 (en) Power frequency detector
JP3112366B2 (en) Chattering elimination circuit
JP2604562B2 (en) Pulse interval measuring device
JPS61274514A (en) Method and apparatus for counting contact output
JPS60182354A (en) Measuring device for injector driving pulse width
JPH04350564A (en) Computing method for pulse generation period
JP3098759B2 (en) Pedometer
SU1229600A1 (en) Device for measuring temperature
JPH0625782B2 (en) Frequency discrimination circuit
SU1661716A1 (en) Device for time interval measurement
JPH0610263Y2 (en) Instantaneous flow monitor
JP2568121Y2 (en) Average value period measurement device
JPH05180855A (en) Speed detector
SU1416991A1 (en) Device for input of data from differential transmitters

Legal Events

Date Code Title Description
EXPY Cancellation because of completion of term