JP2608589C - - Google Patents

Info

Publication number
JP2608589C
JP2608589C JP2608589C JP 2608589 C JP2608589 C JP 2608589C JP 2608589 C JP2608589 C JP 2608589C
Authority
JP
Japan
Prior art keywords
subroutine
camera
communication
mode
external device
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.)
Expired - Lifetime
Application number
Other languages
Japanese (ja)
Publication date

Links

Description

【発明の詳細な説明】 〔産業上の利用分野〕 この発明はマイクロコンピュータを内蔵し、同じくマイクロコンピュータを有
する外部装置と接続され、外部装置との通信により種々の動作を制御するカメラ
に関する。 〔従来の技術〕 このようなカメラとしては、同一出願人による特願昭61−311697号、特願昭62
−158551号に記載の全自動カメラがある。 特願昭61−311697号に記載の全自動カメラでは、外部装置に種々のプログラム
を内蔵しておいて、外部装置をカメラに接続した時、外部装置からカメラに所望
のプログラムを転送しCPUのRAMを書換え、このプログラムを実行させる。これに
より、カメラのCPUには内蔵されていなかった機能を外部装置により実現可能と
なり、カメラの機能が拡大する。 特願昭62−158551号に記載の全自動カメラでは、外部装置がカメラ内部のCPU
のサブルーチンをアクセスできる構成になっている。こ れにより、外部装置が所望のサブルーチンを組合わせて実行することにより、カ
メラに所望の動作を実行させることができる。 〔発明が解決しようとする課題〕 しかしながら、上述した2つの全自動カメラでは、外部装置との通信のサブル
ーチンがカメラのメインルーチンの中にプログラムされていた。すなわち、外部
装置との通信サブルーチンが一度実行されると、メインルーチンの他の処理が終
わってからでないと、外部装置との通信サブルーチンを再び実行することができ
なかった。 このため、上述した2つの全自動カメラでは、複数のサブルーチンを連続して
実行し1つの機能を実現することは不可能であった。そのため、サブルーチンの
組合せにより実現できる機能が限定されている。 また、特願昭61−311697号に記載の全自動カメラにおいては、カメラのメイン
ルーチンで使用されるRAMを使用するサブルーチンは実行できず、外部装置から
カメラに自由にプログラムを転送することはできなかった。 この発明は上述した事情に対処すべくなされたもので、その目的は外部装置か
らの指令によりカメラと外部通信とを連続通信し、カメラに内蔵のマイクロコン
ピュータのサブルーチンを所望の順番で組合せて連続して実行できるカメラを提
供することである。 〔課題を解決するための手段及び作用〕 上記課題を解決し目的を達成するために、本発明は以下に示す手段を用いてい
る。 (1)本発明のカメラは、外部装置と接続可能であると共に、カメラの種々の動
作機能を実行するサブルーチンを有するマイクロコンピュータを具備するカメラ
において、マイクロコンピュータは、更に、外部装置からの通信によって、少な
くともマイクロコンピュータ内の任意のメモリ内容の読み書き、および任意のサ
ブルーチンを実行するための通信サブルーチンを有し、外部装置によって連続通
信モードに設定されると通信サブルーチンを実行し、前記任意のメモリ内容の読
書き、または前記任意のサブルーチンを実行し、前記任意のメモリ内容の読み書
き、または前記任意のサブルーチンの実行終了後、再び前記通信サブルーチンを
実行することにより連続的な通信状態を維持する ことにより、この通信状態の下
で任意のメモリ内容の読み書き、または任意のサブルーチンを実行する。 (2)本発明のカメラは、外部装置と接続可能であると共に、カメラの種々の動
作機能を実行するサブルーチンを有するマイクロコンピュータを具備するカメラ
において、 前記マイクロコンピュータは、更に、前記外部装置からの通信によって、少なく
とも前記マイクロコンピュータ内の任意のメモリ内容の読み書き、および任意の
サブルーチンを実行するための通信サブルーチンを有し、 前記外部装置によって連続通信モードに設定されると前記通信サブルーチンを繰
り返し実行することにより、前記通信サブルーチンによる連続的な通信状態を維
持し、 この通信状態の下で前記任意のメモリ内容の読み書き、または前記任意のサブル
ーチンを実行する カメラであって、かつ連続通信モード解除信号が供給されると
通信サブルーチンを終了する。 (3)本発明のカメラは、外部装置と接続可能であると共に、カメラの種々の動
作機能を実行するサブルーチンを有するマイクロコンピュータを具備するカメラ
において、 前記マイクロコンピュータは、更に、前記外部装置からの通信によって、少なく
とも前記マイクロコンピュータ内の任意のメモリ内容の読み書き、および任意の
サブルーチンを実行するための通信サブルーチンを有し、 前記外部装置によって連続通信モードに設定されると前記通信サブルーチンを繰
り返し実行することにより、前記通信サブルーチンによる連続的な通信状態を維
持し、 この通信状態の下で前記任意のメモリ内容の読み書き、または前記任 意のサブルーチンを実行する カメラであって、かつ外部装置と接続可能なチェッ
ク端子を有すると共に、このチェック端子に2値レベルのいずれか一方のレベル
信号が印加されている場合は通信サブルーチンを繰り返し実行し、チェック端子
に他方のレベル信号が印加されると通信サブルーチンを終了する。 (4)本発明のカメラは、外部装置と接続可能であると共に、カメラの種々の動
作機能を実行するサブルーチンを有するマイクロコンピュータを具備するカメラ
において、 前記マイクロコンピュータは、更に、前記外部装置からの通信によって、少なく
とも前記マイクロコンピュータ内の任意のメモリ内容の読み書き、および任意の
サブルーチンを実行するための通信サブルーチンを有し、 前記外部装置によって連続通信モードに設定されると前記通信サブルーチンを繰
り返し実行することにより、前記通信サブルーチンによる連続的な通信状態を維
持し、 この通信状態の下で前記任意のメモリ内容の読み書き、または前記任意のサブル
ーチンを実行する カメラであって、かつ通信サブルーチンの下で外部装置の調整
データ検出用プログラムに従って求められた調整データを書き換え可能な記憶部
に書込むための書込み手段と、この記憶部に書込まれた調整データに基づいて各
カメラ機能を調整する手段とをさらに具備する。 (5)本発明のカメラは、上記(4)に記載したカメラであって、かつ書込み手
段はバッテリチェック電圧を記憶部に書込む手段を具備し、調整手段は記憶部に
書込まれたデータとカメラの電源電圧の検出値とを比較するバッテリチェック手
段を具備する。 (6)本発明のカメラは、上記(4)に記載したカメラであって、かつ書込み手
段はAF調整データを記憶部に書込む手段を具備し、調整手段は記憶部に書込まれ
たデータと測距データとに基づいて撮影レンズの目標駆動位置を決定する。 〔実施例〕 以下、図面を参照してこの発明によるカメラの一実施例を説明する。 第1図は一実施例の概略を示すブロック図である。1チップマイクロコンピュ
ータからなるCPU10を有するカメラ1に外部装置2が着脱自在に接続される。CPU
10はカメラ1の種々の動作を制御するプログラムをサブルーチンとして有する。
カメラ1は外部(EXT)端子3を有し、このEXT端子3を介してカメラ1と外部装
置2とが接続される。これにより、カメラCPU10と外部装置CPU4とが通信可能と
なる。 外部装置2はCPU4以外に、操作スイッチ5と表示部6を有する。外部装置2と
しては出荷前のカメラの調整機器や特殊な撮影を可能とするオプションのアダプ
タ機器等が考えられる。 第2図にカメラCPU10と外部装置2との接続を示す。カメラCPU10のCHECK1端子
は通常は“H”レベルであり、外部装置2はカメラと通信を行なう前にCHECK1端
子を“L”レベルにする。このため、CPU10はCHECK1端子のレベルを検出すること
により、外部装置2が通信要求を出したかどうか判定できる。 通信のためのクロックCLKはカメラ1から発生され、外部装置2はこのクロッ
クCLKに同期して、データラインDATAを介して通信内容(コード化データ)をCPU
10に送信する。このデータラインDATAは双方向のシリアル通信ラインである。 カメラ1の詳細を第3図に示す。CPU10はカメラ全体の動作を制御し、基本ク
ロックは発振回路20より供給され、リセット回路22からのリセットにより動作開
始される。リセット回路22は電池挿入時、及びパワースイッチ(図示せず)のオ
ン/オフ動作時に動作する。 E2−PROM24は駒数、カメラ状態データ(巻上げ中、巻戻し中等)、異常データ(
故障箇所)、調整データ(シャッタ制御補正データ、オートフォーカス補正デー
タ、バッテリチェックデータ等の各カメラ毎のデータ)を記憶している不揮発性
メモリである。このため、交換のために電池が一旦抜かれても、これらのデータ
は有効である。また、 E2−PROM24へのデータ書込み中はリセット回路22のリセット動作は禁止されてい
る。 E2−PROM24を読出しモードにすると、まずDXコードがDX端子26から入力され、
シリアルライン28を介してCPU10に入力される。つづいて、E2−PROM24のデータ
がCPU10に転送される。 AFセンサ(AFIC)30は、例えば位相差方式のセンサであり、距離データをCPU1
0に供給する。CPU10は測光値が一定値以下の暗い場合には、AFIC30の動作に合せ
て補助光源32を点灯する。 E2−PROM24、EXT端子3、AFIC30はCPU10の入出力ポートを有効利用するために
、同一のシリアルライン28に接続され、CPU10とデータのやりとりをシリアル通
信で行なう。 操作スイッチ群34はカメラの種々の操作スイッチからなり、レリーズスイッチ
、モード切換えスイッチ等からなる。LED群36はファインダ内のLEDであり、スト
ロボ発光予告、合焦表示等のLEDからなる。LCD38はカメラの表面のLCDであり、
駒数、カメラモード等を表示する。 インターフェース(IFIC)40はモータドライバ50や測光ユニット42との信号の
伝授、LCD38への電源の供給、ストロボ64に対するチャージ、及びバッテリチェ
ック等を行なう。なお、第3図では電源は図示を省略している。また、インター
フェース40はCPU10からの命令によりシャッタモータ(Ms)44、巻上げモータ(M
w)46、ズームモータ(Mz)48を選択するデコード機能等も持ったインタフェー
スである。なお、デコード機能は測光ユニット42での平均測光とスポット測光と
の切換えも含む。これらのモータ44,46,48はインターフェース40のデコード信号
によりモータドライバ50を介して駆動される。 シャッタモータ44は正転時にオートフォーカスのためのレンズ駆動、逆転時に
シャッタ駆動する。ここでは、シャッタはレンズシャッタが採用されているとす
る。 オートフォーカシングの際、CPU10はAFIC30で求めた距離データ とE2−PROM24の調整データを演算して求めた目標位置までモータ44を正転し、フ
ォーカシングレンズを駆動する。ここで、フォーカシングレンズのリセット位置
はスイッチ(AFs)52のオン状態で確認され、レンズ位置は、フォーカシングレ
ンズの単位移動量当り1パルス発生されるフォトインタラプタ(PIs)54のパル
ス数で確認される。 すなわち、CPU10はフォトインタラプタ(PIs)54の出力を参照してモータ44の
正転、ブレーキ、オフの制御を行ない、目標位置にフォーカシングレンズを停止
させる。 シャッタ制御時のモータ44のリセット位置はスイッチ(AEs)56のオン状態で
確認され、E2−PROM24の調整データによりデューティ駆動の比率を変化させるこ
とにより一定開口波形が保たれるように制御される。 巻上げモータ46は正転時にフィルム巻上げを、逆転時にフィルム巻戻しを行な
う。フィルムの一駒巻上げ制御はフォトインタラプタ(PIw)58のパルス数をカ
ウントすることにより行われる。 フォトインタラプタ54,58はそれぞれシャッタモータ44、巻上げモータ46が選
択された時のみオンとなり、フォトインタラプタ54,58の出力はIFIC40を介して
ディジタル的にノイズを除去してCPU10に入力される。これは、フォトインタラ
プタ54,58の出力を直接CPU10に入力すると、ノイズによりカウント値に誤差が生
じることがあるからである。 ズームモータ(Mz)48はレンズをズーミングし、ズーム位置はズームエンコー
ダ60により知ることができる。 デートモジュール62は日付、時刻等のデータをフィルムに写し込むものである
。ストロボ64もCPU10に接続される。 次にこの実施例の動作を説明する。先ず、第4図乃至第23図を参照してカメラ
側のCPU10の動作を説明し、次いで、第24図乃至第27図を参照して外部装置側のC
PU4の動作を説明する。 第4図はカメラCPU10の『パワーオンリセット』ルーチンのフロー チャートであり、このルーチンはリセット回路22のリセット動作により開始する
。すなわち、電源が投入されるか、パワースイッチのオン/オフ動作を行なうと
、カメラは先ずこのルーチンを実行する。 ステップ102でCPU10の入出力ポート、および内蔵RAMの初期セットを行なう。 ステップ104でCHECK1端子が“L”レベル、すなわち外部装置から通信要求が発
生されているかどうか判定する。CHECK1端子が“L”レベルの場合は、ステップ1
06でサブルーチン『外部装置との通信1』(第22図(a),(b))を実行する。 CHECK1端子が“L”レベルでない場合、またはサブルーチン『外部装置との通
信1』が終了した場合、ステップ108でサブルーチン『E2−PROM読出し』(第12図
)を実行し、E2−PROM24からカメラ状態データ、調整データ等がCPU10のRAMに書
込まれる。ここで始めてカメラ動作が可能な状態となる。もし、巻上げ、巻戻し
、空送り中において電池がなくなったり、パワースイッチをオフにした場合は、
動作が中断するが、電源再投入時に、中断前の状態を知る必要がある。 E2−PROM24から読出したバッテリチェックデータを参照して、ステップ110で
サブルーチン『バッテリチェック』(第17図)を実行する。 次に、E2−PROM24から読出したカメラ状態データを参照して、カメラの動作状
態をチェックする。ステップ112でカメラの裏蓋の開閉に連動する裏蓋スイッチ
の出力により裏蓋が閉じているかどうか判定する。閉じている場合は、ステップ
114で巻戻し中かどうか判定する。巻戻し中の場合は、ステップ116でサブルーチ
ン『巻戻し』を実行する。 巻戻し中でない場合は、ステップ118で空送り中かどうか判定する。空送り中
の場合は、ステップ120でサブルーチン『空送り』を実行する。 空送り中でない場合は、ステップ122で巻上げ中かどうか判定する。 巻上げ中の場合は、ステップ124でサブルーチン『一駒巻上げ』(第11図)を実行
する。 カメラの裏蓋が閉じていない場合、サブルーチン『巻戻し』、『空送り』、ま
たは『一駒巻上げ』が終了した場合、または巻上げ中でない場合は、ステップ12
6でパワースイッチがオンかどうか判定する。 パワースイッチがオンの場合は、ステップ128でLCD38をオンし、ステップ130
でサブルーチン『ストロボチャージ』を実行する。これは、いつでもストロボ撮
影可能な状態にしておくためである。ステップ132で90秒タイマをセットする。
このタイマはLCD38の表示時間を90秒に制限するものである。ただし、後述する
ように、表示中にユーザが何らかのスイッチ操作をした場合、その時点で再び90
秒タイマがセットされる。 ステップ134で裏蓋スイッチ(BK)による割込み、巻戻しスイッチ(RW)によ
る割込み、モード指定スイッチ等の各種操作スイッチ(KEYG)による割込み、及
びタイマ(65.5ミリ秒)による割込みの受付を許可する。 ステップ136でホルトモードにする。ホルト動作中は、CPU10の動作は停止して
いるが、発振回路20のクロック発振は行われ、LCD38も90秒間は表示可能である
。このホルト動作中のスタンバイ解除は上述したステップ134で許可された割込
みが発生した場合のみ有効とされる。 パワースイッチがオンでない場合は、ステップ138でLCD38をオフし、ステップ
140でBK割込み、RW割込みのみを許可し、ステップ142でストップモードになる。
ストップ動作でのスタンバイ解除はステップ140で許可された割込みが発生した
場合のみ有効とされる。 第5図(a),(b)は『スタンバイ解除』ルーチンのフローチャートであり、ホ
ルト動作(ステップ136)、ストップ動作(ステップ142)において割込みが発生した
時に開始される。このように、この実施例では、ホルトモード、ストップモード
にかかわらず、スタンバイ解除 後は同一のルーチンに移行する。これは、ベクタ割込みでスタンバイ解除後の動
作をそれぞれ定義すると、割込みはノイズによっても発生するので、誤動作を防
止するためと、誤ってスタンバイ解除された場合の処理を簡単にするためである
。 ステップ150で、ステップ102と同様にCPU10の入出力ポート、および内蔵RAMの
初期セットを行なう。ステップ152でサブルーチン『E2−PROM読出し』(第12図)
を実行する。これは、ノイズによりRAMの内容が変化した場合を補償するためで
ある。 ステップ154でこのルーチンを開始した割込みはBK割込みかどうか判定する。B
K割込みの場合は、ステップ156で裏蓋が閉じているかどうか判定する。裏蓋が閉
じている場合は、ステップ158でサブルーチン『空送り』を実行する。サブルー
チン『空送り』が終了した場合はステップ126に戻り、パワースイッチの状態を
チェックする。 裏蓋が閉じていない場合は、ステップ160でサブルーチン『裏蓋開』を実行し
、駒数、カメラ状態データをリセットする。サブルーチン『裏蓋開』の終了後は
ステップ126に戻る。裏蓋が開でも閉でもない場合は、ノイズが有ると判定する
。 BK割込みでない場合、あるいはノイズが有ると判定した場合は、ステップ162
でRW割込みかどうか判定する。RW割込みの場合は、ステップ164で巻戻しスイッ
チがオンかどうか判定する。巻戻しスイッチがオンの場合は、ステップ166でサ
ブルーチン『巻戻し』を実行する。サブルーチン『巻戻し』の終了後はステップ
126に戻る。 RW割込みでない場合、あるいは巻戻しスイッチがオンでないの場合は、ステッ
プ168でタイマ割込みかどうか判定する。タイマ割込みの場合は、ステップ170で
サブルーチン『表示タイマカウント』(第6図)を実行する。すなわち、サブルー
チン『表示タイマカウント』は65.5ミリ秒毎に実行される。サブルーチン『表示
タイマカウント』の終了後はステップ134に戻る。 タイマ割込みでない場合は、ステップ172で巻戻し終了、または空 送り失敗であるかどうか判定する。巻戻し終了、空送り失敗でない場合は、ステ
ップ174でパワースイッチがオンかどうか判定する。巻戻し終了、空送り失敗の
場合、またはパワースイッチがオンでない場合は、ステップ126に戻る。 パワースイッチがオンの場合は、ステップ176でKEYG割込みかどうか判定する
。KEYG割込みでない場合は、ステップ178でLCD表示中かどうか判定する。LCD表
示中でない場合は、ステップ180でBK,RW,KEYG割込みを許可し、ステップ182でス
トップモードになる。このモードは、パワースイッチはオンであっても、90秒間
ユーザが何も操作しなかったために、LCD38が消える場合である。パワースイッ
チがオンであれば、ユーザが何らかの操作をすると、LCD38は再び表示状態とな
る。 KEYG割込みである場合は、ノイズでKEYGのポートの状態が変化していてもスイ
ッチ入力を受付けられるようにするため、KEYGのポートをステップ184で入力ポ
ートに切換える。ステップ186でLCD38をオンする。 ステップ188でレリーズボタンが1段押込まれた(1段目レリーズ)かどうか
判定する。1段目レリーズの場合は、ステップ190でサブルーチン『レリーズ処
理』(第8図)を実行する。 1段目レリーズでない場合は、ステップ192でマクロ状態かどうか判定する。
マクロ状態でない場合は、ステップ194でズームアップ、またはズームダウンか
どうか判定する。ズームアップ、またはズームダウンの場合は、ステップ196で
サブルーチン『ズーム処理』を実行する。 サブルーチン『レリーズ処理』、または『ズーム処理』が終了した場合は、ス
テップ197でサブルーチン『レンズリセット』を実行し、フォーカシングレンズ
をリセット位置まで戻す。 サブルーチン『レンズリセット』が終了した場合はステップ126に戻る。 マクロ状態である場合、またはズームアップ、ズームダウンではない場合は、
ステップ198でマクロ切換えスイッチがオンかどうか判定する。スイッチがオン
の場合は、ステップ200でサブルーチン『マクロ処理』を実行する。サブルーチ
ン『マクロ処理』が終了した場合はステップ126に戻る。 マクロ切換えスイッチがオフの場合は、カメラモードスイッチをチェックし、
ステップ202で第1モードスイッチがオンかどうか判定し、第1モードスイッチ
がオンの場合は、ステップ204でサブルーチン『セルフモード』を実行する。サ
ブルーチン『セルフモード』は撮影モードを通常モード、セルフモードに順次切
換える。サブルーチン『セルフモード』が終了した場合はステップ126に戻る。 第1モードスイッチがオフの場合は、ステップ206で第2モードスイッチがオ
ンかどうか判定し、第2モードスイッチがオンの場合は、ステップ208でサブル
ーチン『測光モード』を実行する。サブルーチン『測光モード』は測光方式を平
均測光、スポット測光、スポットハイライト測光、スポットシャドー測光に順次
切換える。サブルーチン『測光モード』が終了した場合はステップ126に戻る。 第2モードスイッチがオフの場合は、ステップ210で第3モードスイッチがオ
ンかどうか判定し、第3モードスイッチがオンの場合は、ステップ212でサブル
ーチン『ストロボモード』を実行する。サブルーチン『ストロボモード』は発光
モードを自動発光、強制発光(日中シンクロ)、発光禁止に順次切換える。サブル
ーチン『ストロボモード』が終了した場合はステップ126に戻る。 第3モードスイッチがオフの場合は、ステップ214で第4モードスイッチがオ
ンかどうか判定し、第4モードスイッチがオンの場合は、ステップ216でサブル
ーチン『カメラモード』(第7図)を実行する。サブルーチン『カメラモニド』で
は、カメラモードを標準(一駒)、オートズーム、連写、多重露光(2枚)撮影、
∞モードに順次切換える。サブルーチン『カメラモード』が終了した場合はステ
ップ126に 戻る。 第4モードスイッチがオフの場合はステップ134に戻る。 第6図はサブルーチン『表示タイマカウント』(第5図(a)のステップ170)
のフローチャートである。ステップ230でCHECK1端子が“L”かどうか判定する。
CHECK1端子が“L”の場合は、ステップ232でサブルーチン『外部装置との通信1
』(第22図(a),(b))を実行する。このため、サブルーチン『外部装置との通信
1』は65.5ミリ秒毎に実行可能であり、このプログラムではサブルーチン『外部
装置との通信1』を連続して実行することは不可能である。後述するように、サ
ブルーチン『外部装置との通信1』を連続して実行するプログラムは別に設けら
れている。 CHECK1端子が“L”でない場合、またはサブルーチン『外部装置との通信1』
が終了した場合、ステップ234で90秒経過したかどうか判定する。90秒経過した
場合はステップ180(第5図(a))に戻り、ストップモードになる。90秒経過しな
い場合はステップ236でサブルーチン『LCD点滅処理』を実行する。ここでは、LC
D38の警告表示等が65.5ミリ秒を一定量分周した間隔でオン/オフされ点滅する
。サブルーチン『LCD点滅処理』の終了後はステップ134に戻る。 第7図はサブルーチン『カメラモード』(第5図(b)のステップ216)のフロ
ーチャートである。ステップ240でモードRAM(MRAM)をインクリメントする(MRA
M←MRAM+1)。ステップ242でMRAMが5以上かどうか判定する。MRAMが5以上の
場合はステップ244でモードRAMがリセットされる(MRAM←0)。すなわち、MRAMの
データ0,1,2,3,4が標準、オートズーム、連写、多重露光、∞の各カメラモード
に対応する。 第8図はサブルーチン『レリーズ処理』(第5図(b)のステップ190)のフロ
ーチャートである。ステップ250でCHECK1端子が“L”かどうか判定する。CHECK1
端子が“L”の場合は、ステップ252でサブルーチン『外部装置との通信2』(第2
2図(a),(b))を実行する。 CHECK1端子が“L”でない場合、またはサブルーチン『外部装置との通信2』
が終了した場合、ステップ254でサブルーチン『測光』を実行する。 ステップ256で∞モードかどうか判定する。∞モードの場合は、ステップ258で
距離データとして∞データをセットする。ステップ260でサブルーチン『測距』
を実行する。 距離データとして∞データがセットされた場合、またはサブルーチン『測距』
が終了した場合、ステップ262でオートズームモードかどうか判定する。オート
ズームモードの場合は、ステップ264でサブルーチン『オートズーム』を実行す
る。サブルーチン『オートズーム』は撮影距離にかかわらず常に人物が一定の大
きさで撮影されるように、距離データに応じて自動的にズーム位置を設定する。 オートズームモードでない場合、サブルーチン『オートズーム』が終了した場
合、ステップ266でサブルーチン『AF(レンズ繰出し)』(第9図)を実行し、フォ
ーカスレンズを合焦位置まで駆動する。ステップ268でサブルーチン『露出演算
』を実行する。 ステップ270でレリーズボタンが全部押込まれた(2段目レリーズ)かどうか
判定する。2段目レリーズでない場合は、ステップ272で1段目レリーズかどう
か判定する。1段目レリーズの場合はステップ270に戻る。この状態は、AFロッ
クの状態である。1段目レリーズを解除するともとのルーチンに戻る。 2段目レリーズの場合は撮影動作に入り、先ず、ステップ274でサブルーチン
『バッテリチェック』(第17図)を実行する。後述するが、バッテリがない場合は
ここで動作を停止する。 ステップ276でセルフモードかどうか判定する。セルフモードの場合は、ステ
ップ278で第1モードスイッチがオンかどうか判定する。第1モードスイッチが
オンの場合はステップ126(第4図)に戻り、パワースイッチの状態をチェック
する。すなわち、第1モードスイッチをオンすることにより、セルフ待ち状態を
途中解除することができ る。 第1モードスイッチがオフの場合は、ステップ280でセルフタイマ(12秒)が
カウントアップ(終了)かどうか判定する。カウント終了でない場合はステップ
278に戻る。 セルフモードでない場合、またはカウント終了の場合は、ステップ282でサブ
ルーチン『露出』を実行し、シャッタ動作を行なう。ストロボ発光モードの場合
は、ここで、ストロボが発光する。 ステップ284で多重露光モードかどうか判定する。多重露光モードの場合は、
ステップ286で多重1枚フラグがセットされているどうか判定する。多重1枚フ
ラグがセットされていない場合は、ステップ286で多重1枚フラグをセットする
。ステップ290でサブルーチン『E2−PROM書込み』(第16図)を実行し、もとのル
ーチンに戻る。これにより、多重1枚フラグをE2−PROM24に書込む。多重1枚フ
ラグがセットされている場合は、ステップ292で多重1枚フラグをリセットする
。 多重露光モードでない場合、または多重1枚フラグをリセットした場合、ステ
ップ294でフィルム有りかどうか判定する。フィルム有りの場合は、ステップ296
でサブルーチン『一駒巻上げ』(第11図)を実行する。 フィルム有りでない場合、またはサブルーチン『一駒巻上げ』が終了した場合
、ステップ298で連写モードかどうか判定する。連写モードの場合はステップ270
に戻り、レリーズボタンが押込まれている限り連写が継続する。連写モードでな
い場合はもとのルーチンに戻る。 第9図はサブルーチン『AF(レンズ繰り出し)』(第8図のステップ266)のフロ
ーチャートである。ステップ302でタイマリセットする。ステップ303で測距デー
タとE2−PROMの調整データによりレンズ繰出し目標位置を決定する。ステップ30
4でシャッタモータMsを正回転し、フォーカシングレンズを駆動する。 ステップ306でフォトインタラプタPIsの出力が立下った(パルス が1つ発生された)かどうか判定する。立下った場合は、ステップ308でカウン
タをカウントアップする。このカウント値を用いて、ステップ310でフォーカシ
ングレンズが目標位置まで繰り出されたかどうか判定する。目標位置まで繰り出
されていない場合は、ステップ306に戻る。 目標位置まで繰り出された場合は、ステップ312でシャッタモータMsの回転を
停止する。ステップ314でAFレンズフラグをリセットする。ステップ316でサブル
ーチン『E2−PROM書込み』(第16図)を実行する。この後、もとのルーチンに戻る
。 ステップ306でフォトインタラプタPIsの出力が立下っていない場合は、ステッ
プ318で、フォトインタラプタの立下がりから1秒経過したかどうか判定する。
1秒経過していない場合はステップ306に戻る。1秒経過した場合は異常と判定
し、ステップ320でシャッタモータMsの回転を停止する。異常を示すAFレンズフ
ラグをステップ322でセットする。 ステップ324でサブルーチン『E2−PROM書込み』(第16図)を実行する。ステッ
プ326でサブルーチン『ダメージ処理』(第10図)を実行する。 第10図はサブルーチン『ダメージ処理』のフローチャートである。ステップ32
2で全てのアクチュエータをオフする。ステップ334でポートを初期セットする。
ステップ336で90秒タイマをセットする。ステップ338で90秒経過したかどうか判
定する。 90秒経過した場合は、ステップ340でストップモードとなる。ステップ340はエ
ンドレスループを構成していて、ノイズでストップモードが解除されても、再び
ストップモードにすることによりストップモードが解除できない構成となってい
る。当然、このエンドレスループの中にポートの初期セット及びストップ解除不
許可命令を入れておけばさらに良いことは言うまでもない。 90秒経過していない場合は、ステップ342でCHECK1端子が“L”か どうか判定する。CHECK1端子が“L”の場合は、ステップ344でサブルーチン『外
部装置との通信3』(第22図(a),(b))を実行する。これにより、カメラ異常中
でも、外部装置と通信が可能である。 CHECK1端子が“L”でない場合、またはサブルーチン『外部装置との通信3』
が終了した場合、ステップ364でタイマ割込みを許可し、ステップ366でホルトモ
ードになる。タイマ割込みによりホルトモードが解除されると、ステップ338に
戻る。このサブルーチンはパワーオンリセットまで動作する。 第11図はサブルーチン『一駒巻上げ』(第4図のステップ124、第8図のステッ
プ296)のフローチャートである。ステップ370で巻上げ中かどうか判定する。巻
上げ中でない場合は、ステップ372で巻上げカウンタをリセットする。ステップ3
74で巻上げ中フラグをセットする。ステップ376でサブルーチン『E2−PROM書込
み』(第16図)を実行し、巻上げ中フラグをE2−PROM24に書込む。これは、巻上げ
中に電源がオフになった場合でも、前の状態を復元するためである。 巻上げ中の場合、またはサブルーチン『E2−PROM書込み』が終了した場合、ス
テップ378で巻上げモータMwを正回転し、フィルムを巻上げる。 ステップ380でフォトインタラプタPIwの出力が立下った(パルスが1つ発生さ
れた)かどうか判定する。立下った場合は、ステップ382で巻上げカウンタをカ
ウントアップする。このカウント値を用いて、ステップ384で一駒巻上げが終了
したかどうか判定する。 フォトインタラプタPIwの出力が立下っていない場合、または一駒巻上げが終
了していない場合は、ステップ394でフィルムエンドかどうか判定する。フィル
ムエンドはフォトインタラプタPIwの出力が2秒以上変化しない場合である。フ
ィルムエンドでない場合はステップ380に戻り、フィルムエンドの場合はステッ
プ396でサブルーチン『巻戻し』を実行する。 一駒巻上げが終了した場合は、ステップ386で巻上げモータMwの 回転を停止する。ステップ388で駒数カウンタをカウントアップする。ステップ3
90で巻上げ中フラグをリセットする。ステップ392でサブルーチン『E2−PROM書
込み』(第16図)を実行し、巻上げ中フラグ(リセット)をE2−PROM24に書込む。
この後もとのルーチンに戻る。 なお、サブルーチン『空送り』はフィルムローディングし裏蓋を閉じた後、自
動的に数駒フィルムを巻上げるものであり、サブルーチン『一駒巻上げ』を数回
連続して実行するものである。サブルーチン『巻戻し』もサブルーチン『一駒巻
上げ』と同様に、フィルムが停止するまで巻上げモータを逆転するものである。 第12図はサブルーチン『E2−PROM読出し』(第4図のステップ108、第5図(a
)のステップ152)のフローチャートである。ステップ402でE2−PROM24のアドレ
スを1にリセットし、ステップ404でE2−PROM24のモードを読出しモードとする
。ステップ406でCPU10をシリアル通信入力モードとし、ステップ408でRAMアドレ
ス(ADR)にEPをセットする。 ここで、各RAMアドレスの内容は第13図に示すようになっている。各データは
8ビットのデータであり、RAMアドレスEP+1のカメラ状態データの各ビットの
内容は第14図に、RAMアドレスEP+2の異常データの各ビットの内容は第15図に
示すようになっている。 ステップ410でE2−PROM24から8つのビットデータをシリアル入力し、E2−PRO
M24のアドレスをインクリメントする。 ステップ412でシリアル入力データをRAMアドレス(ADR)にセットする。ステ
ップ414でRAMアドレスをインクリメントする。ステップ416でRAMアドレスがE2−
PROM24のデータ数を越えたかどうか判定する。越えた場合はもとのルーチンに戻
り、越えない場合はステップ410に戻り、次のアドレスの8つのビットデータを
シリアル入力する。 第16図はサブルーチン『E2−PROM書込み』(第8図のステップ290等)のフロー
チャートである。ステップ422でE2−PROM24をリセッ トし、E2−PROM24のアドレスを1とする。ステップ424でE2−PROM24を書込みモ
ードに設定する。ステップ426でシリアル通信出力モードを設定し、ステップ428
でRAMアドレス(ADR)にEPをセットする。 ステップ430でCPU10のシリアルアウトレジスタにADR番地のデータをセットし
、ステップ432でシリアル出力し、8つのビットデータをE2−PROM24に転送する
。ステップ434でRAMアドレスをインクリメントする。 ステップ436でRAMアドレスがE2−PROM24のデータ数を越えたかどうか判定する
。越えた場合はもとのルーチンに戻り、越えない場合はステップ430に戻り、次
のアドレスの8つのビットデータをシリアル出力する。 第17図はサブルーチン『バッテリチェック』(第4図のステップ110)のフロー
チャートである。 バッテリチェックは、第18図に示すように、カメラ内の電源電圧VDDを抵抗R1,
R2で分圧した電圧をCPU10に内蔵のA/D変換器でディジタル値に変換し、これをE2
−PROM24内に記憶されているバッテリチェックデータと比較することにより行わ
れる。ここで、各カメラ毎に抵抗R1,R2の値にバラツキがあるので、カメラの出
荷前に各カメラ毎に電源電圧VDDのA/D変換値を求めて、これから求めた調整値(
バッテリチェックデータ)をE2−PROM24に書込んでおく。この書込みのプログラ
ムは外部装置に格納しておいて、外部装置との通信によりこのプログラムを実行
する。 A/D変換のための基準電圧VrefはCPU10からの指令によりIFIC40から供給される
。 ステップ440でサブルーチン『バッテリ値A/D変換』を実行する。ステップ442
でA/D変換値が調整値以上かどうか判定する。調整値以上でない場合は、ステッ
プ444でサブルーチン『バッテリなし表示』を実行する。ステップ446でKEYロッ
クし、ステップ448でストップモードとする。この場合もエンドレスループにな
っている。これはノ イズ等でストップが解除されても、すぐに低消費電流モード(ストップ)に戻す
ためである。 調整値以上である場合は、ステップ450でA/D変換値が[調整値+一定値]以上
かどうか判定する。[調整値+一定値]以上でない場合は、ステップ452でバッテ
リ少フラグをセットし、もとのルーチンに戻る。[調整値+一定値]以上である場
合は、ステップ454でバッテリ少フラグをリセットし、もとのルーチンに戻る。 次に、外部装置との通信について説明する。 第19図はこの実施例による通信の各種のモードを説明する図である。先ず、通
信モードは大きく別けて、標準モードとユーティリティモードに分類できる。こ
れは、外部装置から発生されるモード指定コードSYAD2により分類され、SYAD2=
0,1,15の場合は標準モードであり、SYAD2=2の場合はユーティリティモードで
ある。SYAD2の0,1,15はそれぞれCPU10に内蔵されているRAMの使用可能な上位ア
ドレスに相当する。標準モードはモード指定コードCKDTが“リード”か“ライト
”かによりRAM読出しモード、RAM書込みモードに細分される。ユーティリティモ
ードはモード指定コードSYADによるサブルーチンコールモード(SYAD=0)、ジャ
ンプモード(SYAD=1)、連続通信モード(SYAD=E)、連続通信解除モード(SYAD
=D)に細分される。 カメラと外部装置との間の通信データのフォーマットは一定である。一例とし
て、RAM読出しモードとRAM書込みモードの際のCPU10と外部装置との間の通信デ
ータのフォーマットをそれぞれ第20図、第21図に示す。図中、outとあるのはカ
メラから外部装置へ通信されるデータであり、inとあるのは外部装置からカメラ
へ通信されるデータである。 カメラのCPU10から発生されるクロックCLKに同期してデータラインDATAを介し
てデータが通信される。ここでは外部装置との通信は、どのルーチン中かにより
通信1〜通信3に分類されていて、先ず、これらを識別するための同期信号が、
RAM読出しモードかRAM書込みモ ードかにかかわらずCPU10から出力される。通信1,通信2,通信3の同期信号はそ
れぞれ2,3,4個のパルスからなる。 ここで、通信1は『パワーオンリセット』ルーチン(第4図)中、及び『表示
タイマカウント』ルーチン(第6図)中における通信であり、通信2はサブルー
チン『レリーズ処理』(第8図)中における通信であり、通信3はサブルーチン『
ダメージ処理』(第10図)中における通信である。 このように、同期信号を通信の時点によって変えることにより、例えばオプシ
ョンでレリーズ中のみ通信を行ないある特定の制御をするという動作が可能にな
り、カメラ機能の拡充が図れる。また、通常のカメラシーケンス中かダメージ処
理中かの判断を容易にできる。 RAM読出しモードの際は、第20図に示すように、同期信号に続いて、モード指
定コードCKDT(4ビット)、SYAD2(4ビット)、SYAD(8ビット)が外部装置から
カメラに通信される。SYAD2、SYADがRAMの読出しアドレスとなる。次の入力デー
タ(8ビット)は不定であり、その後、RAMから読出したデータがカメラから外
部装置に通信される。 RAM書込みモードの際は、第21図に示すように、同期信号に続いて、モード指
定コードCKDT、SYAD2、SYAD、書込みデータSYDTが外部装置からカメラに通信さ
れ、SYAD2、SYADで示されるRAMのアドレスにSYDTが書込まれる。その後、チェッ
クコードPOFCKが外部装置からカメラに通信される。これは、このチェックコー
ドはCPU10内のRAMを操作するため、通信が最後まで正常に行われたかどうかを確
認するものである。 このようなフォーマットによる外部装置との通信のフローチャートを第22図(
a),(b)に示す。第22図(a),(b)はサブルーチン『外部装置との通信1』、
『同2』、『同3』をまとめて示すものである。外部装置との通信1の場合はス
テップ502でNに2をセットし、外部装置との通信2の場合はステップ504でNに
3をセットし、外部装置との通信3の場合はステップ506でNに4をセットする
。この後、ス テップ508で同期パルスをN回出力する。 ステップ510でCPU10をシリアル通信入力モードとし、ステップ512でクロックC
LKを8個発生し、外部装置からのビットデータを8個シリアル入力する。ステッ
プ514でシリアル入力データをRAMのCKDT,SYAD2アドレスに書込む。ステップ516
で次のデータをシリアル入力する。ステップ518でシリアル入力データをRAMのSY
ADアドレスに書込む。ステップ520で次のデータをシリアル入力する。ステップ5
22でシリアル入力データをRAMのSYDTアドレスに書込む。 ステップ524でCKDTに基づき読出し(リード)モードか、書込み(ライト)モ
ードかを判定する。リードモードの場合は、ステップ526でSYAD2,SYADアドレス
のデータをシリアルバッファにセットする。ステップ528でシリアル通信出力モ
ードにセットし、ステップ530でデータ(第20図の読出しデータ)を外部装置に
シリアル出力し、その後もとのルーチンに戻る。 ライトモードの場合は、ステップ532で次のデータをシリアル入力し、ステッ
プ534で入力データがチェックコード(POCKF)であるかどうか判定する。入力デ
ータがチェックコードでない場合は、シリアル通信エラーとし、もとのルーチン
に戻る。 入力データがチェックコードの場合は、ステップ536でSYAD2が0,1,15のいずれ
であるかどうか判定する。SYAD2が0,1,15のいずれかである場合は標準モードと
判定し、ステップ538でSYAD2,SYADアドレスにSYDTアドレスのデータを書込み、
その後もとのルーチンに戻る。 SYAD2が0,1,15のいずれでもない場合は、ステップ540でSYAD2=2かどうか判
定される。SYAD2=2でない場合は、シリアル通信エラーとし、もとのルーチン
に戻る。SYAD2=2である場合はユーティリティモードと判定し、ステップ542で
SYAD=0であるかどうか判定する。 SYAD=0の場合はサブルーチンコールモードと判定し、ステップ 544でRAMバッファのデータをレジスタに移す。ステップ546でサブルーチン『サ
ブルーチンコール』(第23図)を実行する。ステップ548でレジスタのデータをRAM
バッファに移した後、もとのルーチンに戻る。ここで、RAMバッファを使用する
のは、後述する連続通信モードで連続してサブルーチンを実行する場合に、前の
サブルーチンの実行直後のレジスタの内容を次のサブルーチン実行時に引きつぐ
ようにするためである。すなわち、レジスタの値を引数としたサブルーチンを続
けて実行できることとなる。 SYAD=0でない場合は、ステップ550でSYAD=1かどうか判定する。SYAD=1
の場合はジャンプモードと判定し、ステップ552で連続モード中かどうか判定す
る。連続モード中の場合は、スタックが1サブルーチン分(後述する連続モード
中の『外部装置との通信1』(ステップ562))増えているので、ステップ554でス
タックポインタを1サブルーチン分だけ戻して、ステップ556に移る。連続モー
ド中でない場合は、すぐステップ556に移る。ステップ556でスタックにRAMアド
レス(BRADR)で示されるデータをセットする。その後、リターン命令があると
、スタックに移されていた(BRADR)の内容をプログラムカウンタに移すことに
より、(BRADR)で示されている番地にジャンプする。 SYAD=1でない場合は、ステップ558でSYAD=Eかどうか判定する。SYAD=E
の場合は連続通信モードと判定し、ステップ560で連続モード中かどうか判定す
る。連続モード中でない場合は、ステップ562でサブルーチン『外部装置との通
信1』を実行する。ステップ564でCHECK1端子が“L”かどうか判定する。CHECK1
端子が“L”の場合は、ステップ562を再度実行する。これにより、カメラと外部
装置とが連続して通信可能となる。すなわち、連続モード中となる。連続モード
中の場合は更に連続モードになることを禁止するため、またはEXT端子3がはず
れたり、外部装置2が通信をやめたりしてCHECK1端子が“L”ではない場合は、
もとのルーチンに戻る。 SYAD=Eでない場合は、ステップ566でSYAD=Dかどうか判定する。SYAD=D
の場合は連続通信解除モードと判定し、ステップ568で連続モード中かどうか判
定する。連続モード中の場合は、ステップ570でスタックポインタを1サブルー
チン分(連続モード中の『外部装置との通信1』(ステップ562))だけ戻して、
もとのルーチンに戻る。SYAD=Dでない場合、または連続モード中でない場合は
、すぐにもとのルーチンに戻る。 第23図はサブルーチン『サブルーチンコール』(第22図(b)のステップ546)
のフローチャートである。ここでは、ステップ574に示すようにスタックにRAMア
ドレス(BRADR)で示されるデータをセットし、リターン命令により、直前にス
タックにセットされた(BRADR)の内容に従ってプログラムカウンタを(BRADR)
で示された番地に変化させることにより、(BRADR)で示されたサブルーチンを実
行する。スタックには、まだ『サブルーチンコール』(ステップ546)を呼んだ戻
り番地が残っているので、(BRADR)で示された番地のサブルーチン終了時のリタ
ーン命令により『サブルーチンコール』(ステップ546)の次のステップ548にプロ
グラムは移る(戻る)。 次に、以上のようなカメラCPU10のプログラムを利用して種々の機能を実現す
る外部装置側のCPU4の動作例を説明する。 第24図は外部装置CPU4のサブルーチン『バッテリチェック電圧調整』のフロー
チャートである。これは、カメラCPU10のサブルーチン『バッテリチェック』で
参照する調整値を出荷前にカメラ毎にE2−PROM24に書込む機能である。 ステップ602でCHECK1端子を“L”にし、カメラ側に通信要求を送信する。ステ
ップ604で連続通信モードをセットする。すなわち、CKDT=“ライト”,SYAD2=2
,SYAD=Eとする。ステップ606で通信条件を1(N=2)にする。ステップ608
でカメラにリセットをかけ、カメラCPU10にサブルーチン『パワーオンリセット
』を開始させる。ステップ610でサブルーチン『カメラとの通信』(第26図)を実
行する。 これにより、カメラのCPU10はパワーオンリセット後の1回目の通信(第4図
のステップ106)で連続通信モードになる。ここで、連続通信モードにしないと
、カメラ側のプログラムはステップ108,110と進んで、まだ調整されていない調
整値でサブルーチン『バッテリチェック』を行なうことになる。もし、調整値が
大きい値になっていた場合には、カメラ動作はステップ448(第17図)でロック
してしまう。 ステップ612でIFIC40をオンするデータをセットする。ステップ614で書込みモ
ードをセットする。すなわち、SYAD2=15(IFIC用出力上位番地),SYAD=“IFIC
用出力下位番地”,SYDT=“IFICオンデータ”,CKDT=“ライト”とする。ステッ
プ616でサブルーチン『カメラとの通信』を実行する。 これにより、IFIC40からは第18図に示したA/D変換のための基準電圧Vrefが出
力される。 ステップ618でSYAD2,SYADに(BRADR)のRAMアドレスを、SYDTにサブルーチン
『A/D変換』の先頭アドレスをセットした後、ステップ620でサブルーチン『カメ
ラとの通信』を実行する。すなわち、サブルーチン『A/D変換』の先頭アドレス
をRAMアドレス(BRADR)にセットする。ステップ622でサブルーチンコールモー
ドをセットする。すなわち、CKDT=“ライト”,SYAD2=2,SYAD=0とする。ステ
ップ624でサブルーチン『カメラとの通信』を実行する。 これにより、サブルーチン『A/D変換』が実行され、カメラの電源電圧VDDがCP
U10でA/D変換される。 ステップ626で読出しモードをセットする。すなわち、CKDT=“リード”とす
る。ステップ628でSYAD2,SYADにA/D変換値から求めた調整値(バッテリチェック
データ)をセットする。ステップ630でサブルーチン『カメラとの通信』を実行
する。 これにより、バッテリチェックデータが一旦外部装置側に読出される。 ステップ632でSYAD2,SYADにバッテリチェックデータの書込みRAM アドレス(EP+3)をセットする。また、ステップ630で読出されたバッテリチ
ェックデータをSYDTにセットする。ステップ636で書込みモードをセットする。
すなわち、CKDT=“ライト”とする。ステップ638でサブルーチン『カメラとの
通信』を実行する。 これにより、E2−PROM書込み用のRAMアドレス(EP+3)にバッテリチェック
データが書込まれる。 ステップ640でSYDTにサブルーチン『E2−PROM書込み』の先頭アドレスをセッ
トする。また、SYAD2,SYADに(BRADR)のRAMアドレスをセットする。ステップ64
4でサブルーチン『カメラとの通信』を実行する。ステップ646でサブルーチンコ
ールモードにする。ステップ648でサブルーチン『カメラとの通信』を実行する
。 これにより、E2−PROM24にバッテリチェックデータが書込まれる。 この後、もとのルーチンに戻る。 第25図はサブルーチン『AFレンズ駆動調整』のフローチャートである。上述し
たカメラCPU10のサブルーチン『AF(レンズ繰出し)』ではモータがオンしてから
1秒経過してもフォーカシングレンズが動かない場合、異常であると判定してい
たが、バッテリチェックデータと同様に、この判定基準時間を出荷前にカメラ毎
に調整する場合に、サブルーチン『AFレンズ駆動調整』を実行する。 ステップ652でSYDTにサブルーチン『AF(レンズ繰出し)』の先頭アドレスをセ
ットする。また、SYAD2,SYADに(BRADR)のRAMアドレスをセットする。ステップ
654でサブルーチン『カメラとの通信』を実行する。ステップ656でサブルーチン
コールモードをセットする。ステップ658でサブルーチン『カメラとの通信』を
実行する。 これにより、サブルーチン『AF(レンズ繰出し)』が実行される。この時、他の
測定装置でフォーカシングレンズ駆動の基準とするスイッチ(AFs)52からレン
ズ基準位置までにフォトインタラプタ(PIs)54の出力が何パルス出るかを測定
しておく。 ステップ660で同期信号の数を検出する。ステップ662で同期信号 の数が4であるかどうか判定する。4である場合は、ステップ664で異常表示を
行なって、エンド処理する。すなわち、レンズ駆動異常となったので、調整でき
ない。 4でない場合は、ステップ666でSYDTにAF調整データを、SYAD2,SYADに(EP+
5)のRAMアドレスをセットする。ステップ670で書込みモードをセットする。ス
テップ672でサブルーチン『カメラとの通信』を実行する。 これにより、E2−PROM書込み用のRAMアドレス(EP+3)にAF調整データが書
込まれる。 ステップ674でSYDTにサブルーチン『E2−PROM書込み』の先頭アドレスをセッ
トする。また、SYAD2,SYADに(BRADR)のRAMアドレスをセットする。ステップ67
8でサブルーチン『カメラとの通信』を実行する。ステップ680でサブルーチンコ
ールモードにする。ステップ682でサブルーチン『カメラとの通信』を実行する
。 これにより、E2−PROM24にAF調整データが書込まれる。 この後、もとのルーチンに戻る。 第26図は第24図、第25図に示されるサブルーチン『カメラとの通信』のフロー
チャートである。ステップ673で同期信号があるかどうか判定する。ここで同期
信号がくるまでこのステップ673を繰り返して待つ。同期信号がある場合は、ス
テップ675で同期信号の数が2,3,4のいずれかであるかどうか判定する。同期信号
の数が2,3,4のいずれでもない場合は、ステップ673に戻る。同期信号の数が2,3,
4のいずれかである場合は、ステップ677でシリアル通信出力モードが設定される
。 ステップ679でCKDT,SYAD2データをシリアルバッファにセットする。ステップ6
81でシリアルバッファのデータをカメラCPU10からのクロックCLKに同期して、シ
リアル出力する。ステップ683でSYADデータをシリアルバッファにセットする。
ステップ684でシリアルバッファのデータをシリアル出力する。ステップ686でSY
DTデータを シリアルバッファにセットする。読出しモードの場合は、SYDTはダミーデータで
よい。ステップ688でシリアルバッファのデータをシリアル出力する。 ステップ690で読出しモード(CKDT=“リード”)かどうか判定する。読出し
モードでない場合は、ステップ692でPOFCKデータをシリアルバッファにセットす
る。ステップ694でシリアルバッファのデータをシリアル出力する。その後、も
とのルーチンに戻る。 読出しモードである場合は、ステップ696でシリアル通信入力モードをセット
する。ステップ698でカメラからのデータ(第20図の読出しデータ)シリアル入
力する。その後、もとのルーチンに戻る。 これ以外の調整データ(シャッタ調整データ等)についても、同様に外部装置
のCPUをプログラムしておくことにより、カメラ出荷前に各カメラ毎に調整可能
である。これにより、部品等によるカメラのバラツキに無関係に種々の判定を正
確に実行できる。 次に、撮影モードを拡張するオプション機器としての外部装置の動作を説明す
る。一例として、第27図を参照して、サブルーチン『多重4枚撮り』を説明する
。このプログラムは外部装置により多重一枚撮影フラグを操作して、カメラCPU
のサブルーチン『レリーズ処理』で多重撮影ルーチン(第8図のステップ286〜2
90)を何度も実行させるものである。すなわち、通常は、最初の露光が行われる
と多重一枚撮影フラグがセットされ、次の露光終了後多重一枚撮影フラグがセッ
トされていると、フィルム巻上げが実行される。そのため、露光終了後にセット
された多重一枚撮影フラグを外部装置がクリアすることにより、任意の枚数の多
重撮影が可能となる。 ステップ702で枚数(多重枚数)カウンタをリセットする。ステップ704でCHEC
K1端子を“L”にし、カメラ側に通信要求を出力する。ステップ706で通信条件を
2(N←3)とし、レリーズ待機状態とする。 ステップ708で連続通信モードをセットする。ステップ710でサブ ルーチン『カメラとの通信』を実行する。これにより、ユーザがレリーズスイッ
チを押した時に実行されるサブルーチン『レリーズ処理』(第8図)においてカ
メラとの連続通信が開始される。この時、カメラは多重露光モードに設定されて
いるとする。 ここで、連続通信モードになっているので、カメラ内のプログラムは進まず、
サブルーチン『レリーズ処理』の最初でカメラの状態を自由に変更することがで
きる。 ステップ712で通信条件を1(N←2)に戻す。ただし、カメラとの連続通信
は続行している。 ステップ714でRAM読出しモードをセットする。ステップ716でSYAD2,SYADにRAM
読出しアドレスEP+1をセットする。ステップ718でサブルーチン『カメラとの
通信』を実行し、RAMからカメラ状態データを読出す。 ステップ720で多重一枚撮影フラグ(カメラ状態データの6ビット)をクリア
する。 ステップ722でRAM書込みモードをセットする。ステップ723でSYAD2,SYADにRAM
アドレスEP+1を、SYDTには多重一枚撮影フラグをリセットしたカメラ状態デー
タをセットする。ステップ724でサブルーチン『カメラとの通信』を実行する。
多重一枚撮影フラグがリセットされたカメラ状態データをRAMに書込む。これに
より、多重4枚露光が可能になる。ステップ726で連続通信解除モードをセット
する。ステップ728でサブルーチン『カメラとの通信』を実行し、カメラのプロ
グラムをサブルーチン『レリーズ処理』に戻す。この後、カメラとの通信が中断
する。ここで、カメラ側では、2段目レリーズが押されている場合は、多重の一
枚目として露出動作を行ない、レリーズがすでに離された場合は、露出せずにも
とのルーチンにもどる。露出した場合は、多重一枚撮影フラグがセットされるの
で確認できる。 ステップ730でサブルーチン『RAMアドレスEP+1読取り』を実行する。 ステップ732で多重一枚撮影フラグが“1”(セット)かどうか判定する。多重
一枚撮影フラグが“1”でない場合は、レリーズが中断された(露出していない
)ので、ステップ706に戻る。多重一枚撮影フラグが“1”である場合は、露出さ
れたので、ステップ734で枚数カウンタをインクリメントする。 ステップ736で枚数カウンタが3かどうか判定する。枚数カウンタが3である
場合は、ステップ706に戻る。すなわち、次の『レリーズ処理』で巻上げできる
ようにして戻る。枚数カウンタが3でない場合は、ステップ738で連続通信モー
ドをセットする。ステップ740でサブルーチン『カメラとの通信』を実行する。
ここで、連続通信モードにするのは、E2−PROMの内容を変更したいためで、連続
通信モードにしないと、カメラ側のルーチンでE2−PROMの内容をいつもリフレッ
シュ(第5図(a)、ステップ152)しているため、E2−PROMの内容は変更できな
い。 ステップ742で多重一枚撮影フラグをリセットする。ステップ746でRAM書込み
モードをセットする。ここで、SYAD2,SYADにRAM書込みアドレスEP+1をセット
する。SYDTは多重一枚撮影フラグをリセットしたカメラ状態データである。ステ
ップ748でサブルーチン『カメラとの通信』を実行する。 ステップ750でSYDTにサブルーチン『E2−PROM書込み』の先頭アドレスをセッ
トし、SYAD2,SYADにBRADRのRAMアドレスをセットする。ステップ752でサブルー
チン『カメラとの通信』を実行する。ステップ754でサブルーチンコールモード
をセットする。ステップ756でサブルーチン『カメラとの通信』を実行する。 ステップ758で連続通信解除モードをセットする。ステップ760でサブルーチン
『カメラとの通信』を実行する。 ステップ762で枚数カウンタが4かどうか判定する。枚数カウンタが4でない
場合は、ステップ706に戻る。枚数カウンタが4である場合は、ステップ764でCH
ECK1端子を“H”とし、もとのルーチンに戻 る。 これにより、カメラCPUには多重2枚撮影プログラムしか内蔵されていない場
合でも、外部装置によりカメラCPUのRAMの内容を制御することにより3枚以上の
多重撮影が実行できる。 なお、この発明は上述した実施例に限定されず、発明の要旨を逸脱しない範囲
で種々変形可能である。例えば、外部装置、主に撮影オプション用の外部装置は
アダプタ機器としてではなく、ICカードとして構成してもよく、むしろ、この方
が、小形軽量であるので、好ましい。また、CPUは1チップのマイクロコンピュ
ータに限定されない。 〔発明の効果〕 以上説明したようにこの発明によれば、外部装置からの指令により外部装置と
連続通信可能であり、内蔵のサブルーチンを外部装置により所望の順番で組合せ
て連続して実行できるとともに、内蔵のサブルーチンのパラメータを格納するRA
Mの内容を外部装置により制御でき、機能を容易に拡張できるカメラが提供され
る。
DETAILED DESCRIPTION OF THE INVENTION [Industrial applications]   The present invention incorporates a microcomputer and also has a microcomputer.
Camera that is connected to an external device and controls various operations by communicating with the external device
About. [Conventional technology]   Such cameras are disclosed in Japanese Patent Application Nos. 61-311697 and 62
There is a fully automatic camera described in -158551.   In the fully automatic camera described in Japanese Patent Application No. 61-311697, various programs are stored in an external device.
When the external device is connected to the camera,
Transfer the program, rewrite the CPU RAM, and execute this program. to this
Functions that were not built into the camera CPU can now be implemented by external devices.
The function of the camera is expanded.   In the fully automatic camera described in Japanese Patent Application No. 62-158551, the external device is the CPU inside the camera.
It is configured so that the subroutine can be accessed. This As a result, the external device executes the desired subroutine in combination and executes
The desired operation can be performed by the camera. [Problems to be solved by the invention]   However, in the two fully automatic cameras described above, communication with external devices is not possible.
Was programmed into the camera's main routine. That is, external
Once the communication subroutine with the device has been executed, other processing of the main routine ends.
Otherwise, the communication subroutine with the external device can be executed again.
Did not.   Therefore, in the two fully automatic cameras described above, a plurality of subroutines are continuously performed.
It was impossible to execute and implement one function. Therefore, the subroutine
The functions that can be realized by the combination are limited.   In the fully automatic camera described in Japanese Patent Application No. 61-311697, the camera main
A subroutine that uses the RAM used by the routine cannot be executed, and
The program could not be freely transferred to the camera.   The present invention has been made to address the above situation, and its purpose is to provide an external device.
With these commands, the camera and external communication are continuously communicated, and the microcontroller built into the camera is
Provide a camera that can continuously execute computer subroutines by combining them in the desired order.
Is to provide. [Means and actions for solving the problem]   In order to solve the above problems and achieve the object, the present invention uses the following means.
You. (1) The camera of the present invention can be connected to an external device and various operations of the camera.
Camera having a microcomputer having a subroutine for executing the operation function
In the above, the microcomputer is further reduced by communication from an external device.
Read and write any memory contents at least in the microcomputer, and
It has a communication subroutine for executing
When the communication mode is set, the communication subroutineExecute and read the arbitrary memory contents
Only Write or execute any of the above subroutines and read / write any of the memory contents
Or after the execution of the arbitrary subroutine is completed, the communication subroutine is executed again.
Maintain continuous communication by executing ByThisUnder communication status
To read / write any memory contents or execute any subroutine. (2) The camera of the present inventionThe camera can be connected to external devices and various operations of the camera.
Camera having a microcomputer having a subroutine for executing the operation function
At The microcomputer may further reduce communication by the external device.
Read and write any memory contents in the microcomputer, and any
A communication subroutine for executing the subroutine, When the continuous communication mode is set by the external device, the communication subroutine is repeated.
By repeatedly executing, the continuous communication state by the communication subroutine is maintained.
Holding Under this communication state, reading or writing of the arbitrary memory contents or the arbitrary subroutine
Run the routine When the camera is connected and a continuous communication mode release signal is supplied
The communication subroutine ends. (3) The camera of the present inventionThe camera can be connected to external devices and various operations of the camera.
Camera having a microcomputer having a subroutine for executing the operation function
At The microcomputer may further reduce communication by the external device.
Read and write any memory contents in the microcomputer, and any
A communication subroutine for executing the subroutine, When the continuous communication mode is set by the external device, the communication subroutine is repeated.
By repeatedly executing, the continuous communication state by the communication subroutine is maintained.
Holding Under this communication state, reading or writing of the arbitrary memory contents, or the Execute the desired subroutine Check that the camera is connected to an external device.
This check terminal has one of two levels.
If a signal is applied, repeat the communication subroutine and check
When the other level signal is applied to the communication subroutine, the communication subroutine ends. (4) The camera of the present inventionThe camera can be connected to external devices and various operations of the camera.
Camera having a microcomputer having a subroutine for executing the operation function
At The microcomputer may further reduce communication by the external device.
Read and write any memory contents in the microcomputer, and any
A communication subroutine for executing the subroutine, When the continuous communication mode is set by the external device, the communication subroutine is repeated.
By repeatedly executing, the continuous communication state by the communication subroutine is maintained.
Holding Under this communication state, reading or writing of the arbitrary memory contents or the arbitrary subroutine
Run the routine Adjustment of external devices that are cameras and under communication subroutines
A storage unit that can rewrite the adjustment data obtained according to the data detection program
Writing means for writing data into the storage unit, and adjusting means based on the adjustment data written in the storage unit.
Means for adjusting the camera function. (5) The camera according to the present invention is the camera described in (4) above, and
The stage comprises means for writing the battery check voltage to the memory, and the adjusting means comprises
A battery checker that compares the written data with the detected value of the power supply voltage of the camera.
It has a step. (6) The camera of the present invention is the camera described in (4) above, and
The stage has means for writing AF adjustment data to the storage unit, and the adjustment means is written to the storage unit.
The target driving position of the photographing lens is determined based on the obtained data and the distance measurement data. 〔Example〕   Hereinafter, an embodiment of a camera according to the present invention will be described with reference to the drawings.   FIG. 1 is a block diagram schematically showing one embodiment. One-chip microcomputer
An external device 2 is detachably connected to a camera 1 having a CPU 10 composed of data. CPU
Reference numeral 10 denotes a program for controlling various operations of the camera 1 as a subroutine.
The camera 1 has an external (EXT) terminal 3, and the camera 1 and an external device are connected via the EXT terminal 3.
2 is connected. This enables communication between the camera CPU 10 and the external device CPU 4.
Become.   The external device 2 has an operation switch 5 and a display unit 6 in addition to the CPU 4. With external device 2
Pre-shipment camera adjustment equipment and optional adapters
Data equipment.   FIG. 2 shows the connection between the camera CPU 10 and the external device 2. CHECK1 terminal of camera CPU10
Is normally at the “H” level, and the external device 2 checks the CHECK1 terminal before communicating with the camera.
Set the child to “L” level. Therefore, CPU10 must detect the level of the CHECK1 pin.
Accordingly, it can be determined whether or not the external device 2 has issued a communication request.   A clock CLK for communication is generated from the camera 1, and the external device 2
The communication contents (coded data) are transferred to the CPU via the data line DATA in synchronization with the clock CLK.
Send to 10. This data line DATA is a bidirectional serial communication line.   The details of the camera 1 are shown in FIG. The CPU 10 controls the operation of the entire camera and
The lock is supplied from the oscillation circuit 20, and the operation is opened by a reset from the reset circuit 22.
Begun. The reset circuit 22 is turned on when a battery is inserted and when a power switch (not shown) is turned on.
Operates during on / off operation.   The E2-PROM 24 stores the number of frames, camera status data (winding, rewinding, etc.), abnormal data (
Fault location), adjustment data (shutter control correction data, auto focus correction data)
Data for each camera such as data and battery check data)
Memory. Therefore, even if the battery is removed for replacement, these data
Is valid. Also, The reset operation of the reset circuit 22 is prohibited while data is being written to the E2-PROM 24.
You.   When the E2-PROM 24 is set to the read mode, the DX code is first input from the DX terminal 26,
The data is input to the CPU 10 via the serial line 28. Then, the data of E2-PROM24
Is transferred to the CPU 10.   The AF sensor (AFIC) 30 is, for example, a phase-difference sensor, and outputs distance data to the CPU 1.
Supply 0. When the photometry value is lower than a certain value, the CPU 10 adjusts to the operation of AFIC30.
The auxiliary light source 32 is turned on.   E2-PROM24, EXT terminal 3 and AFIC30 are used to effectively use the input / output port of CPU10.
Are connected to the same serial line 28 to exchange data with the CPU 10
It is done by communication.   The operation switch group 34 includes various operation switches of the camera, and a release switch.
, A mode changeover switch and the like. LED group 36 is the LED in the viewfinder,
It consists of LEDs for ROBO light emission notice and focus indication. LCD38 is the LCD on the camera surface,
Displays the number of frames, camera mode, etc.   The interface (IFIC) 40 is used to transmit signals to and from the motor driver 50 and the photometric unit 42.
Transmission, power supply to LCD 38, charging of strobe 64, and battery check
Check. In FIG. 3, the power supply is not shown. In addition,
The face 40 has a shutter motor (Ms) 44 and a hoisting motor (M
w) Interface with decode function to select 46, zoom motor (Mz) 48
Is. The decoding function is based on the average metering and spot metering in the metering unit 42.
Switching. These motors 44, 46, 48 are the decode signals of interface 40
Is driven via the motor driver 50.   The shutter motor 44 drives the lens for autofocus during forward rotation, and
The shutter is driven. Here, it is assumed that a lens shutter is employed as the shutter.
You.   At the time of auto focusing, CPU10 calculates the distance data obtained by AFIC30. The motor 44 is rotated forward to the target position obtained by calculating the adjustment data of the E2-PROM 24 and the
Drive the focusing lens. Here, the reset position of the focusing lens
Is confirmed by turning on the switch (AFs) 52, and the lens position is
54 pulses of photointerrupters (PIs) that generate one pulse per unit movement of the lens
Is confirmed by the number of resources.   That is, the CPU 10 refers to the output of the photo interrupter (PIs) 54 and
Controls forward rotation, brake, and off, and stops the focusing lens at the target position
Let it.   The reset position of the motor 44 at the time of shutter control is when the switch (AEs) 56 is on.
It is confirmed that the duty drive ratio can be changed by the adjustment data in E2-PROM24.
Is controlled so as to maintain a constant aperture waveform.   The winding motor 46 winds the film during forward rotation and rewinds the film during reverse rotation.
U. The winding control of one frame of the film covers the number of pulses of the photo interrupter (PIw) 58.
This is done by counting.   For the photo interrupters 54 and 58, a shutter motor 44 and a winding motor 46 are selected, respectively.
ON only when selected, the outputs of photointerrupters 54 and 58 are output via IFIC40.
The noise is digitally removed and input to the CPU 10. This is a photointerler
If the outputs of the plugs 54 and 58 are directly input to the CPU 10, errors may occur in the count value due to noise.
This is because it may be frustrated.   The zoom motor (Mz) 48 zooms the lens and the zoom position is the zoom encoder.
You can find out by DA60.   The date module 62 is for imprinting data such as date and time on a film.
. The strobe 64 is also connected to the CPU 10.   Next, the operation of this embodiment will be described. First, referring to FIG. 4 to FIG.
The operation of the CPU 10 of the external device will now be described, and then the C of the external device will be described with reference to FIGS. 24 to 27.
The operation of PU4 will be described.   FIG. 4 shows the flow of the "power-on reset" routine of the camera CPU 10. This routine is started by a reset operation of the reset circuit 22.
. That is, when the power is turned on or when the power switch is turned on / off.
The camera first executes this routine.   In step 102, the initial setting of the input / output ports of the CPU 10 and the internal RAM is performed.   In step 104, the CHECK1 pin is at “L” level, that is, a communication request is issued from an external device.
Determine if it is being produced. If the CHECK1 pin is at “L” level,
At 06, the subroutine "communication 1 with external device" (FIGS. 22 (a) and (b)) is executed.   If the CHECK1 pin is not at “L” level, or if the subroutine “
When the "Communication 1" is completed, the subroutine "E2-PROM reading" is
) To write the camera status data and adjustment data from the E2-PROM 24 to the RAM of the CPU 10.
Be included. Only here can the camera be operated. If you wind up, rewind
, If you run out of batteries or turn off the power switch during idle feed,
Although the operation is interrupted, it is necessary to know the state before the interruption when the power is turned on again.   Referring to the battery check data read from E2-PROM 24, in step 110
Execute the subroutine "battery check" (FIG. 17).   Next, referring to the camera status data read from the E2-PROM 24,
Check your condition. Back cover switch linked to opening / closing the back cover of the camera in step 112
, It is determined whether the back cover is closed. If closed, step
At 114, it is determined whether or not rewinding is in progress. If rewinding is in progress, subroutine
Perform “Rewind”.   If no rewinding is being performed, it is determined in step 118 whether or not the idle feeding is being performed. Empty feed
In the case of, a subroutine "jump feed" is executed in step 120.   If the idle feeding is not being performed, it is determined in step 122 whether the winding is being performed. If the film is being wound, the subroutine "One frame winding" (FIG. 11) is executed in step 124.
I do.   If the camera back is not closed, the subroutines "Rewind",
Or, if "One-frame winding" is completed or not being wound, step 12
At 6, it is determined whether the power switch is on.   If the power switch is on, the LCD 38 is turned on in step 128, and the
To execute the subroutine "strobe charge". This is always flash photography
This is in order to make it possible to cast shadows. In step 132, a 90 second timer is set.
This timer limits the display time of the LCD 38 to 90 seconds. However, described later
If the user performs any switch operation during display, as shown in FIG.
The second timer is set.   In step 134, interrupt by back cover switch (BK), rewind switch (RW)
Interrupts from various operation switches (KEYG) such as mode selection switches, etc.
And the acceptance of interrupts by the timer (65.5 milliseconds) are enabled.   In step 136, the mode is set to the halt mode. During the halt operation, the operation of the CPU 10 is stopped.
However, the clock oscillation of the oscillation circuit 20 is performed, and the LCD 38 can display for 90 seconds.
. The standby release during this halt operation is performed by the interrupt enabled in step 134 described above.
Valid only when an error occurs.   If the power switch is not on, turn off the LCD 38 in step 138 and
At 140, only the BK interrupt and RW interrupt are permitted, and at step 142, the stop mode is set.
To cancel standby in stop operation, the interrupt enabled in step 140 occurred.
Valid only if:   FIGS. 5A and 5B are flowcharts of the "standby release" routine.
An interrupt has occurred during the default operation (step 136) or the stop operation (step 142).
Started at the time. Thus, in this embodiment, the halt mode, the stop mode
Regardless of standby release After that, it shifts to the same routine. This is the operation after the standby is released by the vector interrupt.
If each operation is defined, interrupts are also generated by noise, preventing malfunctions.
And to simplify the process when the standby is canceled by mistake.
.   In step 150, the input / output port of the CPU 10 and the internal RAM
Perform initial set. Subroutine "E2-PROM read" in step 152 (Fig. 12)
Execute This is to compensate for the case where the contents of RAM change due to noise.
is there.   At step 154, it is determined whether the interrupt that started this routine is a BK interrupt. B
In the case of a K interrupt, it is determined in step 156 whether the back cover is closed. Back lid closed
If so, a subroutine "jump feed" is executed in step 158. Subroutine
When the chin “Jumping” is completed, return to step 126 and change the state of the power switch.
To check.   If the back cover is not closed, execute the subroutine "back cover open" in step 160.
, The number of frames, and the camera status data are reset. After the end of the subroutine Open
Return to step 126. If the back is neither open nor closed, determine that there is noise
.   If it is not a BK interrupt, or if it is determined that there is noise, step 162
To determine if it is an RW interrupt. In the case of an RW interrupt, the rewind switch is
Judge whether the switch is on. If the rewind switch is on, the
Execute the routine "Rewind". Step after the end of the subroutine "Rewind"
Return to 126.   If not a RW interrupt or if the rewind switch is not on,
In step 168, it is determined whether or not a timer interrupt has occurred. In the case of a timer interrupt, go to step 170
The subroutine "display timer count" (FIG. 6) is executed. That is,
The "display timer count" is executed every 65.5 milliseconds. Subroutine "Display
After the "timer count" ends, the process returns to step 134.   If it is not a timer interrupt, rewinding ends in step 172 or empty It is determined whether the forwarding has failed. If rewinding is not completed, and if
In step 174, it is determined whether the power switch is on. End of rewind, unsuccessful feed failure
If not, or if the power switch is not on, the process returns to step 126.   If the power switch is on, determine if it is a KEYG interrupt in step 176
. If the interrupt is not a KEYG interrupt, it is determined in step 178 whether the LCD is being displayed. LCD table
If not, enable the BK, RW, and KEYG interrupts in step 180, and
Go to top mode. In this mode, even if the power switch is on, 90 seconds
This is a case where the LCD 38 is turned off because the user has not performed any operation. Power switch
When the switch is on, the LCD 38 returns to the display state when the user performs some operation.
You.   In the case of a KEYG interrupt, even if the status of the KEYG port changes due to noise, the switch
KEYG port in step 184 so that it can accept
Switch to In step 186, the LCD 38 is turned on.   In step 188, whether the release button has been pressed down one step (first step release)
judge. In the case of the first release, the subroutine "release processing" is performed in step 190.
(See FIG. 8).   If it is not the first release, it is determined in step 192 whether or not it is in the macro state.
If it is not in the macro state, zoom in or zoom out in step 194
Determine whether For zoom up or zoom down, go to step 196
Execute the subroutine "zoom processing".   When the subroutine "release processing" or "zoom processing" is completed,
Execute the lens reset subroutine at step 197 and focus the lens
To the reset position.   When the subroutine "lens reset" is completed, the process returns to step 126.   If you are in a macro state, or not zoomed up or down,
At step 198, it is determined whether the macro switch is on. Switch on
In step 200, a subroutine "macro processing" is executed in step 200. Subroutine
If the "macro processing" is completed, the process returns to step 126.   If the macro switch is off, check the camera mode switch,
In step 202, it is determined whether the first mode switch is on, and the first mode switch
Is ON, a subroutine "self mode" is executed in step 204. Sa
The routine “Self mode” switches the shooting mode to the normal mode and the self mode in order.
Change. When the subroutine "Self Mode" is completed, the process returns to step 126.   If the first mode switch is off, then in step 206 the second mode switch is turned off.
It is determined whether or not the second mode switch is on, and if
Execute the "photometry mode" routine. The subroutine "Metering mode"
Metering, spot metering, spot highlight metering, spot shadow metering
Switch. When the subroutine "photometry mode" is completed, the process returns to step 126.   If the second mode switch is off, the third mode switch is turned off in step 210.
If the third mode switch is on, the subroutine is executed in step 212.
Execute "Strobe mode". Subroutine "strobe mode" emits light
The mode is switched sequentially between automatic flash, forced flash (daylight sync), and flash disabled. Sable
If the routine “strobe mode” has been completed, the process returns to step 126.   If the third mode switch is off, then in step 214 the fourth mode switch is turned off.
If the fourth mode switch is on, the subroutine is executed in step 216.
Execute the "camera mode" (FIG. 7). In the subroutine "Camera Monide"
The camera mode is standard (one frame), auto zoom, continuous shooting, multiple exposure (two) shooting,
順次 Switch to the mode sequentially. If the subroutine "camera mode" is completed,
To 126 Return.   If the fourth mode switch is off, the process returns to step 134.   FIG. 6 shows a subroutine "display timer count" (step 170 in FIG. 5 (a)).
It is a flowchart of FIG. In step 230, it is determined whether the CHECK1 terminal is "L".
If the CHECK1 terminal is “L”, the subroutine “Communication 1
(FIGS. 22 (a) and 22 (b)). Therefore, the subroutine "Communication with external device
1 ”can be executed every 65.5 milliseconds.
It is impossible to continuously execute “communication 1 with device”. As described later,
A program to continuously execute the routine “communication 1 with external device” is provided separately.
Have been.   If the CHECK1 pin is not "L" or the subroutine "Communication 1 with external device"
Is completed, it is determined in step 234 whether 90 seconds have elapsed. 90 seconds have passed
In this case, the process returns to step 180 (FIG. 5 (a)) to enter the stop mode. 90 seconds have not passed
If not, a subroutine "LCD blinking process" is executed in step 236. Here, LC
D38 warning display etc. is turned on / off at intervals of 65.5 ms divided by a fixed amount and flashes
. After the subroutine "LCD blinking process" ends, the process returns to step 134.   FIG. 7 is a flowchart of the subroutine "camera mode" (step 216 in FIG. 5B).
It is a chart. In step 240, the mode RAM (MRAM) is incremented (MRA
M ← MRAM + 1). At step 242, it is determined whether the MRAM is 5 or more. MRAM of 5 or more
In this case, the mode RAM is reset in step 244 (MRAM ← 0). That is, MRAM
Data 0, 1, 2, 3 and 4 are standard, auto zoom, continuous shooting, multiple exposure, each camera mode of ∞
Corresponding to   FIG. 8 is a flowchart of the subroutine "release processing" (step 190 in FIG. 5B).
It is a chart. At step 250, it is determined whether the CHECK1 terminal is "L". CHECK1
If the terminal is “L”, the subroutine “communication with external device 2” (second
(2) Execute (a) and (b)).   If the CHECK1 terminal is not "L" or the subroutine "Communication with external device 2"
Is completed, a subroutine "photometry" is executed in step 254.   At step 256, it is determined whether or not the mode is the mode. In the case of ∞ mode, go to step 258
Set ∞ data as distance data. Subroutine "Ranging" in step 260
Execute   If data is set as distance data, or subroutine "Ranging"
Is completed, it is determined in step 262 whether or not the mode is the auto zoom mode. Auto
In the case of the zoom mode, the subroutine "auto zoom" is executed in step 264.
You. The subroutine “Auto Zoom” always keeps the person constant regardless of the shooting distance.
The zoom position is automatically set in accordance with the distance data so that the image is shot at the desired size.   If not in the auto zoom mode, the subroutine "auto zoom" is terminated.
In step 266, the subroutine "AF (lens extension)" (FIG. 9) is executed and
The focus lens is driven to the in-focus position. In step 268, the subroutine "exposure calculation
] Is executed.   Whether or not all the release buttons have been pressed in step 270 (second release)
judge. If it is not the second release, check in step 272 if it is the first release.
Is determined. In the case of the first release, the flow returns to step 270. In this state, the AF lock
It is in the state of the lock. When the first release is released, the routine returns to the original routine.   In the case of the second-stage release, the photographing operation is started.
Execute “battery check” (FIG. 17). As described later, if there is no battery
Here, the operation is stopped.   At step 276, it is determined whether the mode is the self mode. In self mode,
In step 278, it is determined whether the first mode switch is on. The first mode switch
If it is on, return to step 126 (Fig. 4) and check the state of the power switch
I do. That is, the self-waiting state is set by turning on the first mode switch.
Can be canceled on the way You.   If the first mode switch is off, the self-timer (12 seconds)
It is determined whether or not the count up (end). Step if not counting
Return to 278.   If the mode is not the self mode or if the counting is completed,
The routine “exposure” is executed, and the shutter operation is performed. In flash mode
Here, the strobe emits light.   In step 284, it is determined whether the mode is the multiple exposure mode. In the multiple exposure mode,
At step 286, it is determined whether or not the multiplex one sheet flag is set. Multiplex 1
If the lag is not set, the multiplex one-sheet flag is set in step 286.
. At step 290, the subroutine "E2-PROM writing" (Fig. 16) is executed, and the original
Return to the routine. Thereby, the multiplex one-sheet flag is written into the E2-PROM 24. Multiplex 1
If the lag is set, the multiplex single sheet flag is reset in step 292.
.   If the mode is not the multiple exposure mode or if the multiple single image flag is reset,
In step 294, it is determined whether there is a film. If there is a film, step 296
To execute the subroutine "One frame winding" (FIG. 11).   When there is no film, or when the subroutine "One frame winding" is completed
In step 298, it is determined whether the mode is the continuous shooting mode. Step 270 for continuous shooting mode
The continuous shooting continues as long as the release button is pressed. In continuous shooting mode
If not, return to the original routine.   FIG. 9 is a flowchart of the subroutine "AF (lens extension)" (step 266 in FIG. 8).
It is a chart. In step 302, the timer is reset. Distance measurement data in step 303
Lens and the E2-PROM adjustment data to determine the lens extension target position. Step 30
In step 4, the shutter motor Ms is rotated forward to drive the focusing lens.   In step 306, the output of the photointerrupter PIs falls (pulse Has been generated). If it falls, count at step 308
Count up. Using this count value, the focus
It is determined whether the lens is extended to the target position. Extend to target position
If not, the process returns to step 306.   If it has been extended to the target position, the rotation of the shutter motor Ms is started in step 312.
Stop. At step 314, the AF lens flag is reset. Sable at step 316
Execute the routine "E2-PROM writing" (Fig. 16). After this, return to the original routine
.   If the output of the photointerrupter PIs has not fallen in step 306,
In step 318, it is determined whether one second has elapsed since the fall of the photo interrupter.
If one second has not elapsed, the process returns to step 306. If one second has passed, it is determined to be abnormal
Then, in step 320, the rotation of the shutter motor Ms is stopped. AF lens
The lugs are set in step 322.   In step 324, a subroutine "E2-PROM writing" (FIG. 16) is executed. Step
In step 326, a subroutine "damage processing" (FIG. 10) is executed.   FIG. 10 is a flowchart of a subroutine "damage processing". Step 32
2. Turn off all actuators. In step 334, the port is initially set.
In step 336, a 90 second timer is set. Determine if 90 seconds have elapsed in step 338.
Set.   If 90 seconds have elapsed, the stop mode is set in step 340. Step 340 is
Even if the stop mode is canceled due to noise,
The stop mode cannot be canceled by entering the stop mode.
You. Naturally, the initial setting of ports and the release of stop
Needless to say, it is even better if a permission order is inserted.   If 90 seconds have not elapsed, check in step 342 if the CHECK1 pin is "L". Determine whether If the CHECK1 terminal is “L”, the subroutine “
22 (FIGS. 22 (a) and (b)). Due to this, during camera abnormal
However, communication with an external device is possible.   If the CHECK1 pin is not "L" or the subroutine "Communication with external device 3"
Is completed, the timer interrupt is enabled in step 364, and the
Become a code. When the halt mode is released by a timer interrupt,
Return. This subroutine operates until a power-on reset.   FIG. 11 shows a subroutine "winding one frame" (step 124 in FIG. 4, step in FIG. 8).
It is a flowchart of step 296). At step 370, it is determined whether or not winding is in progress. roll
If not, the winding counter is reset in step 372. Step 3
At 74, the winding flag is set. Subroutine "E2-PROM writing" in step 376
16 (FIG. 16), and writes the winding flag in the E2-PROM 24. This is winding
This is to restore the previous state even if the power is turned off during the operation.   If winding is in progress or if the subroutine "E2-PROM writing" is
At step 378, the winding motor Mw is rotated forward to wind the film.   In step 380, the output of the photo interrupter PIw falls (one pulse is generated).
Is determined. If it falls, the winding counter is counted in step 382.
Und up. Using this count value, one-frame winding is completed in step 384.
It is determined whether or not it has been done.   If the output of the photo interrupter PIw is not falling, or the winding of one frame is finished.
If not, it is determined in step 394 whether or not it is the film end. fill
The time end is when the output of the photointerrupter PIw does not change for more than 2 seconds. H
If the film end is not reached, the process returns to step 380.If the film end is reached, the process returns to step 380.
The subroutine "rewind" is executed in step 396.   When the winding of one frame is completed, in step 386, the winding motor Mw Stop rotation. In step 388, the frame number counter is counted up. Step 3
At 90, the winding flag is reset. In step 392, the subroutine "E2-PROM
16 (FIG. 16), and the winding flag (reset) is written to the E2-PROM 24.
Thereafter, the process returns to the original routine.   Note that the subroutine “Skip Feed” starts after loading the film and closing the back cover.
It winds several frames of film dynamically, and performs the subroutine "One frame winding" several times.
It is executed continuously. Subroutine "Rewind" is also subroutine "One piece winding
In this case, the winding motor is reversed until the film stops.   FIG. 12 shows a subroutine "E2-PROM read" (step 108 in FIG. 4, FIG.
15) is a flowchart of step 152). In step 402, the address of E2-PROM24 is
Is reset to 1 and the mode of the E2-PROM 24 is set to the read mode in step 404.
. In step 406, the CPU 10 is set to the serial communication input mode, and in step 408, the RAM address is set.
Set the EP in the service (ADR).   Here, the contents of each RAM address are as shown in FIG. Each data is
It is 8-bit data, and each bit of the camera status data at RAM address EP + 1 is
The contents are shown in Fig. 14, and the contents of each bit of the abnormal data at RAM address EP + 2 are shown in Fig. 15.
As shown.   At step 410, eight bits of data are serially input from the E2-PROM 24, and the E2-PROM
Increment the address of M24.   In step 412, the serial input data is set to a RAM address (ADR). Stay
In step 414, the RAM address is incremented. In step 416, the RAM address is E2-
It is determined whether the number of data in the PROM 24 has been exceeded. If exceeded, return to the original routine
If not, the process returns to step 410, and the 8 bit data of the next address is
Serial input.   FIG. 16 shows the flow of the subroutine "E2-PROM writing" (step 290 in FIG. 8, etc.).
It is a chart. In step 422, reset E2-PROM24. And the address of the E2-PROM 24 is set to 1. In step 424, write E2-PROM24
Set to mode. In step 426, set the serial communication output mode.
To set EP to RAM address (ADR).   At step 430, set the data of ADR address to the serial out register of CPU10.
, Serially outputs in step 432, and transfers eight bits of data to the E2-PROM 24.
. In step 434, the RAM address is incremented.   In step 436, it is determined whether the RAM address has exceeded the number of data in the E2-PROM 24.
. If so, return to the original routine.If not, return to step 430.
8 bits of the data of the address are serially output.   FIG. 17 is a flowchart of a subroutine "battery check" (step 110 in FIG. 4).
It is a chart.   In the battery check, as shown in FIG. 18, the power supply voltage VDD in the camera is
The voltage divided by R2 is converted to a digital value by the A / D converter built in CPU10, and this is converted to E2
-Performed by comparing with battery check data stored in PROM24.
It is. Here, since the values of the resistors R1 and R2 vary for each camera,
Before loading, calculate the A / D conversion value of the power supply voltage VDD for each camera, and adjust the
Battery check data) is written in the E2-PROM 24. This writing program
The program is stored in an external device, and this program is executed by communicating with the external device.
I do.   The reference voltage Vref for A / D conversion is supplied from the IFIC 40 according to a command from the CPU 10.
.   At step 440, a subroutine "battery value A / D conversion" is executed. Step 442
It is determined whether the A / D conversion value is equal to or larger than the adjustment value. If the adjustment value is not exceeded,
At step 444, a subroutine "display without battery" is executed. In step 446, the key lock
Step 448 sets the stop mode. In this case, too,
ing. This is Return to the low current consumption mode (stop) immediately even if the stop is canceled due to noise
That's why.   If it is not less than the adjustment value, the A / D conversion value is equal to or more than [adjustment value + fixed value] in step 450
Is determined. If not more than [adjustment value + fixed value],
Set the low flag and return to the original routine. If it is more than [adjustment value + fixed value]
If not, in step 454, the low battery flag is reset, and the routine returns to the original routine.   Next, communication with an external device will be described.   FIG. 19 is a diagram for explaining various modes of communication according to this embodiment. First,
The communication mode can be broadly divided into a standard mode and a utility mode. This
These are classified by the mode designation code SYAD2 generated from the external device, and SYAD2 =
In the case of 0,1,15, it is the standard mode. In the case of SYAD2 = 2, it is the utility mode.
is there. 0, 1, and 15 of SYAD2 are the upper available addresses of the RAM built into CPU10.
Equivalent to a dress. In the standard mode, the mode designation code CKDT is "read" or "write"
The mode is subdivided into RAM read mode and RAM write mode.
Mode is the subroutine call mode (SYAD = 0) using the mode designation code SYAD,
Pump mode (SYAD = 1), continuous communication mode (SYAD = E), continuous communication release mode (SYAD
= D).   The format of communication data between the camera and the external device is constant. As an example
Communication data between the CPU 10 and the external device in the RAM read mode and RAM write mode.
The data formats are shown in FIGS. 20 and 21, respectively. In the figure, out is
Data transmitted from the camera to the external device.
Data to be communicated to   Synchronized with the clock CLK generated from the camera CPU 10 via the data line DATA
Data is communicated. Here, communication with the external device depends on which routine
It is classified into communication 1 to communication 3, and first, a synchronization signal for identifying these is
RAM read mode or RAM write mode Output from the CPU 10 regardless of the mode. The synchronization signals of communication 1, communication 2, and communication 3 are
Each consists of 2, 3, or 4 pulses.   Here, communication 1 is performed during the "power-on reset" routine (FIG. 4) and the "display
Timer count ”routine (FIG. 6), and communication 2 is subroutine.
8 is communication during the “release processing” (FIG. 8), and communication 3 is a subroutine “
Damage processing ”(FIG. 10).   In this way, by changing the synchronization signal depending on the time of communication, for example,
It is possible to perform a specific control by performing communication only during the release with the release.
The camera function can be expanded. Also, during normal camera sequence or damage processing
You can easily judge whether it is reasonable.   In the RAM read mode, as shown in FIG. 20, a mode signal follows the synchronization signal.
Constant code CKDT (4 bits), SYAD2 (4 bits), SYAD (8 bits) from external device
Communicated to the camera. SYAD2 and SYAD are RAM read addresses. Next input data
Data (8 bits) is undefined, after which data read from RAM
Communication with the external device.   In the RAM write mode, as shown in FIG. 21, a mode signal follows the synchronization signal.
Constant codes CKDT, SYAD2, SYAD, and write data SYDT are communicated from the external device to the camera.
Then, SYDT is written to the RAM address indicated by SYAD2 and SYAD. Then check
The code POFCK is communicated from the external device to the camera. This is the check code
Since the host operates the RAM in the CPU 10, it is necessary to check whether communication has been completed normally to the end.
I agree.   A flowchart of communication with an external device in such a format is shown in FIG.
a) and (b). FIGS. 22 (a) and 22 (b) show a subroutine "communication 1 with external device",
"Two" and "Third" are shown together. For communication 1 with an external device,
In step 502, 2 is set to N. In the case of communication 2 with an external device, N is set to N in step 504.
3 is set, and in the case of communication 3 with an external device, N is set to 4 in step 506.
. After this, At step 508, a synchronization pulse is output N times.   In step 510, the CPU 10 is set to the serial communication input mode.
Eight LKs are generated, and eight bit data from an external device are serially input. Step
In step 514, the serial input data is written to the CKDT and SYAD2 addresses of the RAM. Step 516
To input the next data serially. In step 518, the serial input data is
Write to AD address. At step 520, the next data is serially input. Step 5
At 22, the serial input data is written to the SYDT address of the RAM.   In step 524, a read (read) mode or a write (write) mode is performed based on CKDT.
Mode. In the case of the read mode, the SYAD2 and SYAD addresses are
Is set in the serial buffer. In step 528, the serial communication output mode
In step 530, the data (read data in FIG. 20) is sent to an external device.
Serial output, and then return to the original routine.   In the write mode, the next data is serially input at step 532, and the
In step 534, it is determined whether the input data is a check code (POCKF). Input data
If the data is not a check code, a serial communication error occurs and the
Return to   If the input data is a check code, set SYAD2 to 0, 1, or 15 in step 536.
Is determined. If SYAD2 is 0, 1, 15
Judgment, write data of SYDT address to SYAD2, SYAD address in step 538,
Then, the process returns to the original routine.   If SYAD2 is not 0, 1, or 15, it is determined at step 540 whether SYAD2 = 2.
Is determined. If SYAD2 is not 2, a serial communication error occurs and the original routine is executed.
Return to If SYAD2 = 2, it is determined that the mode is the utility mode.
It is determined whether SYAD = 0.   If SYAD = 0, determine subroutine call mode and step At 544, the data in the RAM buffer is transferred to the register. In step 546, the subroutine
Routine call ”(FIG. 23). Step 548: Register data in RAM
After moving to the buffer, return to the original routine. Where the RAM buffer is used
The reason is that when executing a subroutine continuously in the continuous communication mode described later,
The contents of the register immediately after the execution of the subroutine are used when the next subroutine is executed
That's why. In other words, the subroutine using the register value as an argument continues.
Can be executed.   If SYAD is not 0, it is determined in step 550 whether SYAD = 1. SYAD = 1
In the case of, it is determined that the mode is the jump mode.
You. In the case of the continuous mode, the stack corresponds to one subroutine (the continuous mode described later).
In “Communication with External Devices 1” (step 562), the
The tack pointer is returned by one subroutine, and the process proceeds to step 556. Continuous mode
If not, the process immediately proceeds to step 556. Add RAM to stack in step 556
Data (BRADR). Then, if there is a return instruction
To move the contents of the (BRADR) that had been moved to the stack to the program counter
Jump to the address indicated by (BRADR).   If SYAD is not 1, it is determined in step 558 whether SYAD = E. SYAD = E
In step 560, it is determined that the communication mode is the continuous communication mode.
You. If not in the continuous mode, the subroutine "Communication with external device" is executed in step 562.
Shin 1 ”is executed. At step 564, it is determined whether the CHECK1 terminal is "L". CHECK1
If the terminal is at "L", step 562 is executed again. This allows the camera and external
Communication with the device becomes possible continuously. That is, it is in the continuous mode. Continuous mode
If it is in the middle, to prevent the continuous mode, or the EXT terminal 3 should be
If the CHECK1 terminal is not “L” because the external device 2 stops communication or
Return to the original routine.   If SYAD = E is not satisfied, it is determined in step 566 whether SYAD = D. SYAD = D
In the case of, it is determined that the continuous communication release mode is set.
Set. If in the continuous mode, the stack pointer is moved one subroutine at step 570.
Chin (“communication with external device 1” in continuous mode (step 562))
Return to the original routine. If SYAD = D or not in continuous mode
, And immediately return to the original routine.   Fig. 23 shows a subroutine "subroutine call" (step 546 in Fig. 22 (b)).
It is a flowchart of FIG. Here, as shown in step 574, the RAM
Set the data indicated by the address (BRADR).
Program counter (BRADR) according to the contents of (BRADR) set in the tack
By changing to the address indicated by, the subroutine indicated by (BRADR) is executed.
Run. The stack still returns to the subroutine call (step 546)
Address at the address indicated by (BRADR) at the end of the subroutine.
To the next step 548 following the “subroutine call” (step 546)
Grams transfer (back).   Next, various functions are realized using the above-described camera CPU10 program.
An operation example of the CPU 4 on the external device side will be described.   Fig. 24 shows the flow of the subroutine "Battery check voltage adjustment" of the external device CPU4.
It is a chart. This is a subroutine "battery check" of camera CPU10.
This function writes the adjustment value to be referred to the E2-PROM 24 for each camera before shipment.   In step 602, the CHECK1 terminal is set to “L”, and a communication request is transmitted to the camera. Stay
In step 604, the continuous communication mode is set. That is, CKDT = “write”, SYAD2 = 2
, SYAD = E. In step 606, the communication condition is set to 1 (N = 2). Step 608
Reset the camera with
] Is started. In step 610, the subroutine "communication with camera" (Fig. 26) is executed.
Run.   As a result, the CPU 10 of the camera performs the first communication after the power-on reset (see FIG. 4).
In step 106), the continuous communication mode is set. Here, unless you set the continuous communication mode
The camera-side program proceeds to steps 108 and 110, and adjusts the adjustments that have not been adjusted yet.
A subroutine "battery check" is performed with the integer value. If the adjustment value is
If so, camera operation is locked in step 448 (Fig. 17).
Resulting in.   In step 612, data for turning on the IFIC 40 is set. In step 614, write
Set the mode. That is, SYAD2 = 15 (IFIC output upper address), SYAD = "IFIC
Output low address, SYDT = "IFIC on data", CKDT = "write".
In step 616, a subroutine "communication with camera" is executed.   As a result, the reference voltage Vref for A / D conversion shown in FIG. 18 is output from IFIC40.
Is forced.   At step 618, the RAM address of (BRADR) is set to SYAD2 and SYAD, and the subroutine is set to SYDT.
After setting the start address of “A / D conversion”, the subroutine “Camera
Communication with La ”is executed. That is, the start address of the subroutine "A / D conversion"
To the RAM address (BRADR). Subroutine call mode in step 622
Set the mode. That is, CKDT = "write", SYAD2 = 2, and SYAD = 0. Stay
In step 624, the subroutine "communication with camera" is executed.   As a result, the subroutine "A / D conversion" is executed, and the power supply voltage VDD of the camera is
A / D converted by U10.   In step 626, the read mode is set. That is, CKDT = “read”
You. In step 628, adjust values (battery check) calculated from the A / D conversion values to SYAD2 and SYAD.
Data). Execute subroutine "communication with camera" in step 630
I do.   Thereby, the battery check data is once read out to the external device side.   At step 632, RAM for writing battery check data to SYAD2, SYAD Set the address (EP + 3). In addition, the battery channel read in step 630 is
Check data is set in SYDT. At step 636, the write mode is set.
That is, CKDT = “write”. In step 638, the subroutine "Camera
Communication ”.   As a result, a battery check is performed on the RAM address (EP + 3) for writing E2-PROM.
Data is written.   In step 640, set the start address of the subroutine "E2-PROM writing" in SYDT.
To The RAM address of (BRADR) is set in SYAD2 and SYAD. Step 64
In step 4, the subroutine "communication with camera" is executed. In step 646, the subroutine
Mode. Execute subroutine "communication with camera" in step 648
.   Thereby, the battery check data is written into the E2-PROM 24.   Thereafter, the process returns to the original routine.   FIG. 25 is a flowchart of the subroutine “AF lens drive adjustment”. Above
In the camera CPU 10 subroutine "AF (lens extension)"
If the focusing lens does not move after 1 second, it is determined that the lens is abnormal.
However, like the battery check data, this reference time is used for each camera before shipment.
When the adjustment is made, the subroutine "AF lens drive adjustment" is executed.   In step 652, the start address of the subroutine "AF (lens extension)" is
Cut. The RAM address of (BRADR) is set in SYAD2 and SYAD. Steps
At 654, a subroutine "communication with camera" is executed. Subroutine at step 656
Set the call mode. Subroutine "communication with camera" in step 658
Execute.   Thereby, the subroutine "AF (lens extension)" is executed. At this time,
The switch (AFs) 52 used as the reference for driving the focusing lens with the measuring device
How many pulses the output of the photo interrupter (PIs) 54 will reach up to the reference position
Keep it.   In step 660, the number of synchronization signals is detected. Synchronization signal in step 662 It is determined whether or not the number is 4. If it is 4, an error message is displayed at step 664.
Go and end process. In other words, the lens drive became abnormal,
Absent.   If not, the AF adjustment data is set to SYDT in step 666, and (EP +
5) Set the RAM address. At step 670, the write mode is set. S
At step 672, the subroutine "communication with camera" is executed.   As a result, the AF adjustment data is written to the RAM address (EP + 3) for writing the E2-PROM.
Be included.   In step 674, set the start address of the subroutine "E2-PROM writing" in SYDT.
To The RAM address of (BRADR) is set in SYAD2 and SYAD. Step 67
In step 8, the subroutine "communication with camera" is executed. Subroutine in step 680
Mode. In step 682, execute the subroutine "communication with camera"
.   Thereby, the AF adjustment data is written into the E2-PROM 24.   Thereafter, the process returns to the original routine.   FIG. 26 is a flowchart of the subroutine “communication with camera” shown in FIGS. 24 and 25.
It is a chart. In step 673, it is determined whether there is a synchronization signal. Sync here
This step 673 is repeated until a signal is received, and the process waits. If there is a sync signal,
At step 675, it is determined whether the number of synchronization signals is one of 2, 3, and 4. Sync signal
If the number is not 2, 3, or 4, the process returns to step 673. If the number of synchronization signals is 2,3,
If it is any of 4, the serial communication output mode is set in step 677.
.   At step 679, CKDT and SYAD2 data are set in the serial buffer. Step 6
In step 81, the data in the serial buffer is synchronized with the clock CLK from the camera
Real output. In step 683, SYAD data is set in the serial buffer.
In step 684, the data in the serial buffer is serially output. SY in step 686
DT data Set in serial buffer. In read mode, SYDT is dummy data.
Good. At step 688, the data in the serial buffer is serially output.   At step 690, it is determined whether the mode is the read mode (CKDT = "read"). reading
If not, set the POFCK data to the serial buffer in step 692.
You. At step 694, the data in the serial buffer is serially output. Since then
Return to the routine.   If the mode is the read mode, set the serial communication input mode in step 696.
I do. In step 698, data from the camera (readout data in FIG. 20) is input serially.
Power. Then, the process returns to the original routine.   For other adjustment data (shutter adjustment data, etc.), similarly,
Can be adjusted for each camera before shipment by programming the CPU
It is. This makes it possible to correct various determinations regardless of camera variations due to parts and the like.
I can do it for sure.   Next, the operation of the external device as an optional device for extending the shooting mode will be described.
You. As an example, the subroutine "Multiple 4 shots" will be described with reference to FIG.
. This program operates the multiplex single shooting flag by an external device and
In the subroutine "Release Process", the multiple photographing routine (steps 286 to 2 in FIG. 8)
90) many times. That is, usually the first exposure is performed
And the multiple single shooting flag is set, and after the next exposure, the multiple single shooting flag is set.
If it is turned on, the film is wound up. Therefore, set after exposure
The external device clears the multiplexed single-image shooting flag that has been
Double shooting becomes possible.   In step 702, the number (multiplex number) counter is reset. CHEC at step 704
Set the K1 terminal to “L” and output a communication request to the camera. In step 706,
2 (N ← 3) to enter the release standby state.   At step 708, the continuous communication mode is set. Sub in step 710 The routine “communication with camera” is executed. This allows the user to release the switch.
In the subroutine "release process" (Fig. 8) executed when the switch is pressed.
Continuous communication with the camera is started. At this time, the camera is set to multiple exposure mode
Suppose you have   Here, since it is in the continuous communication mode, the program in the camera does not proceed,
At the beginning of the subroutine "Release process", you can freely change the camera status.
Wear.   In step 712, the communication condition is returned to 1 (N ← 2). However, continuous communication with the camera
Is continuing.   At step 714, the RAM read mode is set. RAM to SYAD2, SYAD in step 716
Set the read address EP + 1. In step 718, the subroutine "
Communication ”to read the camera status data from RAM.   In step 720, the multiple single shooting flag (6 bits of the camera status data) is cleared.
I do.   At step 722, the RAM write mode is set. RAM to SYAD2, SYAD in step 723
The address EP + 1 is stored in SYDT, and the camera status data with the multiplex single-frame shooting flag reset is stored in SYDT.
Set the data. In step 724, a subroutine "communication with camera" is executed.
The camera status data in which the multiple single shooting flag is reset is written to the RAM. to this
Thus, multiple four exposures can be performed. Set continuous communication release mode in step 726
I do. In step 728, the subroutine "communication with camera" is executed, and the camera
The gram is returned to the subroutine "release processing". After this, communication with the camera is interrupted
I do. Here, on the camera side, if the second-stage release is pressed,
Perform the exposure operation as the first sheet, and if the release has already been released,
Return to the routine. If it is exposed, the multiplex single shot flag will be set.
You can check it.   At step 730, a subroutine "RAM address EP + 1 read" is executed.   In step 732, it is determined whether or not the multiple single shooting flag is "1" (set). Multiple
If the single shooting flag is not "1", the release is interrupted (no exposure
), So the process returns to step 706. If the multiple single shooting flag is “1”, the exposure
Thus, in step 734, the number counter is incremented.   At step 736, it is determined whether or not the number counter is 3. Number of sheets counter is 3
If so, the process returns to step 706. In other words, it can be wound by the next "release processing"
And return. If the number-of-sheets counter is not 3, the continuous communication mode is set in step 738.
Set the mode. In step 740, a subroutine "communication with camera" is executed.
Here, the reason for setting the continuous communication mode is to change the contents of the E2-PROM.
If the communication mode is not set, the contents of the E2-PROM are always refreshed by the camera side routine.
(See FIG. 5 (a), step 152), the contents of the E2-PROM cannot be changed.
No.   In step 742, the multiplex single image capturing flag is reset. Write RAM in step 746
Set the mode. Here, RAM write address EP + 1 is set in SYAD2, SYAD
I do. SYDT is camera state data in which the multiple single shooting flag is reset. Stay
In step 748, a subroutine "communication with camera" is executed.   In step 750, set the start address of the subroutine "E2-PROM writing" in SYDT.
And set the RAM address of BRADR in SYAD2 and SYAD. Subroutine at step 752
Execute "communication with camera". Subroutine call mode in step 754
Is set. In step 756, a subroutine "communication with camera" is executed.   In step 758, the continuous communication release mode is set. Subroutine at step 760
Execute “communication with camera”.   In step 762, it is determined whether or not the number counter is 4. Number counter is not 4
If so, the process returns to step 706. If the number-of-sheets counter is 4, in step 764 CH
Set the ECK1 pin to “H” and return to the original routine. You.   As a result, if the camera CPU has only a built-in multiplex
Even in this case, by controlling the contents of the RAM of the camera CPU with an external device,
Multiple shooting can be performed.   Note that the present invention is not limited to the above-described embodiment, and does not depart from the gist of the invention.
Can be variously modified. For example, external devices, mainly those for shooting options
It may be configured as an IC card, not as an adapter device.
However, it is preferable because it is small and lightweight. The CPU is a one-chip microcomputer.
Data is not limited. 〔The invention's effect〕   As described above, according to the present invention, the external device can be connected to the external device by a command from the external device.
Continuous communication is possible, and built-in subroutines are combined in the desired order by an external device.
RA that can be executed continuously and stores the parameters of built-in subroutines
A camera is provided that can control the contents of M with an external device and can easily expand its functions.
You.

