Electronic device

By implementing a dual notification mechanism for communication errors between an imaging device and its accessories, the system allows users to differentiate between error causes, enhancing troubleshooting efficiency and user action appropriateness.

JP7689441B2Active Publication Date: 2025-06-06CANON KK
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
JP2021073483
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Filing Date
2021-04-23
Publication Date
2025-06-06
Estimated Expiration
2041-04-23

AI Technical Summary

Technical Problem

Conventional techniques fail to distinguish between different types of communication errors occurring between an imaging device and an attached accessory, making it difficult for users to determine the cause of the error and take appropriate action.

Method used

The system implements a dual notification mechanism based on the timing of communication errors. A first notification is executed when a communication error occurs during the initial communication stage, while a second notification is triggered after the initial communication is established, allowing users to differentiate between errors caused by incompatible accessories and those due to poor electrical connections.

Benefits of technology

This approach enables users to accurately identify the cause of communication errors, allowing them to take appropriate measures, such as checking the compatibility of the accessory or ensuring proper electrical connections, thereby improving troubleshooting efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007689441000001
    Figure 0007689441000001
  • Figure 0007689441000002
    Figure 0007689441000002
  • Figure 0007689441000003
    Figure 0007689441000003
Patent Text Reader

Abstract

To allow a user to distinguish the cause of a communication error, regardless of the type of accessory.SOLUTION: SPI communication is executed after at least one I2C communication. After an accessory 200 is attached to a camera-side connecting part 141, when a communication error occurs before a first I2C communication is established, a first notification is executed, and, when a communication error occurs after the first I2C communication is established, a second notification, which is different from the first notification, is executed.SELECTED DRAWING: Figure 15
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present invention relates to an electronic device capable of mounting an accessory. [Background technology]

[0002] Conventionally, an imaging device is known as an example of an electronic device that can be equipped with an accessory. When a communication error occurs between the imaging device and the attached accessory, the imaging device switches control depending on the type of error or resets the accessory to perform a recovery process.

[0003] Patent Document 1 discloses that when a communication error occurs, the number of retries is changed according to the type of error. Patent Document 2 discloses that when a communication error occurs, the communication error state is restored to a communicable state. [Prior art documents] [Patent documents]

[0004] [Patent Document 1] JP 2017-83720 A [Patent Document 2] JP 2018-33076 A Summary of the Invention [Problem to be solved by the invention]

[0005] However, the conventional techniques disclosed in Patent Documents 1 and 2 are unable to distinguish between communication errors. For example, a communication error may occur at the initial communication stage because an accessory that is not compatible with the imaging device is attached. Even after the initial communication is established, a communication error may occur due to poor electrical connection. If the user does not know the cause of the communication error, he or she cannot take appropriate action.

[0006] An object of the present invention is to enable a user to distinguish the cause of a communication error regardless of the type of accessory. [Means for solving the problem]

[0007] In order to achieve the above object, the present invention provides a first communication between a mounting section on which an accessory can be mounted and the accessory mounted on the mounting section. By communication method communication and based on information about the accessory received by communication according to the first communication method. Second By communication method communication And, and a communication means for performing the first communication after the accessory is attached to the attachment portion. By communication method When a communication error occurs between the device and the accessory, a first notification is executed. death , the first By communication method and a control means for executing a second notification different from the first notification when a communication error occurs between the accessory and the device after the communication is established. The communication error after the establishment of the first communication by the first communication method includes an error in the second or subsequent communication by the first communication method and an error in the second communication method. It is characterized by: Effect of the Invention

[0008] According to the present invention, the user can distinguish the cause of a communication error regardless of the type of accessory. [Brief description of the drawings]

[0009] [Figure 1] FIG. 1 is a block diagram of an imaging system. [Diagram 2] 1 is a diagram showing an outline of communication waveforms of SPI protocols A and B. [Diagram 3] 13 is a flowchart showing the processing of a camera control unit B and the processing of an accessory control unit in the SPI protocol A. [Figure 4] 13 is a flowchart showing the processing of a camera control unit B and the processing of an accessory control unit in the SPI protocol B. [Diagram 5] 13 is a diagram showing the contents of communication when an operation execution command is notified from a camera to an accessory via SPI communication. FIG. [Figure 6] FIG. 11 is a diagram showing an example of accessory information. [Figure 7] FIG. 11 is a diagram showing a sequence when an accessory is attached to a camera. [Figure 8] FIG. 11 is a diagram showing an example of accessory type information. [Figure 9] 11 is a diagram illustrating an example of a cause of a communication request signal / WAKE. [Figure 10] FIG. 13 is a diagram showing the relationship between communication bytes and communication intervals for data at addresses 0x0D and 0x0E. [Figure 11] 11 is a flowchart showing a first process when an accessory is attached. [Figure 12] 13 is a flowchart showing a second process when an accessory is attached. [Figure 13] 10 is a flowchart showing a process performed when an accessory is attached. [Figure 14] 13 is a flowchart showing an error determination process. [Figure 15] 13 is a flowchart showing an error process. [Figure 16] FIG. 13 is a diagram showing an example of an I2C communication waveform. [Figure 17] 13 is a flowchart showing a process for transmitting N bytes of data from a camera control unit A to an accessory control unit. [Figure 18] 13 is a flowchart showing a process performed when a camera control unit A receives N bytes of data from an accessory control unit. [Figure 19] 13 is a flowchart showing a process for transmitting and receiving N bytes of data between the camera control unit A101 and the accessory control unit 201. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0010] Hereinafter, an embodiment of the present invention will be described with reference to the drawings.

[0011] Fig. 1 is a block diagram of an imaging system including an imaging device as an electronic device according to an embodiment of the present invention. This imaging system includes a camera 100 as the imaging device and an accessory 200. The accessory 200 is detachable from the camera 100. Fig. 1 shows the electrical configurations of the camera 100 and the accessory 200.

[0012] The camera 100 is provided with a camera side connection section 141 as a mounting section to which the accessory 200 can be mounted. The camera side connection section 141 has contacts TC01 to TC21 which are a plurality of terminals. The accessory 200 is provided with an accessory side connection section 211. The accessory side connection section 211 has contacts TA01 to TA21 which are a plurality of terminals. The camera 100 and the accessory 200 are electrically connected by the contacts TC01 to TC21 and the contacts TA01 to TA21 being in one-to-one contact with each other. Note that the accessory 200 does not need to have some of the plurality of contacts TA01 to TA21.

[0013] The camera 100 is supplied with power from a battery 111. The battery 111 is detachable from the camera 100. The camera control unit A101 and the camera control unit B102 are each configured by a microcomputer incorporating a CPU or the like, and control the entire camera 100. The camera control unit A101 monitors the operation of a switch or the like (not shown) for operating the camera. The camera control unit A101 operates even when the camera 100 is in a standby state (low power consumption mode), and controls the system power supply in response to a user's operation. The camera control unit B102 controls the image sensor 122, the display unit 127, and the like, and stops operating in the standby state. In this embodiment, the case where the camera control unit A101 and the camera control unit B102 are configured by separate processors is described, but they may be provided in a single processor.

[0014] The system power supply unit 112 is composed of a DC-DC converter, an LDO (Low Drop Out), a charge pump circuit, etc., and generates power to be supplied to each unit of the camera 100. A voltage of 1.8V generated by the system power supply unit 112 is constantly supplied from the battery 111 to the camera control unit A101 as a camera microcomputer power supply VMCU_C. In addition, several types of voltages generated by the system power supply unit 112 are also supplied to the camera control unit B102 at any timing as a camera microcomputer power supply VMCU2_C. The camera control unit A101 controls the system power supply unit 112 to control on / off of power supply to each unit of the camera 100.

[0015] The imaging sensor 122 is composed of a CMOS sensor, a CCD sensor, or the like. An optical lens 121 is detachably attached to the camera 100. Light from a subject incident through the attached optical lens 121 is imaged on the imaging sensor 122. The optical lens 121 and the camera 100 may be integrated. The subject image imaged on the imaging sensor 122 is encoded into a digital imaging signal. The image processing unit 123 performs image processing such as noise reduction processing and white balance processing on the digital imaging signal to generate image data. The image processing unit 123 also converts the generated image data into an image file in JPEG format or the like in order to record it in the recording memory 126. The image processing unit 123 also generates VRAM image data to be displayed on the display unit 127 from the generated image data.

[0016] The memory control unit 124 controls the transmission and reception of image data generated by the image processing unit 123 and the like and other data. The volatile memory 125 is a memory such as a DDR3 SDRAM that is capable of high-speed reading and writing, and is used as a workspace for image processing performed by the image processing unit 123. The recording memory 126 is a readable and writable medium such as an SD card or a CFexpress card, and is a recording medium that is detachable from the camera 100. The display unit 127 includes a display disposed on the rear surface of the camera 100, and this display is configured by an LCD panel, an organic EL display panel, or the like. The backlight unit 128 adjusts the brightness of the display unit 127 by changing the amount of light of the backlight of the display unit 127.

[0017] The accessory power supply unit A131 and the accessory power supply unit B132 are voltage conversion units that convert the voltage supplied from the system power supply unit 112 into a predetermined voltage, and generate the accessory power supply VACC of 3.3 V. The accessory power supply unit A131 and the accessory power supply unit B132 may be configured to convert to other voltages.

[0018] The accessory power supply unit A131 is a power supply circuit with low self-consumption power, which is composed of an LDO or the like. The accessory power supply unit B132 is composed of a DC / DC converter or the like, and can pass a larger current than the accessory power supply unit A131. The self-consumption power of the accessory power supply unit B132 is larger than the self-consumption power of the accessory power supply unit A131. Therefore, when the load current is small, the accessory power supply unit A131 is more efficient than the accessory power supply unit B132, and when the load current is large, the accessory power supply unit B132 is more efficient than the accessory power supply unit A131. The camera control unit A101 controls the on / off of each voltage output of the accessory power supply unit A131 and the accessory power supply unit B132 according to the operating state of the accessory 200.

[0019] The protection unit 133 is configured with a current fuse element, a polyswitch element, or an electronic fuse unit that combines a resistor, an amplifier, and a switch element. The protection unit 133 outputs an overcurrent detection signal DET_OVC when the power supply current value supplied to the accessory 200 from the accessory power supply unit A131 or the accessory power supply unit B132 exceeds a predetermined value and becomes excessive (abnormal). The protection unit 133 is, for example, an electronic fuse, and notifies the camera control unit A101 by the overcurrent detection signal DET_OVC when a current of 1 A or more flows. The overcurrent detection signal DET_OVC indicates an overcurrent by a Hi level. The predetermined value may be a different value from 1 A.

[0020] The camera side connection unit 141 is a connector for electrically connecting to the accessory 200 via 21 contacts TC01 to TC21 arranged in a row. The contacts TC01 to TC21 are arranged in this order from one end to the other in the arrangement direction. The contact TC01 is connected to the ground (GND) and serves not only as a reference potential contact but also as a contact for controlling the wiring impedance of the differential signals D1N and D1P. The contact TC01 corresponds to a third ground contact.

[0021] The differential signal D1N connected to the contact TC02 and the differential signal D1P connected to the contact TC03 are differential data communication signals that perform data communication in pairs and are connected to the camera control unit B102. The contacts TC02, TC03, and contacts TC07 to TC17, TC19, and TC20 described below are communication contacts.

[0022] Contact TC04 as a first ground contact is connected to GND, and serves as a reference potential contact for camera 100 and accessory 200. Contact TC04 is disposed on the outside of contact TC05 in the arrangement direction of the contacts. Accessory power VACC generated by accessory power supplies A131, B132 is connected to contact TC05 as a power supply contact via protection unit 133.

