JPS63226118A - Ad converter - Google Patents

Ad converter

Info

Publication number
JPS63226118A
JPS63226118A JP5907387A JP5907387A JPS63226118A JP S63226118 A JPS63226118 A JP S63226118A JP 5907387 A JP5907387 A JP 5907387A JP 5907387 A JP5907387 A JP 5907387A JP S63226118 A JPS63226118 A JP S63226118A
Authority
JP
Japan
Prior art keywords
conversion
type
signal
sample
output
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
JP5907387A
Other languages
Japanese (ja)
Inventor
Hirokazu Itagaki
宏和 板垣
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.)
Oki Electric Industry Co Ltd
Original Assignee
Oki Electric Industry 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 Oki Electric Industry Co Ltd filed Critical Oki Electric Industry Co Ltd
Priority to JP5907387A priority Critical patent/JPS63226118A/en
Publication of JPS63226118A publication Critical patent/JPS63226118A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To realize the titled converter by applying the mode setting of a sample-and-hold means, setting of a digital value of a DA conversion means and read of the output of a comparator means based on a program to generate a digital signal corresponding to the input analog signal. CONSTITUTION:If the AD conversion system is of the voltage V-pulse width T type, for example, the processing means sets the sample-and-hold circuit 1 to a 1st mode, where an input analog signal is sampled and held. Then the processing means sets a DA converter 8 to allow it to count up sequentially from '0', reads the output of a comparator 9 and outputs a set digital value when the result of sample-and-hold of the input analog output signal is equal to the analog value corresponding to the set digital value and the output value is changed as the result of the AD conversion. The processing means applies the similar processing every time an interruption signal is supplied from the timer 4. The desired AD conversion system is realized by one set of AD converter by having only to change the content (program) of the storage means (memory 5) in such a way.

Description

【発明の詳細な説明】 (産業上の利用分野) 本発明は入力アナログ信号をディジタル信号に変換する
AD変換装置に関し、特に各種のAD変換方式を一つの
装置で実現可能なAD変換装置に関するものである。
Detailed Description of the Invention (Field of Industrial Application) The present invention relates to an AD conversion device that converts an input analog signal to a digital signal, and particularly relates to an AD conversion device that can realize various AD conversion methods with one device. It is.

(従来の技術) 汎用のAD変換ユニットや汎用のAD変換用IC等のA
D変換装置において、実用化されているAD変換方式と
しては、(a)計数方式、 (b)帰還比較方式、(c
)無帰還比較方式等がある。
(Prior art) A of general-purpose AD conversion units, general-purpose AD conversion ICs, etc.
The AD conversion methods that have been put into practical use in D conversion devices include (a) counting method, (b) feedback comparison method, and (c)
) Non-feedback comparison method etc.

計数方式は、何らかの方法でアナログ電圧をその大きさ
に比例した数のパルス列に変換し、計数回路でパルスの
数をかぞえることによりAD変換を行なう方式である。
The counting method is a method in which an analog voltage is converted into a pulse train of a number proportional to its magnitude by some method, and AD conversion is performed by counting the number of pulses with a counting circuit.

この方式の具体例としては、入力端子■とパルス幅Tの
線形関係を利用して変換動作を行なうV−T型、及び入
力端子Vとパルス周波数Fの線形関係を利用して変換動
作を行なうV−F型がある。
Specific examples of this method include the V-T type, which performs the conversion operation using the linear relationship between the input terminal ■ and the pulse width T, and the V-T type, which performs the conversion operation using the linear relationship between the input terminal V and the pulse frequency F. There is a V-F type.

帰還比較方式は、帰還回路としてDA変換器をもち、そ
の出力電圧と入力端子とが比較回路で比較され、両者が
等しくなるように動作することによって、AD変換を行
なう方式である。この方式の具体例としては、入力端子
Vを2進数の最上位ビットから逐次比較をする事で変換
動作を行なう、逐次比較型、及び前値サンプルデータと
現時点サンプルデータの大小関係を利用して変換動作を
行なう追従比較型がある。
The feedback comparison method is a method that has a DA converter as a feedback circuit, and performs AD conversion by comparing the output voltage of the DA converter with the input terminal in the comparison circuit and operating so that the two become equal. Specific examples of this method include a successive approximation type in which the conversion operation is performed by successively comparing the input terminal V from the most significant bit of the binary number, and a type that uses the magnitude relationship between the previous value sample data and the current sample data. There is a follow-up comparison type that performs conversion operations.

無帰還比較方式は複数の電圧比較回路を持つ事で一度の
比較により、ディジタル値を高速に生成出来るAD変換
方式である。この方式の具体例としては、コードがもつ
数値の種類だけ電圧比較回路を持ち、1回の操作で変換
動作を行なう並列比較型がある。
The non-feedback comparison method is an AD conversion method that can generate a digital value at high speed through one comparison by having a plurality of voltage comparison circuits. A specific example of this method is a parallel comparison type that has voltage comparison circuits for each type of numerical value contained in the code and performs the conversion operation in one operation.

上記各種方式を変換速度面から比較すると、nビットの
ディジタル15号を生成するために、V−T型では最大
で2°ステツプ、逐次比較型でnステップ、追従比較型
で最大2nステツプ、並列型で1ステップ変換処理時間
が必要となる。従って、高速動作が必要な分野では、並
列型や逐次比較型が適している。又、nビットのディジ
タル信号を生成するための回路構成量を比較すると、一
般的に、並列型が最も多く、続いて、逐次比較型、追従
比較型、V−T型の順となる。又、変換粒度に関しては
、一般的に並列型以外は、同程度であり、比較的高粒度
といえる。
Comparing the above various methods in terms of conversion speed, in order to generate an n-bit digital number 15, the V-T type requires a maximum of 2° steps, the successive approximation type requires n steps, the tracking comparison type requires a maximum of 2n steps, and parallel One step conversion processing time is required for each type. Therefore, parallel type and successive approximation type are suitable for fields that require high-speed operation. Furthermore, when comparing the amount of circuit configuration for generating an n-bit digital signal, the parallel type is generally the most common type, followed by the successive approximation type, the tracking comparison type, and the VT type. In addition, regarding the conversion granularity, in general, except for the parallel type, the conversion granularity is about the same, and it can be said that the granularity is relatively high.

