JPH10150365A - Microcomputer with built-in a/d converter - Google Patents

Microcomputer with built-in a/d converter

Info

Publication number
JPH10150365A
JPH10150365A JP8308180A JP30818096A JPH10150365A JP H10150365 A JPH10150365 A JP H10150365A JP 8308180 A JP8308180 A JP 8308180A JP 30818096 A JP30818096 A JP 30818096A JP H10150365 A JPH10150365 A JP H10150365A
Authority
JP
Japan
Prior art keywords
voltage
microcomputer
converter
operational amplifiers
terminal
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
JP8308180A
Other languages
Japanese (ja)
Inventor
Kazuo Hodaka
和夫 保高
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.)
Sanyo Electric Co Ltd
Original Assignee
Sanyo Electric Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sanyo Electric Co Ltd filed Critical Sanyo Electric Co Ltd
Priority to JP8308180A priority Critical patent/JPH10150365A/en
Publication of JPH10150365A publication Critical patent/JPH10150365A/en
Pending legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To allow a microcomputer to vary precision per each bit of a digital signal after A/D conversion. SOLUTION: Control data are set to a control register 38 based on a decoding result of program data read from a ROM in the case of executing AD conversion. Anyone of a p-channel type MOS transistor(TR) 37 and operational amplifiers 24, 25, 26, 27 is turned on corresponding to the control data. Anyone of those outputs is applied to a non-ground side terminal of a series resistance circuit network 13 and then after AD conversion, the precision per each bit of the digital signal can be varied and improved.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、AD変換器で得ら
れるデジタル信号の各ビット当たりの精度を向上させる
のに好適なAD変換器内蔵マイクロコンピュータに関す
る。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a microcomputer having a built-in AD converter suitable for improving the accuracy per bit of a digital signal obtained by the AD converter.

【0002】[0002]

【従来の技術】図2は従来のAD変換器内蔵型マイクロ
コンピュータを表すブロック図である。図2において、
(1)はマイクロコンピュータであり、アナログデジタ
ル変換を行うAD変換器(2)を内蔵している。AD変
換器(2)の種類としては一般的に逐次比較型及び一括
比較型が存在するが、両者共に、アナログ電圧及び基準
電圧を比較して論理「1」又は「0」のデジタル値を得
る為、前記基準電圧を発生する為の直列抵抗回路網を有
している。(3)はその直列抵抗回路網である。マイク
ロコンピュータ(1)には、マイクロコンピュータ
(1)の為の電源端子(4)及び接地端子(5)、AD
変換器(2)の為のアナログ入力端子(6)、直列抵抗
回路網(3)の両端に所定電圧を印加する為の端子
(7)(8)が設けられている。そして、電源端子
(4)には電源電圧VDDが印加され、接地端子(5)
は接地される。アナログ入力端子(6)にはAD変換の
対象となるアナログ電圧が印加される。更に、端子
(7)(8)には直列抵抗回路網(3)の各接続点から
所望の基準電圧を発生するのに必要な電圧AV+、AV
−が印加される。尚、図2では端子(8)を接地するも
のとする(AV−=0ボルトとする)。(9)はレギュ
レータであり、安定した電源電圧VDD(例えば5ボル
ト)を出力するものである。マイクロコンピュータ
(1)はこの電源電圧VDDの供給を受けて動作する。
尚、マイクロコンピュータ(1)内部には、図示はして
いないが、プログラムデータが記憶されたROM、該R
OMの読み出しデータの解読結果に基づき論理演算を行
うCPU、該CPUの演算データの書き込み及び読み出
しを行うRAM等が含まれている。
2. Description of the Related Art FIG. 2 is a block diagram showing a conventional microcomputer having a built-in AD converter. In FIG.
(1) is a microcomputer and has a built-in AD converter (2) for performing analog-to-digital conversion. The AD converter (2) generally includes a successive approximation type and a batch comparison type. In both cases, an analog voltage and a reference voltage are compared to obtain a digital value of logic "1" or "0". For this purpose, a series resistor network for generating the reference voltage is provided. (3) is the series resistance network. The microcomputer (1) has a power terminal (4) and a ground terminal (5) for the microcomputer (1),
An analog input terminal (6) for the converter (2) and terminals (7) (8) for applying a predetermined voltage to both ends of the series resistor network (3) are provided. Then, the power supply voltage VDD is applied to the power supply terminal (4), and the ground terminal (5)
Is grounded. An analog voltage to be AD-converted is applied to the analog input terminal (6). Further, terminals (7) and (8) have voltages AV + and AV necessary to generate a desired reference voltage from each connection point of the series resistance network (3).
-Is applied. In FIG. 2, the terminal (8) is grounded (AV- = 0 volt). (9) is a regulator which outputs a stable power supply voltage VDD (for example, 5 volts). The microcomputer (1) operates by receiving the supply of the power supply voltage VDD.
Although not shown, the microcomputer (1) has a ROM storing program data,
It includes a CPU that performs a logical operation based on the result of decoding the OM read data, a RAM that writes and reads the operation data of the CPU, and the like.