[0023] An accessory attachment detection signal / ACC_DET is connected to contact TC06, which serves as an attachment detection contact. The accessory attachment detection signal / ACC_DET is pulled up to the camera microcomputer power supply VMCU_C via a resistive element Rp134 (e.g., 10 kΩ). The camera control unit A101 can detect whether the accessory 200 is attached by reading out the signal level of the accessory attachment detection signal / ACC_DET. If the signal level (electric potential) of the accessory attachment detection signal / ACC_DET is a Hi level (predetermined electric potential), the accessory 200 is detected as not being attached, and if it is a Lo level (GND electric potential as described later), the accessory 200 is detected as being attached.

[0024] When the camera 100 is powered on, the signal level (electric potential) of the accessory attachment detection signal / ACC_DET changes from Hi level to Lo level, which serves as a trigger for various communications between the camera 100 and the accessory 200 via the contacts.

[0025] In response to detecting that the accessory 200 is in an attached state, the camera control unit A101 supplies power to the accessory 200 via a contact TC05 serving as a power contact.

[0026] SCLK (Serial Clock) is connected to contact TC07. MOSI (Master Out Slave In) is connected to contact TC08. MISO (Master In Slave Out) is connected to contact TC09. SS (Slave Select) is connected to TC10. SCLK, MOSI, MISO, and CS are signals for performing SPI (Serial Peripheral Interface) (registered trademark) communication with the camera control unit B102 as the communication master. In this embodiment, the communication clock frequency of the SPI communication is 1 MHz, the data length is 8 bits (1 byte), the bit order is MSB first, and the communication method is full duplex.

[0027] A communication request signal / WAKE for requesting communication from the accessory 200 to the camera control unit A101 is connected to the contact TC11. The communication request signal / WAKE is pulled up to the camera microcomputer power supply VMCU_C via a resistor. The camera control unit A101 can receive a communication request from the accessory 200 by detecting the falling edge of the communication request signal / WAKE.

[0028] The signal SDA connected to the contact TC12 and the signal SCL connected to the contact TC13 are signals for performing I2C (Inter-Integrated Circuit) (registered trademark) communication with the camera control unit A101 as the communication master. The signals SDA and SCL are open-drain output specifications pulled up to the camera microcomputer power supply VMCU_C. The communication frequency of this communication is assumed to be 100 kbps. In the I2C communication, both data transmission from the camera 100 and data transmission from the accessory 200 are performed via the SDA. Comparing SPI communication and I2C communication, the communication speed of I2C communication is slower than that of SPI communication. Also, since the communication speed of SPI communication is faster than that of I2C communication, it is suitable for communication of information with a large amount of data. Therefore, in the communication between the camera 100 and the accessory 200 in this embodiment, information with a large amount of data is communicated using SPI communication, and information with a small amount of data is communicated using I2C communication. For example, data is first communicated using I2C communication, and if SPI communication can be performed based on this data or if it is necessary to perform SPI communication, control can be further performed to perform SPI communication.

[0029] 16(a) and (b) are diagrams showing examples of I2C communication waveforms. FIG. 16(a) shows an example of a waveform when the camera 100 transmits N bytes of data (DATA[1] to DATA[N]) to the accessory 200. FIG. 16(b) shows an example of a waveform when the camera 100 receives N bytes of data (DATA[1] to DATA[N]) from the accessory 200.

[0030] 16(a), in communication of the first and second bytes, the camera control unit A101 notifies the accessory control unit 201 of storage address information of the data to be transmitted. In communication of the third to (N+2)th bytes, the camera control unit A101 transmits N bytes of data (DATA[ADDRESS] to DATA[ADDRESS+N]) to the accessory control unit 201.

[0031] 16(b), in communication of the first and second bytes, the camera control unit A101 notifies the accessory control unit 201 of storage address information of the data to be received. In communication of the third to (N+3)th bytes, the camera control unit A101 receives N bytes of data (DATA[ADDRESS] to DATA[ADDRESS+N]) from the accessory control unit 201.

[0032] Next, the flowcharts of FIG. 17 to FIG. 19 will be described.

[0033] 17 is a flowchart showing the processing performed by the camera control unit A101 when transmitting N bytes of data from the camera control unit A101 to the accessory control unit 201. This processing is realized by the CPU in the camera control unit A101 expanding a program stored in the ROM in the camera control unit A101 into the RAM in the camera control unit A101 (neither is shown in the figures) and executing it.

[0034] In step S3001, the camera control unit A101 stores a numerical value indicating the number of bytes to be transmitted in a variable NC. For example, when transmitting 3 bytes, 3 is stored in the variable NC. In this embodiment, it is assumed that 3 is stored in the variable NC.

[0035] In step S3002, the camera control unit A101 changes SDA to Lo level while SCL is at Hi level (START condition), thereby notifying the accessory control unit 201 of the start of communication.

[0036] In step S3003, the camera control unit A101 sets the upper 7 bits of the transmission data to slave address information indicating the slave address of the accessory control unit 201. In this embodiment, the slave address of the accessory control unit 201 is assumed to be 1010000 in binary.

[0037] In step S3004, the camera control unit A101 sets information indicating WRITE communication in the lowest 1 bit of the transmission data. Setting this bit to 0 means WRITE communication.

[0038] In step S3005, the camera control unit A101 transmits to the accessory control unit 201 the data (10100000 in binary, 0xA0 in hexadecimal) set as the transmission data in steps S3003 and S3004.

[0039] In step S3006, the camera control unit A101 outputs SCL for one clock after transmitting one byte of data, and checks the signal level of SDA. If the signal level of SDA is Lo, the camera control unit A101 determines that this is a data reception acknowledgement (ACK) from the accessory control unit 201, and proceeds to step S3007. On the other hand, if the signal level of SDA is Hi, the camera control unit A101 determines that the accessory control unit 201 has not received data normally, and proceeds to step S3014.

[0040] In step S3007, the camera control unit A101 sets, as transmission data, information on the storage address of the data to be transmitted to the accessory control unit 201 (start address information). In this embodiment, the size of the start address information is 1 byte, and the value is 0x00.

[0041] In step S3008, the camera control unit A101 transmits the set 1-byte start address information (value 0x00) to the accessory control unit 201. In step S3009, after transmitting the 1-byte start address information data, the camera control unit A101 outputs SCL for one clock and checks the signal level of SDA. If the signal level of SDA is Lo, the camera control unit A101 determines that this is a data reception acknowledgement (ACK) from the accessory control unit 201, and proceeds to step S3010. On the other hand, if the signal level of SDA is Hi, the camera control unit A101 determines that the accessory control unit 201 has not received the data normally, and proceeds to step S3014.

[0042] In step S3010, the camera control unit A101 stores 1 in the variable MC. The variable MC is a variable for counting the amount of transmitted data. In step S3011, the camera control unit A101 outputs one byte of SCL and changes the SDA to a desired signal level while SCL is Lo, thereby transmitting one byte of data to the accessory control unit 201. Here, the start address information is 0x00 and the variable MC is 1, so the camera control unit A101 transmits one byte of data corresponding to the address 0x00.

[0043] In step S3012, the camera control unit A101 outputs SCL for one clock after transmitting one byte of data, and checks the signal level of SDA. If the signal level of SDA is Lo, the camera control unit A101 determines that this is a data reception acknowledgement (ACK) from the accessory control unit 201, and proceeds to step S3013. On the other hand, if the signal level of SDA is Hi, the camera control unit A101 determines that the accessory control unit 201 has not received data normally, and proceeds to step S3014.

[0044] In step S3013, the camera control unit A101 determines whether the variable MC is the same value as the variable NC. If the variable MC is the same value as the variable NC, the camera control unit A101 determines that transmission of all data is completed and proceeds to step S3014. If the variable MC is not the same value as the variable NC, the camera control unit A101 determines that transmission data still remains and proceeds to step S3015.

[0045] In step S3015, the camera control unit A101 adds 1 to the variable MC and returns to step S3011. In this way, after returning to step S3011, the camera control unit A101 sequentially increments the address of the data to be transmitted and transmits 1-byte data corresponding to each address.

[0046] In this way, by repeatedly transmitting 1 byte of data until the variables MC and NC become the same value in the process of step S3013, the camera control unit A101 transmits N bytes of data to the accessory control unit 201. When the variable NC is set to 3 as in this embodiment, 3 bytes of data can be transmitted.

[0047] In step S3014, the camera control unit A101 changes SDA to Hi level while SCL is at Hi level (STOP condition), thereby notifying the accessory control unit 201 of the end of communication.

[0048] 18 is a flowchart showing the processing performed by the camera control unit A101 when the camera control unit A101 receives N bytes of data from the accessory control unit 201. This processing is realized by the CPU in the camera control unit A101 expanding a program stored in the ROM in the camera control unit A101 into the RAM in the camera control unit A101 (neither is shown in the figures) and executing it.

[0049] In step S3101, the camera control unit A101 stores a numerical value indicating the number of bytes to be received in a variable ND. For example, when 3 bytes are received, 3 is stored in the variable ND. In this embodiment, it is assumed that 3 is stored in the variable ND. In steps S3102 to S3106, the camera control unit A101 executes the same processes as in steps S3002 to S3006, respectively.

[0050] In step S3107, the camera control unit A101 sets information (start address information) of the storage address of the data received from the accessory control unit 201 as transmission data. In this embodiment, the size of the start address information is 1 byte, and the value is 0x00. In step S3108, the camera control unit A101 transmits the set 1-byte start address information (value 0x00) to the accessory control unit 201.

[0051] In step S3109, the camera control unit A101 outputs SCL for one clock after transmitting one byte of start address information data, and checks the signal level of SDA. If the signal level of SDA is Lo, the camera control unit A101 determines that this is a data reception acknowledgement (ACK) from the accessory control unit 201, and proceeds to step S3110. On the other hand, if the signal level of SDA is Hi, the camera control unit A101 determines that the accessory control unit 201 has not received data normally, and proceeds to step S3122.

[0052] In step S3110, similarly to step S3102, the camera control unit A101 changes SDA to Lo level while SCL is at Hi level, and notifies the accessory control unit 201 of a START condition. In step S3111, the camera control unit A101 sets slave address information indicating the slave address of the accessory control unit 201 in the upper 7 bits of the transmission data. In this embodiment, the slave address of the accessory control unit 201 is assumed to be 1010000 in binary.

[0053] In step S3112, the camera control unit A101 sets information indicating READ communication in the lowest 1 bit of the transmission data. Setting this bit to 1 means that the communication is READ communication.

[0054] In step S3113, the camera control unit A101 transmits to the accessory control unit 201 the data (10100001 in binary, 0xA1 in hexadecimal) set as the transmission data in steps S3103 and S3104.

[0055] In step S3114, the camera control unit A101 outputs SCL for one clock after transmitting one byte of data, and checks the signal level of SDA. If the signal level of SDA is Lo, the camera control unit A101 determines that this is a data reception acknowledgement (ACK) from the accessory control unit 201, and proceeds to step S3115. On the other hand, if the signal level of SDA is Hi, the camera control unit A101 determines that the accessory control unit 201 has not received data normally, and proceeds to step S3122.

[0056] In step S3115, the camera control unit A101 stores 1 in the variable MD. The variable MD is a variable for counting the number of received data. In step S3116, the camera control unit A101 outputs one byte of SCL and reads the signal level of SDA at the timing when SCL changes from Lo to Hi. This makes it possible to receive one byte of data from the accessory control unit 201. The received one byte of data can be stored in the volatile memory 125 as data corresponding to address 0x00 or used for predetermined processing.

[0057] In step S3117, the camera control unit A101 determines whether or not one byte of data has been received normally. If the data has been received normally, the camera control unit A101 proceeds to step S3118, and if the data has not been received normally, the camera control unit A101 proceeds to step S3119.

[0058] In step S3118, the camera control unit A101 determines whether the variable MD is the same value as the variable ND. If the variable MD is the same value as the variable ND, the camera control unit A101 determines that reception of all data is complete and proceeds to step S3119. If the variable MD is not the same value as the variable ND, the camera control unit A101 determines that received data still remains and proceeds to step S3120.