従ってAD変換装置のAD変換方式を決定する時には、
使用分野に必要な処理速度、精度、使用可能な回路量を
十分考慮した方式にする必要がある。
Therefore, when deciding the AD conversion method of the AD conversion device,
It is necessary to develop a method that takes into account the processing speed, accuracy, and amount of available circuitry necessary for the field of use.

なお、追従比較型のAD変換方式を用いた具体例として
は、例えば特開昭60−25100号公報に開示された
波形記憶装置がある。
Note that, as a specific example using the follow-up comparison type AD conversion method, there is a waveform storage device disclosed in, for example, Japanese Patent Laid-Open No. 60-25100.

(発明が解決しようとする問題点) しかしながら、前記従来のAD変換装置では、採用され
ているAD変換によって変換速度や変換ビット数に制約
されるので、これらを変更するためには、対応する他の
AD変換方式を採用したAD変換装置を使用しなければ
ならないという問題点があった。
(Problems to be Solved by the Invention) However, in the conventional AD conversion device, the conversion speed and the number of conversion bits are limited by the AD conversion adopted, so in order to change these, it is necessary to There is a problem in that an AD conversion device that adopts the AD conversion method must be used.

本発明は以上述べた問題点を解決し、同一の回路で、か
つ最小の回路構成で実現できるAD変換装置を提供する
ことを目的とする。
SUMMARY OF THE INVENTION An object of the present invention is to solve the above-mentioned problems and to provide an AD converter that can be realized using the same circuit and a minimum circuit configuration.

(問題点を解決するための手段) 本発明は前記問題点を解決するために、入力アナログ信
号をディジタル信号に変換して出力するAD変換装置に
おいて、(a)入力アナログ信号をサンプルホールドす
る第1のモード、及び入力アナログ信号を出力する第2
のモードを実行するサンプルホールド手段、(b)設定
されるディジタル値をアナログ信号に変換するDA変換
手段、(C)前記サンプルホールド手段及びDA変換手
段の出力値を比較する比較手段、(d)周期的な割込み
信号を発生するタイマ手段、(e)電圧−パルス幅型、
逐次比較型、追従比較型及び並列型の各AD変換方式を
含む各種AD変換方式のうち、所望のAD変換方式の処
理アルゴリズムを格納する記憶手段、(f)前記タイマ
手段からの割込み信号及び記憶手段に格納された処理ア
ルゴリズムに基づいて、前記サンプルホールド手段のモ
ード設定、前記DA変換手段のディジタル値の設定及び
前記比較手段の出力値の読み込みを行って入力アナログ
信号に対応したディジタル信号を作成する処理を行う処
理手段とを具備するものである。
(Means for Solving the Problems) In order to solve the above problems, the present invention provides an AD converter that converts an input analog signal into a digital signal and outputs the digital signal. 1 mode, and a second mode that outputs the input analog signal.
(b) DA conversion means for converting the set digital value into an analog signal; (C) comparison means for comparing the output values of the sample and hold means and the DA conversion means; (d) timer means for generating periodic interrupt signals; (e) voltage-pulse width type;
Storage means for storing a processing algorithm for a desired AD conversion method among various AD conversion methods including successive approximation type, tracking comparison type, and parallel type AD conversion methods; (f) an interrupt signal from the timer means and storage; Based on a processing algorithm stored in the means, a mode setting of the sample hold means, a digital value setting of the DA converting means, and an output value of the comparing means are performed to create a digital signal corresponding to the input analog signal. and processing means for performing processing.

(作 用) 本発明によれば以上のようにAD変換装置を構成したの
で、技術的手段は次のように作用する。
(Function) According to the present invention, since the AD conversion device is configured as described above, the technical means functions as follows.

処理手段(例えばマイクロプロセッサ及びデータレジス
タ等)は、割込み信号及び記憶手段に格納された所望の
AD変換方式の処理アルゴリズム、即ちプログラムに基
づいて、サンプルホールド手段のモード設定、DA変換
手段のディジタル値の設定及び比較手段の出力値の読込
みを行って入力アナログ信号に対応したディジタル信号
を作成する処理を行なうように働く。
The processing means (for example, a microprocessor, a data register, etc.) sets the mode of the sample and hold means, and sets the digital value of the DA conversion means based on the interrupt signal and the processing algorithm of the desired AD conversion method, that is, the program stored in the storage means. setting and reading the output value of the comparison means to create a digital signal corresponding to the input analog signal.

例えば、AD変換方式が電圧(V)−パルス幅(T)型
であれば、処理手段は、まずサンプルホールド手段(例
えば後述のサンプルホールド回路と設定用レジスタ)を
第1のモードに設定し、入力アナログ信号をサンプルホ
ールドさせる。次に、処理手段はDA変換手段(例えば
、レジスタ、ラダー抵抗ネットワーク等)に°゛0”よ
り順にカウントアツプするように設定すると共に、比較
手段の出力値の読み込みを行い、入力アナログ信号のサ
ンプルホールド結果と、設定ディジタル値に対応したア
ナログ値とが等しくなりで出力値が変化したときの設定
ディジタル値をAD変換結果として出力する。処理手段
は同様の処理をタイマ手段からの割込み信号が入力され
る毎に行なう。
For example, if the AD conversion method is a voltage (V)-pulse width (T) type, the processing means first sets the sample and hold means (for example, a sample and hold circuit and a setting register described later) to the first mode, Sample and hold the input analog signal. Next, the processing means sets the DA conversion means (for example, a register, a ladder resistance network, etc.) to count up sequentially from 0.0, reads the output value of the comparison means, and samples the input analog signal. When the hold result and the analog value corresponding to the set digital value become equal and the output value changes, the set digital value is output as the AD conversion result.The processing means performs similar processing when an interrupt signal from the timer means is input. Do it every time you are asked.

