JP2005191810A - Digital/analog converter and microcomputer - Google Patents

Digital/analog converter and microcomputer Download PDF

Info

Publication number
JP2005191810A
JP2005191810A JP2003429291A JP2003429291A JP2005191810A JP 2005191810 A JP2005191810 A JP 2005191810A JP 2003429291 A JP2003429291 A JP 2003429291A JP 2003429291 A JP2003429291 A JP 2003429291A JP 2005191810 A JP2005191810 A JP 2005191810A
Authority
JP
Japan
Prior art keywords
conversion
analog
analog input
oversampling
converter
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
JP2003429291A
Other languages
Japanese (ja)
Inventor
Nobuyasu Kanekawa
信康 金川
Masatoshi Hoshino
雅俊 星野
Kohei Sakurai
康平 櫻井
Hiromichi Yamada
弘道 山田
Kotaro Shimamura
光太郎 島村
Yuichiro Morita
雄一朗 守田
Satoshi Tanaka
敏 田中
Naoki Yada
直樹 矢田
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.)
Renesas Technology Corp
Original Assignee
Renesas Technology 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 Renesas Technology Corp filed Critical Renesas Technology Corp
Priority to JP2003429291A priority Critical patent/JP2005191810A/en
Publication of JP2005191810A publication Critical patent/JP2005191810A/en
Pending legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To provide an A/D converter capable of A/D conversion processing while necessary resolutions are flexibly set by analog inputs, and a microcomputer. <P>SOLUTION: Disclosed is the A/D converter which has an A/D control register 60 where control information on A/D conversion is set and has a function of performing oversampling while selecting one of a plurality of analog input channels AN0 to ANn. The A/D converter has a plurality of entries of conversion control information of the A/D control register 60 and also has a field where an oversampling ratio is set in each entry. According to settings of entries, an A/D conversion part 30 performs A/D conversion at a specified oversampling ratio, and a filter arithmetic circuit 10 performs filter processing with a specified filter coefficient and outputs an A/D conversion result data. Thus, the A/D conversion processing is carried out at oversampling ratios by analog inputs. <P>COPYRIGHT: (C)2005,JPO&NCIPI

Description

本発明は、アナログ/デジタル変換器(A/D変換器)及びA/D変換器を有するマイクロコンピュータに関し、特に、オーバーサンプリング機能を有するA/D変換器及びマイクロコンピュータに関する。   The present invention relates to an analog / digital converter (A / D converter) and a microcomputer having an A / D converter, and more particularly to an A / D converter and a microcomputer having an oversampling function.

集積回路技術の発展に伴い、メモリ、タイマ、そしてA/D変換器などの周辺モジュールを1つのチップに備えたマイクロコンピュータが主流となってきている。これら周辺モジュールを備えたマイクロコンピュータでは、制御方式として、マイクロプロセッシングユニット(MPU)が逐一周辺モジュールの動作を制御するのではなく、周辺モジュールが制御レジスタを備える構成でMPUによる制御レジスタへの制御情報の設定に基づき各周辺モジュールを動作させる。このような制御方式によりMPUの負荷を減らし、結果としてマイクロコンピュータ全体の性能を向上させることが広く行われてきている。   With the development of integrated circuit technology, microcomputers having peripheral modules such as a memory, a timer, and an A / D converter on one chip have become mainstream. In a microcomputer equipped with these peripheral modules, as a control method, the control processing information to the control register by the MPU is not controlled by the micro processing unit (MPU), but the peripheral module includes a control register. Each peripheral module is operated based on the setting. It has been widely practiced to reduce the load on the MPU by such a control method and, as a result, improve the performance of the entire microcomputer.

例えば、本発明の対象であるA/D変換器の技術に的を絞ると、非特許文献1によれば、マイクロコンピュータにおけるA/D変換器の制御レジスタ(A/Dコントロールステータスレジスタ)の所定ビット(ビット5,4:A/Dモード1、0(ADM1, ADM0))により、複数のアナログ入力チャネルについてのA/D変換の動作モードとして、単一モード、4チャネルスキャンモード、8チャネルスキャンモード、12チャネルスキャンモードなどを設定できる構成となっている。これにより、A/D変換器がMPUとは独立してMPUによる逐一の関与なしでスキャン動作が可能となっている。なおここでのスキャン動作とは、複数(1つ以上)のアナログ入力チャネルについて順次選択しながらA/D変換を連続して実行してゆく動作を指している。また単一モードとは、指定の単一のアナログ入力チャネルについてA/D変換を行うモードである。   For example, when focusing on the technology of the A / D converter that is the subject of the present invention, according to Non-Patent Document 1, the control register (A / D control status register) of the A / D converter in the microcomputer is predetermined. Bits (bits 5 and 4: A / D modes 1 and 0 (ADM1, ADM0)), A / D conversion operation mode for multiple analog input channels, single mode, 4-channel scan mode, 8-channel scan The mode, 12 channel scan mode, etc. can be set. As a result, the A / D converter can perform a scanning operation independently of the MPU and without any involvement of the MPU. Here, the scan operation refers to an operation in which A / D conversion is continuously executed while sequentially selecting a plurality (one or more) of analog input channels. The single mode is a mode in which A / D conversion is performed for a specified single analog input channel.

また、例えば非特許文献2に記載されているように、マイクロコンピュータ内にデルタシグマ型(ΔΣ型)A/D変換器を備え、オーバーサンプリング動作をさせることで変換の分解能を向上させるオーバーサンプリングA/D変換器も提供されている。上記ΔΣ型A/D変換器は、デジタルフィルタ、積分器と逐次型1ビットA/D変換器、D/A変換器を用いて、1ビットのA/D変換結果に対してデジタル処理を加えるものである。
「日立SuperH RISC engine SH-2 SH7050シリーズ ハードウェアマニュアル」,株式会社日立製作所,平成11年9月,第5版,p.469 「ユーザーズマニュアル V850ES/PM1 32ビット・シングルチップ・マイクロコンピュータ ハードウェア編 μPD703228 資料番号U16237JJ2V0UD00(第2版)」,NEC Electronics Corporation,2003年7月,第12章,p.259−267,インターネット<URL: http://www.necel.com/nesdis/image/U16237JJ2V0UD00.pdf>
For example, as described in Non-Patent Document 2, an oversampling A that includes a delta-sigma (ΔΣ) A / D converter in a microcomputer and improves the resolution of conversion by performing an oversampling operation. A / D converter is also provided. The ΔΣ A / D converter applies digital processing to a 1-bit A / D conversion result using a digital filter, an integrator, a sequential 1-bit A / D converter, and a D / A converter. Is.
"Hitachi SuperH RISC engine SH-2 SH7050 Series Hardware Manual", Hitachi, Ltd., September 1999, 5th edition, p. 469 “User's Manual V850ES / PM1 32-bit Single-Chip Microcomputer Hardware Edition μPD703228 Document No. U16237EJ2V0UD00 (2nd edition)”, NEC Electronics Corporation, July 2003, Chapter 12, p. 259-267, Internet <URL: http://www.necel.com/nesdis/image/U16237EJ2V0UD00.pdf>

非特許文献1などの従来技術によれば、MPUとは独立して周辺モジュールを動作させることでMPUの負担を軽減し、結果としてマイクロコンピュータ全体の性能を向上させることが可能である。また、非特許文献2などの従来技術によれば、オーバーサンプリング動作をさせることでA/D変換器の分解能を向上させることができ、高精度、高速の制御用途に適したマイクロコンピュータを提供することができる。   According to the prior art such as Non-Patent Document 1, it is possible to reduce the burden on the MPU by operating peripheral modules independently of the MPU, and as a result, it is possible to improve the performance of the entire microcomputer. Further, according to the prior art such as Non-Patent Document 2, the resolution of the A / D converter can be improved by performing an oversampling operation, and a microcomputer suitable for high-precision and high-speed control applications is provided. be able to.

しかしながら上記従来技術は、A/D変換処理においてアナログ入力ごとに必要な分解能が異なる場合への対応について考慮すると更に種々の用途に活用しやすいものとなる。   However, the above-described conventional technology can be more easily used for various applications in consideration of the case where the resolution required for each analog input is different in A / D conversion processing.

