JP2001102925A - Digital-to-analog converting device - Google Patents

Digital-to-analog converting device

Info

Publication number
JP2001102925A
JP2001102925A JP28080199A JP28080199A JP2001102925A JP 2001102925 A JP2001102925 A JP 2001102925A JP 28080199 A JP28080199 A JP 28080199A JP 28080199 A JP28080199 A JP 28080199A JP 2001102925 A JP2001102925 A JP 2001102925A
Authority
JP
Japan
Prior art keywords
digital data
output
digital
data
correction
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.)
Withdrawn
Application number
JP28080199A
Other languages
Japanese (ja)
Inventor
Makoto Kudo
真 工藤
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.)
Seiko Epson Corp
Original Assignee
Seiko Epson 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 Seiko Epson Corp filed Critical Seiko Epson Corp
Priority to JP28080199A priority Critical patent/JP2001102925A/en
Publication of JP2001102925A publication Critical patent/JP2001102925A/en
Withdrawn legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To improve the precision of the analog output voltage of a PWM (pulse-width modulation) type D/A converting device and to improve the linearity of D/A conversion output characteristics as to an error of the analog output voltage generated owing to a difference in the output impedance of a PWM signal output circuit between a high-potential-output time and a low-potential- output time by adjusting the duty factor of a PWM signal so that an analog output voltage specified by digital data as an object of D/A conversion is obtained. SOLUTION: A data correcting means 14 converts digital data 11a as an object of D/A conversion into correction digital data 14a with which an output voltage corresponding to the digital data can actually be obtained. A PWM circuit part 12 generates a PWM signal with a duty factor corresponding to the correction digital data 14a and supplies the PWM signal 10a to a low-pass filter circuit 20 through a PWM signal output buffer circuit 13.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】この発明は、PWM(パルス
幅変調)方式のDA(デジタルアナログ)変換装置に係
り、詳しくは、PWM信号の出力回路の出力インピーダ
ンスが高電位出力時と低電位出力時とで異なることによ
って生ずるアナログ出力電圧の誤差を、DA変換の対象
であるデジタルデータによって指定されるアナログ出力
電圧が得られるようにPWM信号のデューティを調整す
ることで、アナログ出力電圧の精度を向上させるととも
に、DA変換出力特性の直線性を改善させるようにした
DA変換装置に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a PWM (pulse width modulation) type DA (digital-to-analog) converter, and more particularly to a PWM signal output circuit in which an output impedance of a PWM signal output circuit is high and low. By adjusting the duty of the PWM signal so that the analog output voltage specified by the digital data to be converted is obtained, the accuracy of the analog output voltage is improved. The present invention also relates to a DA converter that improves the linearity of DA conversion output characteristics.

【0002】[0002]

【従来の技術】デジタルデータをそのデジタルデータに
対応したデューティのPWM信号へ変換し、そのPWM
信号をローパスフィルタへ入力してアナログ信号を出力
するようにしたDA変換装置は、特開平2−15530
3号公報、特開平3−27621号公報、特開平9−2
32958号公報等で知られている。
2. Description of the Related Art Digital data is converted into a PWM signal having a duty corresponding to the digital data.
A DA converter configured to input a signal to a low-pass filter and output an analog signal is disclosed in Japanese Patent Application Laid-Open No. H2-15530.
No. 3, JP-A-3-27621, JP-A-9-2
This is known from, for example, Japanese Patent No. 32958.

【0003】PWM信号を生成するためのPWM回路部
を内蔵した1チップマイクロコンピュータ(1チップマ
イコン)やPWM回路部を内蔵したASIC等が、各種
の電子機器等で利用されている。例えば、特開平10−
41819号公報には、PWM回路を内蔵したマイコン
を用いた計測回路が記載されている。
A one-chip microcomputer (one-chip microcomputer) having a built-in PWM circuit for generating a PWM signal, an ASIC having a built-in PWM circuit, and the like are used in various electronic devices. For example, JP-A-10-
JP-A-41819 discloses a measurement circuit using a microcomputer having a built-in PWM circuit.

【0004】PWM回路部を内蔵した1チップマイクロ
コンピュータ(1チップマイコン)やPWM回路部を内
蔵したASIC等は、CMOSプロセスを用いた構成し
たものが広く使用されている。
A one-chip microcomputer (one-chip microcomputer) having a built-in PWM circuit, an ASIC having a built-in PWM circuit, and the like using a CMOS process are widely used.

【0005】図6はPWM回路を内蔵したマイコンを用
いて構成した従来のDA変換装置の一具体例を示すブロ
ック構成図である。図6に示す従来のDA変換装置10
1は、1チップマイクロコンピュータ(以下、マイコン
と記す)110とローパスフィルタ回路120とから構
成されている。
FIG. 6 is a block diagram showing a specific example of a conventional DA converter constructed using a microcomputer having a built-in PWM circuit. Conventional DA converter 10 shown in FIG.
Reference numeral 1 denotes a one-chip microcomputer (hereinafter, referred to as a microcomputer) 110 and a low-pass filter circuit 120.

【0006】マイコン110は、CPU部111と、P
WM回路部112と、PWM信号出力バッファ回路部1
13と、図示しないROM、RAM、各種入出力部等を
備える。CPU部111は、予め設定されたDA変換周
期毎にDA変換の対象となるデジタルデータ111aを
PWM回路部112へ供給する。
The microcomputer 110 includes a CPU unit 111 and a P
WM circuit unit 112 and PWM signal output buffer circuit unit 1
13 and a ROM, a RAM, various input / output units (not shown) and the like. The CPU unit 111 supplies digital data 111a to be subjected to DA conversion to the PWM circuit unit 112 at every preset DA conversion cycle.

【0007】PWM回路部112は、図示しないカウン
タクロックを計数する図示しないバイナリカウンタ回路
部と、バイナリカウンタ回路部のカウント値とデジタル
データ111aとの大小関係を比較してPWM信号を生
成するPWM信号生成部(図示しない)とを備える。こ
のPWM回路部112は、バイナリカウンタ回路部のカ
ウント値がCPU部111から供給されたデジタルデー
タ111aの値に達するまではHレベルの信号112a
を出力し、それ以降はLレベルの信号112aを出力す
ることを、DA変換周期毎に繰り返す。
The PWM circuit 112 is a binary counter circuit for counting a counter clock (not shown), and a PWM signal for generating a PWM signal by comparing the magnitude relationship between the count value of the binary counter circuit and the digital data 111a. And a generation unit (not shown). The PWM circuit 112 outputs an H level signal 112a until the count value of the binary counter circuit reaches the value of the digital data 111a supplied from the CPU 111.
And thereafter outputting the L-level signal 112a is repeated every DA conversion cycle.

【0008】PWM信号出力バッファ回路部113は、
PWM回路部112の出力信号112aに基づいてPW
M信号出力端子110aを所定の駆動能力で駆動する。
これにより、PWM信号出力端子110aからPWM信
号101aが出力される。
[0008] The PWM signal output buffer circuit section 113 includes:
PWM based on the output signal 112a of the PWM circuit unit 112
The M signal output terminal 110a is driven with a predetermined driving capability.
As a result, the PWM signal 101a is output from the PWM signal output terminal 110a.

【0009】PWM信号出力バッファ回路部113は、
インバータ114と、Hレベルを出力するためのpチャ
ネルトランジスタ115とLレベルを出力するためのn
チャネルトランジスタ116とから構成されている。出
力信号112aはインバータ114の入力端子へ供給さ
れる。インバータ114の出力端子は、各トランジスタ
115,116のゲートへそれぞれ接続されている。p
チャネルトランジスタ115のソースは回路用電源VC
C(または基準電源+VREF)へ接続されている。p
チャネルトランジスタ115のドレインとnチャネルト
ランジスタ116のドレインは共に接続されるととも
に、その接続点はPWM信号出力端子110aに接続さ
れている。nチャネルトランジスタ116のソースはグ
ランド電源(GND)へ接続されている。
[0009] The PWM signal output buffer circuit section 113 includes:
Inverter 114, p-channel transistor 115 for outputting H level, and n for outputting L level
And a channel transistor 116. The output signal 112a is supplied to an input terminal of the inverter 114. The output terminal of the inverter 114 is connected to the gates of the transistors 115 and 116, respectively. p
The source of the channel transistor 115 is a circuit power supply VC.
C (or reference power supply + VREF). p
The drain of the channel transistor 115 and the drain of the n-channel transistor 116 are connected together, and the connection point is connected to the PWM signal output terminal 110a. The source of the n-channel transistor 116 is connected to a ground power supply (GND).

【0010】ローパスフィルタ回路120は、抵抗12
1とコンデンサ122とからなる。図6ではフィルタの
次数が1次の受動型フィルタを例示したが、ローパスフ
ィルタに要求されるフィルタ特性(遮断周波数、減衰
量、通過帯域内でのレベル変動等)に応じて、抵抗とコ
ンデンサからなる回路を2段または3段直列に接続した
2次または3次の受動型フィルタや演算増幅器等を用い
て構成されたアクティブフィルタ等が用いられることも
ある。
The low-pass filter circuit 120 includes a resistor 12
1 and a capacitor 122. In FIG. 6, a passive filter having a first-order filter is illustrated. However, according to the filter characteristics (cutoff frequency, attenuation, level fluctuation in a pass band, etc.) required for a low-pass filter, a resistor and a capacitor are used. A secondary or tertiary passive filter in which two or three stages of circuits are connected in series, or an active filter configured using an operational amplifier or the like may be used.

【0011】次に、図6に示した従来のDA変換装置1
01の動作を説明する。PWM回路部112は、パルス
信号の周期がDA変換周期であってDA変換の対象とな
るデジタルデータ111aに対応したデューティの信号
112aを生成して出力する。この信号112aはPW
M信号出力バッファ回路部113を介してPWM信号出
力端子110aからPWM信号101aとして出力さ
れ、ローパスフィルタ回路120で高周波成分が除去さ
れ(平滑され)、アナログ出力信号が出力される。DA
変換の対象となるデジタルデータ111aを例えば10
ビット構成とすれば、分解能が10ビット相当のDA変
換装置を構成することができる。
Next, the conventional DA converter 1 shown in FIG.
01 will be described. The PWM circuit unit 112 generates and outputs a signal 112a having a duty cycle corresponding to the digital data 111a to be DA-converted, in which the cycle of the pulse signal is the DA conversion cycle. This signal 112a is PW
The PWM signal 101a is output from the PWM signal output terminal 110a via the M signal output buffer circuit 113 as a PWM signal 101a, and high-frequency components are removed (smoothed) by the low-pass filter circuit 120, and an analog output signal is output. DA
The digital data 111a to be converted is, for example, 10
With a bit configuration, a DA converter having a resolution of 10 bits can be configured.

【0012】[0012]

【発明が解決しようとする課題】図7は図6に示した従
来のDA変換装置の出力特性を示すグラフである。横軸
は、デジタルデータの値ならびにデジタルデータに対応
したPWM信号のデューティを示している。なお、ここ
では10ビット構成のデジタルデータを10進表記で示
している。また、デューティは百分率(パーセント)表
示で示している。縦軸は、アナログ出力信号の出力電圧
を示している。なお、ここで示すアナログ出力信号の出
力電圧は、DA変換周期毎に同一のデジタルデータを繰
り返し供給した場合のアナログ出力信号の出力電圧であ
る。
FIG. 7 is a graph showing the output characteristics of the conventional DA converter shown in FIG. The horizontal axis indicates the value of the digital data and the duty of the PWM signal corresponding to the digital data. Here, digital data having a 10-bit configuration is shown in decimal notation. Further, the duty is shown in percentage (percent) display. The vertical axis indicates the output voltage of the analog output signal. Note that the output voltage of the analog output signal shown here is the output voltage of the analog output signal when the same digital data is repeatedly supplied for each DA conversion cycle.

