JP2005252654A - Semiconductor integrated circuit incorporating a/d converter circuit - Google Patents

Semiconductor integrated circuit incorporating a/d converter circuit Download PDF

Info

Publication number
JP2005252654A
JP2005252654A JP2004060315A JP2004060315A JP2005252654A JP 2005252654 A JP2005252654 A JP 2005252654A JP 2004060315 A JP2004060315 A JP 2004060315A JP 2004060315 A JP2004060315 A JP 2004060315A JP 2005252654 A JP2005252654 A JP 2005252654A
Authority
JP
Japan
Prior art keywords
conversion
signal
cpu
circuit
analog
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
JP2004060315A
Other languages
Japanese (ja)
Inventor
Takashi Ide
崇史 井手
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.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP2004060315A priority Critical patent/JP2005252654A/en
Publication of JP2005252654A publication Critical patent/JP2005252654A/en
Pending legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To solve the problem that, even if there is no change in externally inputted analog values in a semiconductor integrated circuit incorporating an A/D converter circuit and a CPU, upon receipt of a conversion completion notice from the A/D converter circuit when the A/D converter circuit is used, the CPU needs to confirm the A/D conversion result with interrupting main program processes, and further to reconfirm the conversion result after repeating the A/D conversion once. <P>SOLUTION: An A/D converter circuit 2 completes an A/D conversion operation to issue an A/D conversion completion notice (signal 109) to a CPU 6 only when the level of an externally inputted analog signal varies. The circuit 2 may generate a completion notice after verifying that the analog signal level is in a stationary state after its transient state, thus omitting the confirmation operation of the A/D conversion result by the CPU 6 after receiving the completion notice, thus reducing the load of the CPU 6. <P>COPYRIGHT: (C)2005,JPO&NCIPI

Description

本発明は、汎用マイクロコントローラなどの半導体集積回路に関するものである。   The present invention relates to a semiconductor integrated circuit such as a general-purpose microcontroller.

従来、1系統以上のアナログ入力端子を有するA/D変換回路とCPUを内蔵した半導体集積回路において、A/D変換を行う場合、アナログ入力端子から入力されたアナログ信号の信号レベルの変化如何に関わらずA/D変換動作を実行するとともに、A/D変換完了時にはCPUに対してA/D変換の完了を通知していた。また、CPUは完了通知を受けて、メインプログラムの実行を一時中断してA/D変換結果を確認するとともに、もう一度A/D変換動作を実行することでA/D変換結果の精度を高めていた。
特開昭61−123999号公報
Conventionally, when A / D conversion is performed in a semiconductor integrated circuit having an A / D conversion circuit having one or more analog input terminals and a CPU, how the signal level of the analog signal input from the analog input terminal changes. Regardless, the A / D conversion operation is executed, and the completion of the A / D conversion is notified to the CPU when the A / D conversion is completed. Further, upon receiving the completion notification, the CPU suspends the execution of the main program to check the A / D conversion result, and increases the accuracy of the A / D conversion result by executing the A / D conversion operation again. It was.
JP 61-123999 A

上記従来の構成では、A/D変換回路はCPUに対してA/D変換の完了通知を発行するが、この完了通知は、アナログ信号の信号レベルの変化如何に関わらずA/D変換動作を実行し、発行されるため、CPUは完了通知が発行される度にメインプログラムの処理を一時中断してA/D変換結果を確認する必要があり、CPUの負担が増加し,CPUを含めたハードウェア資源を有効に活用できていなかった。   In the above-described conventional configuration, the A / D conversion circuit issues an A / D conversion completion notification to the CPU, and this completion notification performs the A / D conversion operation regardless of the change in the signal level of the analog signal. Since it is executed and issued, it is necessary for the CPU to suspend the processing of the main program and check the A / D conversion result every time a completion notification is issued, which increases the burden on the CPU and includes the CPU. Hardware resources could not be used effectively.

また、A/D変換結果がアナログ信号の信号レベルが安定していない時の変換結果である可能性があるため、CPUは変換完了通知を受けた際に、A/D変換動作をもう一度行わせて変換結果の再確認を行う必要があり、CPUの負担が増加した。   In addition, since the A / D conversion result may be a conversion result when the signal level of the analog signal is not stable, the CPU causes the A / D conversion operation to be performed once again when the conversion completion notification is received. Therefore, it is necessary to reconfirm the conversion result, which increases the burden on the CPU.

また、アナログ信号の信号レベルの変化如何に関わらずA/D変換動作を実行するため、不要な電力消費が発生していた。   In addition, unnecessary power consumption occurs because the A / D conversion operation is executed regardless of the change in the signal level of the analog signal.

