JP3403127B2 - A / D conversion circuit - Google Patents

A / D conversion circuit

Info

Publication number
JP3403127B2
JP3403127B2 JP24439699A JP24439699A JP3403127B2 JP 3403127 B2 JP3403127 B2 JP 3403127B2 JP 24439699 A JP24439699 A JP 24439699A JP 24439699 A JP24439699 A JP 24439699A JP 3403127 B2 JP3403127 B2 JP 3403127B2
Authority
JP
Japan
Prior art keywords
conversion
value
digital value
digital
data table
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 - Fee Related
Application number
JP24439699A
Other languages
Japanese (ja)
Other versions
JP2001053608A (en
Inventor
茂明 高瀬
伸司 伊丹
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.)
Mitsubishi Electric Engineering Co Ltd
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric Engineering Co Ltd
Mitsubishi Electric 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 Mitsubishi Electric Engineering Co Ltd, Mitsubishi Electric Corp filed Critical Mitsubishi Electric Engineering Co Ltd
Priority to JP24439699A priority Critical patent/JP3403127B2/en
Publication of JP2001053608A publication Critical patent/JP2001053608A/en
Application granted granted Critical
Publication of JP3403127B2 publication Critical patent/JP3403127B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【発明の属する分野】この発明は、入力されるアナログ
信号を変換し、ディジタル信号として出力するA/D変
換回路において、特にMPUでの処理を低減させ、高速
化を図る技術に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an A / D conversion circuit for converting an input analog signal and outputting it as a digital signal, and more particularly to a technique for reducing the processing in the MPU and increasing the speed.

【0002】[0002]

【従来の技術】図14は、マイクロプロセッサ(以下、
MPUと称す)の計算処理によりスケーリングされたデ
ィジタル値に変換するA/D変換回路の構成を示す構成
図である。図において、100はアナログ信号S10を
ディジタル信号(以下、生ディジタル値と称す)S11
に変換するA/D変換部、101はアナログ信号S10
に誤差補正用の基準アナログ信号を入力したことを知ら
せるためのスイッチ、102は基準アナログ信号がオフ
セット値かゲイン値かを知らせるためのスイッチ、10
3は基準アナログ信号が入力された時の生ディジタル値
S11を記憶保持しておくための不揮発性メモリ、10
4は不揮発性メモリ103に記憶されているオフセット
値、ゲイン値をもとに生ディジタル値S11をスケーリ
ング処理し、ディジタル値S12を出力するMPUであ
る。なお、基準アナログ信号の入力はオフセット値とゲ
イン値の2種類ある。
2. Description of the Related Art FIG.
It is a block diagram which shows the structure of the A / D conversion circuit which converts into the digital value which was scaled by the calculation process of (it calls MPU). In the figure, reference numeral 100 denotes an analog signal S10 which is a digital signal (hereinafter referred to as a raw digital value) S11.
A / D conversion unit for converting into an analog signal S10
A switch for notifying that a reference analog signal for error correction has been input to the switch 102, and a switch 102 for notifying whether the reference analog signal is an offset value or a gain value.
Reference numeral 3 denotes a non-volatile memory for storing and holding the raw digital value S11 when the reference analog signal is input.
Reference numeral 4 denotes an MPU for scaling the raw digital value S11 based on the offset value and gain value stored in the non-volatile memory 103 and outputting the digital value S12. There are two types of input of the reference analog signal: an offset value and a gain value.

【0003】一般に図14で示されるA/D変換部によ
って変換された生ディジタル値は、A/D変換部を構成
する部品のバラツキおよび周囲温度の変化によるA/D
変換部を構成する部品の特性変化により誤差を発生す
る。したがって、どの装置においても同一アナログ値を
入力した場合に同一ディジタル値に変換するように補正
をしなければならない。この補正方法として、ボリュー
ム抵抗による部品誤差および特性変化を補正する方法
と、以下に示すスケーリング処理による補正とがある。
スケーリング処理のメリットは、A/D変換部の分解能
とディジタル値S12の分解能が一致していなくても補
正ができることである。これによりA/D変換部の分解
能をディジタル値S12の分解能より高くしておくこと
により、ノイズ等によりA/D変換部に発生した誤差を
ディジタル値S12に現れにくくすることができる。
Generally, the raw digital value converted by the A / D converter shown in FIG. 14 is the A / D due to the variation of the parts constituting the A / D converter and the change of the ambient temperature.
An error occurs due to a change in the characteristics of the components that make up the conversion unit. Therefore, in any device, correction must be performed so that when the same analog value is input, it is converted into the same digital value. As this correction method, there are a method of correcting a component error and a characteristic change due to a volume resistance, and a correction by a scaling process described below.
The merit of the scaling process is that the correction can be performed even if the resolution of the A / D converter and the resolution of the digital value S12 do not match. Accordingly, by setting the resolution of the A / D conversion unit higher than the resolution of the digital value S12, it is possible to make it difficult for an error generated in the A / D conversion unit to appear in the digital value S12 due to noise or the like.

【0004】次に、スケーリング処理を説明する。図1
5は、A/D変換部に入力されたアナログ信号を生ディ
ジタル値に変換する特性を示しており、なおかつA/D
変換部により変換された生ディジタル値を0−4000
(分解能4000)のディジタル値にスケーリングする
処理を示す図である。図において、105はスイッチ1
01及びスイッチ102により知らされ、入力された基
準アナログ信号のオフセット値(以下、Voffsetと称
す)が、A/D変換部100により変換された生ディジ
タル値(Doffset)、106は同様に知らされた基準ア
ナログ信号のゲイン値(Vgain)が、A/D変換部10
0により変換された生ディジタル値(Dgain)であり、
DoffsetとDgainは不揮発性メモリ103に記憶保持さ
れる。
Next, the scaling process will be described. Figure 1
Reference numeral 5 indicates the characteristic of converting an analog signal input to the A / D converter into a raw digital value, and
The raw digital value converted by the converter is 0-4000.
It is a figure which shows the process which carries out scaling to the digital value of (resolution 4000). In the figure, 105 is a switch 1
01 and the switch 102, the offset value (hereinafter referred to as Voffset) of the input reference analog signal converted by the A / D conversion unit 100 is the raw digital value (Doffset), and 106 is similarly notified. The gain value (Vgain) of the reference analog signal is the A / D conversion unit 10
Is a raw digital value (Dgain) converted by 0,
Doffset and Dgain are stored and held in the non-volatile memory 103.

【0005】このDoffsetとDgainを用いてMPU10
4は任意のアナログ信号(Vin)を入力したときにA
/D変換部により変換された生ディジタル値(Din)
に対して以下の計算式によりスケーリング値(Ds)を
計算する。 Ds=(Din−Doffset)/{(Dgain−Doffset)/分解能} (式1) ここで、Dinは、任意のアナログ信号(Vin)に対
する生ディジタル値である。
Using the Doffset and Dgain, the MPU 10
4 is A when an arbitrary analog signal (Vin) is input
Raw digital value (Din) converted by the / D converter
Then, the scaling value (Ds) is calculated by the following calculation formula. Ds = (Din-Doffset) / {(Dgain-Doffset) / resolution} (Formula 1) Here, Din is a raw digital value for an arbitrary analog signal (Vin).