【0013】図6に示した回路用電源VCC(または基
準電源+VREF)の電圧を+5ボルトとした場合、P
WM信号のデューティが0で出力電圧が0ボルト、PW
M信号のデューティが100で出力電圧が5ボルトとな
る。この2点を結ぶ直線(仮想線で示す)K1が理想の
変換特性である。しかしながら、従来のDA変換装置1
01の実際の変換特性は、実線K2で示すように理想的
な直線にはならず、直線性に誤差が生ずる。この直線性
誤差が生ずる原因として、図6に示したPWM信号出力
バッファ回路部113の出力インピーダンスが考えられ
る。
When the voltage of the circuit power supply VCC (or reference power supply + VREF) shown in FIG.
WM signal duty is 0, output voltage is 0 volt, PWM
When the duty of the M signal is 100, the output voltage becomes 5 volts. A straight line (shown by a virtual line) K1 connecting these two points is an ideal conversion characteristic. However, the conventional DA converter 1
The actual conversion characteristic of 01 is not an ideal straight line as shown by the solid line K2, and an error occurs in the linearity. The output impedance of the PWM signal output buffer circuit 113 shown in FIG. 6 may be a cause of the linearity error.

【0014】図8はPWM信号出力バッファ回路部の等
価回路ならびにローパスフィルタ回路の回路図である。
PWM信号出力バッファ回路部113は、理想スイッチ
回路SWと、pチャネルトランジスタ115のオン抵抗
Rpと、nチャネルトランジスタ116のオン抵抗Rn
とで表わすことができる。また、ローパスフィルタ回路
120の抵抗121の抵抗値をRLとする。
FIG. 8 is a circuit diagram of an equivalent circuit of a PWM signal output buffer circuit and a low-pass filter circuit.
The PWM signal output buffer circuit unit 113 includes an ideal switch circuit SW, an on-resistance Rp of a p-channel transistor 115, and an on-resistance Rn of an n-channel transistor 116.
And can be represented by Further, the resistance value of the resistor 121 of the low-pass filter circuit 120 is RL.

【0015】PWM信号がHレベルの期間では、pチャ
ネルトランジスタ115がオンでnチャネルトランジス
タ116がオフとなる(理想スイッチ回路SWが実線で
示す切り替え状態)。この状態では、回路用電源VCC
(ここでは+5ボルトとする)がpチャネルトランジス
タ115のオン抵抗Rpと抵抗121の抵抗値RLとの
合成抵抗値(Rp+RL)を介してコンデンサ122へ
供給される。PWM信号がLレベルの期間では、pチャ
ネルトランジスタ116がオフでnチャネルトランジス
タ116がオンとなる(理想スイッチ回路SWが点線で
示す切り替え状態)。この状態では、グランド電源(こ
こでは0ボルトとする)がnチャネルトランジスタ11
6のオン抵抗Rnと抵抗121の抵抗値RLとの合成抵
抗値(Rn+RL)を介してコンデンサ122へ供給さ
れる。
During the period when the PWM signal is at the H level, the p-channel transistor 115 is turned on and the n-channel transistor 116 is turned off (the ideal switch circuit SW is in a switching state indicated by a solid line). In this state, the circuit power supply VCC
(Here, +5 volts) is supplied to the capacitor 122 via a combined resistance value (Rp + RL) of the ON resistance Rp of the p-channel transistor 115 and the resistance value RL of the resistance 121. During the period when the PWM signal is at the L level, the p-channel transistor 116 is turned off and the n-channel transistor 116 is turned on (the switching state of the ideal switch circuit SW indicated by a dotted line). In this state, the ground power supply (here, 0 volt) is applied to the n-channel transistor 11.
6 is supplied to the capacitor 122 via a combined resistance value (Rn + RL) of the on-resistance Rn of 6 and the resistance value RL of the resistor 121.

【0016】1チップマイクロコンピュータ(1チップ
マイコン)やASIC等では、pチャネルトランジスタ
115のオン抵抗Rpがnチャネルトランジスタ116
のオン抵抗Rnよりも大きいのが一般的である。pチャ
ネルトランジスタ115のオン抵抗Rpは例えば15オ
ーム程度、nチャネルトランジスタ116のオン抵抗R
nは例えば10オーム程度である。
In a one-chip microcomputer (one-chip microcomputer), an ASIC, or the like, the on-resistance Rp of the p-channel transistor 115 is
Is generally larger than the on-resistance Rn. The on-resistance Rp of the p-channel transistor 115 is, for example, about 15 ohms,
n is, for example, about 10 ohms.

【0017】図9はローパスフィルタ回路の動作を示す
説明図である。図9(a)はPWM信号を、図9(b)
は理想的なアナログ出力電圧を、図9(c)は実際のア
ナログ出力電圧を示している。なお、ここではPWM信
号のデューティが50パーセントの場合を示している。
FIG. 9 is an explanatory diagram showing the operation of the low-pass filter circuit. FIG. 9A shows a PWM signal, and FIG.
9 shows an ideal analog output voltage, and FIG. 9C shows an actual analog output voltage. Here, the case where the duty of the PWM signal is 50% is shown.

【0018】PWM信号のHレベルの期間では回路用電
源VCC(ここでは+5ボルト)が供給されるので、コ
ンデンサ122が充電されアナログ出力電圧は上昇す
る。PWM信号のLレベルの期間ではグランド電源(こ
こでは0ボルト)が供給されるので、コンデンサ122
は放電されアナログ出力電圧は下降する。
Since the circuit power supply VCC (+5 volts in this case) is supplied during the H level period of the PWM signal, the capacitor 122 is charged and the analog output voltage rises. Since ground power (0 volt here) is supplied during the L level period of the PWM signal, the capacitor 122
Is discharged and the analog output voltage falls.

【0019】pチャネルトランジスタ115のオン抵抗
Rpとnチャネルトランジスタ116のオン抵抗Rnと
が等しいものとすると(理想的な状態)、図9(b)に
示すように、アナログ出力電圧の上昇度合と下降度合が
等しくなり、アナログ出力電圧の平均値は2.5ボルト
となる。
Assuming that the on-resistance Rp of the p-channel transistor 115 is equal to the on-resistance Rn of the n-channel transistor 116 (ideal state), as shown in FIG. The drop rates are equal, and the average value of the analog output voltage is 2.5 volts.

【0020】pチャネルトランジスタ115のオン抵抗
Rpがnチャネルトランジスタ116のオン抵抗Rnよ
りも大きい場合、図9(c)に示すように、アナログ出
力電圧の上昇度合が理想的な状態に対して相対的に緩や
かになり、下降度合が理想的な状態に対して相対的に急
になる。このため、アナログ出力電圧の平均値(実線で
示す)はデューティ50パーセントのときの理論値2.
5ボルト(点線で示す)よりも低くなる。
When the on-resistance Rp of the p-channel transistor 115 is larger than the on-resistance Rn of the n-channel transistor 116, as shown in FIG. And the degree of descent becomes relatively steep relative to the ideal state. For this reason, the average value of the analog output voltage (shown by a solid line) is the theoretical value at a duty of 50%.
5 volts (indicated by the dotted line).

【0021】例えば、Rp=15オーム、Rn=10オ
ーム、RL=400オームとした場合のアナログ出力電
圧(平均値)は2.475ボルトであり、理論値2.5
ボルトに対して25ミリボルト低くなっている。
For example, when Rp = 15 ohms, Rn = 10 ohms, and RL = 400 ohms, the analog output voltage (average value) is 2.475 volts, and the theoretical value is 2.5 volts.
It is 25 millivolts lower than the bolt.

【0022】アナログ出力のフルレンジ(最大出力電圧
値)が5ボルトで分解能を10ビットとした場合、1ビ
ット当りの電圧は約4.88ミリボルト(5ボルト/1
024)であり、25ミリボルトは約5ビット分の誤差
となる。
When the analog output full range (maximum output voltage value) is 5 volts and the resolution is 10 bits, the voltage per bit is approximately 4.88 millivolts (5 volts / 1).
024), and 25 millivolts results in an error of about 5 bits.

【0023】このようなPWM信号出力バッファ回路部
113の出力インピーダンスの影響でアナログ出力電圧
に誤差を生ずる問題を解消するために、次のようなこと
が考えられる。
To solve such a problem that an error occurs in the analog output voltage due to the influence of the output impedance of the PWM signal output buffer circuit section 113, the following may be considered.

【0024】pチャネルトランジスタの面積を大きくし
てpチャネルトランジスタのオン抵抗Rpをnチャネル
トランジスタのオン抵抗Rnと等しくすることが考えれ
る。しかし、pチャネルトランジスタの面積を大きくす
ると、マイコンやASIC等のチップサイズが大きくな
るため好ましくない。
It is conceivable to increase the area of the p-channel transistor to make the on-resistance Rp of the p-channel transistor equal to the on-resistance Rn of the n-channel transistor. However, increasing the area of the p-channel transistor is not preferable because the chip size of a microcomputer, an ASIC, or the like increases.

【0025】PWM信号出力バッファ回路部113を構
成する各トランジスタ115,116のドレインを相互
接続せずに、pチャネルトランジスタのドレインに接続
された第1の出力端子と、nチャネルトランジスタのド
レインに接続された第2の出力端子とを設け、第2の出
力端子とローパスフィルタ回路の入力端子との間にpチ
ャネルトランジスタのオン抵抗Rpとnチャネルトラン
ジスタRnとの差の抵抗値(Rp−Rn)を有する抵抗
を介設するとともに、第1の出力端子とローパスフィル
タ回路の入力端子とを直接接続する回路構成にすること
で、VCC電源の供給能力とグランド電源の供給能力を
同じにすることが考えれる。しかし、この回路構成では
出力端子が1個増加するため好しくない。
The drains of the transistors 115 and 116 constituting the PWM signal output buffer circuit 113 are not connected to each other, but are connected to the first output terminal connected to the drain of the p-channel transistor and the drain of the n-channel transistor. And a resistance value (Rp-Rn) between the on-resistance Rp of the p-channel transistor and the n-channel transistor Rn between the second output terminal and the input terminal of the low-pass filter circuit. By providing a circuit configuration in which the first output terminal and the input terminal of the low-pass filter circuit are directly connected together with a resistor having the following, the supply capability of the VCC power supply and the supply capability of the ground power supply can be made the same. I can think. However, this circuit configuration is not preferable because the number of output terminals increases by one.

【0026】nチャネルトランジスタ116のソースを
集積回路内でグランド電源へ接続せずに、nチャネルト
ランジスタ116のソースに接続されたソース端子を設
け、このソース端子とグランド電源との間にpチャネル
トランジスタのオン抵抗Rpとnチャネルトランジスタ
Rnとの差の抵抗値(Rp−Rn)を有する抵抗を介設
することで、VCC電源の供給能力とグランド電源の供
給能力を同じにすることが考えれる。しかし、この回路
構成でも端子が1個増加するため好しくない。
The source of the n-channel transistor 116 is not connected to the ground power supply in the integrated circuit, but a source terminal connected to the source of the n-channel transistor 116 is provided, and a p-channel transistor is connected between the source terminal and the ground power supply. By providing a resistor having a resistance value (Rp-Rn) that is the difference between the on-resistance Rp and the n-channel transistor Rn, it is possible to make the supply capability of the VCC power supply and the supply capability of the ground power supply the same. However, this circuit configuration is not preferable because the number of terminals is increased by one.

【0027】PWM信号のHレベルに基づいてVCC電
源を供給する外付けのスイッチ回路と、PWM信号のH
レベルに基づいてグランド電源を供給する外付けのスイ
ッチ回路とを設け、各外付けのスイッチ回路のオン抵抗
を等しくすることで、VCC電源の供給能力とグランド
電源の供給能力を同じにすることが考えれる。しかし、
この回路構成では外付けの回路が増加するので好ましく
ない。
An external switch circuit for supplying VCC power based on the H level of the PWM signal;
An external switch circuit that supplies ground power based on the level is provided, and the on-resistance of each external switch circuit is made equal so that the VCC power supply capacity and the ground power supply capacity are the same. I can think. But,
This circuit configuration is not preferable because the number of external circuits increases.