【0003】さて、直列抵抗回路網(3)の両端電圧を
5ボルトで使用したい場合は、レギュレータ(9)の出
力を端子(7)と接続すればよい。これより、直列抵抗
回路網(3)の各接続点からは5ボルトをその抵抗比で
分圧した基準電圧が得られる。そして、アナログ電圧及
び当該基準電圧を比較することにより、所定ビット数の
デジタル信号を得ることができる。
If it is desired to use a voltage across the series resistor network (3) of 5 volts, the output of the regulator (9) may be connected to the terminal (7). Thus, a reference voltage obtained by dividing 5 volts by the resistance ratio is obtained from each connection point of the series resistance network (3). Then, by comparing the analog voltage and the reference voltage, a digital signal having a predetermined number of bits can be obtained.

【0004】[0004]

【発明が解決しようとする課題】ところで、AD変換後
のデジタル信号の各ビットの精度は、直列抵抗回路網
(3)の両端電位差を小さくするほど向上する。即ち、
上記精度は、端子(7)の入力電圧を低く設定すればす
るほど向上することになる。AD変換器の用途によって
は、上記精度の向上を要求される場合がある。この場
合、従来は、新たなレギュレータ(10)をレギュレー
タ(9)の出力と端子(7)との間に介挿し、電源電圧
VDDより低い電圧(例えば3ボルト)を端子(7)に
供給する様にしていた。
By the way, the accuracy of each bit of the digital signal after AD conversion is improved as the potential difference between both ends of the series resistor network (3) is reduced. That is,
The above accuracy improves as the input voltage of the terminal (7) is set lower. Depending on the use of the AD converter, there is a case where the above-mentioned improvement in accuracy is required. In this case, conventionally, a new regulator (10) is inserted between the output of the regulator (9) and the terminal (7), and a voltage lower than the power supply voltage VDD (for example, 3 volts) is supplied to the terminal (7). I was doing it.

【0005】しかしながら、レギュレータ(10)はマ
イクロコンピュータ(1)の外付部品となる為、外付部
品の増加に伴い高価格化してしまう問題があった。更
に、マイクロコンピュータ(1)の動作中は、AD変換
器(2)のAD変換動作に支障を来さない為にも、レギ
ュレータ(10)を取り外すことはできない。従って、
マイクロコンピュータ(1)の動作中にAD変換後のデ
ジタル信号の各ビットの精度を可変する要求が生じて
も、対応できず、応用が利かない問題があった。
However, since the regulator (10) is an external component of the microcomputer (1), there has been a problem that the price increases as the number of external components increases. Further, during operation of the microcomputer (1), the regulator (10) cannot be removed so as not to hinder the AD conversion operation of the AD converter (2). Therefore,
Even if a request to change the precision of each bit of the digital signal after AD conversion occurs during the operation of the microcomputer (1), the request cannot be dealt with and there is a problem that the application is not useful.

【0006】そこで、本発明は、AD変換後のデジタル
信号の各ビットの精度を外付部品を設けずに向上でき、
更にマイクロコンピュータの動作中に上記精度を可変で
きるAD変換器内蔵マイクロコンピュータを提供するこ
とを目的とする。
Therefore, the present invention can improve the accuracy of each bit of a digital signal after AD conversion without providing external components.
It is a further object of the present invention to provide a microcomputer with a built-in AD converter capable of changing the accuracy during operation of the microcomputer.

【0007】[0007]

【課題を解決するための手段】本発明は、前記問題点を
解決する為に成されたものであり、その特徴とするとこ
ろは、直列抵抗回路網、該直列抵抗回路網から得られる
基準電圧とアナログ信号とを比較する比較器、及び該比
較器から得られる「1」又は「0」のデータが格納され
るレジスタを有し、前記アナログ信号を所定ビットのデ
ジタル信号に変換するAD変換器を内蔵したマイクロコ
ンピュータにおいて、複数の異なる電圧を発生する電圧
発生部と、前記直列抵抗回路網の少なくとも一端に印加
される電圧を可変する為のデータがプログラムの解読結
果に基づき設定される制御レジスタと、前記制御レジス
タの設定内容に基づき、前記電圧発生部から得られる何
れか1個の電圧を、前記直列抵抗回路網の少なくとも一
端に印加させる電圧切換部と、を備えた点である。
SUMMARY OF THE INVENTION The present invention has been made to solve the above problems, and is characterized by a series resistor network and a reference voltage obtained from the series resistor network. And a comparator for comparing an analog signal with an analog signal, and an AD converter for converting the analog signal to a digital signal of a predetermined bit, the register having a register for storing data of “1” or “0” obtained from the comparator And a control register in which data for varying a voltage applied to at least one end of the series resistance network is set based on a result of decoding the program. And applying one of the voltages obtained from the voltage generator to at least one end of the series resistance network based on the setting contents of the control register. In that with the switching unit, the.