[0059] In step S3120, the camera control unit A101 outputs one byte of SCL and controls SDA to the Lo level to notify the accessory control unit 201 of a data reception notification (ACK) and to notify that data communication will continue. In step S3121, the camera control unit A101 adds 1 to the variable MD and returns to step S3116. In this way, after returning to step S3116, the camera control unit A101 sequentially increments the address of the data to be received and receives one byte of data corresponding to each address.

[0060] In this way, by repeatedly receiving 1 byte of data until the variables MD and ND become the same value in the process of step S3118, the camera control unit A101 receives N bytes of data from the accessory control unit 201. When the variable ND is set to 3 as in this embodiment, 3 bytes of data can be received.

[0061] In step S3119, the camera control unit A101 outputs one byte of SCL and controls SDA to Hi level, thereby notifying the accessory control unit 201 that data communication has been completed (NACK). In step S3122, the camera control unit A101 changes SDA to Hi level while SCL is at Hi level (STOP condition). This notifies the accessory control unit 201 of the end of communication.

[0062] 19 is a flowchart showing processing performed by the accessory control unit 201 when N bytes of data are transmitted and received between the camera control unit A101 and the accessory control unit 201. This processing includes processing in which the accessory control unit 201 receives N bytes of data from the camera control unit A101, and processing in which the accessory control unit 201 transmits N bytes of data to the camera control unit A101.

[0063] This process is realized by the CPU in the accessory control unit 201 expanding a program stored in the ROM in the accessory control unit 201 into the RAM in the accessory control unit 201 (neither is shown) and executing it.

[0064] In step S3201, the accessory control unit 201 waits for SDA to change to Lo level (start condition) while SCL is at Hi level. If the accessory control unit 201 detects the START condition, the process proceeds to step S3202.

[0065] In step S3202, the accessory control unit 201 stores 0 in the variable ME. The variable ME is a variable for counting the number of transmitted and received data. In step S3203, the accessory control unit 201 receives 1 byte of data transmitted from the camera control unit A101.

[0066] In step S3204, the accessory control unit 201 determines whether the upper 7 bits of the 1-byte data received in step S3203 match the slave address of the accessory control unit 201 (0x50 in this embodiment). If the upper 7 bits of the data match the slave address of the accessory control unit 201, the accessory control unit 201 proceeds to step S3205. If the upper 7 bits of the data do not match the slave address of the accessory control unit 201, the accessory control unit 201 proceeds to step S3221.

[0067] In step S3205, the accessory control unit 201 controls SDA to Lo level for the next SCL clock output after receiving one byte, thereby notifying the camera control unit A101 of data reception (ACK). In step S3206, the accessory control unit 201 determines the type of data of the next 1-byte communication based on the lowest 1 bit of the 1-byte data received in step S3203. If the lowest 1 bit of data is 0 (WRITE), the accessory control unit 201 determines that the data of the next 1-byte communication is start address information from the camera control unit A101 to the accessory control unit 201, and proceeds to step S3207. If the lowest 1 bit of data is 1, the accessory control unit 201 determines that the data of the next 1-byte communication is transmission data from the accessory control unit 201 to the camera control unit A101, and proceeds to step S3209.

[0068] In step S3207, the accessory control unit 201 receives one byte of data transmitted from the camera control unit A101. The received one byte of data is information (start address information) indicating an address where data to be transmitted / received in subsequent communications is stored. In this embodiment, the start address information is 0x00, as described in Figs. 17 and 18.

[0069] In step S3209, the accessory control unit 201 sets, as the start address information, address information previously stored in the accessory control unit 201 or address information previously notified from the camera control unit A101.

[0070] In step S3208, if the accessory control unit 201 determines that one byte of data has been received normally, the process proceeds to step S3210, and if it determines that one byte of data has not been received normally, the process proceeds to step S3221. In step S3210, the accessory control unit 201 issues a data reception notification (ACK) to the camera control unit A101 by controlling SDA to a Lo level for the next SCL clock output after receiving one byte of data.

[0071] In step S3211, the accessory control unit 201 determines whether or not SDA has changed to Lo level while SCL is at Hi level (a START condition has been reached). If a START condition is detected, the accessory control unit 201 can determine that the next 1-byte of data to be communicated is data to be transmitted from the camera control unit A101 to the accessory control unit 201. In other words, the accessory control unit 201 determines that the next 1-byte of data to be communicated is data indicating a slave address and a communication type, and proceeds to step S3212. If a START condition is not detected, the accessory control unit 201 determines that the next 1-byte of data to be communicated is data to be received by the accessory control unit 201 from the camera control unit A101, and proceeds to step S3216.

[0072] In step S3212, the accessory control unit 201 receives one byte of data transmitted from the camera control unit A101. In step S3213, the accessory control unit 201 determines whether or not the upper 7 bits of the one byte of data received in step S3212 match the slave address of the accessory control unit 201 (0x50 in this embodiment). If the upper 7 bits of data match the slave address of the accessory control unit 201, the accessory control unit 201 proceeds to step S3214. If the upper 7 bits of data do not match the slave address of the accessory control unit 201, the accessory control unit 201 proceeds to step S3221.

[0073] In step S3214, the accessory control unit 201 determines the type of data for the next 1-byte communication based on the lowest 1 bit of the 1-byte data received in step S3203. If the lowest 1 bit of data is 0, the accessory control unit 201 proceeds to step S3221. If the lowest 1 bit of data is 1 (READ), the accessory control unit 201 determines that the data for the next 1-byte communication is transmission data from the accessory control unit 201 to the camera control unit A101, and proceeds to step S3215.

[0074] In step S3215, the accessory control unit 201 controls SDA to the Lo level for the next SCL clock output after receiving one byte, thereby notifying the camera control unit A101 of data reception (ACK). In step S3222, the accessory control unit 201 transmits one byte of data corresponding to the start address information received from the camera control unit A101 in step S3207 or the start address information set in step S3209 to the camera control unit A101.

[0075] In step S3223, the accessory control unit 201 adds 1 to the variable ME and proceeds to step S3224. In step S3224, the accessory control unit 201 checks the signal level of SDA after transmitting 1 byte of data. If the signal level of SDA is Hi, the accessory control unit 201 determines that the camera control unit A101 has received all data (NACK), and proceeds to step S3225. On the other hand, if the signal level of SDA is Hi, the accessory control unit 201 determines that the camera control unit A101 is still requesting data transmission from the accessory control unit 201, and returns to step S3222.

[0076] In this way, after returning to step S3222, the accessory control unit 201 sequentially increments the address of the data to be transmitted and transmits 1 byte of data corresponding to each address. In this way, by repeatedly transmitting 1 byte of data until a NACK is notified from the camera control unit A101 in the process of step S3224, the accessory control unit 201 transmits N bytes of data to the camera control unit A101.

[0077] In step S3225, the accessory control unit 201 waits for the SDA to change to Hi level (a STOP condition) while the SCL is at Hi level. When the accessory control unit 201 detects the STOP condition, it ends the communication.

[0078] In step S3216, the accessory control unit 201 receives one byte of data. This one byte of data is stored in a non-volatile memory (not shown) or used for a predetermined process as data corresponding to the start address information received from the camera control unit A101 in step S3207.

[0079] In step S3217, the accessory control unit 201 adds 1 to the variable ME and proceeds to step S3218. In step S3218, the accessory control unit 201 determines whether or not one byte of data has been received successfully. If the accessory control unit 201 determines that one byte of data has been received successfully, the process proceeds to step S3219, and if the accessory control unit 201 determines that one byte of data has not been received successfully, the process proceeds to step S3221.

[0080] In step S3219, the accessory control unit 201 controls SDA to Lo level for the next SCL clock output after receiving one byte, thereby notifying the camera control unit A101 of data reception (ACK). In step S3220, the accessory control unit 201 determines whether or not SDA has changed to Hi level (a STOP condition has occurred) while SCL is at Hi level. If the accessory control unit 201 detects a STOP condition, it ends communication. On the other hand, if the accessory control unit 201 does not detect a STOP condition, it determines that data will continue to be transmitted from the camera control unit A101 to the accessory control unit 201, and returns to step S3216.

[0081] In this way, after returning to step S3216, the accessory control unit 201 sequentially increments the address of the data to be received and receives 1 byte of data corresponding to each address. By repeatedly receiving 1 byte of data in this way until a STOP condition is notified in step S3220, the accessory control unit 201 receives N bytes of data from the camera control unit A101.

[0082] The FNC1 signal connected to contact TC14, the FNC2 signal connected to contact TC15, the FNC3 signal connected to contact TC16, and the FNC4 signal connected to contact TC17 are function signals whose functions can be changed according to the type of attached accessory 200. For example, if accessory 200 is a microphone device, the signal communicated via contact TC15 is an audio data signal. Also, if accessory 200 is a lighting device (strobe unit), the signal communicated via contact TC14 is a signal notifying the timing of light emission (strobe light emission timing signal).

[0083] Depending on the type of the attached accessory (accessory type), signals realizing different functions may be communicated through the same contact. For example, when the accessory 200 is an accessory other than lighting, a synchronization signal for controlling a timing different from the light emission timing may be communicated through TC14. TC14 to TC17 correspond to function signal contacts. Communication using at least one of the function signal contacts is also called function signal communication. Function signal communication can be performed in parallel with I2C communication and SPI communication, at a timing independent of I2C communication and SPI communication.

[0084] The accessory type (type) here refers to the above-mentioned microphone devices, lighting devices, etc. Accessories that achieve the same purpose, such as lighting devices with different performance, are the same type of accessory. Accessories that achieve different purpose functions, such as microphone devices and lighting devices, are different types of accessories. Function signal communication is performed based on information obtained by I2C communication or SPI communication.

[0085] Contact TC18 as a second ground contact is also connected to GND, and like contact TC04, is a contact that serves as a reference potential for the camera 100 and the accessory 200. A differential signal D2N connected to contact TC19 and a differential signal D2P connected to contact TC20 are data communication signals that form a pair to perform data communication, and are connected to the camera control unit B102. For example, USB communication can be performed via TC19 and TC20.

[0086] The contact TC21 is connected to the GND, and serves not only as a contact for the reference potential, but also as a contact for controlling the wiring impedance of the differential signal D2N and the differential signal D2P. The contact TC21 corresponds to a fourth ground contact. The contacts TC01, TC04, TC06, TC18, and TC21 are connected to, for example, a GND portion of a flexible substrate, and the GND portion of the flexible substrate is fixed to a metallic member that serves as the GND level of the camera 100 with screws or the like. The metallic member that serves as the GND level is, for example, an engagement member that engages with the accessory 200 in the accessory shoe portion, a base plate (not shown) inside the camera 100, and the like.

[0087] In this embodiment, the attachment detection contact TC06 to which the accessory attachment detection signal / ACC_DET is connected is placed next to the contact (first clock contact) TC07 that transmits the clock signal SCLK (first clock signal). Generally, noise (clock noise) associated with potential fluctuations in the clock signal is transmitted to contacts adjacent to the clock signal contact, which can cause malfunction. In particular, in a configuration in which there are many contacts and the distance between the contacts is short, as in this embodiment, the impact is greater. Therefore, by placing the attachment detection contact TC06 next to the SCLK contact TC07, the impact of clock noise can be suppressed.

[0088] The accessory attachment detection signal / ACC_DET is pulled up before the accessory is attached, but is set to GND potential after the accessory is attached. On the other hand, the SCLK contact TC07 that transmits the clock signal does not transmit a clock signal before the accessory is attached, so there is no fluctuation in potential, but the potential fluctuates in order to transmit the clock signal only after the accessory is attached.

[0089] When the SCLK contact TC07 transmits the clock signal, the attachment detection contact TC06 is at GND potential. Therefore, even if the attachment detection contact TC06 receives clock noise, the potential of the control unit of the camera 100 or the accessory 200 is unlikely to fluctuate, so malfunctions can be prevented. In addition, the clock noise can be prevented from being transmitted to positions farther away than the attachment detection contact TC06. As a result, there is no need to provide a GND terminal, so the effects of clock noise can be suppressed without increasing the number of contacts.

