JP2012227642A - A/d converter and method of correcting the same - Google Patents

A/d converter and method of correcting the same Download PDF

Info

Publication number
JP2012227642A
JP2012227642A JP2011091970A JP2011091970A JP2012227642A JP 2012227642 A JP2012227642 A JP 2012227642A JP 2011091970 A JP2011091970 A JP 2011091970A JP 2011091970 A JP2011091970 A JP 2011091970A JP 2012227642 A JP2012227642 A JP 2012227642A
Authority
JP
Japan
Prior art keywords
bit
circuit
result
majority
carry
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Withdrawn
Application number
JP2011091970A
Other languages
Japanese (ja)
Inventor
Hirokazu Ono
弘和 小野
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 Electronics Corp
Original Assignee
Renesas Electronics 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 Electronics Corp filed Critical Renesas Electronics Corp
Priority to JP2011091970A priority Critical patent/JP2012227642A/en
Publication of JP2012227642A publication Critical patent/JP2012227642A/en
Withdrawn legal-status Critical Current

Links

Images

Landscapes

  • Analogue/Digital Conversion (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide an A/D converter that outputs a high accuracy A/D conversion result excluding outliers such as noise.SOLUTION: The A/D converter includes a majority circuit M4 for correcting A/D conversion results by bit-specific majority in an odd number of sampling cycles. The majority circuit M4 includes first determination circuits M11, M13, first correction circuits M15, M17, second determination circuits M12, M14 and second correction circuits M16, M18. The first determination circuits determine that a carry is about to take place and there is a carry if the occurrence frequency of an A/D conversion result "1" in the bit-specific sampling matches a first criterion value. The first correction circuits correct A/D conversion results of the bits lower than the determined bit to "0". The second determination circuits determine that a carry is about to take place and there is no carry if the occurrence frequency of the A/D conversion result "1" in the bit-specific sampling matches a second criterion value. The second correction circuits correct A/D conversion results of the bits lower than the determined bit to "1".

Description

本発明は、A/D変換器に関し、特に変換結果を補正する回路を有するA/D変換器とその補正方法に関する。   The present invention relates to an A / D converter, and more particularly to an A / D converter having a circuit for correcting a conversion result and a correction method thereof.

近年、ヘルスケア市場やセキュリティ市場などの拡大に伴い、センシング技術への注目が高まっている。センシング性能は、状態を認識して電気的な信号へ変換する機能と、その信号に対するデジタル信号処理性能に依存する。そのため、その基本構成要素であるA/D(Analog/Digital)変換器の分解能や精度をより高める技術が望まれている。   In recent years, with the expansion of the healthcare market and the security market, attention has been focused on sensing technology. The sensing performance depends on the function of recognizing the state and converting it into an electrical signal and the digital signal processing performance on the signal. Therefore, a technique for further increasing the resolution and accuracy of an A / D (Analog / Digital) converter, which is the basic component, is desired.

一方、製造プロセスの微細化は、アナログ回路にとって特性ばらつきやノイズ感度を増大させ、精度を低下させることが公知である。これに対して、統計処理などの補正技術を用いて高精度を実現する技術が要求されている。そのような技術として、特開2008−042380号公報(特許文献1)にアナログ・ディジタル変換器の技術が開示されている。   On the other hand, it is known that the miniaturization of the manufacturing process increases the characteristic variation and noise sensitivity for an analog circuit and decreases the accuracy. On the other hand, a technique for realizing high accuracy using a correction technique such as statistical processing is required. As such a technique, Japanese Unexamined Patent Application Publication No. 2008-042380 (Patent Document 1) discloses an analog / digital converter technique.

このアナログ・ディジタル変換器は、上位ビットと下位ビットを分けてA/D変換を行い、並列型A/Dコンバータで構成される下位ビットのA/D変換結果に対して補正をかける。それにより、A/D変換器の内部でノイズが発生した場合でも、精度を損なうことなくA/D変換を行なうことができる、としている。下位ビットのA/D変換結果に対する補正では、多数決回路が、並列型A/Dコンバータの出力を所定回数読み込み、ビット毎に多数決を行い、そのビット出力を“0”か“1”に決定し、変換結果格納レジスタに出力している。   This analog / digital converter performs A / D conversion by dividing the upper bit and the lower bit, and corrects the A / D conversion result of the lower bit constituted by the parallel A / D converter. Thereby, even when noise occurs inside the A / D converter, A / D conversion can be performed without losing accuracy. In the correction of the A / D conversion result of the lower bits, the majority circuit reads the output of the parallel A / D converter a predetermined number of times, performs majority for each bit, and determines the bit output to be “0” or “1”. To the conversion result storage register.

図1は、特許文献1のA/D変換器の構成を示すブロック図である。
このA/D変換器100は、アナログ入力信号S001を上位ビットと下位ビットとに分けてA/D変換を行う。制御回路101、D/Aコンバータ102、スイッチ付きコンパレータ103、逐次比較レジスタ104、及びD/Aコンバータ105は、アナログ入力信号S001の上位ビット部分を出力する上位ビット用A/D変換部を構成する。また、アナログ入力信号S001の下位ビット用に並列型A/Dコンバータ106を設ける。そして、多数決回路107によって、並列型A/Dコンバータ106の出力(A/D変換結果)を複数回サンプリングして、多数決により、下位ビットにおける各ビットの値を決定して出力する。
FIG. 1 is a block diagram illustrating a configuration of an A / D converter disclosed in Patent Document 1. As illustrated in FIG.
The A / D converter 100 divides the analog input signal S001 into upper bits and lower bits and performs A / D conversion. The control circuit 101, the D / A converter 102, the switched comparator 103, the successive approximation register 104, and the D / A converter 105 constitute an upper bit A / D converter that outputs the upper bit portion of the analog input signal S001. . A parallel A / D converter 106 is provided for the lower bits of the analog input signal S001. The majority circuit 107 samples the output of the parallel A / D converter 106 (A / D conversion result) a plurality of times, and determines and outputs the value of each bit in the lower bits by majority.

図2は、特許文献1の多数決回路の構成を示すブロック図である。
多数決回路103は、3ビットまでの補正を行う場合、3組の単ビット多数決回路1010−1〜1010−3を備えている。そして、デジタル信号S011の下位から1ビット目が単ビット多数決回路1010−1に入力され、2ビット目が単ビット多数決回路1010−2に入力され、3ビット目が単ビット多数決回路1010−3に入力される。
FIG. 2 is a block diagram showing the configuration of the majority circuit of Patent Document 1. In FIG.
The majority circuit 103 includes three sets of single-bit majority circuits 1010-1 to 1010-3 when correcting up to 3 bits. The first bit from the lower order of the digital signal S011 is input to the single-bit majority circuit 1010-1, the second bit is input to the single-bit majority circuit 1010-2, and the third bit is input to the single-bit majority circuit 1010-3. Entered.

加算回路1011は、クロック信号S012の立ち上がり変化タイミングで、デジタル信号S011の値(1ビット分)と、8ビットレジスタ1012に格納されている値とを加算し、結果を8ビットレジスタ1012に格納する。8ビットレジスタ1012は、クロック信号S012に同期して動作する8ビットのレジスタである。ビット選択回路1013は、クロック信号S005の立ち上がり変化タイミングで、8ビットレジスタ1012の3ビット目のデータをフリップフロップ1014に格納する。フリップフロップ1014は、クロック信号S005立ち上がり変化タイミングで、ビット選択回路1013の出力を保持するようになっている。クロック信号S012とS005との周波数の比は、加算回路1011で7回の加算が行われた後に、フリップフロップ1014の出力が保持されるように設定されている。すなわち、この周波数の設定により、各単ビット多数決回路1010は、7回の読み込み(サンプリング)を行ったうちの、4回以上が“1”である場合に、“1”を出力する。   The adder circuit 1011 adds the value (1 bit) of the digital signal S011 and the value stored in the 8-bit register 1012 at the rising change timing of the clock signal S012, and stores the result in the 8-bit register 1012. . The 8-bit register 1012 is an 8-bit register that operates in synchronization with the clock signal S012. The bit selection circuit 1013 stores the third bit data of the 8-bit register 1012 in the flip-flop 1014 at the rising change timing of the clock signal S005. The flip-flop 1014 holds the output of the bit selection circuit 1013 at the rising change timing of the clock signal S005. The ratio of the frequencies of the clock signals S012 and S005 is set so that the output of the flip-flop 1014 is held after the addition circuit 1011 has added seven times. That is, according to this frequency setting, each single-bit majority circuit 1010 outputs “1” when four or more of seven readings (sampling) are “1”.

各単ビット多数決回路1010では、加算回路1011とフリップフロップ1014は、何れも、制御信号S014で制御されたスイッチ回路3200を介してクロック信号が入力されている。したがって、制御信号S014が“00”の場合、単ビット多数決回路1010−1にはクロック信号S012とS005が供給され動作するが、単ビット多数決回路1010−2、1010−3にはクロック信号S012とS005が供給されず動作しない。また、制御信号S014が“01”の場合、単ビット多数決回路1010−1、1010−2にはクロック信号S012とS005が供給され動作するが、単ビット多数決回路1010−3にはクロック信号S012とS005が供給されず動作しない。また、制御信号S014が“11”の場合、単ビット多数決回路1010−1、1010−2、1010−3にはクロック信号S012とS005が供給され動作する。以上のように、多数決を行う下位ビットのビット長を、任意のビット数に可変できる。   In each single-bit majority circuit 1010, the adder circuit 1011 and the flip-flop 1014 both receive the clock signal via the switch circuit 3200 controlled by the control signal S014. Therefore, when the control signal S014 is “00”, the clock signals S012 and S005 are supplied to the single-bit majority circuit 1010-1, and the single-bit majority circuits 1010-2 and 1010-3 operate. S005 is not supplied and does not operate. When the control signal S014 is “01”, the single-bit majority circuits 1010-1 and 1010-2 are supplied with the clock signals S012 and S005, but the single-bit majority circuit 1010-3 is operated with the clock signal S012. S005 is not supplied and does not operate. When the control signal S014 is “11”, the single-bit majority circuits 1010-1, 1010-2, and 1010-3 are supplied with clock signals S012 and S005 to operate. As described above, the bit length of the lower bits for majority decision can be changed to an arbitrary number of bits.

関連する技術として特開平03−016432号公報(特許文献2)に、アナログ−デジタル変換器が開示されている。このアナログ−デジタル変換器は、アナログ入力を共通接続した複数個のコンパレータの後段に、隣接する3個の上記コンパレータの出力を多数決演算する回路を設けている。   As a related technique, Japanese Patent Laid-Open No. 03-016432 (Patent Document 2) discloses an analog-digital converter. This analog-to-digital converter is provided with a circuit for performing a majority operation on the outputs of the three adjacent comparators after the plurality of comparators having analog inputs connected in common.

特開2008−042380号公報JP 2008-042380 A 特開平03−016432号公報Japanese Patent Laid-Open No. 03-016432

特許文献1の技術には以下の問題点があることが発明者の研究により今回初めて明らかになった。サンプリングされるA/D変換結果が、例えば、3ビットである場合について考える。この場合、“011”と“100”とが同程度の頻度で発生するような桁上げ付近のアナログ入力に対して、ノイズ等による異常なA/D変換結果が発生した場合、多数決による正常な補正出力結果を出力することができなくなる。   The inventor's research has revealed for the first time that the technique of Patent Document 1 has the following problems. Consider a case where the sampled A / D conversion result is, for example, 3 bits. In this case, when an abnormal A / D conversion result due to noise or the like occurs for an analog input near a carry where “011” and “100” occur at the same frequency, it is normal by majority vote. The correction output result cannot be output.

図3は、特許文献1のA/D変換結果と多数決回路の出力との関係の一例を示す表である。具体的には、この図は、下位3ビットについて、7回の読み込み(サンプリング;1回目〜7回目)を行った場合での、それぞれのA/D変換結果と、多数決回路の出力値(補正出力結果)との関係について、4つの例(例1〜例4)を示している。例1は、下位3ビットにおいて桁上げが発生していない状態でのA/D変換結果である。例2〜例3は、下位3ビットにおいて最上位ビットで桁上げが発生した状態での変換結果である。例4は、下位3ビットにおいて下位2ビット目で桁上げが発生した状態での変換結果を示している。このとき、補正出力結果はビット毎に多数決を行い、4回以上が“1”である場合に、“1”を出力し、3回以下の場合は“0”を出力するものとする。例1〜例4のそれぞれのA/D変換結果では、例として、異常値(丸点線で囲んだ値)が発生したとしている。   FIG. 3 is a table showing an example of the relationship between the A / D conversion result of Patent Document 1 and the output of the majority circuit. Specifically, this figure shows the respective A / D conversion results and the output values (correction) of the majority circuit when the lower three bits are read seven times (sampling; first to seventh times). Four examples (Examples 1 to 4) are shown in relation to the output results. Example 1 is an A / D conversion result in a state in which no carry has occurred in the lower 3 bits. Examples 2 to 3 are conversion results in a state where a carry has occurred in the most significant bit in the lower 3 bits. Example 4 shows a conversion result in a state where a carry is generated in the lower 2 bits in the lower 3 bits. At this time, the correction output result is majority voted for each bit, and “1” is output when “4” or more is “1”, and “0” is output when it is three or less. In each of the A / D conversion results of Examples 1 to 4, it is assumed that an abnormal value (a value surrounded by a round dotted line) occurs as an example.

例1のように、4回目の読み込みでノイズ等の異常値“000”が発生しても、残り全ての変換結果が“011”であれば、多数決回路の結果は“011”となり、異常値を除去できる。しかし、例2のように、6回目の読み込みまでに“011”と“100”を3回ずつ読み込んだ場合、各ビットの“1”出現回数がそれぞれ3回ずつとなるため、6回目までの値によらず7回目の値で多数決が決し、多数決結果として出力されてしまう。つまり、例2であれば、7回目の読み込み値“000”という異常値を多数決結果として出力してしまう。同様に、例3は、1〜2回目、4〜7回目で“011”と“100”を3回ずつ読み込んでおり、3回目の異常値“111”を多数決結果として出力してしまう。例2、例3に示すような“011”と“100”が同じ頻度で発生する状態は、下位3ビットの最上位ビットの桁上げが発生する状態において頻繁に発生するものである。   As in Example 1, even if an abnormal value “000” such as noise occurs in the fourth reading, if all the remaining conversion results are “011”, the result of the majority circuit becomes “011” and the abnormal value Can be removed. However, as in Example 2, when “011” and “100” are read three times before the sixth reading, the number of occurrences of “1” for each bit is three times, so that Regardless of the value, a majority decision is made at the seventh value, and the majority decision result is output. In other words, in the case of Example 2, an abnormal value of the seventh read value “000” is output as the majority result. Similarly, in Example 3, “011” and “100” are read three times at the first, second, and fourth to seventh times, and the third abnormal value “111” is output as the majority result. The state in which “011” and “100” occur at the same frequency as shown in Example 2 and Example 3 frequently occurs in the state in which the carry of the most significant bit of the lower 3 bits occurs.

また、多数決を行う下位3ビットの最上位ビット以外の桁上げについても同様である。例4のように、下位2ビット目に桁上げが発生する“101”と“110”がそれぞれ3回ずつ発生する場合も、下位2ビット目と最下位ビットの“1”出現回数がそれぞれ3回ずつとなり、残り1回の読み込み値が多数決結果となる。つまり6回目に発生した異常値“000”の下位2ビットが“00”であるために“100”を多数決結果として出力してしまう。   The same applies to the carry other than the most significant bit of the lower 3 bits for majority decision. As in Example 4, when “101” and “110” in which the carry is generated in the lower 2 bits each occur 3 times, the number of occurrences of “1” in the lower 2 bits and the least significant bit is 3 respectively. The remaining read value becomes the majority result. That is, since the lower 2 bits of the abnormal value “000” generated at the sixth time is “00”, “100” is output as the majority result.

以上のように、特許文献1の技術は、ビット毎に単独で多数決を行う回路構成のため、多数決のためのサンプリングにおいて例2〜例4のような“1”と“0”が同程度の頻度で発生する桁上げ付近のアナログ入力に対しては、ノイズ等の異常値を除去することができない。   As described above, since the technique of Patent Document 1 has a circuit configuration in which a majority decision is made independently for each bit, “1” and “0” as in Examples 2 to 4 are comparable in sampling for majority decision. Abnormal values such as noise cannot be removed from analog inputs near carry that occur frequently.

以下に、発明を実施するための形態で使用される番号・符号を用いて、課題を解決するための手段を説明する。これらの番号・符号は、特許請求の範囲の記載と発明を実施するための形態との対応関係を明らかにするために括弧付きで付加されたものである。ただし、それらの番号・符号を、特許請求の範囲に記載されている発明の技術的範囲の解釈に用いてはならない。   Hereinafter, means for solving the problem will be described using the numbers and symbols used in the embodiments for carrying out the invention. These numbers and symbols are added with parentheses in order to clarify the correspondence between the description of the claims and the mode for carrying out the invention. However, these numbers and symbols should not be used for interpreting the technical scope of the invention described in the claims.

従って、本発明のA/D変換器は、少なくとも5回以上の奇数回数のサンプリングによりビット毎に行う多数決に基づいてA/D変換結果を補正する。このA/D変換器は、A/D変換結果についてビット毎に行う多数決の結果に基づいて、ビット毎の値を決定する多数決回路(M4)を具備している。この多数決回路(M4)は、第1判定回路(M11、M13)と、第1補正回路(M15、M17)と、第2判定回路(M12、M14)と、第2補正回路(M16、M18)とを備えている。第1判定回路(M11、M13)は、最下位ビットを除く全てのビット毎に、サンプリングによるA/D変換結果の“1”出現回数が、予め設定した所定の第1の判定値と一致する場合、桁上げ付近であり且つ桁上げしていると判定する。第1補正回路(M15、M17)は、桁上げ付近であり且つ桁上げしていると判定されたビットより下位ビットにおけるA/D変換結果を“0”に補正する。第2判定回路(M12、M14)は、最下位ビットを除く全てのビット毎に、サンプリングによるA/D変換結果の“1”出現回数が、予め設定した所定の第2の判定値と一致する場合、桁上げ付近であり且つ桁上げしていないと判定する。第2補正回路(M16、M18)は、桁上げ付近であり且つ桁上げしていないと判定されたビットより下位ビットにおけるA/D変換結果を“1”に補正する。   Therefore, the A / D converter of the present invention corrects the A / D conversion result based on the majority vote performed for each bit by sampling at least an odd number of 5 times or more. The A / D converter includes a majority circuit (M4) that determines a value for each bit based on a result of majority vote for each bit of the A / D conversion result. The majority circuit (M4) includes a first determination circuit (M11, M13), a first correction circuit (M15, M17), a second determination circuit (M12, M14), and a second correction circuit (M16, M18). And. In the first determination circuit (M11, M13), for every bit except the least significant bit, the number of occurrences of “1” of the A / D conversion result by sampling coincides with a predetermined first determination value set in advance. In this case, it is determined that it is near the carry and carry. The first correction circuit (M15, M17) corrects the A / D conversion result in the lower bits from the bits that are near the carry and determined to carry, to “0”. In the second determination circuit (M12, M14), for every bit except the least significant bit, the number of occurrences of “1” of the A / D conversion result by sampling coincides with a predetermined second determination value set in advance. In this case, it is determined that the carry is in the vicinity of the carry and is not carried. The second correction circuit (M16, M18) corrects the A / D conversion result in the lower bits than the bit determined to be near the carry and not carry to “1”.

本発明の半導体装置は、アナログ信号供給回路と、A/D変換器とを具備している。アナログ信号供給回路は、アナログ信号を出力する。A/D変換器は、上記段落に記載され、そのアナログ信号をデジタル信号に変換する。   The semiconductor device of the present invention includes an analog signal supply circuit and an A / D converter. The analog signal supply circuit outputs an analog signal. The A / D converter is described in the above paragraph and converts the analog signal into a digital signal.

本発明のA/D変換結果の補正方法は、少なくとも5回以上の奇数回数のサンプリングによりビット毎に行う多数決に基づいてA/D変換結果を補正する。このA/D変換結果の補正方法は、最下位ビットを除く全てのビット毎に、サンプリングによるA/D変換結果の“1”出現回数が、予め設定した所定の第1の判定値と一致する場合、桁上げ付近であり且つ桁上げしていると判定するステップと、桁上げ付近であり且つ桁上げしていると判定されたビットより下位ビットにおけるA/D変換結果を“0”に補正するステップと、最下位ビットを除く全てのビット毎に、サンプリングによるA/D変換結果の“1”出現回数が、予め設定した所定の第2の判定値と一致する場合、桁上げ付近であり且つ桁上げしていないと判定するステップと、桁上げ付近であり且つ桁上げしていないと判定されたビットより下位ビットにおけるA/D変換結果を“1”に補正するステップとを備えている。   According to the A / D conversion result correction method of the present invention, the A / D conversion result is corrected based on a majority vote performed for each bit by sampling an odd number of times of at least five times. In this A / D conversion result correction method, for every bit except the least significant bit, the number of occurrences of “1” of the A / D conversion result by sampling coincides with a predetermined first determination value set in advance. In this case, the step of determining that the carry is in the vicinity of the carry and the carry is performed, and the A / D conversion result in the lower bit than the bit in the vicinity of the carry and the carry is determined is corrected to “0”. If the number of occurrences of “1” in the A / D conversion result by sampling matches the predetermined second determination value set in advance for every bit except the least significant bit, it is near the carry. And a step of determining that no carry has been performed, and a step of correcting an A / D conversion result in a lower bit than a bit determined to be near and not carried as “1”. .

本発明により、A/D変換器において、桁上げ付近のアナログ入力に対して、ノイズ等の異常値を除去することができる。それにより、高精度のA/D変換結果を出力することができる。   According to the present invention, an abnormal value such as noise can be removed from an analog input near a carry in an A / D converter. Thereby, a highly accurate A / D conversion result can be output.

図1は、特許文献1のA/D変換器の構成を示すブロック図である。FIG. 1 is a block diagram illustrating a configuration of an A / D converter disclosed in Patent Document 1. As illustrated in FIG. 図2は、特許文献1の多数決回路の構成を示すブロック図である。FIG. 2 is a block diagram showing the configuration of the majority circuit of Patent Document 1. In FIG. 図3は、特許文献1のA/D変換結果と多数決回路の出力との関係の一例を示す表である。FIG. 3 is a table showing an example of the relationship between the A / D conversion result of Patent Document 1 and the output of the majority circuit. 図4は、本発明の実施の形態に係るA/D変換器の構成を示すブロック図である。FIG. 4 is a block diagram showing the configuration of the A / D converter according to the embodiment of the present invention. 図5は、本発明の実施の形態に係るA/D変換器の多数決回路を示すブロック図である。FIG. 5 is a block diagram showing a majority circuit of the A / D converter according to the embodiment of the present invention. 図6は、本実施の形態に係るA/D変換結果と多数決回路の出力との関係の一例を示す表である。FIG. 6 is a table showing an example of the relationship between the A / D conversion result and the output of the majority circuit according to the present embodiment. 図7は、本発明の実施の形態に係るA/D変換器M0の動作方法を示すフローチャートである。FIG. 7 is a flowchart showing an operation method of the A / D converter M0 according to the embodiment of the present invention.

以下、本発明の実施の形態に係るA/D変換器とその補正方法に関して、添付図面を参照して説明する。   Hereinafter, an A / D converter and a correction method thereof according to an embodiment of the present invention will be described with reference to the accompanying drawings.

本発明の実施の形態に係るA/D変換器は、少なくとも5回以上の奇数回数のサンプリングによりビット毎に多数決を行うことで変換結果を補正する。このA/D変換器は、多数決回路を備えている。この多数決回路は、第1判定回路と、“0”補正回路と、第2判定回路と、“1”補正回路を備えている。第1判定回路は、最下位ビットを除く全てのビット毎にサンプリングによるA/D変換結果の“1”出現回数が[(サンプリング回数+1)/2]と一致することにより、桁上げ付近であり且つ「桁上げしている」と判定する。“0”補正回路は、桁上げ付近であり且つ「桁上げしている」と判定したビットより下位ビットは、当該多数決回路の結果を“0”に補正する。第2判定回路は、最下位ビットを除く全てのビット毎にサンプリングによるA/D変換結果の“1”出現回数が[(サンプリング回数−1)/2]との一致により、桁上げ付近であり且つ「桁上げしていない」と判定する。“1”補正回路は、桁上げ付近であり且つ「桁上げしていない」と判定したビットより下位ビットは、当該多数決回路の結果を“1”に補正する。これにより、このA/D変換器は、少なくとも5回以上の奇数回数のサンプリングにおいて、少なくとも“1”と“0”が同程度の頻度で発生する桁上げ付近のアナログ入力に対しても、ノイズ等の影響を受けることなく、正しく多数決による変換結果の補正を実施する事が可能となり、高精度のA/D変換結果を出力することができる。以下、具体的に説明する。   The A / D converter according to the embodiment of the present invention corrects the conversion result by performing a majority decision for each bit by sampling at least an odd number of times of 5 or more. This A / D converter includes a majority circuit. The majority circuit includes a first determination circuit, a “0” correction circuit, a second determination circuit, and a “1” correction circuit. The first determination circuit is in the vicinity of a carry because the number of occurrences of “1” in the A / D conversion result by sampling matches [(sampling number + 1) / 2] for every bit except the least significant bit. And it is determined that “carrying”. The “0” correction circuit corrects the result of the majority circuit to “0” when the bit is near the carry and is lower than the bit determined to be “carrying”. In the second determination circuit, the number of occurrences of “1” in the A / D conversion result by sampling for every bit except the least significant bit is close to the carry because of the coincidence with [(sampling number−1) / 2]. And it is determined that “no carry”. The “1” correction circuit corrects the result of the majority circuit to “1” when the bit is near the carry and is lower than the bit determined as “not carrying”. As a result, this A / D converter is capable of generating noise even for an analog input near a carry in which at least “1” and “0” are generated at the same frequency in an odd number of samplings of at least 5 times. Thus, it is possible to correct the conversion result by majority vote without being affected by the above, and to output a highly accurate A / D conversion result. This will be specifically described below.

本発明の実施の形態に係るA/D変換器の構成について、添付図面を参照して説明する。図4は、本発明の実施の形態に係るA/D変換器の構成を示すブロック図である。A/D変換器M0は、上位ビット用A/D変換器(逐次比較型A/Dコンバータ)M1と、基準電圧供給部(基準電圧Vref)と、下位ビット用A/D変換器(並列型A/Dコンバータ)M2と、アナログ入力電圧供給部(アナログ入力信号N1)と、下位ビット基準電圧発生回路M3と、多数決回路M4と、変換結果格納レジスタM5とを具備している。   A configuration of an A / D converter according to an embodiment of the present invention will be described with reference to the accompanying drawings. FIG. 4 is a block diagram showing the configuration of the A / D converter according to the embodiment of the present invention. The A / D converter M0 includes an upper bit A / D converter (successive comparison type A / D converter) M1, a reference voltage supply unit (reference voltage Vref), and a lower bit A / D converter (parallel type). A / D converter) M2, an analog input voltage supply unit (analog input signal N1), a lower bit reference voltage generation circuit M3, a majority circuit M4, and a conversion result storage register M5.