【0008】また、前記電圧発生部は、複数の演算増幅
器から構成され、該複数の演算増幅器から複数の異なる
電圧を出力させることを特徴とする。更に、前記複数の
演算増幅器は、電圧フォロワ型であり、各々の一方の入
力端子には抵抗分割された異なる基準電圧が印加される
ことを特徴とする。
[0008] Further, the voltage generator is composed of a plurality of operational amplifiers, and outputs a plurality of different voltages from the plurality of operational amplifiers. Further, the plurality of operational amplifiers are of a voltage follower type, and different reference voltages divided by resistance are applied to one input terminal of each of the plurality of operational amplifiers.

【0009】[0009]

【発明の実施の形態】本発明の詳細を図面に従って具体
的に説明する。図1は本発明のAD変換器内蔵マイクロ
コンピュータを示す回路ブロック図である。図1におい
て、(11)はマイクロコンピュータであり、アナログ
信号を所定ビット数(例えば8ビット)のデジタル信号
に変換する逐次比較型のAD変換器(12)を内蔵して
いる。尚、本発明の実施の形態では、逐次比較型のAD
変換器を使用するが、これに限定されることなく一括比
較型AD変換器を使用しても良い。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS The details of the present invention will be specifically described with reference to the drawings. FIG. 1 is a circuit block diagram showing a microcomputer incorporating an AD converter according to the present invention. In FIG. 1, reference numeral (11) denotes a microcomputer, which incorporates a successive approximation type AD converter (12) for converting an analog signal into a digital signal having a predetermined number of bits (for example, 8 bits). In the embodiment of the present invention, the successive approximation type AD
Although a converter is used, a batch comparison type AD converter may be used without being limited to this.

