JP2004165726A - Control circuit - Google Patents

Control circuit Download PDF

Info

Publication number
JP2004165726A
JP2004165726A JP2002325793A JP2002325793A JP2004165726A JP 2004165726 A JP2004165726 A JP 2004165726A JP 2002325793 A JP2002325793 A JP 2002325793A JP 2002325793 A JP2002325793 A JP 2002325793A JP 2004165726 A JP2004165726 A JP 2004165726A
Authority
JP
Japan
Prior art keywords
circuit
operational amplifier
terminal
external
output
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Withdrawn
Application number
JP2002325793A
Other languages
Japanese (ja)
Inventor
Osamu Nonaka
修 野中
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.)
Olympus Corp
Original Assignee
Olympus 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 Olympus Corp filed Critical Olympus Corp
Priority to JP2002325793A priority Critical patent/JP2004165726A/en
Priority to US10/702,211 priority patent/US7015849B2/en
Publication of JP2004165726A publication Critical patent/JP2004165726A/en
Withdrawn legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To provide a small-sized low-cost control circuit having high versatility. <P>SOLUTION: A D/A converter 102 capable of switching an output voltage based on a set value held in a register 105, an operational amplifier 109 having two input terminals and one output terminal, and a switch 108 for selectively inputting the output of the D/A converter 102 to one of the two input terminals of the operational amplifier, are formed on the same chip. The input terminal not selected by the switch 108 and the output terminal of the operational amplifier are connectable to an external circuit. <P>COPYRIGHT: (C)2004,JPO

Description