また、アナログ入力端子が複数ある場合には、信号レベルに変化のない端子のA/D変換に時間を要するため、信号レベルに変化があるアナログ入力端子のA/D変換動作を開始するまでの遅延時間が長くなるという課題があった。   In addition, when there are a plurality of analog input terminals, it takes time to perform A / D conversion for a terminal whose signal level does not change, and therefore, until the A / D conversion operation for an analog input terminal whose signal level has changed is started. There was a problem that the delay time was long.

本発明の目的は、A/D変換動作時のCPUの負担を軽減できる、またさらには低消費電力化やアナログ入力端子の高速センシングも可能となる半導体集積回路を提供することである。   An object of the present invention is to provide a semiconductor integrated circuit that can reduce the load on the CPU during an A / D conversion operation, and further enables low power consumption and high-speed sensing of an analog input terminal.

本発明の半導体集積回路は、1系統以上のアナログ入力端子を有し、アナログ入力端子から入力されるアナログ信号をA/D変換するA/D変換回路と、CPUとを内蔵した半導体集積回路であって、A/D変換回路は、アナログ入力端子から入力されたアナログ信号の信号レベルの変化を検知する機能を有し、かつアナログ信号の信号レベルの変化を検知している場合にのみA/D変換動作を完了させるとともに、CPUに対してA/D変換の完了を通知する機能を有することを特徴とする。   A semiconductor integrated circuit according to the present invention is a semiconductor integrated circuit having an A / D conversion circuit that has an analog input terminal of one or more systems, A / D converts an analog signal input from the analog input terminal, and a CPU. The A / D conversion circuit has a function of detecting a change in the signal level of the analog signal input from the analog input terminal, and only when the change in the signal level of the analog signal is detected. It has a function of completing the D conversion operation and notifying the CPU of the completion of A / D conversion.

この構成によれば、アナログ信号の信号レベルが変化している場合にのみ、A/D変換の完了をCPUに通知するため、従来のようにアナログ信号の信号レベルの変化如何に関わらずA/D変換動作を実行し、CPUに通知される場合に比べ、CPUの負担を軽減できる。   According to this configuration, since the completion of the A / D conversion is notified to the CPU only when the signal level of the analog signal is changed, the A / D conversion is performed regardless of the change in the signal level of the analog signal as in the related art. Compared with the case where the D conversion operation is executed and notified to the CPU, the burden on the CPU can be reduced.

また、本発明において、A/D変換回路は、アナログ信号の信号レベルの変化を検知している場合に、1度目のA/D変換動作を完了させた後に、アナログ信号に対して2度目のA/D変換動作を行い、かつ1度目と2度目のA/D変換結果に差分がないときに、CPUに対してA/D変換の完了を通知することが好ましい。   In the present invention, when the A / D conversion circuit detects a change in the signal level of the analog signal, the A / D conversion circuit completes the first A / D conversion operation and then performs the second time on the analog signal. It is preferable to notify the CPU of the completion of A / D conversion when an A / D conversion operation is performed and there is no difference between the first and second A / D conversion results.

これにより、1度目と2度目のA/D変換結果に差分がない、すなわちアナログ信号の信号レベルが安定した後でA/D変換の完了を通知する。したがって、A/D変換動作が完了した場合に、その時のアナログ信号の信号レベルが過渡状態を過ぎて定常状態にあることを確認してからA/D変換の完了を通知することにより、完了通知受理後のCPUのA/D変換結果の確認動作を省略し、CPUの負担を軽減できる。   As a result, there is no difference between the first and second A / D conversion results, that is, the completion of the A / D conversion is notified after the signal level of the analog signal is stabilized. Accordingly, when the A / D conversion operation is completed, it is confirmed that the signal level of the analog signal at that time has passed the transient state and is in a steady state, and then the completion of A / D conversion is notified. The operation of checking the A / D conversion result of the CPU after acceptance can be omitted, and the burden on the CPU can be reduced.

また、本発明において、A/D変換回路は、アナログ信号の信号レベルの変化を検知していない場合に、A/D変換動作を中断することが好ましい。   In the present invention, it is preferable that the A / D conversion circuit interrupts the A / D conversion operation when a change in the signal level of the analog signal is not detected.

これにより、低消費電力化を実現できる。   Thereby, low power consumption can be realized.

また、本発明において、A/D変換回路は、アナログ信号の信号レベルの変化を検知していない場合に、A/D変換動作を中断し、同一または別のアナログ入力端子から入力されるアナログ信号に対してA/D変換動作を開始することが好ましい。   In the present invention, the A / D conversion circuit interrupts the A / D conversion operation when no change in the signal level of the analog signal is detected, and the analog signal input from the same or another analog input terminal It is preferable to start the A / D conversion operation.

このように、A/D変換動作を中断するとともに、同一または別のアナログ入力端子のアナログ信号をA/D変換することで、高速なアナログ入力端子のセンシングを実現できる。   In this way, high-speed sensing of analog input terminals can be realized by interrupting the A / D conversion operation and A / D converting analog signals of the same or different analog input terminals.