【0010】AD変換器(12)内部において、(1
3)は直列抵抗回路網であり、同一抵抗値を有する25
6(=2↑8)本の抵抗を直列接続したものである。
(14)はアナログ入力切換回路であり、マイクロコン
ピュータ(1)に設けられた8個のアナログ入力端子A
D0〜AD7の何れか1個に印加されたアナログ信号を
切換出力するものである。(15)は3ビットのチャン
ネルレジスタであり、アナログ入力端子AD0〜AD7
の何れか1個を選択する為の3ビットデータがAD変換
を行う際にROM(図示せず)から読み出されたプログ
ラムデータの解読結果に従ってデータバス(16)を介
してセットされるものである。アナログ入力切換回路
(14)はチャンネルレジスタ(15)の内容に応じて
何れか1個のアナログ入力端子を選択できるデコード形
式となっている。例えばチャンネルレジスタ(15)の
内容が「000」「001」「010」「011」「1
00」「101」「110」「111」の時は、各々ア
ナログ入力端子AD0、AD1、AD2、AD3、AD
4、AD5、AD6、AD7が選択される様に、アナロ
グ入力切換回路(14)の内部配線は接続されている。
(17)はコンパレータであり、直列抵抗回路網(1
3)の所定接続点に現れる基準電圧とアナログ入力切換
回路(14)から出力された1つのアナログ信号の電圧
値とを比較し、アナログ信号が基準電圧より大の時は論
理「1」を出力し、アナログ信号が基準電圧より小の時
は論理「0」を出力するものである。(18)は8ビッ
トのデータレジスタであり、コンパレータ(17)から
逐次得られる8個の「1」又は「0」のデジタル値を最
上位ビット(MSB)側から最下位ビット(LSB)側
に向けてセットされるものである。(19)は逐次比較
回路であり、コンパレータ(17)の出力を受けるもの
である。また、逐次比較回路(19)は、AD変換指示
レジスタ(20)によって制御される。つまり、ROM
から読み出されたプログラムデータがAD変換を実行さ
せる内容であり、当該プログラムデータの解読結果に基
づいてデータバス(16)を介してAD変換指示レジス
タ(20)にAD変換を開始させる為のデータがセット
されると、逐次比較回路(19)はこの時のAD変換指
示レジスタ(20)の内容によって動作を開始する。即
ち、逐次比較回路(19)は、コンパレータ(17)か
ら1ビット分ずつ出力されて印加されるデジタル値をデ
ータレジスタ(18)の最上位ビットから最下位ビット
に向けて順次セットさせる様に動作する。また、逐次比
較回路(19)にコンパレータ(17)から8ビット分
のデジタル値が印加され、即ちデータレジスタ(18)
にアナログ信号のAD変換後の8ビットのデジタル信号
がセットされると、逐次比較回路(19)からはAD変
換動作が終了したことを示すデータが出力されてAD変
換指示レジスタ(20)にセットされ、この時のAD変
換指示レジスタ(20)の内容はデータバス(16)を
介してCPUで解読される。尚、データレジスタ(1
8)にセットされた8ビットのデジタル信号はデータバ
ス(16)に転送され、所定の目的の為に前記CPUに
て論理演算される。(21)は直列抵抗回路網(13)
のどの接続点に生じる基準電圧を出力させるのかを制御
する制御回路であり、データレジスタ(18)にセット
される各ビットの内容に応じた直列抵抗回路網(13)
の接続点を選択するものである。具体的には、直列抵抗
回路網(13)の一端の電圧AV−は接地されており、
他端に印加される電圧を仮にVとすると、AD変換動作
を行う初期状態では直列抵抗回路網(13)の両端の中
点電圧即ちV/2が基準電圧として出力されており、ア
ナログ信号がV/2より大なのか小なのかが比較され
る。例えばアナログ信号がV/2より大の場合は、コン
パレータ(17)からは「1」が出力され、このデジタ
ル値「1」が逐次比較回路(19)を介してデータレジ
スタ(18)の最上位ビットにセットされる。制御回路
(21)はデータレジスタ(18)の最上位ビットに
「1」がセットされたことを検出し、前記アナログ信号
がV/2〜Vの間にするものと判断し、直列抵抗回路網
(13)の中でV/2とVとの中電電圧である3V/4
を発生する接続点を選択し、V/2に代わって3V/4
が基準電圧として直列抵抗回路網(13)から出力され
る。そして、コンパレータ(17)で前記アナログ信号
と基準電圧3V/4との大小が比較される。例えば、ア
ナログ信号が3V/4より小の場合は、コンパレータ
(17)からは「0」が出力され、このデジタル値
「0」が逐次比較回路(19)を介してデータレジスタ
(18)の上位2ビット目にセットされる。制御回路
(21)はデータレジスタ(18)の上位2ビット目に
「0」がセットされたことを検出し、前記アナログ信号
がV/2〜3V/4の間にするものと判断し、直列抵抗
回路網(13)の中でV/2と3V/4との中電電圧で
ある5V/8を発生する接続点を選択し、3V/4に代
わって5V/8が基準電圧として直列抵抗回路網(1
3)から出力される。そして、コンパレータ(17)で
前記アナログ信号と基準電圧5V/8との大小が比較さ
れる。以下、上記した逐次比較動作がデータレジスタ
(18)の最下位ビットにデジタル値がセットされるま
で行われる。以上より、AD変換器(12)が構成され
る。
In the AD converter (12), (1)
3) is a series resistor network, which has the same resistance value.
6 (= 2 ↑ 8) resistors are connected in series.
(14) is an analog input switching circuit, which has eight analog input terminals A provided in the microcomputer (1).
An analog signal applied to any one of D0 to AD7 is switched and output. (15) is a 3-bit channel register, which has analog input terminals AD0 to AD7.
Is set via a data bus (16) in accordance with the result of decoding program data read from a ROM (not shown) when performing A / D conversion when selecting one of the three. is there. The analog input switching circuit (14) is in a decoding format in which any one of the analog input terminals can be selected according to the contents of the channel register (15). For example, the contents of the channel register (15) are “000”, “001”, “010”, “011”, “1”.
At the time of 00, 101, 110, and 111, the analog input terminals AD0, AD1, AD2, AD3, and AD
The internal wiring of the analog input switching circuit (14) is connected so that 4, AD5, AD6, and AD7 are selected.
(17) is a comparator, which is a series resistor network (1).
3) The reference voltage appearing at the predetermined connection point is compared with the voltage value of one analog signal output from the analog input switching circuit (14). When the analog signal is larger than the reference voltage, a logic "1" is output. When the analog signal is smaller than the reference voltage, a logic "0" is output. (18) is an 8-bit data register, which converts eight digital values of "1" or "0" sequentially obtained from the comparator (17) from the most significant bit (MSB) to the least significant bit (LSB). It is set toward. (19) is a successive approximation circuit for receiving the output of the comparator (17). The successive approximation circuit (19) is controlled by an AD conversion instruction register (20). That is, ROM
The program data read out from the memory is a content for executing the A / D conversion. The data for starting the A / D conversion in the A / D conversion instruction register (20) via the data bus (16) based on the result of decoding the program data. Is set, the successive approximation circuit (19) starts operating according to the contents of the AD conversion instruction register (20) at this time. That is, the successive approximation circuit (19) operates so as to sequentially set the digital value output and applied one bit at a time from the comparator (17) from the most significant bit to the least significant bit of the data register (18). I do. An 8-bit digital value is applied from the comparator (17) to the successive approximation circuit (19), that is, the data register (18).
When the 8-bit digital signal after the AD conversion of the analog signal is set in the A / D converter, data indicating that the AD conversion operation has been completed is output from the successive approximation circuit (19) and set in the AD conversion instruction register (20). The contents of the AD conversion instruction register (20) at this time are decoded by the CPU via the data bus (16). The data register (1
The 8-bit digital signal set in 8) is transferred to the data bus (16) and logically operated by the CPU for a predetermined purpose. (21) is a series resistance network (13)
And a control circuit for controlling which connection point generates a reference voltage. A series resistor network (13) corresponding to the content of each bit set in the data register (18).
Is selected. Specifically, the voltage AV− at one end of the series resistance network (13) is grounded,
Assuming that the voltage applied to the other end is V, in the initial state in which the AD conversion operation is performed, the midpoint voltage of both ends of the series resistor network (13), that is, V / 2 is output as the reference voltage, and the analog signal is output. It is compared whether it is larger or smaller than V / 2. For example, when the analog signal is larger than V / 2, "1" is output from the comparator (17), and the digital value "1" is output to the uppermost position of the data register (18) via the successive approximation circuit (19). Set to a bit. The control circuit (21) detects that the most significant bit of the data register (18) is set to "1", determines that the analog signal is between V / 2 and V, and sets a serial resistance network. 3V / 4 which is the medium voltage of V / 2 and V in (13)
Is selected, and 3V / 4 instead of V / 2 is selected.
Is output from the series resistance network (13) as a reference voltage. Then, the comparator (17) compares the magnitude of the analog signal with the reference voltage 3V / 4. For example, when the analog signal is smaller than 3V / 4, "0" is output from the comparator (17), and this digital value "0" is output to the upper part of the data register (18) via the successive approximation circuit (19). Set to the second bit. The control circuit (21) detects that "0" is set in the upper 2 bits of the data register (18), determines that the analog signal is between V / 2 and 3V / 4, and In the resistance network (13), a connection point for generating 5V / 8, which is the medium voltage between V / 2 and 3V / 4, is selected, and 5V / 8 is used as a reference resistor instead of 3V / 4 as a series resistor. Network (1
Output from 3). Then, the comparator (17) compares the magnitude of the analog signal with the reference voltage 5V / 8. Hereinafter, the successive approximation operation is performed until a digital value is set in the least significant bit of the data register (18). Thus, the AD converter (12) is configured.