[0090] In addition, SCL (second clock signal) is also transmitted as a clock signal to contact (second clock contact) TC13. However, the SCLK transmitted to SCLK contact TC07 has a higher frequency than SCL, and more clock noise is generated from the SCLK contact TC07 than from the SCL contact TC13. For this reason, locating the attachment detection contact TC06 next to the SCLK contact TC07 rather than next to the SCL contact TC13 is more effective in preventing malfunctions caused by clock noise.

[0091] In addition to the difference in frequency, the SCL transmitted at the SCL contact TC13 is a clock signal conforming to the I2C communication standard, and the voltage fluctuations on the signal line are driven by an open-drain connection. On the other hand, the SCLK transmitted at the SCLK contact TC07 is a clock signal conforming to the SPI communication standard, and the voltage fluctuations on the signal line are driven by a CMOS output. For this reason, the edges of the voltage fluctuations at the SCL contact TC13 tend to be gentler than those at the SCLK contact TC07, making it less likely for clock noise to occur. Therefore, placing the attachment detection contact TC06 next to the SCLK contact TC07 rather than next to the SCL contact TC13 is more effective at preventing malfunctions caused by clock noise.

[0092] In addition, there are cases where a clock signal is transmitted by transmitting differential signals D1N, D1P in pairs to the first and second differential signal contacts TC19, TC20. In this case, a clock signal (third clock signal) having a higher frequency than the SCLK contact TC07 and SCL contact TC13 may be transmitted. However, since the differential signals D1N, D1P are paired signals, they emit less clock noise than the SCLK contact TC07 and SCL contact TC13, which transmit single-ended signals. For this reason, locating the attachment detection contact TC06 next to the SCLK contact TC07, rather than next to the first and second differential signal contacts TC19, TC20, is more effective in preventing malfunctions caused by clock noise.

[0093] Note that the contact (first data contact) TC08, located next to the SCLK contact TC07 on the opposite side from the attachment detection contact TC06, transmits MOSI (first data signal). Since MOSI is a data signal, it appears to be susceptible to the effects of clock noise. However, since MOSI is a data signal that conforms to the same SPI communication standard as the clock signal transmitted by the SCLK contact TC07, the timing of the potential fluctuation is synchronized with the clock signal and it is less susceptible to the effects of clock noise. For this reason, the contact TC08 does not need to be fixed to GND potential and can be used as the MOSI contact.

[0094] Accessory 200 has a battery 205 and receives power from battery 205, as well as from camera 100 via camera side connection unit 141 and accessory side connection unit 211. Accessory control unit 201 is formed of a microcomputer incorporating a CPU and the like, and controls accessory 200 as a whole.

[0095] The accessory power supply unit 202 is composed of a DC-DC converter, an LDO, a charge pump, or the like, and generates power to be supplied to each unit of the accessory 200. A voltage of 1.8V generated by the accessory power supply unit 202 is constantly supplied to the accessory control unit 201 as an accessory microcomputer power supply VMCU_A. Note that the voltage generated by the accessory power supply unit 202 may be a value other than 1.8V. The accessory control unit 201 controls the accessory power supply unit 202 to control on / off of power supply to each unit of the accessory 200.

[0096] Charging unit 204 is a circuit unit for charging battery 205 using power supplied from camera 100. When accessory control unit 201 determines that sufficient power is being supplied from camera 100 to perform a charging operation, it controls charging unit 204 to charge battery 205. Note that, although a case where battery 205 is attached to accessory 200 will be described in this embodiment, accessory 200 may operate only with power supplied from camera 100 without battery 205 being attached. In this case, charging unit 204 is not necessary.

[0097] The differential communication unit 207 is a circuit for performing differential communication with the camera 100, and can transmit and receive data to and from the camera 100. The external communication IF unit 208 is an IF (interface) for performing data communication with an external device (not shown), and is an Ethernet communication IF, a wireless LAN communication IF, a public network communication IF, or the like.

[0098] The accessory control unit 201 controls the differential communication unit 207 and the external communication IF unit 208 to transmit data received from the camera 100 to an external device and transmit data received from the external device to the camera 100. The functional unit 206 is a circuit unit that exerts different functions depending on the type of the accessory 200. For example, when the accessory 200 is a strobe device, the functional unit 206 functions as a light emitting unit or a charging unit. Also, when the accessory 200 is a microphone device, the functional unit 206 functions as an audio codec unit or a microphone unit.

[0099] The external connection terminal 209 is a connector terminal for connecting to an external device, and is, by way of example only, a USB TYPE-C connector. The connection detection unit 210 detects that an external device has been connected to the external connection terminal 209. The accessory control unit 201 can detect the connection of an external device to the external connection terminal 209 by receiving an output signal from the connection detection unit 210. The power switch 203 is a switch for turning the operation of the accessory 200 on and off. The accessory control unit 201 can detect the on position or off position by reading out a signal level of the terminal to which the power switch 203 is connected.

[0100] The operation switch 212 is an operator for allowing the user to operate the accessory 200, and is composed of a button, a cross key, a slide switch, a dial switch, a touch sensor, etc. When the accessory control unit 201 detects that the operation switch 212 has been operated, it executes a predetermined process according to the operation.

[0101] The accessory side connection unit 211 is a connector for making an electrical connection with the camera 100 via 21 contacts TA01 to TA21 arranged in a row. The contacts TA01 to TA21 are arranged in this order from one end to the other end in the arrangement direction.

[0102] The contact TA01 is connected to GND and serves not only as a reference potential contact but also as a contact to control the wiring impedance of the differential signals D1N and D1P. The contact TA01 corresponds to the third ground contact.

[0103] A differential signal D1N connected to the contact TA02 and a differential signal D1P connected to the contact TA03 are data communication signals that form a pair and perform data communication. The contact TA02 and the contact TA03 are connected to the differential communication unit 207. The contact TA02, the contact TA03, the contacts TA07 to TA17, TA19, and TA20 are all communication contacts.

[0104] Contact TA04 as a first ground contact is connected to GND, and serves as a reference potential contact between camera 100 and accessory 200. Contact TA04 is disposed on the outside of contact TA05 in the arrangement direction of the contacts. Accessory power supply unit 202 and charging unit 204 are connected to contact TA05 as a power supply contact, and accessory power VACC supplied from camera 100 is connected thereto.

[0105] The contact TA06, which serves as an attachment detection contact, is directly connected to GND. The contact TA06 serves as a contact for causing the camera 100 to detect the attachment of the accessory 200 by setting the accessory attachment detection signal / ACC_DET to a GND level (ground potential) as a Lo level when the accessory 200 is attached to the camera 100.

[0106] SCLK connected to contact TA07, MOSI connected to contact TA08, MISO connected to contact TA09, and CS connected to TA10 are signals for the accessory control unit 201 to become a communication slave and perform SPI communication.

[0107] A communication request signal / WAKE is connected to the contact TA11 for requesting communication from the accessory control unit 201 to the camera 100. When the accessory control unit 201 determines that communication with the camera 100 is necessary, it issues a communication request to the camera 100 by outputting the communication request signal / WAKE at Lo.

[0108] In response to detecting that the accessory 200 is in the attached state, the camera control unit A101 supplies power to the accessory 200 via a contact TC5. Then, the accessory control unit 201 notifies the camera control unit A101 that it has received power supply by changing the signal level (electric potential) of the communication request signal / WAKE from Hi level to Lo level.

[0109] The accessory control unit 201 can notify the camera 100 that a cause for the accessory 200 to communicate with the camera 100 has occurred by changing the signal level (electric potential) of the communication request signal / WAKE from Hi level to Lo level even without a request from the camera. With this configuration, the camera control unit A101 can omit the operation of periodically checking whether a cause for the accessory 200 to communicate has occurred by polling. Furthermore, when a cause for communication has occurred, the accessory 200 can communicate that fact to the camera 100 in real time.

[0110] The SDA connected to the contact TA12 and the SCL connected to the contact TA13 are signals for the accessory control unit 201 to perform I2C communication as a communication slave.

[0111] The FNC1 signal connected to the contact TA14, the FNC2 signal connected to TA15, the FNC3 signal connected to TA16, and the FNC4 signal connected to TA17 are function signals whose functions can be changed according to the type of accessory 200. For example, these function signals become an audio data signal when accessory 200 is a microphone device, and become a strobe light emission timing signal that notifies the light emission timing when accessory 200 is a strobe unit.

[0112] Contact TA18 as a second ground contact is also connected to GND and, like contact TA04, serves as a reference potential contact for camera 100 and accessory 200. Differential signal D2N connected to contact TA19 and differential signal D2P connected to contact TA20 are data communication signals that form a pair with each other to perform data communication, and are connected to external connection terminal 209.

[0113] The contact TA21 is connected to GND and serves not only as a reference potential contact but also as a terminal for controlling the wiring impedance of the differential signals D2N and D2P. The contact TA21 corresponds to the fourth ground contact.

[0114] The contacts TA01, TA04, TA06, TA18, and TA21 are connected to, for example, a GND portion of a flexible substrate, and the GND portion of the flexible substrate is fixed by a metal member that serves as the GND level of the accessory 200 with a screw (not shown) or the like. The metal member that serves as the GND level is, for example, a shoe mounting leg that engages with the accessory shoe portion of the camera 100, a base plate (not shown) inside the accessory 200, or the like.

[0115] In this embodiment, the camera 100 and the accessory 200 are compatible with two types of communication protocols as the SPI communication method. Of these, the first communication protocol is a method in which the camera 100 does not check whether the accessory 200 is in a communication-enabled state before outputting the SCLK signal, and in this embodiment, this is referred to as SPI protocol A. The second communication protocol is a method in which the camera 100 checks whether the accessory 200 is in a communication-enabled state before outputting the SCLK signal, and in this embodiment, this is referred to as SPI protocol B.

[0116] Camera 100 includes built-in accessories 151 and 152. For example, built-in accessories 151 and 152 are a built-in microphone and a built-in flash, respectively. There is no limit to the number of built-in accessories that may be included.

[0117] Figure 2(a) is a diagram showing an outline of the communication waveform of SPI protocol A. Figure 2(b) is a diagram showing an outline of the communication waveform of SPI protocol B. In Figures 2(a) and (b), the CS signal is set to Lo active.

[0118] First, as shown in FIG. 2(a), in the SPI protocol A, the camera control unit B102 changes the CS signal to Lo level at timing A1, and requests the accessory control unit 201 to perform SPI communication.

[0119] At timing A2 after a predetermined time T_CS has elapsed from timing A1, the camera control unit B102 starts outputting the SCLK signal and the MOSI signal. Similarly, the accessory control unit 201 starts outputting the MISO signal when it detects a falling edge change of the SCLK signal.

[0120] The camera control unit B102 stops the SCLK output at timing A3 when the SCLK output for one byte is completed. The camera control unit B102 stops the SCLK output from timing A3 until a predetermined time T_INTERVAL has elapsed, and resumes the SCLK output at timing A4 when the predetermined time T_INTERVAL has elapsed, and communicates the next one byte.

[0121] 3(a) is a flowchart showing the processing of the camera control unit B102 in the SPI protocol A. This processing is realized by the CPU in the camera control unit B102 expanding a program stored in the ROM in the camera control unit B102 into the RAM in the camera control unit B102 (neither is shown) and executing it.

[0122] In step S101, the camera control unit B102 stores a numerical value indicating the number of bytes to be communicated in a variable NA. For example, when communicating 3 bytes, 3 is stored in the variable NA. In step S102, the camera control unit B102 changes the CS signal to Lo level to request SPI communication.

[0123] In step S103, the camera control unit B102 waits until a predetermined time T_CS has elapsed since the CS signal changed to Lo level, and proceeds to step S104 after the predetermined time T_CS has elapsed. In step S104, the camera control unit B102 controls the output of SCLK to communicate 1 byte of data, and also controls the output of MOSI data and the input of MISO data.