例えばハイブリッド自動車の制御について考えてみると、自動車エンジン制御のための入力は従来通り10ビットの分解能のA/D変換器で十分であるが、これに対してバッテリの充電容量(SOC: State of Charge)の推定のためにはバッテリの端子電圧及び充放電電流を12〜14ビット精度の分解能でA/D変換することが必要であり、必要な分解能が異なってくる。   For example, when controlling a hybrid vehicle, a 10-bit resolution A / D converter is sufficient as an input for controlling a vehicle engine, but a battery charge capacity (SOC: State of In order to estimate (Charge), it is necessary to A / D convert the terminal voltage and charge / discharge current of the battery with a resolution of 12 to 14 bits, and the required resolution differs.

以上のような問題を鑑み、本発明の主要な目的は、オーバーサンプリングA/D変換機能を備え、アナログ入力ごとに必要な分解能をフレキシブルに設定してA/D変換を行うことのできるA/D変換器及びマイクロコンピュータを提供することである。   In view of the above problems, the main object of the present invention is to provide an oversampling A / D conversion function, and to perform A / D conversion by flexibly setting a necessary resolution for each analog input. It is to provide a D converter and a microcomputer.

本願において開示される発明のうち、代表的なものの概要を簡単に説明すれば、次のとおりである。   Of the inventions disclosed in the present application, the outline of typical ones will be briefly described as follows.

(1)前記目的を実現するために、本発明のA/D変換器は、複数のアナログ入力と、複数のアナログ入力からいずれか1つを選択するマルチプレクサと、選択されたアナログ入力をA/D変換するA/D変換部及びA/D変換部におけるA/D変換後のデータをフィルタ処理するフィルタ演算回路と、変換制御情報を格納する制御レジスタ(A/D制御レジスタ)と、変換結果データを格納する変換結果レジスタとを有し、制御レジスタは、変換制御情報のための複数のエントリを有し、エントリごとにオーバーサンプリング比を設定するフィールドを有し、上記エントリの設定に基づき、A/D変換部及びフィルタ演算回路に、アナログ入力ごとのオーバーサンプリング比でのA/D変換処理を実行させることを特徴とする。   (1) In order to achieve the above object, an A / D converter according to the present invention includes a plurality of analog inputs, a multiplexer that selects any one of the plurality of analog inputs, and the selected analog input as an A / D converter. A / D conversion unit for D conversion, a filter operation circuit for filtering data after A / D conversion in the A / D conversion unit, a control register (A / D control register) for storing conversion control information, and a conversion result A conversion result register for storing data, the control register has a plurality of entries for conversion control information, has a field for setting an oversampling ratio for each entry, and based on the setting of the entry, An A / D conversion unit and a filter arithmetic circuit are caused to execute A / D conversion processing at an oversampling ratio for each analog input.

上記構成により、本A/D変換器は、制御レジスタの複数のエントリにおける変換制御情報の設定に基づき、指定アナログ入力について、指定オーバーサンプリング比相当の回数でA/D変換(サンプリング)した結果を所定フィルタ係数でフィルタリングし、A/D変換結果データとして出力する。本A/D変換器は、制御レジスタの設定に基づき、アナログ入力ごとに指定の分解能でのA/D変換処理を行う。   With the above configuration, the A / D converter performs the A / D conversion (sampling) on the designated analog input at the number of times corresponding to the designated oversampling ratio based on the setting of the conversion control information in the plurality of entries of the control register. Filter with a predetermined filter coefficient and output as A / D conversion result data. The A / D converter performs A / D conversion processing at a specified resolution for each analog input based on the setting of the control register.

(2)また、本発明のA/D変換器は、前記(1)のA/D変換器において、制御レジスタの複数のエントリは、アナログ入力ごとのエントリとして構成されることを特徴とする。   (2) Further, the A / D converter of the present invention is characterized in that, in the A / D converter of (1), the plurality of entries in the control register are configured as entries for each analog input.

上記制御レジスタのエントリ形式においては、1つのエントリの設定によって1つのアナログ入力についてのA/D変換処理の属性を指定でき、各エントリに設定を行うことで、アナログ入力ごとに異なる属性でのA/D変換処理を指定できる。   In the control register entry format, the attribute of A / D conversion processing for one analog input can be specified by setting one entry, and by setting each entry, A with different attributes for each analog input can be specified. / D conversion processing can be specified.

(3)また、本発明のA/D変換器は、前記(1)のA/D変換器において、制御レジスタの複数のエントリは、A/D変換処理の実行順序ごとのエントリとして構成されることを特徴とする。   (3) In the A / D converter of the present invention, in the A / D converter of (1), the plurality of entries in the control register are configured as entries for each execution order of the A / D conversion process. It is characterized by that.

上記制御レジスタのエントリ形式においては、1つのエントリの設定によって1つのアナログ入力についてのA/D変換処理の属性を指定でき、複数のエントリによりA/D変換処理実行順の設定を行うことで、アナログ入力ごとに異なる属性でのA/D変換処理を指定して順に実行させることができる。   In the entry format of the control register, the attribute of A / D conversion processing for one analog input can be specified by setting one entry, and the execution order of A / D conversion processing can be set by a plurality of entries. A / D conversion processing with different attributes for each analog input can be designated and executed in order.

(4)また、本発明のA/D変換器は、前記(1)のA/D変換器において、制御レジスタの複数のエントリは、A/D変換開始要因ごとのエントリとして構成されることを特徴とする。   (4) In the A / D converter of the present invention, in the A / D converter of (1), a plurality of entries in the control register are configured as entries for each A / D conversion start factor. Features.

上記制御レジスタのエントリ形式においては、1つの変換開始要因に対応するエントリの設定によって複数のアナログ入力について所定の属性のA/D変換処理を指定でき、起動開始要因ごとに異なる属性でのA/D変換処理を指定して実行させることができる。   In the entry format of the control register, A / D conversion processing with a predetermined attribute can be specified for a plurality of analog inputs by setting an entry corresponding to one conversion start factor, and A / D conversion with a different attribute for each activation start factor. A D conversion process can be specified and executed.

(5)また、本発明のA/D変換器は、前記(1)のA/D変換器において、制御レジスタは、エントリごとに、フィルタ演算回路のフィルタ係数を設定するフィールドを有し、フィルタ係数の設定に基づき、フィルタ演算回路にフィルタ処理を実行させることを特徴とする。   (5) In the A / D converter according to the present invention, in the A / D converter according to (1), the control register has a field for setting a filter coefficient of a filter arithmetic circuit for each entry. Based on the setting of the coefficient, the filter arithmetic circuit is caused to execute the filtering process.

上記構成により、本A/D変換器は、制御レジスタの複数のエントリにおける変換制御情報の設定に基づき、指定アナログ入力について、指定オーバーサンプリング比相当の回数でA/D変換(サンプリング)した結果を指定フィルタ係数でフィルタリングし、A/D変換結果データとして出力する。   With the above configuration, the A / D converter performs the A / D conversion (sampling) on the designated analog input at the number of times corresponding to the designated oversampling ratio based on the setting of the conversion control information in the plurality of entries of the control register. Filter with the specified filter coefficient and output as A / D conversion result data.

(6)また、本発明のA/D変換器は、前記(5)のA/D変換器において、フィルタ演算回路は、前記フィルタ係数が、2-mまたは(1−2-m) (m:整数)となる構成を有することを特徴とする。 (6) The A / D converter of the present invention is the A / D converter of (5), wherein the filter arithmetic circuit has a filter coefficient of 2 −m or (1-2 −m ) (m : Integer).

上記構成において、フィルタ演算回路は、シフタ、加算器、減算器などから構成され、その動作は例えば以下のようになる。前回値を変換結果レジスタから読み出し、係数2-mを掛け、それにA/D変換部からの入力値に係数(1−2-m)を掛けたものを加え、この演算結果が変換結果レジスタに書き込まれる。 In the above configuration, the filter operation circuit includes a shifter, an adder, a subtracter, and the like, and the operation is as follows, for example. The previous value is read from the conversion result register, multiplied by the coefficient 2- m, and the input value from the A / D converter is multiplied by the coefficient (1-2- m ), and the result of the operation is stored in the conversion result register. Written.

(7)また、本発明のA/D変換器は、前記(1)のA/D変換器において、複数のアナログ入力のうち、第1のアナログ入力について指定オーバーサンプリング比でオーバーサンプリングを行い、これと同時並行的に、アナログ入力を選択しながら第1のアナログ入力のオーバーサンプリングにおける個々のサンプリングの間に第2のアナログ入力についてのA/D変換(通常A/D変換またはオーバーサンプリング)を行うことを特徴とする。   (7) Moreover, the A / D converter of the present invention performs oversampling with a specified oversampling ratio on the first analog input among the plurality of analog inputs in the A / D converter of (1), In parallel with this, A / D conversion (usually A / D conversion or oversampling) for the second analog input is performed during individual sampling in oversampling of the first analog input while selecting the analog input. It is characterized by performing.

(8)また、本発明のA/D変換器は、前記(1)のA/D変換器において、複数のアナログ入力のうち、第1のアナログ入力について指定オーバーサンプリング比でオーバーサンプリングを行い、これと同時並行的に、アナログ入力を選択しながら第1のアナログ入力のオーバーサンプリング比と異なるオーバーサンプリング比で第2のアナログ入力についてオーバーサンプリングを行うことを特徴とする。   (8) Moreover, the A / D converter of the present invention performs oversampling with a specified oversampling ratio on the first analog input among the plurality of analog inputs in the A / D converter of (1), At the same time, oversampling is performed on the second analog input with an oversampling ratio different from the oversampling ratio of the first analog input while selecting the analog input.

(9)また、本発明のマイクロコンピュータは、前記(1)−(7)のいずれかのA/D変換器と、MPUと、バスとを有し、A/D変換器の制御レジスタと変換結果レジスタとがバスを介してMPUから書き込み及び読み出しされることを特徴とする。   (9) The microcomputer of the present invention includes the A / D converter according to any one of (1) to (7), an MPU, and a bus, and converts the control register and the A / D converter. The result register is written to and read from the MPU via the bus.

上記構成により、本マイクロコンピュータでは、MPUは、バスを介してA/D制御レジスタの設定を行ってA/D変換器を制御し、所定のA/D変換処理を行わせる。そして、変換結果レジスタのデータを読み込むことによりA/D変換結果を得る。本マイクロコンピュータでは、A/D変換器の制御レジスタの複数のエントリへの変換制御情報の設定に基づき、アナログ入力ごとあるいはA/D変換処理実行順ごとあるいはA/D変換開始要因ごとの変換属性で所望のパターンのA/D変換処理を実行させる。   With the above configuration, in this microcomputer, the MPU sets the A / D control register via the bus, controls the A / D converter, and performs a predetermined A / D conversion process. Then, the A / D conversion result is obtained by reading the data in the conversion result register. In this microcomputer, based on the setting of conversion control information to a plurality of entries in the control register of the A / D converter, conversion attributes for each analog input, for each A / D conversion processing execution order, or for each A / D conversion start factor To execute A / D conversion processing of a desired pattern.

(10)また、本発明のマイクロコンピュータは、前記(9)のマイクロコンピュータにおいて、ランダムアクセスメモリ(RAM)と、ダイレクトメモリアクセスコントローラ(DMAC)とを有し、変換結果レジスタがRAM上に論理的に構成され、DMACによりフィルタ演算回路とRAM上の変換結果レジスタとの間でデータ転送されることを特徴とする。   (10) The microcomputer of the present invention is the microcomputer of the above (9), which has a random access memory (RAM) and a direct memory access controller (DMAC), and a conversion result register is logically stored on the RAM. The data transfer is performed between the filter operation circuit and the conversion result register on the RAM by the DMAC.

上記構成により、本マイクロコンピュータでは、DMACによりA/D変換結果データをフィルタ演算回路とRAMとの間で転送処理する。MPUから高速でアクセスできるRAM上にA/D変換結果データが転送されるので、A/D変換結果データへのアクセス時間を短縮できる。   With this configuration, the microcomputer transfers the A / D conversion result data between the filter arithmetic circuit and the RAM by the DMAC. Since the A / D conversion result data is transferred onto the RAM that can be accessed at high speed from the MPU, the access time to the A / D conversion result data can be shortened.

本願において開示される発明のうち、代表的なものによって得られる効果を簡単に説明すれば以下のとおりである。   Among the inventions disclosed in the present application, effects obtained by typical ones will be briefly described as follows.

本発明によれば、A/D変換器の制御レジスタにおける変換制御情報の複数のエントリでの設定に基づき、A/D変換部及びフィルタ演算回路にアナログ入力ごとの指定属性でのA/D変換処理を実行させるので、アナログ入力チャネルごとにオーバーサンプリング比を指定して必要な分解能でのA/D変換処理を実現することができる。本発明によれば、アナログ入力に応じて必要なA/D変換分解能をフレキシブルに設定可能なA/D変換器及びA/D変換器を有するマイクロコンピュータを提供できる。   According to the present invention, A / D conversion with a specified attribute for each analog input to the A / D conversion unit and the filter operation circuit based on the setting in a plurality of entries of conversion control information in the control register of the A / D converter Since the process is executed, an A / D conversion process with a necessary resolution can be realized by designating an oversampling ratio for each analog input channel. According to the present invention, it is possible to provide an A / D converter capable of flexibly setting a required A / D conversion resolution in accordance with an analog input and a microcomputer having the A / D converter.

以下、本発明の実施の形態を図面に基づいて詳細に説明する。なお、実施の形態を説明するための全図において、同一部には原則として同一の符号を付し、その繰り返しの説明は省略する。   Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings. Note that components having the same function are denoted by the same reference symbols throughout the drawings for describing the embodiment, and the repetitive description thereof will be omitted.

図1は、本発明の実施の形態におけるA/D変換器の構成を示すブロック図である。図1の構成は、本発明のいくつかの実施の形態におけるA/D変換器の基本的な構成を示すものである。本A/D変換器は、複数のアナログ入力(アナログ入力チャネル)AN0−ANn、複数のアナログ入力AN0−ANnから選択を行うマルチプレクサ40、A/D変換部30、フィルタ演算回路10、変換結果データを格納する変換結果レジスタ20、変換制御情報を格納するA/D制御レジスタ60、制御論理50を備える。   FIG. 1 is a block diagram showing a configuration of an A / D converter in the embodiment of the present invention. The configuration of FIG. 1 shows the basic configuration of an A / D converter in some embodiments of the present invention. The A / D converter includes a plurality of analog inputs (analog input channels) AN0 to ANn, a multiplexer 40 that selects from the plurality of analog inputs AN0 to ANn, an A / D converter 30, a filter operation circuit 10, and conversion result data. Conversion result register 20, A / D control register 60 for storing conversion control information, and control logic 50.

制御論理50からの制御に基づき、マルチプレクサ40はアナログ入力AN0−ANnの内1つを選択してA/D変換部30に入力し、A/D変換部30では選択されたアナログ入力のアナログ信号についてA/D変換を行いA/D変換後のデジタルデータをフィルタ演算回路10に入力する。フィルタ演算回路10は、入力されたA/D変換後のデジタルデータを所定のフィルタ係数でフィルタリングして、変換結果レジスタ20にA/D変換結果データとして書き込む。   Based on the control from the control logic 50, the multiplexer 40 selects one of the analog inputs AN0 to ANn and inputs it to the A / D converter 30, and the A / D converter 30 selects the analog signal of the selected analog input. A / D conversion is performed on the digital data, and the digital data after A / D conversion is input to the filter arithmetic circuit 10. The filter arithmetic circuit 10 filters the input digital data after A / D conversion with a predetermined filter coefficient, and writes it as A / D conversion result data in the conversion result register 20.

制御論理50は、A/D制御レジスタ60の設定に基づいて、マルチプレクサ40が選択するアナログ入力を制御したり、A/D変換部30でのA/D変換処理におけるオーバーサンプリング比を制御したり、フィルタ演算回路10のフィルタ係数を制御したり、変換結果レジスタ20のアドレス選択を制御したりする。   The control logic 50 controls the analog input selected by the multiplexer 40 based on the setting of the A / D control register 60, or controls the oversampling ratio in the A / D conversion process in the A / D conversion unit 30. The filter coefficient of the filter arithmetic circuit 10 is controlled, and the address selection of the conversion result register 20 is controlled.

A/D変換部30は、オーバーサンプリングA/D変換を行う機能を有する回路部であり、A/D制御レジスタ60の設定で指定されたオーバーサンプリング比でのオーバーサンプリング動作あるいは通常のA/D変換動作を実行する。   The A / D conversion unit 30 is a circuit unit having a function of performing oversampling A / D conversion, and performs an oversampling operation at an oversampling ratio designated by the setting of the A / D control register 60 or a normal A / D. Perform the conversion operation.

A/D制御レジスタ60は、上記オーバーサンプリング比やフィルタ係数の設定の他、本A/D変換器におけるA/D変換処理の実行に係る各種の変換制御情報を格納する制御レジスタであり、MPU等から設定の書き込みが行われる。本実施の形態のA/D変換器におけるA/D制御レジスタ60は、変換制御情報の格納のための複数のエントリを有し、各エントリにオーバーサンプリング比やフィルタ係数の設定フィールドを持つ。ここでのエントリとは、A/D変換処理の実行を制御しその属性を指定する個々の変換制御情報の設定部である。A/D変換処理要求(A/D変換の起動または開始の要因)の発生に応じて、A/D制御レジスタ60の各エントリに変換制御情報が書き込みされる。   The A / D control register 60 is a control register for storing various conversion control information related to the execution of A / D conversion processing in the A / D converter in addition to the setting of the oversampling ratio and the filter coefficient. The setting is written from the above. The A / D control register 60 in the A / D converter of the present embodiment has a plurality of entries for storing conversion control information, and each entry has a setting field for an oversampling ratio and a filter coefficient. The entry here is an individual conversion control information setting unit for controlling the execution of the A / D conversion process and designating the attribute. Conversion control information is written to each entry of the A / D control register 60 in response to the generation of an A / D conversion processing request (factor for starting or starting A / D conversion).

なおオーバーサンプリングA/D変換器の場合、アナログ信号をデジタル信号に変換する狭義のA/D変換器部分と、フィルタ演算回路(デジタルフィルタ)部分との総体のことも「A/D変換器」と呼ぶことが多い。ここでは、狭義のA/D変換器の部分をA/D変換部30とし、これとフィルタ演算回路10とを含めてA/D変換器とし、区別することにする。また、A/D変換結果データ(あるいは単に変換結果)とは、A/D変換部30におけるA/D変換と、フィルタ演算回路10におけるフィルタ処理とを施したデータとする。   In the case of an oversampling A / D converter, an A / D converter in a narrow sense that converts an analog signal into a digital signal and a filter operation circuit (digital filter) part are also referred to as an “A / D converter”. Often called. Here, the A / D converter in the narrow sense is the A / D converter 30, and the A / D converter including the filter arithmetic circuit 10 is distinguished from the A / D converter. The A / D conversion result data (or simply the conversion result) is data obtained by performing A / D conversion in the A / D conversion unit 30 and filter processing in the filter arithmetic circuit 10.

オーバーサンプリングA/D変換器を実現する場合、そのA/D変換部としてはデルタシグマ(ΔΣ)方式のものを使用することが多い。なぜならばデルタシグマ方式のものを使用すればオーバーサンプリング比の1乗にほぼ比例して分解能が向上するからである。しかし本発明で提供するA/D変換器のA/D変換部にデルタシグマ方式のものを使用することは必ずしも得策ではない。というのはまず第1に、デルタシグマ型A/D変換部は変換実行時にデジタル化した残りの残差を内部の積分器に蓄え、次回の入力と加えて変換しなければならない。したがって、アナログ入力をマルチプレクサで切り替えてデルタシグマ型A/D変換部を使用する場合には、アナログ入力ごとに即ちアナログ入力の数だけ内部に変換の残差を蓄える積分器を持ちマルチプレクサと連動して積分器を切り替える制御を行う必要がある。そのため、複数の積分器を備えるために回路面積が大きくなる。また、入力信号に含まれる雑音成分は統計に独立であると仮定すると、平均化によりオーバーサンプリング比の1/2乗に反比例してしか減少しないため、A/D変換器の分解能がオーバーサンプリング比の1乗に比例しても、1/2乗に反比例して減少する雑音成分に制約されて総合的には1/2乗に比例してしか分解能は向上しない。   When an oversampling A / D converter is realized, a delta sigma (ΔΣ) type is often used as the A / D converter. This is because the use of a delta sigma system improves the resolution almost in proportion to the first power of the oversampling ratio. However, it is not always a good idea to use a delta sigma type A / D converter of the A / D converter provided in the present invention. First of all, the delta-sigma A / D converter must store the remaining residual digitized at the time of conversion in an internal integrator and convert it by adding it to the next input. Therefore, when using a delta-sigma A / D converter with analog inputs switched by a multiplexer, each analog input has an integrator that stores conversion residuals in the number of analog inputs, and is linked to the multiplexer. Control to switch the integrator. For this reason, the circuit area is increased because a plurality of integrators are provided. Assuming that the noise component included in the input signal is statistically independent, the averaging reduces only in inverse proportion to the 1/2 of the oversampling ratio, so that the resolution of the A / D converter is oversampling ratio. Even if it is proportional to the first power of the power, the resolution is improved only in proportion to the first power of the whole as a result of being restricted by the noise component that decreases in inverse proportion to the first power of two.

アナログ入力についての必要な分解能、例えばエンジン制御入力について10ビット分解能などでのA/D変換処理に対応して、MPUなどからA/D制御レジスタ60に対しA/D変換の実行のための変換制御情報の設定が行われる。本A/D変換器では、A/D制御レジスタ60の各エントリに設定される制御情報に基づき、オーバーサンプリングA/D変換処理あるいは通常のA/D変換処理を実行する。通常のA/D変換処理とは、オーバーサンプリング比が1でのA/D変換処理に相当する。変換制御情報は、変換対象アナログ入力チャネルの指定、そのオーバーサンプリング比やフィルタ係数の指定、変換開始要因の指定などである。   Conversion for executing A / D conversion from the MPU or the like to the A / D control register 60 in response to A / D conversion processing with a necessary resolution for analog input, for example, 10-bit resolution for engine control input. Control information is set. In this A / D converter, oversampling A / D conversion processing or normal A / D conversion processing is executed based on control information set in each entry of the A / D control register 60. Normal A / D conversion processing corresponds to A / D conversion processing with an oversampling ratio of 1. The conversion control information includes designation of a conversion target analog input channel, designation of its oversampling ratio and filter coefficient, designation of a conversion start factor, and the like.

続いて図2〜図5に、本発明の実施の形態におけるA/D変換器の有するA/D制御レジスタの構成例として、図1に示すA/D制御レジスタ60の詳細な構成が異なる各形態を示す。それぞれをA/D制御レジスタ60a,60b,60c,60dとする。なお、A/D制御レジスタ60における本発明の特徴に係る以外のその他の変換制御情報の設定については省略する。   Subsequently, FIGS. 2 to 5 show different examples of the configuration of the A / D control register 60 shown in FIG. 1 as a configuration example of the A / D control register included in the A / D converter according to the embodiment of the present invention. The form is shown. These are respectively referred to as A / D control registers 60a, 60b, 60c, and 60d. The setting of other conversion control information other than that relating to the feature of the present invention in the A / D control register 60 is omitted.

図2は、A/D制御レジスタ60aの構成を示す図である。A/D制御レジスタ60aは、変換制御情報の複数のエントリとして、アナログ入力ごとのエントリを持つ構成である。各エントリの設定によって、アナログ入力ごとの変換属性でのA/D変換処理が指定可能である。A/D制御レジスタ60aは、アナログ入力ごとの各エントリに、変換開始要因、オーバーサンプリング比、フィルタ係数の設定を示す各フィールド201,202,203を有する。   FIG. 2 is a diagram showing a configuration of the A / D control register 60a. The A / D control register 60a is configured to have an entry for each analog input as a plurality of entries of conversion control information. A / D conversion processing with a conversion attribute for each analog input can be specified by setting each entry. The A / D control register 60a has fields 201, 202, and 203 indicating the setting of the conversion start factor, oversampling ratio, and filter coefficient in each entry for each analog input.

変換開始要因フィールド201は、複数存在する変換開始要因の内のいずれを要因(トリガ)にして、対応するアナログ入力のA/D変換を開始するかを設定するためのフィールドである。変換開始要因は、本A/D変換器でのA/D変換処理(複数のA/D変換あるいは単一のA/D変換)を起動または開始させる要因のことである。この変換開始要因としては、タイマ、レジスタ書き込み、外部要求などがある。   The conversion start factor field 201 is a field for setting which of a plurality of conversion start factors is a factor (trigger) to start A / D conversion of the corresponding analog input. The conversion start factor is a factor that activates or starts A / D conversion processing (a plurality of A / D conversions or a single A / D conversion) in the A / D converter. This conversion start factor includes a timer, a register write, an external request, and the like.

タイマ要因は、マイクロコンピュータの備えるタイマのカウンタが所定の値になった時あるいは所定の周期で発生するトリガであり、タイマの備えるレジスタより設定できる。またレジスタ書き込み要因は、MPUがA/D変換器の変換開始要求を表す制御レジスタに書き込むことにより発生するトリガである。外部要求要因は、外部から外部端子を通じて変換開始信号が入力されることにより発生するトリガである。   The timer factor is a trigger that is generated when a counter of a timer provided in the microcomputer reaches a predetermined value or at a predetermined cycle, and can be set from a register provided in the timer. The register write factor is a trigger generated when the MPU writes to a control register indicating a conversion start request of the A / D converter. The external request factor is a trigger generated when a conversion start signal is input from the outside through an external terminal.

オーバーサンプリング比フィールド202は、対応するアナログ入力のA/D変換処理の際のオーバーサンプリング比を指定するフィールドであり、A/D変換処理実行時、ここで設定されたオーバーサンプリング比に相当する回数分のA/D変換が実行される。オーバーサンプリングを行わないA/D変換(通常A/D変換)の指示の場合には、このオーバーサンプリング比を1に設定すればよい。   The oversampling ratio field 202 is a field for designating an oversampling ratio at the time of A / D conversion processing of the corresponding analog input, and the number of times corresponding to the oversampling ratio set here when the A / D conversion processing is executed. Minute A / D conversion is performed. In the case of an instruction for A / D conversion (normal A / D conversion) without oversampling, this oversampling ratio may be set to 1.

また通常、オーバーサンプリング比を2のべき乗とする場合が多いので、オーバーサンプリング比を2kと表し、A/D制御レジスタ60におけるオーバーサンプリング比フィールド202にはkを設定する構成とすれば、A/D制御レジスタ60の構成として必要とするビット数を削減することができる。なお、このオーバーサンプリング比をkで設定する構成の場合、オーバーサンプリングを行わないA/D変換処理の指示の場合には、k=0と設定すればよい。 In general, since the oversampling ratio is often a power of 2, if the oversampling ratio is expressed as 2 k and k is set in the oversampling ratio field 202 in the A / D control register 60, A The number of bits required for the configuration of the / D control register 60 can be reduced. In the case of a configuration in which this oversampling ratio is set by k, k = 0 may be set in the case of an instruction for A / D conversion processing without oversampling.

フィルタ係数フィールド203は、オーバーサンプリングのためのデシメータフィルタの係数を設定するフィールドである。フィルタ演算回路10は、ここで設定されたフィルタ係数に基づき、A/D変換部30でのA/D変換後のデータについてフィルタ処理を行う。   The filter coefficient field 203 is a field for setting a decimator filter coefficient for oversampling. Based on the filter coefficient set here, the filter arithmetic circuit 10 performs a filtering process on the data after A / D conversion in the A / D conversion unit 30.

A/D制御レジスタ60aのエントリ形式においては、1つのエントリの設定によって1つのアナログ入力についてのA/D変換処理の属性を指定でき、各エントリに設定を行うことで、アナログ入力ごとに異なる属性でのA/D変換処理を指定できる。   In the entry format of the A / D control register 60a, an attribute of A / D conversion processing for one analog input can be specified by setting one entry, and different attributes are set for each analog input by setting each entry. A / D conversion processing can be specified.

図3は、A/D制御レジスタ60bの構成を示す図であり、A/D制御レジスタ60bが、変換制御情報の複数のエントリとして、A/D変換処理実行順ごとのエントリを有する構成例である。A/D制御レジスタ60bは、A/D変換処理実行順ごとの各エントリに、アナログ入力番号、オーバーサンプリング比、フィルタ係数の設定を示す各フィールド301,302,303を有する。A/D制御レジスタ60bにおける複数のエントリについて上から下に順に、各エントリのフィールドに設定された制御情報に従ったA/D変換処理が実行される。   FIG. 3 is a diagram illustrating a configuration of the A / D control register 60b. In the configuration example, the A / D control register 60b includes an entry for each A / D conversion processing execution order as a plurality of entries of conversion control information. is there. The A / D control register 60b has fields 301, 302, and 303 indicating the setting of the analog input number, oversampling ratio, and filter coefficient in each entry for each A / D conversion processing execution order. For a plurality of entries in the A / D control register 60b, A / D conversion processing according to the control information set in the field of each entry is executed in order from top to bottom.

アナログ入力番号フィールド301は、変換対象のアナログ入力チャネルを指定するフィールドである。アナログ入力番号フィールド301で指定されたアナログ入力チャネルについて、オーバーサンプリング比フィールド302で指定されたオーバーサンプリング比及びフィルタ係数フィールド303で指定されたフィルタ係数でオーバーサンプリング動作あるいは通常A/D変換動作が実行される。オーバーサンプリング比フィールド302、フィルタ係数フィールド303は、図2におけるオーバーサンプリング比フィールド202、フィルタ係数フィールド203と同様に、対応するアナログ入力チャネルについてのオーバーサンプリング比、フィルタ係数をそれぞれ指定するフィールドである。   The analog input number field 301 is a field for designating an analog input channel to be converted. For the analog input channel specified in the analog input number field 301, the oversampling operation or the normal A / D conversion operation is executed with the oversampling ratio specified in the oversampling ratio field 302 and the filter coefficient specified in the filter coefficient field 303. Is done. Similar to the oversampling ratio field 202 and the filter coefficient field 203 in FIG. 2, the oversampling ratio field 302 and the filter coefficient field 303 are fields for designating the oversampling ratio and the filter coefficient for the corresponding analog input channel, respectively.

A/D制御レジスタ60bのエントリ形式においては、1つのエントリの設定によって1つのアナログ入力についてのA/D変換処理の属性を指定でき、複数のエントリによりA/D変換処理実行順の設定を行うことで、アナログ入力ごとに異なる属性でのA/D変換処理を指定して順に実行させることができる。   In the entry format of the A / D control register 60b, the A / D conversion processing attribute for one analog input can be specified by setting one entry, and the execution order of the A / D conversion processing is set by a plurality of entries. Thus, it is possible to designate and execute A / D conversion processing with different attributes for each analog input in order.

また、図3のエントリ形式で、各エントリに、図2に示すような変換開始要因を設定するフィールドをさらに設け、このフィールドで指定された変換開始要因の信号入力をもとにそのエントリで指定するA/D変換処理を開始する構成としても良い。   Further, in the entry format of FIG. 3, each entry is further provided with a field for setting a conversion start factor as shown in FIG. 2, and the entry is designated based on the signal input of the conversion start factor designated in this field. The A / D conversion process may be started.

図4は、A/D制御レジスタ60cの構成を示す図であり、A/D制御レジスタ60cが、変換制御情報の複数のエントリとして、A/D変換処理実行順のエントリ、特にA/D変換単位動作ごとのエントリを有する構成例である。これは図3のエントリ形式におけるオーバーサンプリング比フィールド302に代わり、フィルタ演算回路10での積算を継続するか/リセットするかを設定するフィールドであるリセット/積算フィールド402を設けた構成である。A/D制御レジスタ60cは、各エントリに、アナログ入力番号、リセット/積算、フィルタ係数の設定を示す各フィールド401,402,403を有する。アナログ入力番号フィールド401は、図3のアナログ入力番号フィールド301と同様に変換対象のアナログ入力チャネルを指定するフィールドである。フィルタ係数フィールド403は、図3のフィルタ係数フィールド303と同様に、対応するアナログ入力チャネルについてのA/D変換処理のフィルタ係数を指定するフィールドである。   FIG. 4 is a diagram showing a configuration of the A / D control register 60c. The A / D control register 60c has, as a plurality of entries of conversion control information, entries in the order of execution of A / D conversion processing, particularly A / D conversion. It is a structural example which has an entry for every unit operation | movement. This is a configuration in which a reset / integration field 402, which is a field for setting whether to continue or reset integration in the filter arithmetic circuit 10, is provided instead of the oversampling ratio field 302 in the entry format of FIG. The A / D control register 60c has fields 401, 402, and 403 indicating the setting of an analog input number, reset / integration, and filter coefficient in each entry. The analog input number field 401 is a field for designating an analog input channel to be converted, like the analog input number field 301 of FIG. The filter coefficient field 403 is a field for designating the filter coefficient of the A / D conversion process for the corresponding analog input channel, similarly to the filter coefficient field 303 of FIG.

この構成の場合、あるパターンのA/D変換処理例えばある入力チャネルについての所定のオーバーサンプリング比及びフィルタ係数でのA/D変換処理が、A/D変換単位動作ごとの制御情報のエントリのセット(複数のエントリ)によって指定される。オーバーサンプリング処理の場合、個々のサンプリングについての制御情報のエントリでリセット/積算フィールド402に「積算」を設定することで、そのステップのサンプリングにおいて積算動作が行われることとなる。   In this configuration, A / D conversion processing of a certain pattern, for example, A / D conversion processing with a predetermined oversampling ratio and filter coefficient for a certain input channel, is a set of control information entries for each A / D conversion unit operation. Specified by (multiple entries). In the case of oversampling processing, by setting “integration” in the reset / integration field 402 in the control information entry for each sampling, the integration operation is performed in the sampling of that step.

A/D制御レジスタ60cのエントリ形式においては、1つのエントリの設定によって1つのアナログ入力についてのA/D変換単位動作の属性を指定でき、アナログ入力ごとに異なる属性でのA/D変換処理を指定して順に実行させることができる。   In the entry format of the A / D control register 60c, the attribute of A / D conversion unit operation for one analog input can be specified by setting one entry, and A / D conversion processing with different attributes for each analog input is performed. It can be specified and executed in order.

図3に示すA/D制御レジスタ60bの構成では、あるA/D変換処理のエントリで指定されたアナログ入力についての指定オーバーサンプリング比に相当する回数分のA/D変換が終了すると次のエントリで指定されるアナログ入力のA/D変換処理に移る処理形式であった。一方図4に示すA/D制御レジスタ60cの構成では、あるアナログ入力についての指定オーバーサンプリング比に相当する回数分のA/D変換の処理の実行中に、別のアナログ入力についてのA/D変換を実行することができる。A/D変換器は、あるアナログ入力について所定の時間間隔を置きながら指定オーバーサンプリング比でオーバーサンプリングを行い、その個々のサンプリングの間に、アナログ入力を切り替えながら、別のアナログ入力についてのA/D変換を挟んで実行する。A/D制御レジスタ60cにおけるエントリの状態としては、ある変換パターンでのA/D変換処理を指示する複数のエントリの間に、別の変換パターンでのA/D変換処理を指示するエントリが1つあるいは複数挟まれる形になる。このように変換属性の異なるA/D変換処理を同時並行的に実行することで全体の変換処理性能を向上させることができる。このような変換処理の具体例については後述する。   In the configuration of the A / D control register 60b shown in FIG. 3, when the A / D conversion for the number of times corresponding to the designated oversampling ratio for the analog input designated by an entry of an A / D conversion process is completed, the next entry is entered. The processing format shifts to A / D conversion processing of analog input specified by. On the other hand, in the configuration of the A / D control register 60c shown in FIG. 4, the A / D for another analog input is being executed during the A / D conversion processing corresponding to the designated oversampling ratio for one analog input. Conversion can be performed. The A / D converter performs oversampling at a specified oversampling ratio with a predetermined time interval for a certain analog input, and switches the analog input between the individual samplings while switching A / D for another analog input. Execute with D conversion in between. As the state of the entry in the A / D control register 60c, there is one entry instructing A / D conversion processing with another conversion pattern among a plurality of entries instructing A / D conversion processing with a certain conversion pattern. One or more will be sandwiched. Thus, the overall conversion processing performance can be improved by executing A / D conversion processing with different conversion attributes in parallel. A specific example of such conversion processing will be described later.

図5は、A/D制御レジスタ60dの構成を示す図であり、A/D制御レジスタ60dが、変換制御情報の複数のエントリとして、変換開始要因ごとのエントリを有する構成例である。A/D制御レジスタ60dのエントリにおいて、ADENTrは、前述したレジスタ書き込みを変換開始要因としたA/D変換処理についての制御情報のエントリであり、またADENTtは、前述したタイマ要因のA/D変換処理についての制御情報のエントリであり、またADENTeは、前述した外部要求要因のA/D変換処理についての制御情報のエントリである。A/D制御レジスタ60dにおける変換開始要因ごとの各エントリは、アナログ入力番号群、オーバーサンプリング比、フィルタ係数の設定を示す各フィールド501,502,503を有する。   FIG. 5 is a diagram illustrating a configuration of the A / D control register 60d. The A / D control register 60d is a configuration example having entries for each conversion start factor as a plurality of entries of the conversion control information. In the entry of the A / D control register 60d, ADENTr is an entry of control information regarding the A / D conversion process using the register write described above as a conversion start factor, and ADEntt is an A / D conversion of the timer factor described above. This is an entry for control information regarding processing, and ADENTe is an entry for control information regarding A / D conversion processing of the external request factor described above. Each entry for each conversion start factor in the A / D control register 60d has fields 501, 502, and 503 that indicate settings of an analog input number group, an oversampling ratio, and a filter coefficient.

アナログ入力番号群フィールド501は、複数のアナログ入力チャネルの各々に対応するビットAE0−AEnから成っており、対応する変換開始要因による変換対象のアナログ入力チャネルを指定するフィールドである。アナログ入力チャネルANxに対応するビットAExの設定値において、“1”で「変換対象とする(有効)」を指定し、“0”で「変換対象としない(無効)」を指定する。アナログ入力番号群フィールド501の内、ビットAExを“1”(有効)とすることで、当該アナログ入力ANxについてのA/D変換処理が、対応する変換開始要因により起動または開始される。アナログ入力番号群フィールド501の内、複数のビットについて“1”(有効)を設定すれば、対応する変換開始要因により複数のアナログ入力チャネルについて指定の変換属性でのA/D変換処理が起動または開始されることとなる。   The analog input number group field 501 is composed of bits AE0 to AEn corresponding to each of a plurality of analog input channels, and is a field for designating an analog input channel to be converted by a corresponding conversion start factor. In the set value of the bit AEx corresponding to the analog input channel ANx, “1” designates “to be converted (valid)” and “0” designates “not to be converted (invalid)”. When the bit AEx is set to “1” (valid) in the analog input number group field 501, the A / D conversion process for the analog input ANx is started or started by the corresponding conversion start factor. If “1” (valid) is set for a plurality of bits in the analog input number group field 501, A / D conversion processing with a specified conversion attribute for a plurality of analog input channels is started or activated by a corresponding conversion start factor. Will be started.

オーバーサンプリング比フィールド502、フィルタ係数フィールド503は、対応する変換開始要因でのA/D変換処理における属性として、それぞれオーバーサンプリング比、フィルタ係数を指定するフィールドである。   The oversampling ratio field 502 and the filter coefficient field 503 are fields for designating an oversampling ratio and a filter coefficient, respectively, as attributes in the A / D conversion process with the corresponding conversion start factor.

なお図5ではA/D制御レジスタ60の構成として変換開始要因ごとに1つのエントリを持つ形式を示したが、変換開始要因ごとに複数のエントリを持つ形式も可能である。例えば、A/D変換開始の指示のためのレジスタを複数設けた構成ならば、複数のレジスタ書き込み要因のA/D変換制御情報のエントリADENTr即ちADENTr0−ADENTrlを有する形式とすることができる。同様に、複数のタイマを設けた構成ならば複数のタイマ要因のエントリADENTt0−ADENTtlを有する形式とすることができる。また、複数の外部要求入力を設けた構成ならば複数の外部要求要因のエントリADENTe0〜ADENTelを有する形式とすることができる。   In FIG. 5, the A / D control register 60 has a configuration having one entry for each conversion start factor, but a format having a plurality of entries for each conversion start factor is also possible. For example, if a plurality of registers for instructing the start of A / D conversion are provided, the A / D conversion control information entries ADENTr, that is, ADENTr0 to ADENTr1 of a plurality of register write factors can be used. Similarly, a configuration having a plurality of timers can be configured to have a plurality of timer factor entries ADDt0 to ADDtl. Further, if a plurality of external request inputs are provided, a format having a plurality of external request factor entries ADENTe0 to ADENTel can be adopted.

A/D制御レジスタ60dのエントリ形式においては、1つの変換開始要因に対応するエントリの設定によって複数のアナログ入力について所定のA/D変換処理の属性を指定でき、起動開始要因ごとに異なる属性でのA/D変換処理を指定して実行させることができる。   In the entry format of the A / D control register 60d, predetermined A / D conversion processing attributes can be specified for a plurality of analog inputs by setting an entry corresponding to one conversion start factor. The A / D conversion process can be designated and executed.

以上述べた本実施の形態によるA/D変換器のA/D制御レジスタ60の各構成60a,60b,60c,60d(図2〜図5)により、A/D変換器におけるA/D変換処理においてアナログ入力ごとにオーバーサンプリング比を設定でき、アナログ入力ごとに必要な分解能でのA/D変換処理を実現することができる。アナログ入力ごとあるいはA/D変換処理実行順ごとあるいは変換開始要因ごとに異なる変換属性の設定により、所望の変換処理パターンで効率良くA/D変換処理を行うことができる。   The A / D conversion processing in the A / D converter by the respective configurations 60a, 60b, 60c, 60d (FIGS. 2 to 5) of the A / D control register 60 of the A / D converter according to the present embodiment described above. Therefore, an oversampling ratio can be set for each analog input, and A / D conversion processing with a resolution required for each analog input can be realized. By setting different conversion attributes for each analog input, for each A / D conversion processing execution order, or for each conversion start factor, A / D conversion processing can be performed efficiently with a desired conversion processing pattern.

図6は、本発明の実施の形態におけるA/D変換器によるA/D変換処理動作例について示した図である。時系列上でのA/D変換動作パターンについて表している。図中の三角形はA/D変換単位動作を表す。   FIG. 6 is a diagram showing an example of A / D conversion processing operation by the A / D converter in the embodiment of the present invention. A time-series A / D conversion operation pattern is shown. The triangle in the figure represents the A / D conversion unit operation.

図6左側のグループ1のA/D変換処理は、単一のアナログ入力チャネルについて連続してA/D変換を繰り返すオーバーサンプリング動作を示している。例として、アナログ入力AN0についてのオーバーサンプリング動作を示している。このようにあるアナログ入力について短周期で連続してA/D変換(サンプリング)することによりA/D変換器の分解能を高めることができる。   The A / D conversion process of group 1 on the left side of FIG. 6 shows an oversampling operation in which A / D conversion is continuously repeated for a single analog input channel. As an example, an oversampling operation for the analog input AN0 is shown. Thus, by performing A / D conversion (sampling) on a certain analog input continuously in a short cycle, the resolution of the A / D converter can be increased.

また図6右側のグループ2のA/D変換処理は、あるアナログ入力(第1のアナログ入力とする)について一定時間間隔を置きながら所定周期(オーバーサンプリング比)でオーバーサンプリングし、この第1のアナログ入力についてのオーバーサンプリングと同時平行的に、別の1つ以上のアナログ入力(第2のアナログ入力とする)についてA/D変換を行う動作を示している。第1のアナログ入力についての個々のサンプリング(A/D変換)の間に、別の第2のアナログ入力についてのA/D変換の動作が挟まれる形である。   The A / D conversion processing of group 2 on the right side of FIG. 6 performs oversampling at a predetermined period (oversampling ratio) with a certain time interval for a certain analog input (first analog input). An operation of performing A / D conversion on another one or more analog inputs (referred to as a second analog input) in parallel with the oversampling for the analog input is shown. The operation of A / D conversion for another second analog input is sandwiched between individual samplings (A / D conversion) for the first analog input.

図6のグループ2の処理では、例として、アナログ入力AN0について一定時間間隔を置きながら所定周期でオーバーサンプリングし、これと同時平行的に、入力を切り替えながらアナログ入力AN1〜AN10について通常のA/D変換(オーバーサンプリング比=1)を行う動作パターンを示している。上記アナログ入力AN0の変換周期がアナログ入力AN1〜AN10の変換周期より短い。時系列上でアナログ入力AN0についての個々のサンプリング(A/D変換)の間に、別のアナログ入力(AN1〜AN10)についてのA/D変換の動作が順に挟まれ、入力を切り替えながら休み無くA/D変換が繰り返される実行される形である。   In the processing of group 2 in FIG. 6, as an example, oversampling is performed on the analog input AN0 at a predetermined period with a predetermined time interval, and at the same time, the analog inputs AN1 to AN10 are switched to normal A / A while switching the inputs. An operation pattern for performing D conversion (oversampling ratio = 1) is shown. The conversion cycle of the analog input AN0 is shorter than the conversion cycle of the analog inputs AN1 to AN10. Between each sampling (A / D conversion) for the analog input AN0 on the time series, A / D conversion operations for other analog inputs (AN1 to AN10) are sequentially sandwiched, and there is no break while switching inputs. In this form, A / D conversion is repeated.

上記グループ2のA/D変換動作パターン例は、第1のアナログ入力AN0のA/D変換周期が、第2のアナログ入力AN1〜AN10のA/D変換周期より短い場合であるが、第1のアナログ入力のA/D変換周期と、第2のアナログ入力のA/D変換周期とが同じで、両方のA/D変換を交互に実行する変換動作パターンや、第1のアナログ入力と第2のアナログ入力とで異なるオーバーサンプリング比で両方のサンプリングを交互に実行する変換動作パターン、複数のアナログ入力についてそれぞれ異なるA/D変換周期でのA/D変換群を入力を切り替えながら順に実行する変換動作パターンなど、様々な変換動作パターンが可能である。   The example of the A / D conversion operation pattern of the group 2 is a case where the A / D conversion cycle of the first analog input AN0 is shorter than the A / D conversion cycle of the second analog inputs AN1 to AN10. The analog input A / D conversion cycle is the same as the second analog input A / D conversion cycle, and the conversion operation pattern in which both A / D conversions are executed alternately, the first analog input and the first analog input A conversion operation pattern in which both samplings are alternately executed at different oversampling ratios with the two analog inputs, and A / D conversion groups with different A / D conversion periods for a plurality of analog inputs are sequentially executed while switching the inputs. Various conversion operation patterns such as conversion operation patterns are possible.

図6のグループ1に示す変換動作パターン(単一のアナログ入力についてのオーバーサンプリングA/D変換処理)は、図2〜図5に示す全てのA/D制御レジスタ60の構成で実現可能である。図2のA/D制御レジスタ60aの構成(アナログ入力ごとのエントリ形式)でグループ1に示す変換処理を行う場合は、アナログ入力AN0のエントリに、所定の変換開始要因(例えばタイマ要因を選択してタイマレジスタに変換周期を設定する)、オーバーサンプリング比、及びフィルタ係数を設定すれば実現可能である。   The conversion operation pattern (oversampling A / D conversion process for a single analog input) shown in group 1 of FIG. 6 can be realized by the configuration of all the A / D control registers 60 shown in FIGS. . When the conversion processing shown in group 1 is performed with the configuration of the A / D control register 60a in FIG. 2 (entry format for each analog input), a predetermined conversion start factor (for example, a timer factor is selected) for the entry of the analog input AN0. This can be realized by setting a conversion cycle in the timer register), an oversampling ratio, and a filter coefficient.