【0028】この発明はこのような課題を解決するため
なされたもので、マイコンやASIC等の集積回路に内
蔵されたPWM信号出力バッファ回路部において、Hレ
ベルの出力能力がLレベルの出力能力よりも小さいこと
によって発生するDA変換出力の直線性誤差をハード構
成の変更を伴わうことなく解消できるようにDA変換装
置を提供することを目的とする。
The present invention has been made to solve such a problem. In a PWM signal output buffer circuit portion built in an integrated circuit such as a microcomputer or an ASIC, the output capability at the H level is higher than the output capability at the L level. It is another object of the present invention to provide a DA converter so that the linearity error of the DA conversion output caused by the small size can be eliminated without changing the hardware configuration.

【0029】[0029]

【課題を解決するための手段】前記課題を解決するため
請求項1に係るDA変換装置は、DA変換の対象である
デジタルデータをそのデジタルデータに対応した出力電
圧を実際に得ることのできる補正デジタルデータへ変換
するデータ補正手段を備え、補正デジタルデータに基づ
いて補正デジタルデータに対応したデューティのPWM
信号を生成し、生成したPWM信号をローパスフィルタ
回路へ供給してDA変換出力を得る構成としたことを特
徴とする。
According to a first aspect of the present invention, there is provided a digital-to-analog converter which corrects digital data to be subjected to DA conversion to an output voltage corresponding to the digital data. A data correction means for converting the data into digital data, and a PWM having a duty corresponding to the corrected digital data based on the corrected digital data
A signal is generated, and the generated PWM signal is supplied to a low-pass filter circuit to obtain a DA conversion output.

【0030】請求項1に係るDA変換装置は、DA変換
の対象であるデジタルデータを補正デジタルデータへ変
換し、補正デジタルデータに基づいてPWM信号を生成
し、ローパスフィルタ回路を介してDA変換出力を得
る。これにより、DA変換出力の直線性誤差を軽減する
ことができる。
The DA converter according to claim 1 converts the digital data to be DA-converted into corrected digital data, generates a PWM signal based on the corrected digital data, and outputs the PWM signal via a low-pass filter circuit. Get. Thereby, the linearity error of the DA conversion output can be reduced.

【0031】データ補正手段は、DA変換の対象である
デジタルデータとそのデジタルデータに対応した出力電
圧を実際に得ることのできる補正デジタルデータとを対
応付けデータ補正テーブルで構成してもよい。
The data correction means may comprise a correspondence data correction table in which digital data to be subjected to DA conversion and corrected digital data from which an output voltage corresponding to the digital data can be actually obtained.

【0032】データ補正テーブルを用いることで補正デ
ジタルデータへの変換を高速に行なうことができる。
By using the data correction table, conversion into corrected digital data can be performed at high speed.

【0033】請求項3に係るDA変換装置は、DA変換
の対象であるデジタルデータに対応した出力電圧を発生
させるために必要となる補正デジタルデータを演算によ
って求める補正デジタルデータ演算手段を備え、演算に
よって求めた補正デジタルデータに基づいて補正デジタ
ルデータに対応したデューティのPWM信号を生成し、
生成したPWM信号をローパスフィルタ回路へ供給して
DA変換出力を得る構成としたことを特徴とする。
According to a third aspect of the present invention, there is provided a DA converter, comprising a correction digital data calculating means for calculating correction digital data necessary for generating an output voltage corresponding to the digital data to be DA-converted. Generating a PWM signal having a duty corresponding to the corrected digital data based on the corrected digital data obtained by
The generated PWM signal is supplied to a low-pass filter circuit to obtain a DA conversion output.

【0034】請求項3に係るDA変換装置は、DA変換
の対象であるデジタルデータを演算によって補正デジタ
ルデータへ変換し、補正デジタルデータに基づいてPW
M信号を生成し、ローパスフィルタ回路を介してDA変
換出力を得る。これにより、DA変換出力の直線性誤差
を軽減することができる。
According to a third aspect of the present invention, a DA converter converts digital data to be DA-converted into corrected digital data by calculation, and performs PW conversion based on the corrected digital data.
An M signal is generated, and a DA conversion output is obtained via a low-pass filter circuit. Thereby, the linearity error of the DA conversion output can be reduced.

【0035】補正デジタルデータ演算手段は、PWM信
号のHレベル出力時の出力抵抗をRp、PWM信号のL
レベル出力時の出力抵抗をRn、ローパスフィルタ回路
部の入力抵抗をRL、PWM信号のHレベルの電圧をV
H、PWM信号のLレベルの電圧をVL、PWM信号の
Hレベルの期間をTH、PWM信号のLレベルの期間を
TLとした時に、出力電圧Vが次の式で表わせることを
利用して、
The correction digital data calculation means sets the output resistance at the time of outputting the PWM signal at the H level to Rp and the output resistance at the L level of the PWM signal.
The output resistance at the time of level output is Rn, the input resistance of the low-pass filter circuit section is RL, and the H level voltage of the PWM signal is V.
When the L level voltage of the H and PWM signals is VL, the H level period of the PWM signal is TH, and the L level period of the PWM signal is TL, the output voltage V can be expressed by the following equation. ,

【数3】 デジタルデータに対応した出力電圧を発生させるために
必要となる補正デジタルデータを求めるようにしてもよ
い。
(Equation 3) The correction digital data required to generate the output voltage corresponding to the digital data may be obtained.

【0036】補正デジタルデータ演算手段は、PWM信
号のHレベル出力時の出力抵抗をRp、PWM信号のL
レベル出力時の出力抵抗をRn、ローパスフィルタ回路
部の入力抵抗をRL、PWM信号のHレベルの期間をT
H、PWM信号のLレベルの期間をTLとした時に、実
質的なデューティDHが次の式で表わせることを利用し
て、
The correction digital data calculation means sets the output resistance when the PWM signal is at the H level to Rp, and sets the output resistance to the L level of the PWM signal.
The output resistance at the time of level output is Rn, the input resistance of the low-pass filter circuit section is RL, and the H level period of the PWM signal is T.
By using the fact that the substantial duty DH can be expressed by the following equation when the period of the L level of the H and PWM signals is TL,

【数4】 デジタルデータに対応した出力電圧を発生させるために
必要となる補正デジタルデータを求めるようにしてもよ
い。
(Equation 4) The correction digital data required to generate the output voltage corresponding to the digital data may be obtained.

【0037】PWM信号のHレベル出力時の出力抵抗を
Rp、PWM信号のLレベル出力時の出力抵抗をRn、
ならびに、ローパスフィルタ回路部の入力抵抗をRLを
考慮して、実質的なデューティDHがデジタルデータで
指定される値となるように補正デジタルデータを求め、
求めた補正デジタルデータに基づいてPWM信号を生成
し、ローパスフィルタ回路を介してDA変換出力を得る
ことで、DA変換出力の直線性誤差を軽減することがで
きる。
The output resistance when the PWM signal is output at the H level is Rp, the output resistance when the PWM signal is output at the L level is Rn,
In addition, in consideration of RL, the input resistance of the low-pass filter circuit section is used to obtain corrected digital data so that the substantial duty DH becomes a value specified by the digital data.
By generating a PWM signal based on the obtained corrected digital data and obtaining a DA conversion output via a low-pass filter circuit, a linearity error of the DA conversion output can be reduced.

【0038】なお、請求項1に係るデジタルアナログ変
換装置において、データ補正手段は、デジタルアナログ
変換の対象であるデジタルデータとそのデジタルデータ
に対する補正量データとを対応付けた補正量データテー
ブルを備えるとともに、デジタルアナログ変換の対象で
あるデジタルデータとそのデジタルデータに対する補正
量データとに基づいて補正デジタルデータを演算するデ
ータ補正部を備える構成としてもよい。
In the digital-to-analog converter according to the first aspect, the data correction means includes a correction amount data table in which digital data to be subjected to the digital-to-analog conversion is associated with correction amount data for the digital data. Alternatively, a configuration may be provided that includes a data correction unit that calculates corrected digital data based on digital data to be subjected to digital-to-analog conversion and correction amount data for the digital data.

【0039】データテーブルに補正量を格納する構成に
することで、格納するデータ量を低減することができ
る。デジタルアナログ変換の対象であるデジタルデータ
が例えば10ビットである場合、その補正量は1〜3ビ
ット程度の小さな値である。したがって、データテーブ
ルに10ビットの補正デジタルデータを格納する場合と
比較して、データテーブルのデータ量を減少できる。例
えば、データテーブルをROM等の半導体メモリで構成
する場合には、その記憶容量を低減することができる。
データテーブルから数ビット(1〜3ビット)の補正量
を読み出して、デジタルアナログ変換の対象であるデジ
タルデータにデータテーブルから読み出した補正量を加
算(補正値が負であるときは減算)することで補正デジ
タルデータを得ることができる。
By using a configuration in which the correction amount is stored in the data table, the amount of data to be stored can be reduced. When digital data to be subjected to digital-to-analog conversion is, for example, 10 bits, the correction amount is a small value of about 1 to 3 bits. Therefore, the data amount of the data table can be reduced as compared with the case where 10-bit corrected digital data is stored in the data table. For example, when the data table is configured by a semiconductor memory such as a ROM, the storage capacity can be reduced.
Reading the correction amount of several bits (1 to 3 bits) from the data table and adding the correction amount read from the data table to the digital data to be subjected to the digital-to-analog conversion (subtracting when the correction value is negative) To obtain corrected digital data.

【0040】さらに、補正量データテーブルは、デジタ
ルアナログ変換の対象であるデジタルデータの上位複数
ビットに対応して補正量データを備える構成としてもよ
い。
Further, the correction amount data table may include correction amount data corresponding to a plurality of upper bits of digital data to be subjected to digital / analog conversion.

【0041】補正量データは、デジタルアナログ変換の
対象であるデジタルデータの比較的広い範囲に亘って同
一の値となる。したがって、デジタルアナログ変換の対
象であるデジタルデータの上位複数ビットに対応して補
正量データを備える構成とすることで、補正量データテ
ーブルのデータ量をさらに少なくすることができる。
The correction amount data has the same value over a relatively wide range of digital data to be subjected to digital-to-analog conversion. Therefore, by providing a configuration in which the correction amount data is provided corresponding to a plurality of upper bits of digital data to be subjected to digital-to-analog conversion, the data amount of the correction amount data table can be further reduced.

【0042】[0042]

【発明の実施の形態】以下、この発明の実施の形態を添
付図面に基づいて説明する。
Embodiments of the present invention will be described below with reference to the accompanying drawings.

【0043】図1は請求項1に係るDA変換装置のブロ
ック構成図である。図1に示すDA変換装置1は、マイ
コン10とローパスフィルタ回路20とからなる。マイ
コン10は、CPU部11と、データ補正手段14と、
PWM回路部12と、PWM信号出力バッファ回路部1
3と、図示しないROM、RAM、各種入出力部等を備
える。PWM信号出力バッファ回路部13は、インバー
タ13Iと、pチャネルトランジスタ13Pと、nチャ
ネルトランジスタ13Nとからなる。ローパスフィルタ
回路20は、入力抵抗RLとコンデンサC1とからなる
フィルタ次数が1次の受動型ローパスフィルタで構成し
ている。
FIG. 1 is a block diagram of a DA converter according to the first embodiment. The DA converter 1 shown in FIG. 1 includes a microcomputer 10 and a low-pass filter circuit 20. The microcomputer 10 includes a CPU unit 11, a data correction unit 14,
PWM circuit section 12 and PWM signal output buffer circuit section 1
3 and a ROM, a RAM, various input / output units (not shown) and the like. The PWM signal output buffer circuit unit 13 includes an inverter 13I, a p-channel transistor 13P, and an n-channel transistor 13N. The low-pass filter circuit 20 is constituted by a passive low-pass filter having a first-order filter composed of an input resistor RL and a capacitor C1.