【0006】図16は、ディジタル信号をMPUの計算
によりアナログ出力の分解能に合ったディジタル値に変
換するD/A変換装置の概略構成図である。図におい
て、110は入力された任意のディジタル信号S13を
アナログ出力の分解能にあわせて変換するための計算処
理を実行し、アナログ出力の分解能に合うように変換処
理されたディジタル値(以下、変換ディジタル値と称
す)S14を出力するMPU、111は変換ディジタル
値S14をアナログ信号S15に変換するためのD/A
変換部、112は装置のD/A変換特性を変えるための
アナログ出力の調整モードに入るためのスイッチ、11
3はスイッチ112により調整モードに入った時にオフ
セット調整またはゲイン調整を選択するスイッチ、11
4は調整モード時に変換ディジタル値を増減させること
によりアナログ出力を増減させ調整するためのスイッ
チ、115はオフセット調整時とゲイン調整時にスイッ
チ113をSETにしたときの変換ディジタル値S14
を記憶保持する不揮発性メモリである。
FIG. 16 is a schematic block diagram of a D / A converter for converting a digital signal into a digital value suitable for the resolution of an analog output by calculation of MPU. In the figure, reference numeral 110 executes a calculation process for converting an input arbitrary digital signal S13 according to the resolution of an analog output, and a digital value (hereinafter referred to as a conversion digital value) converted so as to match the resolution of the analog output. (Referred to as value) MPU for outputting S14, 111 is a D / A for converting the converted digital value S14 into an analog signal S15.
A conversion unit 112 is a switch for entering an analog output adjustment mode for changing the D / A conversion characteristic of the device, 11
3 is a switch for selecting offset adjustment or gain adjustment when the adjustment mode is entered by the switch 112, 11
Reference numeral 4 denotes a switch for increasing / decreasing and adjusting the analog output by increasing / decreasing the conversion digital value in the adjustment mode. Reference numeral 115 denotes the conversion digital value S14 when the switch 113 is set to SET during offset adjustment and gain adjustment.
Is a non-volatile memory that stores and holds.

【0007】図17は、ディジタル信号0−4000
(分解能4000)をアナログ出力0−10Vに変換す
るための処理を示す図である。一般的に、D/A変換部
111の分解能はディジタル信号S13よりも大きな分
解能を有している。このため、ディジタル信号S13を
D/A変換部の分解能に合った値に変換する必要があ
る。図において、116はディジタル信号の値が0の時
の変換ディジタル値(Dooff)であり、スイッチ11
2により調整モードに入り、スイッチ113及び114
により任意のアナログ値(オフセットアナログ値、本例
では0V)を出力するように増減し、スイッチ113を
SETの位置にしたときの値である。117は同様にア
ナログ出力が任意のアナログ値(ゲインアナログ値、本
例では10V)を出力する時の変換ディジタル値(Do
gain)である。Dooff及びDogainは不揮発性メモリ
に記憶保持される。
FIG. 17 shows a digital signal 0-4000.
It is a figure which shows the process for converting (resolution 4000) into analog output 0-10V. Generally, the resolution of the D / A converter 111 is higher than that of the digital signal S13. Therefore, it is necessary to convert the digital signal S13 into a value that matches the resolution of the D / A converter. In the figure, 116 is a converted digital value (Dooff) when the value of the digital signal is 0, and the switch 11
2 enters the adjustment mode and switches 113 and 114
Is a value when an arbitrary analog value (offset analog value, 0 V in this example) is increased / decreased and the switch 113 is set to the SET position. Similarly, 117 is a converted digital value (Do) when the analog output outputs an arbitrary analog value (gain analog value, 10 V in this example).
gain). Dooff and Dogain are stored and held in a non-volatile memory.

【0008】MPUは、DooffとDogainを用い
て、任意に入力されたディジタル値(A)に対する変換
ディジタル値(Da)を以下の計算式により求める。 Da=A×{(Dogain−Dooff)/分解能}+Dooff (式2) D/A変換部は図17に示すD/A変換特性の変換を実
行し、変換ディジタル値(Da)に対するアナログ値
(Vout)を出力する。
The MPU obtains a converted digital value (Da) for the arbitrarily input digital value (A) by using the following formula using Dooff and Dogain. Da = A * {(Dogain-Dooff) / resolution} + Dooff (Equation 2) The D / A converter executes the conversion of the D / A conversion characteristic shown in FIG. 17, and converts the analog value (Vout) to the converted digital value (Da). ) Is output.

【0009】[0009]

【発明が解決しようとする課題】従来のA/D変換回路
では、A/D変換すべきアナログ信号が入力されると、
MPU内部でソフトウェア処理としてスケーリング処理
を行い、ディジタル値として出力している。そのため、
処理に要する時間がMPUの処理能力に左右され、MP
Uが(式1)を高速に実行するためには、MPUの性能
を上げなければならない。つまり、アナログ信号を入力
してからディジタル値を出力する迄の応答性を向上させ
るためには、高機能なMPUが必要であり、この高機能
のMPUは非常に高価となってしまうという課題があっ
た。
In the conventional A / D conversion circuit, when an analog signal to be A / D converted is input,
Scaling processing is performed as software processing inside the MPU, and is output as a digital value. for that reason,
The time required for processing depends on the processing capacity of the MPU.
In order for U to execute (Equation 1) at high speed, the performance of MPU must be improved. That is, in order to improve the responsiveness from the input of an analog signal to the output of a digital value, a highly functional MPU is required, and this highly functional MPU becomes very expensive. there were.

【0010】この発明の目的は、MPUの性能に依存せ
ずA/D変換の高速化をはかる方法及び回路を提供する
ことを目的とする。さらに、部品のバラツキによる誤差
(初期誤差)及び周囲温度の変化の影響を受けないA/
D変換の方法及び回路を提供することである。
It is an object of the present invention to provide a method and a circuit for increasing the speed of A / D conversion without depending on the performance of MPU. Furthermore, A / is not affected by errors due to component variations (initial errors) and changes in ambient temperature.
A method and a circuit for D conversion are provided.

【0011】[0011]

【課題を解決するための手段】本発明にかかるA/D変
換回路は、入力されるアナログ信号を生ディジタル値に
変換するA/D変換部と、基準アナログ信号を上記A/
D変換部により変換された基準ディジタル値を用いて、
出力すべきディジタル値に相当するA/D変換値を上記
ディジタル値毎に予め算出する制御手段と、この制御手
段により算出されたA/D変換値を、アドレスがディジ
タル値に相当する形式で格納したデータテーブルと、A
/D変換部によりアナログ信号から変換された生ディジ
タル信号と上記データテーブルにおけるA/D変換値と
を比較し、内容が一致したアドレスをディジタル値とし
て出力する比較回路と、を備えたものである。
An A / D conversion circuit according to the present invention uses an A / D conversion unit for converting an input analog signal into a raw digital value and a reference analog signal for the A / D conversion.
Using the reference digital value converted by the D converter,
Control means for calculating beforehand an A / D conversion value corresponding to the digital value to be output for each digital value, and the A / D conversion value calculated by this control means is stored in a format in which the address corresponds to the digital value. Data table and A
And a comparison circuit for comparing the raw digital signal converted from the analog signal by the / D conversion unit with the A / D conversion value in the data table and outputting the address having the matched contents as a digital value. .

【0012】また、制御手段による算出は、テスト指令
が入力された際のアナログ信号を基準アナログ信号とし
て変換されたDgain及びDoffsetからなる基準ディジタ
ル値を用い、データテーブルのアドレスADに格納する
A/D変換値Dinを Din={(Dgain−Doffset)/分解能}×AD+Dof
fset により求めるものである。
Further, the calculation by the control means uses a reference digital value composed of Dgain and Doffset converted from the analog signal when the test command is input as a reference analog signal, and stores it in the address AD of the data table A / D converted value Din is Din = {(Dgain-Doffset) / resolution} × AD + Dof
It is obtained by fset.

【0013】さらに、基準電圧をA/D変換部に入力し
た際に出力されるA/D変換値と、予め基準電圧に対応
して出力されるであろう理論A/D変換値とを比較し、
上記A/D変換部の回路誤差を検出し、誤差を自動補正
するものである。
Furthermore, the A / D conversion value output when the reference voltage is input to the A / D conversion unit is compared with the theoretical A / D conversion value that will be output corresponding to the reference voltage in advance. Then
The circuit error of the A / D converter is detected and the error is automatically corrected.

【0014】[0014]

【0015】[0015]

【0016】[0016]

【0017】[0017]