アナログ入力電圧受信部(アナログ入力信号N1)は、A/D変換器M1の外部のアナログ信号供給部(例示:センサ回路、A/D変換器M1の含まれている半導体装置の他の回路;図示されず)からアナログ入力信号N1を受信して、逐次比較型A/DコンバータM1及び並列型A/DコンバータM2に出力する。基準電圧受信部(基準電圧Vref)は、A/D変換器M1の外部の基準電圧供給部(例示:電源回路、A/D変換器M1の含まれている半導体装置の他の回路;図示されず)から基準電圧Vrefを受信して、逐次比較型A/DコンバータM1に出力する。   The analog input voltage receiving unit (analog input signal N1) is an analog signal supply unit outside the A / D converter M1 (example: sensor circuit, other circuit of the semiconductor device including the A / D converter M1; An analog input signal N1 is received from (not shown) and output to the successive approximation A / D converter M1 and the parallel A / D converter M2. The reference voltage receiving unit (reference voltage Vref) is a reference voltage supply unit outside the A / D converter M1 (example: power circuit, other circuit of the semiconductor device including the A / D converter M1; And the reference voltage Vref is output to the successive approximation A / D converter M1.

逐次比較型A/Dコンバータ(上位ビット用A/D変換器)M1は、基準電圧Vrefに基づいて、アナログ入力信号N1の上位ビットをA/D変換し、A/D変換結果N2を変換結果格納レジスタM5と、下位ビットの基準電圧を決定するための下位ビット基準電圧発生回路M3へ出力する。これは、従来知られた逐次比較型A/Dコンバータを用いることができる。   The successive approximation A / D converter (upper bit A / D converter) M1 A / D converts the upper bits of the analog input signal N1 based on the reference voltage Vref, and converts the A / D conversion result N2 into the conversion result. The data is output to the storage register M5 and the lower bit reference voltage generation circuit M3 for determining the lower bit reference voltage. For this, a conventionally known successive approximation A / D converter can be used.

下位ビット基準電圧発生回路M3は、A/D変換結果N2に基づいて、下位ビットの上限基準電圧N3及び下限基準電圧N4を生成し、並列型A/DコンバータM2へ出力する。   The lower bit reference voltage generation circuit M3 generates an upper limit reference voltage N3 and a lower limit reference voltage N4 of the lower bits based on the A / D conversion result N2, and outputs them to the parallel A / D converter M2.

並列型A/Dコンバータ(下位ビット用A/D変換器)M2は、下位ビットの上限基準電圧N3及び下限基準電圧N4に基づいて、アナログ入力信号N1の下位ビットをA/D変換し、A/D変換結果N5を多数決回路M4へ出力する。これは、従来知られた並列型A/Dコンバータを用いることができる。   A parallel A / D converter (A / D converter for lower bits) M2 performs A / D conversion on the lower bits of the analog input signal N1 based on the upper limit reference voltage N3 and the lower limit reference voltage N4 of the lower bits. The / D conversion result N5 is output to the majority circuit M4. For this, a conventionally known parallel A / D converter can be used.

多数決回路M4は、並列型A/DコンバータM2から出力されるA/D変換結果N5を複数回サンプリングして、多数決により各ビットの値を決定して出力する。   The majority circuit M4 samples the A / D conversion result N5 output from the parallel A / D converter M2 a plurality of times, and determines and outputs the value of each bit by majority.

変換結果格納レジスタM5は、逐次比較型A/DコンバータM1のA/D変換結果N2と、並列型A/DコンバータM2のA/D変換結果N5を多数決回路M4により補正した結果N6を格納する。   The conversion result storage register M5 stores an A / D conversion result N2 of the successive approximation A / D converter M1 and a result N6 of the A / D conversion result N5 of the parallel A / D converter M2 corrected by the majority circuit M4. .

図5は、図4の本発明の実施の形態に係るA/D変換器の多数決回路の詳細を示すブロック図である。多数決回路M4は、3組の単ビット多数決回路M6−1〜M6−3と、“0”補正回路M15と、“1”補正回路M16と、“0”補正回路M17と、“1”補正回路M18とを備えている。   FIG. 5 is a block diagram showing details of the majority circuit of the A / D converter according to the embodiment of the present invention shown in FIG. The majority circuit M4 includes three sets of single-bit majority circuits M6-1 to M6-3, a “0” correction circuit M15, a “1” correction circuit M16, a “0” correction circuit M17, and a “1” correction circuit. M18.

3組の単ビット多数決回路M6−1〜M6−3は、クロック信号N7及びクロック信号N14に基づいて、下位3ビットのA/D変換結果N5の多数決をビット毎に行う。A/D変換結果N5の下位から1ビット目が単ビット多数決回路M6−1に入力され、2ビット目が単ビット多数決回路M6−2に入力され、3ビット目が単ビット多数決回路M6−3に入力される。そして、単ビット多数決回路M6−1〜M6−3は、それぞれ多数決結果N8−1〜N8−3を出力する。更に、単ビット多数決回路M6−3は、デジタル信号N9、N10を出力する。単ビット多数決回路M6−2は、デジタル信号N11、N12を出力する。   The three sets of single-bit majority circuits M6-1 to M6-3 perform a majority decision on the lower 3 bits of the A / D conversion result N5 for each bit based on the clock signal N7 and the clock signal N14. The first bit from the lower order of the A / D conversion result N5 is input to the single-bit majority circuit M6-1, the second bit is input to the single-bit majority circuit M6-2, and the third bit is the single-bit majority circuit M6-3. Is input. The single-bit majority circuits M6-1 to M6-3 output the majority results N8-1 to N8-3, respectively. Further, the single bit majority circuit M6-3 outputs digital signals N9 and N10. The single bit majority circuit M6-2 outputs digital signals N11 and N12.

“0”補正回路M15は、単ビット多数決回路M6−3から出力されるデジタル信号N10と単ビット多数決回路M6−2から出力される多数決結果N8−2とに基づいて、所定の論理演算を行い、演算結果を“1”補正回路M16へ出力する。   The “0” correction circuit M15 performs a predetermined logical operation based on the digital signal N10 output from the single-bit majority circuit M6-3 and the majority result N8-2 output from the single-bit majority circuit M6-2. The calculation result is output to the “1” correction circuit M16.

“1”補正回路M16は、単ビット多数決回路M6−3から出力されるデジタル信号N9と“0”補正回路M15から出力される信号とに基づいて、所定の論理演算を行い、演算結果としての補正出力結果N13−2を出力する。   The “1” correction circuit M16 performs a predetermined logical operation on the basis of the digital signal N9 output from the single-bit majority circuit M6-3 and the signal output from the “0” correction circuit M15, The corrected output result N13-2 is output.

“0”補正回路M17は、単ビット多数決回路M6−3から出力されるデジタル信号N10と単ビット多数決回路M6−2から出力されるデジタル信号N12と単ビット多数決回路M6−1から出力される多数決結果N8−1とに基づいて、所定の論理演算を行い、演算結果を“1”補正回路M18へ出力する。   The “0” correction circuit M17 includes the digital signal N10 output from the single bit majority circuit M6-3, the digital signal N12 output from the single bit majority circuit M6-2, and the majority vote output from the single bit majority circuit M6-1. Based on the result N8-1, a predetermined logical operation is performed, and the operation result is output to the “1” correction circuit M18.

“1”補正回路M18は、単ビット多数決回路M6−3から出力されるデジタル信号N9と単ビット多数決回路M6−2から出力されるデジタル信号N11と“0”補正回路M17から出力される信号とに基づいて、所定の論理演算を行い、演算結果としての補正出力結果N13−1を出力する。   The “1” correction circuit M18 includes a digital signal N9 output from the single-bit majority circuit M6-3, a digital signal N11 output from the single-bit majority circuit M6-2, and a signal output from the “0” correction circuit M17. Based on the above, a predetermined logical operation is performed, and a corrected output result N13-1 as an operation result is output.

多数決回路M4は、単ビット多数決回路M6−3から出力される多数決結果N8−3と“1”補正回路M16から出力される補正出力結果N13−2と“1”補正回路M18から出力される補正出力結果N13−1とを、3ビットの出力データである補正結果N6として出力する。ただし、多数決結果N8−3はA/D変換結果の下位から3ビット目の多数決結果、補正出力結果N13−2は下位から2ビット目の補正出力結果、及び、補正出力結果N13−1は下位から1ビット目の補正出力結果となる。   The majority circuit M4 includes a majority result N8-3 output from the single-bit majority circuit M6-3, a correction output result N13-2 output from the “1” correction circuit M16, and a correction output from the “1” correction circuit M18. The output result N13-1 is output as a correction result N6 which is 3-bit output data. However, the majority decision result N8-3 is the majority decision result of the third bit from the lower order of the A / D conversion result, the correction output result N13-2 is the correction output result of the second bit from the lower order, and the correction output result N13-1 is the lower order. To the first bit correction output result.

単ビット多数決回路M6−1は、加算回路M7−1と、8ビットレジスタM8−1と、ビット選択回路M9−1と、フリップフロップM10−1とを備えている。加算回路M7−1は、クロック信号N7に基づいて、A/D変換結果N5の下位から1ビット目と8ビットレジスタM8−1のフィードバック値とを加算する。8ビットレジスタM8−1は、クロック信号N7に基づいて、加算回路M7−1の出力を格納・出力する。ビット選択回路M9−1は、8ビットレジスタM8−1について3ビット目のデータを出力する。フリップフロップM10−1は、クロック信号N14に基づいて、ビット選択回路M9−1の出力を、下位1ビット目の多数決結果信号N8−1として出力する。   The single-bit majority circuit M6-1 includes an adder circuit M7-1, an 8-bit register M8-1, a bit selection circuit M9-1, and a flip-flop M10-1. The adder circuit M7-1 adds the first bit from the lower order of the A / D conversion result N5 and the feedback value of the 8-bit register M8-1 based on the clock signal N7. The 8-bit register M8-1 stores and outputs the output of the adder circuit M7-1 based on the clock signal N7. The bit selection circuit M9-1 outputs the third bit data for the 8-bit register M8-1. The flip-flop M10-1 outputs the output of the bit selection circuit M9-1 as the majority result signal N8-1 of the lower first bit based on the clock signal N14.

単ビット多数決回路M6−2は、加算回路M7−2と、8ビットレジスタM8−2と、ビット選択回路M9−2と、フリップフロップM10−2と、判定回路M13と、判定回路M14とを備えている。加算回路M7−2は、クロック信号N7に基づいて、A/D変換結果N5の下位から2ビット目と8ビットレジスタM8−2のフィードバック値とを加算する。8ビットレジスタM8−2は、クロック信号N7に基づいて、加算回路M7−2の出力を格納・出力する。ビット選択回路M9−2は、8ビットレジスタM8−2の出力について3ビット目のデータを出力する。フリップフロップM10−2は、クロック信号N14に基づいて、ビット選択回路M9−2の出力を、下位2ビット目の多数決結果信号N8−2として出力する。判定回路M13は、8ビットレジスタM8−2の出力に基づいて、所定の判定プロセスを実行し、判定結果信号N12を出力する。判定回路M14は、8ビットレジスタM8−2の出力に基づいて、所定の判定プロセスを実行し、判定結果信号N11を出力する。   The single bit majority circuit M6-2 includes an addition circuit M7-2, an 8-bit register M8-2, a bit selection circuit M9-2, a flip-flop M10-2, a determination circuit M13, and a determination circuit M14. ing. The adder circuit M7-2 adds the second bit from the lower order of the A / D conversion result N5 and the feedback value of the 8-bit register M8-2 based on the clock signal N7. The 8-bit register M8-2 stores and outputs the output of the adder circuit M7-2 based on the clock signal N7. The bit selection circuit M9-2 outputs the third bit data with respect to the output of the 8-bit register M8-2. The flip-flop M10-2 outputs the output of the bit selection circuit M9-2 as the majority result signal N8-2 of the lower second bit based on the clock signal N14. The determination circuit M13 executes a predetermined determination process based on the output of the 8-bit register M8-2 and outputs a determination result signal N12. The determination circuit M14 executes a predetermined determination process based on the output of the 8-bit register M8-2 and outputs a determination result signal N11.

単ビット多数決回路M6−3は、加算回路M7−3と、8ビットレジスタM8−3と、ビット選択回路M9−3と、フリップフロップM10−3と、判定回路M11と、判定回路M12とを備えている。加算回路M7−3は、クロック信号N7に基づいて、A/D変換結果N5の下位から3ビット目と8ビットレジスタM8−3のフィードバック値とを加算する。8ビットレジスタM8−3は、クロック信号N7に基づいて、加算回路M7−3の出力を格納・出力する。ビット選択回路M9−3は、8ビットレジスタM8−3の出力について3ビット目のデータを出力する。フリップフロップM10−3は、クロック信号N14に基づいて、ビット選択回路M9−3の出力を、下位3ビット目の多数決結果信号N8−3として出力する。判定回路M11は、8ビットレジスタM8−3の出力に基づいて、所定の判定プロセスを実行し、判定結果信号N10を出力する。判定回路M12は、8ビットレジスタM8−3の出力に基づいて、所定の判定プロセスを実行し、判定結果信号N9を出力する。   The single-bit majority circuit M6-3 includes an addition circuit M7-3, an 8-bit register M8-3, a bit selection circuit M9-3, a flip-flop M10-3, a determination circuit M11, and a determination circuit M12. ing. Based on the clock signal N7, the adder circuit M7-3 adds the third bit from the lower order of the A / D conversion result N5 and the feedback value of the 8-bit register M8-3. The 8-bit register M8-3 stores and outputs the output of the adder circuit M7-3 based on the clock signal N7. The bit selection circuit M9-3 outputs the third bit data with respect to the output of the 8-bit register M8-3. Based on the clock signal N14, the flip-flop M10-3 outputs the output of the bit selection circuit M9-3 as the majority result signal N8-3 of the lower third bit. The determination circuit M11 executes a predetermined determination process based on the output of the 8-bit register M8-3, and outputs a determination result signal N10. The determination circuit M12 executes a predetermined determination process based on the output of the 8-bit register M8-3, and outputs a determination result signal N9.

以下に、図5に示される各構成要素の動作について説明する。
まず、単ビット多数決回路M6−1の動作について説明する。加算回路M7−1は、クロック信号N7の立ち上がり変化タイミングで、入力されるデジタル信号N5の値と、8ビットレジスタM8−1のフィードバック値とをビット毎に加算し、結果を8ビットレジスタM8−1に格納する。8ビットレジスタM8−1は、クロック信号N7に同期して加算回路M7−1の出力データを格納し、結果をビット選択回路M9−1へ出力する。ビット選択回路M9−1は、クロック信号N14の立ち上がり変化タイミングで8ビットレジスタM8−1の出力データの3ビット目のデータをフリップフロップM10−1に格納する。フリップフロップM10−1は、クロック信号N14の立ち上がり変化タイミングで、ビット選択回路M9−1の出力を保持し、単ビット多数決回路M6−1の出力として、多数決結果信号N8−1を出力する。
The operation of each component shown in FIG. 5 will be described below.
First, the operation of the single bit majority circuit M6-1 will be described. The adder circuit M7-1 adds the value of the input digital signal N5 and the feedback value of the 8-bit register M8-1 for each bit at the rising change timing of the clock signal N7, and outputs the result to the 8-bit register M8-. 1 is stored. The 8-bit register M8-1 stores the output data of the adder circuit M7-1 in synchronization with the clock signal N7, and outputs the result to the bit selection circuit M9-1. The bit selection circuit M9-1 stores the third bit data of the output data of the 8-bit register M8-1 in the flip-flop M10-1 at the rising change timing of the clock signal N14. The flip-flop M10-1 holds the output of the bit selection circuit M9-1 at the rising change timing of the clock signal N14, and outputs the majority decision result signal N8-1 as the output of the single-bit majority decision circuit M6-1.

次に、単ビット多数決回路M6−2の動作について説明する。加算回路M7−2は、クロック信号N7の立ち上がり変化タイミングで、入力されるデジタル信号N5の値と、8ビットレジスタM8−2のフィードバック値とをビット毎に加算し、結果を8ビットレジスタM8−2に格納する。8ビットレジスタM8−2は、クロック信号N7に同期して加算回路M7−2の出力データを格納し、結果をビット選択回路M9−2へ出力し、更に判定回路M13、M14にそれぞれ出力する。ビット選択回路M9−2は、クロック信号N14の立ち上がり変化タイミングで8ビットレジスタM8−2の出力データの3ビット目のデータをフリップフロップM10−2に格納する。フリップフロップM10−2は、クロック信号N14の立ち上がり変化タイミングで、ビット選択回路M9−2の出力を保持し、単ビット多数決回路M6−2の出力として、多数決結果信号N8−2を出力する。判定回路M13は、予め判定値として[(サンプリング回数+1)/2]を設定しておく。そして、8ビットレジスタM8−2の出力データと判定値とが一致した場合には“1”を出力し、不一致の場合には“0”を出力する。判定回路M14は、判定回路M12と同様に予め判定値として[(サンプリング回数−1)/2]を設定しておく。そして、8ビットレジスタM8−2の出力データと判定値とが一致した場合には“1”を出力し、不一致の場合には“0”を出力する。   Next, the operation of the single bit majority circuit M6-2 will be described. The adder circuit M7-2 adds the value of the input digital signal N5 and the feedback value of the 8-bit register M8-2 bit by bit at the rising change timing of the clock signal N7, and the result is the 8-bit register M8-. 2 is stored. The 8-bit register M8-2 stores the output data of the adder circuit M7-2 in synchronization with the clock signal N7, outputs the result to the bit selection circuit M9-2, and further outputs them to the determination circuits M13 and M14. The bit selection circuit M9-2 stores the third bit data of the output data of the 8-bit register M8-2 in the flip-flop M10-2 at the rising change timing of the clock signal N14. The flip-flop M10-2 holds the output of the bit selection circuit M9-2 at the rising change timing of the clock signal N14, and outputs the majority result signal N8-2 as the output of the single-bit majority circuit M6-2. The determination circuit M13 sets [(sampling count + 1) / 2] as a determination value in advance. If the output data of the 8-bit register M8-2 matches the determination value, “1” is output, and if they do not match, “0” is output. Similar to the determination circuit M12, the determination circuit M14 sets [(sampling count−1) / 2] as a determination value in advance. If the output data of the 8-bit register M8-2 matches the determination value, “1” is output, and if they do not match, “0” is output.

次に、単ビット多数決回路M6−3の動作について説明する。加算回路M7−3は、クロック信号N7の立ち上がり変化タイミングで、入力されるデジタル信号N5の値と、8ビットレジスタM8−3のフィードバック値とをビット毎に加算し、結果を8ビットレジスタM8−3に格納する。8ビットレジスタM8−3は、クロック信号N7に同期して加算回路M7−3の出力データを格納し、結果をビット選択回路M9−3へ出力し、更に、判定回路M11、M12にそれぞれ出力する。ビット選択回路M9−3は、クロック信号N14の立ち上がり変化タイミングで8ビットレジスタM8−3の出力データの3ビット目のデータをフリップフロップM10−3に格納する。フリップフロップM10−3は、クロック信号N14の立ち上がり変化タイミングで、ビット選択回路M9−3の出力を保持し、単ビット多数決回路M6−3の出力として、多数決結果信号N8−3を出力する。判定回路M11は、予め判定値として[(サンプリング回数+1)/2]を設定しておく。そして、8ビットレジスタM8−3の出力データと判定値とが一致した場合には“1”を出力し、不一致の場合には“0”を出力する。判定回路M12は、予め判定値として[(サンプリング回数−1)/2]を設定しておく。そして、8ビットレジスタM8−3の出力データと判定値とが一致した場合には“1”を出力し、不一致の場合には“0”を出力する。   Next, the operation of the single bit majority circuit M6-3 will be described. The adder M7-3 adds the value of the input digital signal N5 and the feedback value of the 8-bit register M8-3 for each bit at the rising change timing of the clock signal N7, and the result is the 8-bit register M8-. 3 is stored. The 8-bit register M8-3 stores the output data of the adder circuit M7-3 in synchronization with the clock signal N7, outputs the result to the bit selection circuit M9-3, and outputs the result to the determination circuits M11 and M12, respectively. . The bit selection circuit M9-3 stores the third bit data of the output data of the 8-bit register M8-3 in the flip-flop M10-3 at the rising change timing of the clock signal N14. The flip-flop M10-3 holds the output of the bit selection circuit M9-3 at the rising change timing of the clock signal N14, and outputs the majority result signal N8-3 as the output of the single bit majority circuit M6-3. The determination circuit M11 sets [(sampling count + 1) / 2] as a determination value in advance. If the output data of the 8-bit register M8-3 matches the determination value, “1” is output, and if they do not match, “0” is output. The determination circuit M12 sets [(sampling count−1) / 2] as a determination value in advance. If the output data of the 8-bit register M8-3 matches the determination value, “1” is output, and if they do not match, “0” is output.

なお、判定値[(サンプリング回数+1)/2]については、この例に限定されるものではなく、[(サンプリング回数+1)/2](回)から上位ビット側へ所定の幅(回数)を有した値としても良い。例えば、[(サンプリング回数+1)/2](回)〜[(サンプリング回数+1)/2]+1(回)などである。この追加分は、サンプリング回数に対応して決定することができる。例えば、サンプリング回数が多いほど増加量を増加させる、などである。同様に、判定値[(サンプリング回数−1)/2]については、この例に限定されるものではなく、[(サンプリング回数−1)/2](回)から下位ビット側へ所定の幅(回数)を有した値としても良い。例えば、[(サンプリング回数−1)/2](回)〜[(サンプリング回数−1)/2]−1(回)などである。この追加分は、サンプリング回数に対応して決定することができる。例えば、サンプリング回数が多いほど減少量を増加させる、などである。   Note that the determination value [(sampling number + 1) / 2] is not limited to this example, and a predetermined width (number of times) from [(sampling number + 1) / 2] (times) to the upper bit side. It may be a value that it has. For example, [(sampling count + 1) / 2] (times) to [(sampling count + 1) / 2] +1 (times). This additional amount can be determined corresponding to the number of samplings. For example, the increase amount is increased as the number of samplings is increased. Similarly, the determination value [(sampling count-1) / 2] is not limited to this example, and a predetermined width ([sampling count-1) / 2] (times) from the ((sampling count-1) / 2) to the lower bit side. (Number of times). For example, [(sampling count-1) / 2] (times) to [(sampling count-1) / 2] -1 (times). This additional amount can be determined corresponding to the number of samplings. For example, the amount of decrease is increased as the number of samplings is increased.

次に、“0”補正回路M15の動作を説明する。“0”補正回路M15は、例えば2入力AND回路で構成し、判定回路M11から出力される判定結果信号N10の反転値と、単ビット多数決回路M6−2の多数決結果N8−2を入力とし、判定結果信号N10が“1”の場合、多数決結果N8−2の値によらず“0”を“1”補正回路M16へ出力する。一方、判定結果信号N10が“0”の場合、多数決結果N8−2の値をそのまま“1”補正回路M16へ出力する。   Next, the operation of the “0” correction circuit M15 will be described. The “0” correction circuit M15 is composed of, for example, a two-input AND circuit, and receives the inverted value of the determination result signal N10 output from the determination circuit M11 and the majority result N8-2 of the single-bit majority circuit M6-2. When the determination result signal N10 is “1”, “0” is output to the “1” correction circuit M16 regardless of the value of the majority result N8-2. On the other hand, when the determination result signal N10 is “0”, the value of the majority result N8-2 is output to the “1” correction circuit M16 as it is.

次に、“1”補正回路M16の動作を説明する。“1”補正回路M16は、例えば2入力OR回路で構成し、判定回路M12から出力される判定結果信号N9と、“0”補正回路M15の出力データを入力とし、判定結果信号N9が“1”の場合、“0”補正回路M15の出力データによらず、補正結果出力N13−2を“1”に補正して出力する。一方、判定結果信号N9が“0”の場合、“0”補正回路M15の出力データをそのまま補正結果出力N13−2として出力する。   Next, the operation of the “1” correction circuit M16 will be described. The “1” correction circuit M16 is composed of, for example, a two-input OR circuit, and receives the determination result signal N9 output from the determination circuit M12 and the output data of the “0” correction circuit M15. The determination result signal N9 is “1”. In the case of "," the correction result output N13-2 is corrected to "1" and output regardless of the output data of the "0" correction circuit M15. On the other hand, when the determination result signal N9 is “0”, the output data of the “0” correction circuit M15 is output as it is as the correction result output N13-2.

次に、“0”補正回路M17の動作を説明する。“0”補正回路M17は、例えば3入力AND回路で構成し、判定回路M11から出力される判定結果信号N10の反転値と、判定回路M13から出力される判定結果信号N12の反転値と、単ビット多数決回路M6−1の多数決結果N8−1を入力とし、判定結果信号N10と判定結果信号N12のどちらか一方又は両方が“1”の場合、多数決結果N8−1の値によらず“0”を“1”補正回路M18へ出力する。一方、判定結果信号N10と判定結果信号N12の両方が“0”の場合、多数決結果N8−1の値をそのまま“1”補正回路M18へ出力する。   Next, the operation of the “0” correction circuit M17 will be described. The “0” correction circuit M17 is formed of, for example, a three-input AND circuit, and an inverted value of the determination result signal N10 output from the determination circuit M11, an inverted value of the determination result signal N12 output from the determination circuit M13, and a single value. When the majority result N8-1 of the bit majority circuit M6-1 is input and one or both of the determination result signal N10 and the determination result signal N12 are “1”, “0” regardless of the value of the majority result N8-1. "1" is output to the "1" correction circuit M18. On the other hand, when both the determination result signal N10 and the determination result signal N12 are “0”, the value of the majority decision result N8-1 is directly output to the “1” correction circuit M18.

次に、“1”補正回路M18の動作を説明する。“1”補正回路M18は、例えば3入力OR回路で構成し、判定回路M12から出力される判定結果信号N9と、判定回路M14から出力される判定結果信号N11と、“0”補正回路M17の出力データを入力とし、判定結果信号N9と判定結果信号N11のどちらか一方又は両方が“1”の場合、“0”補正回路M17の出力データによらず、補正結果出力N13−1を“1”に補正して出力する。一方、判定結果信号N9と判定結果信号N11の両方が“0”の場合、“0”補正回路M17の出力データをそのまま補正結果出力N13−1へ出力する。   Next, the operation of the “1” correction circuit M18 will be described. The “1” correction circuit M18 includes, for example, a three-input OR circuit, the determination result signal N9 output from the determination circuit M12, the determination result signal N11 output from the determination circuit M14, and the “0” correction circuit M17. When output data is input and one or both of the determination result signal N9 and the determination result signal N11 are “1”, the correction result output N13-1 is set to “1” regardless of the output data of the “0” correction circuit M17. Correct to "" and output. On the other hand, when both the determination result signal N9 and the determination result signal N11 are “0”, the output data of the “0” correction circuit M17 is output as it is to the correction result output N13-1.

次に、本実施の形態に係る多数決回路M4(図5)において、補正結果出力N6を出力するための動作について説明する。図6は、本実施の形態に係るA/D変換結果と多数決回路の出力との関係の一例を示す表である。具体的には、この図は、多数決回路M4により下位3ビットについて、7回の読み込み(サンプリング;1回目〜7回目)を行った場合での、それぞれのA/D変換結果と、多数決回路の出力値(補正出力結果)との関係について、4つの例(例1〜例4)を示している。例1は、下位3ビットにおいて桁上げが発生していない状態でのA/D変換結果である。例2〜例3は、下位3ビットにおいて最上位ビットで桁上げが発生した状態での変換結果である。例4は、下位3ビットにおいて下位2ビット目で桁上げが発生した状態での変換結果を示している。例1〜例4のそれぞれのA/D変換結果では、例として、異常値(丸点線で囲んだ値)が発生したとしている。これらのビット数、サンプリング回数及びサンプリング値は便宜上、図3の特許文献1の説明の場合と同じ値を使用する。   Next, the operation for outputting the correction result output N6 in the majority circuit M4 (FIG. 5) according to the present embodiment will be described. FIG. 6 is a table showing an example of the relationship between the A / D conversion result and the output of the majority circuit according to the present embodiment. Specifically, this figure shows each A / D conversion result when the majority circuit M4 reads the lower 3 bits seven times (sampling; first to seventh times) and the majority circuit. Four examples (Example 1 to Example 4) are shown for the relationship with the output value (corrected output result). Example 1 is an A / D conversion result in a state in which no carry has occurred in the lower 3 bits. Examples 2 to 3 are conversion results in a state where a carry has occurred in the most significant bit in the lower 3 bits. Example 4 shows a conversion result in a state where a carry is generated in the lower 2 bits in the lower 3 bits. In each of the A / D conversion results of Examples 1 to 4, it is assumed that an abnormal value (a value surrounded by a round dotted line) occurs as an example. For the sake of convenience, the same number of bits, the number of sampling times, and the sampling value are used as in the description of Patent Document 1 in FIG.

サンプリング回数が7回の場合、図5の多数決回路M4を構成する判定回路M11とM13には、桁上げ付近であり且つ「桁上げしている」と判定するために、[(サンプリング回数+1)/2]である4回を設定し、判定回路M12とM14には、桁上げ付近であり且つ「桁上げしていない」と判定するために、[(サンプリング回数−1)/2]である3回を設定する。   When the number of times of sampling is 7, the determination circuits M11 and M13 constituting the majority circuit M4 in FIG. 5 have [(sampling number + 1) to determine that they are near the carry and “carry”. / 2] is set to 4 times, and the determination circuits M12 and M14 are set to [(sampling count−1) / 2] in order to determine that the carry is in the vicinity of the carry and “no carry”. Set 3 times.

例1のように4回目の読み込みでノイズ等の異常値“000”が発生した場合、残り全ての変換結果が“011”であれば、下位から3ビット目の“1”出現回数は0回であり、2〜1ビット目の“1”出現回数は6回である。したがって、判定回路M11とM13の設定値「4回」と3〜2ビット目の“1”出現回数とは不一致であり、判定回路M12とM14の設定値「3回」と3〜2ビット目の“1”出現回数とも不一致である。すなわち、一致するビットはなく、判定回路M11〜M14の出力であるデジタル信号N9〜N12は全て“0”となる。その結果、“0”補正回路M15とM17、及び、“1”補正回路M16とM18による補正は行われない。よって、多数決回路M4は、特許文献1の場合と同様に多数決回路の結果として“011”をデジタル信号N6として出力する。   If an abnormal value “000” such as noise occurs in the fourth reading as in Example 1, if all the remaining conversion results are “011”, the number of occurrences of “1” in the third bit from the lower order is 0. The number of occurrences of “1” in the 2nd to 1st bits is 6 times. Therefore, the set value “4 times” of the determination circuits M11 and M13 and the number of occurrences of “1” in the third and second bits do not match, and the set value “three times” of the determination circuits M12 and M14 and the third and second bits. The number of occurrences of “1” does not match. That is, there is no matching bit, and the digital signals N9 to N12 that are the outputs of the determination circuits M11 to M14 are all “0”. As a result, the correction by the “0” correction circuits M15 and M17 and the “1” correction circuits M16 and M18 is not performed. Therefore, the majority circuit M4 outputs “011” as a digital signal N6 as a result of the majority circuit as in the case of Patent Document 1.

例2のように1〜6回目のサンプリングで“011”、“100”がそれぞれ3回出現し、7回目のA/D変換結果としてノイズ等による“000”が出現した場合、全ビットの“1”出現回数は3回となる。このとき、多数決回路M4は、下位から3ビット目は多数決結果である“0”をそのままデジタル信号N8−3として出力する。一方、全ビットの“1”出現回数が3回であり、判定回路M12とM14の設定値「3回」とは一致するので、デジタル信号N9とN11は“1”となる。また、判定回路M11とM13の設定値「4回」とは不一致であるので、デジタル信号N10とN12は“0”となる。そのため、“0”補正回路M15は、下位から2ビット目の多数決結果であるデジタル信号N8−2の入力データ“0”をそのまま出力する。“1”補正回路M16は、それを“1”に補正してデジタル信号N13−2として出力する。同様に、“0”補正回路M17は、下位から1ビット目の多数決結果であるデジタル信号N8−1の入力データ“0”をそのまま出力する。“1”補正回路M18は、それを“1”に補正してデジタル信号N13−1として出力する。   As in Example 2, when “011” and “100” appear three times each in the first to sixth samplings, and “000” due to noise or the like appears as the seventh A / D conversion result, all bits “ 1 "appears 3 times. At this time, the majority circuit M4 outputs “0” as the majority result in the third bit from the lower order as it is as the digital signal N8-3. On the other hand, the number of occurrences of “1” of all bits is 3, and the set values “3 times” of the determination circuits M12 and M14 coincide with each other, so that the digital signals N9 and N11 are “1”. Further, since the set values “4 times” of the determination circuits M11 and M13 do not match, the digital signals N10 and N12 are “0”. Therefore, the “0” correction circuit M15 outputs the input data “0” of the digital signal N8-2 as the majority decision result of the second bit from the lower order as it is. The “1” correction circuit M16 corrects it to “1” and outputs it as a digital signal N13-2. Similarly, the “0” correction circuit M17 outputs the input data “0” of the digital signal N8-1 that is the majority result of the first bit from the lower order. The “1” correction circuit M18 corrects it to “1” and outputs it as a digital signal N13-1.

つまり例2の場合、本実施の形態では、多数決回路M4は、その出力結果として、下位から3ビット目の多数決結果であるデジタル信号N8−3と下位から2ビット目の補正結果出力であるデジタル信号N13−2と下位から1ビット目の補正結果出力であるデジタル信号N13−1の値“011”を補正結果N6として出力する。   That is, in the case of Example 2, in this embodiment, the majority circuit M4 outputs, as its output result, the digital signal N8-3 which is the majority result of the third bit from the lower order and the digital result which is the correction result output of the second bit from the lower order. The signal “N13-2” and the value “011” of the digital signal N13-1 which is the correction result output of the first bit from the lower order are output as the correction result N6.

例3では1〜2回目、4〜7回目のサンプリングで“011”と“100”がそれぞれ3回出現し、3回目のA/D変換結果としてノイズ等による“111”が出現した場合、全ビットの“1”出現回数は4回となる。このとき、多数決回路M4は、下位から3ビット目は多数決結果である“1”をそのままデジタル信号N8−3として出力する。一方、全ビットの“1”出現回数が4回であり、判定回路M12とM14の設定値「3回」とは不一致であるので、デジタル信号N9とN11は“0”となる。また、判定回路M11とM13の設定値「4回」とは一致するので、デジタル信号N10とN12は“1”となる。そのため、“0”補正回路M15は、下位から2ビット目の多数決結果であるデジタル信号N8−2を補正した“0”を出力する。“1”補正回路M16は、“0”補正回路M15により補正された“0”をそのままデジタル信号N13−2として出力する。同様に、0”補正回路M17は、下位から1ビット目の多数決結果であるデジタル信号N8−1を補正した“0”を出力する。“1”補正回路M18は、“0”補正回路M17により補正された“0”をそのままデジタル信号N13−1として出力する。   In Example 3, “011” and “100” appear three times each in the first, second, and fourth to seventh samplings, and “111” due to noise or the like appears as the third A / D conversion result. The number of occurrences of “1” of the bit is 4. At this time, the majority circuit M4 outputs “1” as the majority result in the third bit from the lower order as it is as the digital signal N8-3. On the other hand, the number of occurrences of “1” of all bits is 4, and the set values “3 times” of the determination circuits M12 and M14 do not match, so the digital signals N9 and N11 are “0”. Since the set values “4 times” of the determination circuits M11 and M13 coincide, the digital signals N10 and N12 are “1”. Therefore, the “0” correction circuit M15 outputs “0” obtained by correcting the digital signal N8-2, which is the majority result of the second bit from the lower order. The “1” correction circuit M16 outputs “0” corrected by the “0” correction circuit M15 as it is as the digital signal N13-2. Similarly, the “0” correction circuit M17 outputs “0” obtained by correcting the digital signal N8-1, which is the majority result of the first bit from the lower order, and the “1” correction circuit M18 is output by the “0” correction circuit M17. The corrected “0” is output as it is as the digital signal N13-1.

つまり例3の場合、本実施の形態では、多数決回路M4は、その出力結果として、下位から3ビット目の多数決結果であるデジタル信号N8−3と下位から2ビット目の補正結果出力であるデジタル信号N13−2と下位から1ビット目の補正結果出力であるデジタル信号N13−1の値“100”を補正結果N6として出力する。   That is, in the case of Example 3, in the present embodiment, the majority circuit M4 outputs, as its output result, the digital signal N8-3 that is the majority result of the third bit from the lower order and the digital result that is the correction result output of the second bit from the lower order. The signal N13-2 and the value “100” of the digital signal N13-1 which is the correction result output of the first bit from the lower order are output as the correction result N6.

例4では1〜5回目、7回目のサンプリングで“101”と“110”がそれぞれ3回ずつ出現し、6回目のA/D変換結果としてノイズ等による“000”が出現した場合、下位から2ビット目の“1”出現回数は3回となる。このとき多数決回路M4は、下位から3ビット目はそのまま多数決結果である“1”をデジタル信号N8−3として出力する。一方、判定回路M12の設定値「3回」とは不一致であるので、デジタル信号N9は“0”となる。また、判定回路M14の設定値「3回」とは一致するので、デジタル信号N11は“1”となる。また、判定回路M11とM13の設定値「4回」とは不一致であるので、デジタル信号N10とN12は“0”となる。そのため、“0”補正回路M15は、下位から2ビット目の多数決結果である“0”をデジタル信号N8−2として出力する。“1”補正回路M16では入力データである“0”をそのままデジタル信号N13−2として出力する。しかし、“0”補正回路M17は、下位から1ビット目の多数決結果であるデジタル信号N8−1の入力データ
“0”をそのまま出力するが、“1”補正回路M18は、“1”に補正してデジタル信号N13−1として出力する。
In Example 4, “101” and “110” appear three times each in the first to fifth and seventh samplings, and “000” due to noise or the like appears as the sixth A / D conversion result. The number of occurrences of “1” in the second bit is three. At this time, the majority circuit M4 outputs “1” as the majority result as the digital signal N8-3 for the third bit from the lower order. On the other hand, since the set value “3 times” of the determination circuit M12 does not match, the digital signal N9 becomes “0”. Further, since the set value “3 times” of the determination circuit M14 coincides, the digital signal N11 becomes “1”. Further, since the set values “4 times” of the determination circuits M11 and M13 do not match, the digital signals N10 and N12 are “0”. Therefore, the “0” correction circuit M15 outputs “0”, which is the majority decision result of the second bit from the lower order, as the digital signal N8-2. The “1” correction circuit M16 outputs “0” as input data as it is as a digital signal N13-2. However, the “0” correction circuit M17 outputs the input data “0” of the digital signal N8-1, which is the majority result of the first bit from the lower order, but the “1” correction circuit M18 corrects it to “1”. And output as a digital signal N13-1.

つまり例4の場合、本実施の形態では、多数決回路M4は、その出力結果として、下位から3ビット目の多数決結果であるデジタル信号N8−3と下位から2ビット目の多数決結果出力であるデジタル信号N13−2と下位から1ビット目の補正結果出力であるデジタル信号N13−1の値“101”を補正結果N6として出力する。   That is, in the case of Example 4, in this embodiment, the majority circuit M4 outputs the digital signal N8-3 that is the majority result of the third bit from the lower order and the digital result that is the output of the majority result of the second bit from the lower order. The signal “N13-2” and the value “101” of the digital signal N13-1 which is the correction result output of the first bit from the lower order are output as the correction result N6.

このように、本実施の形態では、サンプリング回数を7回とした場合、判定回路M11とM13には桁上げ付近であり且つ「桁上げしている」と判定するための判定値として4回、判定回路M12とM14には桁上げ付近で且つ「桁上げしていない」と判定するための判定値として3回をそれぞれ設定する。そして、ビット毎の“1”出現回数に応じて下記の補正を行う。
(a)“1”出現回数:0〜2回
多数決回路の結果として“0”をそのままデジタル信号N6へ出力する。
(b)“1”出現回数:3回(判定回路M12とM14の判定値(設定値))
多数決回路の結果として“0”をデジタル信号N6へ出力するが、3回と一致したビットより下位のビットは全て“1”に補正してデジタル信号N6へ出力する。
(c)“1”出現回数:4回(判定回路M11とM13の判定値(設定値))
多数決回路の結果として“1”をデジタル信号N6へ出力するが、4回と一致したビットより下位のビットは全て“0”に補正してデジタル信号N6へ出力する。
(d)“1”出現回数:5〜7回
多数決回路の結果として“1”をそのままデジタル信号N6へ出力する。
As described above, in the present embodiment, when the number of samplings is set to 7, the determination circuits M11 and M13 have four times as determination values for determining that they are near the carry and “carry”. In the determination circuits M12 and M14, three times are set as determination values for determining that “no carry” in the vicinity of the carry. Then, the following correction is performed according to the number of occurrences of “1” for each bit.
(A) Number of occurrences of “1”: 0 to 2 “0” is output as it is to the digital signal N6 as a result of the majority circuit.
(B) Number of times “1” appears: 3 times (determination values (setting values) of the determination circuits M12 and M14)
As a result of the majority circuit, “0” is output to the digital signal N6, but all bits lower than the bit that coincides with the third time are corrected to “1” and output to the digital signal N6.
(C) “1” appearance count: 4 times (determination values (setting values) of the determination circuits M11 and M13)
As a result of the majority circuit, “1” is output to the digital signal N6, but all bits lower than the bit that coincides with the fourth time are corrected to “0” and output to the digital signal N6.
(D) “1” appearance frequency: 5-7 times “1” is output as it is to the digital signal N6 as a result of the majority circuit.

また、サンプリング回数を変更した場合でも、判定回路M11とM13の設定回数は、桁上げ付近であり且つ「桁上げしている」と判定するために[(サンプリング回数+1)/2]とし、判定回路M12とM14の設定回数は、桁上げ付近であり且つ「桁上げしていない」と判定するために[(サンプリング回数−1)/2]とする。それにより、上記(a)〜(d)と同様にすれば、桁上げ発生付近においてA/D変換結果の異常値が発生した場合において、正しい変換結果をデジタル信号N6より出力可能となる。   Even when the number of times of sampling is changed, the set number of times of the determination circuits M11 and M13 is set to [(sampling number + 1) / 2] in order to determine that the carry is in the vicinity of the carry and “carries”. The set number of times of the circuits M12 and M14 is set to [(sampling number-1) / 2] in order to determine that the carry is in the vicinity of the carry and “no carry”. Accordingly, in the same manner as in the above (a) to (d), when an abnormal value of the A / D conversion result occurs in the vicinity of the carry occurrence, the correct conversion result can be output from the digital signal N6.

次に、本発明の実施の形態に係るA/D変換器M0の動作方法(補正方法)について説明する。図7は、本発明の実施の形態に係るA/D変換器M0の動作方法を示すフローチャートである。   Next, an operation method (correction method) of the A / D converter M0 according to the embodiment of the present invention will be described. FIG. 7 is a flowchart showing an operation method of the A / D converter M0 according to the embodiment of the present invention.

(1)ステップS1にて、ユーザーは、A/D変換開始前に各種レジスタ設定として、下位ビットの多数決を行うためのサンプリング回数“X”と、桁上げ付近であり且つ「桁上げしている」と判定するための設定値“Y”として[(サンプリング回数”X+1)/2]と、桁上げ付近で且つ「桁上げしていない」と判定するための設定値“Z”として[(サンプリング回数”X“−1)/2]とをそれぞれ設定する。
(2)ステップS2にて、逐次比較型A/DコンバータM1は、アナログ入力信号N1のA/D変換を開始する。
(3)ステップS3にて、逐次比較型A/DコンバータM1は、最上位ビットから順に1ビットずつアナログ入力値をデジタル値に変換する。
(4)ステップS4にて、逐次比較型A/DコンバータM1は、上位ビットにおける最下位ビットまでデジタル値に変換終了しているか判定する。終了していなければ、NOへ分岐し最下位ビットまでステップS3を繰り返す。最下位ビットまでデジタル値に変換終了後、逐次比較型A/DコンバータM1は、上位ビットのA/D変換結果N2を変換結果レジスタに格納する。そして、YESへ分岐しステップS5へ移行する。例えば、10ビットA/D変換にて上位7ビット、下位3ビットとした場合、上位7ビット分のデジタル値変換が終了するまでステップS3を繰り返す。
(5)ステップS5にて、並列型A/DコンバータM2は、下位ビットについて全ビット並列処理でアナログ入力値をデジタル値に変換する。
(6)ステップS6にて、並列型A/DコンバータM2は、下位ビットのデジタル値への変換が終了しているか判定する。終了していなければ、NOへ分岐し変換終了までステップS5を継続する。デジタル値に変換終了後、YESへ分岐しステップS7へ移行する。
(7)ステップS7にて、並列型A/DコンバータM2は、ステップS5にて実施した下位ビットのA/D変換結果N5であるデジタル値を多数決回路M4へ格納する。
(8)ステップS8にて、並列型A/DコンバータM2は、ステップS1で設定したサンプリング回数“X”から“1”を減算する。
(9)ステップS9にて、並列型A/DコンバータM2は、ステップS8で減算処理されたサンプリング回数“X”が0回であるか判定する。0回でなければ、並列型A/DコンバータM2は、ステップS5から処理を繰り返す。0回であれば、ステップS10へ移行する。
(10)ステップS10にて、多数決回路M4は、下位ビットのA/D変換結果N5の内、最下位ビットを除く全ビットの各々についてステップS7で格納した“1”読み込み回数とステップS1で設定した桁上げ付近であり且つ「桁上げしている」と判定するための設定値“Y”とを比較する。多数決回路M4は、一致していた場合にはステップS11へ移行し、不一致の場合にはステップS12へ移行する。このとき、設定値“Y”は、ステップS1により、判定回路11及び13に予め設定されている。
(11)ステップS11にて、多数決回路M4は、ステップS1で設定した桁上げ付近であり且つ「桁上げしている」と判定するための設定値“Y”と一致していたビットよりも下位ビットは全て“0”補正回路により“0”に多数決結果を補正する。
(12)ステップS12にて、多数決回路M4は、下位ビットのA/D変換結果の内、最下位ビットを除く全ビットの各々についてステップS7で格納した“1”読み込み回数とステップS1で設定した桁上げ付近であり且つ「桁上げしていない」と判定するための設定値“Z”とを比較する。多数決回路M4は、一致していた場合にはステップS13へ移行し、不一致の場合にはステップS10、ステップS11で処理した下位ビットの多数決結果を変換結果レジスタM5に格納し、A/D変換を終了する。このとき、設定値“Z”は、ステップS1により、判定回路12及び14に予め設定されている。
(13)ステップS13にて、多数決回路M4は、ステップS1で設定した桁上げ付近であり且つ「桁上げしていない」と判定するための設定値“Z”と一致していたビットよりも下位ビットは全て“1”補正回路により“1”に多数決結果を補正する。そして、下位ビットの多数決結果を変換結果レジスタM5に格納し、A/D変換を終了する。
つまり本実施の形態では、ステップS10〜S13による補正を行った後の結果を多数決回路M4の結果として出力する。
(1) In step S1, the user sets various registers before starting A / D conversion, and the number of times of sampling “X” for performing the majority decision of the lower bits and “carrying up” is near the carry. [(Sampling count “X + 1) / 2] as a setting value“ Y ”for determination as“ ”and“ (Sampling) as a setting value “Z” for determination as “no carry” near the carry. The number of times “X” −1) / 2] is set.
(2) In step S2, the successive approximation A / D converter M1 starts A / D conversion of the analog input signal N1.
(3) In step S3, the successive approximation A / D converter M1 converts the analog input value into a digital value bit by bit in order from the most significant bit.
(4) In step S4, the successive approximation A / D converter M1 determines whether the conversion to the digital value has been completed up to the least significant bit in the upper bits. If not completed, branch to NO and repeat step S3 up to the least significant bit. After completing the conversion to the digital value up to the least significant bit, the successive approximation A / D converter M1 stores the A / D conversion result N2 of the upper bit in the conversion result register. And it branches to YES and transfers to step S5. For example, if the upper 7 bits and the lower 3 bits are set by 10-bit A / D conversion, step S3 is repeated until the digital value conversion for the upper 7 bits is completed.
(5) In step S5, the parallel A / D converter M2 converts the analog input value into a digital value by the all-bit parallel processing for the lower bits.
(6) In step S6, the parallel A / D converter M2 determines whether or not the conversion of the lower bits into a digital value has been completed. If not completed, the process branches to NO, and step S5 is continued until the conversion is completed. After the conversion to the digital value is completed, the process branches to YES and proceeds to step S7.
(7) In step S7, the parallel A / D converter M2 stores the digital value which is the A / D conversion result N5 of the lower bits implemented in step S5 in the majority circuit M4.
(8) In step S8, the parallel A / D converter M2 subtracts “1” from the number of samplings “X” set in step S1.
(9) In step S9, the parallel A / D converter M2 determines whether or not the number of times of sampling “X” subtracted in step S8 is zero. If it is not zero, the parallel A / D converter M2 repeats the processing from step S5. If it is zero, the process proceeds to step S10.
(10) In step S10, the majority circuit M4 sets the number of “1” reads stored in step S7 and the number of “1” read in step S1 for all bits except the least significant bit in the A / D conversion result N5 of the lower bits. Is compared with the set value “Y” for determining that the carry is in the vicinity of the carry and “carried”. The majority circuit M4 proceeds to step S11 if they match, and proceeds to step S12 if they do not match. At this time, the set value “Y” is set in advance in the determination circuits 11 and 13 in step S1.
(11) In step S11, the majority circuit M4 is lower than the bit that is in the vicinity of the carry set in step S1 and coincides with the set value “Y” for determining “carrying”. All the bits are corrected to “0” by the “0” correction circuit.
(12) In step S12, the majority circuit M4 sets the number of “1” readings stored in step S7 and the number of readings in step S1 for all bits except the least significant bit in the A / D conversion result of the lower bits. The set value “Z” for determining that the carry is in the vicinity and “no carry” is compared. The majority circuit M4 moves to step S13 if they match, and stores the majority result of the lower bits processed in steps S10 and S11 in the conversion result register M5 if they do not match, and performs A / D conversion. finish. At this time, the set value “Z” is preset in the determination circuits 12 and 14 in step S1.
(13) In step S13, the majority circuit M4 is lower than the bit that is near the carry set in step S1 and matches the set value “Z” for determining “no carry”. All the bits are corrected to “1” by the “1” correction circuit. Then, the majority result of the lower bits is stored in the conversion result register M5, and the A / D conversion ends.
That is, in the present embodiment, the result after the correction in steps S10 to S13 is output as the result of the majority circuit M4.

