JPS6362415A - Digital-analog converter - Google Patents

Digital-analog converter

Info

Publication number
JPS6362415A
JPS6362415A JP20715586A JP20715586A JPS6362415A JP S6362415 A JPS6362415 A JP S6362415A JP 20715586 A JP20715586 A JP 20715586A JP 20715586 A JP20715586 A JP 20715586A JP S6362415 A JPS6362415 A JP S6362415A
Authority
JP
Japan
Prior art keywords
converter
error correction
correction value
value
gain
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.)
Pending
Application number
JP20715586A
Other languages
Japanese (ja)
Inventor
Shuntaro Hoshina
保科 俊太郎
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.)
Fuji Electric Co Ltd
Fuji Facom Corp
Original Assignee
Fuji Electric Co Ltd
Fuji Facom 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 Fuji Electric Co Ltd, Fuji Facom Corp filed Critical Fuji Electric Co Ltd
Priority to JP20715586A priority Critical patent/JPS6362415A/en
Publication of JPS6362415A publication Critical patent/JPS6362415A/en
Pending legal-status Critical Current

Links

Landscapes

  • Analogue/Digital Conversion (AREA)

Abstract

PURPOSE:To attain the division required for correction inexpensively by attaining the division required for correcting an error of the titled D/A converter automatically through the shift of a prescribed digit number in the binary number operation only. CONSTITUTION:New correction data X21 (=2N.X2/R2) are calculated in advance to various values of X2 and stored in a memory 3A storing the correction value of an offset error of the D/A converter 5, a gain error, and an offset error of a sample-and-hold circuit respectively. A multiprocessor MPU2 obtains the produce of data X21 and X and operates a division value D2.X by shifting the product (binary number) to the right by N-bit (N times).

Description

【発明の詳細な説明】[Detailed description of the invention] 【発明の属する技術分野】[Technical field to which the invention pertains]

本発明はデジタル信号をアナログ信号に変換するD/A
変換装置であって、特にその変換誤差をマイクロプロセ
ッサ(MPUとも略記する)を介し、安価で高速に自動
補正する機能を備えたD/A変換装置に関する。 なお以下各図において同一の符号は同一または相当部分
を示す。
The present invention is a D/A that converts digital signals into analog signals.
The present invention relates to a conversion device, and particularly to a D/A conversion device having a function of automatically correcting conversion errors at low cost and at high speed via a microprocessor (also abbreviated as MPU). Note that in the following figures, the same reference numerals indicate the same or corresponding parts.

【従来技術とその問題点】[Prior art and its problems]