【0001】
【発明の属する技術分野】
本発明は、同一チップ上にアナログ回路が形成されたワンチップマイクロコンピュータなどの制御回路の改良に関する。
【0002】
【従来の技術】
デジタル的な演算を行う演算制御部以外に、例えば、演算増幅器(オペアンプ)などを同一チップ上に設けたアナログ回路搭載の制御回路(マイクロコンピュータ)は様々な分野で広く利用されている。本出願人も、例えば、特許文献1等でカメラ専用のアナログ回路を内蔵したマイクロコンピュータを提案している。
【0003】
また、種々の電気製品や携帯用機器などのコンシューマ向けの商品にもこのようなマイクロコンピュータが採用されている。これにより、ユーザによる操作入力やセンサによる検出結果に基づいた複雑な演算やシーケンスコントロール、更には、表示装置やアクチュエータの制御なども所定のプログラムに従って手軽に行うことができるようになった。
【0004】
最近では、タイマやパルス発生器などに加え、表示装置(例えば、LCD)の制御や、A/D変換回路やD/A変換回路といった周辺回路等もチップ内に効率よく内蔵されているマイクロコンピュータもある。このようなマイクロコンピュータは、全く別の製品でも同様に使用することができるので、量産効果によって低コスト化が進んでいる。例えば、前述したようなカメラに使われているチップは、リモコン用にも家電用にも利用されている。
【0005】
このような流れの中で、半導体製造プロセスの向上による回路の微細化が推進されており、CPUの製造メーカはチップ面積の小型化を達成しつつ、激しいコスト競争を行っている。
【0006】
また、前述のオペアンプの改良に関しては、特許文献2等において、オペアンプの入力部にスイッチ切り替え機能を設けてオフセット補正を行う技術が提案されている。
【0007】
【特許文献1】
特開平11−142722号公報
【0008】
【特許文献2】
特開平6−260851号公報
【0009】
【発明が解決しようとする課題】
前述したような、マイクロコンピュータの製造において重要なことは、同一のマイクロコンピュータをなるべく多くの回路に使用できる汎用性である。1つの品種が1種類の商品にしか採用できないのであれば、マイクロコンピュータの開発費用が全てその商品の原価に上乗せされることになり、低コスト化を妨げることになる。特に周辺回路の選択を誤ると、その周辺回路にかかわる機能が利用できない。つまり、その周辺回路分の面積や端子が無駄になることになり、結果、このような回路は多くのユーザから敬遠されることになる。
【0010】
上記特許文献1においても、アナログ回路部にカメラ専用の回路を数多く含んでいるので、この分、チップ面積が拡大してコストが上がってしまう割には、製品の応用分野が限られてしまう。この結果、量産化によるコストダウンも見込みにくい。
【0011】
また、オペアンプのようなアナログ回路は、基本的な回路であるにもかかわらず、大型化しやすい。つまり、オペアンプは入力端子が2本、出力端子が1本の計3本の端子が必要であり、周辺回路として一般化されることが少なかった。
【0012】
本発明は、上記の事情に鑑みてなされたもので、小型、低コストで汎用性が高い制御回路を提供することを目的とする。
【0013】
【課題を解決するための手段】
上記の目的を達成するために、本発明による制御回路は、レジスタに保持された設定値に基づいて出力電圧を切り替え可能なD/Aコンバータと、2つの入力端子と1つの出力端子を有する演算増幅器と、上記演算増幅器の2つの入力端子のうちの1つの入力端子に上記D/Aコンバータの出力を選択的に入力させる切り替え手段とが同一チップ上に構成され、上記切り替え手段によって選択されなかった入力端子と上記演算増幅器の出力端子とが外部回路と接続可能であることを特徴とする制御回路。
【0014】
また、上記の目的を達成するために、本発明による制御回路は、外部回路と接続するための外部端子と、演算増幅器と、D/Aコンバータと、上記演算増幅器の+側入力端子、上記演算増幅器の−側入力端子、及び上記演算増幅器の出力端子の3つの端子のうち、2つの端子を選択して上記外部端子と接続するように切り替える第1のスイッチと、上記第1のスイッチによって選択されなかった残りの1つの端子を上記D/Aコンバータの出力又は上記選択された端子に接続するように切り替える第2のスイッチとを具備することを特徴とする。
【0015】
また、上記の目的を達成するために、本発明による制御回路は、同一チップ上に演算増幅回路を有する制御回路であって、上記演算増幅回路の出力を外部回路と接続する第1の外部接続端子と、上記演算増幅回路の2つの入力のうち、一の入力を外部回路と接続する第2の外部接続端子と、上記演算増幅回路の他の入力と接続可能な内部回路と、上記演算増幅回路の各々の入力と、上記第2の外部接続端子及び上記内部回路との接続を設定する設定手段と、上記設定手段の設定に応じて上記演算増幅回路の各入力の接続を切り替える切り替え手段とを具備することを特徴とする。
【0016】
更に、上記の目的を達成するために、本発明による制御回路は、同一チップ上に複数の演算増幅回路を有する制御回路であって、上記複数の演算増幅回路の各出力を外部回路とそれぞれ接続する第1の外部接続端子群と、上記複数の演算増幅回路のそれぞれの2つの入力のうち、一の入力を外部回路とそれぞれ接続する第2の外部接続端子群と、上記複数の演算増幅回路の他の入力とそれぞれ接続可能な内部回路と、上記複数の演算増幅回路の各々の入力と、上記第2の外部接続端子及び上記内部回路との接続を独立して設定する設定手段と、上記設定手段の設定に応じて上記複数の演算増幅回路の各入力の接続を切り替える切り替え手段とを具備することを特徴とする。
【0017】
【発明の実施の形態】
以下、本発明の実施の形態を図面を参照して説明する。
[第1の実施の形態]
図1は、本発明の第1の実施の形態に係る制御回路の一例を示す電気回路図である。
マイクロコンピュータ(以下、制御CPUと称する)101は、コアCPU101a、入力/出力(I/O)回路118、内部バス120、及びROM121を含んで構成された集積回路(IC)である。例えば、入力端子119から制御CPU101に信号が入力された場合には、その信号は、I/O回路118、内部バス120を介してコアCPU101aに入力される。コアCPU101aは、入力された信号に基づいてROM121に書き込まれた所定のプログラムに基づいて、所定のシーケンス制御を実行する。
【0018】
以後、制御CPU101と、デジタル/アナログ(D/A)コンバータ102、演算増幅(オペアンプ)回路103等の周辺回路とが1チップ上に構成された回路全体を総称して制御回路(CPU)1と称することにする。
【0019】
本第1の実施の形態に係るCPU1では、内部バス120を介して第1レジスタ104及び第2レジスタ105に保持される値を設定可能である。
まず、第2レジスタ105に設定される値に応じてアナログスイッチ107a〜107dのオン/オフが制御される。また、これらのスイッチ107a〜107dのオン/オフの状態により、抵抗アレイ106の分圧電圧が変化するので、オペアンプ回路103には、スイッチのオン/オフ状態に対応した種々の電圧が供給される。つまり、スイッチ107aがオンされて他のスイッチがオフされた場合には高電圧がオペアンプ回路103に供給され、また、スイッチ107dがオンされて他のスイッチがオフされた場合には、低電圧がオペアンプ回路103に供給される。
【0020】
なお、ここでは、単純化のためにスイッチ107a〜107dの4種類の出力電圧が供給できるように図示しているが、実際には、8〜10ビットの切り替えが可能である。
【0021】
また、第1レジスタ104はアナログスイッチ108、110、124、及び125を切り替え制御するためのものである。図において2つのスイッチからなるスイッチ108のオン/オフを制御することにより、前述のD/Aコンバータ102からの出力をオペアンプ109の−側端子、又は、+側端子の何れかの端子に選択的に入力させる。
【0022】
図2(A)は、スイッチ108の一方の模式図である。つまり、第1レジスタからの制御信号140に応じて、スイッチ108内部の切り替え部108dを切り替えて、端子108aからの信号を端子108b又は端子108cの何れかに選択的に入力させることができる。
【0023】
なお、このスイッチ108は図2(B)のように構成することもできる。つまり、図2(B)はオンとオフとを切り替える切り替え部108e、108fの組合せである。この場合には、制御信号140によって切り替え部108fのオン/オフが制御される。また、制御信号140は、インバータ108gにも入力され、インバータ108gからは制御信号140の反転信号が出力される。これにより、切り替え部108eには、切り替え部108fとは常に反対の信号レベルの信号が入力されることになるので、端子108aからの信号は、端子108b又は108cの何れか一方に選択的に入力される。
【0024】
図1では、オペアンプ109の入力部にスイッチ108を2つ設けている。第1レジスタの設定により図1のスイッチ124、125のスイッチをオフとした状態で、更に、スイッチ110によってオペアンプ109の出力を外部端子123と接続すれば、図3(B)のような回路構成又は図3(C)のような回路構成のオペアンプ回路を選択的に構成することができる。なお、外部端子123は、スイッチ110によって、オペアンプ109と接続させずに、高(H)レベル出力又は低(L)レベル出力に固定可能にもなっている。つまり、スイッチ110は、オペアンプ109の出力端子と外部端子123との接続、オペアンプ109の出力端子の開放、外部端子123の電位レベルをHレベルに固定、及び外部端子123の電位レベルをLレベルに固定、の4種類の切り替えを行う。
【0025】
なお、本実施の形態では、スイッチ110によって外部端子123の電位状態を変更可能な回路構成となっているが、オペアンプ109の出力の電位状態を変更可能なようにスイッチ110を構成してもよい。
【0026】
また、外部端子123をオペアンプ109の出力端子から外し、更に、スイッチ125をオフ、スイッチ124をオンさせる。そして、スイッチ108によって、D/Aコンバータ102からの出力がオペアンプ109の+側に入力するようにすれば、図3(A)のようなバッファ回路が構成できる。
【0027】
また、図1のスイッチ108によってオペアンプ109の+側入力を外部端子122と接続し、−側入力をD/Aコンバータ102から切り離し、更に、スイッチ125をオン、スイッチ110を外部端子123とオペアンプ109の出力と接続すれば、図3(D)のようなオペアンプ回路を構成することもできる。なお、この場合には、スイッチ124をオフにしておく。このような工夫によって、制御CPU101と同一チップ上にオペアンプ109を構成しても、図4に示す3本の外部端子を必要としない。つまり、2本の外部端子122、123だけでも3本の外部端子を持つオペアンプ回路と同様の働きをするので、外部端子122、123だけでもオペアンプ109の持つ特色を最大限に引き出すことが可能である。
【0028】
つまり、ICの面積は、内蔵の回路の規模だけでなく、端子(ピン)数によって決まる部分も大きい。このため、いくら内蔵の回路を小さくしても、端子数が多ければ、IC全体の面積は小さくならない。つまり、ICの端子では、外部の回路と接続するためにワイヤや半田ボール等を利用するが、これらを接続するためのパッド部にも所定の面積が必要になる。このため、端子数が多いとIC全体の面積も大きくなってしまう。
【0029】
本実施の形態では、前述したような工夫によって、数多くの種類のオペアンプ回路が構成できるとともに、外部端子が3本必要な回路でも外部端子2本で構成することができる。結果、パッド部の数を減らすことができるので、ICを小型化、つまり、低コスト化することができる。
【0030】
図5に、前述したオペアンプを2個内蔵した回路の例を示す。なお、この例はカメラに内蔵される回路の例である。
一方のオペアンプ109aは図示しないレジスタの設定に基づいて前述の各スイッチが制御されており、図3(B)の形式となっている。また、もう一方のオペアンプ109bは同様に図示しないレジスタの設定に基づいて、図3(D)の形式となっている。
【0031】
オペアンプ109aの出力はトランジスタ204のベース電位を制御している。また、オペアンプ109aの+側端子はトランジスタ204のコレクタ電位、つまり、モータ203に印加されている電圧をモニタしている。
【0032】
トランジスタ130及びトランジスタ回路201がオンすることにより、トランジスタ202がオンする。これにより電源200からモータ203に電流が流入してモータ203が駆動する。オペアンプ109aはモータ203の電圧をモニタして、モータ203に印加された電圧がD/Aコンバータの出力レベルVになるようにトランジスタ204に流れる電流を制御する。
なお、シャント抵抗205は回路の伝送特性を改善するために設けられている。
【0033】
このような回路構成におけるモータ203を用いてカメラのシャッタ駆動やズームレンズのズーミングなどを行えば、電源電圧によらない、安定した速度でのモータ駆動を行うことができる。これにより、正確な露出やズーム位置制御などが可能となり、美しい写真を撮影することができる。
【0034】
また、オペアンプ109aは、図1のスイッチ110をオフすることによって、出力を開放状態にすることも可能である。更に、スイッチ125をオンし、スイッチ108によってオペアンプ109の−側端子と外部端子122とを接続して、+側端子をD/Aコンバータ102aと接続する。この場合には、外部端子122からはD/Aコンバータ102aで決定された電圧が出力される。
【0035】
つまり、この場合に図5のトランジスタ130をオフ、トランジスタ131をオンさせると、図5のオペアンプ109aの入力端子からD/Aコンバータ102aで決定された電圧が出力され、発光素子(LED)212が抵抗213によって定電流駆動される。これによって、電池の劣化によらず一定の明るさでLED212が発光する。
【0036】
ここで注意を要するのは、オペアンプ109aの−側端子から電圧を出力させている点である。つまり、オペアンプ109aは、あるときは図3(C)の形式で用いて、またあるときは、図3(A)の形式で用いる。このような工夫によって2つの端子しかIC外に出ていなくとも、オペアンプの正電圧制御機能によって2つの素子(ここでは、モータ203とLED212である)の動作を選択的に制御することが可能である。
【0037】
次に、オペアンプ109bについて説明する。オペアンプ109bは前述したように図3(D)のような形式となっている。この図3(D)ではオペアンプ109bがD/Aコンバータ102bから切り離されている。また、オペアンプ109bの2つの端子には、フォトダイオード210が接続されており、フォトダイオード210をゼロバイアスに安定させている。そして、このフォトダイオード210からは、外部から入射した光の明るさに応じた光電流がコンデンサ211の方向に流れる。ここで、Nチャネルオープンドレインのトランジスタ132をオンからオフにすると、所定時間経過後に、コンデンサ211には、フォトダイオード210に入射した光の明るさに応じた電圧VINTOが発生する。この電圧VINTOをアナログ/デジタル(A/D)コンバータ214で検出すれば、被写体の明るさを検出できる。このような方法で検出した被写体の明るさを検出して、制御CPU101において、この被写体の明るさに応じた露出条件を決定すれば、被写体の明るさに応じた適切な露出制御を行うことができる。なお、露出時には、オペアンプ109aを介してモータ203を駆動させて、図示しないシャッタを駆動させる。
【0038】
[第2の実施の形態]
次に本発明に係る制御回路の第2の実施の形態について説明する。図6(A)は、第2の実施の形態の構成を示す電気回路図である。つまり、本第2の実施の形態は、フォトダイオード210を含む前述の被写体明るさを検出する回路(以下、測光回路と称する)の変形例である。
【0039】
つまり、本実施の形態においてはトランジスタ132を除いている。その代わりに、D/Aコンバータ102bとスイッチ108とを用いてスイッチングを行う。これによって、所定の基準電圧Vrefから積分が行われる積分回路が提供できる。つまり、D/Aコンバータ102bがオペアンプ109bから切り離されたとき(つまり、図5においてトランジスタ132がオフされたことに相当する)に積分が開始される。このときの積分電圧、つまり、コンデンサ211の充電電圧をVINTとすると、図6(B)に示すように、VINTは、積分開始後、Vrefから積分時間に比例して増加する。
【0040】
このVINTを別のオペアンプ109cの+側端子に入力させる。また、オペアンプ109cの−側端子は別のD/Aコンバータ102cと接続する。このD/Aコンバータ102cでは、VrefよりもVINTOだけ高い所定電圧を発生させる。これによって積分電圧VINTがVINTOに達したときに図5(C)に示すように、オペアンプ109cの出力が反転する。このときの時間tとD/Aコンバータ102cの設定電圧VINTOとからLED210に入射する光の量、即ち、被写体の明るさを検出することができる。
【0041】
本実施の形態における測光回路では、オペアンプ109cをコンパレータとして利用しており、前述の第1の実施の形態における測光回路よりも高速の応答が可能である。このような高速の測光回路では、ストロボ光のような瞬間的に発光するような光の明るさをも検出することが可能である。
【0042】
以上説明した第1及び第2の実施の形態では、オペアンプから2つの端子のみを外部に取り出す構成としながら、種々の回路に応用可能な汎用性のある制御回路を提供できる。
【0043】
[第3の実施の形態]
次に、本発明の第3の実施の形態として、前述したような制御回路を適用したカメラ全体のシステムの回路構成例を説明する。なお、ここでは、本発明に係る制御回路の構成を、前述のモータ制御回路や測光回路ではなく、電源回路に応用した例について説明する。
【0044】
つまり、本実施の形態では、図7に示すように、CPU1を構成するICと同一チップ内に、更にレギュレータ6を内蔵させている。図3(A)に示す接続形式のバッファ55を介してレギュレータ6からの出力を外部の回路に取り出せるようになっている。また、DC/DCコンバータの出力DCOUTに依存する抵抗アレイ9の分圧電圧は、A/Dコンバータ64に入力されているが、CPU1内に設けられたオペアンプ54aにも入力される。
【0045】
DC/DCコンバータにおいては、CPU1に内蔵されている発信器56から出力される信号によって、トランジスタ10がオン制御して、電池2からの電流をインダクタ3に流入させる。このときインダクタ3で発生した電圧によって、コンデンサ5が充電される。このときのコンデンサ5の充電電圧がDCOUTである。そして、このDCOUTは、抵抗アレイ9において分圧された後、この分圧電圧がA/Dコンバータ64に入力される。このA/Dコンバータ64で検出した値によりCPU1は分圧電圧をモニタしている。
【0046】
しかしながら、常にA/Dコンバータ64の結果をモニタしているだけのプログラムでは十分でない場合もある。つまり、比較的長い時間にわたって高速の制御を行わなければならない場合には、A/Dコンバータの64の結果を取り込むのに要する時間がタイムラグとなってしまい、精密な制御を行うことができなくなってしまう。なお、このような高速の制御を行う必要がある例としては、例えば、フィルムに日付を写しこむ際の写しこみタイミングを制御している場合やズームレンズの位置を検出している場合に、同時にDC/DCコンバータの昇圧もモニタしなければならない場合などがある。
【0047】
そこで、本実施の形態では、オペアンプ54aを所定の電圧DA1、DA2を比較するためのコンパレータとして(以下、コンパレータ54aと称する)用いる。そして、所定レベル内にDCOUTが入っている場合には、このことを判定した判定回路54bが発振OFF回路56aをオフさせて、昇圧DC/DCコンバータの昇圧動作を停止させる。なお、この発振OFF回路56aは、単にDC/DCコンバータへの発振を停止させるだけでなく、発振を停止させたときにトランジスタ10がオンのままとならないように、発振停止時の出力電圧を固定のLレベルとする。
【0048】
このような構成の回路におけるDC/DCコンバータの制御について図8のタイミングチャートを参照して説明する。この制御では、DCOUTが所定レベル内に収まるように制御する。なお、D/Aコンバータ63は、図示しないROMに書き込まれたプログラムに応じてコンパレータ54aに入力する判定電圧を切り替え可能である。これにより、コンパレータ54aの判定電圧は、図8に示す電圧DA1、DA2の2種類が選択可能である。
【0049】
つまり、昇圧時においては高レベル側の電圧DA1を用いる。一方、昇圧停止時には低レベル側の電圧DA2を用いる。判定回路54bは、DCOUTが選択された判定電圧を超えたか否かをコンパレータ54aの出力により判定する。そして、判定電圧をDCOUTが超えたと判定した場合に、判定回路54bは発振OFF回路56aや動作プログラムの切り替え制御を行う。
【0050】
このようにして電池電圧が昇圧された後、レギュレータ6からの出力は、D/Aコンバータ63、A/Dコンバータ64及びLCDドライバ65の基準電圧として供給されるとともに、バッファ55を介してCPU1外部の各回路の定電圧源としても機能する。例えば、レギュレータ6からの出力は、モータ16aの回転を検出するためのフォトインタラプタ回路(図中MTPIと記す)30や表示用のLED80、各種データを記録するEEPROM81などの電源として機能する。
【0051】
また、レギュレータ6出力は、図示しない投光部を投光制御したときの受光素子70に入射した光信号の大きさを検出するAFブロック71を安定させるための電源としても応用できる。
【0052】
なお、図7の回路において、発信器56の出力パルスはストロボ回路17の充電用パルスとしても用いられる。A/Dコンバータ64はストロボ回路17におけるストロボの充電状態もモニタしている。
【0053】
また、D/Aコンバータ63の出力はオペアンプ59にも入力され、モータドライバ16をトランジスタ16bとともに定電圧駆動する。そして、モータドライバ16はモータ16aの速度制御を行う。これは、図5で説明した構成と同様のものである。なお、このモータドライバ用のオペアンプ59は高電圧にも対応できるように、レギュレータ6から電源を供給せずに、DCOUTから電源電圧を直接取り出している。
【0054】
更に、図7の回路において、発信器61から出力されるパルスを日付写し込み用の時計回路60で計測して計時を行う。また、この発信器出力を逓倍器(逓倍CK)62で逓倍してCPU1のメインクロックを発生させている。
【0055】
また、リセット(RESET)回路57は電池2の残量がなくなった場合にCPU1をリセットし、電池が新しく装填されたときにCPU1を正しく再起動させる。
【0056】
次に、図9(A)及び図9(B)を参照して、カメラの動作時におけるオペアンプ回路の制御について説明する。なお、カメラシステム内の各回路の詳細な動作については前述したので、ここでは説明を省略する。
【0057】
まず、図9(A)を参照して図示しないレジスタの設定に対応したオペアンプの制御について説明する。なお、ここでは、オペアンプ回路の制御中にオペアンプ回路の回路構成を変更する必要がない場合、例えば、図5の測光回路など、について説明する。
【0058】
始めに、カメラの図示しない電源スイッチがオンされたか否かが判定される(ステップS1)。電源スイッチがオンされていないと判定した場合には、CPU1は電源スイッチがオンされるまで待機する。一方、電源スイッチがオンされたと判定した場合には、カメラの動作を開始させ、CPU1は内部のレジスタ(図1の第1レジスタ104である)の設定を行う(ステップS2)。このレジスタの設定に基づいて、図1のスイッチ108、110、124、125が切り替えられて所望のオペアンプ回路が構成される。
【0059】
なお、このオペアンプ回路の回路構成の設定は対象とする回路を動作させる前に行えばよく、上記以外のステップで行うようにしてもよい。
【0060】
オペアンプの設定が終了した後、設定したオペアンプ回路を動作させるかを判定する(ステップS3)。設定したオペアンプ回路を動作させると判定した場合には、そのオペアンプ回路の動作制御する(ステップS4)。以上の動作が終了した後、上記ステップS1に戻る。
【0061】
一方、上記ステップS3の判定において、設定したオペアンプ回路を動作させないと判定した場合には、そのまま上記ステップS1に戻る。なお、本フローチャートの制御中に、図示しない電源スイッチがオフされた場合には、本フローチャートの制御を終了させる。
【0062】
次に、図9(B)を参照して、レジスタの設定を変更するとき、例えば、前述した図5のモータ制御回路(以下、回路Aと称する)とLED制御回路(以下、回路Bと称する)とを切り替えのとき、の制御について説明する。
始めに、カメラの図示しない電源スイッチがオンされたか否かが判定される(ステップS11)。電源スイッチがオンされていないと判定した場合には、CPU1は電源スイッチがオンされるまで待機する。一方、電源スイッチがオンされたと判定した場合には、カメラの動作を開始させ、CPU1は内部のレジスタの初期化を行う(ステップS12)。
【0063】
次にCPU1は、内部のオペアンプ回路を回路Aとして動作させるか否かを判定する(ステップS13)。例えば、図5の例では、モータ制御用の回路として用いるか否かを判定する。オペアンプ回路を回路A(モータ制御回路)として動作させると判定した場合には、オペアンプ回路を回路Aの形式、即ち、図3(B)の形式となるようにレジスタの値を設定して(ステップS14)、回路Aの形式としたオペアンプ回路を動作制御する(ステップS15)。
【0064】
一方、ステップS13の判定において、オペアンプ回路を回路Aとして動作させないと判定した場合には、オペアンプ回路を回路B(LED制御回路)として動作させるか否かを判定する(ステップS16)。例えば、図5の例では、LED制御用の回路として用いるか否かを判定する。オペアンプ回路を回路B(LED制御回路)として動作させると判定した場合には、オペアンプ回路を回路Bの形式となるようにレジスタの値を設定して(ステップS17)、回路Bの形式としたオペアンプ回路を動作制御する(ステップS18)。以上の動作が終了した後、上記ステップS11に戻る。
【0065】
一方、上記ステップS16の判定において、回路Bの形式としたオペアンプ回路を動作させないと判定した場合には、そのまま上記ステップS1に戻る。なお、本フローチャートの制御中に、図示しない電源スイッチがオフされた場合には、本フローチャートの制御を終了させる。
【0066】
以上説明したように図7のようなカメラシステムを構成することによって、主要な部品を、CPUを構成するICと同一チップ内に構成することが可能となり、コスト的にもスペース的にもメリットのある製品を提供することが可能となる。なお、図9(A)、図9(B)においては電源スイッチがオンされた後に図示しないタイマを動作させ、所定時間入力信号がない場合には、このフローチャートの制御を終了させるようにしてもよい。
【0067】
以上実施の形態に基づいて本発明を説明したが、本発明は前述した実施の形態に限定されるものではなく、本発明の要旨の範囲内で種々の変形や応用が可能なことは勿論である。
【0068】
例えば、前述のCPUと同一チップ上に構成されたオペアンプによって構成されるコンパレータ等の2本の入出力端子は、CPUのCMOS入力端子や割り込み端子などに切り替えられるようにしてもよい。
【0069】
【発明の効果】
以上詳述したように、本発明によれば、ワンチップマイクロコンピュータを構成するICと同一チップ上に汎用性の高いオペアンプを数多く配置させることにより、小型、低コストで汎用性が高い制御回路を提供することができる。
【0070】
また、オペアンプからの端子数を削減して、IC全体の端子数を減らすことによって、ICを小型化し、IC本体を省スペース化及び低コスト化することができる。
【0071】
更に、極めて単純なアナログ回路を有効に内蔵させたので、汎用性に優れ、量産効果も期待できる。
【図面の簡単な説明】
【図1】本発明の第1の実施の形態に係る制御回路の構成を示す電気回路図である。
【図2】図2(A)は演算増幅器の入力端子への入力を切り替えるためのスイッチの概要図であり、図2(B)は図2(A)のスイッチの変形例を示す図である。
【図3】演算増幅器をスイッチの切り替えによって、種々の回路として利用できることを説明するための概要図である。
【図4】従来の演算増幅器が内蔵されたICチップの例を示す図である。
【図5】演算増幅器を2個内蔵させて構成したカメラのモータ制御回路及び測光回路の構成を示す電気回路図である。
【図6】本発明の第2の実施の形態に係る制御回路の構成を示す電気回路図である。
【図7】本発明の第3の実施の形態に係る制御回路の構成を適用したカメラシステムの電気回路構成を示す電気回路図である。
【図8】本発明の第3の実施の形態におけるDC/DCコンバータ制御時のタイミングチャートである。
【図9】カメラ内のCPUに内蔵されたオペアンプをレジスタの設定に対応させて動作制御するときのフローチャートである。
【符号の説明】
101 ワンチップマイクロコンピュータ(制御CPU)
101a コアCPU
102 デジタル/アナログ(D/A)コンバータ
103 演算増幅(オペアンプ)回路
104 第1レジスタ
105 第2レジスタ
106 抵抗アレイ
107a,107b,107c,107d,108,110,124,125スイッチ
109 演算増幅器(オペアンプ)
118 入出力(I/O)回路
119 入力端子
120 内部バス
121 ROM
122,123 外部端子
[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to an improvement in a control circuit such as a one-chip microcomputer having an analog circuit formed on the same chip.
[0002]
[Prior art]
A control circuit (microcomputer) equipped with an analog circuit provided with, for example, an operational amplifier (op-amp) on the same chip, in addition to an arithmetic control unit that performs digital arithmetic, is widely used in various fields. The present applicant has also proposed a microcomputer having a built-in analog circuit dedicated to a camera, for example, in Patent Document 1.
[0003]
Such microcomputers are also used in consumer products such as various electric products and portable devices. This makes it possible to easily perform complicated calculations and sequence control based on the operation input by the user and the detection result by the sensor, and further control the display device and the actuator according to a predetermined program.
[0004]
Recently, in addition to a timer and a pulse generator, a microcomputer that efficiently controls a display device (for example, an LCD) and peripheral circuits such as an A / D conversion circuit and a D / A conversion circuit are built in the chip. There is also. Since such a microcomputer can be used in a completely different product in the same manner, cost reduction is progressing due to mass production effects. For example, chips used in cameras as described above are used for remote controllers and home appliances.
[0005]
In such a flow, miniaturization of circuits is being promoted by improving semiconductor manufacturing processes, and CPU manufacturers are intensely competing for cost while achieving reduction in chip area.
[0006]
Regarding the improvement of the above-described operational amplifier, Japanese Patent Application Laid-Open No. H11-163873 and the like have proposed a technique of providing a switch switching function in an input section of the operational amplifier to perform offset correction.
[0007]
[Patent Document 1]
JP-A-11-142722
[0008]
[Patent Document 2]
JP-A-6-260851
[0009]
[Problems to be solved by the invention]
What is important in the manufacture of microcomputers, as described above, is the versatility that the same microcomputer can be used for as many circuits as possible. If one kind can be adopted for only one kind of product, the development cost of the microcomputer is all added to the cost of the product, which hinders cost reduction. In particular, if the peripheral circuit is incorrectly selected, the functions related to the peripheral circuit cannot be used. That is, the area and terminals of the peripheral circuits are wasted, and as a result, such circuits are avoided by many users.
[0010]
Also in Patent Document 1, since the analog circuit section includes many circuits dedicated to the camera, the application area of the product is limited, although the chip area is increased and the cost is increased. As a result, cost reduction due to mass production is unlikely.
[0011]
Further, analog circuits such as operational amplifiers are easy to increase in size despite being basic circuits. In other words, an operational amplifier requires two terminals and one output terminal, for a total of three terminals, and is rarely generalized as a peripheral circuit.
[0012]
The present invention has been made in view of the above circumstances, and has as its object to provide a small, low-cost, highly versatile control circuit.
[0013]
[Means for Solving the Problems]
In order to achieve the above object, a control circuit according to the present invention provides a D / A converter capable of switching an output voltage based on a set value held in a register, and an operation having two input terminals and one output terminal. An amplifier and switching means for selectively inputting the output of the D / A converter to one of the two input terminals of the operational amplifier are configured on the same chip, and are not selected by the switching means. A control circuit wherein the input terminal and the output terminal of the operational amplifier are connectable to an external circuit.
[0014]
In order to achieve the above object, a control circuit according to the present invention includes an external terminal for connecting to an external circuit, an operational amplifier, a D / A converter, a + input terminal of the operational amplifier, A first switch that selects two terminals of the three terminals, an input terminal on the negative side of the amplifier and an output terminal of the operational amplifier, and switches to connect to the external terminal; and a first switch that is selected by the first switch. And a second switch for switching the remaining one terminal to be connected to the output of the D / A converter or the selected terminal.
[0015]
In order to achieve the above object, a control circuit according to the present invention is a control circuit having an operational amplifier circuit on the same chip, wherein the first external connection connects an output of the operational amplifier circuit to an external circuit. A second external connection terminal for connecting one of the two inputs of the operational amplifier circuit to an external circuit; an internal circuit connectable to another input of the operational amplifier circuit; Setting means for setting a connection between each input of the circuit, the second external connection terminal and the internal circuit; switching means for switching connection of each input of the operational amplifier circuit according to the setting of the setting means; It is characterized by having.
[0016]
Further, in order to achieve the above object, a control circuit according to the present invention is a control circuit having a plurality of operational amplifier circuits on the same chip, wherein each output of the operational amplifier circuits is connected to an external circuit. A first external connection terminal group, a second external connection terminal group for connecting one of the two inputs of the plurality of operational amplifier circuits to an external circuit, and the plurality of operational amplifier circuits, respectively. An internal circuit connectable to each of the other inputs, an input of each of the plurality of operational amplifier circuits, and setting means for independently setting a connection between the second external connection terminal and the internal circuit; Switching means for switching the connection of each input of the plurality of operational amplifier circuits in accordance with the setting of the setting means.
[0017]
BEST MODE FOR CARRYING OUT THE INVENTION
Hereinafter, embodiments of the present invention will be described with reference to the drawings.
[First Embodiment]
FIG. 1 is an electric circuit diagram showing an example of the control circuit according to the first embodiment of the present invention.
The microcomputer (hereinafter, referred to as a control CPU) 101 is an integrated circuit (IC) including a core CPU 101a, an input / output (I / O) circuit 118, an internal bus 120, and a ROM 121. For example, when a signal is input to the control CPU 101 from the input terminal 119, the signal is input to the core CPU 101a via the I / O circuit 118 and the internal bus 120. The core CPU 101a executes a predetermined sequence control based on a predetermined program written in the ROM 121 based on the input signal.
[0018]
Hereinafter, a control circuit (CPU) 1 and a peripheral circuit such as a digital / analog (D / A) converter 102 and an operational amplifier (operational amplifier) circuit 103 are collectively referred to as a control circuit (CPU) 1. I will call it.
[0019]
In the CPU 1 according to the first embodiment, the values held in the first register 104 and the second register 105 can be set via the internal bus 120.
First, ON / OFF of the analog switches 107a to 107d is controlled according to the value set in the second register 105. Further, the divided voltage of the resistor array 106 changes depending on the on / off state of the switches 107a to 107d, so that various voltages corresponding to the on / off states of the switches are supplied to the operational amplifier circuit 103. . That is, when the switch 107a is turned on and the other switches are turned off, a high voltage is supplied to the operational amplifier circuit 103. When the switch 107d is turned on and the other switches are turned off, a low voltage is supplied. It is supplied to the operational amplifier circuit 103.
[0020]
Here, for the sake of simplicity, it is shown that four types of output voltages of the switches 107a to 107d can be supplied, but in practice, switching of 8 to 10 bits is possible.
[0021]
The first register 104 controls switching of the analog switches 108, 110, 124, and 125. By controlling on / off of a switch 108 composed of two switches in the figure, the output from the D / A converter 102 is selectively supplied to either the negative terminal or the positive terminal of the operational amplifier 109. Input.
[0022]
FIG. 2A is a schematic diagram of one of the switches 108. That is, the switching unit 108d in the switch 108 can be switched according to the control signal 140 from the first register, and the signal from the terminal 108a can be selectively input to either the terminal 108b or the terminal 108c.
[0023]
Note that this switch 108 can also be configured as shown in FIG. That is, FIG. 2B is a combination of the switching units 108e and 108f that switch between on and off. In this case, on / off of the switching unit 108f is controlled by the control signal 140. The control signal 140 is also input to the inverter 108g, and the inverter 108g outputs an inverted signal of the control signal 140. As a result, a signal having a signal level opposite to that of the switching unit 108f is always input to the switching unit 108e, so that the signal from the terminal 108a is selectively input to one of the terminals 108b and 108c. Is done.
[0024]
In FIG. 1, two switches 108 are provided at the input part of the operational amplifier 109. If the output of the operational amplifier 109 is further connected to the external terminal 123 by the switch 110 while the switches 124 and 125 of FIG. 1 are turned off by the setting of the first register, the circuit configuration as shown in FIG. Alternatively, an operational amplifier circuit having a circuit configuration as illustrated in FIG. 3C can be selectively formed. The external terminal 123 can be fixed to a high (H) level output or a low (L) level output by the switch 110 without being connected to the operational amplifier 109. That is, the switch 110 connects the output terminal of the operational amplifier 109 to the external terminal 123, opens the output terminal of the operational amplifier 109, fixes the potential level of the external terminal 123 to H level, and sets the potential level of the external terminal 123 to L level. Fixed, four types of switching are performed.
[0025]
Note that in this embodiment mode, the switch 110 has a circuit configuration in which the potential state of the external terminal 123 can be changed. However, the switch 110 may be configured so that the potential state of the output of the operational amplifier 109 can be changed. .
[0026]
Further, the external terminal 123 is disconnected from the output terminal of the operational amplifier 109, and the switch 125 is turned off and the switch 124 is turned on. When the output from the D / A converter 102 is input to the + side of the operational amplifier 109 by the switch 108, a buffer circuit as shown in FIG.
[0027]
1, the + input of the operational amplifier 109 is connected to the external terminal 122, the-input is disconnected from the D / A converter 102, the switch 125 is turned on, and the switch 110 is connected to the external terminal 123 and the operational amplifier 109. 3D, an operational amplifier circuit as shown in FIG. 3D can be formed. In this case, the switch 124 is turned off. Even if the operational amplifier 109 is configured on the same chip as the control CPU 101 by such a device, the three external terminals shown in FIG. 4 are not required. In other words, since only the two external terminals 122 and 123 perform the same function as the operational amplifier circuit having three external terminals, it is possible to maximize the characteristics of the operational amplifier 109 only with the external terminals 122 and 123. is there.
[0028]
That is, the area of the IC is largely determined not only by the scale of the built-in circuit but also by the number of terminals (pins). Therefore, no matter how small the built-in circuit is, if the number of terminals is large, the area of the entire IC does not decrease. That is, in the terminal of the IC, a wire, a solder ball, or the like is used to connect to an external circuit. However, a predetermined area is also required for a pad portion for connecting these. Therefore, if the number of terminals is large, the area of the entire IC also becomes large.
[0029]
In the present embodiment, many kinds of operational amplifier circuits can be configured by the above-described device, and a circuit that requires three external terminals can be configured with two external terminals. As a result, the number of pads can be reduced, so that the size of the IC can be reduced, that is, the cost can be reduced.
[0030]
FIG. 5 shows an example of a circuit incorporating two operational amplifiers described above. This example is an example of a circuit built in the camera.
The operational amplifier 109a has the above-described switches controlled based on the setting of a register (not shown), and has the format shown in FIG. 3B. The other operational amplifier 109b has a format shown in FIG. 3D based on the setting of a register (not shown).
[0031]
The output of the operational amplifier 109a controls the base potential of the transistor 204. The positive terminal of the operational amplifier 109a monitors the collector potential of the transistor 204, that is, the voltage applied to the motor 203.
[0032]
When the transistor 130 and the transistor circuit 201 are turned on, the transistor 202 is turned on. As a result, current flows from the power supply 200 to the motor 203, and the motor 203 is driven. The operational amplifier 109a monitors the voltage of the motor 203 and determines whether the voltage applied to the motor 203 is equal to the output level V of the D / A converter. M The current flowing through the transistor 204 is controlled so that
The shunt resistor 205 is provided to improve the transmission characteristics of the circuit.
[0033]
If the shutter drive of the camera, zooming of the zoom lens, and the like are performed using the motor 203 having such a circuit configuration, the motor can be driven at a stable speed independent of the power supply voltage. As a result, accurate exposure and zoom position control can be performed, and a beautiful photograph can be taken.
[0034]
The output of the operational amplifier 109a can be opened by turning off the switch 110 in FIG. Further, the switch 125 is turned on, the minus terminal of the operational amplifier 109 is connected to the external terminal 122 by the switch 108, and the plus terminal is connected to the D / A converter 102a. In this case, the voltage determined by the D / A converter 102a is output from the external terminal 122.
[0035]
That is, in this case, when the transistor 130 in FIG. 5 is turned off and the transistor 131 is turned on, the voltage determined by the D / A converter 102a is output from the input terminal of the operational amplifier 109a in FIG. Constant current driving is performed by the resistor 213. Thus, the LED 212 emits light at a constant brightness regardless of the deterioration of the battery.
[0036]
It should be noted here that a voltage is output from the negative terminal of the operational amplifier 109a. That is, the operational amplifier 109a is sometimes used in the format of FIG. 3C, and is sometimes used in the format of FIG. Even if only two terminals are out of the IC by such a contrivance, the operation of the two elements (here, the motor 203 and the LED 212) can be selectively controlled by the positive voltage control function of the operational amplifier. is there.
[0037]
Next, the operational amplifier 109b will be described. The operational amplifier 109b has a format as shown in FIG. In FIG. 3D, the operational amplifier 109b is separated from the D / A converter 102b. A photodiode 210 is connected to two terminals of the operational amplifier 109b, and stabilizes the photodiode 210 at zero bias. Then, from the photodiode 210, a photocurrent corresponding to the brightness of light incident from the outside flows toward the capacitor 211. Here, when the N-channel open-drain transistor 132 is turned off from on, after a predetermined time has elapsed, a voltage V according to the brightness of light incident on the photodiode 210 is applied to the capacitor 211. INTO Occurs. This voltage V INTO Is detected by the analog / digital (A / D) converter 214, the brightness of the subject can be detected. If the brightness of the subject detected by such a method is detected and the control CPU 101 determines an exposure condition according to the brightness of the subject, appropriate exposure control according to the brightness of the subject can be performed. it can. During exposure, the motor 203 is driven via the operational amplifier 109a to drive a shutter (not shown).
[0038]
[Second embodiment]
Next, a second embodiment of the control circuit according to the present invention will be described. FIG. 6A is an electric circuit diagram showing a configuration of the second embodiment. That is, the second embodiment is a modified example of the above-described circuit for detecting the brightness of the subject including the photodiode 210 (hereinafter, referred to as a photometric circuit).
[0039]
That is, the transistor 132 is omitted in this embodiment. Instead, switching is performed using the D / A converter 102b and the switch 108. Thereby, the predetermined reference voltage V ref Can be provided. That is, the integration is started when the D / A converter 102b is disconnected from the operational amplifier 109b (that is, when the transistor 132 is turned off in FIG. 5). The integrated voltage at this time, that is, the charging voltage of the capacitor 211 is V INT Then, as shown in FIG. INT Is V ref Increases in proportion to the integration time.
[0040]
This V INT To the + terminal of another operational amplifier 109c. The negative terminal of the operational amplifier 109c is connected to another D / A converter 102c. In this D / A converter 102c, V ref V than INTO A predetermined voltage that is only higher is generated. Thereby, the integral voltage V INT Is V INTO 5C, the output of the operational amplifier 109c is inverted as shown in FIG. The time t at this time and the set voltage V of the D / A converter 102c INTO Thus, the amount of light incident on the LED 210, that is, the brightness of the subject can be detected.
[0041]
In the photometric circuit according to the present embodiment, the operational amplifier 109c is used as a comparator, and a higher-speed response is possible than the photometric circuit according to the above-described first embodiment. In such a high-speed photometric circuit, it is possible to detect the brightness of light that emits instantaneously, such as strobe light.
[0042]
In the first and second embodiments described above, it is possible to provide a versatile control circuit applicable to various circuits while having only two terminals taken out from the operational amplifier to the outside.
[0043]
[Third Embodiment]
Next, as a third embodiment of the present invention, an example of a circuit configuration of an entire camera system to which the above-described control circuit is applied will be described. Here, an example in which the configuration of the control circuit according to the present invention is applied to a power supply circuit instead of the above-described motor control circuit or photometric circuit will be described.
[0044]
That is, in the present embodiment, as shown in FIG. 7, the regulator 6 is further built in the same chip as the IC constituting the CPU 1. The output from the regulator 6 can be taken out to an external circuit via a buffer 55 of a connection type shown in FIG. Also, the output DC of the DC / DC converter OUT Is input to the A / D converter 64, but is also input to the operational amplifier 54a provided in the CPU 1.
[0045]
In the DC / DC converter, the transistor 10 is turned on by a signal output from the transmitter 56 built in the CPU 1, and the current from the battery 2 flows into the inductor 3. At this time, the capacitor 5 is charged by the voltage generated in the inductor 3. The charging voltage of the capacitor 5 at this time is DC OUT It is. And this DC OUT Is divided by the resistor array 9, and the divided voltage is input to the A / D converter 64. The CPU 1 monitors the divided voltage based on the value detected by the A / D converter 64.
[0046]
However, a program that always monitors the result of the A / D converter 64 may not be sufficient. In other words, when high-speed control must be performed for a relatively long time, the time required to capture the result of the A / D converter 64 becomes a time lag, and precise control cannot be performed. I will. Examples of the need to perform such high-speed control include, for example, when controlling the imprint timing when imprinting a date on a film or detecting the position of a zoom lens at the same time. In some cases, the boosting of the DC / DC converter must be monitored.
[0047]
Therefore, in the present embodiment, the operational amplifier 54a is used as a comparator for comparing the predetermined voltages DA1 and DA2 (hereinafter, referred to as a comparator 54a). And DC within a predetermined level OUT Is included, the determination circuit 54b that determines this turns off the oscillation OFF circuit 56a and stops the boosting operation of the boost DC / DC converter. The oscillation OFF circuit 56a not only stops the oscillation to the DC / DC converter but also fixes the output voltage when the oscillation is stopped so that the transistor 10 does not remain on when the oscillation is stopped. L level.
[0048]
Control of the DC / DC converter in the circuit having such a configuration will be described with reference to the timing chart of FIG. In this control, DC OUT Is controlled to be within a predetermined level. The D / A converter 63 can switch the judgment voltage input to the comparator 54a according to a program written in a ROM (not shown). As a result, as the determination voltage of the comparator 54a, two types of voltages DA1 and DA2 shown in FIG. 8 can be selected.
[0049]
That is, at the time of boosting, the voltage DA1 on the high level side is used. On the other hand, when boosting is stopped, the low-level voltage DA2 is used. The determination circuit 54b has a DC OUT Is determined based on the output of the comparator 54a. Then, the judgment voltage is set to DC OUT When it is determined that the threshold value has been exceeded, the determination circuit 54b performs the switching control of the oscillation OFF circuit 56a and the operation program.
[0050]
After the battery voltage is boosted in this way, the output from the regulator 6 is supplied as a reference voltage for the D / A converter 63, the A / D converter 64, and the LCD driver 65, and is supplied to the outside of the CPU 1 via the buffer 55. Also functions as a constant voltage source for each circuit. For example, the output from the regulator 6 functions as a power source for a photo-interrupter circuit (referred to as MTPI in the figure) 30 for detecting rotation of the motor 16a, an LED 80 for display, and an EEPROM 81 for recording various data.
[0051]
The output of the regulator 6 can also be applied as a power supply for stabilizing the AF block 71 that detects the magnitude of the optical signal incident on the light receiving element 70 when the light emitting unit (not shown) is controlled to emit light.
[0052]
In the circuit of FIG. 7, the output pulse of the transmitter 56 is also used as a charging pulse of the strobe circuit 17. The A / D converter 64 also monitors the state of charge of the strobe in the strobe circuit 17.
[0053]
The output of the D / A converter 63 is also input to the operational amplifier 59, and drives the motor driver 16 with the transistor 16b at a constant voltage. Then, the motor driver 16 controls the speed of the motor 16a. This is similar to the configuration described in FIG. Note that the operational amplifier 59 for the motor driver does not supply power from the regulator 6 but uses a DC OUT Power supply voltage directly from
[0054]
Further, in the circuit of FIG. 7, a pulse output from the transmitter 61 is measured by a clock circuit 60 for imprinting a date to perform time measurement. The output of the transmitter is multiplied by a multiplier (multiplier CK) 62 to generate a main clock of the CPU 1.
[0055]
Further, a reset (RESET) circuit 57 resets the CPU 1 when the remaining amount of the battery 2 is exhausted, and correctly restarts the CPU 1 when a new battery is loaded.
[0056]
Next, control of the operational amplifier circuit during operation of the camera will be described with reference to FIGS. 9A and 9B. Since the detailed operation of each circuit in the camera system has been described above, the description is omitted here.
[0057]
First, the control of the operational amplifier corresponding to the setting of a register (not shown) will be described with reference to FIG. Here, a case where the circuit configuration of the operational amplifier circuit does not need to be changed during control of the operational amplifier circuit, for example, a photometric circuit in FIG. 5 will be described.
[0058]
First, it is determined whether a power switch (not shown) of the camera is turned on (step S1). If it is determined that the power switch is not turned on, the CPU 1 waits until the power switch is turned on. On the other hand, when it is determined that the power switch has been turned on, the operation of the camera is started, and the CPU 1 sets an internal register (the first register 104 in FIG. 1) (step S2). Based on the setting of this register, switches 108, 110, 124, and 125 in FIG. 1 are switched to configure a desired operational amplifier circuit.
[0059]
Note that the setting of the circuit configuration of the operational amplifier circuit may be performed before the target circuit is operated, and may be performed in steps other than the above.
[0060]
After the setting of the operational amplifier is completed, it is determined whether to operate the set operational amplifier circuit (step S3). When it is determined that the set operational amplifier circuit is operated, the operation of the operational amplifier circuit is controlled (step S4). After the above operation is completed, the process returns to step S1.
[0061]
On the other hand, if it is determined in step S3 that the set operational amplifier circuit is not to be operated, the process returns to step S1. If a power switch (not shown) is turned off during the control of this flowchart, the control of this flowchart ends.
[0062]
Next, referring to FIG. 9B, when changing the setting of the register, for example, the motor control circuit (hereinafter, referred to as circuit A) and the LED control circuit (hereinafter, referred to as circuit B) in FIG. ) Will be described.
First, it is determined whether a power switch (not shown) of the camera is turned on (step S11). If it is determined that the power switch is not turned on, the CPU 1 waits until the power switch is turned on. On the other hand, when it is determined that the power switch is turned on, the operation of the camera is started, and the CPU 1 initializes an internal register (step S12).
[0063]
Next, the CPU 1 determines whether or not to operate the internal operational amplifier circuit as the circuit A (step S13). For example, in the example of FIG. 5, it is determined whether or not to use as a motor control circuit. When it is determined that the operational amplifier circuit is operated as the circuit A (motor control circuit), the value of the register is set so that the operational amplifier circuit has the form of the circuit A, that is, the form of FIG. S14) The operation of the operational amplifier circuit in the form of the circuit A is controlled (step S15).
[0064]
On the other hand, if it is determined in step S13 that the operational amplifier circuit does not operate as the circuit A, it is determined whether the operational amplifier circuit operates as the circuit B (LED control circuit) (step S16). For example, in the example of FIG. 5, it is determined whether or not to use as an LED control circuit. If it is determined that the operational amplifier circuit is to be operated as the circuit B (LED control circuit), the value of the register is set so that the operational amplifier circuit is in the circuit B format (step S17). The operation of the circuit is controlled (step S18). After the above operation is completed, the process returns to the step S11.
[0065]
On the other hand, if it is determined in step S16 that the operational amplifier circuit in the form of the circuit B is not operated, the process returns to step S1. If a power switch (not shown) is turned off during the control of this flowchart, the control of this flowchart ends.
[0066]
By configuring the camera system as shown in FIG. 7 as described above, it becomes possible to configure the main components in the same chip as the IC constituting the CPU, which is advantageous in terms of cost and space. It is possible to provide a certain product. In FIGS. 9A and 9B, a timer (not shown) is operated after the power switch is turned on, and if there is no input signal for a predetermined time, the control of this flowchart may be terminated. Good.
[0067]
Although the present invention has been described based on the above embodiments, the present invention is not limited to the above embodiments, and various modifications and applications are possible within the scope of the present invention. is there.
[0068]
For example, two input / output terminals such as a comparator constituted by an operational amplifier formed on the same chip as the CPU may be switched to a CMOS input terminal or an interrupt terminal of the CPU.
[0069]
【The invention's effect】
As described in detail above, according to the present invention, by arranging a large number of versatile operational amplifiers on the same chip as an IC constituting a one-chip microcomputer, a small, low-cost, highly versatile control circuit can be realized. Can be provided.
[0070]
In addition, by reducing the number of terminals from the operational amplifier and reducing the number of terminals of the entire IC, the size of the IC can be reduced, and the space and cost of the IC body can be reduced.
[0071]
Further, since a very simple analog circuit is effectively incorporated, excellent versatility can be expected and a mass production effect can be expected.
[Brief description of the drawings]
FIG. 1 is an electric circuit diagram showing a configuration of a control circuit according to a first embodiment of the present invention.
FIG. 2A is a schematic diagram of a switch for switching an input to an input terminal of an operational amplifier, and FIG. 2B is a diagram illustrating a modification of the switch of FIG. 2A; .
FIG. 3 is a schematic diagram for explaining that an operational amplifier can be used as various circuits by switching a switch.
FIG. 4 is a diagram showing an example of a conventional IC chip having a built-in operational amplifier.
FIG. 5 is an electric circuit diagram showing a configuration of a motor control circuit and a photometry circuit of a camera configured to include two operational amplifiers.
FIG. 6 is an electric circuit diagram showing a configuration of a control circuit according to a second embodiment of the present invention.
FIG. 7 is an electric circuit diagram showing an electric circuit configuration of a camera system to which a control circuit configuration according to a third embodiment of the present invention is applied.
FIG. 8 is a timing chart at the time of DC / DC converter control according to the third embodiment of the present invention.
FIG. 9 is a flowchart for controlling the operation of an operational amplifier incorporated in a CPU in a camera in accordance with register settings.
[Explanation of symbols]
101 One-chip microcomputer (control CPU)
101a core CPU
102 Digital / Analog (D / A) Converter
103 Operational amplification (operational amplifier) circuit
104 First register
105 Second register
106 resistor array
107a, 107b, 107c, 107d, 108, 110, 124, 125 switches
109 Operational Amplifier (Op Amp)
118 input / output (I / O) circuit
119 input terminal
120 internal bus
121 ROM
122, 123 external terminal