以上のようにして、本発明の実施の形態に係るA/D変換器M0の動作方法(補正方法)が実施される。   As described above, the operation method (correction method) of the A / D converter M0 according to the embodiment of the present invention is performed.

本実施の形態によれば、A/D変換結果を補正するためのビット毎の多数決回路は、最下位ビットを除く全てのビット毎に、サンプリングによるA/D変換結果の“1”出現回数が[(サンプリング回数+1)/2]と一致している場合には桁上げ付近であり且つ「桁上げしている」と判定して“1”を出力する判定回路と、桁上げ付近であり且つ「桁上げしている」と判定する判定回路から出力される判定信号の反転論理と桁上げ付近であり且つ「桁上げしている」と判定したビットより下位ビットの多数決回路の結果のAND論理をとることで桁上げ付近であり且つ「桁上げしている」と判定したビットより下位ビットは多数決回路の結果を“0”に補正する“0”補正回路と、最下位ビットを除く全てのビット毎に、サンプリングによるA/D変換結果の“1”出現回数が[(サンプリング回数−1)/2]と一致している場合には桁上げ付近であり且つ「桁上げしていない」と判定して“1”を出力する判定回路と、桁上げ付近であり且つ「桁上げしていない」と判定する判定回路から出力される判定信号と桁上げ付近であり且つ「桁上げしていない」と判定したビットより下位ビットの多数決回路の結果のOR論理をとることで桁上げ付近であり且つ「桁上げしていない」と判定したビットより下位ビットは多数決回路の結果を“1”に補正する“1”補正回路を備えている。それにより、A/D変換結果が桁上げ付近であるかということと、更に桁上げ付近である場合に桁上げが完了した状態なのか、完了していない状態なのかを検知することが可能となり、従来除去できなかったA/D変換結果の異常値を多数決回路の結果として出力することなく、桁上げ前後のA/D変換結果を多数決回路の結果として出力できる。
すなわち、本実施の形態は、微細化やノイズに伴うアナログ特性のばらつき増加に対して、補正技術を用いることによるA/D変換結果の高精度化ができるという効果を有する。
According to the present embodiment, the majority circuit for each bit for correcting the A / D conversion result has the number of occurrences of “1” of the A / D conversion result by sampling for every bit except the least significant bit. If it matches [(sampling number + 1) / 2], it is near the carry and is judged as “carrying” and outputs “1”, and is near the carry and Inversion logic of the determination signal output from the determination circuit that determines that “carrying” is performed, and AND logic of the result of the majority circuit that is near the carry and that is lower than the bit that is determined to be “carrying” The lower bits from the bit that is near the carry and determined as “carrying” by taking the “0” correction circuit that corrects the result of the majority circuit to “0”, and all except the least significant bit For each bit, sampling When the number of occurrences of “1” in the A / D conversion result matches [(sampling number−1) / 2], it is determined that the carry is near and “no carry” and “1”. And a determination signal output from a determination circuit that determines that the carry is in the vicinity of the carry and is not carried, and a bit that is determined to be in the vicinity of the carry and is determined to be not carry. "1" correction that corrects the result of the majority circuit to "1" for the lower bits than the bit that is near the carry by taking the OR logic of the result of the majority circuit of the lower bit and "no carry" It has a circuit. As a result, it is possible to detect whether the A / D conversion result is near the carry and whether the carry is completed or not when it is near the carry. The A / D conversion result before and after the carry can be output as the result of the majority circuit without outputting the abnormal value of the A / D conversion result that could not be removed conventionally as the result of the majority circuit.
In other words, this embodiment has an effect that the accuracy of the A / D conversion result can be improved by using a correction technique with respect to an increase in variation in analog characteristics due to miniaturization and noise.