D/A変換装置では、これを構成する主要素子としての
D/A変換器(DACとも略す)そのもののばらつきに
より第2図に示すようなオフセット誤差及びゲイン誤差
を持つ。即ち同図において、横軸は前記DACに与えら
れるデジタル入力(後述のデジタル人力4)、縦軸はこ
のDACから出力されるアナログ出力(後述の中間アナ
ログ出力6)を示す。同図上点線の直線特性は前記の誤
差の無い場合の特性を示しデジタル人力Oの場合にアナ
ログ出力は0であり、当該のDACの仕様から予め定ま
るデジタル人力R2のとき、後述のゲイン調整用基準電
源13の電圧(ゲイン調整基準電圧)VCを正しく出力
する。しかしながら現実のDACは実線の直線のような
特性を持つ場合が多く、この例ではオフセット誤差のた
めにデジタル人力Oのときアナログ出力は0にはならず
(前者がXlのとき後者がOであり)、またゲイン誤差
のため、この特性直線の横軸となす勾配、つまりデジタ
ル入力の変化分に対応するアナログ出力の変化分は、実
線特性の方が点線特性より大となっている。 このような誤差を補正するためには、オフセット調整お
よびゲイン調整が必要である。従来、この調整は可変抵
抗器を用いて手動により行われており、コスト高となる
ほか、装置の信頼性も低い(つまり運転中は温度変化や
劣化などによる特性の変化は考慮されず、初期の調整値
より出力値がずれてくる場合が多い)という問題点があ
る。 そこでこの問題点を解決するためのD/A変換装置とし
て本出願人の出願になる特願昭60−200917号「
D/A変換装置」があり、この装置は前記の補正をMP
Uを用いて自動的に行うものである。 第1図は前記出願のD/A変換装置および本発明装置の
1実施例についての1チヤンネル出力の場合の構成を示
すブロック回路図である。但し前記出願の装置と本発明
装置とではメモリの内容が異なるのみであり前者ではメ
モリ3を用いるものとする。 次に第1図を用いて前記出願のD/A変換装置における
本発明と関連する部分の内容を説明する。 第1図において、1はアナログ変換されるべきデジタル
データ(便宜上デジタル人力Xという)を入力するデジ
タル入力端子、2は各部の制御及び補正値等の演算を司
るMPU、3はD/A変換器(DAC)5とサンプル・
ホールド回路(S/H回路)7の誤差補正値を格納する
メモリである。 DAC5はMPU2から与えられるデジタルデータ(便
宜上中間デジタル入力という)4をアナログ電圧(便宜
上中間デジタル出力という)6に変換する。 S/H回路7はDAC5から与えられる中間アナログ出
力6をサンプリングしつつ、M P U 2から与えら
れるS/H制御信号16に基づいて、そのままアナログ
出力8として出力したり(この動作をサンプルモードと
いう)、所定時点の被サンプリング電圧を保持記憶(ホ
ールド)し、この保持電圧をホールドアナログ出力8H
として出力する(この動作をホールドモードという)。 9はマルチプレクサ(MPXとも略す)で、MPU2か
ら与えられるMPX制御信号15に基づいて、アナログ
出力端子18に、OV(接点■側)、あるいはS/H回
路7の出力信号(アナログ出力8またはホールドアナロ
グ出力8H)(接点■側)のいずれかを切換え出力する
。なおこのMPX9は後述の初期調整時、アナログ出力
端子18の出力電圧を正確にOvに維持したい場合に用
いられるものであり、必須のものではない。 10はコンパレータ(CPとも略す)で、DAC5の出
力電圧値(中間アナログ出力6)と、マルチプレクサ(
MPX)12の出力信号(MPX出力信号という)19
との大小関係を比較し、その比較結果としての比較出力
信号11をMPU2に与える。 MPX12はMPU2から与えられるMPX制御信号1
7に基づいて、S/H回路7が出力するホールドアナロ
グ出力8H(接点■)、ゲイン調整用基準電源13(接
点■、なおこの電圧には例えばIOVが用いられる。)
、オフセット調整用基準電源14(接点■、なおこの電
圧には例えばoVが用いられ、特別な電源14を用いる
代わりにグランド電位(OV)を用いることもできる。 )を1つづつ切換え、前記MPX出力信号19として出
力する。 なお図示していないが多チヤンネル出力のD/A変換装
置では、S/H回路7と同様なS/H回路がそれぞれチ
ャンネル別のアナログ出力端子を持ってそれぞれ並列に
DAC5の出力端子に接続され、これらのS/H回路は
MPU2からのそれぞれのS/H制御信号に基づき、サ
ンプリングしたDAC5の出力電圧をそれぞれ異なった
時点に保持して対応する出力端子に出力する。また新た
なマルチプレクサ(MPX)が、MPU2からの新たな
MPX制御信号に基づき、CPIOの一方の入力端子を
、前記の各S/H回路および調整用基準電源13.14
の各出力電圧の別に、前記の新たなMPXにおける各対
応する接点を介して切換えるように構成される。 次に第1図の動作手順を説明する。 〔1〕初期のオフセット調整及びゲイン調整:1)初期
調整中、外部出力(アナログ出力端子18からの出力信
号)をOvとする。即ち、初期のオフセット調整および
ゲイン調整を行う間、この例では外部へ悪影響を与えな
いようにOVを出力する。このためにMPX9のスイッ
チを接点■へ切換える。 ただし前述のように、初期調整中、外部出力を厳密に0
■に維持する必要がない場合には、MPX9を省略して
、S/H回路7の出力を直接アナログ出力端子18に与
えるようにしたのち、例えば中間デジタル人力4にOV
に相当するデジタルデータを与え、アナログ出力8をほ
ぼOVとした状態で、S/H回路7をホールドモードと
しく従って、このときほぼ0■のアナログ出力8は、同
じくほぼOVのホールドアナログ出力8Hに代わる。 )、以下の手順に入ってもよい。 2)DAC5のオフセット調整を行う。即ち、MPX1
2のスイッチを接点■に切換え、DAC5の出力電圧値
に(中間アナログ出力)6とオフセット調整用基準電源
14の出力電圧値とが等しくなるようなりAC5への中
間デジタル人力4(後述のデジタルデータXI)を求め
る。 この求め方の一例を述べると、MPU2はまずDAC5
へ、中間デジタル人力4として誤差補正用データ、例え
ば基準電源14の電圧値に相当するデジタルデータR1
を送り、DAC5の出力値(中間アナログ出力6)と、
MPX12からの比較電圧値(MPX出力信号19、こ
の場合基準電源14の電圧)との大小関係をCPIOに
比較させ、その結果をCPIOから比較出力信号11と
して受取る。 この比較により中間アナログ出力6が太き(小さ)けれ
ば、MPU2はDAC5へ、より小さい(大きい)値の
誤差補正用データ(中間デジタル人力4)を送り、この
関係が反転するまで、前記の手順を繰り返すものである
。 このような手順によりDAC5の出力電圧値(中間アナ
ログ出力)6が基準電源J4の出力電圧値とほぼ同一と
なった時の中間デジタル人力4のデジタルデータをXl
とすると、DAC5のオフセット誤差補正値D1は、下
記(11弐で求められ、この値DIをメモリ・3内のD
1格納領域へ記憶する。 DI=X1−R1−・−・−・・・−・−四・−・−−
−−−−−−−(1)ただし前述のように、R1はDA
C5の変換仕様から定まるオフセット調整用基準電源1
4の出力電圧と等価な中間デジタル人力4としてのデジ
タルデータであり、換言すればDAC5にオフセット誤
差が無いものと考えた時における、DAC5が基準電源
14の出力電圧と等しい電圧(中間アナログ出力6)を
出力するための、DAC5への入力デジタルデータであ
る。 以後、DAC5へ送る被変換データに、この補正値D1
を加えたものを、新たな被変換データ(中間デジタル人
力4)とすることにより、DAC5のオフセット誤差を
打ち消すことができる。すなわち、デジタル入力端子1
に与えられた原波変換データとしてのデジタル人力Xに
対応して、DAC5に与えられるべき中間デジタル人力
4としての補正後のデジタルデータXAは、下記(2)
式で表される。 XA=X+D1   ・−−−−−−−−・−・−−一
−−〜−−−−−−・・−・−・−(2)なお第2図の
実線特性についてのデジタル人力4のXlの値はオフセ
ット調整用基準電源14の電圧をOV(従ってR1=O
)とした場合に得られるオフセット補正値D1に等しい
。 このオフセット補正後の総合D/A変換特性、即ち前記
デジタル人力Xを横軸にとり、DAC5の中間アナログ
出力6を縦軸にとった場合の第2図実線特性に対応する
特性は、第3図の実線特性のように表されオフセット誤
差が取除かれたものとなる。 3)DAC5のゲイン調整を行う。即ち、MPX12の
スイッチを接点■に切り換え、手順2)のオフセット調
整と同様の方法により、ゲイン調整用基準電源13の出
力電圧値(ゲイン調整基準電圧という)VCに相当する
、デジタル人力XとしてのデジタルデータR2に、(2
)式の補正を加えた後のデジタルデータR2+D1を中
間デジタル人力4としてDAC5に与えたのち、DAC
5が基準電圧VGの電圧と等しい値を出力するための、
中間デジタル人力4としての、D A、 C5への入力
デジタルデータX2Aを求める。 さらにこのデータX2Aが(2)弐の補正後の値である
と想定したときのこのデータX2Aに対応するデジタル
人力Xに相当するデータX2を下式(2A)のように求
める。 X2A=X2+D1 、−、  X2=X2A−Di   −一一一一・−一
−−−−−−−−−(2A )なおこれらの値R2,X
2およびVGの関係は第3図上に示される通りである。 このようにしてDAC5のゲイン誤差補正値D2は、下
記(3)式により求められ、この補正値D2をメモリ3
内のD2格納領域に記憶する。 D2=X2/R2・−・−・−−−−−−−−−−−−
−−−−−−−−−−−−(3)ただし前述のように、
手順2)の補正が行われる場合において、R2はDAC
5の変換仕様から定まる、ゲイン調整用基準電源13の
出力電圧VCと等価な、デジタル人力Xとしてのデジタ
ルデータであり、換言すればDAC5にオフセット誤差
があってゲイン誤差が無いものと考えたときにおける、
DAC5が基準電圧VGと等しい電圧(中間アナログ出
力6)を出力するためのMPU2への入力デジタルデー
タである。以後、MPU2へ入力されるデジタルデータ
Xにこの補正値D2を乗じることにより、DAC5のゲ
イン誤差を打ち消すことができる。すなわち、デジタル
人力Xに対応して、オフセット補正、ゲイン補正の両者
を考慮した結果としてDAC5に与えられるべき中間デ
ジタル人力4としての補正後のデジタルデータXBは下
記(4)弐で与えられる。 XB=D2・X+D1 =(×2・X / R2) +D 1 −−−−−− 
(4)なおこの(4)弐の補正を施したときのデジタル
人力Xと中間アナログ出力6との関係は第4図の実線特
性で示され、例えばデジタル人力Xとして値R2を入力
したとき、中間デジタル人力4の値はX2+D1  (
=X2+X1)となり中間アナログ出力6の値は基準電
圧VGとなり、DAC5のオフセット誤差およびゲイン
誤差が共に補正されることになる。 4)S/H回路7のオフセソill整を行う。即ち、中
間デジタル人力4としてデジタルデータR3を与えたの
ち、S/H回路7をサンプルモードからホールドモード
とし、D/A変換値を保持・出力する。次にMPX12
のスイッチを接点■に切り換え、2)の手順で補正値を
求めたのと同様な方法で、DAC5の出力電圧(中間ア
ナログ出力6)が保持されたS/H回路7の出力電圧(
ホールドアナログ出力8H)とほぼ等しくなるときのD
AC5への入力デジタルデータ(中間デジタル人力4)
を求める。この値をX3とすると、S/H回路7のオフ
セット誤差補正値D3は、下式(5)で与えられ、この
補正値D3をメモリ3内のD3格納領域へ記憶する。 D3=X3−R3−・・−・−・−−一−−−−−−−
・−−一一一一・・(5)ただしR3はDAC5の変換
仕様から定まる、ホールドアナログ出力8Hと等価な入
力デジタルデータであり、この値は任意に定めることも
できるが、この場合2)の手順で用いたデジタルデータ
R1を用いれば便利である。 これにより以後、デジタル人力Xに対応して、S/H回
路7のオフセット誤差を打ち消すために手順3)でDA
C5の誤差補正をしたときにDAC5に与えるべき補正
データXBより、前記の補正値D3を差引いた値を、最
終的にDAC5に与えるべき中間デジタル人力4として
の補正後のデジタルデータXCとする。すなわち XC=XB−03 =(X2・X/、R2)+D1−D3 −・(6)以上
により初期のオフセット誤差及びゲイン誤差の補正が完
了する。 なお多チヤンネル出力の場合についても、第1図中MP
X9を省略した場合について述べたと同様な方法で各チ
ャンネル別のS/H回路をホールドモードに保ち、MP
X12に相当するMPXのスイッチを順次切替えつつ初
期補正を行うことができる。 〔2〕初期のオフセット誤差及びゲイン誤差の補正完了
後の通常のD/A変換動作: 5)D/A変換動作を行う。即ち、デジタル入力端子1
からの被変換入力データ(デジタル人力X)に対し、M
PU2を介し、(6)式の補正を施したデジタルデータ
XC(中間デジタル人力4)をDAC5へ送る。この時
第1図のような1チヤンネル出力の場合、S/H回路7
を補正動作中のみホールドモードとし、通常はサンプル
モードとする。 なお多チヤンネル出力の場合、デジタル人力Xに、各チ
ャンネル毎に定まる(6)式の補正(ただし、(6)式
においてチャンネル毎に異なる値は、S/H回路7のオ
フセット誤差の補正値D3のみである。 )を施したデジタルデータをDAC5に与え、そのつど
、そのチャンネルに対応するS/H回路7をホールドモ
ードとする。 (3)D/A変換装置の運転中に生じたオフセット誤差
、ゲイン誤差の補正動作: 6、)DAC5のオフセット誤差の補正を行う。 即ち、運転中に外部へ外部出力値とは関係のない値を誤
出力しないように、S/H回路7をホールドモードにし
ておき、前記手順2)と同じ方法によって補正を行う。 ?)DAC5のゲイン誤差補正を行う。即ちこの補正も
S/H回路7のホールド時に、前記手順3)と同じ方法
によって行う。 8)S/H回路7のオフセット誤差補正を行う。 部ち、 S/H回路7の補正値を求める動作は、現在この装置が
外部装置に出力している値を用いて行うため、この値を
S/H回路7でサンプリングして保持し、前記手順4)
と同じ方法により補正値を求める。以後前記手順6)〜
8)の動作を通常のD/A変換中に周期的に繰り返すこ
とにより、温度変化等によるオフセット及びゲインのず
れを補正して行くことができる。 ところで一般にMPUを用いて(6)式の演算を行う場
合、演算時に生ずる丸め誤差を少なくするために、 ■ X2・X ■ X2・X/R2 ■ X2・X/R2+D1−D3 の順序で演算を行う。ここでこの演算を行うMPU2と
してt 8085のような一般的で安価なMPUを使用
しようとすると、このMPUは乗・除算機能を有してい
ないため、ソフトウェアにて行うことになる。 しかしながら、この場合の除算はとりわけ時間を要し、
そのためD/A変換時間が遅くなるという問題点がある
A D/A converter has offset errors and gain errors as shown in FIG. 2 due to variations in the D/A converter (also abbreviated as DAC) itself as a main element constituting the device. That is, in the figure, the horizontal axis shows the digital input (digital input 4 described later) given to the DAC, and the vertical axis shows the analog output outputted from this DAC (intermediate analog output 6 described later). The linear characteristic indicated by the dotted line on the top of the figure shows the characteristic when there is no error as described above. When the digital human power is O, the analog output is 0. When the digital human power is R2, which is predetermined from the specifications of the DAC, the analog output is used for the gain adjustment described later. To correctly output the voltage (gain adjustment reference voltage) VC of the reference power supply 13. However, real DACs often have characteristics like a solid straight line, and in this example, due to an offset error, when the digital input is O, the analog output does not become 0 (when the former is Xl, the latter is O). ), and due to the gain error, the slope of the horizontal axis of this characteristic line, that is, the change in analog output corresponding to the change in digital input, is larger for the solid line characteristic than for the dotted line characteristic. To correct such errors, offset adjustment and gain adjustment are required. Conventionally, this adjustment has been done manually using a variable resistor, which is expensive and has low reliability (that is, changes in characteristics due to temperature changes and deterioration are not taken into account during operation, and the initial There is a problem that the output value often deviates from the adjusted value. Therefore, as a D/A converter to solve this problem, Japanese Patent Application No. 60-200917 filed by the present applicant "
There is a D/A converter, and this device performs the above correction in MP
This is done automatically using U. FIG. 1 is a block circuit diagram showing the configuration of one embodiment of the D/A converter of the above-mentioned application and the device of the present invention in the case of one channel output. However, the device of the above-mentioned application and the device of the present invention differ only in the contents of the memory, and the former uses memory 3. Next, the contents of the portions related to the present invention in the D/A converter of the above application will be explained using FIG. In Fig. 1, 1 is a digital input terminal for inputting digital data to be converted into analog data (referred to as digital data X for convenience), 2 is an MPU that controls each part and calculates correction values, etc., and 3 is a D/A converter. (DAC) 5 and sample
This is a memory that stores error correction values of the hold circuit (S/H circuit) 7. The DAC 5 converts digital data (referred to as intermediate digital input for convenience) 4 provided from the MPU 2 to an analog voltage 6 (referred to as intermediate digital output for convenience). The S/H circuit 7 samples the intermediate analog output 6 given from the DAC 5 and directly outputs it as an analog output 8 based on the S/H control signal 16 given from the MPU 2. ), holds and stores (holds) the sampled voltage at a predetermined point in time, and holds this held voltage as an analog output 8H.
(This operation is called hold mode). 9 is a multiplexer (also abbreviated as MPX), which outputs OV (contact ■ side) or the output signal of the S/H circuit 7 (analog output 8 or hold) to the analog output terminal 18 based on the MPX control signal 15 given from the MPU 2. Switch and output either analog output 8H) (contact ■ side). Note that this MPX 9 is used when it is desired to accurately maintain the output voltage of the analog output terminal 18 at Ov during initial adjustment, which will be described later, and is not essential. 10 is a comparator (also abbreviated as CP), which outputs the output voltage value of DAC 5 (intermediate analog output 6) and the multiplexer (
MPX) 12 output signal (referred to as MPX output signal) 19
A comparison output signal 11 as a result of the comparison is provided to the MPU 2. MPX12 is MPX control signal 1 given from MPU2
7, the hold analog output 8H (contact ■) output by the S/H circuit 7 and the reference power source 13 for gain adjustment (contact ■; for example, IOV is used for this voltage.)
, the reference power source 14 for offset adjustment (contact ■, for example oV is used for this voltage, and ground potential (OV) can also be used instead of using the special power source 14) is switched one by one, and the MPX It is output as an output signal 19. Although not shown, in a multi-channel output D/A converter, S/H circuits similar to S/H circuit 7 are connected in parallel to the output terminal of DAC 5, each having an analog output terminal for each channel. Based on the respective S/H control signals from the MPU 2, these S/H circuits hold the sampled output voltages of the DAC 5 at different times and output them to the corresponding output terminals. Also, a new multiplexer (MPX) connects one input terminal of the CPIO to each of the S/H circuits and the adjustment reference power supply 13.14 based on a new MPX control signal from the MPU2.
is arranged to switch separately through each corresponding contact in said new MPX. Next, the operating procedure shown in FIG. 1 will be explained. [1] Initial offset adjustment and gain adjustment: 1) During the initial adjustment, the external output (output signal from the analog output terminal 18) is set to Ov. That is, during initial offset adjustment and gain adjustment, in this example, OV is output so as not to adversely affect the outside. For this purpose, switch the MPX9 switch to contact ■. However, as mentioned above, during the initial adjustment, the external output must be set to strictly 0.
If it is not necessary to maintain
The S/H circuit 7 is put into the hold mode with the analog output 8 being approximately OV and the analog output 8 being approximately 0. replaces. ), you may follow the steps below. 2) Perform offset adjustment of DAC5. That is, MPX1
Switch the switch 2 to contact ■, and the output voltage value of the DAC 5 (intermediate analog output) 6 becomes equal to the output voltage value of the reference power supply 14 for offset adjustment, and the intermediate digital power 4 (digital data described later) to the AC 5 becomes equal. Find XI). To give an example of how to obtain this, MPU2 first uses DAC5.
To, error correction data as the intermediate digital human power 4, for example, digital data R1 corresponding to the voltage value of the reference power supply 14.
and the output value of DAC5 (intermediate analog output 6),
The CPIO compares the magnitude relationship with the comparison voltage value from the MPX 12 (MPX output signal 19, in this case the voltage of the reference power supply 14), and receives the result from the CPIO as the comparison output signal 11. As a result of this comparison, if the intermediate analog output 6 is thick (small), the MPU 2 sends error correction data (intermediate digital input 4) of a smaller (larger) value to the DAC 5, and the above-mentioned procedure is continued until this relationship is reversed. The procedure is repeated. Through these steps, when the output voltage value (intermediate analog output) 6 of the DAC 5 becomes almost the same as the output voltage value of the reference power supply J4, the digital data of the intermediate digital power 4 is converted to Xl.
Then, the offset error correction value D1 of the DAC5 is found in the following (112), and this value DI is stored in the D in memory 3.
1 storage area. DI=X1−R1−・−・−・−・−4・−・−−
--------(1) However, as mentioned above, R1 is DA
Reference power supply 1 for offset adjustment determined from the conversion specifications of C5
In other words, when the DAC 5 is assumed to have no offset error, the DAC 5 has a voltage equal to the output voltage of the reference power supply 14 (intermediate analog output 6). ) is the input digital data to the DAC 5 for outputting. After that, this correction value D1 is added to the converted data sent to the DAC5.
The offset error of the DAC 5 can be canceled by adding the value to the new converted data (intermediate digital input 4). That is, digital input terminal 1
Corresponding to the digital human power X as the original wave conversion data given to , the corrected digital data XA as the intermediate digital human power 4 to be given to the DAC 5 is as follows (2)
Expressed by the formula. XA=X+D1 ・----- The value of Xl is the voltage of the reference power supply 14 for offset adjustment.
) is equal to the offset correction value D1 obtained when The overall D/A conversion characteristic after this offset correction, that is, the characteristic corresponding to the solid line characteristic in Figure 2 when the digital human power X is taken on the horizontal axis and the intermediate analog output 6 of the DAC 5 is taken on the vertical axis, is shown in Figure 3. It is expressed as a solid line characteristic with offset errors removed. 3) Adjust the gain of DAC5. That is, by switching the switch of MPX 12 to contact ■, and using the same method as the offset adjustment in step 2), the output voltage value (referred to as gain adjustment reference voltage) of gain adjustment reference power supply 13 (referred to as gain adjustment reference voltage) as digital human power X corresponding to VC is determined. In the digital data R2, (2
) The digital data R2+D1 after the correction of the equation is given to the DAC 5 as intermediate digital power 4, and then the DAC
5 to output a value equal to the voltage of the reference voltage VG,
Input digital data X2A to DA, C5 as intermediate digital human power 4 is obtained. Furthermore, assuming that this data X2A is the value after the correction of (2) 2, data X2 corresponding to the digital human power X corresponding to this data X2A is obtained as shown in the following equation (2A). X2A=X2+D1, -, X2=X2A-Di -1111・-1---(2A) These values R2,
2 and VG are as shown in FIG. In this way, the gain error correction value D2 of the DAC 5 is obtained by the following equation (3), and this correction value D2 is stored in the memory 3.
The data is stored in the D2 storage area within. D2=X2/R2・−・−・−−−−−−−−−−−
−−−−−−−−−−−−(3) However, as mentioned above,
When the correction in step 2) is performed, R2 is the DAC
It is digital data as digital human power X that is equivalent to the output voltage VC of the gain adjustment reference power supply 13 determined from the conversion specifications of 5. In other words, when considering that the DAC 5 has an offset error and no gain error. In,
This is input digital data to the MPU 2 for the DAC 5 to output a voltage (intermediate analog output 6) equal to the reference voltage VG. Thereafter, by multiplying the digital data X input to the MPU 2 by this correction value D2, the gain error of the DAC 5 can be canceled out. That is, corresponding to the digital human power X, the corrected digital data XB as the intermediate digital human power 4 to be given to the DAC 5 as a result of considering both the offset correction and the gain correction is given by the following (4) 2. XB=D2・X+D1 =(×2・X/R2) +D 1 -------
(4) Note that the relationship between the digital human power The value of intermediate digital human power 4 is X2 + D1 (
=X2+X1), the value of the intermediate analog output 6 becomes the reference voltage VG, and both the offset error and gain error of the DAC 5 are corrected. 4) Perform off-line adjustment of the S/H circuit 7. That is, after providing the digital data R3 as the intermediate digital input 4, the S/H circuit 7 is changed from the sample mode to the hold mode to hold and output the D/A converted value. Next, MPX12
Switch the switch to contact ■, and use the same method to obtain the correction value in step 2) to calculate the output voltage (
D when it becomes almost equal to hold analog output 8H)
Input digital data to AC5 (intermediate digital human power 4)
seek. Assuming that this value is X3, the offset error correction value D3 of the S/H circuit 7 is given by the following equation (5), and this correction value D3 is stored in the D3 storage area in the memory 3. D3=X3−R3−・−・−・−−−−−−−−−
・--1111... (5) However, R3 is input digital data equivalent to the hold analog output 8H, determined from the conversion specifications of DAC5, and this value can be arbitrarily determined, but in this case 2) It is convenient to use the digital data R1 used in the procedure. As a result, from now on, in order to cancel the offset error of the S/H circuit 7 in response to the digital human power
The value obtained by subtracting the correction value D3 from the correction data XB to be given to the DAC 5 when the error of C5 is corrected is set as the corrected digital data XC as the intermediate digital human power 4 to be finally given to the DAC 5. That is, XC=XB-03 = (X2. In addition, in the case of multi-channel output, MP in Figure 1
The S/H circuit for each channel is kept in hold mode in the same way as described for the case where X9 is omitted, and the MP
Initial correction can be performed while sequentially switching the switches of MPX corresponding to X12. [2] Normal D/A conversion operation after completion of initial offset error and gain error correction: 5) Perform D/A conversion operation. That is, digital input terminal 1
For the input data to be converted (digital human power X) from M
The digital data XC (intermediate digital input 4) corrected by equation (6) is sent to the DAC 5 via the PU 2. At this time, in the case of one channel output as shown in Fig. 1, the S/H circuit 7
is in hold mode only during correction operation, and normally in sample mode. In the case of multi-channel output, the digital manual power ) is applied to the DAC 5, and each time the S/H circuit 7 corresponding to that channel is set to the hold mode. (3) Correcting operations for offset errors and gain errors that occur during operation of the D/A converter: 6.) Correct the offset error of the DAC 5. That is, in order to avoid erroneously outputting a value unrelated to the external output value to the outside during operation, the S/H circuit 7 is placed in a hold mode, and correction is performed in the same manner as in step 2). ? ) Correct the gain error of the DAC5. That is, this correction is also performed when the S/H circuit 7 is held by the same method as step 3). 8) Perform offset error correction of the S/H circuit 7. Particularly, since the operation of determining the correction value of the S/H circuit 7 is performed using the value currently output by this device to the external device, this value is sampled and held in the S/H circuit 7, and the above-mentioned value is Step 4)
Calculate the correction value using the same method as above. From then on, the above steps 6)~
By periodically repeating the operation 8) during normal D/A conversion, it is possible to correct offset and gain deviations due to temperature changes and the like. By the way, when calculating equation (6) using an MPU, in general, in order to reduce rounding errors that occur during calculation, the calculations are performed in the following order: ■ X2・X ■ X2・X/R2 ■ X2・X/R2+D1−D3 . If an attempt is made to use a general and inexpensive MPU such as the t8085 as the MPU 2 that performs this calculation, this MPU does not have multiplication/division functions, so the calculation must be performed by software. However, division in this case is particularly time consuming;
Therefore, there is a problem that the D/A conversion time becomes slow.