[0124] In step S105, the camera control unit B102 stores the value obtained by subtracting 1 from the numerical value of the variable NA as a new variable NA. In step S106, the camera control unit B102 determines whether the variable NA has become 0. If the variable NA has become 0, the camera control unit B102 proceeds to step S107, and if the variable NA is other than 0, the camera control unit B102 proceeds to step S108.

[0125] In step S108, the camera control unit B102 waits until a predetermined time T_INTERVAL has elapsed since the communication of 1 byte data is completed in step S104, and returns to step S104 after the predetermined time T_INTERVAL has elapsed. In step S107, the camera control unit B102 changes the CS signal to Hi level, and ends the series of SPI communications shown in FIG. 3(a).

[0126] Fig. 3(b) is a flowchart showing the processing of the accessory control unit 201 in the SPI protocol A. This processing is executed in parallel with the processing shown in Fig. 3(a). This processing is realized by the CPU in the accessory control unit 201 expanding a program stored in the ROM in the accessory control unit 201 into the RAM in the accessory control unit 201 (neither is shown in the figure) and executing it.

[0127] In step S201, the accessory control unit 201 waits until the CS signal changes to Lo, and when the CS signal changes to Lo, the process proceeds to step S202. In step S202, the accessory control unit 201 controls the input of MOSI data and the output of MISO data in response to the input of the SCLK signal, and communicates 1 byte of data.

[0128] In step S203, the accessory control unit 201 determines whether the CS signal has changed to Hi. If the CS signal has not changed to Hi, the accessory control unit 201 returns to step S202 to perform the next 1-byte communication, and if the CS signal has changed to Hi, the accessory control unit 201 ends the series of SPI communications shown in FIG. 3(b).

[0129] Next, the SPI protocol B will be described. As shown in Fig. 2(b), in the SPI protocol B, the camera control unit B102 changes the CS signal to Lo level at timing B1 to request SPI communication from the accessory control unit 201. Together with the request for communication, the camera control unit B102 checks the potential of the MISO signal. If the MISO signal is at Hi level, the camera control unit B102 determines that the accessory control unit 201 is in a state where communication is possible, and if the MISO signal is at Lo level, it determines that the accessory control unit 201 is in a state where communication is not possible.

[0130] On the other hand, when the accessory control unit 201 detects the falling edge of the CS signal, if SPI communication is possible, it controls MISO to Hi level, and if SPI communication is not possible, it controls MISO to Lo level (timing B2).

[0131] At timing B3, when the camera control unit B102 confirms that the MISO signal is at Hi level, it starts outputting the SCLK signal and the MOSI signal. Similarly, when the accessory control unit 201 detects a falling edge change of the SCLK signal, it starts outputting the MISO signal.

[0132] When the camera control unit B102 completes output of one byte of SCLK at timing B4, it stops outputting SCLK. After transmitting and receiving one byte of data, the accessory control unit 201 controls the MISO signal to Hi level if SPI communication is possible, and controls the MISO signal to Lo level if SPI communication is not possible (timings B5 and B6).

[0133] At timing B7, the camera control unit B102 checks the potential of the MISO signal. If the MISO signal is at Hi level, the camera control unit B102 determines that the accessory control unit 201 is in a communication-enabled state, and if the MISO signal is at Lo level, the camera control unit B102 determines that the accessory control unit 201 is in a communication-disabled state.

[0134] 4(a) is a flowchart showing the processing of the camera control unit B102 in the SPI protocol B. This processing is realized by the CPU in the camera control unit B102 expanding a program stored in the ROM in the camera control unit B102 into the RAM in the camera control unit B102 (neither is shown in the figures) and executing it.

[0135] In step S111, the camera control unit B102 stores a numerical value indicating the number of bytes to be communicated in a variable NB. For example, when communicating 3 bytes, 3 is stored in the variable NB. In step S112, the camera control unit B102 changes the CS signal to Lo level to request SPI communication. In step S113, the camera control unit B102 waits until the MISO signal changes to Hi level, and when the MISO signal has changed to Hi level, proceeds to step S114.

[0136] In step S114, the camera control unit B102 controls the output of SCLK to communicate 1 byte of data, and also controls the output of MOSI data and the input of MISO data. In step S115, the camera control unit B102 stores a value obtained by subtracting 1 from the numerical value of the variable NB as a new variable NB. In step S116, the camera control unit B102 determines whether communication of all data has been completed (whether the variable NB has become 0). Here, if the variable NB has become 0, it is determined that communication of all data has been completed.

[0137] The camera control unit B102 proceeds to step S117 if communication of all data is completed, and proceeds to step S118 if communication of all data is not completed. In step S118, the camera control unit B102 waits until the MISO signal changes to Hi level, and when the MISO signal changes to Hi level, returns to step S114. In step S117, the camera control unit B102 changes the CS signal to Hi level, and ends the series of SPI communications shown in FIG. 4(a).

[0138] Fig. 4(b) is a flowchart showing the processing of the accessory control unit 201 in the SPI protocol B. This processing is executed in parallel with the processing shown in Fig. 4(a). This processing is realized by the CPU in the accessory control unit 201 expanding a program stored in the ROM in the accessory control unit 201 into the RAM in the accessory control unit 201 (neither is shown in the figure) and executing it.

[0139] In step S211, the accessory control unit 201 waits until the CS signal changes to Lo, and proceeds to step S212 when the CS signal changes to Lo. In step S212, the accessory control unit 201 determines whether or not SPI communication is possible, and proceeds to step S213 if SPI communication is possible, and proceeds to step S214 if SPI communication is not possible.

[0140] In step S213, the accessory control unit 201 controls the MISO signal to Hi level and proceeds to step S215. In step S214, the accessory control unit 201 controls the MISO signal to Lo level and returns to step S212. In step S215, the accessory control unit 201 controls the input of MOSI data and the output of MISO data in response to the SCLK signal input, and communicates 1 byte of data.

[0141] In step S216, the accessory control unit 201 determines whether the CS signal has changed to Hi. If the CS signal has not changed to Hi, the accessory control unit 201 returns to step S212 to perform the next 1-byte communication, and if the CS signal has changed to Hi, the accessory control unit 201 ends the SPI communication shown in FIG. 4(b).

[0142] FIG. 5 is a diagram showing the contents of communication when the camera 100 notifies the accessory 200 of an operation execution command by SPI communication.

[0143] In the first byte of communication, the camera control unit B102 transmits information CMD indicating a command number as MOSI data. On the other hand, the accessory control unit 201 transmits a value of 0xA5 as MISO data indicating a communication-enabled state. If the accessory control unit 201 cannot execute the communication process of the first byte, it transmits a value other than 0xA5 as MISO data.

[0144] In communicating the second byte, the camera control unit B102 transmits the argument MOSI_DATA1 corresponding to the command number CMD. Similarly, for the third byte to the (N-2)th byte and thereafter, the camera control unit B102 transmits the arguments MOSI_DATA2 to MOSI_DATA[N-3] corresponding to the command number CMD.

[0145] On the other hand, in the second byte of communication, the accessory control unit 201 transmits the command number CMD received in the first byte as the MISO data. This enables the camera control unit B102 to determine that the accessory control unit 201 has correctly received the MOSI data.

[0146] In communicating the third byte, the accessory control unit 201 transmits the return value MISO_DATA1 corresponding to the command number CMD as MISO data. Similarly, for the fourth byte to the (N-2)th byte and onwards, the accessory control unit 201 transmits arguments MISO_DATA2 to MISO_DATA[N-4] corresponding to the command number CMD. Note that the number of arguments and return values ​​is predetermined for each command number. Also, it is possible to omit either the argument or the return value.

[0147] In the (N-1)th byte of communication, the camera control unit B102 transmits 'CheckSum_C' as checksum data as MOSI data. This CheckSum_C is calculated by the camera control unit B102 from the data transmitted from the camera control unit B102 to the accessory control unit 201 using the following formula 1. On the other hand, the accessory control unit 201 transmits a value of '0x00' as MISO data.

[0148] In the Nth byte of communication, the camera control unit B102 transmits '0x00' as the MOSI data, while the accessory control unit 201 transmits 'CheckSum_A' as the checksum data as the MISO data.

[0149] CheckSum_A is a first CheckSum_A calculated by the following formula 2, or a second CheckSum_A calculated by the following formula 3. That is, the accessory control unit 201 calculates CheckSum_C_A from the actually received data. Then, the accessory control unit 201 determines whether or not the received CheckSum_C matches CheckSum_C_A calculated from the received data. If CheckSum_C matches CheckSum_C_A, the accessory control unit 201 calculates a first CheckSum_A by the following formula 2 and transmits it to the camera control unit B102.

[0150] On the other hand, if the accessory control unit 201 determines that CheckSum_C and CheckSum_C_A do not match, it calculates a second CheckSum_A by the following formula 3 and transmits it to the camera control unit B102. CheckSum_C=EXOR(AND(SUM(CMD,MOSI_DATA1,…,MOSI_DATA[N-3]),0xFF),0xFF)…(1) CheckSum_A=EXOR(AND(SUM(0xA5,CMD,MIS0_DATA1,…,MOSI_DATA[N-4]),0xFF),0xFF)…(2) CheckSum_A=AND(SUM(0xA5,CMD,MIS0_DATA1,…,MOSI_DATA[N-4]),0xFF)…(3)

[0151] FIG. 6 is a diagram showing an example of accessory information. This accessory information is stored in a non-volatile memory (not shown) in the accessory 200. The accessory information is information for allowing the camera 100 to identify the type of the accessory 200 and specifications related to communication and operation (function). The accessory information is mapped in a memory space of addresses 0x00 to 0x0F. The accessory information can be read from the accessory 200 by I2C communication. In the I2C communication in this embodiment, a checksum value for the read data is added as the final data of the communication. The accessory information will be described in detail later.

[0152] 7 is a diagram showing a sequence when the accessory 200 is attached to the camera 100. Here, an overview of the process when the accessory is attached will be described, but the details of the processes performed by the camera 100 and the accessory 200 will be described later.

[0153] When the accessory 200 is attached to the camera 100, the accessory attachment detection signal / ACC_DET becomes the GND level, and the camera control unit A101 determines that the accessory 200 is attached. When it is determined that the accessory 200 is attached, the camera control unit A101 sets the power supply control signal CNT_VACC1 to the Hi level in order to turn on the output of the accessory power supply unit A131. The accessory power supply unit A131 outputs the accessory power supply VACC in response to the power supply control signal CNT_VACC1 becoming Hi.

[0154] In the accessory 200, when the accessory power supply unit 202 receives the accessory power supply VACC, it generates a power supply VMCU_A for the accessory control unit 201. This starts up the accessory control unit 201. After starting up, the accessory control unit 201 initializes each block in the accessory 200. Thereafter, when the accessory control unit 201 becomes capable of communicating with the camera 100, the accessory control unit 201 sets the / WAKE terminal to Lo level. In the camera 100, when the camera control unit A101 detects that the / WAKE terminal has become Lo level, it detects that the accessory 200 has become capable of communicating.

[0155] The camera control unit A101 requests accessory information from the accessory 200 via I2C communication. In the accessory 200, the accessory control unit 201 transmits the accessory information in response to the accessory information request from the camera 100. After transmitting the accessory information, the accessory control unit 201 sets the communication request signal / WAKE to a Hi level.

[0156] In the camera 100, the camera control unit A101 analyzes the received accessory information and determines whether the attached accessory 200 can be controlled. The camera control unit A101 also turns on the accessory power supply unit B132. After completing various settings of the camera 100, the camera control unit A101 notifies the camera control unit B102 of the accessory information.

