JP2608589B2 - camera - Google Patents

camera

Info

Publication number
JP2608589B2
JP2608589B2 JP63201333A JP20133388A JP2608589B2 JP 2608589 B2 JP2608589 B2 JP 2608589B2 JP 63201333 A JP63201333 A JP 63201333A JP 20133388 A JP20133388 A JP 20133388A JP 2608589 B2 JP2608589 B2 JP 2608589B2
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
JP63201333A
Other languages
Japanese (ja)
Other versions
JPH02941A (en
Inventor
東 宮沢
栄二 大塚
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Olympus Corp
Original Assignee
Olympus Optic Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Olympus Optic Co Ltd filed Critical Olympus Optic Co Ltd
Priority to JP63201333A priority Critical patent/JP2608589B2/en
Publication of JPH02941A publication Critical patent/JPH02941A/en
Application granted granted Critical
Publication of JP2608589B2 publication Critical patent/JP2608589B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Description

【発明の詳細な説明】 〔産業上の利用分野〕 この発明はマイクロコンピュータを内蔵し、同じくマ
イクロコンピュータを有する外部装置と接続され、外部
装置との通信により種々の動作を制御するカメラに関す
る。
Description: BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a camera having a built-in microcomputer, connected to an external device also having the microcomputer, and controlling various operations by communicating with the external device.

〔従来の技術〕[Conventional technology]

このようなカメラとしては、同一出願人による特願昭
61−311697号、特願昭62−158551号に記載の全自動カメ
ラがある。
Such a camera is disclosed in Japanese Patent Application No.
There are fully automatic cameras described in Japanese Patent Application No. 61-311697 and Japanese Patent Application No. 62-158551.

特願昭61−311697号に記載の全自動カメラでは、外部
装置に種々のプログラムを内蔵しておいて、外部装置を
カメラに接続した時、外部装置からカメラに所望のプロ
グラムを転送しCPUのRAMを書換え、このプログラムを実
行させる。これにより、カメラのCPUには内蔵されてい
なかった機能を外部装置により実現可能となり、カメラ
の機能が拡大する。
In the fully automatic camera described in Japanese Patent Application No. 61-311697, various programs are built in an external device, and when the external device is connected to the camera, a desired program is transferred from the external device to the camera and the CPU is executed. Rewrite RAM and execute this program. As a result, the functions that were not built in the CPU of the camera can be realized by the external device, and the functions of the camera are expanded.

特願昭62−158551号に記載の全自動カメラでは、外部
装置がカメラ内部のCPUのサブルーチンをアクセスでき
る構成になっている。これにより、外部装置が所望のサ
ブルーチンを組合わせて実行することにより、カメラに
所望の動作を実行させることができる。
The fully automatic camera described in Japanese Patent Application No. 62-158551 has a configuration in which an external device can access a subroutine of a CPU inside the camera. Thus, the camera can perform a desired operation by the external device combining and executing the desired subroutines.

〔発明が解決しようとする課題〕[Problems to be Solved by the Invention]

しかしながら、上述した2つの全自動カメラでは、外
部装置との通信のサブルーチンがカメラのメインルーチ
ンの中にプログラムされていた。すなわち、外部装置と
の通信サブルーチンが一度実行されると、メインルーチ
ンの他の処理が終わってからでないと、外部装置との通
信サブルーチンを再び実行することができなかった。
However, in the above two fully automatic cameras, a subroutine for communication with an external device is programmed in the main routine of the camera. That is, once the communication subroutine with the external device is executed, the communication subroutine with the external device cannot be executed again until after other processing of the main routine is completed.

このため、上述した2つの全自動カメラでは、複数の
サブルーチンを連続して実行し1つの機能を実現するこ
とは不可能であった。そのため、サブルーチンの組合せ
により実現できる機能が限定されている。
Therefore, it has been impossible for the two fully automatic cameras described above to realize a single function by continuously executing a plurality of subroutines. Therefore, the functions that can be realized by the combination of subroutines are limited.

また、特願昭61−311697号に記載の全自動カメラにお
いては、カメラのメインルーチンで使用されるRAMを使
用するサブルーチンは実行できず、外部装置からカメラ
に自由にプログラムを転送することはできなかった。
In the fully automatic camera described in Japanese Patent Application No. 61-311697, a subroutine using RAM used in the main routine of the camera cannot be executed, and a program can be freely transferred from an external device to the camera. Did not.

この発明は上述した事情に対処すべくなされたもの
で、その目的は外部装置からの指令によりカメラと外部
通信とを連続通信し、カメラに内蔵のマイクロコンピュ
ータのサブルーチンを所望の順番で組合せて連続して実
行できるカメラを提供することである。
SUMMARY OF THE INVENTION The present invention has been made in order to cope with the above-described circumstances, and has as its object to continuously communicate a camera and external communication in accordance with a command from an external device, and to combine continuous subroutines of a microcomputer built in the camera in a desired order. It is to provide a camera that can be executed.

〔課題を解決するための手段及び作用〕[Means and Actions for Solving the Problems]

上記課題を解決し目的を達成するために、本発明は以
下に示す手段を用いている。
In order to solve the above problems and achieve the object, the present invention uses the following means.

(1)本発明のカメラは、外部装置と接続可能であると
共に、カメラの種々の動作機能を実行するサブルーチン
を有するマイクロコンピュータを具備するカメラにおい
て、マイクロコンピュータは、更に、外部装置からの通
信によって、少なくともマイクロコンピュータ内の任意
のメモリ内容の読み書き、および任意のサブルーチンを
実行するための通信サブルーチンを有し、外部装置によ
って連続通信モードに設定されると通信サブルーチンを
繰り返し実行することにより、通信サブルーチンによる
連続的な通信状態を維持し、この通信状態の下で任意の
メモリ内容の読み書き、または任意のサブルーチンを実
行する。
(1) The camera according to the present invention includes a microcomputer which is connectable to an external device and has a subroutine for executing various operation functions of the camera. A communication subroutine having at least a communication subroutine for reading / writing arbitrary memory contents in the microcomputer and executing an arbitrary subroutine, and repeatedly executing the communication subroutine when set to the continuous communication mode by an external device. , And reads or writes an arbitrary memory content or executes an arbitrary subroutine under this communication state.

(2)本発明のカメラは、上記(1)に記載したカメラ
であって、かつ連続通信モード解除信号が供給されると
通信サブルーチンを終了する。
(2) The camera according to the present invention is the camera described in (1) above, and terminates the communication subroutine when the continuous communication mode release signal is supplied.

(3)本発明のカメラは、上記(1)に記載したカメラ
であって、かつ外部装置と接続可能なチェック端子を有
すると共に、このチェック端子に2値レベルのいずれか
一方のレベル信号が印加されている場合は通信サブルー
チンを繰り返し実行し、チェック端子に他方のレベル信
号が印加されると通信サブルーチンを終了する。
(3) The camera according to the present invention is the camera described in (1) above, further having a check terminal connectable to an external device, and applying one of the binary level signals to the check terminal. If so, the communication subroutine is repeatedly executed, and when the other level signal is applied to the check terminal, the communication subroutine ends.

(4)本発明のカメラは、上記(1)に記載したカメラ
であって、かつ通信サブルーチンの下で外部装置の調整
データ検出用プログラムに従って求められた調整データ
を書き換え可能な記憶部に書込むための書込み手段と、
この記憶部に書込まれた調整データに基づいて各カメラ
機能を調整する手段とをさらに具備する。
(4) The camera according to the present invention is the camera described in (1) above, and writes adjustment data obtained according to an adjustment data detection program of an external device into a rewritable storage unit under a communication subroutine. Writing means for
It further comprises means for adjusting each camera function based on the adjustment data written in the storage unit.

(5)本発明のカメラは、上記(4)に記載したカメラ
であって、かつ書込み手段はバッテリチェック電圧を記
憶部に書込む手段を具備し、調整手段は記憶部に書込ま
れたデータとカメラの電源電圧の検出値とを比較するバ
ッテリチェック手段を具備する。
(5) The camera of the present invention is the camera described in (4) above, wherein the writing means includes means for writing the battery check voltage in the storage section, and the adjusting means is the data written in the storage section. And a battery check means for comparing the detected value of the power supply voltage of the camera with the battery.

(6)本発明のカメラは、上記(4)に記載したカメラ
であって、かつ書込み手段はAF調整データを記憶部に書
込む手段を具備し、調整手段は記憶部に書込まれたデー
タと測距データとに基づいて撮影レンズの目標駆動位置
を決定する。
(6) The camera of the present invention is the camera described in (4) above, wherein the writing means includes means for writing the AF adjustment data in the storage section, and the adjustment means is the data written in the storage section. And the target drive position of the taking lens is determined based on the distance measurement data.

〔実施例〕〔Example〕

以下、図面を参照してこの発明によるカメラの一実施
例を説明する。
An embodiment of a camera according to the present invention will be described below with reference to the drawings.

第1図は一実施例の概略を示すブロック図である。1
チップマイクロコンピュータからなるCPU10を有するカ
メラ1に外部装置2が着脱自在に接続される。CPU10は
カメラ1の種々の動作を制御するプログラムをサブルー
チンとして有する。カメラ1は外部(EXT)端子3を有
し、このEXT端子3を介してカメラ1と外部装置2とが
接続される。これにより、カメラCPU10と外部装置CPU4
とが通信可能となる。
FIG. 1 is a block diagram schematically showing one embodiment. 1
An external device 2 is detachably connected to a camera 1 having a CPU 10 composed of a chip microcomputer. The CPU 10 has 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 the external device 2 are connected via this EXT terminal 3. This allows the camera CPU10 and the external device CPU4
Can communicate.

外部装置2はCPU4以外に、操作スイッチ5と表示部6
を有する。外部装置2としては出荷前のカメラの調整機
器や特殊な撮影を可能とするオプションのアダプタ機器
等が考えられる。
In addition to the CPU 4, the external device 2 has operation switches 5 and a display unit 6.
Having. Examples of the external device 2 include an adjustment device for a camera before shipment and an optional adapter device for enabling special shooting.

第2図にカメラCPU10と外部装置2との接続を示す。
カメラCPU10のCHECK1端子は通常は“H"レベルであり、
外部装置2はカメラと通信を行なう前にCHECK1端子を
“L"レベルにする。このため、CPU10はCHECK1端子のレ
ベルを検出することにより、外部装置2が通信要求を出
したかどうか判定できる。
FIG. 2 shows the connection between the camera CPU 10 and the external device 2.
The CHECK1 terminal of the camera CPU10 is normally at "H" level,
The external device 2 sets the CHECK1 terminal to "L" level before communicating with the camera. Therefore, the CPU 10 can determine whether the external device 2 has issued a communication request by detecting the level of the CHECK1 terminal.

通信のためのクロックCLKはカメラ1から発生され、
外部装置2はこのクロックCLKに同期して、データライ
ンDATAを介して通信内容(コード化データ)をCPU10に
送信する。このデータラインDATAは双方向のシリアル通
信ラインである。
A clock CLK for communication is generated from the camera 1,
The external device 2 transmits communication contents (coded data) to the CPU 10 via the data line DATA in synchronization with the clock CLK. This data line DATA is a bidirectional serial communication line.

カメラ1の詳細を第3図に示す。CPU10はカメラ全体
の動作を制御し、基本クロックは発振回路20より供給さ
れ、リセット回路22からのリセットにより動作開始され
る。リセット回路22は電池挿入時、及びパワースイッチ
(図示せず)のオン/オフ動作時に動作する。
The details of the camera 1 are shown in FIG. The CPU 10 controls the operation of the entire camera, the basic clock is supplied from the oscillation circuit 20, and the operation is started by the reset from the reset circuit 22. The reset circuit 22 operates when a battery is inserted and when a power switch (not shown) is turned on / off.

E2−PROM24は駒数、カメラ状態データ(巻上げ中、巻
戻し中等)、異常データ(故障箇所)、調整データ(シ
ャッタ制御補正データ、オートフォーカス補正データ、
バッテリチェックデータ等の各カメラ毎のデータ)を記
憶している不揮発性メモリである。このため、交換のた
めに電池が一旦抜かれても、これらのデータは有効であ
る。また、E2−PROM24へのデータ書込み中はリセット回
路22のリセット動作は禁止されている。
E 2 -PROM24 is the number of frames, the camera status data (in winding, rewinding secondary), abnormal data (fault point), adjustment data (shutter control correction data, auto focus correction data,
It is a non-volatile memory that stores data for each camera such as battery check data). Therefore, even if the battery is removed once for replacement, these data are valid. Further, the reset operation of the reset circuit 22 is prohibited while the data is being written to the E 2 -PROM 24.

E2−PROM24を読出しモードにすると、まずDXコードが
DX端子26から入力され、シリアルライン28を介してCPU1
0に入力される。つづいて、E2−PROM24のデータがCPU10
に転送される。
When the E 2 -PROM24 the read mode, first DX code
Input from DX terminal 26, CPU1 via serial line 28
Entered in 0. Subsequently, the data of the E 2 -PROM24 is CPU10
Is forwarded to

AFセンサ(AFIC)30は、例えば位相差方式のセンサで
あり、距離データをCPU10に供給する。CPU10は測光値が
一定値以下の暗い場合には、AFIC30の動作に合せて補助
光源32を点灯する。
The AF sensor (AFIC) 30 is, for example, a phase difference sensor, and supplies distance data to the CPU 10. The CPU 10 turns on the auxiliary light source 32 in accordance with the operation of the AFIC 30 when the photometric value is dark below a certain value.

E2−PROM24、EXT端子3、AFIC30はCPU10の入出力ポー
トを有効利用するために、同一のシリアルライン28に接
続され、CPU10とデータのやりとりをシリアル通信で行
なう。
E 2 -PROM24, EXT terminal 3, AFIC30 in order to effectively utilize the CPU10 of the input and output ports are connected to the same serial line 28, for exchanging CPU10 and data by serial communication.

操作スイッチ群34はカメラの種々の操作スイッチから
なり、レリーズスイッチ、モード切換えスイッチ等から
なる。LED群36はファインダ内のLEDであり、ストロボ発
光予告、合焦表示等のLEDからなる。LCD38はカメラの表
面のLCDであり、駒数、カメラモード等を表示する。
The operation switch group 34 includes various operation switches of the camera, and includes a release switch, a mode switch, and the like. The LED group 36 is an LED in the finder, and includes LEDs for strobe emission notice, focus display, and the like. The LCD 38 is an LCD on the front surface of the camera and displays the number of frames, the camera mode, and the like.

インターフェース(IFIC)40はモータドライバ50や測
光ユニット42との信号の伝授、LCD38への電源の供給、
ストロボ64に対するチャージ、及びバッテリチェック等
を行なう。なお、第3図では電源は図示を省略してい
る。また、インターフェース40はCPU10からの命令によ
りシャッタモータ(Ms)44、巻上げモータ(Mw)46、ズ
ームモータ(Mz)48を選択するデコード機能等も持った
インタフェースである。なお、デコード機能は測光ユニ
ット42での平均測光とスポット測光との切換えも含む。
これらのモータ44,46,48はインターフェース40のデコー
ド信号によりモータドライバ50を介して駆動される。
The interface (IFIC) 40 transmits / receives signals to / from the motor driver 50 and the photometric unit 42, supplies power to the LCD 38,
Charge the strobe 64, check the battery, and the like. The power supply is not shown in FIG. The interface 40 is also an interface having a decoding function for selecting a shutter motor (Ms) 44, a winding motor (Mw) 46, and a zoom motor (Mz) 48 in accordance with a command from the CPU 10. The decoding function also includes switching between average photometry and spot photometry in the photometry unit 42.
These motors 44, 46, 48 are driven via a motor driver 50 by a decode signal of the interface 40.

シャッタモータ44は正転時にオートフォーカスのため
のレンズ駆動、逆転時にシャッタ駆動する。ここでは、
シャッタはレンズシャッタが採用されているとする。
The shutter motor 44 drives a lens for automatic focusing during normal rotation, and performs shutter driving during reverse rotation. here,
It is assumed that a lens shutter is employed as the shutter.

オートフォーカシングの際、CPU10はAFIC30で求めた
距離データとE2−PROM24の調整データを演算して求めた
目標位置までモータ44を正転し、フォーカシングレンズ
を駆動する。ここで、フォーカシングレンズのリセット
位置はスイッチ(AFs)52のオン状態で確認され、レン
ズ位置は、フォーカシングレンズの単位移動量当り1パ
ルス発生されるフォトインタラプタ(PIs)54のパルス
数で確認される。
During auto-focusing, CPU 10 will forward the motor 44 to a target position determined by calculating the distance data and adjustment data E 2 -PROM24 obtained in AFIC30, drives the focusing lens. Here, the reset position of the focusing lens is confirmed by the ON state of the switch (AFs) 52, and the lens position is confirmed by the number of pulses of the photo interrupter (PIs) 54 generated per unit movement amount of the focusing lens. .

すなわち、CPU10はフォトインタラプタ(PIs)54の出
力を参照してモータ44の正転、ブレーキ、オフの制御を
行ない、目標位置にフォーカシングレンズを停止させ
る。
That is, the CPU 10 refers to the output of the photo interrupter (PIs) 54 to control the forward rotation, braking, and off of the motor 44 to stop the focusing lens at the target position.

シャッタ制御時のモータ44のリセット位置はスイッチ
(AEs)56のオン状態で確認され、E2−PROM24の調整デ
ータによりデューティ駆動の比率を変化させることによ
り一定開口波形が保たれるように制御される。
Reset position of the motor 44 at the time of shutter control is confirmed by the ON state of the switch (AEs) 56, a fixed aperture waveform is controlled to be kept by changing the ratio of the duty drive with adjustment data for E 2 -PROM24 It

巻上げモータ46は正転時にフィルム巻上げを、逆転時
にフィルム巻戻しを行なう。フィルムの一駒巻上げ制御
はフォトインタラプタ(PIw)58のパルス数をカウント
することにより行われる。
The wind-up motor 46 winds up the film at the time of forward rotation and rewinds the film at the time of reverse rotation. The winding control of one frame of the film is performed by counting the number of pulses of the photo interrupter (PIw) 58.

フォトインタラプタ54,58はそれぞれシャッタモータ4
4、巻上げモータ46が選択された時のみオンとなり、フ
ォトインタラプタ54,58の出力はIFIC40を介してディジ
タル的にノイズを除去してCPU10に入力される。これ
は、フォトインタラプタ54,58の出力を直接CPU10に入力
すると、ノイズによりカウント値に誤差が生じることが
あるからである。
The photo interrupters 54 and 58 are respectively shutter motors 4
4. Only when the winding motor 46 is selected, it is turned on, and the outputs of the photo interrupters 54 and 58 are digitally noise-removed via the IFIC 40 and input to the CPU 10. This is because if the outputs of the photo interrupters 54 and 58 are directly input to the CPU 10, an error may occur in the count value due to noise.

ズームモータ(Mz)48はレンズをズーミングし、ズー
ム位置はズームエンコーダ60により知ることができる。
The zoom motor (Mz) 48 zooms the lens, and the zoom position can be known by the zoom encoder 60.

デートモジュール62は日付、時刻等のデータをフィル
ムに写し込むものである。ストロボ64もCPU10に接続さ
れる。
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.

次にこの実施例の動作を説明する。先ず、第4図乃至
第23図を参照してカメラ側のCPU10の動作を説明し、次
いで、第24図乃至第27図を参照して外部装置側のCPU4の
動作を説明する。
Next, the operation of this embodiment will be described. First, the operation of the CPU 10 on the camera side will be described with reference to FIGS. 4 to 23, and then the operation of the CPU 4 on the external device side will be described with reference to FIGS. 24 to 27.

第4図はカメラCPU10の『パワーオンリセット』ルー
チンのフローチャートであり、このルーチンはリセット
回路22のリセット動作により開始する。すなわち、電源
が投入されるか、パワースイッチのオン/オフ動作を行
なうと、カメラは先ずこのルーチンを実行する。
FIG. 4 is a flowchart of the "power-on reset" routine of the camera CPU 10. This routine is started by the reset operation of the reset circuit 22. That is, when the power is turned on or the power switch is turned on / off, the camera first executes this routine.

ステップ102でCPU10の入出力ポート、および内蔵RAM
の初期セットを行なう。
In step 102, input / output port of CPU10 and built-in RAM
Perform an initial set of

ステップ104でCHECK1端子が“L"レベル、すなわち外
部装置から通信要求が発生されているかどうか判定す
る。CHECK1端子が“L"レベルの場合は、ステップ106で
サブルーチン『外部装置との通信1』(第22図(a),
(b))を実行する。
In step 104, it is determined whether the CHECK1 terminal is at the "L" level, that is, whether a communication request has been issued from an external device. If the CHECK1 terminal is at the "L" level, a subroutine "communication 1 with external device 1" (FIG. 22 (a),
(B)) is executed.

CHECK1端子が“L"レベルでない場合、またはサブルー
チン『外部装置との通信1』が終了した場合、ステップ
108でサブルーチン『E2−PROM読出し』(第12図)を実
行し、E2−PROM24からカメラ状態データ、調整データ等
がCPU10のRAMに書込まれる。ここで始めてカメラ動作が
可能な状態となる。もし、巻上げ、巻戻し、空送り中に
おいて電池がなくなったり、パワースイッチをオフにし
た場合は、動作が中断するが、電源再投入時に、中断前
の状態を知る必要がある。
If the CHECK1 terminal is not at "L" level or the subroutine "Communication with external device 1" is completed, step
Run the subroutine "E 2 -PROM read" (Figure 12) at 108, the camera status data from the E 2 -PROM24, adjustment data and the like is written to the CPU10 of the RAM. Only here can the camera be operated. If the battery runs out or the power switch is turned off during winding, rewinding, or idling, the operation is interrupted, but it is necessary to know the state before the interruption when the power is turned on again.

E2−PROM24から読出したバッテリチェックデータを参
照して、ステップ110でサブルーチン『バッテリチェッ
ク』(第17図)を実行する。
Referring to the battery check data read from the E 2 -PROM24, it executes a subroutine "Battery check" (FIG. 17) at step 110.

次に、E2−PROM24から読出したカメラ状態データを参
照して、カメラの動作状態をチェックする。ステップ11
2でカメラの裏蓋の開閉に連動する裏蓋スイッチの出力
により裏蓋が閉じているかどうか判定する。閉じている
場合は、ステップ114で巻戻し中かどうか判定する。巻
戻し中の場合は、ステップ116でサブルーチン『巻戻
し』を実行する。
Next, with reference to the camera status data read from the E 2 -PROM24, checks the operation state of the camera. Step 11
In 2 it is judged whether the back cover is closed or not by the output of the back cover switch which is interlocked with the opening and closing of the back cover of the camera. If it is closed, it is determined in step 114 whether rewinding is in progress. If rewinding is in progress, a subroutine "rewind" is executed in step 116.

巻戻し中でない場合は、ステップ118で空送り中かど
うか判定する。空送り中の場合は、ステップ120でサブ
ルーチン『空送り』を実行する。
If no rewinding is being performed, it is determined in step 118 whether or not the idle feeding is being performed. If the idle feed is being performed, a subroutine "idle feed" is executed in step 120.

空送り中でない場合は、ステップ122で巻上げ中かど
うか判定する。巻上げ中の場合は、ステップ124でサブ
ルーチン『一駒巻上げ』(第11図)を実行する。
If it is not being fed idly, it is judged at step 122 whether or not it is being wound. If winding is in progress, a subroutine "single frame winding" (FIG. 11) is executed in step 124.

カメラの裏蓋が閉じていない場合、サブルーチン『巻
戻し』、『空送り』、または『一駒巻上げ』が終了した
場合、または巻上げ中でない場合は、ステップ126でパ
ワースイッチがオンかどうか判定する。
If the camera back lid is not closed, if the subroutine "rewind", "jump feed", or "single frame winding" is completed, or if it is not winding up, it is determined in step 126 whether the power switch is on. .

パワースイッチがオンの場合は、ステップ128でLCD38
をオンし、ステップ130でサブルーチン『ストロボチャ
ージ』を実行する。これは、いつでもストロボ撮影可能
な状態にしておくためである。ステップ132で90秒タイ
マをセットする。このタイマはLCD38の表示時間を90秒
に制限するものである。ただし、後述するように、表示
中にユーザが何らかのスイッチ操作をした場合、その時
点で再び90秒タイマがセットされる。
If the power switch is on, the LCD
Is turned on, and the subroutine "strobe charge" is executed in step 130. This is to keep the flash ready for shooting. In step 132, a 90 second timer is set. This timer limits the display time of the LCD 38 to 90 seconds. However, as will be described later, when the user operates any switch during display, the 90-second timer is set again at that time.

ステップ134で裏蓋スイッチ(BK)による割込み、巻
戻しスイッチ(RW)による割込み、モード指定スイッチ
等の各種操作スイッチ(KEYG)による割込み、及びタイ
マ(65.5ミリ秒)による割込みの受付を許可する。
In step 134, acceptance of an interruption by the back cover switch (BK), an interruption by the rewind switch (RW), an interruption by various operation switches (KEYG) such as a mode designation switch, and an interruption by the timer (65.5 milliseconds) are permitted.

ステップ136でホルトモードにする。ホルト動作中
は、CPU10の動作は停止しているが、発振回路20のクロ
ック発振は行われ、LCD38も90秒間は表示可能である。
このホルト動作中のスタンバイ解除は上述したステップ
134で許可された割込みが発生した場合のみ有効とされ
る。
In step 136, the halt mode is set. During the halt operation, the operation of the CPU 10 is stopped, but the clock oscillation of the oscillation circuit 20 is performed, and the LCD 38 can also display for 90 seconds.
The standby release during this halt operation is performed by the steps described above.
It is valid only when the interrupt permitted at 134 occurs.

パワースイッチがオンでない場合は、ステップ138でL
CD38をオフし、ステップ140でBK割込み、RW割込みのみ
を許可し、ステップ142でストップモードになる。スト
ップ動作でのスタンバイ解除はステップ140で許可され
た割込みが発生した場合のみ有効とされる。
If the power switch is not on, go to step 138
The CD 38 is turned off, only the BK interrupt and the RW interrupt are permitted in step 140, and the stop mode is set in step 142. The standby release in the stop operation is valid only when the interrupt permitted in step 140 occurs.

第5図(a),(b)は『スタンバイ解除』ルーチン
のフローチャートであり、ホルト動作(ステップ13
6)、ストップ動作(ステップ142)において割込みが発
生した時に開始される。このように、この実施例では、
ホルトモード、ストップモードにかかわらず、スタンバ
イ解除後は同一のルーチンに移行する。これは、ベクタ
割込みでスタンバイ解除後の動作をそれぞれ定義する
と、割込みはノイズによっても発生するので、誤動作を
防止するためと、誤ってスタンバイ解除された場合の処
理を簡単にするためである。
FIGS. 5A and 5B are flowcharts of the "standby release" routine, in which the halt operation (step 13) is performed.
6), started when an interrupt occurs in the stop operation (step 142). Thus, in this example,
Regardless of the halt mode or the stop mode, the same routine is executed after the standby is released. This is because if the operation after the release of standby is defined by the vector interrupt, the interrupt is also generated by noise, so that a malfunction is prevented and the processing when the standby is released by mistake is simplified.