また図3のA/D制御レジスタ60bの構成(A/D変換処理実行順のエントリ形式)でグループ1に示す変換処理を行う場合は、最初のエントリに、アナログ入力番号にAN0を指定し、所定のオーバーサンプリング比、及びフィルタ係数を設定すれば実現可能である。   When the conversion process shown in group 1 is performed with the configuration of the A / D control register 60b in FIG. 3 (entry format in the order of execution of the A / D conversion process), AN0 is designated as the analog input number in the first entry, This can be realized by setting a predetermined oversampling ratio and filter coefficient.

また図4のA/D制御レジスタ60cの構成(A/D変換処理実行順、特にA/D変換単位動作ごとのエントリ形式)でグループ1に示す変換処理を行う場合は、最初から指定オーバーサンプリング比に相当する数だけの複数の実行順のエントリにおいて、アナログ入力番号にAN0を指定し、リセット/積算フィールド402には「積算」を指定し、所定のフィルタ係数を設定すれば実現可能である。   When the conversion processing shown in group 1 is performed with the configuration of the A / D control register 60c in FIG. 4 (A / D conversion processing execution order, particularly entry format for each A / D conversion unit operation), designated oversampling is performed from the beginning. In a plurality of execution order entries corresponding to the ratio, AN0 is designated as the analog input number, “integration” is designated in the reset / integration field 402, and a predetermined filter coefficient is set. .