【図面の簡単な説明】 第1図はこの発明によるカメラの一実施例の概略を示すブロック図、第2図はカ
メラと外部装置との接続を示す図、第3図はカメラの詳細なブロック図、第4図
乃至第23図はカメラ内のCPUの動作を説明する図であり、第4図は『パワーオン
リセット』ルーチンのフローチャート、第5図(a),(b)は『スタンバイ解除』
ルーチンのフローチャート、第6図はサブルーチン『表示タイマカウント』のフ
ローチャート、第7図はサブルーチン『カメラモード』のフローチャート、第8
図はサブルーチン『レリーズ処理』のフローチャート、第9図はサブルーチン『
AF(レンズ繰出し)』のフローチャート、第10図はサブルーチン『ダメージ処理』
のフローチャート、第11図はサブルーチン『一駒巻上げ』のフローチャート、第
12図はサブルーチン『E2−PRM読出し』のフローチャート、第13図は各RAMアドレ
スに格納される内容を示す図、第14図はカメラ状態データの各ビットの内容を示
す 図、第15図は異常データの各ビットの内容を示す図、第16図はサブルーチン『E2
−PRM書込み』のフローチャート、第17図はサブルーチン『バッテリチェック』
のフローチャート、第18図はバッテリチェックのための回路接続を示すブロック
図、第19図はカメラの通信モードの種類を示す図、第20図はRAM読出しモードの
際のカメラと外部装置との通信フォーマットを示す図、第21図はRAM書込みモー
ドの際のカメラと外部装置との通信フォーマットを示す図、第22図(a),(b)は
サブルーチン『外部装置との通信1,2,3』のフローチャート、第23図はサブルー
チン『サブルーチンコール』のフローチャート、第24図乃至第27図は外部装置内
のCPUの動作を説明する図であり、第24図はサブルーチン『バッテリチェック電
圧調整』のフローチャート、第25図はサブルーチン『AFレンズ駆動調整』のフロ
ーチャート、第26図はサブルーチン『カメラとの通信』のフローチャート、第27
図はサブルーチン『多重4枚撮り』のフローチャートである。 1……カメラ、2……外部装置、3……外部端子、4,10……CPU、22……リセッ
ト回路、24……E2−PRM、28……シリアルライン、30……AFセンサ、34……操作
スイッチ、40……インターフェース、42……測光ユニット、44……シャッタモー
タ、46……巻上げモータ、48……ズームモータ、54,58……フォトインタラプタ
BRIEF DESCRIPTION OF THE DRAWINGS FIG. 1 is a block diagram schematically showing an embodiment of a camera according to the present invention, FIG. 2 is a diagram showing a connection between the camera and an external device, and FIG. 3 is a detailed block diagram of the camera. FIGS. 4 to 23 are diagrams for explaining the operation of the CPU in the camera. FIG. 4 is a flowchart of the "power-on reset" routine. FIGS. 』
FIG. 6 is a flowchart of a subroutine "display timer count", FIG. 7 is a flowchart of a subroutine "camera mode", FIG.
FIG. 9 is a flowchart of a subroutine “release processing”, and FIG. 9 is a subroutine “release processing”.
AF (lens extension) flowchart, Fig. 10 shows the subroutine "Damage processing"
FIG. 11 is a flowchart of a subroutine "winding one frame", and FIG.
FIG. 12 is a flowchart of a subroutine "E2-PRM read", FIG. 13 is a diagram showing contents stored in each RAM address, FIG. 14 is a diagram showing contents of each bit of camera status data, and FIG. FIG. 16 shows the contents of each bit of data.
-PRM writing "flowchart, Fig. 17 is subroutine" Battery check "
FIG. 18 is a block diagram showing a circuit connection for battery check, FIG. 19 is a diagram showing types of communication modes of the camera, and FIG. 20 is a diagram showing communication between the camera and an external device in the RAM reading mode. FIG. 21 is a diagram showing a communication format between the camera and an external device in the RAM write mode, and FIGS. 22 (a) and (b) are subroutines “Communication with external device 1, 2, 3”. 23 is a flowchart of a subroutine "subroutine call", FIGS. 24 to 27 are diagrams for explaining the operation of the CPU in the external device, and FIG. 24 is a flowchart of the subroutine "battery check voltage adjustment". FIG. 25 is a flowchart of a subroutine “AF lens drive adjustment”, FIG. 26 is a flowchart of a subroutine “communication with camera”, and FIG.
The figure is a flowchart of the subroutine "Multiple four shots". 1 camera 2 external device 3 external terminal 4,10 CPU 22 reset circuit 24 E2-PRM 28 serial line 30 AF sensor 34 ... Operation switches, 40 ... Interface, 42 ... Photometry unit, 44 ... Shutter motor, 46 ... Winding motor, 48 ... Zoom motor, 54,58 ... Photo interrupter.