ステップ150で、ステップ102と同様にCPU10の入出力
ポート、および内蔵RAMの初期セットを行なう。ステッ
プ152でサブルーチン『E2−PROM読出し』(第12図)を
実行する。これは、ノイズによりRAMの内容が変化した
場合を補償するためである。
In step 150, the initial setting of the input / output ports of the CPU 10 and the built-in RAM is performed as in step 102. A subroutine "E 2 -PROM read" (Figure 12) at step 152. This is to compensate for the case where the contents of the RAM have changed due to noise.

ステップ154でこのルーチンを開始した割込みはBK割
込みかどうか判定する。BK割込みの場合は、ステップ15
6で裏蓋が閉じているかどうか判定する。裏蓋が閉じて
いる場合は、ステップ158でサブルーチン『空送り』を
実行する。サブルーチン『空送り』が終了した場合はス
テップ126に戻り、パワースイッチの状態をチェックす
る。
In step 154, it is determined whether the interrupt that started this routine is the BK interrupt. For BK interrupt, step 15
In step 6, determine whether the case back is closed. If the case back is closed, the subroutine "idle feed" is executed in step 158. When the subroutine "Jump feed" is completed, the flow returns to step 126 to check the state of the power switch.

裏蓋が閉じていない場合は、ステップ160でサブルー
チン『裏蓋開』を実行し、駒数、カメラ状態データをリ
セットする。サブルーチン『裏蓋開』の終了後はステッ
プ126に戻る。裏蓋が開でも閉でもない場合は、ノイズ
が有ると判定する。
If the back cover is not closed, the subroutine "open back cover" is executed in step 160 to reset the number of frames and camera status data. After the completion of the "opening the back cover" subroutine, the process returns to step 126. If the back cover is neither open nor closed, it is determined that there is noise.