【発明の目的】[Purpose of the invention]

この発明は前述の問題点を解決しD/A変換に伴って生
じるオフセット誤差やゲイン誤差をマイクロプロセッサ
を用いてソフトウェアで補正するD/A変換装置におい
て、補正に必要な除算を安価で高速に行わせることがで
きるD/A変換装置を提供することを目的とする。
The present invention solves the above-mentioned problems and makes it possible to perform the division necessary for correction at low cost and at high speed in a D/A conversion device that corrects offset errors and gain errors caused by D/A conversion using software using a microprocessor. It is an object of the present invention to provide a D/A conversion device that can perform the following steps.

【発明の要点】[Key points of the invention]

本発明の要点はD/A変換装置の誤差の自動補正におい
て、補正に必要な除算を2進数演算における所定桁数の
シフト動作のみで行えるようにした点にある。 換言すれば本発明の要点は、D/A変換器と、該変換器
の出力側にそれぞれ並列に設けられた1又は複数のサン
プル・ホールド回路と、前記サンプル・ホールド回路を
ホールドモードとした状態で、前記D/A変換器のオフ
セット誤差補正値(DIなど)及びゲイン誤差補正値(
D2など)、並びに前記サンプル・ホールド回路のオフ
セット誤差補正値(D3など)を演算し記憶する第1の
誤差演算記憶手段と、 前記の各誤差補正値を用いてアナログ変換されるべき族
デジタルデータに、所定の補正演算を加えたデジタルデ
ータを前記D/A変換器に与える誤差補正手段(マイク
ロプロセッサなど)と、を備えたD/A変換装置におい
て、 前記D/A変換装置は少な(とも前記D/A変換器の前
記ゲイン誤差補正値に所定の値(2’など)を乗じた新
たなゲイン誤差補正値(新補正用データX21など)を
演算し記憶する第2の誤差演算記憶手段(マイクロプロ
セッサ、メモリ3Aなど)を備え、 前記誤差補正手段は、少なくとも前記の新たなゲイン誤
差補正値を用い、2進の被除数を所定回数シフトする動
作のみによって、前記の補正演算に含まれる除算を実行
する手段であるようにした点、またはさらに前記第1の
誤差演算記憶手段は、前記D/A変換器のオフセット誤
差補正値を求めるための第1の基準電圧発生手段(オフ
セット調整用基準電源など)、同じくゲイン誤差補正値
を求めるための第2の基準電圧発生手段(ゲイン調整用
基準電源など)、前記第1及び第2の基準電圧発生手段
並びにホールドモードにある前記サンプル・ホールド回
路の各出力電圧を1つづつ選択する選択手段(マルチプ
レクサなど)、該選択手段によって選択された出力電圧
と前記D/A変換器の出力電圧とを比較しつつ、この両
電圧が等しくなるときに前記D/A変換器に与えられる
デジタルデータを前記の選択毎に求める手段(コンパレ
ータ、マイクロプロセッサなど)、前記の選択毎の該デ
ジタルデータを用いて、それぞれ前記D/A変換器のオ
フセット誤差補正値およびゲイン誤差補正値、並びに前
記サンプル・ホールド回路のオフセット誤差補正値を演
算する手段(マイクロプロセッサなど)、この演算され
た各誤差補正値を記憶する手段(メモリ3Aなど)、の
各手段を備えたものであるようにした点にある。
The key point of the present invention is that, in automatic correction of errors in a D/A converter, the division necessary for correction can be performed only by a shift operation of a predetermined number of digits in binary arithmetic. In other words, the main points of the present invention are a D/A converter, one or more sample-and-hold circuits each provided in parallel on the output side of the converter, and a state in which the sample-and-hold circuit is in a hold mode. The offset error correction value (DI, etc.) and gain error correction value (such as DI) of the D/A converter are
D2, etc.) and an offset error correction value (D3, etc.) of the sample-and-hold circuit. and an error correction means (such as a microprocessor) for supplying digital data to the D/A converter with predetermined correction calculations added thereto. a second error calculation storage means for calculating and storing a new gain error correction value (new correction data X21, etc.) obtained by multiplying the gain error correction value of the D/A converter by a predetermined value (2', etc.); (a microprocessor, a memory 3A, etc.), and the error correction means uses at least the new gain error correction value and performs the division included in the correction calculation only by shifting the binary dividend a predetermined number of times. Furthermore, the first error calculation storage means is a means for executing the offset error correction value of the D/A converter (offset adjustment reference). power source, etc.), a second reference voltage generating means (such as a reference power source for gain adjustment) for similarly determining a gain error correction value, the first and second reference voltage generating means, and the sample/hold circuit in a hold mode. A selection means (such as a multiplexer) that selects each output voltage one by one, and compares the output voltage selected by the selection means with the output voltage of the D/A converter, and when the two voltages become equal, Means (comparator, microprocessor, etc.) for obtaining digital data given to the D/A converter for each of the selections, and offset error correction of the D/A converter using the digital data for each selection. means (such as a microprocessor) for calculating the value and gain error correction value as well as the offset error correction value of the sample-and-hold circuit, and means (such as memory 3A) for storing the calculated error correction values. The point is that we have made sure that we are prepared for it.

【発明の実施例】[Embodiments of the invention]

次に第1図に基づいて本発明の詳細な説明する。本発明
においては前記のメモリ3が3Aに置換わり、このメモ
リ3Aには前記の各誤差補正値(D/A変換器5のオフ
セット誤差補正値D1、同じくゲイン誤差補正値D2)
S/H回路7のオフセット誤差補正値D3)の他に後述
のようなテーブルが記憶されるものである。 いまこのD/A変換装置の変換可能なデジタル入力Xの
桁数をNビットとする。前記の(6)式中の除算項であ
る右辺第1項X2・X/R2(=D2・X)におけるゲ
イン誤差補正値D2について、下式(7)を満たす新補
正用データX21を求める。 D2=X2/R2 =X21/2’   −・・・−−−−−−m−−−−
・−・−・−・−・(7)即ち新補正用データX21は
下記(8)式により予め算出しておくことができる。 X21=2’  ・D2 =2’  −X2/R2・・−・・・・−・・−−−m
−・(8)このデータX21を用いれば(6)式の右辺
第1項(除算項)は下式(9)で表される。 D2・X=(X21・X)/2N −・−・・−・(9
)従ってMPU2はデータX21とXの積を求め、その
値(2進数)を右へNビット(N回)シフトすることに
よって、(9)式の除算値D2・X、つまり(6)式の
右辺第1項を演算することができる。 なお本発明では(8)式における新補正用データX21
の値を種々のX2の値に対してあらかじめ算出し記憶し
ておくものである。即ち回路が正常であれば、X2は、
回路素子(DAC5)のばらつきから定まるある値の範
囲に入る。そこでその範囲内にある種々のX2の対応す
るX21の値を予め(8)弐より算出し、メモリ3Aの
中にテーブルとして容易しておくものである。 これによりゲイン誤差補正の際に検出した値X2に応じ
て、メモリ3A内における前記テーブル中の値X21を
読み出して(9)式、従って(6)弐の計算を高速に行
うことができる。
Next, the present invention will be explained in detail based on FIG. In the present invention, the memory 3 is replaced with 3A, and this memory 3A stores each of the error correction values (offset error correction value D1 of the D/A converter 5, gain error correction value D2).
In addition to the offset error correction value D3) of the S/H circuit 7, a table as described below is stored. Let us now assume that the number of digits of the convertible digital input X of this D/A converter is N bits. Regarding the gain error correction value D2 in the first term on the right side, X2.X/R2 (=D2.X), which is the division term in the above equation (6), new correction data X21 that satisfies the following equation (7) is determined. D2=X2/R2 =X21/2' -------m----
・−・−・−・−・(7) That is, the new correction data X21 can be calculated in advance using the following equation (8). X21=2' ・D2 =2' -X2/R2・・・・・・・−・・−−−m
-.(8) If this data X21 is used, the first term (division term) on the right side of equation (6) is expressed by equation (9) below. D2・X=(X21・X)/2N −・−・・−・(9
) Therefore, MPU2 calculates the product of data X21 and The first term on the right side can be calculated. Note that in the present invention, the new correction data X21 in equation (8)
The values of are calculated and stored in advance for various values of X2. That is, if the circuit is normal, X2 is
It falls within a certain range of values determined by variations in the circuit elements (DAC 5). Therefore, the values of X21 corresponding to various X2 within the range are calculated in advance from (8) 2 and stored as a table in the memory 3A. Thereby, the value X21 in the table in the memory 3A is read out in accordance with the value X2 detected during gain error correction, and the calculation of equation (9), and therefore (6) 2, can be performed at high speed.