本A/D変換器M1は、半導体集積回路やマイクロコンピュータなどに例示される半導体装置(図示されず)に組み込んで使用することが可能である。   The A / D converter M1 can be used by being incorporated in a semiconductor device (not shown) exemplified by a semiconductor integrated circuit and a microcomputer.

本発明は上記各実施の形態に限定されず、本発明の技術思想の範囲内において、各実施の形態は適宜変形又は変更され得ることは明らかである。   The present invention is not limited to the embodiments described above, and it is obvious that the embodiments can be appropriately modified or changed within the scope of the technical idea of the present invention.

M0 A/D変換器
M1 逐次比較型A/Dコンバータ
M2 並列型A/Dコンバータ
M3 下位ビット基準電圧発生回路
M4 多数決回路
M5 変換結果格納レジスタ
M6−1〜M6−3 単ビット多数決回路
M7−1〜M7−3 加算回路
M8−1〜M8−3 レジスタ
M9−1〜M9−3 ビット選択回路
M10−1〜M10−3 フリップフロップ
M11〜M14 判定回路
M15、M17 “0”補正回路
M16、M18 “1”補正回路
N1 アナログ入力信号
N2、N5〜N6、N8−1〜N8−3、N9〜N12、N13−1〜N13−2 デジタル信号
N3 上限基準電圧
N4 下限基準電圧
N7、N14 クロック信号
M0 A / D converter M1 Successive comparison type A / D converter M2 Parallel type A / D converter M3 Lower bit reference voltage generation circuit M4 Majority circuit M5 Conversion result storage register M6-1 to M6-3 Single-bit majority circuit M7-1 To M7-3 adder circuit M8-1 to M8-3 registers M9-1 to M9-3 bit selection circuits M10-1 to M10-3 flip-flops M11 to M14 determination circuits M15 and M17 “0” correction circuits M16 and M18 “ 1 "correction circuit N1 Analog input signal N2, N5 to N6, N8-1 to N8-3, N9 to N12, N13-1 to N13-2 Digital signal N3 Upper reference voltage N4 Lower reference voltage N7, N14 Clock signal