このように、記憶手段の内容(プロダラム)を変更する
だけ、所望のAD変換方式が一台のAD変換装置で実現
できるので、前記従来技術の問題点の解決できるのであ
る。
In this way, a desired AD conversion method can be realized with a single AD conversion device by simply changing the contents (program) of the storage means, so that the problems of the prior art described above can be solved.

(実施例) 第1図は本発明の第1の実施例を示すAD変換装置のブ
ロック図である。同図において、1はサンプル及ホール
1回路(S&H回路)であり、アナログ入力信号5GI
Nを一時的にホールドさせるために使用する。2はサン
プル及ホール1回路1の動作を制御するためのレジスタ
(LVLREG)であり、具体的には、S&H回路1を
スルーモードにするかサンプルモードにするかの制御を
行なうものである。3は、マイクロプロセッサ等の演算
処理ユニット(LPU)であり、後述する制御用のメモ
リに格納されたアルゴリズムに従った動作を行なう。
(Embodiment) FIG. 1 is a block diagram of an AD conversion device showing a first embodiment of the present invention. In the same figure, 1 is a sample and Hall 1 circuit (S&H circuit), and the analog input signal 5GI
Used to temporarily hold N. Reference numeral 2 denotes a register (LVLREG) for controlling the operation of the sample and hole 1 circuit 1, and specifically controls whether the S&H circuit 1 is placed in the through mode or the sample mode. Reference numeral 3 denotes an arithmetic processing unit (LPU) such as a microprocessor, which operates according to an algorithm stored in a control memory, which will be described later.

LPt13は内部レジスタとし−(L、PRA31及び
LPRB32を有する。4はLPU3に周期的な割込み
を与えるためのインターバルタイマ(TMR)であり、
AD変換処理は、周期的な割込み処理により行なわれる
。5はLPU3を制御するための処理アルゴリズム(各
種AD変換方式)を格納するメモリ、6はAD変換され
たディジタル値を外部へ出力させるためのデータレジス
タ(DATA REG)である。7は後述する比較器よ
り出力されるレベルをLPU3がセンスするためのレジ
スタ、8はDA変換部(LDR)であり、通常はレジス
タ、ラダー抵抗ネットワーク等により構成するが、DA
変換の粒度を向上させるために、定電流源駆動回路を内
蔵させてもよい。9は電圧比較器であり、サンプル及ホ
ール1回路1からの出力([有]点)とDA変換部8か
らの出力(■点)を比較してレジスタに入力する。
LPt13 is an internal register and has -(L, PRA31 and LPRB32. 4 is an interval timer (TMR) for giving periodic interrupts to LPU3,
The AD conversion process is performed by periodic interrupt processing. 5 is a memory for storing processing algorithms (various AD conversion methods) for controlling the LPU 3, and 6 is a data register (DATA REG) for outputting AD-converted digital values to the outside. 7 is a register for the LPU3 to sense the level output from a comparator, which will be described later, and 8 is a DA converter (LDR), which is usually configured with a register, ladder resistance network, etc.
In order to improve the granularity of conversion, a constant current source driving circuit may be incorporated. Reference numeral 9 denotes a voltage comparator, which compares the output from the sample and Hall 1 circuit 1 (point [present]) and the output from the DA converter 8 (point ■) and inputs the result to a register.

なお、本実施例のAD変換装置は前述の波形記憶装置の
要部の構成にS&H回路I及びモード設定用のレジスタ
2を設けて次に述べる各種のAD変換方式に対応させた
ものである。
The AD conversion device of this embodiment has an S&H circuit I and a register 2 for mode setting in addition to the configuration of the main part of the waveform storage device described above, so as to be compatible with various AD conversion methods described below.

以下、第1の実施例のAD変換装置の動作を(a) V
−T型変換動作、(b)逐次比較型変換動作及び(C)
追従比較型変換動作に分けて説明する。
Below, the operation of the AD converter of the first embodiment will be described as (a) V
- T type conversion operation, (b) successive approximation type conversion operation and (C)
The follow-up comparison type conversion operation will be explained separately.

(a) V−T型変換動作 第2図はメモリ5に格納されるV−T型AD変換方式の
処理アルゴリズムを示すフローチャートである。また第
3図(a) 、 (b)は第2図の処理アルゴリズムを
LPU 3により実行したときの動作説明図である。同
図(a)は動作波形を示し、同図(b)はデータレジス
タ6の出力値(DOUT)を示すものである。
(a) VT type conversion operation FIG. 2 is a flowchart showing a processing algorithm of the VT type AD conversion method stored in the memory 5. 3(a) and 3(b) are explanatory diagrams of operations when the processing algorithm shown in FIG. 2 is executed by the LPU 3. 3(a) shows operating waveforms, and FIG. 2(b) shows the output value (DOUT) of the data register 6.

以下、第2図、第3図を参照してV−T型変換動作を説
明する。
The VT type conversion operation will be explained below with reference to FIGS. 2 and 3.

インターバルタイマ(TMR) 4からの周期的な割込
みに従フて、LPU3は第2図のアルゴリズムを実行す
る。タイマ割込が入ると、LPI]3は、レジスタ2を
サンプルホールドモードにセットする。この結果、アナ
ログ入力信号5GINは、ホールドされ、第3図(a)
の■で示すレベルを維持する(Sl)。次にLPU3内
部のレジスタ(LPRA) 31がOクリアされ、その
後、LPRA31の値がLDR8に転送されるので、比
較器9の一入力端子■には、“0°°が入力される(S
2,53a)、その後、比較器9の出力がレジスタ(L
VLREG) 7を通して、LPU3(7)内部レジス
タ(LPRB)32に読み込まれる(S3b)。この時
点の比較器9の入力端子レベルは、■〉[有]の関係に
あるので、LP11B=1となり、S3a −S3dの
ステップで示すループ処理を繰り返す事になる。このル
ープ処理により比較器9の一入力端子■の値は、連続的
にカランドアツブされ、のこぎり波となるが、0=■の
電圧となった時点、即ち、LP01の内部レジスタLP
RB=0となった時点で、ループ処理を終了し、その時
のLPRA31の値がデータレジスタ(DATA RE
G)6にセットされる(S4)。即ち、その時の値は、
第3図(b)で示す0111 (2進数)である。その
後、LP口3よりレジスタ2をリセットして1回のAD
変換を終了する(S5)。
In response to periodic interrupts from the interval timer (TMR) 4, the LPU 3 executes the algorithm shown in FIG. When a timer interrupt occurs, LPI]3 sets register 2 to sample and hold mode. As a result, the analog input signal 5GIN is held, as shown in FIG. 3(a).
Maintain the level indicated by ■ (Sl). Next, the register (LPRA) 31 inside the LPU3 is cleared to O, and then the value of the LPRA31 is transferred to the LDR8, so “0°°” is input to one input terminal of the comparator 9 (S
2, 53a), then the output of the comparator 9 is sent to the register (L
VLREG) 7 and is read into the LPU3 (7) internal register (LPRB) 32 (S3b). Since the input terminal level of the comparator 9 at this point is in the relationship ■>[present], LP11B=1, and the loop processing shown in steps S3a to S3d is repeated. Through this loop processing, the value of one input terminal (■) of the comparator 9 is continuously multiplied and becomes a sawtooth wave, but when the voltage reaches 0=■, that is, the value of the internal register LP of LP01
When RB=0, the loop processing ends and the value of LPRA31 at that time is stored in the data register (DATA RE
G) Set to 6 (S4). That is, the value at that time is
This is 0111 (binary number) shown in FIG. 3(b). After that, reset register 2 from LP port 3 and perform one AD.
The conversion ends (S5).