【発明の実施の形態】以下、図面に基づいて本発明に係
わる実施例について説明する。 実施の形態1.図1は、本発明に係わるA/D変換回路
を示したブロック図である。従来技術の項目にて説明し
た図14と図1の違いは、例えばユーザからのスイッチ
操作等に伴うテスト指令S1をMPU4に入力すること
により、MPU4はその時A/D変換部1により変換さ
れた生ディジタル値S3を基準にデータテーブルを計算
し、メモリ3にデータテーブルを格納するようにした
点。また通常(テスト指令時以外)のA/D変換時は生
ディジル値S3とメモリ3内に格納されたデータテーブ
ルとを比較回路2により比較し、ディジタル値S4を出
力する点である。
BEST MODE FOR CARRYING OUT THE INVENTION Embodiments of the present invention will be described below with reference to the drawings. Embodiment 1. FIG. 1 is a block diagram showing an A / D conversion circuit according to the present invention. The difference between FIG. 14 and FIG. 1 described in the item of the prior art is that the MPU 4 is converted by the A / D conversion unit 1 at that time by inputting a test command S1 associated with a switch operation from the user to the MPU 4, for example. The data table is calculated based on the raw digital value S3, and the data table is stored in the memory 3. In addition, during normal A / D conversion (other than when a test command is issued), the raw digital value S3 is compared with the data table stored in the memory 3 by the comparison circuit 2, and the digital value S4 is output.

【0018】図において、1はアナログ信号S2を生デ
ィジタル値S3に変換するA/D変換部、2はA/D変
換部1により変換された生ディジタル値S3とメモリ3
に格納されたデータテーブルの内容を比較し、一致した
アドレスをディジタル値S4として出力する比較回路、
3はデータテーブルが格納されたメモリであり、不揮発
性メモリにより構成される。4はテスト指令S1が入力
された時の生ディジタル値S3を基にデータテーブルの
作成を行なう制御手段に相当するMPUである。
In the figure, 1 is an A / D converter for converting an analog signal S2 into a raw digital value S3, and 2 is a raw digital value S3 converted by the A / D converter 1 and a memory 3.
A comparison circuit for comparing the contents of the data table stored in and outputting the coincident address as a digital value S4,
Reference numeral 3 denotes a memory in which a data table is stored, which is composed of a non-volatile memory. Reference numeral 4 is an MPU corresponding to a control means for creating a data table based on the raw digital value S3 when the test command S1 is input.

【0019】次に、メモリ3に格納されるデータテーブ
ルについて、図2のデータテーブルの概略図を用いて説
明する。データテーブルにA/D変換値(生ディジタル
値S3)を格納する方法として、不揮発性メモリ3のア
ドレスnに対してディジタル値nに相当する生ディジタ
ル値を格納している。つまり、生ディジタル値とデータ
テーブルのA/D変換値を比較した際に、一致するアド
レスをそのままディジタル値S4として出力することが
できるように格納形式を定めている。
Next, the data table stored in the memory 3 will be described with reference to the schematic view of the data table in FIG. As a method of storing the A / D converted value (raw digital value S3) in the data table, a raw digital value corresponding to the digital value n is stored for the address n of the nonvolatile memory 3. That is, when the raw digital value and the A / D converted value of the data table are compared, the storage format is determined so that the matching address can be output as it is as the digital value S4.

【0020】データテーブルは、テスト指令S1がMP
U4に入力された時、その時A/D変換部1に入力され
たアナログ信号S2に対する生ディジタル値S3を基準
A/D変換値とし、この基準A/D変換値をもとにMP
U4により作成される。ここで、基準A/D変換値は、
図15に示すDoffsetとDgainと同様に、テスト指令S
1がMPU4に入力されている際に、入力されたアナロ
グ信号S2が基準アナログ信号のオフセット値(Voffs
et)或いはゲイン値(Vgain)かを示すスイッチにより
区別され、それぞれのオフセット値(Voffset)及びゲ
イン値(Vgain)がA/D変換部100により変換され
た生ディジタル値(Doffset)、生ディジタル値(Dga
in)を有している。なお、データテーブル格納用メモリ
として不揮発性メモリを使用するのは回路及び装置の電
源ON/OFF時に毎回テスト指令S1に基づく基準A
/D変換値の入力を行ない、MPU4によりデータテー
ブルの作成を避けるためである。ただし、電源ON/O
FF時に毎回テスト指令S1に基づく基準A/D変換値
の入力実行を行ないMPU4によるデータテーブルを作
成するなら、データテーブル格納用メモリは揮発性メモ
リでよい。また、基準A/D変換値格納用の不揮発性メ
モリをデータデーブル格納用メモリとは別に持ち、電源
ON/OFF時には該不揮発性メモリに格納された基準
A/D変換値をもとにMPU4によりデータテーブルを
作成することにより、電源ON/OFF時に毎回テスト
指令S1に基づく基準A/D変換値の入力実行を避ける
ことができるので、データテーブル格納用メモリを揮発
性メモリにすることもできる。また、データテーブル格
納用メモリに不揮発性メモリを使用した場合において
は、電源ON/OFF時に毎回基準A/D変換値を基に
MPU4によるデータテーブルの作成を行なう必要がな
いため、基準A/D変換値格納用不揮発性メモリを省く
ことができる。
In the data table, the test command S1 is MP
When input to U4, the raw digital value S3 corresponding to the analog signal S2 input to the A / D converter 1 at that time is used as a reference A / D conversion value, and MP is calculated based on this reference A / D conversion value.
Created by U4. Here, the reference A / D conversion value is
Similar to Doffset and Dgain shown in FIG. 15, the test command S
When 1 is input to the MPU 4, the input analog signal S2 is the offset value (Voffs) of the reference analog signal.
et) or a gain value (Vgain), and the offset value (Voffset) and the gain value (Vgain) are converted by the A / D converter 100 to obtain a raw digital value (Doffset) and a raw digital value. (Dga
in). In addition, the non-volatile memory is used as the memory for storing the data table based on the test A based on the test command S1 every time the power of the circuit and the device is turned on / off.
This is because the / D conversion value is input and the MPU 4 does not create a data table. However, power ON / O
The volatile memory may be used as the data table storage memory if the reference A / D conversion value is input and executed based on the test command S1 every time the FF is performed and the data table is created by the MPU 4. In addition, a nonvolatile memory for storing the reference A / D conversion value is provided separately from the memory for storing the data table, and when the power is turned on / off, the MPU 4 uses the reference A / D conversion value stored in the nonvolatile memory. By creating the data table, it is possible to avoid the input execution of the reference A / D conversion value based on the test command S1 every time the power is turned on / off, and therefore the data table storage memory can be a volatile memory. When a non-volatile memory is used as the data table storage memory, the MPU 4 does not need to create a data table based on the reference A / D conversion value every time the power is turned on / off. The non-volatile memory for storing the converted value can be omitted.

【0021】データデーブルの算出式は、ADをデータ
テーブルのアドレスとするとAD番地に格納するデータ
(Din)は、 Din={(Dgain−Doffset)/分解能}×AD+Doffset (式3) (但し、アドレスは0番地から始まるとする。)により
導くことができる。MPU4は、テスト指令S1入力時
に分解能数分の計算を実行しデータテーブルをメモリ3
に格納する。ここで言う分解能とは、A/D変換回路に
有するディジタル値のビット数に相当し、(Dgain−D
offset)間を分割する数のことである。なお、電源ON
/OFF時に分解能数分の計算をしてもよいことは言う
までもない。
In the formula for calculating the data table, assuming that AD is the address of the data table, the data (Din) stored in the AD address is: Din = {(Dgain-Doffset) / resolution} * AD + Doffset (Formula 3) Will start from address 0.). When the test command S1 is input, the MPU 4 executes calculations for the number of resolutions and stores the data table in the memory 3
To store. The resolution referred to here corresponds to the number of bits of a digital value included in the A / D conversion circuit, and is (Dgain-D
offset) is the number of divisions between. In addition, power supply ON
It goes without saying that the calculation for the number of resolutions may be performed when / OFF.