以上のように本発明によれば、A/D変換動作を適切に処理することで、CPUの負担軽減、低消費電力化、アナログ入力端子の高速センシングを実現することができる。   As described above, according to the present invention, by appropriately processing the A / D conversion operation, it is possible to reduce the burden on the CPU, reduce power consumption, and realize high-speed sensing of analog input terminals.

以下、本発明の実施の形態について図面を用いて説明する。   Hereinafter, embodiments of the present invention will be described with reference to the drawings.

図1は、本発明の実施の形態の半導体集積回路の構成を示すブロック図である。図1において、1は半導体集積回路、2はA/D変換回路、6はCPUであり、A/D変換回路2とCPU6は半導体集積回路1に内蔵されている。   FIG. 1 is a block diagram showing a configuration of a semiconductor integrated circuit according to an embodiment of the present invention. In FIG. 1, 1 is a semiconductor integrated circuit, 2 is an A / D conversion circuit, and 6 is a CPU. The A / D conversion circuit 2 and the CPU 6 are built in the semiconductor integrated circuit 1.

3はアナログ入力端子T101、T102から入力されるアナログ信号101、102のいずれかを選択して選択したアナログ信号をアナログ信号104として出力するアナログ入力選択回路、4は入力されるアナログ信号104のA/D変換を行い、デジタル変換結果105を出力するA/D変換処理回路である。5は入力されたデジタル変換結果105を格納し、かつ変換動作制御信号106によりA/D変換処理回路4のA/D変換動作を制御し、かつ入力端子切替信号107によりアナログ入力選択回路3に対してアナログ信号101、102のどちらをA/D変換処理回路4に入力するかを選択させ、かつA/D変換完了時にCPU6に対してA/D変換完了信号109を出力するA/D変換制御回路である。   Reference numeral 3 denotes an analog input selection circuit that selects an analog signal 101 selected from the analog input terminals T101 and T102 and outputs the selected analog signal as an analog signal 104. Reference numeral 4 denotes an A of the input analog signal 104. This is an A / D conversion processing circuit that performs / D conversion and outputs a digital conversion result 105. 5 stores the input digital conversion result 105, controls the A / D conversion operation of the A / D conversion processing circuit 4 by the conversion operation control signal 106, and supplies the analog input selection circuit 3 by the input terminal switching signal 107. On the other hand, the A / D conversion that selects which of the analog signals 101 and 102 is input to the A / D conversion processing circuit 4 and outputs the A / D conversion completion signal 109 to the CPU 6 when the A / D conversion is completed. It is a control circuit.

CPU6はA/D変換制御回路5に対して、A/D変換の開始を制御するためのA/D変換開始信号108と、A/D変換に使用する変換用クロック111を出力する。また、CPU6は内部バス110を介して、A/D変換制御回路5からA/D変換結果を取得する。7、8はアナログ信号101、102に付加された抵抗であり、この抵抗7、8の一端は基準電圧20に接続されている。   The CPU 6 outputs to the A / D conversion control circuit 5 an A / D conversion start signal 108 for controlling the start of A / D conversion and a conversion clock 111 used for A / D conversion. Further, the CPU 6 acquires an A / D conversion result from the A / D conversion control circuit 5 via the internal bus 110. Reference numerals 7 and 8 denote resistors added to the analog signals 101 and 102, and one ends of the resistors 7 and 8 are connected to the reference voltage 20.

図2は、図1におけるA/D変換制御回路5の構成図である。   FIG. 2 is a configuration diagram of the A / D conversion control circuit 5 in FIG.

図2において、13はデジタル変換結果105を変換用クロック111をトリガとして取り込むA/D変換結果格納レジスタで、変換用クロック111が入力されると1ビットずつ右にシフトしていくものとする。16はA/D変換完了時にA/D変換結果格納レジスタ13の値を格納するためのメモリレジスタ、15はA/D変換開始時にメモリレジスタ16の値を格納するとともに変換用クロック111によってビットがシフトするバッファレジスタである。   In FIG. 2, reference numeral 13 denotes an A / D conversion result storage register that takes in the digital conversion result 105 as a trigger for the conversion clock 111. When the conversion clock 111 is input, it is shifted to the right bit by bit. Reference numeral 16 denotes a memory register for storing the value of the A / D conversion result storage register 13 when A / D conversion is completed. Reference numeral 15 denotes a value for storing the value of the memory register 16 at the start of A / D conversion. A buffer register to shift.

図3はバッファレジスタ15の動作を表したフローであり、変換用クロック111が入力されるとバッファレジスタ15の各ビットは1ビットずつ右にシフトしている。なお、最上位ビットであるB9のシフト先はB0であるものとする。14はA/D変換結果格納レジスタ13とバッファレジスタ15のビット比較を行う比較回路である。   FIG. 3 is a flowchart showing the operation of the buffer register 15. When the conversion clock 111 is input, each bit of the buffer register 15 is shifted to the right by one bit. It is assumed that the shift destination of B9 which is the most significant bit is B0. Reference numeral 14 denotes a comparison circuit that performs bit comparison between the A / D conversion result storage register 13 and the buffer register 15.