Claims (1)

【特許請求の範囲】 【請求項1】外部装置と接続可能であると共に、カメラの種々の動作機能を実行
するサブルーチンを有するマイクロコンピュータを具備するカメラにおいて、 前記マイクロコンピュータは、更に、前記外部装置からの通信によって、少なく
とも前記マイクロコンピュータ内の任意のメモリ内容の読み書き、および任意の
サブルーチンを実行するための通信サブルーチンを有し、 前記外部装置によって連続通信モードに設定されると前記通信サブルーチンを
行し、前記任意のメモリ内容の読み書き、または前記任意のサブルーチンを実行
し、前記任意のメモリ内容の読み書き、または前記任意のサブルーチンの実行終
了後、再び前記通信サブルーチンを実行することにより連続的な通信状態を維持
することを特徴とするカメラ。 【請求項2】外部装置と接続可能であると共に、カメラの種々の動作機能を実行
するサブルーチンを有するマイクロコンピュータを具備するカメラにおいて、 前記マイクロコンピュータは、更に、前記外部装置からの通信によって、少なく
とも前記マイクロコンピュータ内の任意のメモリ内容の読み書き、および任意の
サブルーチンを実行するための通信サブルーチンを有し、 前記外部装置によって連続通信モードに設定されると前記通信サブルーチンを繰
り返し実行することにより、前記通信サブルーチンによる連続的な通信状態を維
持し、 この通信状態の下で前記任意のメモリ内容の読み書き、または前記任意のサブル
ーチンを実行するカメラであって、 前記カメラは、連続通信モード解除信号が供給されると前記通信サブ ルーチンを終了することを特徴とするカメラ。 【請求項3】外部装置と接続可能であると共に、カメラの種々の動作機能を実行
するサブルーチンを有するマイクロコンピュータを具備するカメラにおいて、 前記マイクロコンピュータは、更に、前記外部装置からの通信によって、少なく
とも前記マイクロコンピュータ内の任意のメモリ内容の読み書き、および任意の
サブルーチンを実行するための通信サブルーチンを有し、 前記外部装置によって連続通信モードに設定されると前記通信サブルーチンを繰
り返し実行することにより、前記通信サブルーチンによる連続的な通信状態を維
持し、 この通信状態の下で前記任意のメモリ内容の読み書き、または前記任意のサブル
ーチンを実行するカメラであって、 前記カメラは、前記外部装置と接続可能なチェック端子を有すると共に、このチ
ェック端子に2値レベルのいずれか一方のレベル信号が印加されている場合は前
記通信サブルーチンを繰り返し実行し、前記チェック端子に他方のレベル信号が
印加されると前記通信サブルーチンを終了することを特徴とするカメラ。 【請求項4】外部装置と接続可能であると共に、カメラの種々の動作機能を実行
するサブルーチンを有するマイクロコンピュータを具備するカメラにおいて、 前記マイクロコンピュータは、更に、前記外部装置からの通信によって、少なく
とも前記マイクロコンピュータ内の任意のメモリ内容の読み書き、および任意の
サブルーチンを実行するための通信サブルーチンを有し、 前記外部装置によって連続通信モードに設定されると前記通信サブルーチンを繰
り返し実行することにより、前記通信サブルーチンによる連続的な通信状態を維
持し、 この通信状態の下で前記任意のメモリ内容の読み書き、または前記任 意のサブルーチンを実行するカメラであって、 前記通信サブルーチンの下で前記外部装置の調整データ検出用プログラムに従っ
て求められた調整データを書き換え可能な記憶部に書込むための書込み手段と、
この記憶部に書込まれた前記調整データに基づいて各カメラ機能を調整する手段
とを具備するカメラ。 【請求項5】前記書込み手段はバッテリチェック電圧を前記記憶部に書込む手段
を具備し、前記調整手段は前記記憶部に書込まれたデータとカメラの電源電圧の
検出値とを比較するバッテリチェック手段を具備する請求項4に記載のカメラ。 【請求項6】前記書込み手段はAF調整データを前記記憶部に書込む手段を具備し
、前記調整手段は前記記憶部に書込まれたデータと測距データとに基づいて撮影
レンズの目標駆動位置を決定する請求項4に記載のカメラ。
Claims: 1. A camera comprising a microcomputer connectable to an external device and having a subroutine for executing various operation functions of the camera, wherein the microcomputer further comprises the external device. the communication from reading and writing of any memory content of at least in the microcomputer, and a communication sub-routine for performing any of the subroutine, the communication subroutine to be set to the continuous communication mode by the external device real
Read and write the arbitrary memory contents or execute the arbitrary subroutine
Read / write the contents of the arbitrary memory, or terminate the execution of the arbitrary subroutine.
After that, the communication subroutine is executed again to maintain a continuous communication state.
The camera which is characterized in that. 2. The camera can be connected to an external device and executes various operation functions of the camera.
In a camera including a microcomputer having a subroutine for performing
Read and write any memory contents in the microcomputer, and any
A communication subroutine for executing the subroutine, and when the external device sets the continuous communication mode, the communication subroutine is repeated.
By repeatedly executing, the continuous communication state by the communication subroutine is maintained.
Lifting, and reading and writing of the arbitrary memory contents under this communication condition, or the optional subroutine
A camera for performing a routine, the camera features and to Luke camera that the continuous communication mode release signal terminating the communication subroutine to be supplied. 3. The camera can be connected to an external device and executes various operation functions of the camera.
In a camera including a microcomputer having a subroutine for performing
Read and write any memory contents in the microcomputer, and any
A communication subroutine for executing the subroutine, and when the external device sets the continuous communication mode, the communication subroutine is repeated.
By repeatedly executing, the continuous communication state by the communication subroutine is maintained.
Lifting, and reading and writing of the arbitrary memory contents under this communication condition, or the optional subroutine
A camera having a check terminal connectable to the external device, and the communication subroutine when one of two level signals is applied to the check terminal. repeating running, features and to Luke camera that other level signal to the checking terminal ends the communication subroutine to be applied. 4. The camera can be connected to an external device and executes various operation functions of the camera.
In a camera including a microcomputer having a subroutine for performing
Read and write any memory contents in the microcomputer, and any
A communication subroutine for executing the subroutine, and when the external device sets the continuous communication mode, the communication subroutine is repeated.
By repeatedly executing, the continuous communication state by the communication subroutine is maintained.
Lifting, and reading and writing of the arbitrary memory contents under this communication condition, or a said camera to perform a subroutine arbitrary, was determined according to the external device adjustment data detection program under the communication subroutine Writing means for writing adjustment data to a rewritable storage unit;
Luke camera to and means for adjusting each camera function on the basis of the adjustment data written in the storage unit. 5. The battery according to claim 1, wherein said writing means includes means for writing a battery check voltage to said storage unit, and said adjusting means compares a data written in said storage unit with a detected value of a power supply voltage of a camera. The camera according to claim 4, further comprising a check unit. 6. The writing means includes means for writing AF adjustment data to the storage unit, and the adjustment means sets a target drive of the photographing lens based on the data written in the storage unit and the distance measurement data. The camera according to claim 4, wherein the position is determined.