【0011】さて、(22)はレギュレータであり、マ
イクロコンピュータ(11)の為の電源電圧VDDを出
力するものであり、この電源電圧VDDは電源端子(2
3)に印加される。(24)(25)(26)(27)
は電圧フォロワ型の演算増幅器であり、これらの演算増
幅器(24)(25)(26)(27)の何れか1つの
出力が直列抵抗回路網(13)の非接地側の電圧AV+
として選択的に使用されることになる。ここで、演算増
幅器(24)(25)(26)(27)を電圧フォロワ
型として使用するのは、直列抵抗回路網(13)の抵抗
値の変動又はバラツキに対して常に一定の出力電圧をA
V+として出力できる特性を有するからである。そし
て、演算増幅器(25)(26)(27)の+端子には
マイクロコンピュータ(11)に内蔵された抵抗(2
8)(29)、(30)(31)、(32)(33)に
より各々電源電圧VDDを分圧した電圧が基準電圧とし
て印加される。例えば、演算増幅器(25)(26)
(27)の+端子には、各々、4VDD/5、3VDD
/5、VDD/2が印加される様に抵抗(28)〜(3
3)の抵抗値が設定されている。また、演算増幅器(2
5)(26)(27)の−端子はその出力端子と接続さ
れており、更に、演算増幅器(25)(26)(27)
の出力端子は共通接続されると共に直列抵抗回路網(1
3)の非接地側の端子と接続されている。
A regulator (22) outputs a power supply voltage VDD for the microcomputer (11). The power supply voltage VDD is supplied to a power supply terminal (2).
3) is applied. (24) (25) (26) (27)
Is an operational amplifier of the voltage follower type, and the output of any one of these operational amplifiers (24), (25), (26) and (27) is the voltage AV + on the non-ground side of the series resistance network (13).
Will be used selectively. Here, the reason that the operational amplifiers (24), (25), (26), and (27) are used as a voltage follower type is that a constant output voltage is always maintained with respect to the fluctuation or variation in the resistance value of the series resistance network (13). A
This is because it has a characteristic that can be output as V +. The + terminal of each of the operational amplifiers (25), (26) and (27) has a resistor (2) built in the microcomputer (11).
8) Voltages obtained by dividing the power supply voltage VDD by (29), (30), (31), (32), and (33) are applied as reference voltages. For example, operational amplifiers (25) (26)
The (+) terminal of (27) has 4VDD / 5 and 3VDD, respectively.
/ 5 and VDD / 2 are applied so that the resistors (28) to (3)
The resistance value of 3) is set. The operational amplifier (2
5) The (-) terminal of (26) and (27) is connected to the output terminal, and further, the operational amplifiers (25), (26) and (27)
Are connected in common and the series resistor network (1
3) is connected to the non-ground side terminal.