[0157] The camera control unit B102 notifies the accessory 200 of a control command by SPI communication and controls a function signal in response to a received event based on accessory type information (ACC type information) that is information indicating the type (classification) of the accessory. The accessory control unit 201 responds to a control command by SPI communication from the camera 100 (event) and performs control in response to the function signal.

[0158] FIG. 8 is a diagram showing an example of accessory type information. In the accessory information shown in FIG. 6, D7-D0 data at address 0x00 is accessory type information (ACC type information). In FIG. 8, each number corresponds to the type of accessory. For example, numbers 0x81, 0x82, and 0x83 indicate that the accessory is a strobe device, an interface conversion adapter device, and a microphone device, respectively. Number 0x84 indicates that the accessory is a multi-accessory connection adapter device for mounting multiple accessory devices to the camera 100. Here, the adapter device is an intermediate accessory that is mounted between the camera 100 and an accessory such as a strobe device or a microphone device. The interface conversion adapter device is an adapter device that converts an interface to provide compatibility between the camera 100 and the accessory when the interface of the camera 100 and the interface of the accessory are different. The multi-accessory connection adapter device is an adapter device to which multiple accessories can be mounted.

[0159] 6, the D7-D0 data at address 0x01 is information indicating the accessory identification number (ACC identification number). The accessory model can be uniquely indicated by the accessory type information and the identification number. The D7-D0 data at address 0x02 is information indicating the firmware version of the accessory 200.

[0160] The D7-D6 data at address 0x03 is information indicating whether or not the camera 100 requests the accessory power supply VACC to the accessory 200 when the camera 100 has turned off a power switch (not shown). When this information is "0", it indicates that no power supply is required, when this information is "1", it indicates a power supply request from the accessory power supply unit A131, and when this information is "2", it indicates a power supply request from the accessory power supply unit B132.

[0161] The D5-D4 data at address 0x03 is information indicating whether or not to request accessory power VACC supply to accessory 200 when camera 100 is in power saving mode (auto-off mode). When this information is "0", it indicates that power supply is not required, when this information is "1", it indicates a power supply request from accessory power supply unit A131, and when this information is "2", it indicates a power supply request from accessory power supply unit B132.

[0162] The D3-D2 data at address 0x03 is information indicating whether or not the accessory 200 is equipped with a battery 205. When this information is "0", it indicates that the accessory is not equipped with a battery 205, and when this information is "1", it indicates that the accessory is equipped with a battery 205. The D1-D0 data at address 0x03 is information indicating whether or not the accessory 200 is equipped with a function for charging the battery 205. When this information is "0", it indicates that the accessory is not equipped with a charging function, and when this information is "1", it indicates that the accessory is equipped with a charging function.

[0163] The D7-D0 data at address 0x04 is information indicating the requested power of the accessory power supply VACC to which the accessory 200 is supplied by the camera 100. For example, a value obtained by multiplying this information by 10 indicates a current value, and when this information is 10, it indicates 100 mA, and when this information is 100, it indicates 1 A. Note that, as a method of reducing the amount of data of this information, this information may be associated with an arbitrary current value. For example, when this information is "0", "1", "3", or "4", it may indicate a request for 100 mA, 300 mA, 450 mA, or 600 mA, respectively.

[0164] The D7 data at address 0x05 is information indicating whether the accessory 200 is in a firmware update mode. When this information is "0", it indicates that the accessory is not in the firmware update mode, and when this information is "1", it indicates that the accessory is in the firmware update mode. The D6 data at address 0x05 is information indicating whether the accessory 200 has a firmware update function. When this information is "0" or "1", it indicates that the accessory does not have a firmware update function and that the accessory has a firmware update function, respectively.

[0165] The D5-D4 data at address 0x05 is information indicating whether or not to permit operation of accessory 200 when an intermediate connection accessory is attached. When this information is "0" or "1", it indicates that operation is not permitted or permitted, respectively. The D3-D2 data at address 0x05 is information indicating whether or not accessory 200 needs to check the attachment state of the intermediate connection accessory when camera 100 is started up. When this information is "0" or "1", it indicates that check is not required or check is required, respectively.

[0166] The D1-D0 data at address 0x05 is information indicating whether the accessory 200 supports command notification via I2C communication. When this information is "0" or "1", it indicates that the accessory does not support command notification and that the accessory supports command notification, respectively.

[0167] The D5-D4 data at address 0x06 is information indicating a communication method capable of notifying the camera 100 of the cause of a communication request after the accessory 200 notifies the camera 100 of a communication request signal / WAKE. When this information is "0", "1", or "2", it indicates that I2C communication is supported, SPI communication is supported, or both I2C communication and SPI communication are supported, respectively.

[0168] The D0, D1, D2, and D3 data at address 0x06 are information indicating whether or not the accessory 200 has the functions represented by the FNC1 signal, FNC2 signal, FNC3 signal, and FNC4 signal, respectively. The D0 data corresponds to the FNC1 signal, the D1 data to the FNC2 signal, the D2 data to the FNC3 signal, and the D3 data to the FNC4 signal. When each data value is "0", it indicates that the corresponding function is not provided, and when each data value is "1", it indicates that the corresponding function is provided.

[0169] The D7 data at address 0x0A is information indicating whether or not to request startup of the camera 100 when the accessory 200 notifies the camera 100 of a communication request signal / WAKE. When this information is "0" or "1", it indicates that startup is requested or that startup is not requested, respectively.

[0170] The D6-D0 data at address 0x0A is information indicating the cause of the communication request signal / WAKE that the accessory 200 notified the camera 100 of.

[0171] 9 is a diagram showing an example of a cause of a communication request signal / WAKE. In this example, an example is shown in which the accessory 200 is a microphone device. For example, cause number 0x00 is a number indicating that a menu call switch (SW) of the operation switches 212 has been pressed. Also, cause number 0x01 is a number indicating that the accessory 200 has completed output control of an audio signal. Also, cause number 0x02 is a number indicating that the accessory 200 has completed muting of an audio signal. In this way, information regarding the cause of generation of the communication request signal / WAKE can be notified to the camera 100.

[0172] 6 is information indicating the SPI communication protocol supported by the accessory 200. When this information is "0" or "1", it indicates that the accessory is compatible with SPI protocol A or B, respectively.

[0173] The D0 data at address 0x0C is information indicating the control logic of the CS signal of the SPI communication supported by the accessory 200. When this information is "0" or "1", it indicates that the CS signal is Lo active logic and that the CS signal is Hi active logic, respectively.

[0174] The D7-D0 data at address 0x0D is information indicating the time required as a communication byte interval when the accessory 200 communicates using the SPI protocol A and when the D7 data at address 0x05 is "0." When the D7 data at address 0x05 is "0," as described above, the accessory 200 is not in the firmware update mode.

[0175] The D7-D0 data at address 0x0E is information indicating the time required as a communication byte interval when the accessory 200 communicates using SPI protocol A and when the D7 data at address 0x05 is "1." When the D7 data at address 0x05 is "1," as described above, the accessory 200 is in the firmware update mode.

[0176] Fig. 10(a) is a diagram showing the relationship between communication bytes and communication intervals for data at address 0x0D, and Fig. 10(b) is a diagram showing the relationship between communication bytes and communication intervals for data at address 0x0E.

[0177] The D7-D0 data at address 0x0F shown in FIG. 6 is information indicating a checksum.

[0178] 11 is a flowchart showing the first processing when an accessory is attached. This flowchart shows processing by the camera control unit A101 from when the accessory 200 is attached to the camera 100 until the function of the accessory 200 is enabled. This first processing when an accessory is attached is realized by the CPU in the camera control unit A101 expanding a program stored in the ROM in the camera control unit A101 into the RAM in the camera control unit A101 (neither is shown in the figures) and executing it. This processing is started when the main power supply of the camera 100 is turned on or when the camera returns from the auto-off mode (power saving mode).

[0179] In step S401, the camera control unit A101 monitors the signal level of the accessory attachment detection signal / ACC_DET and waits until this signal level becomes Lo. That is, the camera control unit A101 waits until the accessory 200 is attached. If the signal level of the accessory attachment detection signal / ACC_DET is Hi, it is determined that the accessory 200 is not attached. If the signal level is Lo, it is determined that the accessory 200 is attached, and so the camera control unit A101 proceeds to step S402.

[0180] In step S402, the camera control unit A101 controls the power supply control signal CNT_VACC1 to Hi level in order to turn on the output of the accessory power supply unit A131, and proceeds to step S403. When the power supply control signal CNT_VACC1 becomes Hi, the accessory power supply unit A131 outputs the accessory power supply VACC.

[0181] In step S403, the camera control unit A101 monitors the signal level of the overcurrent detection signal DET_OVC and determines whether or not this signal level is Lo. If the signal level is Lo, the camera control unit A101 can determine that an overcurrent is not flowing, and proceeds to step S404. However, if the signal level is Hi, it can be determined that an overcurrent is flowing, and the camera control unit A101 ends the process shown in FIG. 11 and transitions to error processing (not shown).

[0182] In step S404, the camera control unit A101 monitors the signal level of a communication request signal / WAKE, which is a notification signal from the accessory 200, and waits until the signal level becomes Lo, that is, until initialization of the accessory 200 is completed. When the signal level becomes Lo, the camera control unit A101 can determine that initialization of the accessory 200 is completed, and proceeds to step S405.

[0183] In step S404, if the signal level of the communication request signal / WAKE does not become Lo even after a predetermined time has elapsed, the process may proceed to error processing (not shown). In each error processing, the camera control unit A101 notifies the user by displaying on the display unit 127 or by sound that the attached accessory 200 cannot be used effectively.

[0184] In step S405, the camera control unit A101 performs I2C communication with the accessory 200 as initial communication, thereby reading 15 bytes of accessory information. That is, the camera control unit A101 requests the accessory information from the accessory 200. In the accessory 200, the accessory control unit 201 transmits the accessory information to the camera 100 in response to the accessory information request from the camera 100. The camera 100 receives the accessory information.

[0185] In step S406, the camera control unit A101 determines whether the attached accessory 200 is a device compatible with the camera 100 based on the accessory information acquired in step S405. If the camera control unit A101 determines that the attached accessory 200 is a compatible accessory, the process proceeds to step S407. However, if the camera control unit A101 determines that the attached accessory 200 is an incompatible accessory, the process ends the process shown in Fig. 11 and proceeds to error processing (not shown). In this error processing, the camera control unit A101 notifies the user by display on the display unit 127 or by sound that the attached accessory 200 cannot be used effectively.

[0186] In step S407, the camera control unit A101 controls the power supply control signal CNT_VACC2 to Hi level in order to turn on the output of the accessory power supply unit B132, and proceeds to step S408. When the power supply control signal CNT_VACC2 becomes Hi, the accessory power supply unit B132 outputs the accessory power supply VACC. In this embodiment, when both the power supply control signal CNT_VACC1 and the power supply control signal CNT_VACC2 are controlled to Hi level, the accessory power supply unit B132 outputs the accessory power supply VACC.

[0187] In step S408, the camera control unit A101 notifies the camera control unit B102 of the accessory information read out in step S405, and ends the process shown in FIG.

[0188] 12 is a flowchart showing the second processing when an accessory is attached. This flowchart shows the processing by the camera control unit B102 from when the accessory 200 is attached to the camera 100 until the functions of the accessory 200 are enabled. This second processing when an accessory is attached is realized by the CPU in the camera control unit B102 expanding a program stored in the ROM in the camera control unit B102 into the RAM in the camera control unit B102 (neither is shown in the figure) and executing it. This processing is started when the first processing when an accessory is attached (FIG. 11) is started.

[0189] In step S501, the camera control unit B102 waits until accessory information is notified from the camera control unit A101. This accessory information is notified in step S408 in Fig. 11. When the accessory information is received, in step S502, the camera control unit B102 sets function signals (FNC1 to FNC4) based on the notified accessory information.

[0190] For example, if the accessory 200 is a microphone device based on the accessory information, the camera control unit B102 sets the FNC1 signal to function as an audio data clock signal. Similarly, the camera control unit B102 sets the FNC2 signal to function as an audio data channel signal, and the FNC3 signal to function as an audio data signal.