【0044】CPU部11は、予め設定したDA変換周
期毎にDA変換の対象となるデジタルデータ11aを出
力する。本実施の形態では、10ビットのデジタルデー
タ11aを出力する。このデジタルデータ11aはデー
タ補正手段14へ供給される。
The CPU section 11 outputs digital data 11a to be subjected to DA conversion at every preset DA conversion cycle. In this embodiment, 10-bit digital data 11a is output. The digital data 11a is supplied to the data correction means 14.

【0045】データ補正手段14は、デジタルデータ1
1aに基づいてデジタルデータ11aに対応したアナロ
グ出力電圧Vを実際に得るために必要となる補正デジタ
ルデータ14aを出力する。このデータ補正手段14
は、デジタルデータ11aを補正デジタルデータ14a
へ変換するデータ補正テーブルを用いて構成している。
補正デジタルデータ14aはPWM回路部12へ供給さ
れる。
The data correction means 14 outputs the digital data 1
The correction digital data 14a necessary for actually obtaining the analog output voltage V corresponding to the digital data 11a is output based on 1a. This data correction means 14
Converts the digital data 11a to the corrected digital data 14a
It is configured using a data correction table that converts the data into a data.
The correction digital data 14a is supplied to the PWM circuit unit 12.

【0046】PWM回路部12は、図示しないカウンタ
クロックを計数する図示しないバイナリカウンタ回路部
と、バイナリカウンタ回路部のカウント値と補正デジタ
ルデータ14aとの大小関係を比較してPWM信号を生
成するPWM信号生成部(図示しない)とを備える。こ
のPWM回路部12は、バイナリカウンタ回路部のカウ
ント値が補正デジタルデータ14aの値に達するまでは
Hレベルの信号12aを出力し、それ以降はLレベルの
信号12aを出力することを、DA変換周期毎に繰り返
す。
The PWM circuit section 12 generates a PWM signal by comparing the magnitude relationship between the count value of the binary counter circuit section and the corrected digital data 14a with a binary counter circuit section (not shown) that counts a counter clock (not shown). A signal generator (not shown). The PWM circuit unit 12 outputs the H-level signal 12a until the count value of the binary counter circuit unit reaches the value of the corrected digital data 14a, and thereafter outputs the L-level signal 12a, by DA conversion. Repeat every cycle.

【0047】PWM信号出力バッファ回路部13は、信
号12aがHレベルの場合にはインバータ13Iを介し
てpチャネルトランジスタ13Pがオン状態に駆動され
るともにnチャネルトランジスタ13Nがオフ状態に駆
動され、pチャネルトランジスタ13Pを介してVCC
電源(ここでは+5ボルト)をローパスフィルタ回路2
0へ供給する。PWM信号出力バッファ回路部13は、
信号12aがLレベルの場合にはインバータ13Iを介
してpチャネルトランジスタ13Pがオフ状態に駆動さ
れるともにnチャネルトランジスタ13Nがオン状態に
駆動され、nチャネルトランジスタ13Pを介してグラ
ンド電源電源(ここでは0ボルト)をローパスフィルタ
回路20へ供給する。
When the signal 12a is at the H level, the PWM signal output buffer circuit 13 drives the p-channel transistor 13P to the on state and the n-channel transistor 13N to the off state via the inverter 13I. VCC via the channel transistor 13P
The power supply (here, +5 volts) is connected to the low-pass filter circuit 2
0. The PWM signal output buffer circuit unit 13 includes:
When the signal 12a is at the L level, the p-channel transistor 13P is driven off via the inverter 13I and the n-channel transistor 13N is driven on, and the ground power supply (here, the power supply) via the n-channel transistor 13P. 0 volts) to the low pass filter circuit 20.

【0048】ローパスフィルタ回路20は、マイコン1
0から出力されたPWM信号10aの高周波成分を除去
して(PWM信号10aを平滑して)、アナログ出力信
号(DA変換出力)を出力する。
The low-pass filter circuit 20 includes the microcomputer 1
The high-frequency component of the PWM signal 10a output from 0 is removed (smoothing the PWM signal 10a), and an analog output signal (DA conversion output) is output.

【0049】10ビット構成のデジタルデータ11aに
よって、10進表記で例えば512が設定された場合、
従来はPWM回路部12によってデューティ50パーセ
ント(512/1024)の信号12aを生成し、その
信号12aに基づいてPWM信号出力バッファ回路部1
3を介してデューティ50パーセントのPWM信号10
aを出力し、ローパスフィルタ回路20を介して例えば
2.5ボルト(VCC電源の電源電圧が5ボルトである
場合)のアナログ出力信号を得るようにしている。
When, for example, 512 is set in decimal notation by the 10-bit digital data 11a,
Conventionally, a signal 12a having a duty of 50% (512/1024) is generated by the PWM circuit unit 12, and based on the signal 12a, the PWM signal output buffer circuit unit 1
PWM signal 10 with 50% duty via 3
a, and an analog output signal of, for example, 2.5 volts (when the power supply voltage of the VCC power supply is 5 volts) is obtained through the low-pass filter circuit 20.

【0050】しかしながら、PWM信号出力バッファ回
路部13を構成するpチャネルトランジスタ13Pのオ
ン抵抗(Hレベル出力時の出力抵抗)Rpがnチャネル
トランジスタ13Nのオン抵抗(Lレベル出力時の出力
抵抗)Rnよりも大きい場合、アナログ出力信号の電圧
は目標とする2.5ボルトよりも若干低い値となる。
However, the on-resistance (output resistance at the time of H-level output) Rp of the p-channel transistor 13P constituting the PWM signal output buffer circuit section 13 is equal to the on-resistance (output resistance at the time of L-level output) Rn of the n-channel transistor 13N. Otherwise, the voltage of the analog output signal will be slightly lower than the target 2.5 volts.

【0051】そこで、デジタルデータ11aが10進表
記で512である場合、そのデータに対応して出力すべ
き電圧2.5ボルトを実際に得ることができる補正デジ
タルデータ14a(例えば10進表記で515)を予め
求めておく。そして、512という値を例えば515へ
変換して、PWM回路部12へ供給することで、10進
表記で515に対応したデューティ(515/102
4)のPWM信号を生成させる。これにより、デジタル
データ11aに対応した出力電圧2.5ボルトを得るこ
とができる。
Therefore, when the digital data 11a is 512 in decimal notation, the corrected digital data 14a (for example, 515 in decimal notation) that can actually obtain a voltage of 2.5 volts to be output corresponding to the data. ) Is obtained in advance. Then, the value of 512 is converted into, for example, 515, and supplied to the PWM circuit unit 12, so that the duty corresponding to 515 in decimal notation (515/102
4) The PWM signal is generated. Thereby, an output voltage of 2.5 volts corresponding to the digital data 11a can be obtained.

【0052】データ補正手段14は、各デジタルデータ
(10進表記で0〜1024)に対して予め設定した補
正デジタルデータをテーブル形式で格納している。そし
て、このデータ補正手段14は、デジタルデータ11a
に対して補正デジタルデータ14aを出力する。
The data correction means 14 stores correction digital data preset for each digital data (0 to 1024 in decimal notation) in a table format. Then, the data correction means 14 outputs the digital data 11a
Output the corrected digital data 14a.

【0053】図2はデータ補正テーブルの一具体例を示
す説明図である。図2に示すデータ補正テーブルは、p
チャネルトランジスタ13Pのオン抵抗(Hレベル出力
時の出力抵抗)Rpが15オーム、nチャネルトランジ
スタ13Nのオン抵抗(Lレベル出力時の出力抵抗)R
nが10オーム、ローパスフィルタ回路20の入力抵抗
RLが400オームである場合の補正デジタルデータを
示している。
FIG. 2 is an explanatory diagram showing a specific example of the data correction table. The data correction table shown in FIG.
The ON resistance (output resistance at the time of H level output) Rp of the channel transistor 13P is 15 ohms, and the ON resistance (output resistance at the time of L level output) R of the n-channel transistor 13N is R
The figure shows corrected digital data when n is 10 ohms and the input resistance RL of the low-pass filter circuit 20 is 400 ohms.

【0054】補正デジタルデータは、アナログ出力電圧
の測定結果に基づいてを求めるようにしてもよい。ま
た、アナログ出力電圧Vが次の式1で近似できることを
利用して、補正デジタルデータを予め計算によって求め
るようにしてもよい。
The correction digital data may be obtained based on the measurement result of the analog output voltage. Further, by utilizing the fact that the analog output voltage V can be approximated by the following equation 1, the corrected digital data may be obtained in advance by calculation.

【0055】[0055]

【数5】 (Equation 5)

【0056】ここで、Rpはpチャネルトランジスタ1
3Pのオン抵抗(Hレベル出力時の出力抵抗)、Rnは
nチャネルトランジスタ13Nのオン抵抗(Lレベル出
力時の出力抵抗)Rn、THはPWM信号のHレベルの
期間、TLはPWM信号のLレベルの期間、VCCは回
路用電源の電源電圧である。
Here, Rp is a p-channel transistor 1
3P ON resistance (output resistance at H level output), Rn is ON resistance of n channel transistor 13N (output resistance at L level output) Rn, TH is H level period of PWM signal, and TL is L level of PWM signal. During the level period, VCC is the power supply voltage of the circuit power supply.

【0057】なお、10ビット構成のデジタルデータを
用いる場合、PWM信号を生成するための基準クロック
の周期をTcとすると、PWM信号の1周期は1024
×Tcとなる。デジタルデータを10進表記でXとする
と、PWM信号のHレベルの期間はX×Tcとなり、P
WM信号のLレベルの期間TLは(1024−X)×T
cとなる。基準クロックの周期Tcは消去できるので、
上記の式1は次に示す式2で表わすことができる。
When using 10-bit digital data, one cycle of the PWM signal is 1024, where Tc is the cycle of the reference clock for generating the PWM signal.
× Tc. If the digital data is represented by X in decimal notation, the H level period of the PWM signal is X × Tc,
The period TL of the L level of the WM signal is (1024−X) × T
c. Since the period Tc of the reference clock can be deleted,
The above equation 1 can be expressed by the following equation 2.

【0058】[0058]

【数6】 (Equation 6)

【0059】よって、10ビット構成のデジタルデータ
を用いる場合は、上記の式2を利用して、目標とするア
ナログ出力電圧Vが得られる補正デジタルデータXを求
めるようにしてもよい。
Therefore, when digital data having a 10-bit configuration is used, the corrected digital data X for obtaining the target analog output voltage V may be obtained by using the above equation (2).

【0060】そして、予め求めた求めた補正デジタルデ
ータをデータ補正テーブルとして例えばROM等の不揮
発性メモリに書き込んでおく。
The correction digital data obtained in advance is written as a data correction table in a nonvolatile memory such as a ROM.

【0061】以上の構成であるから図1に示したDA変
換装置1は、データ補正手段14によってDA変換の対
象であるデジタルデータ11aを補正デジタルデータ1
4aへ変換し、変換された補正デジタルデータ14aに
基づいてPWM信号10aを生成し、ローパスフィルタ
回路20を介してDA変換出力(アナログ出力信号)を
得ることができる。PWM信号出力バッファ回路部13
におけるHレベル出力時の出力能力とLレベル出力時の
出力能力とが異なることに伴った生ずるアナログ出力電
圧の直線性誤差をデジタルデータを補正することが解消
する構成としているので、DA変換出力(アナログ出力
信号)の直線性誤差を少なくできる。よって、DA変換
の対象であるデジタルデータに対応した精度の高い電圧
を得ることができる。
With the above configuration, the DA converter 1 shown in FIG. 1 converts the digital data 11a to be DA-converted by the data
4a, generates a PWM signal 10a based on the converted corrected digital data 14a, and obtains a DA conversion output (analog output signal) via the low-pass filter circuit 20. PWM signal output buffer circuit section 13
In this configuration, it is possible to eliminate the correction of the digital data for the linearity error of the analog output voltage caused by the difference between the output capability at the H level output and the output capability at the L level output. The linearity error of the analog output signal can be reduced. Therefore, a highly accurate voltage corresponding to the digital data to be DA-converted can be obtained.