BK割込みでない場合、あるいはノイズが有ると判定し
た場合は、ステップ162でRW割込みかどうか判定する。R
W割込みの場合は、ステップ164で巻戻しスイッチがオン
かどうか判定する。巻戻しスイッチがオンの場合は、ス
テップ166でサブルーチン『巻戻し』を実行する。サブ
ルーチン『巻戻し』の終了後はステップ126に戻る。
If it is not a BK interrupt, or if it is determined that there is noise, it is determined in step 162 whether it is an RW interrupt. R
In the case of a W interrupt, it is determined in step 164 whether the rewind switch is on. If the rewind switch is on, a subroutine "rewind" is executed in step 166. After the end of the subroutine "rewind", the flow returns to step 126.

RW割込みでない場合、あるいは巻戻しスイッチがオン
でないの場合は、ステップ168でタイマ割込みかどうか
判定する。タイマ割込みの場合は、ステップ170でサブ
ルーチン『表示タイマカウント』(第6図)を実行す
る。すなわち、サブルーチン『表示タイマカウント』は
65.5ミリ秒毎に実行される。サブルーチン『表示タイマ
カウント』の終了後はステップ134に戻る。
If it is not the RW interrupt, or if the rewind switch is not on, it is judged at step 168 whether it is a timer interrupt. In the case of a timer interrupt, a subroutine "display timer count" (FIG. 6) is executed in step 170. That is, the subroutine "display timer count"
Executed every 65.5 milliseconds. After the end of the subroutine "display timer count", the process returns to step 134.

タイマ割込みでない場合は、ステップ172で巻戻し終
了、または空送り失敗であるかどうか判定する。巻戻し
終了、空送り失敗でない場合は、ステップ174でパワー
スイッチがオンかどうか判定する。巻戻し終了、空送り
失敗の場合、またはパワースイッチがオンでない場合
は、ステップ126に戻る。
If it is not a timer interrupt, it is determined in step 172 whether the rewinding is completed or the idling has failed. If the rewinding has not been completed and the skipping has not failed, it is determined in step 174 whether the power switch is on. When the rewinding is completed, the idling fails, or the power switch is not turned on, the process returns to step 126.

パワースイッチがオンの場合は、ステップ176でKEYG
割込みかどうか判定する。KEYG割込みでない場合は、ス
テップ178でLCD表示中かどうか判定する。LCD表示中で
ない場合は、ステップ180でBK,RW,KEYG割込みを許可
し、ステップ182でストップモードになる。このモード
は、パワースイッチはオンであっても、90秒間ユーザが
何も操作しなかったために、LCD38が消える場合であ
る。パワースイッチがオンであれば、ユーザが何らかの
操作をすると、LCD38は再び表示状態となる。
If the power switch is on, go to KEYG in step 176.
Determine if it is an interrupt. If it is not a KEYG interrupt, it is determined in step 178 whether the LCD is being displayed. If the LCD is not being displayed, the BK, RW, and KEYG interrupts are enabled in step 180, and the stop mode is entered in step 182. In this mode, the LCD 38 disappears because the user has not operated for 90 seconds even if the power switch is on. If the power switch is turned on, the LCD 38 returns to the display state when the user performs some operation.

KEYG割込みである場合は、ノイズでKEYGのポートの状
態が変化していてもスイッチ入力を受付けられるように
するため、KEYGのポートをステップ184で入力ポートに
切換える。ステップ186でLCD38をオンする。
If it is a KEYG interrupt, the KEYG port is switched to the input port in step 184 so that the switch input can be accepted even if the state of the KEYG port changes due to noise. In step 186, the LCD 38 is turned on.