Claims (9)

レジスタに保持された設定値に基づいて出力電圧を切り替え可能なD/Aコンバータと、
2つの入力端子と1つの出力端子を有する演算増幅器と、
上記演算増幅器の2つの入力端子のうちの1つの入力端子に上記D/Aコンバータの出力を選択的に入力させる切り替え手段と、
が同一チップ上に構成され、
上記切り替え手段によって選択されなかった入力端子と上記演算増幅器の出力端子とが外部回路と接続可能であることを特徴とする制御回路。
A D / A converter capable of switching an output voltage based on a set value held in a register;
An operational amplifier having two input terminals and one output terminal;
Switching means for selectively inputting the output of the D / A converter to one of two input terminals of the operational amplifier;
Are configured on the same chip,
A control circuit, wherein an input terminal not selected by the switching means and an output terminal of the operational amplifier can be connected to an external circuit.
上記外部回路と接続するための外部端子を有し、
上記演算増幅器が非動作の場合に、上記外部端子の電位状態を低レベル状態、高レベル状態、又は開放状態に切り替えることが可能な第2の切り替え手段が、上記同一チップ上に構成されていることを特徴とする制御回路。
Having an external terminal for connecting to the external circuit,
Second switching means capable of switching the potential state of the external terminal to a low level state, a high level state, or an open state when the operational amplifier is not operating is configured on the same chip. A control circuit, characterized in that:
外部回路と接続するための外部端子と、
演算増幅器と、
D/Aコンバータと、
上記演算増幅器の+側入力端子、上記演算増幅器の−側入力端子、及び上記演算増幅器の出力端子の3つの端子のうち、2つの端子を選択して上記外部端子と接続するように切り替える第1のスイッチと、
上記第1のスイッチによって選択されなかった残りの1つの端子を上記D/Aコンバータの出力又は上記選択された端子に接続するように切り替える第2のスイッチと、
を具備することを特徴とする制御回路。
An external terminal for connecting to an external circuit;
An operational amplifier,
A D / A converter,
A first terminal that selects two terminals out of three terminals of a positive input terminal of the operational amplifier, a negative input terminal of the operational amplifier, and an output terminal of the operational amplifier, and switches the terminal to be connected to the external terminal. Switches and
A second switch for switching the remaining one terminal not selected by the first switch to be connected to the output of the D / A converter or the selected terminal;
A control circuit, comprising:
同一チップ上に演算増幅回路を有する制御回路であって、
上記演算増幅回路の出力を外部回路と接続する第1の外部接続端子と、
上記演算増幅回路の2つの入力のうち、一の入力を外部回路と接続する第2の外部接続端子と、
上記演算増幅回路の他の入力と接続可能な内部回路と、
上記演算増幅回路の各々の入力と、上記第2の外部接続端子及び上記内部回路との接続を設定する設定手段と、
上記設定手段の設定に応じて上記演算増幅回路の各入力の接続を切り替える切り替え手段と、
を具備することを特徴とする制御回路。
A control circuit having an operational amplifier circuit on the same chip,
A first external connection terminal for connecting an output of the operational amplifier circuit to an external circuit,
A second external connection terminal for connecting one of the two inputs of the operational amplifier circuit to an external circuit;
An internal circuit connectable to another input of the operational amplifier circuit,
Setting means for setting the input of each of the operational amplifier circuits, the connection with the second external connection terminal and the internal circuit,
Switching means for switching connection of each input of the operational amplifier circuit according to the setting of the setting means,
A control circuit, comprising:
上記内部回路は定電圧回路を含み、
上記切り替え手段は、上記定電圧回路から上記演算増幅回路に定電圧を供給するように上記定電圧回路と上記演算増幅回路とを接続することを特徴とする請求項4に記載の制御回路。
The internal circuit includes a constant voltage circuit,
5. The control circuit according to claim 4, wherein the switching unit connects the constant voltage circuit and the operational amplifier circuit so as to supply a constant voltage from the constant voltage circuit to the operational amplifier circuit.
上記演算増幅回路の出力の接続状態を、上記第1の外部接続端子と接続された状態、所定電源、接地状態又は開放状態の何れかを含む接続状態と切り替える出力接続切り替え手段を更に具備し、
上記出力接続切り替え手段は、上記設定手段の設定に応じて上記演算増幅回路の出力の接続状態を切り替えることを特徴とする請求項4に記載の制御回路。
Output connection switching means for switching a connection state of an output of the operational amplifier circuit to a connection state including a state connected to the first external connection terminal, a predetermined power supply, a ground state, or an open state;
5. The control circuit according to claim 4, wherein said output connection switching means switches an output connection state of said operational amplifier circuit according to a setting of said setting means.
上記設定手段は、上記演算増幅回路の一の入力を上記第1の外部接続端子に接続し、他の入力を上記定電圧回路に接続するように設定し、
上記切り替え手段は、上記設定手段の設定に応じて上記演算増幅回路の一の入力を択一的に上記第1の外部接続端子に接続するように切り替え、上記他の入力を択一的に上記定電圧回路に接続するように切り替えることを特徴とする請求項4に記載の制御回路。
The setting means sets one input of the operational amplifier circuit to be connected to the first external connection terminal and the other input to be connected to the constant voltage circuit,
The switching means selectively switches one input of the operational amplifier circuit to be connected to the first external connection terminal in accordance with the setting of the setting means, and selectively switches the other input. The control circuit according to claim 4, wherein switching is performed so as to connect to a constant voltage circuit.
上記定電圧回路はD/A変換器を含み、上記設定手段による設定に応じて、出力電圧を変更可能であることを特徴とする請求項4に記載の制御回路。The control circuit according to claim 4, wherein the constant voltage circuit includes a D / A converter, and is capable of changing an output voltage according to the setting by the setting unit. 同一チップ上に複数の演算増幅回路を有する制御回路であって、
上記複数の演算増幅回路の各出力を外部回路とそれぞれ接続する第1の外部接続端子群と、
上記複数の演算増幅回路のそれぞれの2つの入力のうち、一の入力を外部回路とそれぞれ接続する第2の外部接続端子群と、
上記複数の演算増幅回路の他の入力とそれぞれ接続可能な内部回路と、
上記複数の演算増幅回路の各々の入力と、上記第2の外部接続端子及び上記内部回路との接続を独立して設定する設定手段と、
上記設定手段の設定に応じて上記複数の演算増幅回路の各入力の接続を切り替える切り替え手段と、
を具備することを特徴とする制御回路。
A control circuit having a plurality of operational amplifier circuits on the same chip,
A first external connection terminal group for connecting each output of the plurality of operational amplifier circuits to an external circuit,
A second external connection terminal group for connecting one of the two inputs of the plurality of operational amplifier circuits to an external circuit;
An internal circuit connectable to each of the other inputs of the plurality of operational amplifier circuits,
Setting means for independently setting inputs of each of the plurality of operational amplifier circuits and connection with the second external connection terminal and the internal circuit;
Switching means for switching connection of each input of the plurality of operational amplifier circuits according to the setting of the setting means,
A control circuit, comprising:
JP2002325793A 2002-11-08 2002-11-08 Control circuit Withdrawn JP2004165726A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2002325793A JP2004165726A (en) 2002-11-08 2002-11-08 Control circuit
US10/702,211 US7015849B2 (en) 2002-11-08 2003-11-04 Control circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2002325793A JP2004165726A (en) 2002-11-08 2002-11-08 Control circuit