Family

ID=

Similar Documents

Publication Publication Date Title
JP2608589B2 (en) camera
US6519419B2 (en) Method of controlling power source of camera
JP2894659B2 (en) Zoom encoder
JPH02294606A (en) Camera with power-zoom function, lens interchangeable camera, and interchangeable lens with power zoom function
JP4358942B2 (en) Interchangeable lens camera system and interchangeable lens
JP2608589C (en)
JP2749286B2 (en) Auto focus camera
JP2763003B2 (en) Automatic camera
JP2982960B2 (en) Camera with self-check function
JPH01180532A (en) Camera
JP2829920B2 (en) Cameras and interchangeable lenses with interchangeable lenses
JPH012031A (en) fully automatic camera
JP2997803B2 (en) Camera with self-check function
JPH0212213A (en) Electronic control camera with macrophotographing and normal photographing function
JP2832445B2 (en) Camera mode setting device
JPH02247627A (en) Alarming device for camera
JP2003005270A (en) Connection cable for camera
JPH0242431A (en) Camera
JP2723124B2 (en) camera
JPH02302738A (en) Camera, camera with interchangeable lens and interchangeable lens with power zooming function
JPH08328074A (en) Camera and device for camera
JPH02201335A (en) Camera with automatic zooming mechanism
JPH047536A (en) Camera with data imprinting function
JPH0247638A (en) Camera
JPH049020A (en) Camera provided with data imprinting function