また図5のA/D制御レジスタ60dの構成(変換開始要因ごとのエントリ形式)でグループ1に示す変換処理を行う場合は、所定の変換開始要因についてのエントリ(例えばタイマ要因のエントリADENTtを選択してタイマレジスタに変換周期を設定する)に、アナログ入力番号群フィールド501においてアナログ入力AN0に対応するビットAE0を“1”にし、かつ他のビットを“0”にし、所定のオーバーサンプリング比及びフィルタ係数を設定すれば実現可能である。   When the conversion process shown in group 1 is performed with the configuration of the A / D control register 60d in FIG. 5 (entry format for each conversion start factor), an entry for a predetermined conversion start factor (for example, timer factor entry ADENTt is selected). In the analog input number group field 501, the bit AE0 corresponding to the analog input AN0 is set to “1” and the other bits are set to “0” to set a predetermined oversampling ratio and This can be realized by setting a filter coefficient.

図6のグループ2に示す変換動作パターン(複数のアナログ入力についての指定属性での同時並行的なA/D変換処理)は、図2〜図5に示すA/D制御レジスタ60の構成の内、図3の構成を除く全てにおいて実現可能である。図2のA/D制御レジスタ60aの構成(アナログ入力ごとのエントリ形式)でグループ2に示す変換処理を行う場合は、アナログ入力AN0についてのエントリに、所定の変換開始要因(例えばタイマ要因を選択してタイマレジスタに変換周期を設定する)、所定のオーバーサンプリング比及びフィルタ係数を設定し、アナログ入力AN1〜AN10についての各エントリに、所定の変換開始要因(例えばタイマ要因を選択してタイマレジスタに変換周期を設定する)、所定のオーバーサンプリング比=1(通常A/D変換)、所定のフィルタ係数(任意)を設定すれば実現可能である。   The conversion operation pattern shown in group 2 of FIG. 6 (simultaneous parallel A / D conversion processing with designated attributes for a plurality of analog inputs) is included in the configuration of the A / D control register 60 shown in FIGS. This can be realized in all except the configuration of FIG. When the conversion processing shown in group 2 is performed with the configuration of the A / D control register 60a in FIG. 2 (entry format for each analog input), a predetermined conversion start factor (for example, a timer factor is selected) as an entry for the analog input AN0. Set a conversion cycle in the timer register), set a predetermined oversampling ratio and filter coefficient, and select a predetermined conversion start factor (for example, a timer factor to select the timer register in each entry for the analog inputs AN1 to AN10. This can be realized by setting a predetermined oversampling ratio = 1 (normal A / D conversion) and a predetermined filter coefficient (arbitrary).

また図4のA/D制御レジスタ60cの構成(A/D変換処理実行順、特にA/D変換単位動作ごとのエントリ形式)でグループ2に示す変換処理を行う場合は、最初のステップのエントリでは、アナログ入力番号にAN0を指定し、リセット/積算フィールド402に「積算」を指定し、所定のフィルタ係数を設定し、次のステップのエントリでは、アナログ入力番号にAN1を指定し、リセット/積算フィールド402に「リセット」を指定し、所定のフィルタ係数を設定し、次のステップのエントリでは、アナログ入力番号にAN2を指定し、リセット/積算フィールド402に「リセット」を指定し、所定のフィルタ係数を設定し、次のステップのエントリでは、アナログ入力番号にAN0を指定し、リセット/積算フィールド402に「積算」を指定し、所定のフィルタ係数を設定し、次のステップのエントリでは、アナログ入力番号にAN3を指定し、リセット/積算フィールド402に「リセット」を指定し、所定のフィルタ係数を設定する、(以下略)、というように設定すれば実現できる。   In addition, when the conversion process shown in group 2 is performed with the configuration of the A / D control register 60c of FIG. 4 (A / D conversion process execution order, especially the entry format for each A / D conversion unit operation), the entry of the first step Then, AN0 is designated as the analog input number, “integration” is designated in the reset / integration field 402, a predetermined filter coefficient is set, and in the next step entry, AN1 is designated as the analog input number, and reset / “Reset” is specified in the integration field 402, a predetermined filter coefficient is set, and in the entry of the next step, AN2 is specified as the analog input number, “Reset” is specified in the reset / integration field 402, The filter coefficient is set. In the next step entry, AN0 is designated as the analog input number, and the reset / integration field 40 is set. In the next step entry, AN3 is specified as the analog input number, “Reset” is specified in the reset / integration field 402, and the predetermined filter coefficient is set. This can be realized by setting (hereinafter abbreviated).

また図5のA/D制御レジスタ60dの構成(変換開始要因ごとのエントリ形式)でグループ2に示す変換処理を行う場合は、所定の変換開始要因のエントリ(例えばタイマ要因のエントリADENTt0を選択して複数のタイマのうち対応するタイマt0のレジスタに変換周期を設定する)で、アナログ入力AN0に対応するビットAE0を“1”かつ他のビットを“0”にし、所定のオーバーサンプリング比及びフィルタ係数を設定し、他の所定の変換開始要因のエントリ(例えばタイマ要因のエントリADENTt1を選択して対応するタイマt1のレジスタに変換周期を設定する)で、アナログ入力AN1〜AN10に対応する各ビットAE1〜AE10を“1”かつアナログ入力AN0に対応するビットAE0を“0”にし、所定のオーバーサンプリング比=1(通常A/D変換)、所定のフィルタ係数(任意)を設定すれば実現できる。   When the conversion process shown in group 2 is performed with the configuration of the A / D control register 60d in FIG. 5 (entry format for each conversion start factor), a predetermined conversion start factor entry (for example, timer factor entry ADENTt0 is selected). The conversion cycle is set in the register of the corresponding timer t0 among a plurality of timers), the bit AE0 corresponding to the analog input AN0 is set to “1” and the other bits are set to “0”, and a predetermined oversampling ratio and filter are set. Each coefficient corresponding to the analog inputs AN1 to AN10 is set with a coefficient and another predetermined conversion start factor entry (for example, the timer factor entry ADENTt1 is selected and the conversion cycle is set in the corresponding timer t1 register). AE1 to AE10 are set to “1” and the bit AE0 corresponding to the analog input AN0 is set to “0”. Oversampling ratio = 1 (normal A / D conversion) can be realized by setting the predetermined filter coefficients (optional).