同様の処理を繰り返す事で、アナログ入力信号5GIN
に対して、データレジスタ6より、1011゜1110
.1100が7MR4の割込みの周期ts間隔で出力す
る事になる。尚、本方式のAD変換処理時間tcは、ア
ナログ入力信号5GINの振幅によゝり異なるのが1つ
の欠点でもある。変換ビット数をnビットとすると、2
°tc<tsの関係になるように、割込み周期tsを決
定すれば、問題なく処理される。
By repeating the same process, the analog input signal 5GIN
From data register 6, 1011°1110
.. 1100 will be output at 7MR4 interrupt cycle ts intervals. Incidentally, one drawback of this method is that the AD conversion processing time tc varies depending on the amplitude of the analog input signal 5GIN. If the number of conversion bits is n bits, then 2
If the interrupt period ts is determined so that the relationship tc<ts is satisfied, the interrupt can be processed without any problems.

(b)逐次比較型変換動作 第4図はメモリ5に格納される逐次比較型AD変換方式
の処理アルゴリズムを示すフローチャートである。第5
図(a) 、 (b)は第4図の処理アルゴリズムをL
P01により実行したときの動作説明図である。同図(
a)は動作波形を示し、同図(b)はデータレジスタ6
の出力値(DOUT)を示すものである。
(b) Successive Approximation Type Conversion Operation FIG. 4 is a flowchart showing the processing algorithm of the successive approximation type AD conversion method stored in the memory 5. Fifth
Figures (a) and (b) show the processing algorithm in Figure 4.
FIG. 6 is an explanatory diagram of the operation when executed by P01. Same figure (
(a) shows the operating waveform, and (b) of the same figure shows the data register 6.
This shows the output value (DOUT) of.

以下第4図、第5図を参照して逐次比較型変換動作を説
明する。
The successive approximation conversion operation will be described below with reference to FIGS. 4 and 5.

7MR4からの周期的な割込みに従って、LP01は、
第4図のアルゴリズムを実行する。タイマ割込みが入る
と、LP01は、レジスタ2をサンプルホールドモード
にセットする。この結果、アナログ入力信号5GINは
、ホールドされ、第5図(a)の■で示すレベルを維持
する(Sll)。次虹、L P U 3を介して、デー
タレジスタ(DATA REG)6に“0°゛をセット
すると共に、LP01の内部レジスタ(LPRA)31
に2進数10000をセットする(S13)。以上の初
期設定終了後、LP01の内部レジスタ(LPRA)3
1の内容をLDR8に転送する(S14a)。本実施例
では、アナログ入力信号SG1.Nを5ビツト、即ち、
32量子化ステツプで処理しているので、LDR8より
出力されるアナログ電圧は第5図(a)の(1)で示す
レベル、即ち、量1量 子化ステップ15となり、32量子化ステツプの半分の
値となる。この時点でレジスタ(LVL REG)7に
よりレベルをセンスして、LP01の内部レジスタ(L
PRB)32に読み込む(s14b)。この時、■〉■
の関係であるので、LPRB=0となり、データレジス
タ6のMSB 、即ち、5ビツト目は、0のままで、次
に4ビツト目の処理を実行する(S14c)。4ビツト
目の処理をさせるために、まず、初期設定したLPRA
=10000  (2進数)を1ビツト右論理シフトを
行なう(S14e、5I4f) 、次にLPRA=01
000 (2進数)が、LDR8にセットされ、この時
点で、レジスタ7の内容がLP01の内部レジスタ(L
PRB) 32に読み込まれる(S14a、514b)
。この時は、■〈■の関係であるので、LPR8=3で
あり、データレジスタ6の4ビツト目は、“1”に設定
される(S14d)。同様にしてデータレジスタ6の3
ビツト目、2ビツト目、1ビツト目と処理されて、最終
的にDATA REG=01110(2進数)が生成さ
れる。1回のAD変換の終了を判定するには、LP01
の内部レジスタ(LPRA)31が、右論理シフトされ
て、“O”になった事で行なう(S14f)。 LPR
A=Oとなった時点で、レジスタ2をスルーモードにセ
ット(即ちS&Hモードをリセット)して1回のAD変
換処理が終了する( 515)。
According to periodic interrupts from 7MR4, LP01:
Execute the algorithm shown in FIG. When a timer interrupt occurs, LP01 sets register 2 to sample hold mode. As a result, the analog input signal 5GIN is held and maintains the level shown by ■ in FIG. 5(a) (Sll). Next, through the LPU 3, set the data register (DATA REG) 6 to "0°" and set the internal register (LPRA) 31 of the LP01.
The binary number 10000 is set in (S13). After completing the above initial settings, the internal register (LPRA) 3 of LP01
1 is transferred to LDR8 (S14a). In this embodiment, analog input signals SG1. N is 5 bits, i.e.
Since the processing is performed using 32 quantization steps, the analog voltage output from the LDR 8 is at the level shown in (1) in FIG. value. At this point, the level is sensed by register (LVL REG) 7 and the internal register (L
PRB) 32 (s14b). At this time, ■〉■
Therefore, LPRB=0, and the MSB of data register 6, ie, the 5th bit, remains 0, and then the process of the 4th bit is executed (S14c). In order to process the 4th bit, first set the initial setting of LPRA.
=10000 (binary number) is logically shifted to the right by 1 bit (S14e, 5I4f), then LPRA=01
000 (binary number) is set in LDR8, and at this point the contents of register 7 are transferred to the internal register of LP01 (LDR8).
PRB) 32 (S14a, 514b)
. At this time, since the relationship is ■<■, LPR8=3, and the fourth bit of the data register 6 is set to "1" (S14d). Similarly, data register 6-3
The 1st bit, 2nd bit, and 1st bit are processed to finally generate DATA REG=01110 (binary number). To determine the end of one AD conversion, LP01
This is done when the internal register (LPRA) 31 of LPRA is logically shifted to the right and becomes "O" (S14f). LPR
When A=O, register 2 is set to through mode (that is, S&H mode is reset) and one AD conversion process is completed (515).