[0191] As another example, when the accessory 200 is a strobe device, the camera control unit B102 may set the FNC4 signal to function as a strobe light emission synchronization signal (strobe light emission timing signal). Note that even for function signals that do not require control of the accessory 200, settings may be made so as not to impede the operation of the camera 100 and the accessory 200.

[0192] In step S503, the camera control unit B102 sets the control logic of the SPI communication CS signal based on the accessory information notified from the camera control unit A101. In step S504, the camera control unit B102 waits until an event occurs (is detected) for the accessory 200, and proceeds to step S505 when the event occurs.

[0193] In step S505, the camera control unit B102 determines whether or not the event detected in step S504 is an event that requires SPI communication with the accessory 200. Then, the camera control unit B102 proceeds to step S506 if the detected event is an event that requires SPI communication, and proceeds to step S507 if the detected event is not an event that requires SPI communication.

[0194] In step S506, the camera control unit B102 performs SPI communication control on the accessory 200. For example, if the accessory 200 is a microphone device, the SPI communication control executed here may include instruction communication for turning the microphone on / off, instruction communication for switching the sound collection directivity of the microphone, instruction communication for switching the equalizer function of the microphone, etc. If the accessory 200 is a strobe device, the SPI communication may include communication for reading out setting information of the strobe, communication for notifying the strobe of setting information, etc. After step S506, the camera control unit B102 returns to step S504.

[0195] In step S507, the camera control unit B102 determines whether or not the detected event is an event that requires control using a function signal with the accessory 200. Then, the camera control unit B102 proceeds to step S508 if the detected event is an event that requires control using a function signal, and proceeds to step S509 if the detected event is not an event that requires control using a function signal.

[0196] In step S508, the camera control unit B102 performs control on the accessory 200 using the function signal. Examples of control using the function signal executed here include starting output of the audio data clock signal FNC1 and the audio data channel signal FNC2, and taking in the audio data signal FNC3, if the accessory 200 is a microphone device. This enables the camera 100 to acquire audio data from the accessory 200. Also, if the accessory 200 is a strobe device, controlling the strobe light emission synchronization signal FNC4 at a predetermined timing, which can be used to notify the strobe of a light emission instruction. After step S508, the camera control unit B102 returns to step S504.

[0197] In step S509, the camera control unit B102 executes "other control" in response to the event detected in step S504. In the other control, if the detected event requires I2C communication, the camera control unit B102 performs I2C communication control on the accessory 200. In addition, in the other control, the camera control unit B102 performs in-camera control in response to the detected event. Examples of the in-camera control executed here include, for example, when the accessory 200 is a microphone device, control of starting and ending recording of audio data in the recording memory 126, as well as equalizer processing control for audio data. In addition, when the accessory 200 is a strobe device, examples of the in-camera control include photometry control for accumulating and acquiring light emitted by the strobe in the imaging sensor 122, and calculation control of the light emission amount indication value of the strobe. After step S509, the camera control unit B102 returns to step S504.

[0198] 13 is a flowchart showing the processing when the accessory is attached. This flowchart shows the processing by the accessory control unit 201 from when the accessory 200 is attached to the camera 100 until the functions of the accessory 200 are enabled. This processing is realized by the CPU in the accessory control unit 201 expanding a program stored in the ROM in the accessory control unit 201 into the RAM in the accessory control unit 201 (neither is shown in the figure) and executing it. This processing is started when the accessory 200 is attached to the camera 100.

[0199] In the processes shown in FIGS. 11 and 12, the camera side connection section 141, the camera control section A101 and the camera control section B102 cooperate to function as a communication means in the present invention.

[0200] In step S601, the accessory control unit 201 waits until the accessory power supply VACC from the camera 100 is turned on, and when the accessory power supply VACC is turned on, the process proceeds to step S602. Note that, apart from this method, the accessory 200 may be configured to have a battery 205, and the accessory control unit 201 may further be configured to monitor the voltage value of the accessory power supply VACC, so that it is possible to detect that the accessory power supply VACC has been turned on. Note that, when the accessory 200 is configured not to have a battery 205, it may be possible to determine that the accessory power supply VACC has been turned on by supplying power to the accessory control unit 201 and starting the operation of the accessory control unit 201 itself.

[0201] In step S602, the accessory control unit 201 performs initial settings. These initial settings include, for example, setting the operating frequency of the microcomputer, setting the input / output control port of the microcomputer, initializing the timer function of the microcomputer, initializing the interrupt function of the microcomputer, etc. In step S603, the accessory control unit 201 controls the communication request signal / WAKE to Lo, thereby notifying the camera 100 that the initial settings have been completed (that communication has become possible).

[0202] In step S604, the accessory control unit 201 responds to the I2C communication as the initial communication from the camera 100, and transmits 15 bytes of accessory information (FIG. 6). In step S605, the accessory control unit 201 controls the communication request signal / WAKE to Hi. In step S606, the accessory control unit 201 waits until an event occurs (is detected), and when an event occurs, the process proceeds to step S607. Therefore, the accessory information is transmitted in the first communication after notifying information indicating that communication is possible, and before starting an operation based on the event.

[0203] In step S607, the accessory control unit 201 determines whether or not the event detected in step S606 is an event that requires SPI communication with the camera 100. If the detected event is an event that requires SPI communication, the accessory control unit 201 proceeds to step S608, and if the detected event is not an event that requires SPI communication, the accessory control unit 201 proceeds to step S609.

[0204] In step S608, the accessory control unit 201 performs SPI communication control with the camera 100. If the communication request signal / WAKE is in a Lo output state when this SPI communication control is being executed, the accessory control unit 201 sets the communication request signal / WAKE to a Hi output control after the SPI communication.

[0205] For example, when the accessory 200 is a microphone device, the SPI communication control executed in step S608 may include instruction communication from the camera 100 to turn on / off the microphone operation. In addition, examples of the SPI communication include instruction communication to switch the sound collection directivity of the microphone, instruction communication to switch the equalizer function of the microphone, etc. In addition, when the accessory 200 is a strobe device, examples of the SPI communication control include communication to read out setting information of the strobe, communication to notify the strobe of setting information, etc. After step S608, the accessory control unit 201 returns to step S606.

[0206] In step S609, the accessory control unit 201 determines whether or not the detected event is an event that requires I2C communication with the camera 100. If the detected event is an event that requires I2C communication, the accessory control unit 201 proceeds to step S610, and if the detected event is not an event that requires I2C communication, the accessory control unit 201 proceeds to step S611.

[0207] In step S610, the accessory control unit 201 performs I2C communication control with the camera 100. If the communication request signal / WAKE is in a Lo output state when the SPI communication control is being performed, the accessory control unit 201 sets the communication request signal / WAKE to a Hi output control after the SPI communication. The I2C communication control performed in step S610 may be, for example, a read communication of the communication request cause in response to the communication request signal / WAKE notified from the accessory control unit 201 to the camera 100. After step S610, the accessory control unit 201 returns to step S606.

[0208] In step S611, the accessory control unit 201 determines whether the event detected in step S606 is an event that requires control using a function signal. If the detected event is an event that requires control using a function signal, the accessory control unit 201 proceeds to step S612, and if the detected event is not an event that requires control using a function signal, the accessory control unit 201 proceeds to step S613.

[0209] In step S612, the accessory control unit 201 uses the function signal to control the camera 100. If the accessory 200 is a microphone device, the control using the function signal executed in step S612 may be the following.

[0210] For example, it may include receiving and controlling an audio data clock signal of FNC1 and an audio data channel signal of FNC2 output from camera 100, and outputting an audio data signal of FNC3 in synchronization with these signals. On the other hand, if accessory 200 is a strobe device, control using a function signal executed in step S612 may include receiving and controlling a strobe emission synchronization signal of FNC4 to control strobe emission. After step S612, accessory control unit 201 returns to step S606.

[0211] In step S613, the accessory control unit 201 determines whether the event detected in step S606 is an event that requires notification to the camera by a communication request signal / WAKE. If the detected event is an event that requires notification to the camera by a communication request signal / WAKE, the accessory control unit 201 proceeds to step S614. On the other hand, if the detected event is not an event that requires notification to the camera by a communication request signal / WAKE, the accessory control unit 201 proceeds to step S615.

[0212] In step S614, the accessory control unit 201 stores a communication request cause number for the camera 100 corresponding to the event detected in step S606 in a volatile memory (not shown) of the accessory 200, and controls the communication request signal / WAKE to Lo. As the communication request cause number, a unique number assigned to each cause content corresponds, as described in Fig. 9. After step S614, the accessory control unit 201 returns to step S606.

[0213] In step S615, the accessory control unit 201 performs control within the accessory in response to the event detected in step S606. Examples of the control within the accessory executed in step S615 include battery remaining capacity detection control when the accessory 200 has the battery 205, and other control such as detection control of the operation switch 212. After step S615, the accessory control unit 201 returns to step S606.

[0214] The process shown in FIG. 13 ends when the main power supply of the camera 100 is turned off, when the camera 100 transitions to the auto-off mode, when the accessory 200 is removed from the camera 100, or the like.

[0215] As described above, by going through the processes shown in Figures 11, 12, and 13, the camera 100 becomes able to control the attached accessory 200, and the accessory 200 becomes able to perform functional operations.

[0216] There is a possibility that a communication error may occur in the above-mentioned I2C communication (first communication) or SPI communication (second communication). Therefore, the camera control unit A101 determines the occurrence of a communication error and performs processing according to the type of error. These processing will be described with reference to Figs. 14 and 15.

[0217] Fig. 14 is a flow chart showing the error determination process. This process is mainly realized by the CPU in the camera control unit A101 expanding a program stored in the ROM in the camera control unit A101 into the RAM in the camera control unit A101 (neither is shown) and executing the program. This process is repeatedly executed at regular time intervals in parallel with the first accessory attachment process (Fig. 11) when the accessory 200 is attached to the camera 100. Specifically, when the signal level of the accessory attachment detection signal / ACC_DET becomes Lo in step S401, it is determined that the accessory 200 is attached, and the process shown in Fig. 14 is started. In the process shown in Fig. 14, the camera control unit A101 functions as a control means in the present invention.

[0218] In step S701, the camera control unit A101 sets the number of retries R to 0. After that, in step S702, the camera control unit A101 checks the signal level of the accessory attachment detection signal / ACC_DET to determine whether the accessory 200 is attached. If the accessory 200 is attached, in step S705, the camera control unit A101 or the camera control unit B102 transmits and receives data. This data transmission and reception includes I2C communication as the initial communication in Figs. 11 and 12, as well as I2C communication and SPI communication depending on an event.

[0219] In step S706, the camera control unit A101 determines whether the data received in the data transmission and reception in step S705 is correct. If the received data is correct, the camera control unit A101 ends the process shown in Fig. 14. However, if the received data is incorrect, the camera control unit A101 determines in step S707 whether the number of retries R is equal to or greater than a predetermined number of retries R0 (R≧R0). The predetermined number of retries R0 is prestored in the ROM of the camera control unit A101.

[0220] If the retry count R is less than the predetermined retry count R0, the camera control unit A101 proceeds to step S709, increments the value of the retry count R (R=R+1), and proceeds to step S711. In step S711, the camera control unit A101 waits for a predetermined retry interval to elapse, and then returns to step S702.

[0221] On the other hand, if the result of the determination in step S707 is that the number of retries R is equal to or greater than the predetermined number of retries R0 (R≧R0 is satisfied), the camera control unit A101 determines that a communication error has occurred, and proceeds to step S708. Note that information on the timing at which the communication error occurred is stored in a storage unit (not shown). In step S708, an error process (FIG. 15) to be described later is executed.