9はA/D変換完了ビット数カウンタであり、A/D変換が完了したビット数をカウントする機能を有する。10、11、12はA/D変換完了ビット数カウンタ9に内蔵されており、11はA/D変換動作を中断させて変換結果の途中比較を行うビット数を定義するための比較用レジスタ、12はA/D変換されたビット数をカウントするカウント用レジスタ、10は比較用レジスタ11とカウント用レジスタ12の値を比較する比較回路であり、前述の比較結果が一致した場合には一致信号114を出力し、カウント用レジスタ12のカウント値がA/D変換結果格納レジスタ13に格納できるビット数と同一になった場合に変換完了信号115を出力する。ここでは、A/D変換結果格納レジスタ13、バッファレジスタ15、メモリレジスタ16はそれぞれ10ビットであるものとし、カウント用レジスタ12のカウント値が10進法で「10」になった場合に変換完了信号115が出力されるものとする。   Reference numeral 9 denotes an A / D conversion completion bit number counter, which has a function of counting the number of bits for which A / D conversion is completed. Reference numerals 10, 11, and 12 are incorporated in the A / D conversion completion bit number counter 9, and 11 is a comparison register for defining the number of bits for interrupting the A / D conversion operation and performing halfway comparison of conversion results, Reference numeral 12 denotes a count register for counting the number of bits subjected to A / D conversion. Reference numeral 10 denotes a comparison circuit for comparing the values of the comparison register 11 and the count register 12. If the comparison results match, a match signal is obtained. 114 is output, and when the count value of the register for counting 12 becomes equal to the number of bits that can be stored in the A / D conversion result storage register 13, the conversion completion signal 115 is output. Here, it is assumed that the A / D conversion result storage register 13, the buffer register 15, and the memory register 16 each have 10 bits, and the conversion is completed when the count value of the counting register 12 becomes “10” in decimal. Assume that signal 115 is output.

17はA/D変換制御回路5におけるコントロール回路であり、変換結果比較回路14に対して比較開始信号119の出力を行い、比較一致信号118を受け取る。また、信号線117を介してメモリレジスタ16に、信号線120を介してA/D変換結果格納レジスタ13にアクセスすることができ、A/D変換完了時にはA/D変換結果格納レジスタ13のデータをメモリレジスタ16にコピーする。18、19はコントロール回路17に内蔵されており、18はアナログ入力端子から入力されるアナログ信号の信号レベルに変化があった場合にセットされるアナログ信号変化検出フラグである。19は低消費モード設定フラグであり、A/D変換制御回路5の動作モードを設定するものである。なお、アナログ信号変化検出フラグ18は、比較一致信号118がネゲートされるとセットされる。また、アナログ信号101、102のそれぞれにアナログ信号変化検出フラグ18は搭載されている。また、低消費モードの設定は、LSIを動作させるタイミングで決定し、低消費モード設定フラグ19の設定は、内部バス110を介して、CPU6が行う。   A control circuit 17 in the A / D conversion control circuit 5 outputs a comparison start signal 119 to the conversion result comparison circuit 14 and receives a comparison coincidence signal 118. Further, the memory register 16 can be accessed via the signal line 117, and the A / D conversion result storage register 13 can be accessed via the signal line 120. When the A / D conversion is completed, the data in the A / D conversion result storage register 13 can be accessed. Is copied to the memory register 16. Reference numerals 18 and 19 are built in the control circuit 17, and 18 is an analog signal change detection flag that is set when there is a change in the signal level of the analog signal input from the analog input terminal. Reference numeral 19 denotes a low consumption mode setting flag, which sets the operation mode of the A / D conversion control circuit 5. The analog signal change detection flag 18 is set when the comparison coincidence signal 118 is negated. The analog signal change detection flag 18 is mounted on each of the analog signals 101 and 102. The setting of the low consumption mode is determined at the timing of operating the LSI, and the setting of the low consumption mode setting flag 19 is performed by the CPU 6 via the internal bus 110.

以下、本実施の形態の半導体集積回路の動作を、図4の制御フロー図に基づいて説明する。   Hereinafter, the operation of the semiconductor integrated circuit according to the present embodiment will be described with reference to the control flowchart of FIG.

A/D変換回路2は、半導体集積回路1の電源をオフ(S0)からオンに立上げることでスタンバイ状態に遷移する(S1)。   The A / D conversion circuit 2 transitions to a standby state by raising the power supply of the semiconductor integrated circuit 1 from off (S0) to on (S1).