同様の処理を繰り返す事で、アナログ入力信号5GIH
に対して、データレジスタ6より、10100゜101
10が7MR4の割込みの周期ts間隔で出力する事に
なる。尚本式のAD変換処理時間は、変換ビット数をn
ビットとすれば、n −tc<tsの関係になるよう割
込み周期tsを決定すれば、問題なく処理される。
By repeating the same process, the analog input signal 5GIH
From data register 6, 10100°101
10 will be output at the interrupt cycle ts interval of 7MR4. Note that the AD conversion processing time of this method is based on the number of conversion bits n
In the case of bits, if the interrupt period ts is determined so that the relationship n - tc<ts is satisfied, processing can be performed without any problem.

(C)追従比較型変換動作 第6図(a) 、 (b)はメモリ5に格納される追従
比較型AD変換方式の処理アルゴリズムを示すフローチ
ャートであって、同図(a)は初期設定処理、同図(b
)は初期設定処理後の処理を示すものである。また第7
図(a) 、 (b)は第6図の処理アルゴリズムをL
P01により実行したときの動作説明図であフて、同図
(a)は動作波形、同図(b)はデータレジスタ6の出
力値(DOUT)を示すものである。以下、第6図及び
第7図を参照して追従比較型変換動作を説明する。
(C) Follow-up comparison type conversion operation FIGS. 6(a) and 6(b) are flowcharts showing the processing algorithm of the follow-up comparison type AD conversion method stored in the memory 5, and FIG. 6(a) shows the initial setting process. , the same figure (b
) indicates the process after the initial setting process. Also the 7th
Figures (a) and (b) show the processing algorithm in Figure 6.
This is an explanatory diagram of the operation when executed by P01, in which (a) shows the operating waveform and (b) shows the output value (DOUT) of the data register 6. The following comparison type conversion operation will be described below with reference to FIGS. 6 and 7.

追従比較型変換動作は、前サンプル値と、現サンプル値
の差分値から通常1ビツトのコードを生成するものであ
る。
The follow-up comparison type conversion operation normally generates a 1-bit code from the difference value between the previous sample value and the current sample value.

現在使用されている方式として、DPCM方式、ADP
GM方式等の各種の追従比較型があるが、本実施例の場
合は、最も基本的な方式である単一デルタ変調型の動作
について述べる。
Currently used methods include DPCM method, ADP
Although there are various tracking comparison types such as the GM method, in the case of this embodiment, the operation of the single delta modulation type, which is the most basic method, will be described.

追従比較型は、前サンプル値と、現サンプル値を1ステ
ツプの比較のみでAD変換動作を実行する方式であるた
め、サンプル及ホールド回路は不要となる。従って、初
期設定動作時にレジスタ2をリセットしてスルーモード
に設定しておく(S21)。又、LDR8もLPU3の
内部レジスタ(LPRA) 31を介して、°゛0”に
設定してお((S22)。
The follow-up comparison type is a method in which the AD conversion operation is performed by only comparing the previous sample value and the current sample value in one step, so a sample and hold circuit is not required. Therefore, during the initial setting operation, register 2 is reset and set to through mode (S21). Further, the LDR8 is also set to 0'' via the internal register (LPRA) 31 of the LPU3 ((S22)).

次にインターバルタイマ(TMR) 4からLPU3に
周期的な割込みが入ると、レジスタ(LVL REG)
7の値がLPU3の内部レジスタ(LPRB)32に読
み込まれる(S24)。この時点で、アナログ入力信号
5GIN=■と、前サンプル値、即ち、■が比較される
(525a)。
Next, when a periodic interrupt is input from interval timer (TMR) 4 to LPU3, register (LVL REG)
The value 7 is read into the internal register (LPRB) 32 of the LPU 3 (S24). At this point, the analog input signal 5GIN=■ is compared with the previous sample value, ie, ■ (525a).

比較結果が、LPRB=1、即ち、■〉■ならば、LP
RA31をインクリメントしてデータレジスタ(DAT
AREG)6にコード“1″を出力すると同時に、LP
RA31の値をLDR8に再設定する(S26a、52
7a、528a)。一方、比較結果が、LPRB=O1
即ち、■〈■ならば、LPRA31をデクリメントして
、データレジスタ(DATAREG) 6にコード“0
”を出力すると同時に、LPRA31の値をLDR20
8に再設定する(S26b、527b、528)。
If the comparison result is LPRB=1, that is, ■>■, then LP
Increment RA31 and read the data register (DAT).
At the same time as outputting code “1” to AREG) 6, LP
Reset the value of RA31 to LDR8 (S26a, 52
7a, 528a). On the other hand, the comparison result is LPRB=O1
That is, if ■<■, LPRA31 is decremented and data register (DATAREG) 6 is set to code “0.”
” and at the same time output the value of LPRA31 to LDR20.
8 (S26b, 527b, 528).