Publications (1)

Publication Number Publication Date
JP2004165726A true JP2004165726A (en) 2004-06-10

Family

ID=32804910

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002325793A Withdrawn JP2004165726A (en) 2002-11-08 2002-11-08 Control circuit

Country Status (1)

Country Link
JP (1) JP2004165726A (en)

Similar Documents

Publication Publication Date Title
JP4717458B2 (en) Voltage generator
JP4704103B2 (en) Constant current driving circuit, electronic device using the same, and light emitting diode driving method
TW201418928A (en) Voltage regulator, semiconductor device, and data processing system
JP2004117380A (en) Camera system, camera, and accessory
JP4015654B2 (en) LED controller for camera flash
JPH11346435A (en) Power supply device
JP4952128B2 (en) Camera module having illuminance sensor function and portable terminal using the same
US20230353868A1 (en) Electronic apparatus and its control method, and accessory and its control method
JP6101419B2 (en) Electronic device, control circuit, and light emitting element control method
JP2004165726A (en) Control circuit
JP2003228314A (en) Power source circuit for display element driving circuit, display element and camera
JP2838761B2 (en) Camera control circuit
US20130021020A1 (en) Power source monitoring device, lens barrel, camera, and power source monitoring method
JP2004072991A (en) Power supply circuit
US7333142B2 (en) Power supply apparatus and actuator control apparatus
JP2007228783A (en) Constant current control device and image recording device
JP2004163375A (en) Light detection circuit
JP2005094219A (en) Image photographing apparatus
JP5029337B2 (en) Power circuit
WO2008072490A1 (en) Solid-state imaging device and electronic apparatus provided with the same
JP2763003B2 (en) Automatic camera
JP3184030B2 (en) Ultrasonic motor drive circuit
JP2004240059A (en) Camera
JP2001290202A (en) Power-supply device
JP2007228784A (en) Constant voltage control unit and image recording device

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: 20060110