A/D変換回路2を使用する場合、CPU6は最初に内部バス110を介して比較用レジスタ11にA/D変換を一時中断するビット数を入力する(S2)。ここでは、10進数における「3」を設定する。   When the A / D conversion circuit 2 is used, the CPU 6 first inputs the number of bits for temporarily interrupting the A / D conversion to the comparison register 11 via the internal bus 110 (S2). Here, “3” in decimal is set.

次に、CPU6はA/D変換回路5に対して変換用クロック111を供給するとともに、A/D変換開始信号108を出力する。これにより、コントロール回路17はアナログ入力選択回路3に対して入力端子切替信号107を出力してアナログ信号を選択するとともに、A/D変換処理回路4に対して変換動作制御信号106を出力してA/D変換処理回路4にA/D変換動作を開始させる(S3)。ここでは、アナログ信号101が選択されるものとする。また、A/D変換開始信号108の出力を受けて、メモリレジスタ16の値はバッファレジスタ15にコピーされる(S4)。   Next, the CPU 6 supplies a conversion clock 111 to the A / D conversion circuit 5 and outputs an A / D conversion start signal 108. As a result, the control circuit 17 outputs an input terminal switching signal 107 to the analog input selection circuit 3 to select an analog signal, and outputs a conversion operation control signal 106 to the A / D conversion processing circuit 4. The A / D conversion processing circuit 4 is caused to start an A / D conversion operation (S3). Here, it is assumed that the analog signal 101 is selected. In response to the output of the A / D conversion start signal 108, the value of the memory register 16 is copied to the buffer register 15 (S4).

A/D変換処理回路4から出力されるデジタル変換結果105は、A/D変換結果格納レジスタ13に入力されるが、比較用レジスタ11に設定した「3」と一致する3ビットの変換が完了した時点で比較回路10から一致信号114が出力される。   The digital conversion result 105 output from the A / D conversion processing circuit 4 is input to the A / D conversion result storage register 13, but the 3-bit conversion that matches “3” set in the comparison register 11 is completed. At that time, the coincidence signal 114 is output from the comparison circuit 10.

図5は3ビットのA/D変換動作が完了した時のA/D変換結果格納レジスタ13とバッファレジスタ15の状態を表している。A/D変換結果格納レジスタ13のA9、A8、A7はA/D変換処理回路4から出力されたデジタル変換結果であり、一致信号114を受けたコントロール回路17は変換結果比較回路14に比較開始信号119を出力して比較動作を開始させる(S5)。この時に比較されるのは図5のA9とB9、A8とB8、A7とB7であり、これらのビットの値が全て一致した場合には比較一致信号118を出力する。ここで、比較一致信号118が出力されない場合は、外部からのアナログ信号101が変化していることを表しているので、比較一致信号118が出力されるまでA/D変換を繰り返す(S11〜)。   FIG. 5 shows the states of the A / D conversion result storage register 13 and the buffer register 15 when the 3-bit A / D conversion operation is completed. A9, A8, and A7 of the A / D conversion result storage register 13 are digital conversion results output from the A / D conversion processing circuit 4, and the control circuit 17 that receives the coincidence signal 114 starts comparison with the conversion result comparison circuit 14. The signal 119 is output to start the comparison operation (S5). At this time, A9 and B9, A8 and B8, and A7 and B7 in FIG. 5 are compared. When these bits all match, a comparison match signal 118 is output. Here, when the comparison coincidence signal 118 is not output, it indicates that the analog signal 101 from the outside has changed, and thus A / D conversion is repeated until the comparison coincidence signal 118 is output (S11 to S11). .

コントロール回路17は、比較一致信号118を入力し(前述のビット比較結果が一致し)、かつアナログ信号変化検出フラグ18がセットされていない時には、アナログ信号101の信号レベルに変化がないものと判断し、アナログ信号変化検出フラグ18がセットされている時には、アナログ信号101の信号レベルに変化があるものと判断する。   The control circuit 17 receives the comparison coincidence signal 118 (the above bit comparison result coincides) and determines that the signal level of the analog signal 101 does not change when the analog signal change detection flag 18 is not set. When the analog signal change detection flag 18 is set, it is determined that the signal level of the analog signal 101 has changed.