以上具体的に述べたように、本実施の形態のA/D変換器によれば、図6グループ1に示す変換処理のようにバースト的にオーバーサンプリングを行う処理はもとより、グループ2に示す変換処理のようにあるアナログ入力について一定時間間隔を置きながら所定変換周期でオーバーサンプリングを行い、この個々のサンプリングの間に別のアナログ入力についてのA/D変換を挟み込んで同時並行的にA/D変換処理を行うことも可能である。   As specifically described above, according to the A / D converter of the present embodiment, the conversion shown in group 2 as well as the process of performing oversampling in a burst like the conversion process shown in group 1 of FIG. As in the process, oversampling is performed at a predetermined conversion period with a certain time interval for a certain analog input, and A / D conversion for another analog input is sandwiched between the individual samplings to simultaneously perform A / D. It is also possible to perform conversion processing.

また、制御の目的に応じて、適宜、上記グループ1の変換処理のように単一アナログ入力チャネルについてバースト的にオーバーサンプリングを行うことにより、A/D変換の分解能を向上することができる。また、オーバーサンプリング比を適切に選ぶことで入力ごとに必要とするA/D変換分解能でのA/D変換処理を実現することができる。さらに特に上記グループ2の変換処理のように制御フレーム全体に渡って一定時間間隔を置きながらオーバーサンプリングを行うことにより、オーバーサンプリングの特徴を生かしてナイキスト周波数を上げることができるので、A/D変換器に前置するプレフィルタの特性に対する要求を緩和することができ、より簡単なフィルタで済ませることができる。   Also, according to the purpose of control, the resolution of A / D conversion can be improved by performing burst oversampling on a single analog input channel as appropriate as in the group 1 conversion process. In addition, A / D conversion processing with A / D conversion resolution required for each input can be realized by appropriately selecting an oversampling ratio. In particular, by performing oversampling while maintaining a certain time interval over the entire control frame as in the conversion processing of group 2 above, the Nyquist frequency can be increased by taking advantage of the oversampling characteristics. The requirement for the characteristics of the prefilter placed in front of the vessel can be relaxed, and a simpler filter can be used.