【0022】次に、比較回路2について説明する。比較
回路2は、生ディジタル値S3とデータテーブルの内容
を比較し、一致したメモリのアドレスをディジタル値S
4として出力する。比較方式は二分岐比較方式を用いる
ことにより、zビットのディジタル分解能の一致アドレ
スを見つける回数は z+1 (回) 行なうことによりディジタル値を出力することができ
る。比較回路をハードウェアにて構成した場合、一般に
一回の比較に要する時間は約100nSである。したが
って、12ビットのディジタル分解能の一致アドレスを
見つける時間は 13(回)×約100(nS/回)=約1.3(μS) となり、MPUの性能に依存せず高速にスケーリング処
理を行なう。
Next, the comparison circuit 2 will be described. The comparator circuit 2 compares the raw digital value S3 with the contents of the data table, and determines the matched memory address as the digital value S.
Output as 4. By using a two-branch comparison method as a comparison method, a digital value can be output by performing z + 1 (times) times for finding a matching address having a digital resolution of z bits. When the comparison circuit is configured by hardware, generally, the time required for one comparison is about 100 nS. Therefore, the time required to find a coincident address with a 12-bit digital resolution is 13 (times) × about 100 (nS / times) = about 1.3 (μS), and the scaling processing is performed at high speed without depending on the performance of the MPU.

【0023】本実施の形態によれば、テスト信号S1入
力時のテストモード時に、MPU4が予めデータテーブ
ルに対して、生ディジタル値S3(Dgain、Doffset)
を元にA/D変換値を演算し格納しているので、テスト
モード以外の通常時では、A/D変換部1より出力され
る生ディジタル値S3と、データテーブルに格納されて
いるA/D変換値の比較のみを行い、一致したアドレス
をディジタル値S4として出力するので、MPU4に負
荷をかけることなく、高速にスケーリング処理を行うこ
とができる。ここで、データテーブルに格納されている
A/D変換値と生ディジタル値を比較することにより、
その一致したデータテーブルのアドレスがディジタル値
として出力されることにより、ハードウェア的に処理を
行うことができ、従来のごとく、MPUの性能にもよら
ず、より高速に処理でき、アナログ信号を入力してから
ディジタル値を出力するまでの応答性が向上するととも
に、高機能のMPUを用いずとも高速にA/D変換を行
うことができる。
According to the present embodiment, in the test mode when the test signal S1 is input, the MPU 4 previously stores the raw digital value S3 (Dgain, Doffset) in the data table.
Since the A / D converted value is calculated and stored based on, the raw digital value S3 output from the A / D conversion unit 1 and the A / D stored in the data table are stored in the normal mode other than the test mode. Since only the D conversion values are compared and the coincident address is output as the digital value S4, the scaling process can be performed at high speed without imposing a load on the MPU 4. Here, by comparing the A / D converted value stored in the data table with the raw digital value,
By outputting the address of the matched data table as a digital value, the processing can be performed by hardware, and as in the conventional case, the processing can be performed at higher speed regardless of the performance of the MPU, and the analog signal can be input. The responsiveness from the output of the digital value to the output of the digital value is improved, and the A / D conversion can be performed at high speed without using a high-performance MPU.

【0024】実施の形態2.本実施の形態では、実施の
形態1に加え、装置及び回路内の部品のバラツキ(初期
誤差)を補正する初期誤差補正機能と、周囲温度の変化
による装置及び回路の誤差を補正する温度ドリフト補正
機能とを加えたものである。図3は、本発明の実施の形
態2の構成を示すブロック図である。誤差を補正するた
めに、装置及び回路の仕様より十分に精度の良い基準電
圧1及び2を備えている。
Embodiment 2. In the present embodiment, in addition to the first embodiment, an initial error correction function that corrects variations (initial errors) of components in the device and the circuit, and temperature drift correction that corrects errors of the device and the circuit due to changes in ambient temperature. It is a combination of functions and. FIG. 3 is a block diagram showing the configuration of the second embodiment of the present invention. In order to correct the error, the reference voltages 1 and 2 which are sufficiently more accurate than the specifications of the device and the circuit are provided.

【0025】まず、初期誤差補正機能について説明す
る。基準電圧1及び2は予め決められた電圧であり、ア
ナログ入力信号範囲の下限または下限に近い電圧(基準
電圧1とする)と上限または上限に近い電圧(基準電圧
2とする)を備えている。この基準電圧1及び2の電圧
は予め決められており、A/D変換回路の動作がプログ
ラミングされたファームウェアに、基準電圧1及び2に
相当するA/D変換値の理論値が組み込まれている。
First, the initial error correction function will be described. The reference voltages 1 and 2 are predetermined voltages, and are provided with a voltage lower than or near the lower limit of the analog input signal range (referred to as reference voltage 1) and a voltage closer to the upper limit or upper limit (referred to as reference voltage 2). . The voltages of the reference voltages 1 and 2 are predetermined, and the theoretical values of the A / D conversion values corresponding to the reference voltages 1 and 2 are incorporated in the firmware in which the operation of the A / D conversion circuit is programmed. .

【0026】MPU4は電源ON時にSW1を切替え、
基準電圧1及び2のA/D変換値を取込み、ファームウ
ェアに予め組み込まれた値と電源ON時の基準電圧1及
び2のA/D変換値の差(誤差)を求め、比較回路2よ
り出力されたディジタル値S4に対してこの誤差分の補
正をかけて補正ディジタル信号を出力するものである。
なお、比較回路2において、テスト指令が入力されない
通常動作時に、MPU4が予めデータテーブルに対して
演算格納しているA/D変換値と、A/D変換部1より
出力される生ディジタル値S3との比較を行い、一致し
たアドレスをディジタル値S4として出力する点は、上
述した実施の形態1と同様である。初期誤差の要因は、
A/D変換部の部品のバラツキである。本例では、アナ
ログ入力信号と基準電圧1及び2が同一A/D変換部1
により変換されるため、上記の補正によりアナログ信号
入力時の初期誤差を補正することが可能になる。
The MPU4 switches SW1 when the power is turned on,
The A / D converted values of the reference voltages 1 and 2 are taken in, the difference (error) between the value pre-installed in the firmware and the A / D converted value of the reference voltages 1 and 2 when the power is turned on is calculated, and output from the comparison circuit 2. The corrected digital signal S4 is corrected by this error and a corrected digital signal is output.
In the comparison circuit 2, during normal operation in which no test command is input, the A / D conversion value that the MPU 4 has previously calculated and stored in the data table and the raw digital value S3 output from the A / D conversion unit 1 Is the same as in the above-described first embodiment in that the matched address is output as the digital value S4. The factor of the initial error is
This is the variation in the components of the A / D conversion unit. In this example, the analog input signal and the reference voltages 1 and 2 are the same A / D converter 1
Therefore, it is possible to correct the initial error when the analog signal is input by the above correction.

【0027】図4に示されるA/D変換特性の誤差を示
す図を用いて初期誤差の補正方法を説明する。A/D変
換部の部品のバラツキにより、A/D変換特性は図4の
ように変化する。この時、 基準電圧1のA/D変換値: D1→D1’ 基準電圧2のA/D変換値: D2→D2’ へと変化する。
A method of correcting the initial error will be described with reference to the diagram showing the error of the A / D conversion characteristic shown in FIG. The A / D conversion characteristics change as shown in FIG. 4 due to variations in the components of the A / D conversion unit. At this time, the A / D conversion value of the reference voltage 1 changes to D1 → D1 ′ and the A / D conversion value of the reference voltage 2 changes to D2 → D2 ′.

【0028】補正は、以下の計算によりデータテーブル
を作り直すことにより実現される。 X=(D1’)−(D1) Y=(D2’− D1’)/( D2−D1) とすると、データテーブルのAD番地に格納するデータ
(Din)は(式3)を変形した以下の式により求まる。 Din=[{(Dgain−Doffset)/分解能}/Y]×AD+
(Doffset−X)
The correction is realized by recreating the data table by the following calculation. If X = (D1 ′) − (D1) Y = (D2′−D1 ′) / (D2-D1), the data (Din) stored in the AD address of the data table is obtained by modifying (Equation 3) below. It is obtained by the formula. Din = [{(Dgain−Doffset) / resolution} / Y] × AD +
(Doffset-X)

【0029】なお、初期誤差は部品が持っている特性の
バラツキなため、初期誤差の補正処理は電源ON時に一
回行ない、初期誤差を考慮したデータテーブルを作成
し、該データテーブルに基づき上述した実施の形態1の
動作を行なう。
Since the initial error is a variation in the characteristics of the parts, the correction process of the initial error is performed once when the power is turned on, a data table is created in consideration of the initial error, and the above-mentioned processing is performed based on the data table. The operation of the first embodiment is performed.