アナログ信号101の信号レベルに変化がない場合には、低消費モード設定フラグ19の設定値によって低消費モードか否かを判断し(S21)、低消費モードであれば、残りの7ビットのA/D変換動作が完了するまでの時間をカウント用レジスタ12でカウントし、変換完了信号115が出力されるまでの間、A/D変換処理回路4を停止させることで低消費電力化を実現する(S22)。低消費モードでない場合には、カウント用レジスタ12をクリアする(S23)とともに、入力端子切替信号107を発生させて、選択されるアナログ信号104を101から102に切り替える(S24)ことで、高速にアナログ入力端子をセンシングすることが可能となる。また、低消費モードの場合も、変換完了信号115が出力されると、カウント用レジスタ12をクリアする(S23)とともに、入力端子切替信号107を発生させて、選択されるアナログ信号104を101から102に切り替える(S24)ことで、高速にアナログ入力端子をセンシングすることが可能となる。S24の後は、切り替えられたアナログ信号102対しS3からのA/D変換処理が行われることになる。   If there is no change in the signal level of the analog signal 101, it is determined whether or not the low consumption mode is set based on the set value of the low consumption mode setting flag 19 (S21). The time until the / D conversion operation is completed is counted by the counting register 12, and the A / D conversion processing circuit 4 is stopped until the conversion completion signal 115 is output, thereby realizing low power consumption. (S22). When not in the low power consumption mode, the count register 12 is cleared (S23), and the input terminal switching signal 107 is generated to switch the selected analog signal 104 from 101 to 102 (S24), thereby enabling high-speed operation. It is possible to sense the analog input terminal. Also in the low power consumption mode, when the conversion completion signal 115 is output, the count register 12 is cleared (S23), and the input terminal switching signal 107 is generated to select the selected analog signal 104 from 101. By switching to 102 (S24), it becomes possible to sense the analog input terminal at high speed. After S24, A / D conversion processing from S3 is performed on the switched analog signal 102.

また、アナログ信号101の信号レベルに変化がある場合には、残りの7ビットのA/D変換動作を行い(S31)、変換が完了して比較回路10から変換完了信号115が出力されると、A/D変換格納レジスタ13とメモリレジスタ16の全ビットの比較を行う(S32)。このS32での比較も変換結果比較回路14が行う。この比較結果が一致すると、A/D変換完了信号109が出力される(S35)と同時に、アナログ信号変化検出フラグ18はクリアされ(S33)、A/D変換結果格納レジスタ13のデータをメモリレジスタ16にコピーする(S34)。なお、S3,S4,S5,S31,S32→S3のループは、S5で上位3ビットが安定した後に、下位ビットが安定するまでウェイトしている状態を表している。   If the signal level of the analog signal 101 is changed, the remaining 7-bit A / D conversion operation is performed (S31). When the conversion is completed and the conversion completion signal 115 is output from the comparison circuit 10. Then, all the bits of the A / D conversion storage register 13 and the memory register 16 are compared (S32). The conversion result comparison circuit 14 also performs the comparison in S32. If the comparison results match, an A / D conversion completion signal 109 is output (S35), and at the same time, the analog signal change detection flag 18 is cleared (S33), and the data in the A / D conversion result storage register 13 is stored in the memory register. 16 (S34). Note that the loop of S3, S4, S5, S31, S32 → S3 represents a state in which the upper three bits are stabilized in S5 and then waits until the lower bits are stabilized.