【発明の効果】【Effect of the invention】

本発明によれば、D/A変換器のオフセット誤差及びゲ
イン誤差を補正する演算を、マイクロプロセッサを用い
たソフトウェアで行うD/A変換装置において、前記の
補正のための演算を事前に作成したテーブルを参照する
事によってその演算の一部を省略し、その演算中に含ま
れる除算を2進数の所定桁数のシフト動作のみで行うこ
ととしたので、安価で高速なり/A変換装置を実現する
ことができる。
According to the present invention, in a D/A converter that performs calculations for correcting offset errors and gain errors of a D/A converter using software using a microprocessor, calculations for the correction are created in advance. By referring to the table, a part of the calculation is omitted, and the division included in the calculation is performed only by shifting a predetermined number of binary digits, resulting in an inexpensive and high-speed /A conversion device. can do.

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

第1図は本発明装置の一実施例および従来装置の構成を
示すブロック回路図、第2図〜第4図は第1図の補正動
作を説明するための特性図である。 1:デジタル入力端子、2:マルチプロセッサ(MPU
) 、3A :メモリ、5 : D/A変換器(DAC
) 、7 :サンプル・ホールド回路(S / H回路
)、12:マルチプレクサ(MPX)、10:コンパレ
ータ(CP)、13ニゲイン調整用基準電源、14:オ
フセット調整用基準電源、18:アナログ出力端子、X
21:新補正用データ。
FIG. 1 is a block circuit diagram showing an embodiment of the device of the present invention and the configuration of a conventional device, and FIGS. 2 to 4 are characteristic diagrams for explaining the correction operation of FIG. 1. 1: Digital input terminal, 2: Multiprocessor (MPU
), 3A: Memory, 5: D/A converter (DAC
), 7: Sample and hold circuit (S/H circuit), 12: Multiplexer (MPX), 10: Comparator (CP), 13 Reference power supply for gain adjustment, 14: Reference power supply for offset adjustment, 18: Analog output terminal, X
21: New correction data.