【0012】また、演算増幅器(24)の+端子はマイ
クロコンピュータ(11)に設けた端子(34)と接続
されており、マイクロコンピュータ(11)外部では、
レギュレータ(22)の出力と接地との間に直列接続さ
れた抵抗(35)(36)の接続点に現れる所定分圧さ
れた電圧が基準電圧として端子(34)に印加され、演
算増幅器(24)の+端子に印加される。演算増幅器
(24)の−端子はその出力端子と接続されており、そ
の出力端子は演算増幅器(25)(26)(27)の出
力端子と共通接続されると共に直列抵抗回路網(13)
の非接地側の端子と接続されている。つまり、演算増幅
器(24)は、マイクロコンピュータ(11)の使用者
がマイクロコンピュータ(11)内部で発生する演算増
幅器(25)(26)(27)からの基準電圧の他の基
準電圧を発生させたい場合に使用されるものであり、そ
の基準電圧を発生させる為に外部の抵抗(35)(3
6)の抵抗比を使用者が自由に決めることができる。
The + terminal of the operational amplifier (24) is connected to a terminal (34) provided in the microcomputer (11).
A predetermined divided voltage appearing at a connection point of the resistors (35) and (36) connected in series between the output of the regulator (22) and the ground is applied to the terminal (34) as a reference voltage, and the operational amplifier (24) ) Is applied to the + terminal. The negative terminal of the operational amplifier (24) is connected to its output terminal, and its output terminal is commonly connected to the output terminals of the operational amplifiers (25), (26) and (27) and the series resistance network (13).
Is connected to the terminal on the non-ground side. That is, the operational amplifier (24) allows the user of the microcomputer (11) to generate another reference voltage from the operational amplifiers (25), (26), and (27) generated inside the microcomputer (11). It is used when it is necessary to generate an external resistor (35) (3
The user can freely determine the resistance ratio of 6).

【0013】また、Pチャンネル型MOSトランジスタ
(37)のソースドレイン路は演算増幅器(24)の+
端子及び出力端子の間に接続されており、オンすること
により、演算増幅器(24)を短絡するものである。図
1においては、端子(34)に直列抵抗(35)(3
6)の接続点を接続しているが、レギュレータ(22)
の出力を端子(34)と直接接続すれば、Pチャンネル
型MOSトランジスタ(37)を介して直列抵抗回路網
(13)の非接地側の端子に電圧VDDを供給できるこ
とになる。尚、演算増幅器(24)及びPチャンネル型
MOSトランジスタ(37)に対して端子(34)を共
用する為、従来に比べて端子数が増えることもない。
The source / drain path of the P-channel MOS transistor (37) is connected to the + of the operational amplifier (24).
It is connected between the terminal and the output terminal, and is turned on to short-circuit the operational amplifier (24). In FIG. 1, a series resistor (35) (3
The connection point of 6) is connected, but the regulator (22)
Is directly connected to the terminal (34), the voltage VDD can be supplied to the non-ground side terminal of the series resistance network (13) via the P-channel MOS transistor (37). Since the terminal (34) is shared with the operational amplifier (24) and the P-channel MOS transistor (37), the number of terminals is not increased as compared with the conventional case.

【0014】(38)は3ビットの制御レジスタであ
り、Pチャンネル型MOSトランジスタ(37)のオン
オフ、演算増幅器(24)(25)(26)(27)の
オンオフを制御し、何れか1つのみをオンする3ビット
の制御データがROMから読み出されたプログラムデー
タの解読結果に基づきセットされるものである。(3
9)は請求項1に言う電圧切換部を構成するデコーダで
あり、4個のANDゲート(40)(41)(42)
(43)、NANDゲート(44)及び3個のインバー
タ(45)(46)(47)より構成される。具体的に
は、制御レジスタ(38)にセットされる制御データが
「000」、「001」、「010」、「011」、
「100」(左側のビットデータが最上位ビットMS
B、右側のビットデータが最下位ビットLSBを表す)
の時に、各々、Pチャンネル型MOSトランジスタ(3
7)、演算増幅器(24)(25)(26)(27)が
オンする様に配線が接続されている。即ち、制御データ
が「000」の時、ANDゲート(40)〜(43)及
びNANDゲート(44)の出力は全て「0」となり、
これよりPチャンネル型MOSトランジスタ(37)の
みがオンして、この時は直列抵抗回路網(13)の非接
地側の端子には5ボルトが印加されることになる。ま
た、制御データが「001」の時、ANDゲート(4
0)〜(42)が「0」を出力すると共にANDゲート
(43)及びNANDゲート(44)が「1」を出力す
る為、演算増幅器(24)のみがオンし、使用者が直列
抵抗(35)(36)の抵抗非で定めた基準電圧が直列
抵抗回路網(13)の非接地側の端子に印加される。ま
た、制御データが「010」の時、ANDゲート(4
0)(41)(43)が「0」を出力すると共にAND
ゲート(42)及びNANDゲート(44)が「1」を
出力する為、演算増幅器(25)のみがオンし、直列抵
抗回路網(13)の非接地側の端子には4VDD/5の
基準電圧が印加される。また、制御データが「011」
の時、ANDゲート(40)(42)(43)が「0」
を出力すると共にANDゲート(41)及びNANDゲ
ート(44)が「1」を出力する為、演算増幅器(2
6)のみがオンし、直列抵抗回路網(13)の非接地側
の端子には3VDD/5の基準電圧が印加される。ま
た、制御データが「100」の時、ANDゲート(4
1)(42)(43)が「0」を出力すると共にAND
ゲート(40)及びNANDゲート(44)が「1」を
出力する為、演算増幅器(27)のみがオンし、直列抵
抗回路網(13)の非接地側の端子にはVDD/2の基
準電圧が印加される。
A control register (38) controls the on / off of the P-channel MOS transistor (37) and the on / off of the operational amplifiers (24), (25), (26), and (27). Only 3-bit control data for turning ON only is set based on the result of decoding the program data read from the ROM. (3
9) is a decoder constituting the voltage switching section according to claim 1, and four AND gates (40) (41) (42).
(43), a NAND gate (44) and three inverters (45), (46) and (47). Specifically, the control data set in the control register (38) is “000”, “001”, “010”, “011”,
"100" (bit data on the left is the most significant bit MS
B, the right bit data represents the least significant bit LSB)
At the time of each, a P-channel type MOS transistor (3
7) The wiring is connected so that the operational amplifiers (24), (25), (26), and (27) are turned on. That is, when the control data is "000", the outputs of the AND gates (40) to (43) and the NAND gate (44) are all "0",
As a result, only the P-channel MOS transistor (37) is turned on. At this time, 5 volts is applied to the non-grounded terminal of the series resistance network (13). When the control data is “001”, the AND gate (4
Since (0) to (42) output "0" and the AND gate (43) and the NAND gate (44) output "1", only the operational amplifier (24) is turned on, and the user sets the series resistance ( 35) A reference voltage determined by the resistance of (36) is applied to the non-ground side terminal of the series resistance network (13). When the control data is "010", the AND gate (4
0) (41) and (43) output “0” and AND
Since the gate (42) and the NAND gate (44) output "1", only the operational amplifier (25) is turned on, and the non-ground side terminal of the series resistor network (13) has a reference voltage of 4VDD / 5. Is applied. The control data is “011”
, The AND gates (40), (42), and (43) are "0"
And the AND gate (41) and the NAND gate (44) output "1".
Only 6) is turned on, and a reference voltage of 3VDD / 5 is applied to the non-grounded terminal of the series resistance network (13). When the control data is “100”, the AND gate (4
1) (42) and (43) output “0” and AND
Since the gate (40) and the NAND gate (44) output "1", only the operational amplifier (27) is turned on, and the non-ground side terminal of the series resistance network (13) has a reference voltage of VDD / 2. Is applied.