図6は、アナログ信号101の変化とA/D変換完了信号109とアナログ信号変化検出フラグ18の関係を表したものである。アナログ信号が変化している遷移状態の時に、アナログ信号変化検出フラグ18がセットされ、定常状態になった後のA/D変換時にA/D変換格納レジスタ13とメモリレジスタ16のデータが一致(図6中の2回目の一致)することでA/D変換完了信号109が出力されると同時に、アナログ信号変化検出フラグ18はクリアされ、A/D変換結果格納レジスタ13のデータをメモリレジスタ16にコピーする。なお、図6中の1変換時間は、A/D変換を行う基本時間を表し、図6では均等な時間のように示されているが、入力されるアナログに変化がある場合とない場合でその時間は異なる。   FIG. 6 shows the relationship between the change in the analog signal 101, the A / D conversion completion signal 109, and the analog signal change detection flag 18. In the transition state in which the analog signal is changing, the analog signal change detection flag 18 is set, and the data in the A / D conversion storage register 13 and the memory register 16 match at the time of A / D conversion after the steady state is reached ( At the same time when the A / D conversion completion signal 109 is output, the analog signal change detection flag 18 is cleared, and the data in the A / D conversion result storage register 13 is stored in the memory register 16. Copy to. Note that one conversion time in FIG. 6 represents a basic time for performing A / D conversion, and is shown as an equivalent time in FIG. 6, but there are cases where there is a change in the input analog and there is no change. The time is different.

以上のように本実施の形態によれば、A/D変換回路2は、外部から入力されA/D変換対象のアナログ信号の信号レベルに変化がある場合にのみ、A/D変換動作を完了するとともに、CPU6に対してA/D変換の完了通知(A/D変換完了信号109)を発行する。さらに、A/D変換動作を完了した場合に、その時のアナログ信号の信号レベルが過渡状態を過ぎて定常状態にあることを確認してから完了通知を発生させることにより、完了通知受理後のCPU6のA/D変換結果の確認動作を省略させる。これによりCPU6の負担を軽減できる。   As described above, according to the present embodiment, the A / D conversion circuit 2 completes the A / D conversion operation only when there is a change in the signal level of the analog signal input from the outside and subject to A / D conversion. At the same time, an A / D conversion completion notification (A / D conversion completion signal 109) is issued to the CPU 6. Further, when the A / D conversion operation is completed, it is confirmed that the signal level of the analog signal at that time passes the transient state and is in a steady state, and then a completion notification is generated, whereby the CPU 6 after the completion notification is received. The confirmation operation of the A / D conversion result is omitted. As a result, the burden on the CPU 6 can be reduced.

また、アナログ信号の信号レベルに変化がない場合に、A/D変換動作を中断するとともに、同一または別のアナログ入力端子のアナログ信号のA/D変換を開始することで、高速なアナログ入力端子のセンシングを実現できる。ここで、同一または別のアナログ入力端子のアナログ信号のA/D変換を開始させない場合には、A/D変換動作を中断することで低消費電力化を実現できる。なお、実際のセットでは、アナログ入力端子が単一端子、複数端子のいずれの場合でも、A/D変換は常に実施され、変換が完了したらまた変換するという動作をとるようにされる。   In addition, when there is no change in the signal level of the analog signal, the A / D conversion operation is interrupted, and the A / D conversion of the analog signal at the same or different analog input terminal is started, so that a high-speed analog input terminal Can be realized. Here, when A / D conversion of analog signals at the same or different analog input terminals is not started, power consumption can be reduced by interrupting the A / D conversion operation. In an actual set, A / D conversion is always performed regardless of whether the analog input terminal is a single terminal or a plurality of terminals, and when the conversion is completed, the conversion is performed again.

本発明にかかる半導体集積回路は、アナログ入力信号をA/D変換する際のCPUの負担を軽減でき、汎用マイクロコントローラ等として有用である。   The semiconductor integrated circuit according to the present invention can reduce the load on the CPU when A / D converting an analog input signal, and is useful as a general-purpose microcontroller or the like.

本発明の実施の形態における半導体集積回路の概略構成図Schematic configuration diagram of a semiconductor integrated circuit in an embodiment of the present invention 本発明の実施の形態におけるA/D変換制御回路の概略構成図Schematic configuration diagram of an A / D conversion control circuit in an embodiment of the present invention 本発明の実施の形態におけるバッファレジスタの動作を示す図The figure which shows the operation | movement of the buffer register in embodiment of this invention 本発明の実施の形態における制御フロー図Control flow diagram in the embodiment of the present invention 本発明の実施の形態におけるA/D変換結果格納レジスタ、バッファレジスタおよび変換結果比較回路の動作を説明するための図The figure for demonstrating operation | movement of the A / D conversion result storage register | resistor in the embodiment of this invention, a buffer register, and a conversion result comparison circuit 本発明の実施の形態におけるタイムチャートTime chart in the embodiment of the present invention

符号の説明Explanation of symbols

1 半導体集積回路
2 A/D変換回路
3 アナログ入力選択回路
4 A/D変換処理回路
5 A/D変換制御回路
6 CPU(中央演算装置)
7 抵抗
8 抵抗
9 A/D変換完了ビット数カウンタ
10 比較回路
11 比較用レジスタ
12 カウント用レジスタ
13 A/D変換結果格納レジスタ
14 変換結果比較回路
15 バッファレジスタ
16 メモリレジスタ
17 コントロール回路
18 アナログ信号変化検出フラグ
19 低消費モード設定フラグ
101 アナログ信号
102 アナログ信号
104 アナログ信号
105 デジタル変換結果
106 変換動作制御信号
107 入力端子切替信号
108 A/D変換開始信号
109 A/D変換完了信号
110 内部バス
111 変換用クロック
112 カウント値
113 カウント値
114 一致信号
115 変換完了信号
116 カウンタリセット信号
117 信号線
118 比較一致信号
119 比較開始信号
120 信号線
DESCRIPTION OF SYMBOLS 1 Semiconductor integrated circuit 2 A / D conversion circuit 3 Analog input selection circuit 4 A / D conversion processing circuit 5 A / D conversion control circuit 6 CPU (central processing unit)
7 Resistance 8 Resistance 9 A / D conversion completion bit number counter 10 Comparison circuit 11 Comparison register 12 Count register 13 A / D conversion result storage register 14 Conversion result comparison circuit 15 Buffer register 16 Memory register 17 Control circuit 18 Analog signal change Detection flag 19 Low consumption mode setting flag 101 Analog signal 102 Analog signal 104 Analog signal 105 Digital conversion result 106 Conversion operation control signal 107 Input terminal switching signal 108 A / D conversion start signal 109 A / D conversion completion signal 110 Internal bus 111 Conversion Clock 112 Count value 113 Count value 114 Match signal 115 Conversion completion signal 116 Counter reset signal 117 Signal line 118 Comparison match signal 119 Comparison start signal 120 Signal line

Claims (4)

1系統以上のアナログ入力端子を有し、前記アナログ入力端子から入力されるアナログ信号をA/D変換するA/D変換回路と、CPUとを内蔵した半導体集積回路であって、
前記A/D変換回路は、前記アナログ入力端子から入力されたアナログ信号の信号レベルの変化を検知する機能を有し、かつ前記アナログ信号の信号レベルの変化を検知している場合にのみA/D変換動作を完了させるとともに、前記CPUに対してA/D変換の完了を通知する機能を有することを特徴とする半導体集積回路。
A semiconductor integrated circuit having an analog input terminal of one or more systems, an A / D conversion circuit for A / D converting an analog signal input from the analog input terminal, and a CPU;
The A / D conversion circuit has a function of detecting a change in the signal level of the analog signal input from the analog input terminal, and only when the change in the signal level of the analog signal is detected. A semiconductor integrated circuit having a function of completing a D conversion operation and notifying the CPU of the completion of A / D conversion.
前記A/D変換回路は、前記アナログ信号の信号レベルの変化を検知している場合に、1度目のA/D変換動作を完了させた後に、前記アナログ信号に対して2度目のA/D変換動作を行い、かつ1度目と2度目のA/D変換結果に差分がないときに、前記CPUに対してA/D変換の完了を通知する請求項1に記載の半導体集積回路。   When the A / D conversion circuit detects a change in the signal level of the analog signal, the A / D conversion circuit completes the first A / D conversion operation and then performs the second A / D on the analog signal. 2. The semiconductor integrated circuit according to claim 1, wherein a conversion operation is performed, and when there is no difference between the first and second A / D conversion results, completion of A / D conversion is notified to the CPU. 前記A/D変換回路は、前記アナログ信号の信号レベルの変化を検知していない場合に、A/D変換動作を中断する請求項1または2に記載の半導体集積回路。   The semiconductor integrated circuit according to claim 1, wherein the A / D conversion circuit interrupts the A / D conversion operation when a change in the signal level of the analog signal is not detected. 前記A/D変換回路は、前記アナログ信号の信号レベルの変化を検知していない場合に、A/D変換動作を中断し、同一または別のアナログ入力端子から入力されるアナログ信号に対してA/D変換動作を開始する請求項1または2に記載の半導体集積回路。   The A / D conversion circuit interrupts the A / D conversion operation when no change in the signal level of the analog signal is detected, and the analog signal input from the same or another analog input terminal is The semiconductor integrated circuit according to claim 1, wherein the / D conversion operation is started.
JP2004060315A 2004-03-04 2004-03-04 Semiconductor integrated circuit incorporating a/d converter circuit Pending JP2005252654A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2004060315A JP2005252654A (en) 2004-03-04 2004-03-04 Semiconductor integrated circuit incorporating a/d converter circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2004060315A JP2005252654A (en) 2004-03-04 2004-03-04 Semiconductor integrated circuit incorporating a/d converter circuit

Publications (1)

Publication Number Publication Date
JP2005252654A true JP2005252654A (en) 2005-09-15

Family

ID=35032729

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004060315A Pending JP2005252654A (en) 2004-03-04 2004-03-04 Semiconductor integrated circuit incorporating a/d converter circuit

Country Status (1)

Country Link
JP (1) JP2005252654A (en)

Similar Documents

Publication Publication Date Title
US5572719A (en) Clock control system for microprocessors including a delay sensing circuit
JP4750564B2 (en) Reset signal generation circuit
JP4027874B2 (en) Clock change circuit
KR101408201B1 (en) Digital low-dropout regulator using fast current tracking scheme
JP2009282927A (en) Fpga configuration device, circuit board therewith, electronic device, and fpga configuration method
TW201813319A (en) Time-based delay line analog comparator
TW201810957A (en) Time-based delay line analog-to-digital converter with variable resolution
JP5130904B2 (en) Electronic circuit device and control method of electronic circuit device
JP4699927B2 (en) Input / output shared terminal control circuit
JP2005252654A (en) Semiconductor integrated circuit incorporating a/d converter circuit
JP2010268139A (en) A/d converter
JP2001251188A (en) A/d converter and chopper comparator
JP2007193431A (en) Bus controller
JP4908056B2 (en) Semiconductor device and test execution method for semiconductor device
JP2000105604A (en) Method for making output interval constant at constant scan setting of programmable controller
JP2002202829A (en) Microcomputer
JP2010192590A (en) Multiple power supply system, semiconductor integrated circuit, and power control circuit
JP2009140130A (en) Data processor, and method for controlling the same
JP7139823B2 (en) Seismic sensor and sensor control method
TWI655577B (en) Operation speed compensation circuit and compensation method thereof
JP2018195243A (en) Semiconductor device and semiconductor device control method
JP3388484B2 (en) Timing generator with malfunction / misconfiguration detection function
JP2004343291A (en) Phase adjusting circuit
JP2005071203A (en) Microprocessor
JP3595309B2 (en) Address generation circuit

Legal Events

Date Code Title Description
RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20060607