Claims (1)

【特許請求の範囲】 1)D/A変換器と、 該変換器の出力側にそれぞれ並列に設けられた1又は複
数のサンプル・ホールド回路と、 前記サンプル・ホールド回路をホールドモードとした状
態で、前記D/A変換器のオフセット誤差補正値及びゲ
イン誤差補正値、並びに前記サンプル・ホールド回路の
オフセット誤差補正値を演算し記憶する第1の誤差演算
記憶手段と、 前記の各誤差補正値を用いてアナログ変換されるべき原
デジタルデータに、所定の補正演算を加えたデジタルデ
ータを前記D/A変換器に与える誤差補正手段と、を備
えたD/A変換装置において、 前記D/A変換装置は少なくとも前記D/A変換器の前
記ゲイン誤差補正値に所定の値を乗じた新たなゲイン誤
差補正値を演算し記憶する第2の誤差演算記憶手段を備
え、 前記誤差補正手段は、少なくとも前記の新たなゲイン誤
差補正値を用い、2進の被除数を所定回数シフトする動
作のみによって、前記の補正演算に含まれる除算を実行
する手段であることを特徴とするD/A変換装置。 2)特許請求の範囲第1項に記載の装置において、前記
第1の誤差演算記憶手段は、前記D/A変換器のオフセ
ット誤差補正値を求めるための第1の基準電圧発生手段
、同じくゲイン誤差補正値を求めるための第2の基準電
圧発生手段、前記第1及び第2の基準電圧発生手段並び
にホールドモードにある前記サンプル・ホールド回路の
各出力電圧を1つづつ選択する選択手段、該選択手段に
よって選択された出力電圧と前記D/A変換器の出力電
圧とを比較しつつ、この両電圧が等しくなるときに前記
D/A変換器に与えられるデジタルデータを前記の選択
毎に求める手段、前記の選択毎の該デジタルデータを用
いて、それぞれ前記D/A変換器のオフセット誤差補正
値及びゲイン誤差補正値並びに前記サンプル・ホールド
回路のオフセット誤差補正値を演算する手段、この演算
された各誤差補正値を記憶する手段、の各手段を備えた
ものであることを特徴とするD/A変換装置。
[Claims] 1) A D/A converter, one or more sample-and-hold circuits each provided in parallel on the output side of the converter, and with the sample-and-hold circuit in a hold mode. , a first error calculation storage means for calculating and storing an offset error correction value and a gain error correction value of the D/A converter, and an offset error correction value of the sample-and-hold circuit; and error correction means for providing the D/A converter with digital data obtained by adding a predetermined correction operation to the original digital data to be converted into analog data using the D/A converter. The apparatus includes at least second error calculation storage means for calculating and storing a new gain error correction value obtained by multiplying the gain error correction value of the D/A converter by a predetermined value, and the error correction means includes at least A D/A converter, characterized in that the D/A converter is a means for executing the division included in the correction calculation only by an operation of shifting a binary dividend a predetermined number of times using the new gain error correction value. 2) In the apparatus according to claim 1, the first error calculation storage means includes a first reference voltage generation means for determining an offset error correction value of the D/A converter, and also a gain a second reference voltage generation means for determining an error correction value; a selection means for selecting one output voltage from each of the first and second reference voltage generation means and the sample-and-hold circuit in a hold mode; While comparing the output voltage selected by the selection means and the output voltage of the D/A converter, digital data to be given to the D/A converter when the two voltages become equal is determined for each of the selections. means for calculating an offset error correction value and a gain error correction value of the D/A converter and an offset error correction value of the sample-and-hold circuit using the digital data for each selection; A D/A conversion device comprising: means for storing each error correction value.
JP20715586A 1986-09-03 1986-09-03 Digital-analog converter Pending JPS6362415A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP20715586A JPS6362415A (en) 1986-09-03 1986-09-03 Digital-analog converter

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP20715586A JPS6362415A (en) 1986-09-03 1986-09-03 Digital-analog converter