【0015】以上より、本発明の実施の形態によれば、
直列抵抗回路網(13)の非接地側に印加される電圧を
ROMから読み出されたプログラムデータの解読結果に
基づいて異なる電圧レベルに変更することができる。つ
まり、マイクロコンピュータ(11)のプログラムによ
って、マイクロコンピュータ(11)内部でAD変換後
のデジタル信号の1ビット当たりの精度を向上させるこ
とができ、これより従来必要であった外付のレギュレー
タ等が不要となり、コストアップを防止できる。更に、
マイクロコンピュータ(11)の一連の動作の中で、A
D変換器(12)により得られるデジタル信号の1ビッ
ト当たりの精度の変更が要求された場合であっても、プ
ログラムによって精度を容易に変更することができ、各
種用途に応じたAD変換動作を実行可能となり、AD変
換器(12)を内蔵したマイクロコンピュータ(11)
としての応用範囲が広がることになる。
As described above, according to the embodiment of the present invention,
The voltage applied to the non-ground side of the series resistance network (13) can be changed to a different voltage level based on the result of decoding the program data read from the ROM. That is, the accuracy of the digital signal after AD conversion per bit can be improved in the microcomputer (11) by the program of the microcomputer (11). It becomes unnecessary and cost increase can be prevented. Furthermore,
In a series of operations of the microcomputer (11), A
Even when a change in the precision per bit of the digital signal obtained by the D converter (12) is required, the precision can be easily changed by the program, and the AD conversion operation according to various applications can be performed. A microcomputer (11) which becomes executable and incorporates an AD converter (12)
As a result, the range of application will be expanded.

【0016】[0016]

【発明の効果】本発明によれば、AD変換器を構成する
直列抵抗回路網に印加される電圧をプログラムによって
変更できる為、マイクロコンピュータ内部でAD変換後
のデジタル信号の各ビット当たりの精度を変更できる。
従って、外付部品を増やすことなくコストアップを抑え
ることができる。また、マイクロコンピュータの一連の
動作中に制度の変更が要求された場合であっても、容易
に対応できる為、このマイクロコンピュータの応用範囲
が広がる利点が得られる。
According to the present invention, since the voltage applied to the series resistor network constituting the AD converter can be changed by a program, the accuracy of each bit of the digital signal after AD conversion in the microcomputer can be improved. Can be changed.
Therefore, cost increase can be suppressed without increasing external parts. Further, even when a change of the system is requested during a series of operations of the microcomputer, it is possible to easily cope with the change, so that there is obtained an advantage that the application range of the microcomputer is expanded.

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

【図1】本発明のAD変換器内蔵マイクロコンピュータ
を示す回路ブロック図である。
FIG. 1 is a circuit block diagram showing a microcomputer incorporating an AD converter according to the present invention.