なお、デシメーション後のナイキスト周波数はデシメーション後のサンプリング周波数の1/2となるので、デシメーションの段階で後者のナイキスト周波数を超える信号成分を除去するフィルタリング処理を行う必要がある。そのフィルタリング処理のためのフィルタ演算回路10の構成例について図7〜図9に示す。   Since the Nyquist frequency after decimation is ½ of the sampling frequency after decimation, it is necessary to perform a filtering process for removing signal components exceeding the latter Nyquist frequency at the decimation stage. A configuration example of the filter arithmetic circuit 10 for the filtering processing is shown in FIGS.

図7は、フィルタ演算回路10の構成例としてフィルタ演算回路10aを有するA/D変換器の構成を示す図である。フィルタ演算回路10aは、シフタ11、シフタ12、加算器13、減算器14から構成され、その動作は次の漸化式(1)で表される。まず、前回値Yi-1を変換結果レジスタ20から読み出し、係数2-mを掛け、それにA/D変換部30からの入力値に係数(1−2-m)を掛けたものを加え、この演算結果Yiが変換結果レジスタ20に書き込まれる。 FIG. 7 is a diagram showing a configuration of an A / D converter having a filter calculation circuit 10a as a configuration example of the filter calculation circuit 10. The filter operation circuit 10a includes a shifter 11, a shifter 12, an adder 13, and a subtracter 14, and the operation is represented by the following recurrence formula (1). First, the previous value Y i-1 is read from the conversion result register 20, multiplied by a coefficient 2- m, and the input value from the A / D converter 30 multiplied by a coefficient (1-2- m ) is added. This calculation result Y i is written into the conversion result register 20.