Claims (8)

少なくとも5回以上の奇数回数のサンプリングによりビット毎に行う多数決に基づいてA/D変換結果を補正するA/D変換器であって、
A/D変換結果についてビット毎に行う多数決の結果に基づいて、前記ビット毎の値を決定する多数決回路を具備し、
前記多数決回路は、
最下位ビットを除く全てのビット毎に、サンプリングによるA/D変換結果の“1”出現回数が、予め設定した所定の第1の判定値と一致する場合、桁上げ付近であり且つ桁上げしていると判定する第1判定回路と、
前記桁上げ付近であり且つ桁上げしていると判定されたビットより下位ビットにおける前記A/D変換結果を“0”に補正する第1補正回路と、
前記最下位ビットを除く全てのビット毎に、前記サンプリングによる前記A/D変換結果の“1”出現回数が、予め設定した所定の第2の判定値と一致する場合、桁上げ付近であり且つ桁上げしていないと判定する第2判定回路と、
前記桁上げ付近であり且つ桁上げしていないと判定されたビットより下位ビットにおける前記A/D変換結果を“1”に補正する第2補正回路と
を具備する
A/D変換器。
An A / D converter that corrects an A / D conversion result based on a majority vote performed for each bit by sampling at an odd number of times of at least 5 times,
A majority voting circuit that determines a value for each bit based on a result of majority voting performed for each bit of the A / D conversion result;
The majority circuit is
For every bit except the least significant bit, if the number of occurrences of “1” in the A / D conversion result by sampling coincides with a predetermined first determination value set in advance, it is near the carry and carries A first determination circuit that determines that the
A first correction circuit that corrects the A / D conversion result to “0” in a lower bit than a bit that is near the carry and is determined to carry;
For every bit except the least significant bit, if the number of occurrences of “1” of the A / D conversion result by the sampling matches a predetermined second determination value set in advance, it is near the carry and A second determination circuit for determining that no carry has been performed;
An A / D converter comprising: a second correction circuit that corrects the A / D conversion result to “1” in a lower bit than a bit determined to be near the carry and not carry.
請求項1に記載のA/D変換器において、
前記第1の判定値を[(サンプリング回数+1)/2]とし、前記第2の判定値を[(サンプリング回数−1)/2]とする
A/D変換器。
The A / D converter according to claim 1,
An A / D converter in which the first determination value is [(sampling count + 1) / 2] and the second determination value is [(sampling count−1) / 2].
請求項1に記載のA/D変換器において、
前記第1の判定値を[(サンプリング回数+1)/2]から上位ビット側へ所定の幅を有した値とし、前記第2の判定値を[(サンプリング回数−1)/2]から下位ビット側へ所定の幅を有した値とする
A/D変換器。
The A / D converter according to claim 1,
The first determination value is a value having a predetermined width from [(sampling number + 1) / 2] to the upper bit side, and the second determination value is lower bit from [(sampling number−1) / 2]. A / D converter having a predetermined width on the side.
請求項1に記載のA/D変換器において、
前記多数決回路は、前記A/D変換結果のうちの下位ビットについて、ビット毎に行う多数決の結果に基づいて、前記ビット毎の値を決定する
A/D変換器。
The A / D converter according to claim 1,
The majority circuit determines a value for each bit based on a result of majority vote performed for each bit with respect to lower bits of the A / D conversion result.
アナログ信号を出力するアナログ信号供給回路と、
前記アナログ信号をデジタル信号に変換する請求項1乃至4のいずれか一項に記載のA/D変換器と
を具備する
半導体装置。
An analog signal supply circuit for outputting an analog signal;
A semiconductor device comprising: the A / D converter according to claim 1, which converts the analog signal into a digital signal.
少なくとも5回以上の奇数回数のサンプリングによりビット毎に行う多数決に基づいてA/D変換結果を補正するA/D変換結果の補正方法であって、
最下位ビットを除く全てのビット毎に、サンプリングによるA/D変換結果の“1”出現回数が、予め設定した所定の第1の判定値と一致する場合、桁上げ付近であり且つ桁上げしていると判定するステップと、
前記桁上げ付近であり且つ桁上げしていると判定されたビットより下位ビットにおける前記A/D変換結果を“0”に補正するステップと、
前記最下位ビットを除く全てのビット毎に、前記サンプリングによる前記A/D変換結果の“1”出現回数が、予め設定した所定の第2の判定値と一致する場合、桁上げ付近であり且つ桁上げしていないと判定するステップと、
前記桁上げ付近であり且つ桁上げしていないと判定されたビットより下位ビットにおける前記A/D変換結果を“1”に補正するステップと
を具備する
A/D変換結果の補正方法。
A method for correcting an A / D conversion result for correcting an A / D conversion result based on a majority vote performed for each bit by sampling an odd number of times of at least 5 times,
For every bit except the least significant bit, if the number of occurrences of “1” in the A / D conversion result by sampling coincides with a predetermined first determination value set in advance, it is near the carry and carries A step of determining that
Correcting the A / D conversion result in a lower bit than the bit determined to be near the carry and carry;
For every bit except the least significant bit, if the number of occurrences of “1” of the A / D conversion result by the sampling matches a predetermined second determination value set in advance, it is near the carry and Determining that no carry has been performed;
A method of correcting an A / D conversion result, comprising: correcting the A / D conversion result in a bit lower than a bit determined to be near the carry and not carry.
請求項6に記載のA/D変換結果の補正方法において、
前記第1の判定値を[(サンプリング回数+1)/2]とし、前記第2の判定値を[(サンプリング回数−1)/2]とする
A/D変換結果の補正方法。
The A / D conversion result correction method according to claim 6,
A method for correcting an A / D conversion result, wherein the first determination value is [(sampling number + 1) / 2] and the second determination value is [(sampling number-1) / 2].
請求項6に記載のA/D変換結果の補正方法において、
前記第1の判定値を[(サンプリング回数+1)/2]から上位ビット側へ所定の幅を有した値とし、前記第2の判定値を[(サンプリング回数−1)/2]から下位ビット側へ所定の幅を有した値とする
A/D変換結果の補正方法。
The A / D conversion result correction method according to claim 6,
The first determination value is a value having a predetermined width from [(sampling number + 1) / 2] to the upper bit side, and the second determination value is lower bit from [(sampling number−1) / 2]. A method of correcting an A / D conversion result with a value having a predetermined width on the side.
JP2011091970A 2011-04-18 2011-04-18 A/d converter and method of correcting the same Withdrawn JP2012227642A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2011091970A JP2012227642A (en) 2011-04-18 2011-04-18 A/d converter and method of correcting the same

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2011091970A JP2012227642A (en) 2011-04-18 2011-04-18 A/d converter and method of correcting the same