Publications (1)

Publication Number Publication Date
JPS6362415A true JPS6362415A (en) 1988-03-18

Family

ID=16535135

Family Applications (1)

Application Number Title Priority Date Filing Date
JP20715586A Pending JPS6362415A (en) 1986-09-03 1986-09-03 Digital-analog converter

Country Status (1)

Country Link
JP (1) JPS6362415A (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS60129834A (en) * 1983-12-19 1985-07-11 Matsushita Electric Ind Co Ltd Multiplier and divider

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS60129834A (en) * 1983-12-19 1985-07-11 Matsushita Electric Ind Co Ltd Multiplier and divider

Similar Documents

Publication Publication Date Title
US8223044B2 (en) INL correction circuitry and method for SAR ADC
US4896155A (en) Method and apparatus for self-calibration of subranging A/D converter
KR101182402B1 (en) Successive Approximation Register Analog-Digital Converter
US5870041A (en) Analog-to-digital converter with digital compensation
JP3130528B2 (en) Digital to analog converter
EP0092202A2 (en) Digital-to-analog converting apparatus equipped with calibrating function
KR101419804B1 (en) Analog digital converting device
JPH0738585B2 (en) Digital / analog converter
KR101831696B1 (en) Operating method and apparatus for converting digital to analog
JPS6261426A (en) Digital-analog converter
US6140949A (en) Trimming algorithm for pipeline A/D converter using integrated non-linearity measurement
JP2002111495A (en) Digital-analog conversion circuit
JPS6362415A (en) Digital-analog converter
JP4613929B2 (en) A / D conversion circuit
JP2000068830A (en) Da converter and successive-comparison type ad converter using the da converter
US7541954B2 (en) Touch control apparatus and analog-to-digital converting apparatus and method thereof
JPS6161577B2 (en)
JP4746792B2 (en) A / D converter
TW202015345A (en) Digital to analog converter device and calibration method
CN111049520A (en) Digital-to-analog converter device and correction method
JPS59228416A (en) Analog-digital converting system
JPH09289450A (en) Digital to analog converter
JPH01320825A (en) Correction type a/d converter
JPS59167112A (en) Digital-analog converter
JPH11220396A (en) A/d conversion extension circuit