【図2】従来のAD変換器内蔵マイクロコンピュータを
示すブロック図である。
FIG. 2 is a block diagram showing a conventional microcomputer with a built-in AD converter.

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

(11) マイクロコンピュータ (12) AD変換器 (25)(26)(27) AD変換器 (38) 制御レジスタ (39) デコーダ (11) Microcomputer (12) AD converter (25) (26) (27) AD converter (38) Control register (39) Decoder

Claims (3)

【特許請求の範囲】[Claims] 【請求項1】 直列抵抗回路網、該直列抵抗回路網から
得られる基準電圧とアナログ信号とを比較する比較器、
及び該比較器から得られる「1」又は「0」のデータが
格納されるレジスタを有し、前記アナログ信号を所定ビ
ットのデジタル信号に変換するAD変換器を内蔵したマ
イクロコンピュータにおいて、 複数の異なる電圧を発生する電圧発生部と、 前記直列抵抗回路網の少なくとも一端に印加される電圧
を可変する為のデータがプログラムの解読結果に基づき
設定される制御レジスタと、 前記制御レジスタの設定内容に基づき、前記電圧発生部
から得られる何れか1個の電圧を、前記直列抵抗回路網
の少なくとも一端に印加させる電圧切換部と、 を備えたことを特徴とするAD変換器内蔵マイクロコン
ピュータ。
A series resistor network, a comparator for comparing a reference voltage obtained from the series resistor network with an analog signal,
A microcomputer having a register in which data of “1” or “0” obtained from the comparator is stored, and incorporating an AD converter for converting the analog signal into a digital signal of a predetermined bit. A voltage generating unit that generates a voltage, a control register in which data for changing a voltage applied to at least one end of the series resistance network is set based on a result of decoding a program, and a setting content of the control register. And a voltage switching unit for applying any one voltage obtained from the voltage generation unit to at least one end of the series resistance network.
【請求項2】 前記電圧発生部は、複数の演算増幅器か
ら構成され、該複数の演算増幅器から複数の異なる電圧
を出力させることを特徴とする請求項1記載のAD変換
器内蔵マイクロコンピュータ。
2. The microcomputer with built-in A / D converter according to claim 1, wherein said voltage generator comprises a plurality of operational amplifiers, and outputs a plurality of different voltages from said plurality of operational amplifiers.
【請求項3】 前記複数の演算増幅器は、電圧フォロワ
型であり、各々の一方の入力端子には抵抗分割された異
なる基準電圧が印加されることを特徴とする請求項2記
載のAD変換器内蔵マイクロコンピュータ。
3. The A / D converter according to claim 2, wherein the plurality of operational amplifiers are of a voltage follower type, and different reference voltages divided by resistance are applied to one input terminal of each of the plurality of operational amplifiers. Built-in microcomputer.
JP8308180A 1996-11-19 1996-11-19 Microcomputer with built-in a/d converter Pending JPH10150365A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP8308180A JPH10150365A (en) 1996-11-19 1996-11-19 Microcomputer with built-in a/d converter

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP8308180A JPH10150365A (en) 1996-11-19 1996-11-19 Microcomputer with built-in a/d converter

Publications (1)

Publication Number Publication Date
JPH10150365A true JPH10150365A (en) 1998-06-02

Family

ID=17977880

Family Applications (1)

Application Number Title Priority Date Filing Date
JP8308180A Pending JPH10150365A (en) 1996-11-19 1996-11-19 Microcomputer with built-in a/d converter

Country Status (1)

Country Link
JP (1) JPH10150365A (en)

Similar Documents

Publication Publication Date Title
US5642116A (en) Self calibrating segmented digital-to-analog converter
JP3565613B2 (en) Semiconductor integrated circuit device
JPH10303751A (en) Analog/digital converter
JP3819986B2 (en) Analog / digital converter control method
US6094154A (en) Analog-to-digital converter
US6046692A (en) Microprocessor equipped with an A/D converter
JPH1032491A (en) Flash a/d converter
JPH07106969A (en) A/d converter
US6927723B2 (en) A/D converter and A/D conversion method
JPH10150365A (en) Microcomputer with built-in a/d converter
JP2004180065A (en) Sequential comparison ad converter and microcomputer
JP2001148631A (en) Analog/digital converter, micro computer and analog/ digital conversion method
KR100318446B1 (en) An analog-digital converter using successive approximation register
JP2980035B2 (en) A / D conversion circuit
JPH07231256A (en) A/d converter
JP2848094B2 (en) D / A converter
KR950010422B1 (en) D/a converter
JPH07123004A (en) A/d conversion circuit
JPH08186494A (en) Analog/digital converter
JP2913329B2 (en) Semiconductor element
JPH03198428A (en) A/d converter
JPH01157264A (en) Variable output digital power source device
JPH0612502A (en) Microcomputer with built-in a/d conversion circuit
KR20050041649A (en) Analog to digital converter
JPH05291957A (en) One-chip comparator with comparison reference changeover switch