ステップ188でレリーズボタンが1段押込まれた(1
段目レリーズ)かどうか判定する。1段目レリーズの場
合は、ステップ190でサブルーチン『レリーズ処理』
(第8図)を実行する。
In step 188, the release button was pushed down one step (1
It is determined whether it is the second release. In the case of the first release, the subroutine "release processing" is performed in step 190.
(FIG. 8).

1段目レリーズでない場合は、ステップ192でマクロ
状態かどうか判定する。マクロ状態でない場合は、ステ
ップ194でズームアップ、またはズームダウンかどうか
判定する。ズームアップ、またはズームダウンの場合
は、ステップ196でサブルーチン『ズーム処理』を実行
する。
If it is not the first-step release, it is determined in step 192 whether or not it is in the macro state. If it is not in the macro state, it is determined in step 194 whether the zoom is up or down. In the case of zooming up or zooming down, a subroutine "zoom processing" is executed in step 196.

サブルーチン『レリーズ処理』、または『ズーム処
理』が終了した場合は、ステップ197でサブルーチン
『レンズリセット』を実行し、フォーカシングレンズを
リセット位置まで戻す。
When the subroutine "release processing" or "zoom processing" is completed, a subroutine "lens reset" is executed in step 197 to return the focusing lens to the reset position.

サブルーチン『レンズリセット』が終了した場合はス
テップ126に戻る。
When the subroutine "lens reset" is completed, the process returns to step 126.

マクロ状態である場合、またはズームアップ、ズーム
ダウンではない場合は、ステップ198でマクロ切換えス
イッチがオンかどうか判定する。スイッチがオンの場合
は、ステップ200でサブルーチン『マクロ処理』を実行
する。サブルーチン『マクロ処理』が終了した場合はス
テップ126に戻る。
If it is in the macro state, or if it is not the zoom-up or zoom-down, it is determined in step 198 whether the macro changeover switch is on. If the switch is on, a subroutine "macro processing" is executed in step 200. When the subroutine "macro processing" is completed, the process returns to step 126.

マクロ切換えスイッチがオフの場合は、カメラモード
スイッチをチェックし、ステップ202で第1モードスイ
ッチがオンかどうか判定し、第1モードスイッチがオン
の場合は、ステップ204でサブルーチン『セルフモー
ド』を実行する。サブルーチン『セルフモード』は撮影
モードを通常モード、セルフモードに順次切換える。サ
ブルーチン『セルフモード』が終了した場合はステップ
126に戻る。
If the macro switch is off, the camera mode switch is checked, and it is determined in step 202 whether the first mode switch is on. If the first mode switch is on, the subroutine "self mode" is executed in step 204 I do. The subroutine "self mode" sequentially switches the shooting mode to the normal mode and the self mode. Step when subroutine "Self mode" ends
Return to 126.

第1モードスイッチがオフの場合は、ステップ206で
第2モードスイッチがオンかどうか判定し、第2モード
スイッチがオンの場合は、ステップ208でサブルーチン
『測光モード』を実行する。サブルーチン『測光モー
ド』は測光方式を平均測光、スポット測光、スポットハ
イライト測光、スポットシャドー測光に順次切換える。
サブルーチン『測光モード』が終了した場合はステップ
126に戻る。
If the first mode switch is off, it is determined in step 206 whether the second mode switch is on. If the second mode switch is on, a subroutine "photometry mode" is executed in step 208. The subroutine "photometry mode" sequentially switches the photometry method to average photometry, spot photometry, spot highlight photometry, and spot shadow photometry.
Step when the subroutine "Metering mode" is completed
Return to 126.

第2モードスイッチがオフの場合は、ステップ210で
第3モードスイッチがオンかどうか判定し、第3モード
スイッチがオンの場合は、ステップ212でサブルーチン
『ストロボモード』を実行する。サブルーチン『ストロ
ボモード』は発光モードを自動発光、強制発光(日中シ
ンクロ)、発光禁止に順次切換える。サブルーチン『ス
トロボモード』が終了した場合はステップ126に戻る。
If the second mode switch is off, it is determined in step 210 whether the third mode switch is on. If the third mode switch is on, a subroutine "strobe mode" is executed in step 212. The subroutine "Strobe mode" sequentially switches the flash mode to automatic flash, forced flash (daytime sync), and flash off. When the subroutine "strobe mode" is completed, the process returns to step 126.

第3モードスイッチがオフの場合は、ステップ214で
第4モードスイッチがオンかどうか判定し、第4モード
スイッチがオンの場合は、ステップ216でサブルーチン
『カメラモード』(第7図)を実行する。サブルーチン
『カメラモード』では、カメラモードを標準(一駒)、
オートズーム、連写、多重露光(2枚)撮影、∞モード
に順次切換える。サブルーチン『カメラモード』が終了
した場合はステップ126に戻る。
If the third mode switch is off, it is determined in step 214 whether the fourth mode switch is on. If the fourth mode switch is on, a subroutine "camera mode" (FIG. 7) is executed in step 216. . In the subroutine "camera mode", the camera mode is standard (one frame),
Switch to auto zoom, continuous shooting, multiple exposure (2 shots) shooting, and infinity mode. When the subroutine "camera mode" is completed, the process returns to step 126.

第4モードスイッチがオフの場合はステップ134に戻
る。
If the fourth mode switch is off, the process returns to step 134.

第6図はサブルーチン『表示タイマカウント』(第5
図(a)のステップ170)のフローチャートである。ス
テップ230でCHECK1端子が“L"かどうか判定する。CHECK
1端子が“L"の場合は、ステップ232でサブルーチン『外
部装置との通信1』(第22図(a),(b))を実行す
る。このため、サブルーチン『外部装置との通信1』は
65.5ミリ秒毎に実行可能であり、このプログラムではサ
ブルーチン『外部装置との通信1』を連続して実行する
ことは不可能である。後述するように、サブルーチン
『外部装置との通信1』を連続して実行するプログラム
は別に設けられている。
FIG. 6 shows a subroutine "display timer count" (FIG.
It is a flowchart of step 170) of FIG. In step 230, it is determined whether the CHECK1 terminal is "L". CHECK
If one terminal is "L", the subroutine "communication with external device 1" (FIGS. 22 (a) and 22 (b)) is executed in step 232. Therefore, the subroutine "Communication with external device 1"
This program can be executed every 65.5 milliseconds. In this program, it is impossible to continuously execute the subroutine "communication 1 with external device". As described later, a program for continuously executing the subroutine "communication 1 with external device 1" is provided separately.

CHECK1端子が“L"でない場合、またはサブルーチン
『外部装置との通信1』が終了した場合、ステップ234
で90秒経過したかどうか判定する。90秒経過した場合は
ステップ180(第5図(a))に戻り、ストップモード
になる。90秒経過しない場合はステップ236でサブルー
チン『LCD点滅処理』を実行する。ここでは、LCD38の警
告表示等が65.5ミリ秒を一定量分周した間隔でオン/オ
フされ点滅する。サブルーチン『LCD点滅処理』の終了
後はステップ134に戻る。
If the CHECK1 terminal is not "L" or if the subroutine "communication 1 with external device" has been completed, step 234 is executed.
To determine if 90 seconds have passed. When 90 seconds have elapsed, the process returns to step 180 (Fig. 5 (a)) to enter the stop mode. If 90 seconds has not elapsed, the subroutine "LCD blinking process" is executed in step 236. Here, the warning display of the LCD 38 is turned on / off and flashes at intervals of 65.5 milliseconds. After the subroutine "LCD blinking process" ends, the process returns to step 134.

第7図はサブルーチン『カメラモード』(第5図
(b)のステップ216)のフローチャートである。ステ
ップ240でモードRAM(MRAM)をインクリメントする(MR
AM←MRAM+1)。ステップ242でMRAMが5以上かどうか
判定する。MRAMが5以上の場合はステップ244でモードR
AMがリセットされる(MRAM←0)。すなわち、MRAMのデ
ータ0,1,2,3,4が標準、オートズーム、連写、多重露
光、∞の各カメラモードに対応する。
FIG. 7 is a flowchart of a subroutine "camera mode" (step 216 in FIG. 5B). In step 240, the mode RAM (MRAM) is incremented (MR
AM ← MRAM + 1). In step 242, it is determined whether MRAM is 5 or more. If MRAM is 5 or more, mode R in step 244
AM is reset (MRAM ← 0). That is, the data 0, 1, 2, 3, and 4 of the MRAM correspond to the standard, auto zoom, continuous shooting, multiple exposure, and ∞ camera modes.

第8図はサブルーチン『レリーズ処理』(第5図
(b)のステップ190)のフローチャートである。ステ
ップ250でCHECK1端子が“L"かどうか判定する。CHECK1
端子が“L"の場合は、ステップ252でサブルーチン『外
部装置との通信2』(第22図(a),(b))を実行す
る。
FIG. 8 is a flowchart of a subroutine "release process" (step 190 in FIG. 5B). In step 250, it is determined whether the CHECK1 terminal is "L". CHECK1
If the terminal is "L", the subroutine "communication with external device 2" (FIGS. 22 (a) and 22 (b)) is executed in step 252.

CHECK1端子が“L"でない場合、またはサブルーチン
『外部装置との通信2』が終了した場合、ステップ254
でサブルーチン『測光』を実行する。
If the CHECK1 terminal is not "L" or if the subroutine "communication with external device 2" has been completed, step 254
To execute the subroutine "photometry".

ステップ256で∞モードかどうか判定する。∞モード
の場合は、ステップ258で距離データとして∞データを
セットする。ステップ260でサブルーチン『測距』を実
行する。
At step 256, it is determined whether the mode is ∞. In the ∞ mode, in step 258, ∞ data is set as the distance data. In step 260, the subroutine "distance measurement" is executed.

距離データとして∞データがセットされた場合、また
はサブルーチン『測距』が終了した場合、ステップ262
でオートズームモードかどうか判定する。オートズーム
モードの場合は、ステップ264でサブルーチン『オート
ズーム』を実行する。サブルーチン『オートズーム』は
撮影距離にかかわらず常に人物が一定の大きさで撮影さ
れるように、距離データに応じて自動的にズーム位置を
設定する。
If ∞ data is set as the distance data, or if the subroutine “ranging” is completed, step 262
Is used to determine whether the mode is the auto zoom mode. In the case of the auto zoom mode, a subroutine "auto zoom" is executed in step 264. The subroutine "auto zoom" automatically sets the zoom position according to the distance data so that the person is always photographed in a constant size regardless of the photographing distance.

オートズームモードでない場合、サブルーチン『オー
トズーム』が終了した場合、ステップ266でサブルーチ
ン『AF(レンズ繰出し)』(第9図)を実行し、フォー
カスレンズを合焦位置まで駆動する。ステップ268でサ
ブルーチン『露出演算』を実行する。
If the automatic zoom mode is not set and the subroutine "auto zoom" is completed, a subroutine "AF (lens extension)" (FIG. 9) is executed in step 266 to drive the focus lens to the in-focus position. In step 268, the subroutine "exposure calculation" is executed.

ステップ270でレリーズボタンが全部押込まれた(2
段目レリーズ)かどうか判定する。2段目レリーズでな
い場合は、ステップ272で1段目レリーズかどうか判定
する。1段目レリーズの場合はステップ270に戻る。こ
の状態は、AFロックの状態である。1段目レリーズを解
除するともとのルーチンに戻る。
In step 270, the release buttons are all pressed (2
It is determined whether or not it is the first release. If it is not the second release, it is determined in step 272 whether it is the first release. In the case of the first release, the flow returns to step 270. This state is an AF lock state. When the first release is released, the routine returns to the original routine.

2段目レリーズの場合は撮影動作に入り、先ず、ステ
ップ274でサブルーチン『バッテリチェック』(第17
図)を実行する。後述するが、バッテリがない場合はこ
こで動作を停止する。
In the case of the second-step release, the photographing operation starts. First, in step 274, a subroutine "battery check" (17th
(Figure). As will be described later, if there is no battery, the operation is stopped here.

ステップ276でセルフモードかどうか判定する。セル
フモードの場合は、ステップ278で第1モードスイッチ
がオンかどうか判定する。第1モードスイッチがオンの
場合はステップ126(第4図)に戻り、パワースイッチ
の状態をチェックする。すなわち、第1モードスイッチ
をオンすることにより、セルフ待ち状態を途中解除する
ことができる。
In step 276, it is determined whether the self mode is set. In the self mode, it is determined in step 278 whether the first mode switch is on. If the first mode switch is on, the process returns to step 126 (FIG. 4) to check the state of the power switch. That is, by turning on the first mode switch, the self-waiting state can be canceled halfway.

第1モードスイッチがオフの場合は、ステップ280で
セルフタイマ(12秒)がカウントアップ(終了)かどう
か判定する。カウント終了でない場合はステップ278に
戻る。
If the first mode switch is off, it is determined in step 280 whether the self-timer (12 seconds) has counted up (finished). If the counting is not completed, the process returns to step 278.

セルフモードでない場合、またはカウント終了の場合
は、ステップ282でサブルーチン『露出』を実行し、シ
ャッタ動作を行なう。ストロボ発光モードの場合は、こ
こで、ストロボが発光する。
If it is not in the self mode or if the counting is completed, the subroutine "exposure" is executed in step 282 to perform the shutter operation. In the case of the strobe light emission mode, the strobe light is emitted here.

ステップ284で多重露光モードかどうか判定する。多
重露光モードの場合は、ステップ286で多重1枚フラグ
がセットされているどうか判定する。多重1枚フラグが
セットされていない場合は、ステップ286で多重1枚フ
ラグをセットする。ステップ290でサブルーチン『E2−P
ROM書込み』(第16図)を実行し、もとのルーチンに戻
る。これにより、多重1枚フラグをE2−PROM24に書込
む。多重1枚フラグがセットされている場合は、ステッ
プ292で多重1枚フラグをリセットする。
In step 284, it is determined whether the mode is the multiple exposure mode. In the case of the multiple exposure mode, it is determined in step 286 whether the multiplex single sheet flag is set. If the multiplex single sheet flag is not set, the multiplex single sheet flag is set in step 286. Step 290 in the subroutine "E 2 -P
ROM write ”(FIG. 16), and return to the original routine. Thus, writing one multiplex the flag E 2 -PROM24. If the multiplex 1-sheet flag is set, the multiplex 1-sheet flag is reset in step 292.

多重露光モードでない場合、または多重1枚フラグを
リセットした場合、ステップ294でフィルム有りかどう
か判定する。フィルム有りの場合は、ステップ296でサ
ブルーチン『一駒巻上げ』(第11図)を実行する。
If it is not in the multiple exposure mode or if the multiple single image flag is reset, it is determined in step 294 whether or not there is a film. If there is a film, a subroutine "winding one frame" (FIG. 11) is executed in step 296.

フィルム有りでない場合、またはサブルーチン『一駒
巻上げ』が終了した場合、ステップ298で連写モードか
どうか判定する。連写モードの場合はステップ270に戻
り、レリーズボタンが押込まれている限り連写が継続す
る。連写モードでない場合はもとのルーチンに戻る。
If there is no film, or if the subroutine "winding one frame" is completed, it is determined in step 298 whether the continuous shooting mode is set. In the case of the continuous shooting mode, the process returns to step 270 and continuous shooting continues as long as the release button is pressed. When the continuous shooting mode is not set, the original routine is returned to.

第9図はサブルーチン『AF(レンズ繰り出し)』(第
8図のステップ266)のフローチャートである。ステッ
プ302でタイマリセットする。ステップ303で測距データ
とE2−PROMの調整データによりレンズ繰出し目標位置を
決定する。ステップ304でシャッタモータMsを正回転
し、フォーカシングレンズを駆動する。
FIG. 9 is a flowchart of the subroutine "AF (lens extension)" (step 266 in FIG. 8). In step 302, the timer is reset. The adjustment data of the distance measurement data and E 2 -PROM at step 303 to determine the lens extension target position. In step 304, the shutter motor Ms is positively rotated to drive the focusing lens.

ステップ306でフォトインタラプタPIsの出力が立下っ
た(パルスが1つ発生された)かどうか判定する。立下
った場合は、ステップ308でカウンタをカウントアップ
する。このカウント値を用いて、ステップ310でフォー
カシングレンズが目標位置まで繰り出されたかどうか判
定する。目標位置まで繰り出されていない場合は、ステ
ップ306に戻る。
In step 306, it is determined whether or not the output of the photo interrupter PIs has fallen (one pulse has been generated). If it has fallen, the counter is counted up in step 308. Using this count value, it is determined in step 310 whether the focusing lens has been extended to the target position. If it has not been advanced to the target position, the process returns to step 306.

目標位置まで繰り出された場合は、ステップ312でシ
ャッタモータMsの回転を停止する。ステップ314でAFレ
ンズフラグをリセットする。ステップ316でサブルーチ
ン『E2−PROM書込み』(第16図)を実行する。この後、
もとのルーチンに戻る。
If the shutter motor Ms has been extended to the target position, the rotation of the shutter motor Ms is stopped in step 312. At step 314, the AF lens flag is reset. A subroutine "E 2 -PROM write" (Figure 16) at step 316. After this,
Return to the original routine.

ステップ306でフォトインタラプタPIsの出力が立下っ
ていない場合は、ステップ318で、フォトインタラプタ
の立下がりから1秒経過したかどうか判定する。1秒経
過していない場合はステップ306に戻る。1秒経過した
場合は異常と判定し、ステップ320でシャッタモータMs
の回転を停止する。異常を示すAFレンズフラグをステッ
プ322でセットする。
If the output of the photointerrupter PIs has not fallen in step 306, it is determined in step 318 whether one second has elapsed since the fall of the photointerrupter. If one second has not elapsed, the process returns to step 306. If 1 second has elapsed, it is determined to be abnormal, and in step 320, the shutter motor Ms
Stop rotating. In step 322, an AF lens flag indicating an abnormality is set.

ステップ324でサブルーチン『E2−PROM書込み』(第1
6図)を実行する。ステップ326でサブルーチン『ダメー
ジ処理』(第10図)を実行する。
Step 324 in the subroutine "E 2 -PROM write" (first
6). In step 326, a subroutine "damage processing" (FIG. 10) is executed.

第10図はサブルーチン『ダメージ処理』のフローチャ
ートである。ステップ322で全てのアクチュエータをオ
フする。ステップ334でポートを初期セットする。ステ
ップ336で90秒タイマをセットする。ステップ338で90秒
経過したかどうか判定する。
FIG. 10 is a flowchart of the subroutine "damage processing". In step 322, all actuators are turned off. In step 334, the port is initially set. In step 336, the 90 second timer is set. In step 338, it is determined whether 90 seconds have elapsed.

90秒経過した場合は、ステップ340でストップモード
となる。ステップ340はエンドレスループを構成してい
て、ノイズでストップモードが解除されても、再びスト
ップモードにすることによりストップモードが解除でき
ない構成となっている。当然、このエンドレスループの
中にポートの初期セット及びストップ解除不許可命令を
入れておけばさらに良いことは言うまでもない。
When 90 seconds have elapsed, the stop mode is set in step 340. Step 340 forms an endless loop. Even if the stop mode is canceled due to noise, the stop mode cannot be canceled by setting the stop mode again. Needless to say, it is better to put the initial setting of the port and the stop release disabling instruction in this endless loop.

90秒経過していない場合は、ステップ342でCHECK1端
子が“L"かどうか判定する。CHECK1端子が“L"の場合
は、ステップ344でサブルーチン『外部装置との通信
3』(第22図(a),(b))を実行する。これによ
り、カメラ異常中でも、外部装置と通信が可能である。
If 90 seconds have not elapsed, it is determined in step 342 whether the CHECK1 terminal is "L". If the CHECK1 terminal is "L", the subroutine "communication with external device 3" (FIGS. 22 (a) and (b)) is executed in step 344. This allows communication with an external device even when the camera is abnormal.

CHECK1端子が“L"でない場合、またはサブルーチン
『外部装置との通信3』が終了した場合、ステップ364
でタイマ割込みを許可し、ステップ366でホルトモード
になる。タイマ割込みによりホルトモードが解除される
と、ステップ338に戻る。このサブルーチンはパワーオ
ンリセットまで動作する。
If the CHECK1 terminal is not "L", or if the subroutine "communication with external device 3" is completed, step 364
In step 366, the timer interrupt is enabled, and the halt mode is set. When the halt mode is released by the timer interrupt, the process returns to step 338. This subroutine operates until a power-on reset.

第11図はサブルーチン『一駒巻上げ』(第4図のステ
ップ124、第8図のステップ296)のフローチャートであ
る。ステップ370で巻上げ中かどうか判定する。巻上げ
中でない場合は、ステップ372で巻上げカウンタをリセ
ットする。ステップ374で巻上げ中フラグをセットす
る。ステップ376でサブルーチン『E2−PROM書込み』
(第16図)を実行し、巻上げ中フラグをE2−PROM24に書
込む。これは、巻上げ中に電源がオフになった場合で
も、前の状態を復元するためである。
FIG. 11 is a flowchart of a subroutine "winding one frame" (step 124 in FIG. 4, step 296 in FIG. 8). At step 370, it is determined whether or not the film is being wound. If not, the winding counter is reset in step 372. In step 374, a winding flag is set. Subroutine at step 376 "E 2 -PROM writing"
Running (FIG. 16), writing in the winding flag E 2 -PROM24. This is to restore the previous state even if the power is turned off during winding.

巻上げ中の場合、またはサブルーチン『E2−PROM書込
み』が終了した場合、ステップ378で巻上げモータMwを
正回転し、フィルムを巻上げる。
If during winding, or if the subroutine "E 2 -PROM write" has ended, the forward rotation of the motor Mw winding in step 378, winds up the film.

ステップ380でフォトインタラプタPIwの出力が立下っ
た(パルスが1つ発生された)かどうか判定する。立下
った場合は、ステップ382で巻上げカウンタをカウント
アップする。このカウント値を用いて、ステップ384で
一駒巻上げが終了したかどうか判定する。
In step 380, it is determined whether the output of the photo interrupter PIw has fallen (one pulse has been generated). If it has fallen, the winding counter is incremented in step 382. Using this count value, it is determined in step 384 whether the winding of one frame has been completed.

フォトインタラプタPIwの出力が立下っていない場
合、または一駒巻上げが終了していない場合は、ステッ
プ394でフィルムエンドかどうか判定する。フィルムエ
ンドはフォトインタラプタPIwの出力が2秒以上変化し
ない場合である。フィルムエンドでない場合はステップ
380に戻り、フィルムエンドの場合はステップ396でサブ
ルーチン『巻戻し』を実行する。
If the output of the photo interrupter PIw has not fallen, or if the winding of one frame has not been completed, it is determined in step 394 whether or not the film has ended. Film end is a case where the output of the photo interrupter PIw does not change for 2 seconds or more. Step if not film end
Returning to 380, in the case of film end, the subroutine "rewind" is executed in step 396.

一駒巻上げが終了した場合は、ステップ386で巻上げ
モータMwの回転を停止する。ステップ388で駒数カウン
タをカウントアップする。ステップ390で巻上げ中フラ
グをリセットする。ステップ392でサブルーチン『E2−P
ROM書込み』(第16図)を実行し、巻上げ中フラグ(リ
セット)をE2−PROM24に書込む。この後もとのルーチン
に戻る。
When the winding of one frame is completed, the rotation of the winding motor Mw is stopped in step 386. In step 388, the frame number counter is incremented. In step 390, the winding flag is reset. In step 392 subroutine "E 2 -P
Run the ROM writing "(FIG. 16), write flag (reset) to E 2 -PROM24 during winding. After this, the original routine is returned to.

なお、サブルーチン『空送り』はフィルムローディン
グし裏蓋を閉じた後、自動的に数駒フィルムを巻上げる
ものであり、サブルーチン『一駒巻上げ』を数回連続し
て実行するものである。サブルーチン『巻戻し』もサブ
ルーチン『一駒巻上げ』と同様に、フィルムが停止する
まで巻上げモータを逆転するものである。
The subroutine "idle feed" is to automatically wind several frames of film after the film is loaded and the back cover is closed, and the subroutine "winding one frame" is continuously executed several times. The subroutine "rewinding" also reverses the winding motor until the film stops, similar to the subroutine "winding one frame".

第12図はサブルーチン『E2−PROM読出し』(第4図の
ステップ108、第5図(a)のステップ152)のフローチ
ャートである。ステップ402でE2−PROM24のアドレスを
1にリセットし、ステップ404でE2−PROM24のモードを
読出しモードとする。ステップ406でCPU10をシリアル通
信入力モードとし、ステップ408でRAMアドレス(ADR)
にEPをセットする。
Figure 12 is a subroutine "E 2 -PROM read" is a flowchart of a (step 108 of FIG. 4, step 152 of FIG. 5 (a)). Reset the address of E 2 -PROM24 to 1 in step 402, the mode of E 2 -PROM24 the read mode in step 404. At step 406, the CPU 10 is set to the serial communication input mode. At step 408, the RAM address (ADR) is set.
Set EP to.

ここで、各RAMアドレスの内容は第13図に示すように
なっている。各データは8ビットのデータであり、RAM
アドレスEP+1のカメラ状態データの各ビットの内容は
第14図に、RAMアドレスEP+2の異常データの各ビット
の内容は第15図に示すようになっている。
Here, the contents of each RAM address are as shown in FIG. Each data is 8-bit data, RAM
The content of each bit of the camera status data at the address EP + 1 is as shown in FIG. 14, and the content of each bit of the abnormal data at the RAM address EP + 2 is as shown in FIG.

ステップ410でE2−PROM24から8つのビットデータを
シリアル入力し、E2−PROM24のアドレスをインクリメン
トする。
Eight-bit data from the E 2 -PROM24 serial input at step 410, increments the address of the E 2 -PROM24.

ステップ412でシリアル入力データをRAMアドレス(AD
R)にセットする。ステップ414でRAMアドレスをインク
リメントする。ステップ416でRAMアドレスがE2−PROM24
のデータ数を越えたかどうか判定する。越えた場合はも
とのルーチンに戻り、越えない場合はステップ410に戻
り、次のアドレスの8つのビットデータをシリアル入力
する。
In step 412, the serial input data is transferred to RAM address (AD
Set to R). At step 414, the RAM address is incremented. RAM address in step 416. E 2 -PROM24
It is determined whether or not the number of data has exceeded. If it exceeds the threshold, the routine returns to the original routine, and if it does not exceed the threshold, the routine returns to step 410 to serially input the 8-bit data of the next address.

第16図はサブルーチン『E2−PROM書込み』(第8図の
ステップ290等)のフローチャートである。ステップ422
でE2−PROM24をリセットし、E2−PROM24のアドレスを1
とする。ステップ424でE2−PROM24を書込みモードに設
定する。ステップ426でシリアル通信出力モードを設定
し、ステップ428でRAMアドレス(ADR)にEPをセットす
る。
FIG. 16 is a flowchart of a subroutine "E 2 -PROM write" (such as step 290 of Figure 8). Step 422
In to reset the E 2 -PROM24, the address of the E 2 -PROM24 1
And In step 424 sets the E 2 -PROM24 the write mode. In step 426, the serial communication output mode is set, and in step 428, EP is set in the RAM address (ADR).

ステップ430でCPU10のシリアルアウトレジスタにADR
番地のデータをセットし、ステップ432でシリアル出力
し、8つのビットデータをE2−PROM24に転送する。ステ
ップ434でRAMアドレスをインクリメントする。
ADR to serial out register of CPU 10 in step 430
The address data is set, serially output in step 432, and the 8 bit data is transferred to the E 2 -PROM 24. In step 434, the RAM address is incremented.

ステップ436でRAMアドレスがE2−PROM24のデータ数を
越えたかどうか判定する。越えた場合はもとのルーチン
に戻り、越えない場合はステップ430に戻り、次のアド
レスの8つのビットデータをシリアル出力する。
RAM address in step 436 it is determined whether or exceeds the number of data of the E 2 -PROM24. If it exceeds, the process returns to the original routine. If it does not exceed, the process returns to step 430 to serially output eight bits of data at the next address.

第17図はサブルーチン『バッテリチェック』(第4図
のステップ110)のフローチャートである。
FIG. 17 is a flowchart of a subroutine "battery check" (step 110 in FIG. 4).

バッテリチェックは、第18図に示すように、カメラ内
の電源電圧VDDを抵抗R1,R2で分圧した電圧をCPU10に内
蔵のA/D変換器でディジタル値に変換し、これをE2−PRO
M24内に記憶されているバッテリチェックデータと比較
することにより行われる。ここで、各カメラ毎に抵抗R
1,R2の値にバラツキがあるので、カメラの出荷前に各カ
メラ毎に電源電圧VDDのA/D変換値を求めて、これから求
めた調整値(バッテリチェックデータ)をE2−PROM24に
書込んでおく。この書込みのプログラムは外部装置に格
納しておいて、外部装置との通信によりこのプログラム
を実行する。
Battery check, as shown in FIG. 18, converts the divided voltage of the power supply voltage VDD by the resistors R1, R2 in the camera into a digital value by the built-in A / D converter to CPU 10, which E 2 - PRO
This is performed by comparing with the battery check data stored in the M24. Here, the resistance R for each camera
1, since the value of R2 is variation, before shipment of the camera seeking an A / D conversion value of the power supply voltage VDD for each camera, writing adjustment value obtained therefrom (the battery check data) to the E 2 -PROM24 Keep it complicated. This writing program is stored in an external device, and the program is executed by communication with the external device.

A/D変換のための基準電圧VrefはCPU10からの指令によ
りIFIC40から供給される。
The reference voltage Vref for A / D conversion is supplied from the IFIC 40 according to a command from the CPU 10.

ステップ440でサブルーチン『バッテリ値A/D変換』を
実行する。ステップ442でA/D変換値が調整値以上かどう
か判定する。調整値以上でない場合は、ステップ444で
サブルーチン『バッテリなし表示』を実行する。ステッ
プ446でKEYロックし、ステップ448でストップモードと
する。この場合もエンドレスループになっている。これ
はノイズ等でストップが解除されても、すぐに低消費電
流モード(ストップ)に戻すためである。
At step 440, the subroutine "battery value A / D conversion" is executed. In step 442, it is determined whether the A / D conversion value is equal to or larger than the adjustment value. If it is not equal to or larger than the adjustment value, the subroutine "display without battery" is executed in step 444. In step 446, the KEY is locked, and in step 448, the stop mode is set. Also in this case, it is an endless loop. This is to immediately return to the low current consumption mode (stop) even if the stop is canceled due to noise or the like.

調整値以上である場合は、ステップ450でA/D変換値が
[調整値+一定値]以上かどうか判定する。[調整値+
一定値]以上でない場合は、ステップ452でバッテリ少
フラグをセットし、もとのルーチンに戻る。[調整値+
一定値]以上である場合は、ステップ454でバッテリ少
フラグをリセットし、もとのルーチンに戻る。
If it is greater than or equal to the adjustment value, it is determined in step 450 whether the A / D conversion value is greater than or equal to [adjustment value + constant value]. [Adjustment value +
If it is not equal to or more than a certain value], the low battery flag is set in step 452, and the process returns to the original routine. [Adjustment value +
If the value is equal to or more than the predetermined value, the low battery flag is reset in step 454, and the process returns to the original routine.

次に、外部装置との通信について説明する。 Next, communication with an external device will be described.

第19図はこの実施例による通信の各種のモードを説明
する図である。先ず、通信モードは大きく別けて、標準
モードとユーティリティモードに分類できる。これは、
外部装置から発生されるモード指定コードSYAD2により
分類され、SYAD2=0,1,15の場合は標準モードであり、S
YAD2=2の場合はユーティリティモードである。SYAD2
の0,1,15はそれぞれCPU10に内蔵されているRAMの使用可
能な上位アドレスに相当する。標準モードはモード指定
コードCKDTが“リード”か“ライト”かによりRAM読出
しモード、RAM書込みモードに細分される。ユーティリ
ティモードはモード指定コードSYADによるサブルーチン
コールモード(SYAD=0)、ジャンプモード(SYAD=
1)、連続通信モード(SYAD=E)、連続通信解除モー
ド(SYAD=D)に細分される。
FIG. 19 is a diagram for explaining various modes of communication according to this embodiment. First, communication modes can be broadly classified into standard mode and utility mode. this is,
Classification is based on the mode designation code SYAD2 generated from the external device. When SYAD2 = 0, 1, 15 is the standard mode,
If YAD2 = 2, it is the utility mode. SYAD2
0, 1, 15 correspond to usable upper addresses of the RAM built in the CPU 10, respectively. The standard mode is subdivided into a RAM read mode and a RAM write mode depending on whether the mode designation code CKDT is "read" or "write". Utility mode is subroutine call mode (SYAD = 0) by the mode specification code SYAD, jump mode (SYAD =
1), a continuous communication mode (SYAD = E), and a continuous communication release mode (SYAD = D).

カメラと外部装置との間の通信データのフォーマット
は一定である。一例として、RAM読出しモードとRAM書込
みモードの際のCPU10と外部装置との間の通信データの
フォーマットをそれぞれ第20図、第21図に示す。図中、
outとあるのはカメラから外部装置へ通信されるデータ
であり、inとあるのは外部装置からカメラへ通信される
データである。
The format of communication data between the camera and the external device is constant. As an example, the formats of communication data between the CPU 10 and the external device in the RAM read mode and the RAM write mode are shown in FIGS. 20 and 21, respectively. In the figure,
“out” is data transmitted from the camera to the external device, and “in” is data transmitted from the external device to the camera.

カメラのCPU10から発生されるクロックCLKに同期して
データラインDATAを介してデータが通信される。ここで
は外部装置との通信は、どのルーチン中かにより通信1
〜通信3に分類されていて、先ず、これらを識別するた
めの同期信号が、RAM読出しモードかRAM書込みモードか
にかかわらずCPU10から出力される。通信1,通信2,通信
3の同期信号はそれぞれ2,3,4個のパルスからなる。
Data is communicated via a data line DATA in synchronization with a clock CLK generated from the CPU 10 of the camera. Here, the communication with the external device is communication 1 depending on which routine is being executed.
First, a synchronization signal for identifying these is output from the CPU 10 irrespective of the RAM read mode or the RAM write mode. The synchronization signal for communication 1, communication 2, and communication 3 is composed of 2, 3, and 4 pulses, respectively.

ここで、通信1は『パワーオンリセット』ルーチン
(第4図)中、及び『表示タイマカウント』ルーチン
(第6図)中における通信であり、通信2はサブルーチ
ン『レリーズ処理』(第8図)中における通信であり、
通信3はサブルーチン『ダメージ処理』(第10図)中に
おける通信である。
Here, communication 1 is communication during the “power-on reset” routine (FIG. 4) and during the “display timer count” routine (FIG. 6), and communication 2 is a subroutine “release processing” (FIG. 8). Communication inside,
Communication 3 is communication in the subroutine "damage processing" (Fig. 10).

このように、同期信号を通信の時点によって変えるこ
とにより、例えばオプションでレリーズ中のみ通信を行
ないある特定の制御をするという動作が可能になり、カ
メラ機能の拡充が図れる。また、通常のカメラシーケン
ス中かダメージ処理中かの判断を容易にできる。
As described above, by changing the synchronization signal depending on the time of communication, for example, an optional operation of performing communication only during release and performing a specific control can be performed, and the camera function can be expanded. Further, it is possible to easily determine whether the camera sequence is being performed or a damage process is being performed.

RAM読出しモードの際は、第20図に示すように、同期
信号に続いて、モード指定コードCKDT(4ビット)、SY
AD2(4ビット)、SYAD(8ビット)が外部装置からカ
メラに通信される。SYAD2、SYADがRAMの読出しアドレス
となる。次の入力データ(8ビット)は不定であり、そ
の後、RAMから読出したデータがカメラから外部装置に
通信される。
In the RAM read mode, as shown in FIG. 20, following the synchronization signal, the mode designation code CKDT (4 bits), SY
AD2 (4 bits) and SYAD (8 bits) are communicated from an external device to the camera. SYAD2 and SYAD are RAM read addresses. The next input data (8 bits) is undefined, and then the data read from the RAM is transmitted from the camera to the external device.

RAM書込みモードの際は、第21図に示すように、同期
信号に続いて、モード指定コードCKDT、SYAD2、SYAD、
書込みデータSYDTが外部装置からカメラに通信され、SY
AD2、SYADで示されるRAMのアドレスにSYDTが書込まれ
る。その後、チェックコードPOFCKが外部装置からカメ
ラに通信される。これは、このチェックコードはCPU10
内のRAMを操作するため、通信が最後まで正常に行われ
たかどうかを確認するものである。
In the RAM write mode, as shown in Figure 21, following the sync signal, the mode designation codes CKDT, SYAD2, SYAD,
The write data SYDT is communicated to the camera from the external device,
SYDT is written to the RAM address indicated by AD2 and SYAD. Thereafter, the check code POFCK is transmitted from the external device to the camera. This is because this check code is CPU10
Since the internal RAM is operated, it is to check whether the communication was normally completed.

このようなフォーマットによる外部装置との通信のフ
ローチャートを第22図(a),(b)に示す。第22図
(a),(b)はサブルーチン『外部装置との通信
1』、『同2』、『同3』をまとめて示すものである。
外部装置との通信1の場合はステップ502でNに2をセ
ットし、外部装置との通信2の場合はステップ504でN
に3をセットし、外部装置との通信3の場合はステップ
506でNに4をセットする。この後、ステップ508で同期
パルスをN回出力する。
Flow charts for communication with an external device in such a format are shown in FIGS. 22 (a) and 22 (b). 22 (a) and 22 (b) collectively show the subroutines "communication with external device 1", "same 2", and "same 3".
In the case of communication 1 with the external device, N is set to 2 in step 502, and in the case of communication 2 with the external device, N is set in step 504.
Set 3 to 3 and step 3 for communication with external device
At 506, 4 is set to N. Then, in step 508, the sync pulse is output N times.

ステップ510でCPU10をシリアル通信入力モードとし、
ステップ512でクロックCLKを8個発生し、外部装置から
のビットデータを8個シリアル入力する。ステップ514
でシリアル入力データをRAMのCKDT,SYAD2アドレスに書
込む。ステップ516で次のデータをシリアル入力する。
ステップ518でシリアル入力データをRAMのSYADアドレス
に書込む。ステップ520で次のデータをシリアル入力す
る。ステップ522でシリアル入力データをRAMのSYDTアド
レスに書込む。
In step 510, CPU 10 is set to serial communication input mode,
In step 512, eight clocks CLK are generated, and eight bit data from an external device are serially input. Step 514
To write the serial input data to the CKDT and SYAD2 addresses of the RAM. In step 516, the next data is serially input.
In step 518, the serial input data is written to the RAM SYAD address. In step 520, the next data is serially input. In step 522, the serial input data is written to the RAM SYDT address.

ステップ524でCKDTに基づき読出し(リード)モード
か、書込み(ライト)モードかを判定する。リードモー
ドの場合は、ステップ526でSYAD2,SYADアドレスのデー
タをシリアルバッファにセットする。ステップ528でシ
リアル通信出力モードにセットし、ステップ530でデー
タ(第20図の読出しデータ)を外部装置にシリアル出力
し、その後もとのルーチンに戻る。
In step 524, it is determined whether the mode is the read (read) mode or the write (write) mode based on the CKDT. In the case of the read mode, in step 526, the data of the SYAD2 and SYAD addresses is set in the serial buffer. In step 528, the serial communication output mode is set. In step 530, data (read data in FIG. 20) is serially output to an external device, and thereafter, the routine returns to the original routine.

ライトモードの場合は、ステップ532で次のデータを
シリアル入力し、ステップ534で入力データがチェック
コード(POCKF)であるかどうか判定する。入力データ
がチェックコードでない場合は、シリアル通信エラーと
し、もとのルーチンに戻る。
In the case of the write mode, the next data is serially input at step 532, and it is determined at step 534 whether the input data is a check code (POCKF). If the input data is not a check code, a serial communication error occurs and the process returns to the original routine.

入力データがチェックコードの場合は、ステップ536
でSYAD2が0,1,15のいずれであるかどうか判定する。SYA
D2が0,1,15のいずれかである場合は標準モードと判定
し、ステップ538でSYAD2,SYADアドレスにSYDTアドレス
のデータを書込み、その後もとのルーチンに戻る。
If the input data is a check code, step 536
To determine whether SYAD2 is 0, 1, or 15. SYA
If D2 is 0, 1 or 15, it is determined to be the standard mode, and in step 538, the data of the SYDT address is written in the SYAD2 and SYAD addresses, and then the process returns to the original routine.

SYAD2が0,1,15のいずれでもない場合は、ステップ540
でSYAD2=2かどうか判定される。SYAD2=2でない場合
は、シリアル通信エラーとし、もとのルーチンに戻る。
SYAD2=2である場合はユーティリティモードと判定
し、ステップ542でSYAD=0であるかどうか判定する。
If SYAD2 is not 0,1,15, step 540
It is determined whether or not SYAD2 = 2. If SYAD2 is not 2, a serial communication error is determined, and the routine returns to the previous routine.
If SYAD2 = 2, it is determined that the mode is the utility mode, and it is determined in step 542 whether SYAD = 0.

SYAD=0の場合はサブルーチンコールモードと判定
し、ステップ544でRAMバッファのデータをレジスタに移
す。ステップ546でサブルーチン『サブルーチンコー
ル』(第23図)を実行する。ステップ548でレジスタの
データをRAMバッファに移した後、もとのルーチンに戻
る。ここで、RAMバッファを使用するのは、後述する連
続通信モードで連続してサブルーチンを実行する場合
に、前のサブルーチンの実行直後のレジスタの内容を次
のサブルーチン実行時に引きつぐようにするためであ
る。すなわち、レジスタの値を引数としたサブルーチン
を続けて実行できることとなる。
If SYAD = 0, the subroutine call mode is determined, and the data in the RAM buffer is transferred to the register in step 544. In step 546, a subroutine "subroutine call" (FIG. 23) is executed. After the data in the register is transferred to the RAM buffer in step 548, the process returns to the original routine. Here, the reason for using the RAM buffer 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 previous subroutine are used at the time of executing the next subroutine. is there. That is, the subroutine using the register value as an argument can be executed continuously.

SYAD=0でない場合は、ステップ550でSYAD=1かど
うか判定する。SYAD=1の場合はジャンプモードと判定
し、ステップ552で連続モード中かどうか判定する。連
続モード中の場合は、スタックが1サブルーチン分(後
述する連続モード中の『外部装置との通信1』(ステッ
プ562))増えているので、ステップ554でスタックポイ
ンタを1サブルーチン分だけ戻して、ステップ556に移
る。連続モード中でない場合は、すぐステップ556に移
る。ステップ556でスタックにRAMアドレス(BRADR)で
示されるデータをセットする。その後、リターン命令が
あると、スタックに移されていた(BRADR)の内容をプ
ログラムカウンタに移すことにより、(BRADR)で示さ
れている番地にジャンプする。
When SYAD = 0 is not satisfied, it is determined at step 550 whether SYAD = 1. If SYAD = 1, it is determined that the current mode is the jump mode. In the case of the continuous mode, the stack is increased by one subroutine (“communication 1 with external device 1” (step 562) in the continuous mode described later). Go to step 556. If not in the continuous mode, the process immediately proceeds to step 556. In step 556, data indicated by the RAM address (BRADR) is set in the stack. After that, when there is a return instruction, the contents of (BRADR) that have been moved to the stack are moved to the program counter to jump to the address indicated by (BRADR).

SYAD=1でない場合は、ステップ558でSYAD=Eかど
うか判定する。SYAD=Eの場合は連続通信モードと判定
し、ステップ560で連続モード中かどうか判定する。連
続モード中でない場合は、ステップ562でサブルーチン
『外部装置との通信1』を実行する。ステップ564でCHE
CK1端子が“L"かどうか判定する。CHECK1端子が“L"の
場合は、ステップ562を再度実行する。これにより、カ
メラと外部装置とが連続して通信可能となる。すなわ
ち、連続モード中となる。連続モード中の場合は更に連
続モードになることを禁止するため、またはEXT端子3
がはずれたり、外部装置2が通信をやめたりしてCHECK1
端子が“L"ではない場合は、もとのルーチンに戻る。
If SYAD = 1 is not satisfied, it is determined in step 558 whether SYAD = E. If SYAD = E, it is determined that the communication mode is the continuous communication mode. If it is not in the continuous mode, the subroutine "communication with external device 1" is executed in step 562. CHE in step 564
Determine whether the CK1 pin is "L". If the CHECK1 terminal is "L", execute step 562 again. This allows the camera and the external device to communicate continuously. That is, the continuous mode is set. In the continuous mode, to prohibit further continuous mode or EXT terminal 3
CHECK1 is lost because the external device 2 has stopped communicating.
If the terminal is not "L", the routine returns to the original routine.

SYAD=Eでない場合は、ステップ566でSYAD=Dかど
うか判定する。SYAD=Dの場合は連続通信解除モードと
判定し、ステップ568で連続モード中かどうか判定す
る。連続モード中の場合は、ステップ570でスタックポ
インタを1サブルーチン分(連続モード中の『外部装置
との通信1』(ステップ562))だけ戻して、もとのル
ーチンに戻る。SYAD=Dでない場合、または連続モード
中でない場合は、すぐにもとのルーチンに戻る。
If SYAD = E is not satisfied, it is determined in step 566 whether SYAD = D. If SYAD = D, it is determined that the continuous communication release mode is set, and in step 568, it is determined whether or not the continuous mode is set. If it is in the continuous mode, the stack pointer is returned by one subroutine ("communication 1 with external device 1" in the continuous mode (step 562)) in step 570, and the routine returns to the original routine. If SYAD = D is not satisfied or the continuous mode is not in effect, the process immediately returns to the original routine.

第23図はサブルーチン『サブルーチンコール』(第22
図(b)のステップ546)のフローチャートである。こ
こでは、ステップ574に示すようにスタックにRAMアドレ
ス(BRADR)で示されるデータをセットし、リターン命
令により、直前にスタックにセットされた(BRADR)の
内容に従ってプログラムカウンタを(BRADR)で示され
た番地に変化させることにより、(BRADR)で示された
サブルーチンを実行する。スタックには、まだ『サブル
ーチンコール』(ステップ546)を呼んだ戻り番地が残
っているので、(BRADR)で示された番地のサブルーチ
ン終了時のリターン命令により『サブルーチンコール』
(ステップ546)の次のステップ548にプログラムは移る
(戻る)。
FIG. 23 shows a subroutine "subroutine call" (FIG. 22).
It is a flowchart of step 546) of FIG. Here, the data indicated by the RAM address (BRADR) is set on the stack as shown in step 574, and the return instruction causes the program counter to be indicated by (BRADR) according to the contents of (BRADR) set on the stack immediately before. Then, the subroutine indicated by (BRADR) is executed by changing the address. Since the stack still has the return address that called the "subroutine call" (step 546), the return instruction at the end of the subroutine at the address indicated by (BRADR) indicates the "subroutine call".
The program moves to the next step 548 (step 546) (return).

次に、以上のようなカメラCPU10のプログラムを利用
して種々の機能を実現する外部装置側のCPU4の動作例を
説明する。
Next, an operation example of the CPU 4 of the external device which realizes various functions by using the above-described program of the camera CPU 10 will be described.

第24図は外部装置CPU4のサブルーチン『バッテリチェ
ック電圧調整』のフローチャートである。これは、カメ
ラCPU10のサブルーチン『バッテリチェック』で参照す
る調整値を出荷前にカメラ毎にE2−PROM24に書込む機能
である。
FIG. 24 is a flowchart of a subroutine “battery check voltage adjustment” of the external device CPU4. This is a function for writing the adjustment value referred to in the subroutine “battery check” of the camera CPU 10 to the E 2 -PROM 24 for each camera before shipment.

ステップ602でCHECK1端子を“L"にし、カメラ側に通
信要求を送信する。ステップ604で連続通信モードをセ
ットする。すなわち、CKDT=“ライト",SYAD2=2,SYAD
=Eとする。ステップ606で通信条件を1(N=2)に
する。ステップ608でカメラにリセットをかけ、カメラC
PU10にサブルーチン『パワーオンリセット』を開始させ
る。ステップ610でサブルーチン『カメラとの通信』
(第26図)を実行する。
In step 602, the CHECK1 terminal is set to “L”, and a communication request is transmitted to the camera. At 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). In step 608, reset the camera and set camera C
Causes PU10 to start the subroutine "power on reset". Subroutine "communication with camera" in step 610
(Fig. 26).

これにより、カメラのCPU10はパワーオンリセット後
の1回目の通信(第4図のステップ106)で連続通信モ
ードになる。ここで、連続通信モードにしないと、カメ
ラ側のプログラムはステップ108,110と進んで、まだ調
整されていない調整値でサブルーチン『バッテリチェッ
ク』を行なうことになる。もし、調整値が大きい値にな
っていた場合には、カメラ動作はステップ448(第17
図)でロックしてしまう。
As a result, the CPU 10 of the camera enters the continuous communication mode in the first communication (step 106 in FIG. 4) after the power-on reset. If the continuous communication mode is not set, the camera-side program proceeds to steps 108 and 110, and performs a subroutine "battery check" with an adjustment value that has not been adjusted. If the adjustment value has become a large value, the camera operation proceeds to step 448 (step 17
Lock).

ステップ612でIFIC40をオンするデータをセットす
る。ステップ614で書込みモードをセットする。すなわ
ち、SYAD2=15(IFIC用出力上位番地),SYAD=“IFIC用
出力下位番地",SYDT=“IFICオンデータ",CKDT=“ライ
ト”とする。ステップ616でサブルーチン『カメラとの
通信』を実行する。
In step 612, data for turning on the IFIC 40 is set. At step 614, the write mode is set. That is, SYAD2 = 15 (IFIC output upper address), SYAD = “IFIC output lower address”, SYDT = “IFIC on data”, and CKDT = “write”. At step 616, a subroutine "communication with camera" is executed.

これにより、IFIC40からは第18図に示したA/D変換の
ための基準電圧Vrefが出力される。
As a result, the reference voltage Vref for A / D conversion shown in FIG. 18 is output from the IFIC 40.

ステップ618でSYAD2,SYADに(BRADR)のRAMアドレス
を、SYDTにサブルーチン『A/D変換』の先頭アドレスを
セットした後、ステップ620でサブルーチン『カメラと
の通信』を実行する。すなわち、サブルーチン『A/D変
換』の先頭アドレスをRAMアドレス(BRADR)にセットす
る。ステップ622でサブルーチンコールモードをセット
する。すなわち、CKDT=“ライト",SYAD2=2,SYAD=0
とする。ステップ624でサブルーチン『カメラとの通
信』を実行する。
In step 618, the RAM address of (BRADR) is set in SYAD2 and SYAD, and the start address of the subroutine "A / D conversion" is set in SYDT. Then, in step 620, the subroutine "communication with camera" is executed. That is, the head address of the subroutine "A / D conversion" is set to the RAM address (BRADR). At step 622, a subroutine call mode is set. That is, CKDT = "write", SYAD2 = 2, SYAD = 0
And In step 624, a subroutine "communication with camera" is executed.

これにより、サブルーチン『A/D変換』が実行され、
カメラの電源電圧VDDがCPU10でA/D変換される。
As a result, the subroutine "A / D conversion" is executed,
The power supply voltage VDD of the camera is A / D converted by the CPU 10.

ステップ626で読出しモードをセットする。すなわ
ち、CKDT=“リード”とする。ステップ628でSYAD2,SYA
DにA/D変換値から求めた調整値(バッテリチェックデー
タ)をセットする。ステップ630でサブルーチン『カメ
ラとの通信』を実行する。
In step 626, the read mode is set. That is, CKDT = “read”. SYAD2, SYA in step 628
Set the adjustment value (battery check data) obtained from the A / D conversion value in D. In step 630, a subroutine "communication with camera" is executed.

これにより、バッテリチェックデータが一旦外部装置
側に読出される。
Thereby, the battery check data is once read out to the external device side.

ステップ632でSYAD2,SYADにバッテリチェックデータ
の書込みRAMアドレス(EP+3)をセットする。また、
ステップ630で読出されたバッテリチェックデータをSYD
Tにセットする。ステップ636で書込みモードをセットす
る。すなわち、CKDT=“ライト”とする。ステップ638
でサブルーチン『カメラとの通信』を実行する。
In step 632, the write RAM address (EP + 3) of the battery check data is set in SYAD2 and SYAD. Also,
The battery check data read in step 630 is SYD
Set to T. At step 636, the write mode is set. That is, CKDT = “write”. Step 638
To execute the subroutine "communication with camera".

これにより、E2−PROM書込み用のRAMアドレス(EP+
3)にバッテリチェックデータが書込まれる。
As a result, E 2 -PROM RAM address for writing (EP +
The battery check data is written in 3).

ステップ640でSYDTにサブルーチン『E2−PROM書込
み』の先頭アドレスをセットする。また、SYAD2,SYADに
(BRADR)のRAMアドレスをセットする。ステップ644で
サブルーチン『カメラとの通信』を実行する。ステップ
646でサブルーチンコールモードにする。ステップ648で
サブルーチン『カメラとの通信』を実行する。
To set the starting address of the subroutine "E 2 -PROM writing" to SYDT in step 640. The RAM address of (BRADR) is set in SYAD2 and SYAD. In step 644, a subroutine "communication with camera" is executed. Steps
Set to subroutine call mode at 646. In step 648, a subroutine "communication with camera" is executed.

これにより、E2−PROM24にバッテリチェックデータが
書込まれる。
As a result, the battery check data is written to the E 2 -PROM24.

この後、もとのルーチンに戻る。 Thereafter, the process returns to the original routine.

第25図はサブルーチン『AFレンズ駆動調整』のフロー
チャートである。上述したカメラCPU10のサブルーチン
『AF(レンズ繰出し)』ではモータがオンしてから1秒
経過してもフォーカシングレンズが動かない場合、異常
であると判定していたが、バッテリチェックデータと同
様に、この判定基準時間を出荷前にカメラ毎に調整する
場合に、サブルーチン『AFレンズ駆動調整』を実行す
る。
FIG. 25 is a flowchart of the subroutine “AF lens drive adjustment”. In the above-described subroutine "AF (lens extension)" of the camera CPU 10, if the focusing lens does not move even after one second has elapsed since the motor was turned on, it was determined that the focusing lens was abnormal. To adjust the judgment reference time for each camera before shipment, a subroutine "AF lens drive adjustment" is executed.

ステップ652でSYDTにサブルーチン『AF(レンズ繰出
し)』の先頭アドレスをセットする。また、SYAD2,SYAD
に(BRADR)のRAMアドレスをセットする。ステップ654
でサブルーチン『カメラとの通信』を実行する。ステッ
プ656でサブルーチンコールモードをセットする。ステ
ップ658でサブルーチン『カメラとの通信』を実行す
る。
In step 652, the head address of the subroutine "AF (lens extension)" is set in SYDT. Also, SYAD2, SYAD
To the (BRADR) RAM address. Step 654
To execute the subroutine "communication with camera". At step 656, a subroutine call mode is set. In step 658, a subroutine "communication with camera" is executed.

これにより、サブルーチン『AF(レンズ繰出し)』が
実行される。この時、他の測定装置でフォーカシングレ
ンズ駆動の基準とするスイッチ(AFs)52からレンズ基
準位置までにフォトインタラプタ(PIs)54の出力が何
パルス出るかを測定しておく。
Thus, the subroutine "AF (lens extension)" is executed. At this time, the number of output pulses of the photo interrupter (PIs) 54 from the switch (AFs) 52, which is the reference for driving the focusing lens, to the lens reference position is measured by another measuring device.

ステップ660で同期信号の数を検出する。ステップ662
で同期信号の数が4であるかどうか判定する。4である
場合は、ステップ664で異常表示を行なって、エンド処
理する。すなわち、レンズ駆動異常となったので、調整
できない。
In step 660, the number of synchronization signals is detected. Step 662
It is determined whether or not the number of synchronization signals is 4. If it is 4, an error display is made in step 664 and the end processing is performed. That is, adjustment cannot be performed because a lens drive abnormality has occurred.

4でない場合は、ステップ666でSYDTにAF調整データ
を、SYAD2,SYADに(EP+5)のRAMアドレスをセットす
る。ステップ670で書込みモードをセットする。ステッ
プ672でサブルーチン『カメラとの通信』を実行する。
If it is not 4, the AF adjustment data is set in SYDT and the RAM address of (EP + 5) is set in SYAD2 and SYAD in step 666. At step 670, the write mode is set. In step 672, a subroutine "communication with camera" is executed.

これにより、E2−PROM書込み用のRAMアドレス(EP+
3)にAF調整データが書込まれる。
As a result, E 2 -PROM RAM address for writing (EP +
AF adjustment data is written in 3).

ステップ674でSYDTにサブルーチン『E2−PROM書込
み』の先頭アドレスをセットする。また、SYAD2,SYADに
(BRADR)のRAMアドレスをセットする。ステップ678で
サブルーチン『カメラとの通信』を実行する。ステップ
680でサブルーチンコールモードにする。ステップ682で
サブルーチン『カメラとの通信』を実行する。
In step 674 in SYDT to set the starting address of the subroutine "E 2 -PROM writing". The RAM address of (BRADR) is set in SYAD2 and SYAD. In step 678, a subroutine "communication with camera" is executed. Steps
Set the subroutine call mode at 680. In step 682, a subroutine "communication with camera" is executed.

これにより、E2−PROM24にAF調整データが書込まれ
る。
Thus, AF adjustment data is written to the E 2 -PROM24.

この後、もとのルーチンに戻る。 After this, the original routine is returned to.

第26図は第24図、第25図に示されるサブルーチン『カ
メラとの通信』のフローチャートである。ステップ673
で同期信号があるかどうか判定する。ここで同期信号が
くるまでこのステップ673を繰り返して待つ。同期信号
がある場合は、ステップ675で同期信号の数が2,3,4のい
ずれかであるかどうか判定する。同期信号の数が2,3,4
のいずれでもない場合は、ステップ673に戻る。同期信
号の数が2,3,4のいずれかである場合は、ステップ677で
シリアル通信出力モードが設定される。
FIG. 26 is a flowchart of the subroutine “communication with camera” shown in FIGS. 24 and 25. Step 673
To determine if there is a synchronization signal. Here, this step 673 is repeated until a synchronization signal comes, and the process waits. If there is a synchronization signal, it is determined in step 675 whether the number of synchronization signals is one of 2, 3, and 4. The number of synchronization signals is 2, 3, 4
Otherwise, the process returns to step 673. If the number of synchronization signals is one of 2, 3, and 4, the serial communication output mode is set in step 677.

ステップ679でCKDT,SYAD2データをシリアルバッファ
にセットする。ステップ681でシリアルバッファのデー
タをカメラCPU10からのクロックCLKに同期して、シリア
ル出力する。ステップ683でSYADデータをシリアルバッ
ファにセットする。ステップ684でシリアルバッファの
データをシリアル出力する。ステップ686でSYDTデータ
をシリアルバッファにセットする。読出しモードの場合
は、SYDTはダミーデータでよい。ステップ688でシリア
ルバッファのデータをシリアル出力する。
At step 679, CKDT and SYAD2 data are set in the serial buffer. In step 681, the data in the serial buffer is serially output in synchronization with the clock CLK from the camera CPU 10. In step 683, SYAD data is set in the serial buffer. In step 684, the data in the serial buffer is serially output. In step 686, SYDT data is set in the serial buffer. In the case of the read mode, SYDT may be dummy data. At step 688, the data in the serial buffer is serially output.

ステップ690で読出しモード(CKDT=“リード”)か
どうか判定する。読出しモードでない場合は、ステップ
692でPOFCKデータをシリアルバッファにセットする。ス
テップ694でシリアルバッファのデータをシリアル出力
する。その後、もとのルーチンに戻る。
At step 690, it is determined whether the mode is the read mode (CKDT = "read"). If not in read mode, step
At 692, POFCK data is set in the serial buffer. At step 694, the data in the serial buffer is serially output. Then, the process returns to the original routine.

読出しモードである場合は、ステップ696でシリアル
通信入力モードをセットする。ステップ698でカメラか
らのデータ(第20図の読出しデータ)シリアル入力す
る。その後、もとのルーチンに戻る。
If the mode is the read mode, the serial communication input mode is set in step 696. In step 698, data (read data in FIG. 20) from the camera is serially input. Then, the process returns to the original routine.

これ以外の調整データ(シャッタ調整データ等)につ
いても、同様に外部装置のCPUをプログラムしておくこ
とにより、カメラ出荷前に各カメラ毎に調整可能であ
る。これにより、部品等によるカメラのバラツキに無関
係に種々の判定を正確に実行できる。
Other adjustment data (shutter adjustment data and the like) can be adjusted for each camera before shipment by programming the CPU of the external device in the same manner. As a result, various determinations can be accurately performed irrespective of camera variations due to components and the like.

次に、撮影モードを拡張するオプション機器としての
外部装置の動作を説明する。一例として、第27図を参照
して、サブルーチン『多重4枚撮り』を説明する。この
プログラムは外部装置により多重一枚撮影フラグを操作
して、カメラCPUのサブルーチン『レリーズ処理』で多
重撮影ルーチン(第8図のステップ286〜290)を何度も
実行させるものである。すなわち、通常は、最初の露光
が行われると多重一枚撮影フラグがセットされ、次の露
光終了後多重一枚撮影フラグがセットされていると、フ
ィルム巻上げが実行される。そのため、露光終了後にセ
ットされた多重一枚撮影フラグを外部装置がクリアする
ことにより、任意の枚数の多重撮影が可能となる。
Next, the operation of the external device as an optional device for extending the shooting mode will be described. As an example, with reference to FIG. 27, the subroutine "multiple four-shot shooting" will be described. This program is to operate the multiple-photographing flag by an external device and to execute the multiple-photographing routine (steps 286 to 290 in FIG. 8) many times in the subroutine "release processing" of the camera CPU. That is, normally, when the first exposure is performed, the multiple single shooting flag is set, and when the multiple single shooting flag is set after the end of the next exposure, film winding is performed. Therefore, the external device clears the multiplex single image capturing flag set after the end of the exposure, so that an arbitrary number of multiplex images can be captured.

ステップ702で枚数(多重枚数)カウンタをリセット
する。ステップ704でCHECK1端子を“L"にし、カメラ側
に通信要求を出力する。ステップ706で通信条件を2
(N←3)とし、レリーズ待機状態とする。
In step 702, the number (multiplex number) counter is reset. In step 704, the CHECK1 terminal is set to "L", and a communication request is output to the camera. In step 706, set the communication condition to 2
(N ← 3), and enters the release standby state.

ステップ708で連続通信モードをセットする。ステッ
プ710でサブルーチン『カメラとの通信』を実行する。
これにより、ユーザがレリーズスイッチを押した時に実
行されるサブルーチン『レリーズ処理』(第8図)にお
いてカメラとの連続通信が開始される。この時、カメラ
は多重露光モードに設定されているとする。
At step 708, the continuous communication mode is set. In step 710, a subroutine "communication with camera" is executed.
Thus, continuous communication with the camera is started in a subroutine "release process" (FIG. 8) executed when the user presses the release switch. At this time, it is assumed that the camera is set to the multiple exposure mode.

ここで、連続通信モードになっているので、カメラ内
のプログラムは進まず、サブルーチン『レリーズ処理』
の最初でカメラの状態を自由に変更することができる。
Here, since the camera is in the continuous communication mode, the program in the camera does not proceed, and the subroutine "release processing"
You can freely change the state of the camera at the beginning.

ステップ712で通信条件を1(N←2)に戻す。ただ
し、カメラとの連続通信は続行している。
In step 712, the communication condition is returned to 1 (N ← 2). However, continuous communication with the camera is continuing.

ステップ714でRAM読出しモードをセットする。ステッ
プ716でSYAD2,SYADにRAM読出しアドレスEP+1をセット
する。ステップ718でサブルーチン『カメラとの通信』
を実行し、RAMからカメラ状態データを読出す。
At step 714, the RAM read mode is set. In step 716, the RAM read address EP + 1 is set in SYAD2 and SYAD. Subroutine "communication with camera" in step 718
And read the camera status data from RAM.

ステップ720で多重一枚撮影フラグ(カメラ状態デー
タの6ビット)をクリアする。
At step 720, the multiple single shooting flag (6 bits of the camera status data) is cleared.

ステップ722でRAM書込みモードをセットする。ステッ
プ723でSYAD2,SYADにRAMアドレスEP+1を、SYDTには多
重一枚撮影フラグをリセットしたカメラ状態データをセ
ットする。ステップ724でサブルーチン『カメラとの通
信』を実行する。多重一枚撮影フラグがリセットされた
カメラ状態データをRAMに書込む。これにより、多重4
枚露光が可能になる。ステップ726で連続通信解除モー
ドをセットする。ステップ728でサブルーチン『カメラ
との通信』を実行し、カメラのプログラムをサブルーチ
ン『レリーズ処理』に戻す。この後、カメラとの通信が
中断する。ここで、カメラ側では、2段目レリーズが押
されている場合は、多重の一枚目として露出動作を行な
い、レリーズがすでに離された場合は、露出せずにもと
のルーチンにもどる。露出した場合は、多重一枚撮影フ
ラグがセットされるので確認できる。
At step 722, the RAM write mode is set. In step 723, the RAM address EP + 1 is set in SYAD2 and SYAD, and the camera state data with the multiplex single-image shooting flag reset is set in SYDT. 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. Thereby, multiplex 4
One-exposure is possible. In step 726, the continuous communication release mode is set. In step 728, a subroutine "communication with camera" is executed, and the camera program is returned to the subroutine "release processing". Thereafter, communication with the camera is interrupted. Here, on the camera side, when the second-stage release is pressed, the exposure operation is performed as the first multiplex, and when the release is already released, the routine returns to the original routine without exposure. In the case of exposure, the multiplex single image shooting flag is set so that it can be confirmed.

ステップ730でサブルーチン『RAMアドレスEP+1読取
り』を実行する。
At step 730, a subroutine "RAM address EP + 1 read" is executed.

ステップ732で多重一枚撮影フラグが“1"(セット)
かどうか判定する。多重一枚撮影フラグが“1"でない場
合は、レリーズが中断された(露出していない)ので、
ステップ706に戻る。多重一枚撮影フラグが“1"である
場合は、露出されたので、ステップ734で枚数カウンタ
をインクリメントする。
In step 732, the multiple single shooting flag is set to "1" (set).
Is determined. If the multiple single shooting flag is not "1", the release has been interrupted (not exposed).
Return to step 706. If the multiple single shooting flag is "1", it means that the exposure has been performed, and the number counter is incremented in step 734.

ステップ736で枚数カウンタが3かどうか判定する。
枚数カウンタが3である場合は、ステップ706に戻る。
すなわち、次の『レリーズ処理』で巻上げできるように
して戻る。枚数カウンタが3でない場合は、ステップ73
8で連続通信モードをセットする。ステップ740でサブル
ーチン『カメラとの通信』を実行する。ここで、連続通
信モードにするのは、E2−PROMの内容を変更したいため
で、連続通信モードにしないと、カメラ側のルーチンで
E2−PROMの内容をいつもリフレッシュ(第5図(a)、
ステップ152)しているため、E2−PROMの内容は変更で
きない。
At step 736, it is determined whether or not the number counter is 3.
If the number counter is 3, the process returns to step 706.
That is, the process returns to the next "release process" so that the film can be wound. If the number counter is not 3, step 73
Set the continuous communication mode with 8. In step 740, a subroutine "communication with camera" is executed. Here, for the continuous communication mode, because you want to change the contents of the E 2 -PROM, unless the continuous communication mode, the camera-side routine
E 2 -PROM always refresh the contents of the (FIG. 5 (a),
Step 152) and for that, the content of the E 2 -PROM can not be changed.

ステップ742で多重一枚撮影フラグをリセットする。
ステップ746でRAM書込みモードをセットする。ここで、
SYAD2,SYADにRAM書込みアドレスEP+1をセットする。S
YDTは多重一枚撮影フラグをリセットしたカメラ状態デ
ータである。ステップ748でサブルーチン『カメラとの
通信』を実行する。
In step 742, the multiplex single image capturing flag is reset.
At step 746, the RAM write mode is set. here,
The RAM write address EP + 1 is set in SYAD2 and SYAD. S
YDT is camera status data in which the multiple single shooting flag is reset. In step 748, a subroutine "communication with camera" is executed.

ステップ750でSYDTにサブルーチン『E2−PROM書込
み』の先頭アドレスをセットし、SYAD2,SYADにBRADRのR
AMアドレスをセットする。ステップ752でサブルーチン
『カメラとの通信』を実行する。ステップ754でサブル
ーチンコールモードをセットする。ステップ756でサブ
ルーチン『カメラとの通信』を実行する。
Set the start address of the subroutine "E 2 -PROM writing" to SYDT in step 750, SYAD2, SYAD to the BRADR R
Set the AM address. In step 752, a subroutine "communication with camera" is executed. At step 754, the subroutine call mode is set. In step 756, a subroutine "communication with camera" is executed.

ステップ758で連続通信解除モードをセットする。ス
テップ760でサブルーチン『カメラとの通信』を実行す
る。
In step 758, the continuous communication release mode is set. In step 760, a subroutine "communication with camera" is executed.

ステップ762で枚数カウンタが4かどうか判定する。
枚数カウンタが4でない場合は、ステップ706に戻る。
枚数カウンタが4である場合は、ステップ764でCHECK1
端子を“H"とし、もとのルーチンに戻る。
In step 762, it is determined whether or not the number counter is 4.
If the number counter is not 4, the process returns to step 706.
If the number counter is 4, check 764 in step 764.
The terminal is set to “H” and the process returns to the original routine.

これにより、カメラCPUには多重2枚撮影プログラム
しか内蔵されていない場合でも、外部装置によりカメラ
CPUのRAMの内容を制御することにより3枚以上の多重撮
影が実行できる。
As a result, even if the camera CPU contains only a multiplexed two-shot program, the external device
By controlling the contents of the RAM of the CPU, multiple shooting of three or more images can be performed.

なお、この発明は上述した実施例に限定されず、発明
の要旨を逸脱しない範囲で種々変形可能である。例え
ば、外部装置、主に撮影オプション用の外部装置はアダ
プタ機器としてではなく、ICカードとして構成してもよ
く、むしろ、この方が、小形軽量であるので、好まし
い。また、CPUは1チップのマイクロコンピュータに限
定されない。
The present invention is not limited to the above-described embodiment, and can be variously modified without departing from the gist of the invention. For example, an external device, mainly an external device for a photographing option, may be configured not as an adapter device but as an IC card, and rather, this is preferable because it is small and lightweight. Further, the CPU is not limited to a one-chip microcomputer.

〔発明の効果〕〔The invention's effect〕

以上説明したようにこの発明によれば、外部装置から
の指令により外部装置と連続通信可能であり、内蔵のサ
ブルーチンを外部装置により所望の順番で組合せて連続
して実行できるとともに、内蔵のサブルーチンのパラメ
ータを格納するRAMの内容を外部装置により制御でき、
機能を容易に拡張できるカメラが提供される。
As described above, according to the present invention, continuous communication can be performed with an external device in accordance with a command from the external device, the built-in subroutine can be continuously executed in a desired order by the external device, and the built-in subroutine can be executed. The contents of RAM for storing parameters can be controlled by an external device,
A camera is provided that can easily expand its functions.

【図面の簡単な説明】[Brief description of the drawings]

第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』のフローチャート、第2
3図はサブルーチン『サブルーチンコール』のフローチ
ャート、第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……フォトインタラプタ。
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 a camera and an external device, FIG. 3 is a detailed block diagram of the camera, and FIGS.
FIG. 23 is a diagram for explaining the operation of the CPU in the camera.
FIGS. 5A and 5B are flowcharts of a "standby release" routine, FIG. 6 is a flowchart of a subroutine "display timer count", and FIG. 7 is a subroutine "camera". FIG. 8 is a flowchart of a subroutine "release process", FIG. 9 is a flowchart of a subroutine "AF (lens extension)", and FIG.
10 Figure is a flowchart of the subroutine "Damage processing" is stored FIG. 11 is a flowchart of the subroutine "one frame winding", FIG. 12 is a flowchart of the subroutine "E 2 -PRM read", Fig. 13 for each RAM address diagram showing the contents, Fig. 14 shows the contents of each bit of the camera status data, FIG. FIG. 15 showing the contents of each bit of the abnormal data, FIG. 16 is a flowchart of the subroutine "E 2 -PRM write" Fig. 17 shows the 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 the external device in the RAM write mode. FIGS. 22 (a) and (b) are subroutines “Communication with external device 1, 2, 3”. Flowchart, 2nd
FIG. 3 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, FIG. 24 is a flowchart of a subroutine "battery check voltage adjustment", and FIG. Is a flowchart of a subroutine "AF lens drive adjustment", FIG. 26 is a flowchart of a subroutine "communication with a camera", and FIG.
FIG. 27 is a flowchart of the subroutine "Simultaneous shooting of four images". 1 ... camera, 2 ... external device, 3 ... external terminal, 4,10
...... CPU, 22 ...... reset circuit, 24 ...... E 2 -PRM, 28 ......
Serial line, 30 AF sensor, 34 Operation switch, 40 Interface, 42 Photometric unit, 44
…… Shutter motor, 46… Winding motor, 48… Zoom motor, 54,58… Photo interrupter.

Claims (6)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】外部装置と接続可能であると共に、カメラ
の種々の動作機能を実行するサブルーチンを有するマイ
クロコンピュータを具備するカメラにおいて、 前記マイクロコンピュータは、更に、前記外部装置から
の通信によって、少なくとも前記マイクロコンピュータ
内の任意のメモリ内容の読み書き、および任意のサブル
ーチンを実行するための通信サブルーチンを有し、 前記外部装置によって連続通信モードに設定されると前
記通信サブルーチンを繰り返し実行することにより、前
記通信サブルーチンによる連続的な通信状態を維持し、
この通信状態の下で前記任意のメモリ内容の読み書き、
または前記任意のサブルーチンを実行することを特徴と
するカメラ。
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 includes at least a communication device for communicating with the external device. A communication subroutine for reading and writing arbitrary memory contents in the microcomputer, and executing an arbitrary subroutine, by repeatedly executing the communication subroutine when set to a continuous communication mode by the external device, Maintain continuous communication status by communication subroutine,
Reading and writing the arbitrary memory contents under this communication state,
Alternatively, the camera executes the above-mentioned arbitrary subroutine.
【請求項2】前記カメラは、連続通信モード解除信号が
供給されると前記通信サブルーチンを終了することを特
徴とする請求項1に記載のカメラ。
2. The camera according to claim 1, wherein the camera terminates the communication subroutine when a continuous communication mode release signal is supplied.
【請求項3】前記カメラは、前記外部装置と接続可能な
チェック端子を有すると共に、このチェック端子に2値
レベルのいずれか一方のレベル信号が印加されている場
合は前記通信サブルーチンを繰り返し実行し、前記チェ
ック端子に他方のレベル信号が印加されると前記通信サ
ブルーチンを終了することを特徴とする請求項1に記載
のカメラ。
3. The camera has a check terminal connectable to the external device, and repeatedly executes the communication subroutine when any one of binary level signals is applied to the check terminal. 2. The camera according to claim 1, wherein the communication subroutine ends when the other level signal is applied to the check terminal.
【請求項4】前記通信サブルーチンの下で前記外部装置
の調整データ検出用プログラムに従って求められた調整
データを書き換え可能な記憶部に書込むための書込み手
段と、この記憶部に書込まれた前記調整データに基づい
て各カメラ機能を調整する手段とを具備する請求項1に
記載のカメラ。
4. A writing means for writing adjustment data obtained under the communication subroutine in accordance with an adjustment data detection program of the external device into a rewritable storage section, and said writing means written in said storage section. 2. The camera according to claim 1, further comprising means for adjusting each camera function based on the adjustment data.
【請求項5】前記書込み手段はバッテリチェック電圧を
前記記憶部に書込む手段を具備し、前記調整手段は前記
記憶部に書込まれたデータとカメラの電源電圧の検出値
とを比較するバッテリチェック手段を具備する請求項4
に記載のカメラ。
5. The battery according to claim 1, wherein the writing means includes means for writing a battery check voltage to the storage unit, and the adjusting means compares the data written in the storage unit with a detected value of a power supply voltage of the camera. 5. A method according to claim 4, further comprising checking means.
The camera according to.
【請求項6】前記書込み手段はAF調整データを前記記憶
部に書込む手段を具備し、前記調整手段は前記記憶部に
書込まれたデータと測距データとに基づいて撮影レンズ
の目標駆動位置を決定する請求項4に記載のカメラ。
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.
JP63201333A 1988-03-29 1988-08-12 camera Expired - Lifetime JP2608589B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP63201333A JP2608589B2 (en) 1988-03-29 1988-08-12 camera

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP7310488 1988-03-29
JP63-73104 1988-03-29
JP63201333A JP2608589B2 (en) 1988-03-29 1988-08-12 camera

Related Child Applications (1)

Application Number Title Priority Date Filing Date
JP16066995A Division JP2749286B2 (en) 1988-03-29 1995-06-27 Auto focus camera

Publications (2)

Publication Number Publication Date
JPH02941A JPH02941A (en) 1990-01-05
JP2608589B2 true JP2608589B2 (en) 1997-05-07

Family

ID=26414240

Family Applications (1)

Application Number Title Priority Date Filing Date
JP63201333A Expired - Lifetime JP2608589B2 (en) 1988-03-29 1988-08-12 camera

Country Status (1)

Country Link
JP (1) JP2608589B2 (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5187517A (en) * 1990-10-15 1993-02-16 Olympus Optical Co., Ltd. Camera controllable with use of a control program
JP2832658B2 (en) * 1991-12-12 1998-12-09 富士写真光機株式会社 Camera data writing method
JPH0733774Y2 (en) * 1992-01-31 1995-08-02 正一 伊藤 Denture
DE69425918T2 (en) 1993-03-11 2002-06-20 Olympus Optical Co One-chip micro computer system with a function for the essential correction of the program content
US5828911A (en) * 1993-05-24 1998-10-27 Olympus Optical Co., Ltd. One chip microcomputer built-in system
DE4420404B4 (en) * 1993-06-11 2007-12-06 Pentax Corp. Method for controlling the operation of an electronically controlled camera
JP3670932B2 (en) 2000-05-02 2005-07-13 ペンタックス株式会社 Circuit board inspection system and circuit board

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0610726B2 (en) * 1983-09-20 1994-02-09 株式会社ニコン camera
JPH0630487B2 (en) * 1984-12-13 1994-04-20 ソニー株式会社 Bidirectional serial data communication system
JPH0782181B2 (en) * 1986-02-01 1995-09-06 株式会社ニコン Interchangeable camera

Also Published As

Publication number Publication date
JPH02941A (en) 1990-01-05

Similar Documents

Publication Publication Date Title
JPS63138886A (en) Still camera system
JP2608589B2 (en) camera
US6519419B2 (en) Method of controlling power source of camera
JP2749286B2 (en) Auto focus camera
JPS61130932A (en) Camera
JP4334809B2 (en) Camera with zoom lens
JP2608589C (en)
JP2982960B2 (en) Camera with self-check function
JPH05113599A (en) Camera both for silver-salt photograph and electronic still photograph
JPH0723775Y2 (en) Film data reader
JPS62178226A (en) Waterproof camera
JPH1138471A (en) Camera
JP2829920B2 (en) Cameras and interchangeable lenses with interchangeable lenses
JP2003005270A (en) Connection cable for camera
JPH012031A (en) fully automatic camera
US6154615A (en) Camera
JP2654781B2 (en) camera
JP2976166B2 (en) camera
JPH04194828A (en) Camera
JPH02247627A (en) Alarming device for camera
JPH0242431A (en) Camera
JP3352143B2 (en) Auto focus camera
JP2770899B2 (en) Pre-wound camera
JPH01241512A (en) Camera
JPH02201335A (en) Camera with automatic zooming mechanism

Legal Events

Date Code Title Description
FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090213

Year of fee payment: 12

EXPY Cancellation because of completion of term
FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090213

Year of fee payment: 12