JPH0447503B2 - - Google Patents
Info
- Publication number
- JPH0447503B2 JPH0447503B2 JP61314724A JP31472486A JPH0447503B2 JP H0447503 B2 JPH0447503 B2 JP H0447503B2 JP 61314724 A JP61314724 A JP 61314724A JP 31472486 A JP31472486 A JP 31472486A JP H0447503 B2 JPH0447503 B2 JP H0447503B2
- Authority
- JP
- Japan
- Prior art keywords
- data
- conversion
- level
- processor
- converter
- 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
- 238000006243 chemical reaction Methods 0.000 claims description 30
- 230000005540 biological transmission Effects 0.000 claims description 18
- 238000000034 method Methods 0.000 claims description 8
- 238000001514 detection method Methods 0.000 description 6
- 238000013481 data capture Methods 0.000 description 2
- 238000010586 diagram Methods 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 230000007257 malfunction Effects 0.000 description 1
- 230000000630 rising effect Effects 0.000 description 1
- 230000001360 synchronised effect Effects 0.000 description 1
Landscapes
- Combined Controls Of Internal Combustion Engines (AREA)
- Communication Control (AREA)
Description
【発明の詳細な説明】
〔産業上の利用分野〕
本発明は、エンジン制御システムにおけるAD
変換データの伝送方法に関する。[Detailed Description of the Invention] [Field of Industrial Application] The present invention is directed to an AD system in an engine control system.
This invention relates to a method of transmitting converted data.
電子制御装置を用いたエンジン制御システムで
は、エンジン各部に配置したセンサのアナログ出
力をAD変換してプロセツサ(CPU)に入力し、
該プロセツサは該入力されたデジタルデータ等を
用いて各種信号を発生し、制御、表示等を行な
う。A/D(アナログ/デジタル)変換には各種
方式のものがあるが、例えば逐次比較型のものが
用いられ、この逐次比較型AD変換器では逐次比
較で上位ビツトから逐次得られた変換データをレ
ジスタに溜め、変換終了で該データをプロセツサ
へシリアル伝送する。
In an engine control system using an electronic control unit, the analog output of sensors placed in various parts of the engine is converted into AD and input to a processor (CPU).
The processor generates various signals using the input digital data and performs control, display, etc. There are various types of A/D (analog/digital) conversion, but for example, a successive approximation type is used. In this successive approximation type A/D converter, the conversion data obtained sequentially from the upper bit by successive approximation is used. The data is stored in a register and serially transmitted to the processor upon completion of conversion.
第5図はこれを説明する図で、プロセツサから
AD変換器へクロツクCLKが送られ、AD変換器
では上記レジスタを該クロツクでシフトして、1
本のデータ線を通してレジスタデータをシリアル
伝送する。該データ線は最初はH(ハイ)レベル
にあり、伝送開始でL(ロー)レベルになる。こ
の最初のLレベルの1ビツト(LSB)はスター
トビツトであり、このあとに所定数例えば8個の
データビツトが続き、その後は再びHレベルに戻
る(このHレベルがストツプビツトになる)。プ
ロセツサは前記クロツクCLKでこのデータを取
込む。即ち、データ線のH,LはクロツクCLK
の立下りに同期しており、プロセツサはこのH,
LをCLKの立上りで読み、図示の如く010110010
等と読取る。最初のLSBはスタートビツトであ
つてデータではなく、残り8ビツトがデータ(レ
ジスタの内容)である。シリアル伝送されるデー
タのビツト数は既知であるからこの既知ビツト数
の受信で(最初のビツトは取込まないから8ビツ
トの受信で)データ受信完了フラグが上り、これ
により割込みが発生して受信データの処理が行な
われる。 Figure 5 is a diagram explaining this.
The clock CLK is sent to the AD converter, and the AD converter shifts the above register with the clock to 1
Register data is serially transmitted through the main data line. The data line is initially at H (high) level, and becomes L (low) level at the start of transmission. This first 1 bit (LSB) at L level is a start bit, followed by a predetermined number of data bits, for example 8, and then returns to H level again (this H level becomes a stop bit). The processor takes in this data on the clock CLK. That is, data lines H and L are clock CLK.
The processor is synchronized with the falling edge of H,
Read L at the rising edge of CLK, 010110010 as shown.
etc. The first LSB is a start bit, not data, and the remaining 8 bits are data (register contents). Since the number of bits of serially transmitted data is known, the data reception completion flag goes up when this known number of bits is received (the first bit is not captured, so 8 bits are received), and this causes an interrupt to be received. Data processing takes place.
AD変換要求はプロセツサからAD変換器に例
えば4mSの周期で定期的に送られる。これを受け
てAD変換器はAD変換を開始し、変換終了で上
記データ伝送を行ない、伝送終了で待機状態に入
る。AD変換および変換データの伝送に要する時
間は例えば500μSであり、残りの3500μSが待機期
間である。上記AD変換要求は、プロセツサの
SOUT端子とAD変換器のSIN端子との間に張ら
れた信号線1(第2図参照)をLレベルにする
ことにより出され、AD変換器はこの信号線の電
位を監視していてそれがLレベルになればAD変
換要求と解してその実行に入る。AD変換データ
は、AD変換器のSO端子とプロセツサのSIN端子
との張られた信号線2を通してシリアル伝送さ
れる。 AD conversion requests are periodically sent from the processor to the AD converter at a cycle of, for example, 4 mS. In response to this, the AD converter starts AD conversion, performs the above-mentioned data transmission upon completion of conversion, and enters a standby state upon completion of transmission. The time required for AD conversion and transmission of converted data is, for example, 500 μS, and the remaining 3500 μS is a waiting period. The above AD conversion request is executed by the processor.
It is output by setting the signal line 1 (see Figure 2) stretched between the SOUT terminal and the SIN terminal of the AD converter to L level, and the AD converter monitors the potential of this signal line. When it becomes L level, it is interpreted as an AD conversion request and its execution begins. AD converted data is serially transmitted through a signal line 2 extending between the SO terminal of the AD converter and the SIN terminal of the processor.
この信号線2は常時はHレベルであり、Lレ
ベルになつて伝送開始となり、その最初のLレベ
ルはスタートビツトである。プロセツサはこの信
号線2のレベルを監視しており、HレベルがL
レベルに変るとそれをスタートビツトと見なして
誤つてデータを受信してしまう。勿論この受信デ
ータはノイズであり、それが速やかに消滅してし
まえば定常状態のHレベルであるが、いずれにし
ても受信動作は行なわれてしまう。
This signal line 2 is normally at H level, and when it goes to L level, transmission begins, and the first L level is a start bit. The processor monitors the level of this signal line 2 , and the H level is the L level.
If the level changes, it will be treated as a start bit and data will be received by mistake. Of course, this received data is noise, and if it disappears quickly, it will be at the steady state H level, but the receiving operation will continue anyway.
本発明はかゝる点を改善し、プロセツサはAD
変換データのみを受信しそれ以外は受信しないよ
うにしようとするものである。 The present invention improves these points, and the processor
The purpose is to receive only the converted data and not receive anything else.
本発明は、マイクロコンピユータ10とAD変
換器20を備え、該マイクロコンピユータから
AD変換器へAD変換を要求し、該AD変換器は
AD変換データを最初のLレベルビツトのあとに
続けてシリアル伝送し、該マイクロコンピユータ
は該最初のLレベルを該シリアル伝送の開始と判
断して続くデータを受信し、受信終了で上る割込
みにより、該マイクロコンピユータのプロセツサ
(CPU)は該データを取込む、エンジン制御シス
テムにおけるAD変換データの伝送方法におい
て、前記AD変換要求の発生でセツトされ、前記
割込みによるデータ取込みでリセツトされるスタ
ートビツトフラグ(SBF)を設け、プロセツサ
は、前記割込みが上り、前記フラグがセツトされ
ている状態で、前記データ取込みを行なうことを
特徴とするものである。
The present invention includes a microcomputer 10 and an AD converter 20, and
Requests AD conversion to the AD converter, and the AD converter
The AD conversion data is serially transmitted after the first L level bit, and the microcomputer determines the first L level as the start of the serial transmission and receives the following data. In the transmission method of AD conversion data in the engine control system, the processor (CPU) of the microcomputer takes in the data, and sets a start bit flag (SBF) that is set when the AD conversion request occurs and is reset when the data is taken in by the interrupt. ), and the processor is characterized in that it takes in the data in a state in which the interrupt is raised and the flag is set.
この方法によれば、プロセツサはAD変換デー
タのみを取込み、ノイズ等による誤つたデータ取
込みは回避することができ、ノイズの多いエンジ
ン制御システムに用いて甚だ有効である。
According to this method, the processor can only take in AD converted data and avoid erroneous data taking in due to noise, etc., and is extremely effective for use in noisy engine control systems.
第1図で10はマイクロコンピユータで、プロ
セツサCPU、受信レジスタ12、受信終了検出
回路14、クロツク制御回路16、クロツクセレ
クタ18を備える。また20はAD変換器で、ア
ナログ入力チヤネルa,b,……の選択データ
CDラツチ回路22、その選択を行なうマルチプ
レクサ24、逐次比較レジスタ26、デジタルア
ナログ変換器28、電源電圧Vc.c.を受けて基準電
圧VREF等を発生するレギユレータ30、比較器群
32を備える。
In FIG. 1, a microcomputer 10 includes a processor CPU, a reception register 12, a reception end detection circuit 14, a clock control circuit 16, and a clock selector 18. Also, 20 is an AD converter, which has selection data for analog input channels a, b, ...
It includes a CD latch circuit 22, a multiplexer 24 for selection, a successive approximation register 26, a digital-to-analog converter 28, a regulator 30 for receiving a power supply voltage Vc.c. and generating a reference voltage V REF , etc., and a group of comparators 32.
逐次比較型のAD変換動作は周知の通りで、入
力アナログ電圧は最大Vボルトとすると、最初
SARはMSBが1で残りは0にセツトされ、これ
を受けてDACはV/2を出力し、MPX24が入
力(チヤネル)aを選択したとすると、比較器3
2aでaとV/2の比較が行なわれ、a>V/2
ならSARではMSBの次のビツトが1にされ、こ
れを受けてDAC28は3V/4を発生し、これが
aと比較され、……という処理が行なわれてレジ
スタSARにはアナログ入力aのデジタル変換値
の各ビツトがMSB側から逐次セツトされて行く
(動作には種々のタイプがあるが)。 Successive approximation type AD conversion operation is well known, and assuming that the input analog voltage is maximum V volts, the initial
The MSB of SAR is set to 1 and the rest are set to 0. In response, the DAC outputs V/2, and if MPX24 selects input (channel) a, the comparator 3
In 2a, a is compared with V/2, and a>V/2
Then, in SAR, the next bit of MSB is set to 1, and in response to this, DAC28 generates 3V/4, which is compared with a. Each bit of the value is set sequentially starting from the MSB side (although there are various types of operations).
AD変換動作は信号線1により指示される。即
ち第2図に示すように1がLレベルになるとこ
れはスタートビツトであり、AD変換動作が開始
する。この前にマイコン10側から変換チヤネル
を指定するデータCDが与えられているので、こ
のデータが上記スタートビツトによりラツチ22
に取込まれ、これによりマルチプレクサ24は該
データが指示するチヤネルa,b,……を選択す
る。AD変換動作がやがて終了し、変換データが
全てSAR26に溜ると自動的にその送出が開始
する。前記のようにこのシリアル伝送を行なう信
号線2のレベルは常時Hレベルであり、伝送開
始でLレベルになり、これ(LSB)がスタート
ビツトで、レジスタデータはその後に続く。 AD conversion operation is instructed by signal line 1 . That is, as shown in FIG. 2, when 1 goes to L level, this is a start bit and the AD conversion operation starts. Before this, the data CD specifying the conversion channel has been given from the microcomputer 10 side, so this data is applied to the latch 22 by the start bit.
This causes the multiplexer 24 to select channels a, b, . . . indicated by the data. When the AD conversion operation is eventually completed and all the converted data is accumulated in the SAR 26, its transmission automatically starts. As mentioned above, the level of the signal line 2 for serial transmission is always at H level, and becomes L level at the start of transmission. This (LSB) is the start bit, and the register data continues thereafter.
このシリアル伝送をさせるクロツクCLKはマ
イコン10側からクロツクセレクタ18、クロツ
ク制御回路16の経路で送られる。またこのクロ
ツクSLKは受信レジスタ12にも入つてシリア
ル伝送データの取込みを制御し、また検出回路1
4へも入力して受信終了検知に供される。即ちこ
の検出回路14は実質的にはカウンタであり、既
知であるデータビツト数(本例では8)を計数す
ると、受信終了をレジスタ12およびプロセツサ
CPUに知らせる。レジスタ12にとつてはこれ
はシフトイン停止信号になり、またプロセツサ
CPUにとつてこれは割込み信号になり、受信デ
ータ12のデータを取込む。信号線2上のスタ
ートビツトは受信レジスタ12で検出し、シフト
インを開始すると共に検出回路14へ計数開始を
指示する。 A clock CLK for this serial transmission is sent from the microcomputer 10 through a route between a clock selector 18 and a clock control circuit 16. This clock SLK is also input to the reception register 12 to control the acquisition of serial transmission data, and also to the detection circuit 12.
4 is also input to detect the end of reception. That is, this detection circuit 14 is essentially a counter, and when it counts the known number of data bits (8 in this example), it signals the end of reception to the register 12 and processor.
Inform the CPU. For register 12, this is the shift-in stop signal, and also for the processor.
This becomes an interrupt signal for the CPU, and data of the received data 12 is taken in. The start bit on the signal line 2 is detected by the reception register 12, starts shift-in, and instructs the detection circuit 14 to start counting.
シリアル伝送終了後、信号線2にノイズがの
り、Lレベルになると、マイコン側ではこれをシ
リアル伝送のスタートビツトと見なし、誤動作し
てしまう。そこで本発明ではスタートビツトフラ
グSBFをプロセツサCPUに設け、シリアル伝送
が終了して前記割込信号が出たのちこれをLレベ
ルにし、次のAD変換まで(前記例で言えば
3500μS後まで)これをLに保つ。プロセツサ
CPUでは受信終了検出回路14から割込み入り、
受信レジスタ12からデータを取込むとき、この
スタートビツトフラグを眺め、これがHならデー
タ取込みをするが、Lならデータ取込みしない。
このようにすればノイズにより信号線2がLレ
ベルになつても、これをシリアル伝送のLSBと
誤認して受信データ取込みを行なつてしまうこと
はない。 When the signal line 2 becomes low level due to noise after the serial transmission is completed, the microcomputer side regards this as the start bit of the serial transmission and malfunctions. Therefore, in the present invention, a start bit flag SBF is provided in the processor CPU, and after the serial transmission is completed and the interrupt signal is output, it is set to L level until the next AD conversion (in the above example).
(Until after 3500μS) Keep this at L. processor
In the CPU, an interrupt is received from the reception end detection circuit 14,
When fetching data from the reception register 12, the start bit flag is checked. If it is H, data is fetched, but if it is L, data is not fetched.
In this way, even if the signal line 2 goes low due to noise, this will not be mistaken as the LSB of serial transmission and the received data will not be taken in.
スタートビツトフラグSBFはAD変換のタイミ
ング(本例では4mS毎)でセツトし、シリアル伝
送終了後のプロセツサへのデータ取込み用割込み
でリセツトする。第3図にこのスタートビツトフ
ラグSBFのセツト等の処理要領を、また第4図
にそのリセツト等の処理要領を示す。この第3図
に示すようにSBFのセツトはAD変換スタート
(1がL)時に行なわれ、第4図に示すように
AD変換データをプロセツサのRAM(ランダムア
クセスメモリ)へセーブしたときリセトされる。 The start bit flag SBF is set at the timing of AD conversion (every 4 mS in this example), and reset at the data capture interrupt to the processor after serial transmission is completed. FIG. 3 shows the procedure for setting the start bit flag SBF, and FIG. 4 shows the procedure for resetting it. As shown in Figure 3, SBF is set at the start of AD conversion ( 1 is low), and as shown in Figure 4, SBF is set.
It is reset when AD conversion data is saved to the processor's RAM (random access memory).
第3図のAD変換チヤネルセツト、は前記デー
タCDを発生するステツプである。センサには各
種あり、AD変換をするタイミングも短周期のも
の、長周期でよいものなど様々である。このステ
ツプではどのセンサ(チヤネル)をAD変換対象
にするかを決める。第4図のルーチンは受信終了
検出回路14が上げた割込みが受けられたときス
タートする。 AD conversion channel set in FIG. 3 is a step for generating the data CD. There are various types of sensors, and the timing of AD conversion varies, such as those with short cycles and those with long cycles. In this step, it is decided which sensor (channel) will be targeted for AD conversion. The routine of FIG. 4 starts when the interrupt raised by the reception end detection circuit 14 is received.
以上説明したように、本発明によればプロセツ
サはAD変換データのみを取込み、ノイズ等によ
る誤つたデータ取込みは回避することができ、ノ
イズの多いエンジン制御システムに用いて甚だ有
効である。
As explained above, according to the present invention, the processor can capture only AD conversion data and avoid erroneous data capture due to noise, etc., and is extremely effective for use in noisy engine control systems.
第1図は本発明の実施例を示すブロツク図、第
2図は動作説明用のタイムチヤート、第3図およ
び第4図は処理要領を示すフローチヤート、第5
図は従来装置の動作を説明するタイムチヤートで
ある。
FIG. 1 is a block diagram showing an embodiment of the present invention, FIG. 2 is a time chart for explaining the operation, FIGS. 3 and 4 are flow charts showing the processing procedure, and FIG.
The figure is a time chart explaining the operation of the conventional device.
Claims (1)
を備え、該マイクロコンピユータからAD変換器
へAD変換を要求し、該AD変換器はAD変換デー
タを最初のLレベルビツトのあとに続けてシリア
ル伝送し、該マイクロコンピユータは該最初のL
レベルを該シリアル伝送の開始と判断して続くデ
ータを受信し、受信終了で発生する割込みによ
り、該マイクロコンピユータのプロセツサ
(CPU)は該データを取込む、エンジン制御シス
テムにおけるAD変換データの伝送方法におい
て、 前記AD変換要求の発生でセツトされ、前記割
込みによるデータ取込みでリセツトされるスター
トビツトフラグ(SBF)を設け、 プロセツサは、前記割込みが発生し、前記フラ
グがセツトされている状態で、前記データの取込
みを行なうことを特徴とするAD変換データの伝
送方法。[Claims] 1. Microcomputer 10 and AD converter 20
The microcomputer requests the AD converter to perform AD conversion, and the AD converter serially transmits the AD conversion data after the first L level bit.
A method for transmitting AD-converted data in an engine control system, in which the level is determined to be the start of the serial transmission, the following data is received, and an interrupt generated at the end of reception causes the microcomputer's processor (CPU) to take in the data. A start bit flag (SBF) is provided which is set when the AD conversion request occurs and is reset when data is fetched by the interrupt, and the processor executes the start bit flag (SBF) when the interrupt occurs and the flag is set. A method of transmitting AD conversion data characterized by importing data.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP61314724A JPS63161754A (en) | 1986-12-24 | 1986-12-24 | Transmission method for ad conversion data |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP61314724A JPS63161754A (en) | 1986-12-24 | 1986-12-24 | Transmission method for ad conversion data |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPS63161754A JPS63161754A (en) | 1988-07-05 |
| JPH0447503B2 true JPH0447503B2 (en) | 1992-08-04 |
Family
ID=18056806
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP61314724A Granted JPS63161754A (en) | 1986-12-24 | 1986-12-24 | Transmission method for ad conversion data |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPS63161754A (en) |
-
1986
- 1986-12-24 JP JP61314724A patent/JPS63161754A/en active Granted
Also Published As
| Publication number | Publication date |
|---|---|
| JPS63161754A (en) | 1988-07-05 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP2641999B2 (en) | Data format detection circuit | |
| WO2007038537A1 (en) | Selectable real time sample triggering for a plurality of inputs of an analog-to-digital converter | |
| US4165508A (en) | Method and apparatus for detecting a peak value of an analog signal | |
| JP6594466B2 (en) | Device and method for requesting analog to digital conversion | |
| US4937575A (en) | Precision A/D converter utilizing a minimum of interface interconnections | |
| JPH0895710A (en) | AD converter control device and control method | |
| JPH0447503B2 (en) | ||
| US5229770A (en) | Analog/digital converter with advanced conversion termination notice | |
| EP4054081A1 (en) | Ad converter and semiconductor device including the same | |
| SU1290285A1 (en) | Device for controlling power consumption of microprocessor system | |
| JPS63164639A (en) | Serial data transmission method | |
| JP2559237Y2 (en) | Serial data sampling signal generator | |
| SU1545210A1 (en) | Device for interfacing analog-digital converter and micrpoprocessor | |
| JP2778276B2 (en) | Successive approximation type A / D converter | |
| SU1275419A1 (en) | Information input device | |
| SU1183910A1 (en) | Digital peak detector | |
| SU1072070A1 (en) | Device for monitoring single electric pulses | |
| US6970071B2 (en) | Method and device for acquiring data | |
| JPH09321624A (en) | Semiconductor integrated circuit device | |
| JPH0721123A (en) | Serial data transfer device | |
| SU1474729A1 (en) | Indicator | |
| JPH0664518B2 (en) | Method of receiving data from successive approximation A / D converter | |
| SU1406620A2 (en) | Signal transmitting/receiving device | |
| SU1372594A1 (en) | Apparatus for extracting signal extremums | |
| SU1171828A1 (en) | Device for collecting and transmission of information |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| LAPS | Cancellation because of no payment of annual fees |