以上説明した動作をTMR4からの割込みにより、LP
U3の割込み処理ルーチン内部で縁り返す事により、ア
ナログ入力信号5GIN= Aに対して、LDR8の出
力、即ち、■は、あたかも常に追従して動作する事にな
る。
The above-described operation is performed by interrupting the LP from TMR4.
By turning around within the interrupt processing routine of U3, the output of LDR8, ie, ■, operates as if it always follows analog input signal 5GIN=A.

その時のデータレジスタ6より生成される1ビツトのコ
ードは、第7図(b)で示すような図となる。
The 1-bit code generated from the data register 6 at this time is as shown in FIG. 7(b).

第8図は本発明の第2の実施例を示すAD変換装置の構
成図である。同図において、第1図と同一の参照符号は
同一性のある構成要素を示す。第1図との相違点は並列
型変換動作させるために、第1図の構成要素のうち、レ
ジスタ7、LDR8、比較器9を複数個設け、レジスタ
7a、 LDR8a、比較器9aとしたことである。本
実施例では、4ビツトの並列型AD変換装置を構成する
ために、LDR8aとしてLDR(1) 801〜LD
R(15)815 、比較器9aとして比較器(CI)
901〜比較器(015)915の各15個とすると共
に、レジスタ7aを比較器901〜915の出力レベル
の検出ができるようにしたものである。
FIG. 8 is a block diagram of an AD conversion device showing a second embodiment of the present invention. In this figure, the same reference numerals as in FIG. 1 indicate the same components. The difference from FIG. 1 is that in order to perform a parallel conversion operation, a plurality of registers 7, LDR 8, and comparator 9 are provided among the components shown in FIG. be. In this embodiment, in order to configure a 4-bit parallel AD converter, LDR(1) 801 to LD are used as LDR8a.
R(15)815, comparator (CI) as comparator 9a
There are 15 each of comparators 901 to 915, and the register 7a is configured to be able to detect the output levels of the comparators 901 to 915.

第9図(a) 、 (b)はメモリ5に格納される並列
型AD変換方式の処理アルゴリズムを示すフローチャー
トであって、同図(a)は初期設定処理時のフローチャ
ートを示し、同図(b)は初期設定処理後の処理を示す
ものである。第10図(a) 、 (b)は第9図の処
理アルゴリズムをLPU 3で実行したときの動作説明
図であフて、同図(a)は動作波形、同図(b)はデー
タレジスタ6の出力値(DOUT)を示すものである。
9(a) and 9(b) are flowcharts showing the processing algorithm of the parallel AD conversion method stored in the memory 5, in which FIG. 9(a) shows the flowchart during initial setting processing; b) shows the process after the initial setting process. 10(a) and 10(b) are explanatory diagrams of the operation when the processing algorithm of FIG. 9 is executed by LPU 3. FIG. This shows the output value (DOUT) of No. 6.

第11図はメモリ5内のデータ変換テーブルを示す図で
ある。
FIG. 11 is a diagram showing a data conversion table in the memory 5.

以下、第9図乃至第11図を参照して並列型変換動作を
説明する。
The parallel conversion operation will be described below with reference to FIGS. 9 to 11.

並列型変換動作では、第1の実施例の追従比較型と同様
に1ステツプの比較のみでAD変換動作を実行する方式
であるため、サンプル及ホールド回路1は、不要となる
。従って、初期設定動作時にレジスタ2をスルーモード
にセットして、アナログ入力信号が直接比較器901〜
915に、入力されるように設定しておく (S31)
。また、15個のLDRタイプDA変換部801〜81
5を、量子化レベル1から量子化レベル15に初期設定
する(S32)。
In the parallel type conversion operation, the sample and hold circuit 1 is not necessary because the AD conversion operation is performed by only one step of comparison, similar to the follow-up comparison type of the first embodiment. Therefore, during the initial setting operation, register 2 is set to through mode so that the analog input signal is directly transmitted to the comparators 901 to 901.
915 to be input (S31)
. In addition, 15 LDR type DA converters 801 to 81
5 is initialized from quantization level 1 to quantization level 15 (S32).