【0062】図3は請求項1に係る他のDA変換装置の
ブロック構成図である。図3に示すDA変換装置2は、
マイコン30のCPU部31を用いてプログラマ制御に
よって動作するデータ補正手段34を構成したものであ
る。データ補正手段34は、補正条件格納部35とデー
タ補正部36とからなる。補正条件格納部35は、特許
請求の範囲に補正量データテーブルに相当するものであ
る。PWM回路部12、PWM信号出力バッファ回路部
13ならびにローパスフィルタ回路20の構成は、図1
に示したものと同じである。
FIG. 3 is a block diagram of another DA converter according to the first embodiment. The DA converter 2 shown in FIG.
The data correcting means 34 operates under the control of a programmer using the CPU 31 of the microcomputer 30. The data correction unit 34 includes a correction condition storage unit 35 and a data correction unit 36. The correction condition storage unit 35 corresponds to a correction amount data table in the claims. The configurations of the PWM circuit section 12, the PWM signal output buffer circuit section 13 and the low-pass filter circuit 20 are shown in FIG.
Is the same as that shown in FIG.

【0063】補正条件格納部35は、DA変換の対象と
なるデジタルデータに対してそのデジタルデータに加算
補正する補正値を格納している。デジタルデータが10
ビットであるものとして、デジタルデータの範囲と補正
値との関係の一例を次に示す。デジタルデータが10進
表記で0〜64の範囲は補正値0、65〜192の範囲
は補正値+1、193〜320の範囲は補正値+2、1
94〜704の範囲は補正値+3、705〜832の範
囲は補正値+1、833〜960の範囲は補正値+1、
961〜1024の範囲は補正値0とする。
The correction condition storage unit 35 stores a correction value for adding and correcting digital data to be DA-converted to the digital data. 10 digital data
An example of the relationship between the range of the digital data and the correction value as a bit is shown below. When the digital data is in decimal notation, the range of 0 to 64 is the correction value 0, the range of 65 to 192 is the correction value +1, the range of 193 to 320 is the correction value +2, 1,
The range from 94 to 704 is the correction value +3, the range from 705 to 832 is the correction value +1, the range from 833 to 960 is the correction value +1,
The range from 961 to 1024 is set to the correction value 0.

【0064】データ補正部36は、CPU部31からD
A変換の対象となるデジタルデータ11aが供給される
と、そのデジタルデータ11aの値に基づいて補正条件
格納部35からそのデジタルデータ11aの値に対応す
る補正値を取得し、取得した補正値をデジタルデータ1
1aに加算して補正デジタルデータ14aを生成して、
生成した補正デジタルデータ14aをPWM回路部12
へ供給する。
The data correction section 36 receives a signal from the CPU section 31
When the digital data 11a to be A-converted is supplied, a correction value corresponding to the value of the digital data 11a is obtained from the correction condition storage unit 35 based on the value of the digital data 11a, and the obtained correction value is obtained. Digital data 1
1a to generate corrected digital data 14a,
The generated correction digital data 14a is transmitted to the PWM circuit 12
Supply to

【0065】例えば、DA変換の対象となるデジタルデ
ータ11aが10進表記で512である場合、その値5
12に対する補正値は+3であるので、データ補正部3
6は512に3を加算して得た515の値を補正デジタ
ルデータ14aとしてPWM回路部12へ供給する。
For example, if the digital data 11a to be subjected to DA conversion is 512 in decimal notation, the value 5
12 is +3, the data correction unit 3
6 supplies the value of 515 obtained by adding 3 to 512 to the PWM circuit unit 12 as corrected digital data 14a.

【0066】以上の構成であるから図3に示したDA変
換装置2は、図1に示したDA変換装置1と同様に、D
A変換の対象となるデジタルデータ11aをそのデジタ
ルデータ11aで指定される出力電圧を実際の得ること
のできる補正デジタルデータ14aへ変換し、変換され
た補正デジタルデータ14aに基づいてPWM信号10
aを生成するので、ローパスフィルタ20を介してデジ
タルデータ11aで指定される出力電圧と同じまたは極
めて近い電圧を出力させることができる。よって、DA
変換出力(アナログ出力信号)の直線性誤差を少なくで
き、さらに、DA変換の対象であるデジタルデータに対
応した精度の高い電圧を得ることができる。
With the above configuration, the D / A converter 2 shown in FIG. 3 is similar to the D / A converter 1 shown in FIG.
The digital data 11a to be A-converted is converted into corrected digital data 14a capable of actually obtaining an output voltage designated by the digital data 11a, and the PWM signal 10 is converted based on the converted corrected digital data 14a.
Since a is generated, a voltage that is the same as or very close to the output voltage specified by the digital data 11a can be output via the low-pass filter 20. Therefore, DA
The linearity error of the conversion output (analog output signal) can be reduced, and a highly accurate voltage corresponding to the digital data to be DA-converted can be obtained.

【0067】なお、補正条件格納部35は、デジタルデ
ータ11aの補正範囲を上記よりもさらに細かく設定す
るとともに、例えば+0.5,+1.5,+2.25等
の小数点以下の値を有する補正値を設定するようにして
もよい。ここで、補正値が+0.5の場合、データ補正
部36は、同一のデジタルデータ11aが連続して供給
された際に、デジタルデータ11aに対して+1した補
正デジタルデータと何ら補正を施さないデータ(すなわ
ちデジタルデータ11a)を交互に出力する。補正値が
+1.5の場合、データ補正部36は、同一のデジタル
データ11aが連続して供給された際に、デジタルデー
タ11aに対して+1した補正デジタルデータと+2し
た補正デジタルデータを交互に出力する。また、補正値
が+2.25の場合、データ補正部36は、同一のデジ
タルデータ11aが連続して供給された際に、デジタル
データ11aに対して+2した補正デジタルデータを3
回出力した後はデジタルデータに+3した補正デジタル
データを1回出力することを繰り返す。
The correction condition storage unit 35 sets the correction range of the digital data 11a more finely than the above, and sets a correction value having a value after the decimal point such as +0.5, +1.5, +2.25. May be set. Here, when the correction value is +0.5, when the same digital data 11a is continuously supplied, the data correction unit 36 does not perform any correction with the corrected digital data obtained by adding +1 to the digital data 11a. Data (that is, digital data 11a) is output alternately. When the correction value is +1.5, when the same digital data 11a is continuously supplied, the data correction unit 36 alternately changes the correction digital data obtained by adding +1 to the digital data 11a and the correction digital data obtained by adding +2 to the digital data 11a. Output. When the correction value is +2.25, when the same digital data 11a is continuously supplied, the data correction unit 36 adds the corrected digital data obtained by adding +2 to the digital data 11a to 3
After output once, output of corrected digital data obtained by adding +3 to digital data is repeated once.

【0068】このようにPWM信号の複数の周期にわた
る平均化処理を採用することで、デジタルデータの1ビ
ット(1LSB)よりもさらに細かいステップでアナロ
グ出力電圧を調整することができる。例えばフルレンジ
が5ボルトで分解能が10ビット相当(1024段階)
とした場合、1ビット相当の電圧は約4.88ミリボル
トであり、約4.88ミリボルト単位で出力電圧が変化
することになる。これに対して、PWM信号の複数の周
期にわたる平均化処理を採用することで、例えば約1.
22ミリボルト単位で出力電圧を調整することが可能に
なる。よって、この発明に係るDA変換装置を用いて、
直流基準電圧等を高精度で発生させることが可能とな
る。
As described above, by employing the averaging process of the PWM signal over a plurality of cycles, the analog output voltage can be adjusted in steps smaller than one bit (1 LSB) of digital data. For example, the full range is 5 volts and the resolution is equivalent to 10 bits (1024 steps)
In this case, the voltage corresponding to one bit is about 4.88 millivolts, and the output voltage changes in units of about 4.88 millivolts. On the other hand, by averaging the PWM signal over a plurality of cycles, for example, about 1.
The output voltage can be adjusted in units of 22 millivolts. Therefore, using the DA converter according to the present invention,
It is possible to generate a DC reference voltage or the like with high accuracy.

【0069】補正値は、デジタルアナログ変換の対象で
あるデジタルデータの比較的広い範囲に亘って同一の値
となる。そこで、補正条件格納部35は、デジタルアナ
ログ変換の対象であるデジタルデータの上位複数ビット
に対応して補正値を格納する構成としてもよい。例えば
デジタルアナログ変換の対象であるデジタルデータが1
0ビットである場合、例えばその上位6ビットを指定す
ることで補正値を得るようにする。このような構成にす
ることで、補正条件格納部35に格納するデータ量を大
幅に低減することができる。この場合、データ補正部3
6は、デジタルアナログ変換の対象であるデジタルデー
タ11aの上位6ビットを補正条件格納部35へ供給し
て、その上位6ビットに対応した補正値を得る。そし
て、データ補正部36は、デジタルアナログ変換の対象
であるデジタルデータ11aに補正値を加算することで
補正デジタルデータ14aを求め、求めた補正デジタル
データ14aをPWM回路部12へ供給する。
The correction value is the same over a relatively wide range of digital data to be subjected to digital-to-analog conversion. Therefore, the correction condition storage unit 35 may be configured to store a correction value corresponding to a plurality of upper bits of digital data to be subjected to digital-to-analog conversion. For example, if the digital data to be digital-to-analog converted is 1
In the case of 0 bits, a correction value is obtained by designating, for example, the upper 6 bits. With such a configuration, the amount of data stored in the correction condition storage unit 35 can be significantly reduced. In this case, the data correction unit 3
6 supplies the upper 6 bits of the digital data 11a to be subjected to the digital-to-analog conversion to the correction condition storage unit 35, and obtains a correction value corresponding to the upper 6 bits. Then, the data correction unit 36 obtains the correction digital data 14a by adding a correction value to the digital data 11a to be subjected to the digital-to-analog conversion, and supplies the obtained correction digital data 14a to the PWM circuit unit 12.

【0070】図4は請求項3に係るDA変換装置のブロ
ック構成図である。図4に示すDA変換装置3は、マイ
コン40とローパスフィルタ回路20とからなる。マイ
コン40は、CPU部41と、PWM回路部12と、P
WM信号出力バッファ回路部13等を備える。CPU部
41を用いてプログラマ制御によって動作する補正デジ
タルデータ演算手段42を構成している。PWM回路部
12、PWM信号出力バッファ回路部13、ならびに、
ローパスフィルタ回路20の構成は、図1に示したもの
と同じである。
FIG. 4 is a block diagram of a DA converter according to a third aspect. The DA converter 3 shown in FIG. 4 includes a microcomputer 40 and a low-pass filter circuit 20. The microcomputer 40 includes a CPU 41, a PWM circuit 12,
It includes a WM signal output buffer circuit section 13 and the like. The correction digital data calculating means 42 which operates under the control of the programmer using the CPU 41 is constituted. PWM circuit section 12, PWM signal output buffer circuit section 13, and
The configuration of the low-pass filter circuit 20 is the same as that shown in FIG.

【0071】補正デジタルデータ演算手段42は、CP
U部41からDA変換の対象となるmビットのデジタル
データ11aが供給されると、先ずそのデジタルデータ
11aによって指定される出力電圧VAを次に示す式3
に基づいて計算する。
The correction digital data calculation means 42 outputs the CP
When the m-bit digital data 11a to be subjected to DA conversion is supplied from the U unit 41, first, the output voltage VA specified by the digital data 11a is calculated by the following equation (3).
Calculate based on

【0072】[0072]

【数7】 (Equation 7)

【0073】ここで、VAは出力電圧(理論値)、DD
はデジタルデータ11aによって指定された値(10進
表記)、mはDA変換の対象となるデジタルデータのビ
ット数、VCCは回路用電源の電源電圧である。
Here, VA is the output voltage (theoretical value), DD
Is a value (decimal notation) designated by the digital data 11a, m is the number of bits of digital data to be subjected to DA conversion, and VCC is a power supply voltage of a circuit power supply.