i=2-m・Yi-1+(1−2-m)・x ・・・(1)
ただし、x:入力値
i:i番目の演算結果
m:シフタのシフト量(ビット)
この構成によれば、フィルタ係数の自由度は低くなるが、シフタ11、12と減算器14の組み合わせによる簡単な回路構成でフィルタ係数実現を可能とし、回路規模が大きくなる要因であった乗算器を不要とすることができる。
Y i = 2 −m · Y i−1 + (1-2 −m ) · x (1)
Where x: input value
Y i : i-th operation result
m: Shifter shift amount (bit)
According to this configuration, although the degree of freedom of the filter coefficient is low, the multiplier that can realize the filter coefficient with a simple circuit configuration by the combination of the shifters 11 and 12 and the subtractor 14 is a factor that increases the circuit scale. Can be made unnecessary.

また図8は、フィルタ演算回路10の構成例として、次の漸化式(2)で表される動作をするフィルタ演算回路10bを有するA/D変換器の構成を示す図である。これは図7と係数が逆の構成である。   FIG. 8 is a diagram showing a configuration of an A / D converter having a filter calculation circuit 10b that operates as represented by the following recurrence formula (2) as a configuration example of the filter calculation circuit 10. This is a configuration in which the coefficients are opposite to those in FIG.

i=(1−2-m)・Yi-1+2-m・x ・・・(2)
さらに図9は、フィルタ演算回路10の実施例として、次の漸化式(3)で表される動作すなわち移動平均フィルタまたは櫛型フィルタの動作をするフィルタ演算回路10c、を有するA/D変換器の構成を示す図である。これは前記漸化式(1),(2)での特殊形に相当する回路である(2-m、mはオーバーサンプリング比)。この構成の場合、特にA/D制御レジスタ60でフィルタ係数を指定する必要はない。
Y i = (1-2 −m ) · Y i−1 +2 −m · x (2)
Further, FIG. 9 shows an A / D conversion having an operation represented by the following recurrence formula (3), that is, a filter arithmetic circuit 10c that operates as a moving average filter or a comb filter, as an embodiment of the filter arithmetic circuit 10. It is a figure which shows the structure of a container. This is a circuit corresponding to a special form in the recurrence formulas (1) and (2) (2 −m , m is an oversampling ratio). In the case of this configuration, it is not necessary to specify the filter coefficient in the A / D control register 60 in particular.

i=Yi-1+x ・・・(3)
次に、図10は、本発明の実施の形態におけるA/D変換器を有するマイクロコンピュータとして、マイクロコンピュータ100aの構成を示す図である。マイクロコンピュータ100aは、前述した実施の形態のA/D変換器と、MPU101と、RAM102と、バス103とを備える。A/D変換器の変換結果レジスタ20、A/D制御レジスタ60は、バス103を介してMPU101及びRAM102に接続されている。MPU101は、バス103を介してA/D制御レジスタ60の設定を行ってA/D変換器を制御し、変換結果レジスタ20のデータを読み込むことによりA/D変換結果を得ることができる。
Y i = Y i-1 + x (3)
Next, FIG. 10 is a diagram showing a configuration of a microcomputer 100a as a microcomputer having an A / D converter in the embodiment of the present invention. The microcomputer 100 a includes the A / D converter according to the above-described embodiment, the MPU 101, the RAM 102, and the bus 103. The conversion result register 20 and the A / D control register 60 of the A / D converter are connected to the MPU 101 and the RAM 102 via the bus 103. The MPU 101 can set the A / D control register 60 via the bus 103 to control the A / D converter and read the data in the conversion result register 20 to obtain the A / D conversion result.

本マイクロコンピュータ100aでは、MPU101がA/D制御レジスタ60への変換制御情報の設定に基づきA/D変換器を独立的に動作させて所定のA/D変換処理を行わせ、A/D変換結果データを得て所定の処理を行うことができる。   In this microcomputer 100a, the MPU 101 causes the A / D converter to operate independently based on the setting of the conversion control information in the A / D control register 60 to perform a predetermined A / D conversion process. Result data can be obtained and predetermined processing can be performed.

また、図11は、本発明の実施の形態におけるマイクロコンピュータとして、前述した実施の形態のA/D変換器に加え、DMAC(ダイレクトメモリアクセスコントローラ)70を備えるマイクロコンピュータ100bの構成を示す図である。マイクロコンピュータ100bは、前述したA/D変換器と、MPU101と、RAM102と、バス103と、DMAC70とを有し、変換結果レジスタ20をRAM102上に論理的に設けた構成である。   FIG. 11 is a diagram showing a configuration of a microcomputer 100b including a DMAC (direct memory access controller) 70 in addition to the A / D converter of the above-described embodiment as a microcomputer in the embodiment of the present invention. is there. The microcomputer 100 b has the above-described A / D converter, MPU 101, RAM 102, bus 103, and DMAC 70, and the conversion result register 20 is logically provided on the RAM 102.

マイクロコンピュータ100bでは、DMAC70により、A/D変換結果データをフィルタ演算回路10とRAM102との間で転送処理する。本構成によれば、MPU101から高速でアクセスできるRAM102上にA/D変換結果データが転送されるので、A/D変換結果データへのアクセス時間を短縮でき、システム全体の処理性能を向上させることができる。   In the microcomputer 100b, the A / D conversion result data is transferred between the filter arithmetic circuit 10 and the RAM 102 by the DMAC 70. According to this configuration, since the A / D conversion result data is transferred onto the RAM 102 that can be accessed at high speed from the MPU 101, the access time to the A / D conversion result data can be shortened, and the processing performance of the entire system can be improved. Can do.

以上述べた構成により、本発明の実施の形態のA/D変換器及びA/D変換器を有するマイクロコンピュータでは、アナログ入力ごとにオーバーサンプリング比を設定してアナログ入力ごとに必要なA/D変換分解能でのA/D変換処理を行うことができる。例えば単一入力に対するオーバーサンプリングや、複数のアナログ入力についての異なる変換属性でのA/D変換処理などの多様なパターンのA/D変換処理を実現することができる。   With the configuration described above, in the microcomputer having the A / D converter and the A / D converter according to the embodiment of the present invention, the oversampling ratio is set for each analog input and the A / D required for each analog input is set. A / D conversion processing at conversion resolution can be performed. For example, various patterns of A / D conversion processing such as oversampling for a single input and A / D conversion processing with different conversion attributes for a plurality of analog inputs can be realized.

本発明のA/D変換器及びマイクロコンピュータは、例えば自動車制御などの各種制御用途などに利用可能である。   The A / D converter and microcomputer of the present invention can be used for various control applications such as automobile control.

本発明の実施の形態におけるA/D変換器の基本的構成を示す図である。It is a figure which shows the basic composition of the A / D converter in embodiment of this invention. アナログ入力ごとのエントリを有するA/D制御レジスタの構成を示す図である。It is a figure which shows the structure of the A / D control register which has an entry for every analog input. A/D変換処理実行順のエントリを有するA/D制御レジスタの構成を示す図である。It is a figure which shows the structure of the A / D control register which has an entry of A / D conversion process execution order. A/D変換処理実行順、特にA/D変換単位動作ごとのエントリを有するA/D制御レジスタの構成を示す図である。It is a figure which shows the structure of the A / D control register which has an entry for every A / D conversion process execution order, especially A / D conversion unit operation | movement. 変換開始要因ごとのエントリを有するA/D制御レジスタの構成を示す図である。It is a figure which shows the structure of the A / D control register which has an entry for every conversion start factor. 本発明の実施の形態におけるA/D変換器によるA/D変換処理動作例について示した図である。It is the figure shown about the example of A / D conversion processing operation by the A / D converter in embodiment of this invention. フィルタ演算回路の一構成例を有するA/D変換器の構成を示す図である。It is a figure which shows the structure of the A / D converter which has one structural example of a filter arithmetic circuit. フィルタ演算回路の他の構成例を有するA/D変換器の構成を示す図である。It is a figure which shows the structure of the A / D converter which has another structural example of a filter arithmetic circuit. フィルタ演算回路のさらに他の構成例を有するA/D変換器の構成を示す図である。It is a figure which shows the structure of the A / D converter which has another structural example of a filter arithmetic circuit. 本発明の実施の形態におけるマイクロコンピュータの構成を示す図である。It is a figure which shows the structure of the microcomputer in embodiment of this invention. 本発明の実施の形態における他のマイクロコンピュータの構成を示す図である。It is a figure which shows the structure of the other microcomputer in embodiment of this invention.

符号の説明Explanation of symbols