【0030】次に、温度ドリフト補正機能について説明
する。A/D変換部1は周囲温度の変化による影響を受
けやすい。そこで、本実施の形態では、アナログ入力信
号範囲の下限または下限に近い電圧(基準電圧1とす
る)と上限または上限に近い電圧(基準電圧2とする)
を備えており、MPU4がSW1を基準電圧1及び2に
切換えることによりA/D変換回路のファームウェアに
組み込まれている基準電圧1及び2に相当するA/D変
換値からの変化量を求める。
Next, the temperature drift correction function will be described. The A / D converter 1 is easily affected by changes in ambient temperature. Therefore, in the present embodiment, the lower limit of the analog input signal range or a voltage close to the lower limit (reference voltage 1) and the upper limit or a voltage close to the upper limit (reference voltage 2).
The MPU 4 switches SW1 to the reference voltages 1 and 2 to obtain the amount of change from the A / D conversion values corresponding to the reference voltages 1 and 2 incorporated in the firmware of the A / D conversion circuit.

【0031】データテーブルは初期誤差補正機能により
作成されており、上記変化量の補正をかけることによ
り、周囲温度の変化による誤差(温度ドリフト誤差)を
補正することが可能となる。
The data table is created by the initial error correction function, and by correcting the amount of change described above, it is possible to correct an error (temperature drift error) due to a change in ambient temperature.

【0032】図5に示されるA/D変換特性の誤差を示
す図を用いて温度ドリフト誤差の補正方法を説明する。
周囲温度の変化により、A/D変換特性は図5のように
変化する。この時、 基準電圧1のA/D変換値: D1→D1’ 基準電圧2のA/D変換値: D2→D2’ へと変化する。
A method of correcting the temperature drift error will be described with reference to the diagram showing the error of the A / D conversion characteristic shown in FIG.
The A / D conversion characteristic changes as shown in FIG. 5 due to the change in ambient temperature. At this time, the A / D conversion value of the reference voltage 1 changes to D1 → D1 ′ and the A / D conversion value of the reference voltage 2 changes to D2 → D2 ′.