初期設定終了後、TMR4の割込がLPU 3に入ると
、まずレジスタ(LVL REG) 7(7)内容(1
5ヒツト)をLP[J 3の内部レジスタ(LPRB)
 32に読み込む(S33)。次に、読み込んだ15ビ
ツトのLPR832の値をメモリ5の内部にあるデータ
変換テーブル(第11図)を利用して、テーブル検索を
行なう(S34) 。第10図(a)の第1回目のAD
変換動作では、LPRB=(111110000000
000)の値であるので、TBLOUT=(1010)
 、即ち5(10進)の値がテーブル検索されて、デー
タレジスタ(DATA REG) 6にセットされる(
S35)。
After the initial settings are completed, when an interrupt from TMR4 enters LPU 3, first register (LVL REG) 7 (7) contents (1
5 hits) to LP [J 3 internal register (LPRB)
32 (S33). Next, a table search is performed for the read 15-bit LPR 832 value using the data conversion table (FIG. 11) inside the memory 5 (S34). The first AD in Figure 10(a)
In the conversion operation, LPRB=(111110000000
000), so TBLOUT=(1010)
, that is, the value of 5 (decimal) is searched in the table and set in data register (DATA REG) 6 (
S35).

同様の処理を繰り返す事で、アナログ入力信号5GIN
に対して、データレジスタ6より、1010゜1110
.1100が、TMR4の割込みの周期ts間隔で出力
する事になる。
By repeating the same process, the analog input signal 5GIN
From data register 6, 1010°1110
.. 1100 will be output at TMR4 interrupt cycle ts intervals.

以上述べたように、AD変換装置を第2の実施例の構成
にすることにより並列型変換動作が可能となり、更に、
LDR8a 、比較器98及びレジスタ7aのうち、所
望の系統を使用することにより、第1の実施例で述べた
(a) V−T型変換動作、(b)逐次比較型変換動作
及び(C)追従比較型変換動作も同様に実現できる。
As described above, by configuring the AD conversion device as in the second embodiment, parallel conversion operation becomes possible, and furthermore,
By using a desired system among the LDR 8a, the comparator 98, and the register 7a, (a) VT type conversion operation, (b) successive approximation type conversion operation, and (C) described in the first embodiment can be performed. A follow-up comparison type conversion operation can also be realized in the same way.

このように、本実施例によれば、 (1)演算処理ユニット3を制御するマイクロプログラ
ムの変更のみで、現在実用化されている汎用AD変換方
式である(a) V−T型変換方式、(b)逐次比較型
変換方式、(C)追従比較型変換方式、(d)並列型変
換方式の各方式が実現可能となる。従って、AD変換装
置の変換速度、変換ビット数は、マイクロプログラムの
変更のみで対応出来るので、使用者が、使用目的に合っ
た変換方式、変換速度、変換ビット数を実現させる為の
マイクロプログラムを作成すれば、即座に目的とするA
D変換装置として使用出来る。
As described above, according to the present embodiment, (1) only by changing the microprogram that controls the arithmetic processing unit 3, a general-purpose AD conversion method that is currently in practical use (a) VT type conversion method; (b) Successive approximation conversion method, (C) follow-up comparison conversion method, and (d) parallel conversion method can be realized. Therefore, the conversion speed and number of conversion bits of the AD conversion device can be adjusted simply by changing the microprogram, so the user can create a microprogram to achieve the conversion method, conversion speed, and number of conversion bits that suit the purpose of use. If you create it, you can immediately achieve the desired A.
Can be used as a D conversion device.

(2)本実施例のAD変換装置の構成要素は、演算処理
ユニット3、入出力用のレジスタ6.7(7a)。
(2) The components of the AD conversion device of this embodiment are an arithmetic processing unit 3 and input/output registers 6.7 (7a).

比較器9 (9a) 、ラダー抵抗ネットワークを含む
DA変換部8(8a) 、サンプル及ホールド回路1等
であるので、AD変換装置をLSI化する事により、汎
用AD変換素子の構成が可能となる。従って、水力式の
LSI内部のマイクロプログラムを変更するのみで、使
用目的に合ったAD変換素子が構成出来る。
Comparator 9 (9a), DA converter 8 (8a) including a ladder resistance network, sample and hold circuit 1, etc., so by converting the AD converter into an LSI, it becomes possible to configure a general-purpose AD converter element. . Therefore, by simply changing the microprogram inside the hydraulic LSI, an AD conversion element suitable for the purpose of use can be configured.

(3)以上説明した(a)〜(b)の各種AD変換方式
以外に、本発明の装置を採用すれば、DPGMPCM方
式)PCM方式等のかなりの部分の処理アルゴリズムが
実現出来るので、AD変換方式にとどまらず、ディジタ
ル圧縮・伸長処理等のディジタル信号処理用のアナログ
インターフェース部分に直接利用出来る。
(3) In addition to the various AD conversion methods (a) to (b) explained above, by adopting the device of the present invention, it is possible to realize a considerable part of processing algorithms such as the DPGMPCM method) PCM method, so AD conversion It can be used not only as a system but also as an analog interface for digital signal processing such as digital compression/expansion processing.

(4)本実施例のAD変換装置の構成要素である演算処
理ユニット3に1命令平均実行時間0.8〜1.0μs
ec程度の汎用マイクロプロセッサを採用した場合、変
換ビット長8ビツトとすると、1回のAD変換処理時間
は、逐次比較型で20〜30μsec追従型で2〜5μ
sec 、並列型で5〜20μsec程度となるので、
音声認識、音声合意等の音声信号処理装置に直接採用す
る事が出来る。
(4) The average execution time for one instruction in the arithmetic processing unit 3, which is a component of the AD conversion device of this embodiment, is 0.8 to 1.0 μs.
If a general-purpose microprocessor such as ec is used, and the conversion bit length is 8 bits, the processing time for one AD conversion is 20 to 30 μsec for the successive approximation type and 2 to 5 μsec for the tracking type.
sec, it will be about 5 to 20 μsec in parallel type, so
It can be directly adopted in audio signal processing devices such as speech recognition and speech agreement.

(発明の効果) 以上詳細に説明したように本発明によれば、記憶手段の
内容、即ち、プログラムを変更するだけで、1台の装置
により各種のAD変換方式が簡単な回路構成で実現でき
ると共に変換速度、変換ビット数等を容易に変更するこ
とができる。
(Effects of the Invention) As described above in detail, according to the present invention, various AD conversion methods can be realized with a single device with a simple circuit configuration by simply changing the contents of the storage means, that is, the program. At the same time, the conversion speed, number of conversion bits, etc. can be easily changed.

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