10,10a,10b,10c…フィルタ演算回路、11,12…シフタ、13…加算器、14…減算器、20…変換結果レジスタ、30…A/D変換部、40…マルチプレクサ、50…制御論理、60,60a,60b,60c,60d…A/D制御レジスタ、70…DMAC、100a,100b…マイクロコンピュータ、101…MPU、102…RAM、103…バス、201…変換開始要因フィールド、202,302,502…オーバーサンプリング比フィールド、203,303,403,503…フィルタ係数フィールド、301,401…アナログ入力番号フィールド、402…リセット/積算フィールド、501…アナログ入力番号群フィールド。   DESCRIPTION OF SYMBOLS 10, 10a, 10b, 10c ... Filter operation circuit, 11, 12 ... Shifter, 13 ... Adder, 14 ... Subtractor, 20 ... Conversion result register, 30 ... A / D conversion part, 40 ... Multiplexer, 50 ... Control logic , 60, 60a, 60b, 60c, 60d ... A / D control register, 70 ... DMAC, 100a, 100b ... microcomputer, 101 ... MPU, 102 ... RAM, 103 ... bus, 201 ... conversion start factor field, 202, 302 502, oversampling ratio field, 203, 303, 403, 503 ... filter coefficient field, 301, 401 ... analog input number field, 402 ... reset / integration field, 501 ... analog input number group field.

Claims (10)

複数のアナログ入力と、前記複数のアナログ入力からいずれか1つを選択するマルチプレクサと、前記選択されたアナログ入力をアナログ/デジタル変換するアナログ/デジタル変換部及び前記アナログ/デジタル変換部におけるアナログ/デジタル変換後のデータをフィルタ処理するフィルタ演算回路と、変換制御情報を格納する制御レジスタと、変換結果データを格納する変換結果レジスタとを有し、
前記制御レジスタは、前記変換制御情報のための複数のエントリを有し、前記エントリごとにオーバーサンプリング比を設定するフィールドを有し、
前記エントリの設定に基づき、前記アナログ/デジタル変換部及びフィルタ演算回路に、前記アナログ入力ごとのオーバーサンプリング比でのアナログ/デジタル変換処理を実行させることを特徴とするアナログ/デジタル変換器。
A plurality of analog inputs, a multiplexer that selects any one of the plurality of analog inputs, an analog / digital conversion unit that performs analog / digital conversion on the selected analog input, and analog / digital in the analog / digital conversion unit A filter operation circuit that filters the converted data, a control register that stores conversion control information, and a conversion result register that stores conversion result data;
The control register has a plurality of entries for the conversion control information, and has a field for setting an oversampling ratio for each of the entries,
An analog / digital converter that causes the analog / digital converter and the filter operation circuit to execute an analog / digital conversion process at an oversampling ratio for each analog input based on the setting of the entry.
請求項1記載のアナログ/デジタル変換器において、
前記制御レジスタの複数のエントリは、アナログ入力ごとのエントリとして構成されることを特徴とするアナログ/デジタル変換器。
The analog / digital converter according to claim 1.
The analog / digital converter characterized in that the plurality of entries of the control register are configured as entries for each analog input.
請求項1記載のアナログ/デジタル変換器において、
前記制御レジスタの複数のエントリは、アナログ/デジタル変換処理の実行順序ごとのエントリとして構成されることを特徴とするアナログ/デジタル変換器。
The analog / digital converter according to claim 1.
The plurality of entries in the control register are configured as entries for each execution order of analog / digital conversion processing.
請求項1記載のアナログ/デジタル変換器において、
前記制御レジスタの複数のエントリは、アナログ/デジタル変換開始要因ごとのエントリとして構成されることを特徴とするアナログ/デジタル変換器。
The analog / digital converter according to claim 1.
The plurality of entries in the control register are configured as entries for each analog / digital conversion start factor.
請求項1記載のアナログ/デジタル変換器において、
前記制御レジスタは、前記エントリごとに、前記フィルタ演算回路のフィルタ係数を設定するフィールドを有し、
前記フィルタ係数の設定に基づき、前記フィルタ演算回路にフィルタ処理を実行させることを特徴とするアナログ/デジタル変換器。
The analog / digital converter according to claim 1.
The control register has a field for setting a filter coefficient of the filter arithmetic circuit for each entry,
An analog / digital converter that causes the filter arithmetic circuit to perform a filter process based on the setting of the filter coefficient.
請求項5記載のアナログ/デジタル変換器において、
前記フィルタ演算回路は、前記フィルタ係数が、
-mまたは(1−2-m) (m:整数)
となる構成を有することを特徴とするアナログ/デジタル変換器。
The analog / digital converter according to claim 5.
In the filter arithmetic circuit, the filter coefficient is
2- m or (1-2- m ) (m: integer)
An analog / digital converter characterized by having the following structure.
請求項1記載のアナログ/デジタル変換器において、
前記複数のアナログ入力のうち、第1のアナログ入力について指定オーバーサンプリング比でオーバーサンプリングを行い、これと同時並行的に、アナログ入力を選択しながら前記第1のアナログ入力のオーバーサンプリングにおける個々のサンプリングの間に第2のアナログ入力についてのアナログ/デジタル変換を行うことを特徴とするアナログ/デジタル変換器。
The analog / digital converter according to claim 1.
Oversampling is performed at a specified oversampling ratio for the first analog input among the plurality of analog inputs, and at the same time, individual sampling in oversampling of the first analog input while selecting the analog input An analog / digital converter that performs analog / digital conversion on the second analog input during
請求項1記載のアナログ/デジタル変換器において、
前記複数のアナログ入力のうち、第1のアナログ入力について指定オーバーサンプリング比でオーバーサンプリングを行い、これと同時並行的に、アナログ入力を選択しながら前記第1のアナログ入力のオーバーサンプリング比と異なるオーバーサンプリング比で第2のアナログ入力についてオーバーサンプリングを行うことを特徴とするアナログ/デジタル変換器。
The analog / digital converter according to claim 1.
Of the plurality of analog inputs, the first analog input is oversampled at a specified oversampling ratio, and at the same time, the oversampling ratio different from the oversampling ratio of the first analog input is selected while selecting the analog input. An analog / digital converter characterized by oversampling the second analog input at a sampling ratio.
請求項1−7のいずれか一項に記載のアナログ/デジタル変換器と、
マイクロプロセッシングユニットと、バスとを有し、
前記制御レジスタと前記変換結果レジスタとが前記バスを介して前記マイクロプロセッシングユニットから書き込み及び読み出しされることを特徴とするマイクロコンピュータ。
An analog / digital converter according to any one of claims 1-7;
A microprocessing unit and a bus;
The microcomputer, wherein the control register and the conversion result register are written and read from the microprocessor unit via the bus.
請求項9記載のマイクロコンピュータにおいて、
ランダムアクセスメモリと、ダイレクトメモリアクセスコントローラとを有し、
前記変換結果レジスタが前記ランダムアクセスメモリ上に論理的に構成され、前記ダイレクトメモリアクセスコントローラにより前記フィルタ演算回路と前記ランダムアクセスメモリ上の変換結果レジスタとの間でデータ転送されることを特徴とするマイクロコンピュータ。
The microcomputer according to claim 9, wherein
A random access memory and a direct memory access controller;
The conversion result register is logically configured on the random access memory, and data is transferred between the filter operation circuit and the conversion result register on the random access memory by the direct memory access controller. Microcomputer.
JP2003429291A 2003-12-25 2003-12-25 Digital/analog converter and microcomputer Pending JP2005191810A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003429291A JP2005191810A (en) 2003-12-25 2003-12-25 Digital/analog converter and microcomputer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003429291A JP2005191810A (en) 2003-12-25 2003-12-25 Digital/analog converter and microcomputer

Publications (1)

Publication Number Publication Date
JP2005191810A true JP2005191810A (en) 2005-07-14

Family

ID=34788002

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003429291A Pending JP2005191810A (en) 2003-12-25 2003-12-25 Digital/analog converter and microcomputer

Country Status (1)

Country Link
JP (1) JP2005191810A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7215270B1 (en) * 2006-04-10 2007-05-08 Intrinsix Corp. Sigma-delta modulator having selectable OSR with optimal resonator coefficient
KR100763602B1 (en) 2006-03-16 2007-10-04 엘에스산전 주식회사 Method of resolution adjustment for digital data
JP2012080454A (en) * 2010-10-05 2012-04-19 Shindengen Electric Mfg Co Ltd Signal processing apparatus and power supply apparatus
EP4175182A1 (en) * 2014-10-17 2023-05-03 Microchip Technology Incorporated Analog-to-digital conversion with micro-coded sequencer

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100763602B1 (en) 2006-03-16 2007-10-04 엘에스산전 주식회사 Method of resolution adjustment for digital data
US7215270B1 (en) * 2006-04-10 2007-05-08 Intrinsix Corp. Sigma-delta modulator having selectable OSR with optimal resonator coefficient
US7439891B2 (en) 2006-04-10 2008-10-21 Intrinsix Corporation Methods and apparatus for sigma-delta modulator having selectable OSR with optimal resonator coefficient
JP2012080454A (en) * 2010-10-05 2012-04-19 Shindengen Electric Mfg Co Ltd Signal processing apparatus and power supply apparatus
EP4175182A1 (en) * 2014-10-17 2023-05-03 Microchip Technology Incorporated Analog-to-digital conversion with micro-coded sequencer

Similar Documents

Publication Publication Date Title
US6208279B1 (en) Single-cycle oversampling analog-to-digital converter
JP2007500473A (en) Space-efficient low-power circulating A / D converter
JP2005191810A (en) Digital/analog converter and microcomputer
JP4299657B2 (en) Microcontroller
JP6316593B2 (en) Semiconductor device
JP3131429U (en) Sigma Delta circuit
JP5734715B2 (en) Data processing apparatus and data processing method
WO2008002010A1 (en) Apparatus and method for converting analog signal into digital signal
JP3322030B2 (en) Sampling rate converter
JP2002152043A (en) Sigma delta form analog/digital converter
JP2001077692A (en) D/a converting circuit
JP5875491B2 (en) Semiconductor device
JP3106445B2 (en) Multi pen recorder
JP4905260B2 (en) A / D converter
JP3258938B2 (en) Decimation filter
JPH08111641A (en) Comparator, a/d converter, pwm signal generator, power source device and power source controller
JP4724394B2 (en) Imaging apparatus and camera
JP2002062316A (en) Waveform recorder
JP4106004B2 (en) External synchronous AD converter circuit
JPH11112350A (en) Deltasigma system ad converter
JP4349930B2 (en) Analog to digital converter
JP2007189538A (en) A/d conversion processing circuit
JP2016067041A (en) Semiconductor device
JPH11251874A (en) Analog-digital filter circuit
JP2004145656A (en) Microprocessor system, waveform data generation device and method for controlling stepping motor

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20051102

A131 Notification of reasons for refusal

Effective date: 20070320

Free format text: JAPANESE INTERMEDIATE CODE: A131

A521 Written amendment

Effective date: 20070518

Free format text: JAPANESE INTERMEDIATE CODE: A523

A02 Decision of refusal

Effective date: 20080205

Free format text: JAPANESE INTERMEDIATE CODE: A02