Publications (1)

Publication Number Publication Date
JP2012227642A true JP2012227642A (en) 2012-11-15

Family

ID=47277382

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2011091970A Withdrawn JP2012227642A (en) 2011-04-18 2011-04-18 A/d converter and method of correcting the same

Country Status (1)

Country Link
JP (1) JP2012227642A (en)

Similar Documents

Publication Publication Date Title
US8988268B2 (en) Analog-digital converter and analog-digital conversion method
JP6230417B2 (en) A / D conversion circuit and semiconductor integrated circuit
JP4932619B2 (en) A / D converter
US9432046B1 (en) Successive approximation analog-to-digital converter
CN107077099A (en) Time-to-digit converter
JP6102279B2 (en) Successive comparison type AD converter and successive approximation type AD conversion method
US8912942B2 (en) Successive-approximation-register analog-to-digital converter (SAR ADC) and method thereof
CN110401443B (en) Metastable state detection elimination circuit of synchronous clock ADC circuit
JP2013191976A (en) Integrated circuit
US20180183420A1 (en) Calculation code generation circuit and digital correction circuit including the same
CN110401444B (en) Metastable state detection elimination circuit of asynchronous clock ADC circuit
JP4526919B2 (en) A / D converter
JP4839139B2 (en) AD / DA conversion combined use device
JP2012227642A (en) A/d converter and method of correcting the same
JP2017079427A (en) Electronic control device
TWI584600B (en) Successive approximation adc and controlling method thereof
US20130002466A1 (en) Folded reference voltage flash adc and method thereof
KR102244196B1 (en) Method for calibrating tolerance of adc module and electronic device thereof
JP2008182508A (en) A/d conversion apparatus
JP6225240B2 (en) Integrated circuit
CN109412598B (en) Successive approximation type analog-to-digital conversion device
US20110204933A1 (en) Electric circuit and signal processing method
JP2005348095A (en) A/d converter and a/d conversion method
JP2012253717A (en) Ad conversion circuit
US20230147156A1 (en) Semiconductor device, analog-to-digital converter and analog-to-digital converting method

Legal Events

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

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20140701