【0074】例えば、デジタルデータのビット数mを1
0、デジタルデータ11aによって指定された値(10
進表記)DDを512、回路用電源の電源電圧を5ボル
トとすると、出力電圧(理論値)VAは、2.5ボルト
((512/1024)×5ボルト)となる。
For example, the bit number m of digital data is set to 1
0, the value specified by the digital data 11a (10
Assuming that DD is 512 and the power supply voltage of the circuit power supply is 5 volts, the output voltage (theoretical value) VA is 2.5 volts ((512/1024) × 5 volts).

【0075】次に、補正デジタルデータ演算手段42
は、実際に出力される出力電圧Vが、次に示す式4で表
わせることを利用して、先に求めた出力電圧(理論値)
VA(例えば2.5ボルト)に最も近い出力電圧Vが得
られる補正デジタルデータXを演算によって求める。
Next, the correction digital data calculation means 42
Is the output voltage (theoretical value) previously obtained using the fact that the output voltage V actually output can be expressed by the following equation 4.
Corrected digital data X that provides an output voltage V closest to VA (for example, 2.5 volts) is obtained by calculation.

【0076】[0076]

【数8】 (Equation 8)

【0077】ここで、Vは実際の出力電圧、Xは補正デ
ジタルデータ(10進表記)、Rpはpチャネルトラン
ジスタ13Pのオン抵抗(Hレベル出力時の出力抵
抗)、Rnはnチャネルトランジスタ13Nのオン抵抗
(Lレベル出力時の出力抵抗)、RLはローパスフィル
タ回路20の入力抵抗、mはデジタルデータのビット
数、VCCは回路用電源の電源電圧である。
Here, V is the actual output voltage, X is the corrected digital data (decimal notation), Rp is the on-resistance of the p-channel transistor 13P (output resistance at the time of H level output), and Rn is the n-channel transistor 13N. On resistance (output resistance at the time of L level output), RL is an input resistance of the low-pass filter circuit 20, m is the number of bits of digital data, and VCC is a power supply voltage of a circuit power supply.

【0078】なお、補正デジタルデータ(10進表記)
Xは特許請求の範囲に記載したPWM信号のHレベルの
期間THに相当するものである。(2のm乗−X)は特
許請求の範囲に記載したPWM信号のLレベルの期間T
Lに相当するものである。回路用電源の電源電圧VCC
は、特許請求の範囲に記載したPWM信号のHレベルの
電位VHと特許請求の範囲に記載したPWM信号のLレ
ベルの電位VLとの差(VH−VL)に相当するもので
ある。
The corrected digital data (decimal notation)
X corresponds to an H-level period TH of the PWM signal described in the claims. (2 m -X) is the L level period T of the PWM signal described in the claims.
L. Power supply voltage VCC for circuit power supply
Is equivalent to the difference (VH-VL) between the H-level potential VH of the PWM signal and the L-level potential VL of the PWM signal described in the claims.

【0079】補正デジタルデータ演算手段42は、式4
に基づいて出力電圧(理論値)VAに最も近い出力電圧
Vが得られる補正デジタルデータXを演算によって求め
ると、求めた補正デジタルデータXをPWM回路部12
へ供給する。
The correction digital data calculation means 42 calculates
Is calculated based on the calculated digital data X that provides the output voltage V closest to the output voltage (theoretical value) VA.
Supply to

【0080】PWM回路部12は、補正デジタルデータ
Xに基づいてその補正デジタルデータXに対応したデュ
ーティの信号12aを生成して出力する。この信号12
aは、PWM信号出力バッファ回路部13を介してPW
M信号10aとしてローパスフィルタ回路20へ供給さ
れ、ローパスフィルタ回路20を介してアナログ出力信
号(DA変換出力)が得られる。
The PWM circuit section 12 generates and outputs a signal 12a having a duty corresponding to the corrected digital data X based on the corrected digital data X. This signal 12
a is the PWM signal via the PWM signal output buffer circuit 13
The signal is supplied to the low-pass filter circuit 20 as the M signal 10a, and an analog output signal (DA conversion output) is obtained through the low-pass filter circuit 20.

【0081】以上の構成であるから図4に示したDA変
換装置3は、補正デジタルデータ演算手段42によって
DA変換の対象となるデジタルデータ11aをそのデジ
タルデータ11aで指定される出力電圧を実際に得るこ
とのできる補正デジタルデータ14a(X)へ変換し、
変換された補正デジタルデータ14a(X)に基づいて
PWM信号10aを生成するので、ローパスフィルタ2
0を介してデジタルデータ11aで指定される出力電圧
と同じまたは極めて近い電圧を出力させることができ
る。よって、DA変換出力(アナログ出力信号)の直線
性誤差を少なくでき、さらに、DA変換の対象であるデ
ジタルデータに対応した精度の高い電圧を得ることがで
きる。
With the above configuration, the DA converter 3 shown in FIG. 4 converts the digital data 11a to be subjected to DA conversion by the correction digital data calculating means 42 into an output voltage specified by the digital data 11a. Is converted into obtainable corrected digital data 14a (X),
Since the PWM signal 10a is generated based on the converted corrected digital data 14a (X), the low-pass filter 2
A voltage which is the same as or very close to the output voltage specified by the digital data 11a can be output via the "0". Therefore, the linearity error of the DA conversion output (analog output signal) can be reduced, and a highly accurate voltage corresponding to the digital data to be DA converted can be obtained.

【0082】pチャネルトランジスタ13Pのオン抵抗
(Hレベル出力時の出力抵抗)Rp、nチャネルトラン
ジスタ13Nのオン抵抗(Lレベル出力時の出力抵抗)
Rn、ローパスフィルタ回路20の入力抵抗RL、回路
用電源の電源電圧VCC等の各値は、予め設定した値を
用いる構成としている。
On-resistance of p-channel transistor 13P (output resistance at the time of H-level output) Rp, on-resistance of n-channel transistor 13N (output resistance at the time of L-level output)
Each value of Rn, the input resistance RL of the low-pass filter circuit 20, the power supply voltage VCC of the circuit power supply, and the like uses a preset value.

【0083】なお、これらの値Rp,Rn,RL,VC
Cを図示しない入力ポートを介して設定できる構成とし
てもよい。これらの値Rp,Rn,RL,VCCを外部
から設定できる構成とすることで、各トランジスタのオ
ン抵抗Rp,Rnのばらつき等に対処することが可能と
なる。これにより、マイコンやASIC等の個々のチッ
プ毎の特性に対応して、より精度の高いDA変換出力が
得られるようにすることができる。さらに、各トランジ
スタのオン抵抗Rp,Rnの実測値を設定することで、
DA変換出力の精度ならびに直線性をさらに向上させる
ことができる。また、電源電圧VCCの変更やローパス
フィルタ回路20の入力抵抗RLの抵抗値の変更等の回
路条件の変更に対しても対処することができる。
Note that these values Rp, Rn, RL, VC
C may be configured to be set via an input port (not shown). With a configuration in which these values Rp, Rn, RL, and VCC can be set from the outside, it is possible to cope with variations in the on-resistances Rp and Rn of each transistor. This makes it possible to obtain a more accurate DA conversion output corresponding to the characteristics of each chip such as a microcomputer or an ASIC. Further, by setting the measured values of the on-resistances Rp and Rn of each transistor,
The accuracy and linearity of the DA conversion output can be further improved. Further, it is possible to cope with a change in circuit conditions such as a change in the power supply voltage VCC and a change in the resistance value of the input resistor RL of the low-pass filter circuit 20.

【0084】補正デジタルデータ演算手段42は、式4
に基づく演算を行なうに際して、(Rp+RL)/(R
n+RL)の項は固定値となるので、その固定値を予め
計算しておき、その計算結果を繰り返し用いるようにし
ている。これにより、演算の高速化を図っている。
The correction digital data calculation means 42 calculates
(Rp + RL) / (R
Since the term (n + RL) is a fixed value, the fixed value is calculated in advance, and the calculation result is used repeatedly. Thereby, the operation speed is increased.

【0085】なお、補正デジタルデータ演算手段42
は、過去に計算を行なった結果をRAMまたは不揮発性
メモリ等に格納しておくことで、DA変換の対象である
デジタルデータDDと補正デジタルデータXとの対応テ
ーブル等を作成するようにしてもよい。このような構成
にすることで、補正デジタルデータXを求める演算処理
を行なう回数を削減することができる。これにより、C
PU部41の負荷を軽減させることができる。
The correction digital data calculation means 42
May store a result of calculation in the past in a RAM or a non-volatile memory to create a correspondence table between digital data DD to be DA-converted and corrected digital data X. Good. With such a configuration, it is possible to reduce the number of times of performing the arithmetic processing for obtaining the correction digital data X. Thereby, C
The load on the PU unit 41 can be reduced.

【0086】補正デジタルデータ演算手段42は、例え
ば出力電圧(理論値)VAが2.5ボルトに対して、例
えば2.498ボルトを出力することができる補正デジ
タルデータX1と例えば2.503ボルトを出力するこ
とができる補正デジタルデータX2とが算出された場合
には、それらの補正デジタルデータX1,X2を交互に
PWM回路部12へ供給することで、出力電圧(理論
値)VAが2.5ボルトにより近くなるようにしてもよ
い。また、それらの補正デジタルデータX1,X2を選
択する比率を例えば1:2,2:1,1:3,3:1,
1:4,4:1等に設定することで、所定期間における
アナログ出力電圧の平均値が理論値により近くなるよう
にしてもよい。
The correction digital data calculation means 42 generates correction digital data X1 capable of outputting, for example, 2.498 volts with respect to output voltage (theoretical value) of 2.5 volts, for example, and 2.503 volts. When the corrected digital data X2 that can be output is calculated, the corrected digital data X1 and X2 are alternately supplied to the PWM circuit unit 12 so that the output voltage (theoretical value) VA becomes 2.5. It may be made closer to the bolt. Further, the selection ratio of the corrected digital data X1, X2 is, for example, 1: 2, 2: 1, 1: 3, 3: 1,
By setting such as 1: 4, 4: 1, etc., the average value of the analog output voltage in a predetermined period may be closer to the theoretical value.

【0087】図5は請求項5に係るDA変換装置のブロ
ック構成図である。図5に示すDA変換装置4は、マイ
コン50とローパスフィルタ回路20とからなる。マイ
コン50は、CPU部51と、PWM回路部12と、P
WM信号出力バッファ回路部13等を備える。CPU部
51を用いてプログラマ制御によって動作する補正デュ
ーティ演算手段52を構成している。PWM回路部1
2、PWM信号出力バッファ回路部13、ならびに、ロ
ーパスフィルタ回路20の構成は、図1に示したものと
同じである。
FIG. 5 is a block diagram of a DA converter according to a fifth aspect. The DA converter 4 shown in FIG. 5 includes a microcomputer 50 and a low-pass filter circuit 20. The microcomputer 50 includes a CPU unit 51, a PWM circuit unit 12,
It includes a WM signal output buffer circuit section 13 and the like. The CPU 51 constitutes a correction duty calculation means 52 that operates under programmer control. PWM circuit part 1
2. The configurations of the PWM signal output buffer circuit unit 13 and the low-pass filter circuit 20 are the same as those shown in FIG.

【0088】補正デューティ演算手段52は、CPU部
51からDA変換の対象となるmビットのデジタルデー
タ11aが供給されると、先ずそのデジタルデータ11
aによって指定されるPWM信号のデューティDを次の
式5に基づいて計算する。
When the m-bit digital data 11a to be subjected to DA conversion is supplied from the CPU section 51, the correction duty calculating means 52 first receives the digital data 11a.
The duty D of the PWM signal specified by a is calculated based on the following equation 5.

【0089】[0089]

【数9】 (Equation 9)

【0090】ここで、DはPWM信号のデューティ(理
論値)、DDはデジタルデータ11aによって指定され
た値(10進表記)、mはDA変換の対象となるデジタ
ルデータのビット数である。
Here, D is the duty (theoretical value) of the PWM signal, DD is the value (decimal notation) specified by the digital data 11a, and m is the number of bits of the digital data to be DA-converted.

【0091】例えば、デジタルデータのビット数mが1
0、デジタルデータ11aによって指定された値(10
進表記)DDが512であるとすると、PWM信号のデ
ューティ(理論値)は0.5(512/1024)とな
る。
For example, if the bit number m of the digital data is 1
0, the value specified by the digital data 11a (10
Assuming that DD is 512, the duty (theoretical value) of the PWM signal is 0.5 (512/1024).

【0092】次に、補正デューティ演算手段52は、P
WM信号出力バッファ回路部13の出力抵抗ならびにロ
ーパスフィルタ回路20の入力抵抗を考慮すると、実質
的なデューティ(補正デューティ)DHが次の式6で表
わせることを利用して、先に求めたデューティ(理論
値)に最も近い値が得られる補正デジタルデータXを演
算によって求める。
Next, the correction duty calculation means 52 calculates P
Taking into account the output resistance of the WM signal output buffer circuit section 13 and the input resistance of the low-pass filter circuit 20, the fact that the actual duty (correction duty) DH can be expressed by the following equation 6 is used to calculate the duty obtained earlier. Corrected digital data X that gives a value closest to (theoretical value) is obtained by calculation.

【0093】[0093]

【数10】 (Equation 10)

【0094】ここで、Xは補正デジタルデータ(10進
表記)、Rpはpチャネルトランジスタ13Pのオン抵
抗(Hレベル出力時の出力抵抗)、Rnはnチャネルト
ランジスタ13Nのオン抵抗(Lレベル出力時の出力抵
抗)、RLはローパスフィルタ回路20の入力抵抗、m
はデジタルデータのビット数である。
Here, X is the corrected digital data (decimal notation), Rp is the on-resistance of the p-channel transistor 13P (output resistance at the time of H level output), and Rn is the on-resistance of the n-channel transistor 13N (at the time of L level output). RL is the input resistance of the low-pass filter circuit 20, m
Is the number of bits of digital data.

【0095】なお、補正デジタルデータ(10進表記)
Xは特許請求の範囲に記載したPWM信号のHレベルの
期間THに相当するものである。(2のm乗−X)は特
許請求の範囲に記載したPWM信号のLレベルの期間T
Lに相当するものである。
The corrected digital data (decimal notation)
X corresponds to an H-level period TH of the PWM signal described in the claims. (2 m -X) is the L level period T of the PWM signal described in the claims.
L.

【0096】補正デジタルデータ演算手段52は、式6
に基づいてデューティ(理論値)に最も近い値が得られ
る補正デジタルデータXを演算によって求めると、求め
た補正デジタルデータXをPWM回路部12へ供給す
る。
The correction digital data calculation means 52 calculates
When the correction digital data X that obtains the value closest to the duty (theoretical value) is calculated based on the calculation, the calculated correction digital data X is supplied to the PWM circuit unit 12.

【0097】PWM回路部12は、補正デジタルデータ
Xに基づいてその補正デジタルデータXに対応したデュ
ーティの信号12aを生成して出力する。この信号12
aは、PWM信号出力バッファ回路部13を介してPW
M信号10aとしてローパスフィルタ回路20へ供給さ
れ、ローパスフィルタ回路20を介してアナログ出力信
号(DA変換出力)が得られる。
The PWM circuit section 12 generates and outputs a signal 12a having a duty corresponding to the corrected digital data X based on the corrected digital data X. This signal 12
a is the PWM signal via the PWM signal output buffer circuit 13
The signal is supplied to the low-pass filter circuit 20 as the M signal 10a, and an analog output signal (DA conversion output) is obtained through the low-pass filter circuit 20.

【0098】以上の構成であるから図5に示したDA変
換装置4は、補正デジタルデータ演算手段52によって
DA変換の対象となるデジタルデータ11aを補正デジ
タルデータ14a(X)へ変換し、変換された補正デジ
タルデータ14a(X)に基づいてPWM信号10aを
生成するので、ローパスフィルタ20を介してデジタル
データ11aで指定される出力電圧と同じまたは極めて
近い電圧を出力させることができる。よって、DA変換
出力(アナログ出力信号)の直線性誤差を少なくでき、
さらに、DA変換の対象であるデジタルデータに対応し
た精度の高い電圧を得ることができる。
With the above configuration, the DA converter 4 shown in FIG. 5 converts the digital data 11a to be DA-converted into the corrected digital data 14a (X) by the corrected digital data calculating means 52, and the converted data is converted. Since the PWM signal 10a is generated based on the corrected digital data 14a (X), a voltage that is the same as or very close to the output voltage specified by the digital data 11a can be output via the low-pass filter 20. Therefore, the linearity error of the DA conversion output (analog output signal) can be reduced,
Further, a highly accurate voltage corresponding to digital data to be subjected to DA conversion can be obtained.

【0099】また、図5に示したDA変換装置4は、補
正デューティDHに基づいて補正デジタルデータ14a
(X)を演算する構成としているので、補正デジタルデ
ータ14a(X)を求めるための演算量を図4に示した
DA変換装置3よりも少なくすることができる。これに
より、CPU部51の負荷を軽減させることができる。
The DA converter 4 shown in FIG. 5 uses the correction digital data 14a based on the correction duty DH.
Since the calculation of (X) is performed, the amount of calculation for obtaining the corrected digital data 14a (X) can be made smaller than that of the DA converter 3 shown in FIG. Thereby, the load on the CPU unit 51 can be reduced.

【0100】pチャネルトランジスタ13Pのオン抵抗
(Hレベル出力時の出力抵抗)Rp、nチャネルトラン
ジスタ13Nのオン抵抗(Lレベル出力時の出力抵抗)
Rn、ローパスフィルタ回路20の入力抵抗RL等の各
値は、予め設定した値を用いる構成としている。
On-resistance of p-channel transistor 13P (output resistance at the time of H-level output) Rp, on-resistance of n-channel transistor 13N (output resistance at the time of L-level output)
Each value of Rn, the input resistance RL of the low-pass filter circuit 20, and the like is configured to use a preset value.

【0101】なお、これらの値Rp,Rn,RLを図示
しない入力ポートを介して設定できる構成としてもよ
い。これらの値Rp,Rn,RLを外部から設定できる
構成とすることで、各トランジスタのオン抵抗Rp,R
nのばらつき等に対処することが可能となる。これによ
り、マイコンやASIC等の個々のチップ毎の特性に対
応して、より精度の高いDA変換出力が得られるように
することができる。さらに、各トランジスタのオン抵抗
Rp,Rnの実測値を設定することで、DA変換出力の
精度ならびに直線性をさらに向上させることができる。
また、電源電圧VCCの変更やローパスフィルタ回路2
0の入力抵抗RLの抵抗値の変更等の回路条件の変更に
対しても対処することができる。
Incidentally, the configuration may be such that these values Rp, Rn, RL can be set via an input port (not shown). With a configuration in which these values Rp, Rn, and RL can be set from the outside, the on-resistances Rp and R
It is possible to deal with variations in n. This makes it possible to obtain a more accurate DA conversion output corresponding to the characteristics of each chip such as a microcomputer or an ASIC. Further, by setting the measured values of the on-resistances Rp and Rn of each transistor, the accuracy and linearity of the DA conversion output can be further improved.
In addition, a change in the power supply voltage VCC or a low-pass filter circuit 2
It is possible to cope with a change in circuit conditions such as a change in the resistance value of the input resistance RL of 0.

【0102】補正デジタルデータ演算手段52は、式6
に基づく演算を行なうに際して、(Rp+RL)/(R
n+RL)の項は固定値となるので、その固定値を予め
計算しておき、その計算結果を繰り返し用いるようにし
ている。これにより、演算の高速化を図っている。
The correction digital data calculation means 52 calculates
(Rp + RL) / (R
Since the term (n + RL) is a fixed value, the fixed value is calculated in advance, and the calculation result is used repeatedly. Thereby, the operation speed is increased.

【0103】なお、補正デジタルデータ演算手段52
は、過去に計算を行なった結果をRAMまたは不揮発性
メモリ等に格納しておくことで、DA変換の対象である
デジタルデータDDと補正デジタルデータXとの対応テ
ーブル等を作成するようにしてもよい。このような構成
にすることで、補正デジタルデータXを求める演算処理
を行なう回数を削減することができる。これにより、C
PU部51の負荷を軽減させることができる。
The correction digital data calculation means 52
May store a result of calculation in the past in a RAM or a non-volatile memory to create a correspondence table between digital data DD to be DA-converted and corrected digital data X. Good. With such a configuration, it is possible to reduce the number of times of performing the arithmetic processing for obtaining the correction digital data X. Thereby, C
The load on the PU unit 51 can be reduced.

【0104】補正デジタルデータ演算手段52は、デュ
ーティ(理論値)Dが例えば0.5に対して、実質的な
デューティ(補正デューティ)DHが例えば0.499
6となる補正デジタルデータX1と実質的なデューティ
(補正デューティ)DHが例えば0.5006となる補
正デジタルデータX2とが算出された場合には、それら
の補正デジタルデータX1,X2を交互にPWM回路部
12へ供給するようにしてもよい。これにより出力電圧
の精度を向上させることができる。また、それらの補正
デジタルデータX1,X2を選択する比率を例えば1:
2,2:1,1:3,3:1,1:4,4:1等に設定
することで、所定期間におけるアナログ出力電圧の平均
値が理論値により近くなるようにしてもよい。
The correction digital data calculation means 52 has a duty (theoretical value) D of, for example, 0.5 and a substantial duty (correction duty) DH of, for example, 0.499.
6 and the corrected digital data X2 having a substantial duty (corrected duty) DH of, for example, 0.5006, are calculated by alternately using the corrected digital data X1 and X2. You may make it supply to the part 12. Thereby, the accuracy of the output voltage can be improved. Further, the ratio of selecting the corrected digital data X1 and X2 is set to, for example, 1:
The average value of the analog output voltage during a predetermined period may be closer to the theoretical value by setting the ratio to 2,2: 1,1: 3,3: 1,1: 4,4: 1 or the like.

【0105】[0105]

【発明の効果】以上説明したようにこの発明に係るデジ
タルアナログ変換装置は、デジタルアナログ変換の対象
であるデジタルデータをそのデジタルデータに対応した
出力電圧を実際に得ることのできる補正デジタルデータ
へ変換し、補正デジタルデータに基づいてパルス幅変調
信号を生成する構成としたので、アナログ出力電圧の精
度を向上させるとともに、デジタルアナログ変換出力特
性の直線性を改善させることができる。
As described above, the digital-to-analog converter according to the present invention converts digital data to be subjected to digital-to-analog conversion into corrected digital data from which an output voltage corresponding to the digital data can be actually obtained. Since the pulse width modulation signal is generated based on the corrected digital data, the accuracy of the analog output voltage can be improved and the linearity of the digital-to-analog conversion output characteristics can be improved.

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

【図1】請求項1に係るDA変換装置のブロック構成図
である。
FIG. 1 is a block diagram of a DA converter according to claim 1;

【図2】データ補正テーブルの一具体例を示す説明図で
ある。
FIG. 2 is an explanatory diagram showing a specific example of a data correction table.

【図3】請求項1に係る他のDA変換装置のブロック構
成図である。
FIG. 3 is a block diagram of another DA converter according to claim 1;

【図4】請求項3に係るDA変換装置のブロック構成図
である。
FIG. 4 is a block diagram of a DA converter according to claim 3;

【図5】請求項5に係るDA変換装置のブロック構成図
である。
FIG. 5 is a block diagram of a DA converter according to claim 5;

【図6】PWM回路を内蔵したマイコンを用いて構成し
た従来のDA変換装置の一具体例を示すブロック構成図
である。
FIG. 6 is a block diagram illustrating a specific example of a conventional DA converter configured using a microcomputer having a built-in PWM circuit.

【図7】図6に示した従来のDA変換装置の出力特性を
示すグラフである。
FIG. 7 is a graph showing output characteristics of the conventional DA converter shown in FIG.

【図8】PWM信号出力バッファ回路部の等価回路なら
びにローパスフィルタ回路の回路図である。
FIG. 8 is a circuit diagram of an equivalent circuit of a PWM signal output buffer circuit unit and a low-pass filter circuit.

【図9】ローパスフィルタ回路の動作を示す説明図であ
る。
FIG. 9 is an explanatory diagram showing an operation of the low-pass filter circuit.

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

1,2,3,4 DA変換装置 10,30,40,50 マイコン(マイクロコンピュ
ータ) 11,31,41,51 CPU部 12 PWM回路部 13 PWM信号出力バッファ回路部 14,34 データ補正手段 20 ローパスフィルタ回路 35 補正条件格納部 36 データ補正部 42,52 補正デジタルデータ演算手段
1, 2, 3, 4 DA converter 10, 30, 40, 50 Microcomputer (microcomputer) 11, 31, 41, 51 CPU section 12 PWM circuit section 13 PWM signal output buffer circuit section 14, 34 Data correction means 20 Low pass Filter circuit 35 Correction condition storage unit 36 Data correction unit 42, 52 Correction digital data calculation means

Claims (7)

【特許請求の範囲】[Claims] 【請求項1】 デジタルアナログ変換の対象であるデジ
タルデータをそのデジタルデータに対応した出力電圧を
実際に得ることのできる補正デジタルデータへ変換する
データ補正手段を備え、前記補正デジタルデータに基づ
いて前記補正デジタルデータに対応したデューティのパ
ルス幅変調信号を生成し、生成したパルス幅変調信号を
ローパスフィルタ回路へ供給してデジタルアナログ変換
出力を得る構成としたことを特徴とするデジタルアナロ
グ変換装置。
1. A data correction means for converting digital data to be subjected to digital-to-analog conversion into corrected digital data capable of actually obtaining an output voltage corresponding to the digital data. A digital-to-analog converter, wherein a pulse-width modulation signal having a duty corresponding to the corrected digital data is generated, and the generated pulse-width modulation signal is supplied to a low-pass filter circuit to obtain a digital-to-analog conversion output.
【請求項2】 前記データ補正手段は、デジタルアナロ
グ変換の対象であるデジタルデータと前記補正デジタル
データとを対応付けたデータ補正テーブルで構成したこ
とを特徴とする請求項1記載のデジタルアナログ変換装
置。
2. The digital-to-analog conversion apparatus according to claim 1, wherein said data correction means comprises a data correction table in which digital data to be subjected to digital-to-analog conversion is associated with the corrected digital data. .
【請求項3】 デジタルアナログ変換の対象であるデジ
タルデータに対応した出力電圧を発生させるために必要
となる補正デジタルデータを演算によって求める補正デ
ジタルデータ演算手段を備え、前記演算によって求めた
補正デジタルデータに基づいて補正デジタルデータに対
応したデューティのパルス幅変調信号を生成し、生成し
たパルス幅変調信号をローパスフィルタ回路へ供給して
デジタルアナログ変換出力を得る構成としたことを特徴
とするデジタルアナログ変換装置。
3. Compensated digital data calculating means for calculating corrected digital data required to generate an output voltage corresponding to digital data to be subjected to digital-to-analog conversion, wherein the corrected digital data obtained by the calculation is provided. A digital-to-analog conversion, wherein a pulse-width modulation signal having a duty corresponding to the corrected digital data is generated based on the digital-to-analog conversion data, and the generated pulse-width modulation signal is supplied to a low-pass filter circuit to obtain a digital-to-analog conversion output. apparatus.
【請求項4】 前記補正デジタルデータ演算手段は、パ
ルス幅変調信号のHレベル出力時の出力抵抗をRp、パ
ルス幅変調信号のLレベル出力時の出力抵抗をRn、ロ
ーパスフィルタ回路部の入力抵抗をRL、パルス幅変調
信号のHレベルの電圧をVH、パルス幅変調信号のLレ
ベルの電圧をVL、パルス幅変調信号のHレベルの期間
をTH、パルス幅変調信号のLレベルの期間をTLとし
た時に、出力電圧Vが次の式で表わせることを利用し
て、 【数1】 デジタルデータに対応した出力電圧を発生させるために
必要となる補正デジタルデータを求めることを特徴とす
る請求項3記載のデジタルアナログ変換装置。
4. The correction digital data calculation means includes an output resistance Rp when the pulse width modulation signal is output at the H level, an output resistance Rn when outputting the pulse width modulation signal at the L level, an input resistance of the low-pass filter circuit unit. RL, the H level voltage of the pulse width modulation signal is VH, the L level voltage of the pulse width modulation signal is VL, the H level period of the pulse width modulation signal is TH, and the L level period of the pulse width modulation signal is TL. Using the fact that the output voltage V can be expressed by the following equation, 4. The digital-to-analog converter according to claim 3, wherein corrected digital data required to generate an output voltage corresponding to the digital data is obtained.
【請求項5】 前記補正デジタルデータ演算手段は、パ
ルス幅変調信号のHレベル出力時の出力抵抗をRp、パ
ルス幅変調信号のLレベル出力時の出力抵抗をRn、ロ
ーパスフィルタ回路部の入力抵抗をRL、パルス幅変調
信号のHレベルの期間をTH、パルス幅変調信号のLレ
ベルの期間をTLとした時に、パルス幅変調信号のHレ
ベル出力時の出力抵抗Rp、パルス幅変調信号のLレベ
ル出力時の出力抵抗Rnならびにローパスフィルタ回路
部の入力抵抗RLを考慮した実質的なデューティDHが
次の式で表わせることを利用して、 【数2】 デジタルデータに対応した出力電圧を発生させるために
必要となる補正デジタルデータを求めることを特徴とす
る請求項4記載のデジタルアナログ変換装置。
5. The correction digital data calculating means includes an output resistance Rp when the pulse width modulation signal is output at the H level, an output resistance Rn when outputting the pulse width modulation signal at the L level, an input resistance of the low-pass filter circuit unit. Is RL, the H level period of the pulse width modulation signal is TH, and the L level period of the pulse width modulation signal is TL, the output resistance Rp when the pulse width modulation signal is output at the H level, and the L level of the pulse width modulation signal. Utilizing that the substantial duty DH in consideration of the output resistance Rn at the time of level output and the input resistance RL of the low-pass filter circuit can be expressed by the following equation: 5. The digital-to-analog converter according to claim 4, wherein corrected digital data required to generate an output voltage corresponding to the digital data is obtained.
【請求項6】 前記データ補正手段は、デジタルアナロ
グ変換の対象であるデジタルデータとそのデジタルデー
タに対する補正量データとを対応付けた補正量データテ
ーブルを備えるとともに、前記デジタルアナログ変換の
対象であるデジタルデータとそのデジタルデータに対す
る補正量データとに基づいて補正デジタルデータを演算
するデータ補正部を備えたことを特徴とする請求項1記
載のデジタルアナログ変換装置。
6. The data correction means includes a correction amount data table in which digital data to be subjected to digital-to-analog conversion and correction amount data for the digital data are associated with each other, and the digital-to-digital conversion target is 2. The digital-to-analog converter according to claim 1, further comprising a data correction unit that calculates correction digital data based on the data and the correction amount data for the digital data.
【請求項7】 前記補正量データテーブルは、前記デジ
タルアナログ変換の対象であるデジタルデータの上位複
数ビットに対応して前記補正量データを備える構成とし
たことを特徴とする請求項6記載のデジタルアナログ変
換装置。
7. The digital data according to claim 6, wherein the correction amount data table includes the correction amount data corresponding to a plurality of upper bits of digital data to be subjected to the digital-to-analog conversion. Analog converter.
JP28080199A 1999-09-30 1999-09-30 Digital-to-analog converting device Withdrawn JP2001102925A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP28080199A JP2001102925A (en) 1999-09-30 1999-09-30 Digital-to-analog converting device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP28080199A JP2001102925A (en) 1999-09-30 1999-09-30 Digital-to-analog converting device

Publications (1)

Publication Number Publication Date
JP2001102925A true JP2001102925A (en) 2001-04-13

Family

ID=17630172

Family Applications (1)

Application Number Title Priority Date Filing Date
JP28080199A Withdrawn JP2001102925A (en) 1999-09-30 1999-09-30 Digital-to-analog converting device

Country Status (1)

Country Link
JP (1) JP2001102925A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003264465A (en) * 2002-03-07 2003-09-19 Nippon Precision Circuits Inc Pulse width modulation device and da converter
US6717538B2 (en) 2001-10-31 2004-04-06 Seiko Epson Corporation DA converter and data reproducing apparatus
JP2008005216A (en) * 2006-06-22 2008-01-10 Fuji Electric Device Technology Co Ltd Digital-analog converter
JP2009010949A (en) * 2007-06-27 2009-01-15 Thomson Licensing Generation method of variable analog signal generated by pwm signal and system generating the signal
US7675266B2 (en) 2006-02-13 2010-03-09 Mitsumi Electric Co., Ltd. Battery pack
JP2010145131A (en) * 2008-12-16 2010-07-01 Bio Ekoonetto:Kk Resistance value output circuit, and ear-type body temperature measuring instrument
US11025182B2 (en) 2018-11-27 2021-06-01 Nidec Corporation Signal processing apparatus, motor, and fan motor

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6717538B2 (en) 2001-10-31 2004-04-06 Seiko Epson Corporation DA converter and data reproducing apparatus
JP2003264465A (en) * 2002-03-07 2003-09-19 Nippon Precision Circuits Inc Pulse width modulation device and da converter
US7675266B2 (en) 2006-02-13 2010-03-09 Mitsumi Electric Co., Ltd. Battery pack
JP2008005216A (en) * 2006-06-22 2008-01-10 Fuji Electric Device Technology Co Ltd Digital-analog converter
JP2009010949A (en) * 2007-06-27 2009-01-15 Thomson Licensing Generation method of variable analog signal generated by pwm signal and system generating the signal
JP2010145131A (en) * 2008-12-16 2010-07-01 Bio Ekoonetto:Kk Resistance value output circuit, and ear-type body temperature measuring instrument
US11025182B2 (en) 2018-11-27 2021-06-01 Nidec Corporation Signal processing apparatus, motor, and fan motor

Similar Documents

Publication Publication Date Title
US20110181454A1 (en) Folding analog-to-digital converter
US7030791B2 (en) A/D conversion device having input level shift and output correction function
JPH06259037A (en) Semiconductor integrated circuit device
JP4593624B2 (en) Digital / analog converter
JP2001102925A (en) Digital-to-analog converting device
JP2002353814A (en) Digital/analog converter and digital/analog conversion method
US20080136696A1 (en) Digital/Analogue Converter, Converter Arrangement and Display
JP4897365B2 (en) regulator
JP2009302973A (en) D/a converter and reference voltage circuit with the same
TWI588726B (en) Reading circuit for capacitive sensor and operation method thereof
JPH0629850A (en) A/d converter
JP2000323991A (en) Voltage generating circuit and d/a converting circuit
JP2001024509A (en) Sequential comparator ad converter of charge redistribution self-correcting system
JP4004390B2 (en) Successive comparison type AD converter and microcomputer
JP4746792B2 (en) A / D converter
JP3130007B2 (en) Successive approximation type A / D converter circuit
JP3551200B2 (en) Digital / analog conversion circuit
JPH09116438A (en) Digital/analog converter
JPS6245217A (en) Pulse width modulation circuit
JP2004260263A (en) Ad converter
JP3090099B2 (en) D / A converter
TW201332294A (en) Counter based digital pulse width modulation device could scalable the resolution
JP2792891B2 (en) A / D converter
US6476747B1 (en) Digital to analog converter
JPH09266446A (en) Analog-digital converter and single-chip microcomputer incorporating the same

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20061205