[0222] After the error processing, in step S710, the camera control unit A101 transitions the state of the accessory 200 from the attached state to the error state, and ends the processing shown in Fig. 14. In this error state, no communication with the accessory 200 occurs, and there is no return to step S702. However, control of the operation of the camera 100 is not stopped, but is maintained. Therefore, operations that do not use functions of the accessory 200 can continue to be executed.

[0223] If the result of the determination in step S702 is that the accessory 200 is not in an attached state, it is determined that the accessory 200 has been detached during communication, and the camera control unit A101 proceeds to step S703. By providing step S702, it is possible to prevent the process from transitioning to error processing when the accessory 200 is detached during communication.

[0224] In step S703, the camera control unit A101 determines whether or not there is a built-in accessory having the same function as the removed accessory 200. Note that the functions of the accessory 200 can be recognized from the accessory type information (FIG. 8) in the accessory information (FIG. 6).

[0225] Then, if there is no built-in accessory having the same function as the removed accessory 200, the camera control unit A101 ends the process shown in FIG. 14. On the other hand, if there is a built-in accessory having the same function as the removed accessory 200, the camera control unit A101 switches the accessory to be used from the removed accessory 200 to the built-in accessory in step S704. For example, if the removed accessory 200 is a microphone device, it is switched to the built-in accessory 151, which is a built-in microphone. This allows the operation of the camera 100 using the desired accessory function to continue. After step S704, the camera control unit A101 ends the process shown in FIG. 14.

[0226] Fig. 15 is a flowchart showing the error processing executed in step S708 in Fig. 14. In step S801, the camera control unit A101 refers to the occurrence timing of the communication error determined to have occurred in step S707, and determines whether or not a communication error has occurred in the initial I2C communication.

[0227] The communication error in the initial I2C communication (not after the establishment of the initial I2C communication) referred to here corresponds to a case where it is determined in step S403 of Fig. 11 that an overcurrent has flowed. Also corresponds to a communication error in the I2C communication as the initial communication in step S405. Also corresponds to a case where it is determined in step S406 that the attached accessory 200 is an incompatible accessory. Furthermore, it corresponds to a case where the signal level of the communication request signal / WAKE does not become Lo even after a predetermined time has elapsed in step S404, that is, a notification indicating that the initialization of the accessory 200 has been completed has not been received.

[0228] On the other hand, a communication error that occurs after the establishment of the first I2C communication corresponds to a communication error in the SPI communication in step S506 in FIG. 12, or in the I2C communication in step S509 (second or subsequent I2C communication).

[0229] If it is determined in step S801 that a communication error has occurred in the initial I2C communication, the camera control unit A101 executes a first notification in step S802. In this first notification, the camera control unit A101 causes the display unit 127 to display a first notification screen (not shown) as a UI for initial communication error. For example, the first notification screen displays a message that the attached accessory is not compatible with the camera and may not operate correctly. Also, a message is displayed that the operation of the camera 100 (for example, video recording) will continue. At this time, the video being captured may be displayed on the display unit 127 in a superimposed manner with the message.

[0230] In step S803, if the accessory 200 is configured to receive power from the camera 100, the camera control unit A101 stops the power supply to the accessory 200. That is, the camera control unit A101 sets the power control signal CNT_VACC1 to Lo. In step S804, the camera control unit A101 stores this communication error as history in a memory included in the camera control unit A101. That is, since the I2C communication is executed by the camera control unit A101, the history of the communication error in the I2C communication is recorded in the microcomputer of the camera control unit A101. Thereafter, the camera control unit A101 ends the process shown in FIG.

[0231] If it is determined in step S801 that the communication error occurred after the establishment of the initial I2C communication, the camera control unit A101 executes a second notification different from the first notification in step S805. In this second notification, the camera control unit A101 causes the display unit 127 to display a second notification screen (not shown) as a normal communication error UI. For example, the second notification screen displays a message that the attached accessory cannot be used. Also, a message is displayed that the operation of the camera 100 (for example, video recording) will continue. At this time, the display unit 127 may display the message superimposed on the video being captured.

[0232] In step S806, if the accessory 200 is configured to receive power from the camera 100, the camera control unit A101 stops the power supply to the accessory 200. That is, the camera control unit A101 sets the power control signals CNT_VACC1 and CNT_VACC2 to Lo.

[0233] In step S807, the camera control unit A101 determines whether the communication error that occurred this time occurred in SPI communication. If the communication error that occurred this time occurred in SPI communication, the camera control unit A101 proceeds to step S808, and if the communication error that occurred this time occurred in I2C communication rather than SPI communication, the camera control unit A101 proceeds to step S809.

[0234] In step S808, the camera control unit A101 stores this communication error as history in a memory included in the camera control unit B102. That is, since the SPI communication is executed by the camera control unit B102, the history of the communication error in the SPI communication is recorded in the microcomputer of the camera control unit B102. At that time, the camera control unit A101 may instruct the camera control unit B102 to execute the recording of the history.

[0235] In step S809, the camera control unit A101 executes the same process as in step S804. Therefore, in steps S804, S808, and S809, the history of communication errors in I2C communication and the history of communication errors in SPI communication are stored in different storage units (memories not shown).

[0236] After steps S808 and S809, the camera control unit A101 ends the process shown in Fig. 15. Note that the notification in steps S802 and S805 is not limited to a screen display, and may be another method such as lighting an LED or sound.

[0237] According to this embodiment, SPI communication is executed through at least one I2C communication. After the accessory 200 is attached to the camera side connection unit 141, if a communication error occurs in the first I2C communication, a first notification is executed. If a communication error occurs after the establishment of the first I2C communication, a second notification different from the first notification is executed. Therefore, regardless of the type of accessory 200, different notification contents are issued depending on the timing when the communication error occurs.

[0238] This makes it possible to distinguish the cause of the communication error regardless of the type of accessory 200. From the content of the notification, the user can roughly recognize, for example, whether the accessory 200 is incompatible with the camera 100 or whether an unexpected error such as a poor electrical connection has occurred. Therefore, it is possible to take appropriate measures after the error occurs.

[0239] Furthermore, even if a communication error occurs during control of the operation of camera 100, the control of the operation is not stopped, so that the functions of camera 100 can be continued even if communication with attached accessory 200 is not possible.

[0240] Furthermore, if the attached accessory 200 is of a type that receives power from the camera 100, after a communication error occurs, the supply means (accessory power supply units A131, B132) is controlled so as not to supply power to the accessory 200. This makes it possible to suppress unnecessary power consumption. Note that when a communication error occurs, the accessory 200 may transition to a standby state.

[0241] In addition, when the accessory 200 in communication is removed, it is switched to a built-in accessory having the same function, so that the operation using the desired accessory function can be continued. In addition, even if the accessory 200 in communication is removed, a communication error is not notified, so that the continuation of the operation can be prioritized as long as the camera 100 itself can operate normally.

[0242] If it is determined in step S707 that a communication error has occurred, the same processes as those in steps S703 and S704 may be executed before proceeding to step S710. In other words, if a communication error has occurred, the accessory to be used may be switched to a built-in accessory having the same function as the attached accessory 200.

[0243] The notification screen may be erased when any button is operated. Alternatively, the notification screen may be erased when the camera is switched to the auto-off mode or the display-off mode by a timer. The difference between the first notification screen and the second notification screen is not limited to the message to be displayed. For example, the icons to be displayed on the first notification screen and the second notification screen may be changed. In this case, it is preferable to display an icon on the first notification screen that indicates that the attached accessory is not compatible with the camera and therefore does not operate properly, and an icon on the second notification screen that indicates that the attached accessory cannot be used. In addition, an image suggesting a method of solving the error may be displayed. For example, the first notification screen displays an image that prompts the user to check the type of the accessory, and the second notification screen displays an image that prompts the user to clean the contacts between the camera 100 and the accessory 200.

[0244] In addition, when the accessory 200 is a lens, even if a communication error occurs, error processing may not be executed immediately, but error processing may be started when an operation that requires communication with the lens is attempted.

[0245] The present invention is not limited to imaging devices, but can be applied to various electronic devices to which accessories can be attached.

[0246] The present invention has been described above in detail based on preferred embodiments thereof, but the present invention is not limited to these specific embodiments, and various forms that do not deviate from the gist of the present invention are also included in the present invention. [Explanation of symbols]

[0247] 101 Camera control unit A 102 Camera control unit B 141 Camera side connection part 200 Accessories

Claims

1. A mounting section for mounting an accessory; a communication means for performing communication with the accessory attached to the attachment portion according to a first communication method and communication with the accessory according to a second communication method based on information of the accessory received through communication according to the first communication method; a control means for executing a first notification when a communication error occurs with the accessory in an initial communication by the first communication method after the accessory is attached to the attachment portion, and for executing a second notification different from the first notification when a communication error occurs with the accessory after the initial communication by the first communication method is established, An electronic device characterized in that communication errors occurring after the establishment of communication using the first communication method for the first time include errors in communication using the first communication method from the second time onwards and errors in communication using the second communication method.

2. 2. The electronic device according to claim 1, wherein the control means does not stop controlling the operation of the electronic device even if a communication error occurs during control of the operation of the electronic device.

3. 3. The electronic device according to claim 1, wherein the first notification includes a notification that the accessory attached to the attachment portion is not compatible with the electronic device.

4. 4. The electronic device according to claim 1, wherein the second notification includes a notification that the accessory attached to the attachment portion cannot be used.

5. 4. The electronic device according to claim 1, wherein the first notification and the second notification notify different error solving methods.

6. 6. The electronic device according to claim 1, wherein the communication error history in the first communication method and the communication error history in the second communication method are stored in different storage units.

7. a supplying means for supplying power to the accessory attached to the attachment portion, The electronic device according to any one of claims 1 to 6, characterized in that when the accessory attached to the attachment portion is an accessory that receives power from the electronic device, the control means controls the supply means so as not to supply power to the attached accessory after a communication error occurs.

8. The control means determines whether or not the accessory attached to the attachment portion has been removed, The electronic device described in any one of claims 1 to 7, characterized in that when the control means determines that the attached accessory has been removed during communication with the attached accessory, if there is a built-in accessory having the same function as the removed accessory, the accessory to be used is switched from the removed accessory to the built-in accessory.

9. 9. The electronic device according to claim 8, wherein the control means does not notify a communication error even when it determines that the attached accessory has been removed during communication with the accessory.

10. A method for controlling an electronic device having a mounting section to which an accessory can be attached, and communication means for performing communication between the accessory attached to the mounting section using a first communication method and communication using a second communication method based on information about the accessory received through communication using the first communication method, comprising: a first notification is executed when a communication error occurs between the accessory and the attachment unit in an initial communication by the first communication method after the accessory is attached to the attachment unit, and a second notification different from the first notification is executed when a communication error occurs between the accessory and the attachment unit after an initial communication by the first communication method is established; A method for controlling an electronic device, characterized in that communication errors occurring after the establishment of communication using the first communication method for the first time include errors in communication using the first communication method from the second time onwards and errors in communication using the second communication method.

11. A program for causing a computer to execute a control method for an electronic device having a mounting section capable of mounting an accessory, and communication means for performing communication between the accessory mounted on the mounting section by a first communication method and communication by a second communication method based on information of the accessory received through communication by the first communication method, comprising: The control method includes: a first notification is executed when a communication error occurs between the accessory and the attachment unit in an initial communication by the first communication method after the accessory is attached to the attachment unit, and a second notification different from the first notification is executed when a communication error occurs between the accessory and the attachment unit after an initial communication by the first communication method is established; A program characterized in that communication errors occurring after the establishment of communication using the first communication method for the first time include errors in communication using the first communication method from the second time onwards and errors in communication using the second communication method.

Citation Information

Patent Citations

  • Camera system equipped with IC tag

    JP2006038924A

  • Imaging apparatus

    JP2008147782A

  • Interchangeable lens type camera system and camera body

    JP2009260949A

  • Imaging apparatus, imaging apparatus control method, and program

    JP2014204167A

  • Imaging device

    JP2017083720A