第1図は本発明の第1の実施例を示すAD変換装置の構
成図、第2図はV−T型変換動作時のフローチャート、
第3図(a) 、 (b)はV−T型変換動作の説明図
、第4図は逐次比較型変換動作時のフローチャート、第
5図(a) 、 (b)は逐次比較型変換動作の説明図
、第6図(a) 、 (b)は追従比較型変換動作時の
フローチャート、第7図(a) 、 (b)は追従比較
型変換動作の説明図、第8図は本発明の第2の実施例の
構成図、第9図(a) 、 (b)は並列型変換動作時
のフローチャート、第10図(a) 、 (b)は並列
型変換動作の説明図、第11図はデータ変換テーブルを
示す図である。 ■・・・サンプルホールド(S&H)回路、2.7(7
a)・・・レジスタ、 3・・・ 演算処理ユニット(LPU)、5・・・メモ
リー 6・・・データレジスタ(DATA REG)。 8(8a)、801〜815 =JA変換部(CI)R
)、9(9a)、901〜915−・・比較器。 31.32・・・内部レジスタ。
FIG. 1 is a configuration diagram of an AD conversion device showing a first embodiment of the present invention, FIG. 2 is a flowchart during V-T type conversion operation,
Figures 3 (a) and (b) are explanatory diagrams of VT type conversion operation, Figure 4 is a flowchart during successive approximation type conversion operation, and Figures 5 (a) and (b) are successive approximation type conversion operation. FIGS. 6(a) and 6(b) are flowcharts of the follow-up comparison type conversion operation, FIGS. 7(a) and (b) are explanatory diagrams of the follow-up comparison type conversion operation, and FIG. 8 is a flowchart of the follow-up comparison type conversion operation. 9(a) and (b) are flowcharts of the parallel conversion operation; FIGS. 10(a) and (b) are explanatory diagrams of the parallel conversion operation; The figure shows a data conversion table. ■...Sample and hold (S&H) circuit, 2.7 (7
a)...Register, 3...Arithmetic processing unit (LPU), 5...Memory 6...Data register (DATA REG). 8 (8a), 801 to 815 = JA conversion unit (CI) R
), 9(9a), 901-915--Comparators. 31.32...Internal register.

Claims (1)

【特許請求の範囲】 入力アナログ信号をディジタル信号に変換して出力する
AD変換装置において、 (a)入力アナログ信号をサンプルホールドする第1の
モード、及び入力アナログ信号を出力する第2のモード
を実行するサンプルホールド手段、(b)設定されるデ
ィジタル値をアナログ信号に変換するDA変換手段、 (c)前記サンプルホールド手段及びDA変換手段の出
力値を比較する比較手段、 (d)周期的な割込み信号を発生するタイマ手段、(e
)電圧−パルス幅型、逐次比較型、追従比較型及び並列
型の各AD変換方式を含む各種AD変換方式のうち、所
望のAD変換方式の処理アルゴリズムを格納する記憶手
段、 (f)前記タイマ手段からの割込み信号及び記憶手段に
格納された処理アルゴリズムに基づいて、前記サンプル
ホールド手段のモード設定、前記DA変換手段のディジ
タル値の設定及び前記比較手段の出力値の読み込を行っ
て入力アナログ信号に対応したディジタル信号を作成す
る処理を行う処理手段とを具備することを特徴とするA
D変換装置。
[Claims] An AD converter that converts an input analog signal into a digital signal and outputs the digital signal, comprising: (a) a first mode in which the input analog signal is sampled and held; and a second mode in which the input analog signal is output. (b) DA conversion means for converting the set digital value into an analog signal; (c) comparison means for comparing the output values of the sample and hold means and the DA conversion means; (d) periodic timer means for generating an interrupt signal (e
) a storage means for storing a processing algorithm for a desired AD conversion method among various AD conversion methods including voltage-pulse width type, successive approximation type, tracking comparison type, and parallel type AD conversion methods; (f) the timer; Based on the interrupt signal from the means and the processing algorithm stored in the storage means, the mode setting of the sample and hold means, the setting of the digital value of the DA converting means, and the reading of the output value of the comparing means are carried out to convert the input analog A, characterized in that it comprises a processing means for performing processing to create a digital signal corresponding to the signal.
D conversion device.
JP5907387A 1987-03-16 1987-03-16 Ad converter Pending JPS63226118A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP5907387A JPS63226118A (en) 1987-03-16 1987-03-16 Ad converter

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP5907387A JPS63226118A (en) 1987-03-16 1987-03-16 Ad converter

Publications (1)

Publication Number Publication Date
JPS63226118A true JPS63226118A (en) 1988-09-20

Family

ID=13102811

Family Applications (1)

Application Number Title Priority Date Filing Date
JP5907387A Pending JPS63226118A (en) 1987-03-16 1987-03-16 Ad converter

Country Status (1)

Country Link
JP (1) JPS63226118A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006304035A (en) * 2005-04-22 2006-11-02 Agilent Technol Inc Analog-digital converting method and system thereof

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006304035A (en) * 2005-04-22 2006-11-02 Agilent Technol Inc Analog-digital converting method and system thereof

Similar Documents

Publication Publication Date Title
US5736953A (en) A/D converter having a reduced response time and reduced power consumption
JPH07101840B2 (en) Digital noise signal generator
MY123934A (en) Sample rate converter
JPS63226118A (en) Ad converter
US4450365A (en) Digital logic buffer for converting single polarity analog signals to dual polarity analog signals
US4319325A (en) Digital processor for processing analog signals
JP2002057580A5 (en)
JPS61256826A (en) Digital-analog converter
JPS62151025A (en) Analog-digital conversion circuit
JPS62152223A (en) Da converter system
JPH08293791A (en) Analog/digital converter
JPS5928294B2 (en) AD converter
SU1520557A1 (en) Nonlinear a-d converter
JP2010033311A (en) Communication system
KR960027358A (en) Self-diagnosis circuit of analog / digital converter
JPH0611662Y2 (en) Digital analog converter
JP3001325B2 (en) Microcomputer
SU1589078A1 (en) Device for measuring temperature
JPS6025100A (en) Waveform storage device
SU1518892A1 (en) Device for monitoring s/n ratio
JPH06152421A (en) A/d converter
SU1211856A1 (en) Digital function generator
JP2000269814A (en) Analog/digital conversion circuit
JPH0376428A (en) A/d converter
JPH02165727A (en) Successive comparison type a/d converter and microcomputer having the same