【0033】補正は (基準電圧1のA/D変換値の変化分)=(D1’)−
(D1) を求め、A’をAに戻し、次に (傾きの変化)=(D2’−D1’)/(D2−D1) を求め、B’をBに戻す計算を行う。これを図で表すと
図6のようになる。
The correction is (change of A / D conversion value of reference voltage 1) = (D1 ')-
(D1) is calculated, A'is returned to A, then (change in inclination) = (D2'-D1 ') / (D2-D1) is calculated, and B'is returned to B. This is shown in FIG. 6 as a diagram.

【0034】具体的にはMPU4が以下の〜の処理
を実行する。 C=(A/D変換値)−{(D1’)−(D1)}を
計算 “C”と一致する“データテーブルのアドレスA
D”を検索 D=AD/{(D2’−D1’)/(D2−D1)}
を計算 Dを補正ディジタル値として出力 MPU4がこの計算を実行することにより周囲温度の変
化による誤差を補正する。
Specifically, the MPU 4 executes the following processes (1) to (3). C = (A / D conversion value)-{(D1 ')-(D1)} is calculated. "Data table address A that matches" C "
Search for D "D = AD / {(D2'-D1 ') / (D2-D1)}
The output MPU 4 corrects an error due to a change in ambient temperature by using D as a correction digital value.

【0035】本実施の形態によれば、電源ON時に部品
が有している特性のバラツキのための初期誤差補正を行
ない、データテーブルを修正すると共に、データテーブ
ルから出力されたディジタル値を周囲温度変化による誤
差を補正すべくMPUが演算するので、上述した実施の
形態1の効果に加え、精度の良いA/D変換を行なうこ
とができる。
According to the present embodiment, when the power is turned on, the initial error correction for the characteristic variation of the parts is performed, the data table is corrected, and the digital value output from the data table is set to the ambient temperature. Since the MPU calculates to correct the error due to the change, in addition to the effect of the first embodiment described above, accurate A / D conversion can be performed.

【0036】実施の形態3.図7は、本実施の形態に係
わるD/A変換装置のブロック図である。図において、
6は例えばユーザによるスイッチ入力等によるテスト指
令S6を入力することにより、D/A変換部7に対して
オフセットディジタル値及びゲインディジタル値をテス
トディジタル値S7として出力するMPU、7はテスト
指令S6が入力されたテストモード時はテストディジタ
ル値S7に基づきアナログ信号を生成し、テスト指令S
6が入力されない通常モード時はディジタル変換値に基
づきアナログ信号を生成するD/A変換部、8はデータ
テーブルが格納された不揮発性メモリである。
Embodiment 3. FIG. 7 is a block diagram of the D / A conversion device according to the present embodiment. In the figure,
6 is an MPU that outputs a digital offset value and a digital gain value as a test digital value S7 to the D / A converter 7, for example, by inputting a test command S6 by a switch input by the user. In the input test mode, an analog signal is generated based on the test digital value S7, and the test command S
In the normal mode where 6 is not input, a D / A converter that generates an analog signal based on a digital conversion value, and 8 is a non-volatile memory in which a data table is stored.

【0037】ここで、通常D/A変換特性はオフセット
/ゲイン調整をする必要があり、この調整はテスト指令
S6を入力することにより以下のように実行される。テ
スト指令S6が入力されると、D/A変換部7へはMP
U6から出力されるテストディジタル値S7が入力さ
れ、このテストディジタル値S7は、テスト指令S6と
同様にユーザによるスイッチ等の調整によりMPU6に
入力されるUP/DOWN指令により増減され、それに
よりD/A変換部より出力されるアナログ信号も増減す
る。
Here, it is usually necessary to perform offset / gain adjustment for the D / A conversion characteristic, and this adjustment is executed as follows by inputting the test command S6. When the test command S6 is input, the D / A converter 7 receives an MP
The test digital value S7 output from U6 is input, and this test digital value S7 is increased / decreased by the UP / DOWN command input to the MPU 6 by the adjustment of the switch and the like by the user similarly to the test command S6, whereby D / The analog signal output from the A converter also increases or decreases.

【0038】ここで、図8に示すオフセットディジタル
値の時に基準電圧V1を出力するオフセット調整と、ゲ
インディジタル値の時に基準電圧V2を出力するゲイン
調整を行なうべく、テスト指令S6が入力された際に、
予め決められた固定値のオフセットディジタル値入力時
に基づき、D/A変換部7より基準電圧V1を出力する
ように、MPU6に入力されるUP/DOWN指令に基
づきテストディジタル値S7としてのに基準ディジタル
変換値D1を増減させる。また、テスト指令S6が入力
された際に、予め決められた固定値のゲインディジタル
値入力時に基づき、D/A変換部7より基準電圧V2を
出力するように、MPU6に入力されるUP/DOWN
指令に基づきテストディジタル値S7としてのに基準デ
ィジタル変換値D2を増減させる。そして、基準ディジ
タル変換値D1及びD2はテスト指令S6完了時、不揮
発性メモリ8に格納される。これにより、電源ON/O
FF時に毎回オフセット/ゲイン調整を行う必要がなく
なり、電源ON時に不揮発性メモリに格納された基準デ
ィジタル変換値D1及びD2をもとにデータテーブルを
作成することができる。
Here, when the test command S6 is input to perform the offset adjustment for outputting the reference voltage V1 when the offset digital value is shown in FIG. 8 and the gain adjustment for outputting the reference voltage V2 when the gain digital value is shown. To
Based on the input of a predetermined fixed offset digital value, the D / A converter 7 outputs the reference voltage V1. Based on the UP / DOWN command input to the MPU 6, the reference digital value S7 is used as the test digital value S7. Increase or decrease the conversion value D1. Further, when the test command S6 is input, the D / A converter 7 outputs the reference voltage V2 based on the input of a predetermined fixed gain digital value, so that the UP / DOWN input to the MPU 6 is input.
Based on the command, the reference digital conversion value D2 is increased or decreased as the test digital value S7. Then, the reference digital conversion values D1 and D2 are stored in the non-volatile memory 8 when the test command S6 is completed. This turns the power on / O
It is not necessary to perform the offset / gain adjustment every time the FF is performed, and the data table can be created based on the reference digital conversion values D1 and D2 stored in the nonvolatile memory when the power is turned on.

【0039】このようにして、D1とD2を決定するこ
とによりディジタル値Aに相当するディジタル変換値D
aは Da=[(D2−D1) /{(ゲインディジタル値)−(オフセットディジタル値)}] ×{(A−オフセットディジタル値)}+D1 (式4) により導くことができる。MPU6は、分解能数分の計
算を実行し、導き出されたディジタル値Aに相当するデ
ィジタル変換値Daをデータテーブルとして、不揮発性
メモリ8に格納する。ここで、不揮発性メモリ8に格納
されるデータテーブルの構成は、メモリの「アドレス」
=「ディジタル値」、「データ」=「ディジタル値に相
当するディジタル変換値」となっている。例えば、ディ
ジタル値100の時のディジタル変換値が(式4)によ
り2400となった場合、メモリの100番地に240
0が格納されることになる。
By thus determining D1 and D2, the digital conversion value D corresponding to the digital value A is obtained.
a can be derived by Da = [(D2-D1) / {(gain digital value)-(offset digital value)}] * {(A-offset digital value)} + D1 (Equation 4). The MPU 6 executes calculation for the number of resolutions and stores the digital conversion value Da corresponding to the derived digital value A in the non-volatile memory 8 as a data table. Here, the configuration of the data table stored in the nonvolatile memory 8 is the “address” of the memory.
= “Digital value”, “data” = “digital conversion value corresponding to digital value”. For example, when the digital conversion value when the digital value is 100 is 2400 according to (Equation 4), 240 is stored in the 100th address of the memory.
0 will be stored.

【0040】従来技術の項目にて説明した図16と図7
の違いは、基準ディジタル変換値D1及びD2を基にM
PU6は(式4)によりディジタル値Aに相当するディ
ジタル変換値Daを求め、図9に示すデータテーブルを
メモリに作成しておき、D/A変換すべきディジタル値
が入力された際に、該ディジタル値をメモリのアドレス
としてデータテーブルにアクセスし、ディジタル値に相
当するアドレスに格納されているディジタル変換値をD
/A変換部に送出することによりD/A変換毎にディジ
タル変換値をMPU6が計算する必要がなくなった点で
ある。
16 and 7 described in the section of the prior art.
The difference is that M is based on the reference digital conversion values D1 and D2.
The PU 6 obtains the digital converted value Da corresponding to the digital value A by (Equation 4), creates the data table shown in FIG. 9 in the memory, and when the digital value to be D / A converted is input, The data table is accessed using the digital value as the memory address, and the digital conversion value stored at the address corresponding to the digital value is D
The point is that the MPU 6 does not need to calculate the digital conversion value for each D / A conversion by sending it to the / A conversion unit.

【0041】テスト指令時以外の通常D/A変換は、M
PU6に入力されたディジタル値Aにもとづき、MPU
6が不揮発性メモリ8のデータテーブルにアクセスし、
図10及び11に示すように、ディジタル値Aに相当す
るアドレスA番地リードを実行し、該アドレスに格納さ
れているデータすなわちディジタル変換値DaをD/A
変換部7に出力する。そして、D/A変換部7がこのと
きのメモリの出力データを取込みD/A変換することに
よりアナログ信号が出力される。つまり、メモリのリー
ドと同一操作を実行することにより、データテーブルの
アドレスA番地に格納されているディジタル変換値Da
を出力し、MPU6のディジタル変換値Daを求めるた
めの演算を省くことができる。
Normal D / A conversion other than when a test command is issued is M
Based on the digital value A input to PU6, MPU
6 accesses the data table of the non-volatile memory 8,
As shown in FIGS. 10 and 11, the address A corresponding to the digital value A is read, and the data stored at the address, that is, the digital conversion value Da is D / A.
Output to the conversion unit 7. Then, the D / A conversion unit 7 takes in the output data of the memory at this time and performs D / A conversion, thereby outputting an analog signal. That is, by performing the same operation as the read of the memory, the digital conversion value Da stored in the address A of the data table is stored.
Can be output and the calculation for obtaining the digital conversion value Da of the MPU 6 can be omitted.

【0042】本実施の形態によれば、ディジタル値Aに
相当するアナログ出力を出力する場合、MPUがD/A
変換毎に(式4)の計算を実行する必要がなく、メモリ
のリードと同一操作を実行するのみでディジタル変換値
を求めることができる。すなわち、MPUに負荷をかけ
ることなく、高速に処理を行うことができる。一般的
に、メモリアクセスタイムは数10nSであり、この時
間でD/A変換ができMPUの性能に依存しない。
According to the present embodiment, when the analog output corresponding to the digital value A is output, the MPU
It is not necessary to perform the calculation of (Equation 4) for each conversion, and the digital conversion value can be obtained only by performing the same operation as the reading of the memory. That is, the processing can be performed at high speed without imposing a load on the MPU. In general, the memory access time is several tens of nanoseconds, and D / A conversion can be performed in this time, which does not depend on the performance of the MPU.

【0043】実施の形態4.本実施の形態4では、実施
の形態2で説明した部品のバラツキ、周囲温度変化の誤
差影響を補正する誤差補正機能付A/D変換回路を設
け、該誤差補正機能付A/D変換回路からの誤差補正さ
れた補正ディジタル信号に基づき、D/A変換回路にお
ける部品のバラツキによる初期誤差及び周囲温度の変動
の影響による誤差を補正するものである。
Fourth Embodiment In the present fourth embodiment, an A / D conversion circuit with an error correction function for correcting the variation of the parts described in the second embodiment and the error influence of the ambient temperature change is provided, and the A / D conversion circuit with the error correction function is provided. On the basis of the error-corrected corrected digital signal of (1), the initial error due to the variation of parts in the D / A conversion circuit and the error due to the influence of the fluctuation of the ambient temperature are corrected.

【0044】図12は、本発明の構成を示すブロック図
である。図において、8は該誤差補正機能付A/D変換
回路、9は入力されたディジタル信号をアナログ信号に
変換するD/A変換回路、10はD/A変換部の誤差の
補正計算を実行するMPUである。
FIG. 12 is a block diagram showing the configuration of the present invention. In the figure, 8 is an A / D conversion circuit with an error correction function, 9 is a D / A conversion circuit for converting an input digital signal into an analog signal, and 10 is a correction calculation of an error of a D / A conversion unit. It is MPU.

【0045】一般に、D/A変換回路9は、部品のバラ
ツキによる初期誤差及び周囲温度の変動の影響による誤
差が発生する。そこで、実施の形態3で説明したD/A
変換回路9から出力されるアナログ信号を、スイッチS
W2を切り換えることにより、実施の形態2で説明した
誤差補正機能付A/D変換回路8に入力し、誤差補正が
された補正ディジタル信号を取り出す。なお、実施の形
態2で説明した如く、A/D変換回路に対しても部品の
バラツキによる初期誤差及び周囲温度の変化に伴う誤差
が発生するが、補正がかけられており、誤差補正がされ
た補正ディジタル信号が出力される。
Generally, in the D / A conversion circuit 9, an initial error due to variations in parts and an error due to the influence of fluctuations in ambient temperature occur. Therefore, the D / A described in the third embodiment
The analog signal output from the conversion circuit 9 is switched to the switch S.
By switching W2, it is input to the A / D conversion circuit 8 with the error correction function described in the second embodiment, and the error-corrected corrected digital signal is taken out. As described in the second embodiment, the A / D conversion circuit also has an initial error due to component variations and an error due to a change in ambient temperature, but it is corrected, and the error is corrected. The corrected digital signal is output.

【0046】この誤差補正機能付A/D変換回路8から
出力された補正ディジタル信号と、D/A変換回路9に
て変換する前のディジタル値(D/A変換回路にD/A
変換すべく入力されたディジタル値)とを比較すること
により、その変動分がD/A変換回路9の誤差となる。
The corrected digital signal output from the A / D conversion circuit 8 with the error correction function and the digital value before being converted by the D / A conversion circuit 9 (the D / A conversion circuit performs the D / A conversion).
By comparing it with the digital value input to be converted, the variation becomes an error of the D / A conversion circuit 9.

【0047】ディジタル値SがD/A変換回路9に入力
された場合、D/A変換回路内部の誤差によりディジタ
ル値Sはディジタル値S1に変化して、D/A変換が行
なわれてしまう。ここで、仮にディジタル値S1をD/
A変換したアナログ値をT1とすると、このアナログ値
T1が誤差補正機能付A/D変換回路8によりA/D変
換される際には誤差が補正されるので、アナログ値T1
に対応したディジタル値S1が誤差補正機能付A/D変
換回路8から出力される。すなわち、D/A変換回路9
に入力された本来のディジタル値Sと、誤差補正機能付
A/D変換回路8により変換されたディジタル値S1と
を比較することにより、D/A変換回路9で発生した誤
差を検出することができる。
When the digital value S is input to the D / A conversion circuit 9, the digital value S changes to the digital value S1 due to an error inside the D / A conversion circuit, and D / A conversion is performed. Here, if the digital value S1 is D /
Assuming that the A-converted analog value is T1, the error is corrected when the analog value T1 is A / D converted by the A / D conversion circuit 8 with an error correction function.
A digital value S1 corresponding to is output from the A / D conversion circuit 8 with an error correction function. That is, the D / A conversion circuit 9
The error generated in the D / A conversion circuit 9 can be detected by comparing the original digital value S input to the A and the digital value S1 converted by the A / D conversion circuit 8 with an error correction function. it can.

【0048】これをもとに、D/A変換回路9に入力す
るディジタル値に対して補正をかけることによりD/A
変換回路部9の誤差も取り除くことができ、全体として
誤差の無いD/A変換回路9を実現する。
Based on this, the digital value input to the D / A conversion circuit 9 is corrected to obtain the D / A
The error of the conversion circuit unit 9 can be removed, and the D / A conversion circuit 9 having no error can be realized as a whole.

【0049】次に、D/A変換回路9の誤差により、図
13に示されるようなA/D変換特性の誤差が発生した
場合を例にとり補正方法を説明する。D/A変換回路9
の部品のバラツキ及び周囲温度の変化により、誤差のな
いA/D変換回路で変換されたA/D変換特性は図13
のように変化する。
Next, the correction method will be described by taking as an example the case where an error of the D / A conversion circuit 9 causes an error of the A / D conversion characteristic as shown in FIG. D / A conversion circuit 9
13 shows the A / D conversion characteristics converted by the A / D conversion circuit with no error due to the variation of the parts and the change of the ambient temperature.
It changes like.

【0050】MPU10は誤差補正を以下のように行な
う。SW2を誤差補正機能付A/D変換回路側8へ切替
え、テストディジタル値としてD1とD2をMPU10
はD/A変換回路9に出力する。A/D変換回路8とD
/A変換回路9の分解能は同一にしておくことにより、
A/D変換回路8には誤差が補正されているため、D/
A変換回路9に誤差が無い場合A/D変換値はD1およ
びD2となる。D/A変換回路9の誤差がある場合は、
図13のようにA/D変換値が D1→D1' D2→D2' に変化する。MPU10はこの変化を基に、以下の計算
式によりディジタル値を補正ディジタル値に計算し直し
てD/A変換回路9に出力する。 (補正ディジタル値)={(ディジタル値)−(D1−
D1')}/{(D2'−D1')/(D2−D1)}+
D1 この補正ディジタル値をD/A変換回路9で上述した実
施の形態3の如くアナログ値に変換することにより誤差
のないアナログ出力を得ることができる。なお、スイッ
チSW2の切換えのタイミングは、部品のバラツキ等に
よる初期誤差を検出するために電源ON時に切換え補正
を行なうと共に、適宜、温度変化に応じて切換えればよ
い。
The MPU 10 performs error correction as follows. Switch SW2 to the A / D conversion circuit side 8 with error correction function, and set D1 and D2 as the test digital values to MPU10.
Output to the D / A conversion circuit 9. A / D conversion circuit 8 and D
By keeping the resolutions of the A / A conversion circuits 9 the same,
Since the error is corrected in the A / D conversion circuit 8, D /
When the A conversion circuit 9 has no error, the A / D conversion values are D1 and D2. If there is an error in the D / A conversion circuit 9,
As shown in FIG. 13, the A / D conversion value changes from D1 → D1 ′ D2 → D2 ′. Based on this change, the MPU 10 recalculates the digital value into a corrected digital value by the following calculation formula, and outputs it to the D / A conversion circuit 9. (Corrected digital value) = {(digital value)-(D1-
D1 ')} / {(D2'-D1') / (D2-D1)} +
D1 By converting this corrected digital value into an analog value by the D / A conversion circuit 9 as in the third embodiment, an analog output without error can be obtained. The timing of switching the switch SW2 may be properly corrected in accordance with a temperature change, as well as performing switching correction when the power is turned on in order to detect an initial error due to variations in parts.

【0051】[0051]

【発明の効果】本発明によれば、A/D変換のスケーリ
ング処理をMPUが実行する必要がなくなるため、MP
Uの性能に依存せずA/D変換のスケーリング処理の高
速化を実現できる。
According to the present invention, since it is not necessary for the MPU to execute the scaling processing for A / D conversion, the MP
It is possible to speed up the scaling process of A / D conversion without depending on the performance of U.

【0052】また、A/D変換の誤差補正を自動的に行
なうため、装置1台毎の誤差補正及び実使用環境(温
度)での誤差補正が不要となる。
Further, since the error correction of the A / D conversion is automatically performed, the error correction for each device and the error correction in the actual use environment (temperature) are unnecessary.

【0053】[0053]

【0054】[0054]

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

【図1】 本発明のA/D変換装置のA/D変換部の構
成を示す構成図である。
FIG. 1 is a configuration diagram showing a configuration of an A / D conversion unit of an A / D conversion device of the present invention.

【図2】 A/D変換装置のデータテーブルの内容を示
す図である。
FIG. 2 is a diagram showing the contents of a data table of an A / D conversion device.

【図3】 自動誤差補正A/D変換装置のA/D変換部
の構成を示す構成図である。
FIG. 3 is a configuration diagram showing a configuration of an A / D conversion unit of an automatic error correction A / D conversion device.

【図4】 A/D変換特性の初期誤差を示すグラフであ
る。
FIG. 4 is a graph showing an initial error of A / D conversion characteristics.

【図5】 A/D変換特性の誤差を示すグラフである。FIG. 5 is a graph showing an error in A / D conversion characteristics.

【図6】 A/D変換特性の誤差補正を示すグラフであ
る。
FIG. 6 is a graph showing error correction of A / D conversion characteristics.

【図7】 本発明のD/A変換装置のD/A変換部の構
成を示す構成図である。
FIG. 7 is a configuration diagram showing a configuration of a D / A conversion unit of the D / A conversion device of the present invention.

【図8】 D/A変換装置のデジタル値変換方法を示す
グラフである。
FIG. 8 is a graph showing a digital value conversion method of the D / A conversion device.

【図9】 D/A変換装置のデータテーブルの内容を示
す図である。
FIG. 9 is a diagram showing the contents of a data table of the D / A conversion device.

【図10】 D/A変換装置のデジタル値変換方法を示
す図である。
FIG. 10 is a diagram showing a digital value conversion method of a D / A conversion device.

【図11】 D/A変換装置のデジタル値変換タイミン
グ図である。
FIG. 11 is a digital value conversion timing chart of the D / A conversion device.

【図12】 自動誤差補正D/A変換装置を示した図で
ある。
FIG. 12 is a diagram showing an automatic error correction D / A conversion device.

【図13】 D/A変換特性の誤差補正を示すグラフで
ある。
FIG. 13 is a graph showing error correction of D / A conversion characteristics.

【図14】 従来のA/D変換装置のA/D変換部の構
成を示す構成図である。
FIG. 14 is a configuration diagram showing a configuration of an A / D conversion unit of a conventional A / D conversion device.

【図15】 A/D変換のスケーリングを示すグラフで
ある。
FIG. 15 is a graph showing scaling of A / D conversion.

【図16】 従来のD/A変換装置のD/A変換部の構
成を示す構成図である。
FIG. 16 is a configuration diagram showing a configuration of a D / A conversion unit of a conventional D / A conversion device.

【図17】 D/A変換のディジタル値補正を示すグラ
フである。
FIG. 17 is a graph showing digital value correction of D / A conversion.

【符号の説明】[Explanation of symbols]

1 A/D変換部、2 比較回路、3 データテーブ
ル、4 MPU、5 不揮発性メモリ、6 MPU、7
D/A変換部、8 データテーブル、9 不揮発性メ
モリ。
1 A / D converter, 2 comparison circuit, 3 data table, 4 MPU, 5 non-volatile memory, 6 MPU, 7
D / A converter, 8 data table, 9 non-volatile memory.

───────────────────────────────────────────────────── フロントページの続き (56)参考文献 特開 平8−330958(JP,A) 特開 平3−19428(JP,A) 特開 平6−204868(JP,A) 特開 平5−152953(JP,A) 特開 平11−98014(JP,A) 特開 平5−327499(JP,A) 実開 平1−149133(JP,U) (58)調査した分野(Int.Cl.7,DB名) H03M 1/00 - 1/88 ─────────────────────────────────────────────────── ─── Continuation of the front page (56) Reference JP-A-8-330958 (JP, A) JP-A-3-19428 (JP, A) JP-A-6-204868 (JP, A) JP-A-5- 152953 (JP, A) JP-A-11-98014 (JP, A) JP-A-5-327499 (JP, A) Actual Kaihei 1-149133 (JP, U) (58) Fields investigated (Int.Cl. 7 , DB name) H03M 1/00-1/88

Claims (3)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 入力されるアナログ信号を生ディジタル
値に変換するA/D変換部と、基準アナログ信号を上記
A/D変換部により変換された基準ディジタル値を用い
て、出力すべきディジタル値に対応したA/D変換値を
上記ディジタル値毎に予め算出する制御手段と、この制
御手段により算出されたA/D変換値を、アドレスがデ
ィジタル値に相当する形式で格納したデータテーブル
と、A/D変換部によりアナログ信号から変換された生
ディジタル信号と上記データテーブルにおけるA/D変
換値とを比較し、内容が一致したアドレスをディジタル
値として出力する比較回路と、を備えたことを特徴とし
たA/D変換回路。
1. A digital value to be output using an A / D conversion section for converting an input analog signal into a raw digital value and a reference digital value converted by the A / D conversion section for a reference analog signal. And a data table in which the A / D conversion value calculated by this control means is stored in a format corresponding to the digital value. And a comparator circuit for comparing the raw digital signal converted from the analog signal by the A / D converter and the A / D converted value in the data table and outputting the address having the matched contents as a digital value. A characteristic A / D conversion circuit.
【請求項2】 制御手段による算出は、テスト指令が入
力された際のアナログ信号を基準アナログ信号として変
換されたDgain及びDoffsetからなる基準ディジタル値
を用い、データテーブルのアドレスADに格納するA/
D変換値DinをDin={(Dgain−Doffset)/分解
能}×AD+Doffsetにより求めることを特徴とする請
求項1に記載のA/D変換回路。
2. The calculation by the control means uses a reference digital value composed of Dgain and Doffset converted from an analog signal when a test command is input as a reference analog signal, and stores it in an address AD of a data table.
The A / D conversion circuit according to claim 1, wherein the D conversion value Din is obtained by Din = {(Dgain-Doffset) / resolution} * AD + Doffset.
【請求項3】 基準電圧をA/D変換部に入力した際に
出力されるA/D変換値と、予め基準電圧に対応して出
力されるであろう理論A/D変換値とを比較し、上記A
/D変換部の回路誤差を検出し、誤差を自動補正するこ
とを特徴とした請求項1または2のいずれかに記載のA
/D変換回路。
3. The A / D conversion value output when the reference voltage is input to the A / D conversion unit is compared with the theoretical A / D conversion value that will be output corresponding to the reference voltage in advance. And above A
3. The A according to claim 1, wherein a circuit error of the D / D converter is detected and the error is automatically corrected.
/ D conversion circuit.
JP24439699A 1999-06-04 1999-08-31 A / D conversion circuit Expired - Fee Related JP3403127B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP24439699A JP3403127B2 (en) 1999-06-04 1999-08-31 A / D conversion circuit

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP11-157318 1999-06-04
JP15731899 1999-06-04
JP24439699A JP3403127B2 (en) 1999-06-04 1999-08-31 A / D conversion circuit

Publications (2)

Publication Number Publication Date
JP2001053608A JP2001053608A (en) 2001-02-23
JP3403127B2 true JP3403127B2 (en) 2003-05-06

Family

ID=26484812

Family Applications (1)

Application Number Title Priority Date Filing Date
JP24439699A Expired - Fee Related JP3403127B2 (en) 1999-06-04 1999-08-31 A / D conversion circuit

Country Status (1)

Country Link
JP (1) JP3403127B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8547256B2 (en) 2009-05-29 2013-10-01 Mitsubishi Electric Corporation Analog unit

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4682668B2 (en) 2005-03-30 2011-05-11 株式会社デンソー A / D converter and sensor device including A / D converter
JP2008084394A (en) * 2006-09-26 2008-04-10 Teac Corp A/d conversion circuit and optical disk device
JP4882961B2 (en) * 2007-11-02 2012-02-22 ブラザー工業株式会社 Power supply device and image forming apparatus
US7688240B2 (en) * 2008-05-02 2010-03-30 Analog Devices, Inc. Method and apparatus for calibrating an RDAC for end-to-end tolerance correction of output resistance
JP5295844B2 (en) * 2009-04-09 2013-09-18 オリンパス株式会社 A / D converter
WO2020255218A1 (en) * 2019-06-17 2020-12-24 三菱電機株式会社 Analog-to-digital conversion device, and control program for analog-to-digital conversion device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8547256B2 (en) 2009-05-29 2013-10-01 Mitsubishi Electric Corporation Analog unit
DE112009004833B4 (en) * 2009-05-29 2017-03-23 Mitsubishi Electric Corporation analog unit

Also Published As

Publication number Publication date
JP2001053608A (en) 2001-02-23

Similar Documents

Publication Publication Date Title
US10122375B2 (en) Time-based delay line analog-to-digital converter with variable resolution
JP2004274166A (en) A/d conversion circuit, temperature sensor circuit, integrated circuit and method of controlling temperature sensor circuit
JP2020018162A (en) Output current detection of dc/dc converter including external power stage
US6886120B2 (en) Memory control circuit
JP3403127B2 (en) A / D conversion circuit
JP5159951B2 (en) Analog unit
JP4897365B2 (en) regulator
JP3515747B2 (en) Digital-to-analog conversion circuit
JP4751343B2 (en) A / D converter
JP6500770B2 (en) Electronic control unit
JP2621058B2 (en) Digitally controlled temperature compensated crystal oscillator
JP4163570B2 (en) A / D converter
US6549149B2 (en) Method and device for detecting signals
TWI653835B (en) Step-by-step analog analog converter and its correction method
KR101175230B1 (en) Analog to digital converter
KR100446283B1 (en) Multi-stage programmable gain control amplifying apparatus including analog to digital converter and method for correcting gain error in response to the same, especially implementing pga and adc at the same time
US20220149853A1 (en) Analog-to-digital converter
JP5425288B2 (en) Analog unit
JPS63121320A (en) Da converter with error correcting circuit
JP2570982B2 (en) Phase detection circuit
JP2001308705A (en) Digital to analog converter and its conversion error reduction method
KR20230148000A (en) Error compensation device for temperature sensor
JP2005151520A (en) Da converter
JP2001069004A (en) Electronic equipment and method for correcting the electronic equipment
JP2008103813A (en) A/d converter

Legal Events

Date Code Title Description
FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20080229

Year of fee payment: 5

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090228

Year of fee payment: 6

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100228

Year of fee payment: 7

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100228

Year of fee payment: 7

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110228

Year of fee payment: 8

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120229

Year of fee payment: 9

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130228

Year of fee payment: 10

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130228

Year of fee payment: 10

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20140228

Year of fee payment: 11

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees