Electronic equipment, systems, and programs
The electronic device dynamically switches between I2C, UART, and SPI communication based on acquired potential, reducing the number of terminals required by using a single set of terminals for multiple communication methods.
Patent Information
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- NINTENDO CO LTD
- Filing Date
- 2025-01-10
- Publication Date
- 2026-07-23
AI Technical Summary
Existing electronic devices require multiple terminals for supporting different communication methods, leading to an increase in the number of terminals needed.
An electronic device that can switch between I2C, UART, and SPI communication methods based on the potential acquired when connected to another device, using a single set of terminals to reduce the number of terminals required.
Reduces the number of terminals needed by dynamically switching communication methods based on acquired potential, allowing efficient communication without the need for separate terminals for each method.
Smart Images

Figure 2026121204000001_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to electronic devices, systems, and programs.
Background Art
[0002] Generally, one function is assigned to one terminal for the external terminals of an electronic device.
Prior Art Documents
Patent Documents
[0003]
Patent Document 1
Summary of the Invention
Problems to be Solved by the Invention
[0004] When trying to support a plurality of communication methods according to the electronic device to which the electronic device is connected, the number of terminals increases.
Means for Solving the Problems
[0005] (Configuration 1) According to this embodiment, an electronic device is provided that can be wired to each of a plurality of other different electronic devices. The electronic device includes a control unit, an acquisition unit that acquires the potential generated when wired to the other electronic device, and two first terminals that are electrically connected to two of a plurality of terminals provided on the other electronic device. When the acquired potential is a first value, the control unit transmits or receives a signal corresponding to I2C (Inter Integrated Circuit) communication via the two first terminals; when the acquired potential is a second value, the control unit transmits or receives a signal corresponding to UART (Universal Asynchronous Receiver Transmitter) communication via the two first terminals; and when the acquired potential is a third value, the control unit transmits or receives a signal corresponding to SPI (Serial Peripheral Interface) communication via the two first terminals.
[0006] According to configuration 1, the function of the two first terminals can be changed depending on the acquired potential, thus reducing the number of terminals required for electronic devices.
[0007] Furthermore, each of the first, second, third, and fourth values may include not only the value itself, but also any value that lies within the predetermined range that includes each value. Due to design tolerances and disturbances, each value may include a certain degree of variation, rather than simply representing a specific value. Therefore, the first, second, third, and fourth values can also be interpreted as the first range, second range, third range, and fourth range, respectively. Moreover, these ranges may be set so as not to overlap with each other.
[0008] (Configuration 2) In Configuration 1, the electronic device may further include two second terminals that are electrically connected to two other terminals from a plurality of terminals provided on another electronic device. The control unit may receive a communication request signal or transmit a signal indicating a communication-ready state via the two second terminals if the acquired potential is a first value.
[0009] (Configuration 3) In Configuration 1 or 2, the acquisition unit may acquire the potential generated in the electrical path formed between the power supply potential of the electronic device and the ground potential of other electronic devices.
[0010] (Configuration 4) In any of Configurations 1 to 3, the control unit may, when the acquired potential is a second value, transmit or receive a signal via the two second terminals indicating permission to transmit data corresponding to UART communication.
[0011] (Configuration 5) In any of Configurations 1 to 4, if the acquired potential is a third value, the control unit may transmit or receive signals corresponding to SPI communication via two second terminals in addition to the two first terminals.
[0012] (Configuration 6) In any of Configurations 1 to 4, if the acquired potential is the fourth value, the control unit may transmit a signal indicating the charging state of an electronic device or receive a signal indicating the charging state of a second other electronic device via the two second terminals.
[0013] (Configuration 7) In Configuration 6, the control unit may receive signals indicating operations on an operating unit provided on another electronic device via at least a portion of the two second terminals.
[0014] (Configuration 8) In Configuration 6 or 7, the electronic device may further include a third terminal that is electrically connected to yet another terminal from a plurality of terminals provided on the other electronic device. When the electronic device is charging, or at least one of the conditions that the second other electronic device is charging is met, the notification unit of the other electronic device may make a notification based on a signal from the third terminal.
[0015] (Configuration 9) In any of Configurations 1 to 8, the control unit may transmit the device information stored in the EEPROM (Electrically Erasable Programmable Read-Only Memory) to other electronic devices if the acquired potential is a first value.
[0016] (Configuration 10) In any of Configurations 1 to 9, the electronic device may further include a fourth terminal for configuring an electrical path for the acquisition unit to acquire potential, and a fifth terminal for configuring another electrical path for the other electronic device to acquire potential when the electronic device is wired to another electronic device.
[0017] (Configuration 11) In any of Configurations 1 to 10, the electronic device may further include a transmitting unit that transmits the acquired potential to an external electronic device. The control unit may determine the type of communication to transmit or receive a signal based on information from the external electronic device based on the acquired potential.
[0018] (Configuration 12) A system according to this embodiment includes a first electronic device that can be wired to each of a plurality of other different electronic devices, and a second electronic device that is one of the plurality of other different electronic devices. The first electronic device includes a control unit, an acquisition unit that acquires the potential generated when wired to the second electronic device, and two first terminals that are electrically connected to two of a plurality of terminals provided on the second electronic device. The control unit transmits or receives a signal corresponding to I2C communication via the two first terminals when the acquired potential is a first value, transmits or receives a signal corresponding to UART communication via the two first terminals when the acquired potential is a second value, and transmits or receives a signal corresponding to SPI communication via the two first terminals when the acquired potential is a third value.
[0019] (Configuration 13) According to this embodiment, a program executed on an electronic device that can be wired-connected to each of a plurality of different other electronic devices is provided. The electronic device includes two first terminals that are respectively electrically connected to two of the plurality of terminals provided on the other electronic device. The program causes the electronic device to perform a process of acquiring a potential that occurs when wired-connected to the other electronic device, and when the acquired potential is a first value, to transmit or receive a signal corresponding to I2C communication via the two first terminals, and when the acquired potential is a second value, to transmit or receive a signal corresponding to UART communication via the two first terminals, and when the acquired potential is a third value, to transmit or receive a signal corresponding to SPI communication via the two first terminals.
Brief Description of the Drawings
[0020] [Figure 1] It is a schematic diagram showing a configuration example of a system according to this embodiment. [Figure 2] It is a schematic diagram showing another configuration example of a system according to this embodiment. [Figure 3] It is a schematic diagram showing yet another configuration example of a system according to this embodiment. [Figure 4] It is a schematic diagram showing a hardware configuration example of a controller according to this embodiment. [Figure 5] It is a schematic diagram showing a hardware configuration example of a main body device according to this embodiment. [Figure 6] It is a schematic diagram showing a hardware configuration example of an attachment according to this embodiment. [Figure 7] It is a schematic diagram showing a hardware configuration example of an attachment according to this embodiment. [Figure 8] It is a schematic diagram showing an example of a state where a controller according to this embodiment is attached to a main body device. [Figure 9] It is a diagram for explaining an example of processing when a controller according to this embodiment is attached to a main body device. [Figure 10]It is a schematic diagram showing an example of a state where a controller according to the present embodiment is attached to an attachment. [Figure 11] It is a diagram for explaining an example of processing when a controller according to the present embodiment is attached to an attachment. [Figure 12] It is a schematic diagram showing an example of a state where a controller according to the present embodiment is attached to an attachment. [Figure 13] It is a schematic diagram showing an example of a state where a controller according to the present embodiment is attached to an attachment. [Figure 14] It is a schematic diagram showing an example of a state where a controller according to the present embodiment is attached to an attachment.
Embodiment for Carrying Out the Invention
[0021] The present embodiment will be described in detail with reference to the drawings. For the same or corresponding parts in the drawings, the same reference numerals are given and the description thereof will not be repeated.
[0022] [A. Configuration Example of the System] First, a configuration example of the system according to the present embodiment will be described. Hereinafter, an application example to a game system will be described, but the technical idea of the present disclosure is applicable to any electronic device.
[0023] The game system includes one or more controllers. A controller is an example of an electronic device. As exemplified below, a controller can be wired-connected to each of a plurality of different other electronic devices.
[0024] FIG. 1 is a schematic diagram showing a configuration example of a system 1 according to the present embodiment. Referring to FIG. 1, the system 1 includes, in addition to one or more controllers 1, another example of an electronic device, a main body device 200. Two controllers 100 are detachably attached to the main body device 200.
[0025] The controller 100 has a connector 102 that includes one or more terminals. When the controller 100 is mounted on the main unit 200, one or more terminals of the connector 102 of the controller 100 are electrically connected to the corresponding terminals of the connector 202 of the main unit 200. The controller 100 is wired to the main unit 200 via connectors 102 and 202.
[0026] The controller 100 has an operating section such as a button, switch, or stick, and transmits a signal to the main unit 200 indicating the user's operation on the operating section. The controller 100 may also have an actuator such as a vibration motor. The controller 100 may drive the actuator according to a signal from the main unit 200.
[0027] The controller 100 may have a battery. When the controller 100 is attached to the main unit 200, power to charge the controller 100's battery may be supplied from the main unit 200.
[0028] Figure 2 is a schematic diagram showing another configuration example of System 1 according to this embodiment. Referring to Figure 2, the controller 100 may be detachable from the attachment 300. The attachment 300 is another example of electronic equipment. For example, the attachment 300 includes a sensor (see sensor 320 in Figure 6, for example). The connector 102 of the controller 100 is electrically connected to the connector 302 of the attachment 300. Connectors 102 and 302 provide a wired connection between the controller 100 and the attachment 300.
[0029] Connectors 102 and 302 allow the controller 100 to utilize the sensors on the attachment 300. For example, if an external force is applied to the ring-shaped attachment 300 and it deforms, the controller 100 obtains a signal from the sensors on the attachment 300 corresponding to that deformation.
[0030] Figure 3 is a schematic diagram showing yet another configuration example of System 1 according to this embodiment. Referring to Figure 3, one or more controllers 100 may be detachably attached to each attachment 400. Attachment 400 is another example of electronic equipment. Connector 102 of controller 100 is electrically connected to connector 402L (or connector 402R) of attachment 400. Connectors 402L and 402R are also collectively referred to as "connector 402". Through connectors 102 and 402, controller 100 is wired to attachment 400. Through connectors 102 and 402, attachment 400 can also supply at least a portion of the power supplied from an external power supply 4 to controller 100.
[0031] The connector 102 of the controller 100 may be used for wired communication with other electronic devices, or for power supply from other electronic devices. If the connector 102 includes multiple terminals, some of the terminals may be used for wired communication and others for power supply.
[0032] [B. Hardware Configuration Example] Next, an example of the hardware configuration of the electronic equipment included in System 1 according to this embodiment will be described.
[0033] (b1: Controller 100) Figure 4 is a schematic diagram showing an example of the hardware configuration of the controller 100 according to this embodiment. For the sake of explanation, Figure 4 shows an example of a part of the hardware configuration of the controller 100.
[0034] Referring to Figure 4, the controller 100 includes a control circuit 110, a battery 120, an operating unit 122, a sensor 124, an actuator 126, and a wireless communication circuit 130.
[0035] The control circuit 110 performs the necessary processing in the controller 100. The control circuit 110 includes a processor 112, a volatile memory 114, a non-volatile memory 116, and an interface circuit 118.
[0036] The processor 112 sequentially loads the necessary programs stored in the non-volatile memory 116 or the like into the volatile memory 114 and executes them. The volatile memory 114 may be, for example, DRAM (Dynamic Random Access Memory) or SRAM (Static Random Access Memory). The non-volatile memory 116 may be, for example, flash memory or EEPROM (Electrically Erasable Programmable Read-Only Memory). The non-volatile memory 116 may store the system program 1160 and device information 1162. The system program 1160 may be stored in flash memory. The device information 1162 may be stored in EEPROM. The device information 1162 includes, for example, the model, color, and serial number of the controller 100.
[0037] The processing described later in the controller 100 is achieved, for example, by the processor 112 executing the system program 1160.
[0038] The interface circuit 118 is responsible for exchanging signals with electronic devices connected via the connector 102. The interface circuit 118 may support multiple communication methods.
[0039] The control circuit 110 may be mounted on a single board or may consist of a combination of multiple boards.
[0040] The battery 120 supplies power to various parts of the controller 100. The battery 120 may be charged by power supplied via the connector 102.
[0041] The control unit 122 outputs a signal indicating user operation to the control circuit 110. The sensor 124 outputs a signal indicating the behavior of the controller 100 to the control circuit 110. The actuator 126 provides tactile stimuli to the user according to the signal from the control circuit 110.
[0042] The wireless communication circuit 130 is responsible for exchanging wireless signals with the main unit 200 and one or more other devices. The wireless communication circuit 130 may support wireless networks such as Bluetooth®, ZigBee®, or wireless LAN (IEEE 802.11 standard).
[0043] The controller 100 may have an active state and a sleep state in which power consumption is lower than that of the active state. When predetermined conditions are met, the controller 100 returns from the sleep state to the active state.
[0044] (b2: Main unit 200) Figure 5 is a schematic diagram showing an example of the hardware configuration of the main unit 200 according to this embodiment. For the sake of explanation, Figure 5 shows an example of a part of the hardware configuration of the main unit 200.
[0045] Referring to Figure 5, the main unit 200 includes a control circuit 210, an interface circuit 218, a battery 220, a wireless communication circuit 230, and a USB (Universal Serial Bus) controller 229.
[0046] The control circuit 210 performs necessary processing in the main unit 200. The control circuit 210 includes a processor 212, a volatile memory 214, and a storage 216. The processor 212 and volatile memory 214 are the same as the processor 112 and volatile memory 114 described above.
[0047] The storage 216 may be, for example, flash memory or an HDD (Hard Disk Drive). The storage 216 may store the system program 2160 and the application program 2162.
[0048] The interface circuit 218 is responsible for exchanging signals with electronic devices connected via the connector 202. The interface circuit 218 may support multiple communication methods. The main unit 200 includes two sets of interface circuits 218 and connectors 202. The two interface circuits 218 may operate independently of each other.
[0049] The battery 220 supplies power to various parts of the main unit 200. The battery 220 may supply power to electronic devices connected via the connector 202, or it may be charged by power supplied from an external power source.
[0050] The USB controller 229 is responsible for exchanging signals with USB-connected electronic devices (e.g., controller 100). The USB controller 229 can also exchange power via the USB connection.
[0051] The wireless communication circuit 230 is responsible for exchanging wireless signals with one or more controllers 100 or one or more other devices. The wireless communication circuit 230 may support wireless networks such as Bluetooth, ZigBee, or Wi-Fi (IEEE 802.11 standard).
[0052] The main unit 200 may have an active state and a sleep state in which power consumption is lower than that of the active state. When predetermined conditions are met, the main unit 200 returns from the sleep state to the active state.
[0053] (b3: Attachment 300) Figure 6 is a schematic diagram showing an example of the hardware configuration of attachment 300 according to this embodiment. For the sake of explanation, Figure 6 shows an example of a part of the hardware configuration of attachment 300.
[0054] Referring to Figure 6, the attachment 300 includes a control circuit 310 and a sensor 320.
[0055] The control circuit 310 performs the necessary processing in the attachment 300. The control circuit 310 is responsible for exchanging signals with the electronic equipment connected via the connector 302. The control circuit 310 may support one communication scheme. The control circuit 310 may receive power from the electronic equipment connected via the connector 302.
[0056] The sensor 320 detects predetermined mechanical or physical changes and outputs a signal indicating the detected value to the control circuit 310.
[0057] (b4: Attachment 400) Figure 7 is a schematic diagram showing an example of the hardware configuration of attachment 400 according to this embodiment. For the sake of explanation, Figure 7 shows an example of a part of the hardware configuration of attachment 400.
[0058] The attachment 400A shown in Figure 7(A) includes a USB controller 410. The USB controller 410 supplies power, which is provided via the USB connection, to the electronic device connected to the connector 402.
[0059] The attachment 400B shown in Figure 7(B) further includes a control circuit 450 compared to the attachment 400A shown in Figure 7(A). The control circuit 450 is responsible for processing data exchange with USB-connected electronic devices, as well as processing data exchange with electronic devices connected via connector 402. For example, the attachment 400B shown in Figure 7(B) can also acquire the charging status of electronic devices connected via connector 402.
[0060] In the following explanation, attachments 400A and 400B will also be collectively referred to as "attachment 400".
[0061] [C. Communication method] In System 1 according to this embodiment, the controller 100 may select a specific communication method from among several communication methods when exchanging data with wired electronic devices (for example, the main unit 200, attachment 300, attachment 400, etc.).
[0062] Multiple communication methods may include, for example, at least two of the following: I2C (Inter Integrated Circuit), UART (Universal Asynchronous Receiver Transmitter), and SPI (Serial Peripheral Interface).
[0063] I2C is a serial bus communication method that uses two signal lines. These two signal lines transmit the serial clock (SCL) and serial data (SDA), respectively.
[0064] UART is an asynchronous serial communication method that uses two signal lines. These two signal lines transmit data (TXD) and data (RXD), respectively. In addition to the two signal lines, a control line (RTS: Request To Send) to authorize data transmission from the communication partner and a control line (CTS: Clear To Send) to receive permission to transmit data from the communication partner may also be used.
[0065] SPI is a serial bus that uses four signal lines. These four signal lines transmit slave select (CS), serial clock (CLK), master-in-slave-out (MISO), and master-out-slave-in (MOSI), respectively.
[0066] In system 1 according to this embodiment, communication may be performed using a selected communication method from among several communication methods, by using multiple terminals included in the connector in common. The ports of the control circuit 110 of the controller 100 may transmit or receive signals according to the selected communication method. By using multiple terminals in common, it is not necessary to prepare separate terminals or ports for each communication method. The process of selecting a communication method from among several communication methods will be described later.
[0067] [D. Example of processing] Next, we will describe some examples of the process when electronic devices are attached to or detached from the controller 100.
[0068] (d1: When the controller 100 is attached to the main unit 200) Once the controller 100 is attached to the main unit 200, communication between the controller 100 and the main unit 200 may begin via I2C and USB. Generally, the time required to start I2C communication is shorter than the time required to start USB communication. On the other hand, the communication speed via I2C (e.g., a maximum of 3.4 Mbps) is lower than the communication speed via USB (e.g., 12 Mbps or more). Therefore, immediately after the controller 100 is attached to the main unit 200, I2C communication may be used primarily, and thereafter, USB communication may be used primarily.
[0069] In I2C communication, the main unit 200 operates as the master, and the controller 100 operates as the slave.
[0070] Figure 8 is a schematic diagram showing an example of a controller 100 according to this embodiment being mounted on the main unit 200.
[0071] Referring to Figure 8, the connector 102 of the controller 100 includes terminals T1 to T6 1021 to 1026, a power input terminal 1027, a power output terminal 1028, and a USB terminal 1029.
[0072] The interface circuit 118 of the controller 100 includes an ADC (Analog-Digital Converter) port 1182, GPIO (General Purpose Input Output) ports 1183 and 1184, communication ports 1185 and 1186, and a USB port 1189.
[0073] The T2 terminal 1022 is used to identify electronic equipment attached to the controller 100. The T2 terminal 1022 is electrically connected to the ADC port 1182 of the interface circuit 118. The wiring electrically connecting the T2 terminal 1022 and the ADC port 1182 is electrically connected to the power supply potential 132 via a resistor 133. This ensures that the T2 terminal 1022 is maintained at the power supply potential 132 of the controller 100 when not electrically connected to other terminals. The ADC port 1182 samples an analog input (e.g., potential) and converts it into a digital signal. The ADC port 1182 acquires the potential of the input signal. The ADC port 1182 may have, for example, an 8-level resolution. For example, if the input range of the ADC port 1182 is 0 to 5V, a 0 to 7 level value is determined depending on which of the intervals divided into 0.625V (5V / 8 levels) the input signal falls into.
[0074] The ADC port 1182 (or control circuit 110) acquires the potential generated when the controller 100 is wired to another electronic device. Terminal T2 1022 may be used to configure an electrical path for the ADC port 1182 (or control circuit 110) to acquire the potential. Depending on the other electronic device attached to the controller 100, the circuits of the other electronic device may be designed so that the potential (or acquired grayscale value) acquired by the ADC port 1182 is a different value from that of the other electronic device. Examples of the circuits of other electronic devices will be described later.
[0075] Furthermore, the "potential" acquired by the ADC port 1182 can also be interpreted as "voltage (or potential difference) relative to the ground potential of the controller 100."
[0076] Terminal T1 1021 is electrically connected to the ground potential 131 of the controller 100. This maintains the potential of terminal T1 1021 at the ground potential 131 of the controller 100. Terminal T1 1021 may also be used to configure an alternative electrical path for other electronic devices to obtain potential when the controller 100 is wired to such devices. For example, the GPIO(1) port 2181 (or control circuit 210) of the main unit 200 may detect changes in potential occurring in the electrical path including terminal T1 1021. Further details will be described later.
[0077] T3 terminal 1023 and T4 terminal 1024 are electrically connected to GPIO(3) port 1183 and GPIO(4) port 1184, respectively. Depending on the configuration, GPIO(3) port 1183 and GPIO(4) port 1184 can function as either input ports that receive signals from other electronic devices or output ports that output signals to other electronic devices. For example, GPIO(3) port 1183 and GPIO(4) port 1184 can input or output two values: Low (hereinafter also abbreviated as "L") and High (hereinafter also abbreviated as "H").
[0078] In this embodiment, GPIO(3) port 1183 is configured as an input port. T3 terminal 1023 and GPIO(3) port 1183 receive signals from other electronic devices to return from sleep state to active state. T3 terminal 1023 and GPIO(3) port 1183 may also receive communication request signals from other electronic devices. In this case, an H signal may indicate that there is a communication request, and an L signal may indicate that there is no communication request.
[0079] In this embodiment, GPIO(4) port 1184 is configured as an output port. T4 terminal 1024 and GPIO(4) port 1184 output signals to other electronic devices to wake them from sleep mode to active mode. Alternatively, T4 terminal 1024 and GPIO(4) port 1184 may output signals to other electronic devices indicating that communication is possible. In this case, an H signal may indicate that communication is possible, and an L signal may indicate that communication is not possible.
[0080] Thus, terminals T3 1023 and T4 1024 are used to control the return from sleep state to active state. Terminals T3 1023 and T4 1024 may also be used to notify the communication status.
[0081] Terminals T5 1025 and T6 1026 are electrically connected to communication ports 1185 and 1186, respectively. Additionally, terminals T5 1025 and T6 1026 are electrically connected to two terminals (T5 2025 and T6 2026) from a set of terminals provided on other electronic devices. Communication ports 1185 and 1186 receive signals corresponding to the selected communication method and output signals corresponding to the selected communication method.
[0082] More specifically, in I2C communication, the serial clock is transmitted via the path of communication port 1185, T5 terminal 1025, T5 terminal 2025, and communication port 2185. Serial data is transmitted via the path of communication port 1186, T6 terminal 1026, T6 terminal 2026, and communication port 2186.
[0083] In this manner, the control circuit 110 of the controller 100 transmits or receives signals indicating a communication request and a communication-ready state via terminals T4 1024 and T3 1023, and transmits or receives signals corresponding to I2C communication via terminals T5 1025 and T6 1026.
[0084] The clock stretching function in I2C communication may be implemented by sending or receiving communication request and communication readiness signals using GPIO(3) port 1183 and GPIO(4) port 1184. For example, a controller 100 operating as a slave may send a communication readiness signal after the data to be sent is ready. When the main unit 200 operating as a master receives a signal indicating that communication is not possible, the main unit 200 interrupts the transmission of the serial clock. This prevents situations where the data to be sent by the controller 100 is not ready in time for the timing requested by other electronic devices (in this example, the main unit 200).
[0085] The power input terminal 1027 is used to receive power from other electronic devices. The power input terminal 1027 is electrically connected to the interface circuit 118 via the power bus 137.
[0086] The power output terminal 1028 is used to supply power to other electronic devices. The power output terminal 1028 is electrically connected to the power output 138 of the controller 100. The power output 138 is electrically connected to the battery 120 of the controller 100 (see Figure 4). A switch 136 is provided in the wiring between the power output 138 and the power output terminal 1028. The switch 136 can electrically disconnect the power output 138 and the power output terminal 1028.
[0087] USB port 1189 is an interface for USB connection to other electronic devices. USB terminal 1029 is electrically connected to USB port 1189. USB terminal 1029 may include multiple terminals.
[0088] On the other hand, the connector 202 of the main unit 200 includes T1-T6 terminals 2021-2026, a power output terminal 2027, a power input terminal 2028, and a USB terminal 2029.
[0089] The interface circuit 218 of the main unit 200 includes a GPIO(1) port 2181, a GPIO(3) port 2183, a GPIO(4) port 2184, communication ports 2185 and 2186, and a USB port 2189.
[0090] Terminal T1 2021 is used to identify electronic devices attached to the main unit 200. Terminal T1 2021 is electrically connected to GPIO(1) port 2181 of the interface circuit 218.
[0091] Terminal T2 2022 is electrically connected to the ground potential 241 of the main unit 200. As a result, the potential of terminal T2 1022 is maintained at the ground potential 241 of the main unit 200.
[0092] T3 terminal 2023 and T4 terminal 2024 are electrically connected to GPIO(3) port 2183 and GPIO(4) port 2184, respectively.
[0093] Terminals T5 2025 and T6 2026 are electrically connected to communication ports 2185 and 2186, respectively. Communication ports 2185 and 2186 receive signals according to the selected communication method and output signals according to the selected communication method.
[0094] The power output terminal 2027 is used to supply power to other electronic devices. The power output terminal 2027 is electrically connected to the power output 247 of the main unit 200. The power output 247 is electrically connected to the battery 220 (see Figure 5) of the main unit 200. A switch 243 is provided in the wiring between the power output 247 and the power output terminal 2027. The switch 243 can electrically disconnect the power output 247 and the power output terminal 2027.
[0095] USB port 2189 is electrically connected to USB controller 229. USB terminal 2029 is electrically connected to USB controller 229. USB terminal 2029 may include multiple terminals. USB controller 229 may function as a USB hub for electronic devices connected to the main unit 200 and electronic devices connected via USB terminal 2029.
[0096] The following describes an example of processing when the controller 100 is attached to the main unit 200. Figure 9 is a diagram illustrating an example of processing when the controller 100 according to this embodiment is attached to the main unit 200. In the main unit 200, GPIO(3) port 2183 is set as an output port, and GPIO(4) port 2184 is set as an input port.
[0097] Referring to Figure 9, when the controller 100 is attached to the main unit 200, the T1 terminal 1021 of the controller 100 and the T1 terminal 2021 of the main unit 200 are electrically connected, so the GPIO(1) port 2181 detects the ground potential 131 (i.e., L) (step S2).
[0098] The main unit 200 determines that the controller 100 has been installed when the GPIO(1) port 2181 detects the ground potential 131 (step S2). Next, the main unit 200 closes the switch 243. This electrically connects the power output 247 and the power output terminal 2027 (step S4).
[0099] The controller 100 determines that the main unit 200 or attachment 400 is connected when the potential of the power output is generated on the power bus 137 (step S6).
[0100] Since the T2 terminal 1022 of the controller 100 and the T2 terminal 2022 of the main unit 200 are electrically connected, an electrical path is established between the power supply potential 132 of the controller 100 and the ground potential 241 of the main unit 200. The controller 100 acquires the potential that occurs in this path. Since most of the voltage drop from the power supply potential 132 to the ground potential 241 occurs across the resistor 133, the ADC port 1182 of the controller 100 acquires the ground potential 241 (step S8).
[0101] The controller 100 determines that it is attached to the main unit 200 when the ADC port 1182 acquires the ground potential 241. As will be described later, when the controller 100 is attached to attachment 300 or attachment 400, the potential acquired by the ADC port 1182 will be different.
[0102] Through the above process, the controller 100 and the main unit 200 identify each other. When the controller 100 and the main unit 200 are connected, the controller 100 and the main unit 200 are pre-configured or designed to select I2C as the communication method.
[0103] The controller 100 sets the communication ports 1185 and 1186 to an operating mode that supports I2C (step S10). The main unit 200 sets the communication ports 2185 and 2186 to an operating mode that supports I2C (step S12).
[0104] The main unit 200 changes the output signal of GPIO(3) port 2183 from L to H (step S14). When the controller 100 detects that the signal input to GPIO(3) port 1183 has changed from L to H (step S16), it prepares data to send to the main unit 200 (step S18). For example, the controller 100 includes the device information 1162 stored in the non-volatile memory 116 in the data to send to the main unit 200.
[0105] The controller 100 changes the output signal of GPIO(4) port 1184 from L to H (step S20). When the main unit 200 detects that the signal input to GPIO(4) port 2184 has changed from L to H (step S22), it starts I2C communication using communication ports 2185 and 2186 (step S24). In other words, I2C communication is started between the controller 100 and the main unit 200.
[0106] When the main unit 200 completes the transmission and reception of data, it changes the output signal of GPIO(3) port 2183 from H to L (step S26). When the controller 100 detects that the signal input to GPIO(3) port 1183 has changed from H to L (step S28), it changes the output signal of GPIO(4) port 1184 from H to L (step S30). When the main unit 200 detects that the signal input to GPIO(4) port 2184 has changed from H to L (step S32), it resets the I2C communication using communication ports 2185 and 2186 (step S34). The controller 100 also resets the I2C communication using communication ports 1185 and 1186 (step S36).
[0107] Each time I2C communication occurs, the series of processes from steps S14 to S36 may be repeated.
[0108] The controller 100 transmits information including the potential value acquired at the ADC port 1182 (in the example above, the value indicating the ground potential) to the main unit 200 using the USB port 1189 (step S40). When the main unit 200 receives information including the potential value from the controller 100 using the USB port 2189, it identifies that the controller 100 is installed in the main unit 200 based on the received potential value (step S42). The main unit 200 may switch to a predetermined mode corresponding to the connection with the controller 100. The main unit 200 starts USB communication with the controller 100 (step S44).
[0109] Note that the processes in steps S40 to S44 only need to be executed after step S8, and there is no need to wait until the processes in steps S10 to S36 are completed.
[0110] Next, we will explain an example of what happens when the controller 100 is removed from the main unit 200.
[0111] When the controller 100 is removed from the main unit 200, the electrical connection between the T1 terminal 2021 of the main unit 200 and the T1 terminal 1021 of the controller 100 is lost. As a result, the potential detected by the GPIO(1) port 2181 of the main unit 200 changes from ground potential to floating potential. In other words, the GPIO(1) port 2181 can no longer detect L. The main unit 200 determines that the controller 100 has been removed based on the change in the detected potential. Subsequently, the main unit 200 opens the switch 243.
[0112] When the controller 100 is removed from the main unit 200, the controller 100 detects the cessation of power supply from the main unit 200. The controller 100 also detects a change from ground potential to power potential based on the potential acquired by the ADC port 1182. For example, the controller 100 may determine that it has been removed from the main unit 200 when power supply from the main unit 200 is stopped and the ADC port 1182 is acquiring the power potential.
[0113] Furthermore, the controller 100 does not need to determine that the controller 100 has been removed from the main unit 200 if the main unit 200 is in a sleep state and the battery level of the main unit 200 is below a predetermined value. In other words, the controller 100 may determine that it is still attached to the main unit 200 in that state.
[0114] As a variation, after the controller 100 and the main unit 200 have identified each other as compatible devices, if the controller 100 enters a sleep state, the controller 100 may be returned to an active state by pressing a power button (not shown) on the main unit 200. Even when the controller 100 is in a sleep state, the GPIO(3) port 1183 remains enabled. When the power button is pressed, the main unit 200 changes the output signal of the GPIO(3) port 2183 from L to H. Upon detection that the signal input to the GPIO(3) port 1183 has changed from L to H, the controller 100 returns from the sleep state to the active state. The controller 100 and the main unit 200 then perform the same processing as in steps S16 and below in Figure 9.
[0115] As a variation, if the controller 100 and the main unit 200 enter a sleep state after identifying each other, the main unit 200 may be returned to an active state by pressing a specific button (not shown) on the controller 100. Even when the main unit 200 is in a sleep state, the GPIO(4) port 2184 is enabled. When the predetermined button is pressed, the controller 100 changes the output signal of the GPIO(4) port 1184 from L to H. Upon detection that the signal input to the GPIO(4) port 2184 has changed from L to H, the main unit 200 returns from the sleep state to the active state. The main unit 200 then changes the output signal of the GPIO(3) port 2183 from L to H. After that, the controller 100 and the main unit 200 perform the same processing as in steps S16 and below in Figure 9.
[0116] Although the main unit 200 can be fitted with two controllers 100, the above-described process may be performed for each fitted controller 100. That is, when two controllers 100 are fitted to the main unit 200, each controller 100 may perform the above-described process independently of the others.
[0117] (d2: When controller 100 is attached to attachment 300) When the controller 100 is attached to the attachment 300, the controller 100 may start UART communication with the attachment 300. The attachment 300 is configured to enable UART communication.
[0118] Figure 10 is a schematic diagram showing an example of a controller 100 according to this embodiment being mounted on the attachment 300. The configuration of the controller 100 has been described above, so a detailed explanation will not be repeated.
[0119] Referring to Figure 10, the connector 302 of the attachment 300 includes terminals T1 to T6 3021 to 3026 and a power input terminal 3027.
[0120] The control circuit 310 of attachment 300 includes communication control ports 3103 and 3104, and communication ports 3105 and 3106.
[0121] Terminal T1 3021 does not need to be electrically connected to the component. Terminal T2 3022 is used to identify that the controller 100 is mounted on the attachment 300. Terminal T2 3022 is electrically connected to the ground potential 321 of the attachment 300 via resistor 322.
[0122] Terminals T3 3023 and T4 3024 are electrically connected to communication control ports 3103 and 3104, respectively. Communication control ports 3103 and 3104 are used for transmitting or receiving control lines (RTS and CTS) for UART communication.
[0123] Terminals T5 3025 and T6 3026 are electrically connected to communication ports 3105 and 3106, respectively. Communication ports 3105 and 3106 are used for transmitting or receiving data (TXD and RXD) via UART.
[0124] The power input terminal 3027 is used to receive power from other electronic devices. The power input terminal 3027 is electrically connected to the control circuit 310 via the power bus 327.
[0125] The following describes an example of the process when the controller 100 is attached to the attachment 300.
[0126] Figure 11 is a diagram illustrating an example of processing when the controller 100 according to this embodiment is attached to the attachment 300. In the controller 100, GPIO(3) port 1183 is set as an input port, and GPIO(4) port 1184 is set as an output port. The controller 100 is wirelessly connected to the main unit 200.
[0127] Referring to Figure 11, when the controller 100 is attached to the attachment 300, the T2 terminal 1022 of the controller 100 and the T2 terminal 3022 of the attachment 300 are electrically connected. This connection establishes an electrical path between the power supply potential 132 of the controller 100 and the ground potential 321 of the attachment 300. The controller 100 acquires the potential generated in this path. Since the voltage drop from the power supply potential 132 to the ground potential 321 is divided proportionally between the resistors 133 and 322, the ADC port 1182 of the controller 100 acquires potentials corresponding to the resistors 133 and 322 (step S102). Specifically, the acquired potential is obtained by multiplying the power supply potential 132 by the ratio of the resistance value of resistor 322 to the sum of the resistance values of resistor 133 and resistor 322.
[0128] The controller 100 transmits information including the acquired potential value to the main unit 200 (step S104). For example, the controller 100 uses the wireless communication circuit 130 to transmit the potential acquired by the ADC port 1182 to the main unit 200, which is an example of an external electronic device.
[0129] When the main unit 200 receives information including the potential value from the controller 100 via wireless connection, it identifies that the attachment 300 is attached to the controller 100 based on the received potential value (step S106). The main unit 200 transmits the identification result that the attachment 300 is attached to the controller 100 to the controller 100 (step S108).
[0130] When the controller 100 receives the identification result from the main unit 200 (step S110), it closes the switch 136. That is, the controller 100 electrically connects the power output terminal 1028 and the power input terminal 3027 (step S112). This starts the power supply to the attachment 300.
[0131] When the controller 100 and the attachment 300 are connected, the controller 100 is pre-configured or designed to select UART as the communication method. Depending on the identification result that the attachment 300 is installed, the controller 100 sets GPIO ports 1183, 1184 and communication ports 1185, 1186 to an operating mode that corresponds to UART (step S114).
[0132] Specifically, GPIO(3) port 1183 is responsible for the control line (CTS), GPIO(4) port 1184 is responsible for the control line (RTS), communication port 1185 is responsible for receiving received data (RXD), and communication port 1186 is responsible for transmitting transmitted data (TXD).
[0133] Attachment 300 is designed to communicate via UART. Subsequently, UART communication is initiated between the controller 100 and attachment 300.
[0134] In this way, the controller 100 determines the type of communication to transmit or receive signals based on information from external electronic equipment that is based on the acquired potential.
[0135] Meanwhile, the attachment 300 starts processing in response to the power supply from the controller 100. For example, the attachment 300 changes the control line (RTS) of the communication control port 3103 from H to L (step S116). The L signal output by the communication control port 3103 indicates that the attachment 300 is able to receive data from the controller 100.
[0136] When the controller 100 detects that the signal input to GPIO(3) port 1183 (corresponding to CTS) has changed from H to L (step S118), it changes the output signal of GPIO(4) port 1184 (corresponding to RST) from H to L (step S120). The L signal output by GPIO(4) port 1184 indicates that the controller 100 is able to receive data from the attachment 300.
[0137] Attachment 300 detects that the control line (CTS) of communication control port 3104 has changed from H to L (step S122). Subsequently, attachment 300 starts UART communication using communication ports 3105 and 3106 (step S124). Communication port 3105 of attachment 300 sends data to controller 100, and communication port 1185 of controller 100 receives the data. Also, communication port 1185 of controller 100 sends data to attachment 300, and communication port 3106 of attachment 300 receives the data.
[0138] When attachment 300 has finished transmitting and receiving data, it changes the control line (RTS) of communication control port 3103 from L to H (step S126). When controller 100 detects that the signal input to GPIO(3) port 1183 has changed from L to H (step S128), it changes the output signal (corresponding to RST) of GPIO(4) port 1184 from L to H (step S130).
[0139] If data transmission and reception occur between the controller 100 and the attachment 300, the processes in steps S116 to S130 are repeated.
[0140] During transmission and reception between the controller 100 and the attachment 300, the control circuit 110 of the controller 100 transmits or receives signals (RTS and CTS) indicating permission to transmit data corresponding to UART communication via terminals T4 1024 and T3 1023, and transmits or receives signals (TXD and RXD) corresponding to UART communication via terminals T5 1025 and T6 1026.
[0141] Next, we will explain an example of what happens when the controller 100 is removed from the attachment 300.
[0142] When the controller 100 is removed from the attachment 300, the potential acquired at the ADC port 1182 changes from the potential corresponding to resistors 133 and 322 to the power supply potential. The controller 100 transmits information including the acquired potential value to the main unit 200. The main unit 200 determines from the acquired potential change that the controller 100 has been removed from the attachment 300. The main unit 200 notifies the controller 100 that it has been removed from the attachment 300. Subsequently, the controller 100 opens the switch 136.
[0143] When the controller 100 is removed, the attachment 300 stops operating because it is no longer supplied with power from the controller 100.
[0144] (d3: When the controller 100 is attached to a modified version of the attachment 300) When the controller 100 is attached to the attachment 300A, the controller 100 may start SPI communication with the attachment 300A. The attachment 300A is configured to enable SPI communication.
[0145] Figure 12 is a schematic diagram showing an example of a controller 100 according to this embodiment being mounted on attachment 300A.
[0146] The attachment 300 shown in Figure 12 is configured to enable communication via SPI. The connector 302 of attachment 300A includes terminals T1 to T6 3021 to 3026 and a power input terminal 3027, as well as terminal T7 3020.
[0147] The connector 102 of the controller 100 shown in Figure 12 further includes a T7 terminal 1020. The interface circuit 118 of the controller 100 further includes a GPIO(7) port 1190.
[0148] The control circuit 310 of attachment 300A shown in Figure 12 includes communication ports 3123, 3124, 3125, and 3126, and an interrupt port 3130.
[0149] Communication port 3123 is electrically connected to terminal T3 3023 and transmits a slave select signal. Communication port 3124 is electrically connected to terminal T4 3024 and receives a serial clock signal. Communication port 3125 is electrically connected to terminal T5 3025 and transmits or receives a master-in slave-out signal. Communication port 3126 is electrically connected to terminal T6 3026 and transmits or receives a master-out slave-in signal.
[0150] Interrupt port 3130 is electrically connected to terminal T7 3020 and transmits an interrupt signal. The GPIO(7) port 1190 of controller 100 is electrically connected to the T7 terminal 1020 and receives interrupt signals from attachment 300A.
[0151] The following describes an example of the process when the controller 100 is attached to the attachment 300A.
[0152] In the attachment 300A shown in Figure 12, a resistor 324 is provided between the T2 terminal 3022 and the ground potential 321. Resistor 324 has a different resistance value than resistor 322 in the attachment 300A shown in Figure 10. When the controller 100 is attached to the attachment 300A, the ADC port 1182 of the controller 100 acquires potentials corresponding to resistors 133 and 324. The controller 100 transmits information including the acquired potential values to the main unit 200 via USB connection or wireless connection.
[0153] The main unit 200 identifies which type of attachment is mounted on the controller 100, depending on the magnitude or range of the potential being acquired. In this case, the main unit 200 identifies that attachment 300A is mounted on the controller 100.
[0154] Depending on the identification result that it is attached to attachment 300A, the controller 100 sets GPIO(3) port 1183 and GPIO(4) port 1184, as well as communication ports 1185 and 1186, to an operating mode that supports SPI.
[0155] Attachment 300A initiates SPI communication between the controller 100 and attachment 300A by sending an interrupt signal from the interrupt port 3130. During transmission and reception between the controller 100 and attachment 300A, the control circuit 110 of the controller 100 transmits or receives signals corresponding to SPI communication via terminals T3 1023 and T4 1024, and terminals T5 1025 and T6 1026.
[0156] Aside from differences in communication methods, the other processing steps are the same as those described above. (d4: When the controller 100 is attached to yet another variation of the attachment 300) When the controller 100 is attached to yet another attachment, the controller 100 may initiate I2C communication with that attachment. The attachment is configured to enable I2C communication. In this case, the control circuit 310 of the attachment 300 may have two GPIO ports and two communication ports, similar to the interface circuit 218 in Figure 8.
[0157] For attachment 300 configured to enable I2C communication, the resistance value of the resistor provided between terminal T2 3022 and ground potential 321 is set to a value different from both the resistance value of resistor 322 and the resistance value of resistor 324.
[0158] By selecting such resistance values, the main unit 200 can identify the attachment connected to the controller 100.
[0159] When the controller 100 receives an identification result indicating that an attachment configured to enable I2C communication has been installed, it sets the communication ports 1185 and 1186 to an operating mode that supports I2C. During transmission and reception between the controller 100 and the attachment, the control circuit 110 of the controller 100 transmits or receives communication request and communication-ready status signals via terminals T4 1024 and T3 1023, and transmits or receives signals corresponding to I2C communication via terminals T5 1025 and T6 1026. The communication process is the same as the process shown in Figure 9.
[0160] (d5: When controller 100 is attached to attachment 400A) When controller 100 is attached to attachment 400A, controller 100 may initiate I2C communication with another controller 100 attached to attachment 400A. Attachment 400A does not have the function of wired communication with other electronic devices. Each controller 100 may initiate USB communication with another electronic device (not shown) connected to attachment 400A.
[0161] Figure 13 is a schematic diagram showing an example of a controller 100 according to this embodiment being mounted on attachment 400A. The configuration of the controller 100 has been described above, so a detailed explanation will not be repeated.
[0162] Referring to Figure 13, connector 402R of attachment 400A includes T1-T6 terminals 402R1-402R6, power output terminal 402R7, power input terminal 402R8, and USB terminal 402R9. Similarly, connector 402L of attachment 400A includes T1-T6 terminals 402L1-402L6, power output terminal 402L7, power input terminal 402L8, and USB terminal 402L9.
[0163] Terminal T1 402R1 is electrically connected to the control terminal of switch 424R. Similarly, terminal T1 402L1 is electrically connected to the control terminal of switch 424L.
[0164] Terminal T2 402R2 is electrically connected to ground potential 446R via resistor 444R. Similarly, terminal T2 402L2 is electrically connected to ground potential 446L via resistor 444L.
[0165] Terminal T3 402R3 is electrically connected to ground potential 442R via switch 440R. Terminal T3 402L3 is electrically connected to ground potential 422L via switch 440L.
[0166] For example, switch 440R may be mechanically connected to a first operating section provided on attachment 400A, and switch 440L may be mechanically connected to a second operating section provided on attachment 400A. In response to an input operation to the first operating section of attachment 400A, switch 440R may be turned on, electrically connecting terminal T3 402R3 and ground potential 442R. In response to an input operation to the second operating section of attachment 400A, switch 440L may be turned on, electrically connecting terminal T3 402L3 and ground potential 442L. The first operating section of attachment 400A may be positioned so that it can be pressed with the user's right hand when the user holds attachment 400A with both hands. The second operating section of attachment 400A may be positioned so that it can be pressed with the user's left hand.
[0167] The controller 100 mounted on the connector 402R side of attachment 400A detects input operations to the first operating section of attachment 400A via GPIO(3) port 1183 when the T3 terminal 402R3 and ground potential 442R are electrically connected via switch 440R. Similarly, the controller 100 mounted on the connector 402L side of attachment 400A detects input operations to the second operating section of attachment 400A via GPIO(3) port 1183 when the T3 terminal 402L3 and ground potential 442L are electrically connected via switch 440L.
[0168] T4 terminal 402R4 is electrically connected to the control terminal of switch 430R. Similarly, T4 terminal 402L4 is electrically connected to the control terminal of switch 430L.
[0169] Terminals T5 402R5 and T6 402R6 are electrically connected to the EEPROM 448. Similarly, terminals T5 402L5 and T6 402L6 are electrically connected to the EEPROM 448. These electrical connections are for each controller 100 to access the EEPROM 448.
[0170] The EEPROM 448 may store device information for the attachment 400, etc. Power output terminal 402R7 is electrically connected to the power bus 414 of the USB controller 410 via switch 424R. Similarly, power output terminal 402L7 is electrically connected to the power bus 414 of the USB controller 410 via switch 424L.
[0171] Power input terminal 402R8 is electrically connected to EEPROM 448. Similarly, power input terminal 402L8 is electrically connected to EEPROM 448.
[0172] The following describes an example of the process when the controller 100 is attached to the attachment 400A.
[0173] When the controller 100 is attached to the connector 402R side of the attachment 400A, the T1 terminal 1021 of the controller 100 and the T1 terminal 402R1 of the attachment 400A are electrically connected. This connection applies a ground potential 131 to the control terminal of the switch 424R. This turns on the switch 424R, and the power bus 414 is electrically connected to the interface circuit 118 via the power output terminal 402R7, the power input terminal 1027, and the power bus 137. In other words, power is supplied from the attachment 400A to the controller 100.
[0174] Furthermore, when the controller 100 is attached to the connector 402R side of the attachment 400A, the ADC port 1182 of the controller 100 acquires potentials corresponding to resistors 133 and 444R. The controller 100 transmits information, including the acquired potential values, to the main unit 200 via USB connection or wireless connection.
[0175] The main unit 200 identifies which type of attachment is mounted on the controller 100, depending on the magnitude or range of the potential being acquired. In this case, the main unit 200 identifies that the controller 100 is mounted on attachment 400A.
[0176] The controller 100 may set the communication ports 1185 and 1186 to an I2C-compatible operating mode depending on the identification result that it is attached to the attachment 400A. Along with setting the communication ports 1185 and 1186 to an I2C-compatible operating mode, the controller 100 may close the switch 136. This supplies power from the power output 138 of the controller 100 to the EEPROM 448 via the power output terminal 1028 and the power input terminal 402R8. The power supplied to the EEPROM 448 may be used for the controller 100 to access the EEPROM 450 via I2C communication.
[0177] Furthermore, the controller 100, upon identifying that it is attached to the attachment 400A, changes the output signal of the GPIO(4) port 1184 from L to H if it is being charged by power from the attachment 400A. Then, the H output signal from the controller 100 is applied to the control terminal of the switch 430R. This turns on the switch 430R, and current flows from the power bus 414 to the ground potential 428 via the LED 426. That is, the LED 426 lights up. The LED 426 is an example of an indicator unit and is positioned to be exposed from the attachment 400A.
[0178] LED426 lights up if at least one of switch 430R or switch 430L is ON. Therefore, when at least one of the following conditions is met—either the controller 100 attached to the connector 402R side of attachment 400A is charging, or the controller 100 connected to the connector 402L side of attachment 400A is charging—LED426 of attachment 400A will provide notification based on a signal output by the GPIO(4) port 1184 of at least one of the controllers 100.
[0179] Thus, if at least one controller 100 attached to the attachment 400A is charging, the LED 426 will light up.
[0180] Furthermore, while the controller 100 is attached to the attachment 400A, power is continuously supplied from the attachment 400A to the controller 100. On the other hand, the controller 100 may decide whether or not to charge the battery (battery 120 in Figure 4) using the power supplied from the attachment 400A, based on the battery's charge status. For example, if the battery is nearly fully charged, the controller 100 may not charge the battery using the power supplied from the attachment 400A. In this case, the output signal of the GPIO(4) port 1184 becomes low, and the LED 426 turns off.
[0181] When the controller 100 is attached to the connector 402L side of attachment 400A, the same processing and operation as when the controller 100 is attached to the connector 402R side of attachment 400A is performed.
[0182] Switches 440R and 440L can also be used to wake the controller 100 from sleep mode to active mode. When switch 440R is operated, it closes, and a low signal is detected at GPIO(3) port 1183 of the controller 100. The detection of low by GPIO(3) port 1183 wakes the controller 100 from sleep mode to active mode. The same applies when switch 440L is operated.
[0183] When only one controller 100 is attached to the attachment 400A, the controller 100 may initiate wireless communication.
[0184] (d6: When controller 100 is attached to attachment 400B) When the controller 100 is attached to the attachment 400B, the controller 100 may initiate I2C communication with the attachment 400B. The attachment 400B is configured to enable I2C communication. Each of the controllers 100 may initiate USB communication with another electronic device (not shown) connected to the attachment 400B.
[0185] Figure 14 is a schematic diagram showing an example of a controller 100 according to this embodiment being mounted on attachment 400B. The configuration of the controller 100 has been described above, so a detailed explanation will not be repeated.
[0186] Attachment 400B has the ability to communicate with other electronic devices via a wired connection. For example, attachment 400B may be configured to enable I2C communication. Alternatively, wired communication may occur between two controllers 100 attached to attachment 400B.
[0187] Referring to Figure 14, connector 402R of attachment 400B includes terminals T1-T6 402R1-402R6 and power output terminal 402R7. Similarly, connector 402L of attachment 400B includes terminals T1-T6 402L1-402L6 and power output terminal 402L7.
[0188] The control circuit 450 includes GPIO ports 451, 453, 454, 461, and 463, communication ports 455 and 456, and USB ports 471 and 472.
[0189] T1 terminal 402R1 is electrically connected to GPIO(R1) port 451. Similarly, T1 terminal 402L1 is electrically connected to GPIO(L1) port 461.
[0190] Terminal T2 402R2 is electrically connected to ground potential 434R via resistor 432R. Similarly, terminal T2 402L2 is electrically connected to ground potential 434L via resistor 432L.
[0191] T3 terminal 402R3 is electrically connected to GPIO(R3) port 453. Similarly, T3 terminal 402L3 is electrically connected to GPIO(L3) port 463.
[0192] T4 terminal 402R4 is electrically connected to GPIO(R4) port 454. Similarly, T4 terminal 402L4 is electrically connected to GPIO(L4) port 464.
[0193] T5 terminals 402R5 and 402L5 are electrically connected to communication port 455. T6 terminals 402R6 and 402L6 are electrically connected to communication port 456.
[0194] Power output terminal 402R7 is electrically connected to the power bus 414 of the USB controller 410 via switch 436R. Similarly, power output terminal 702L7 is electrically connected to the power bus 414 of the USB controller 410 via switch 436L.
[0195] The USB port 471 of the control circuit 450 is electrically connected to the USB port 412 of the USB controller 410. The USB port 472 of the control circuit 450 is electrically connected to the CC (Configuration Channel) port 416 of the USB controller 410.
[0196] The following describes an example of the process when the controller 100 is attached to the attachment 400B.
[0197] When the controller 100 is attached to the connector 402R side of the attachment 400B, the T1 terminal 1021 of the controller 100 and the T1 terminal 402R1 of the attachment 400B are electrically connected, and the GPIO(R1) port 451 detects a ground potential of 131 (i.e., L). The attachment 400B determines that the controller 100 has been attached to the connector 402R side by detecting the ground potential of 131 at the GPIO(R1) port 451. Subsequently, the attachment 400B closes the switch 436R. This enables the power supply to the controller 100.
[0198] Furthermore, when the controller 100 is attached to the connector 402R side of the attachment 400B, the T2 terminal 1022 of the controller 100 and the T2 terminal 402R2 of the attachment 400B are electrically connected. This connection establishes an electrical path between the power supply potential 132 of the controller 100 and the ground potential 434R of the attachment 400B. The potential generated in this path is acquired. Since the voltage drop from the power supply potential 132 to the ground potential 434R is divided proportionally between the resistor 133 and the resistor 432R, the ADC port 1182 of the controller 100 acquires potentials corresponding to the resistors 133 and 432R. The controller 100 transmits information including the potential values acquired by the ADC port 1182 to the main unit 200. When the main unit 200 receives information including the potential values from the controller 100, it identifies that the controller 100 is attached to the attachment 400B based on the received potential values. The main unit 200 transmits to the controller 100 an identification result indicating that the attachment 400B is installed.
[0199] Next, the controller 100 sets the communication ports 1185 and 1186 to an operating mode that supports I2C. Then, the controller 100 changes the output signal of GPIO(4) port 1184 from L to H.
[0200] When attachment 400B detects that the signal input to GPIO(R4) port 454 has changed from L to H, it changes the output signal of GPIO(R3) port 453 from L to H.
[0201] When controller 100 detects that the signal input to GPIO(3) port 1183 has changed from H to L, it starts I2C communication. At this time, the control circuit 110 of each controller 100 transmits or receives communication request and communication ready status signals via T3 terminal 1023 and T4 terminal 1024, and transmits or receives signals corresponding to I2C communication via T5 terminal 1025 and T6 terminal 1026.
[0202] On the other hand, when the controller 100 is attached to the connector 402L side of the attachment 400B, the T1 terminal 1021 of the controller 100 and the T1 terminal 402L1 of the attachment 400B are electrically connected, and the GPIO(L1) port 461 detects the ground potential 131 (i.e., L). The attachment 400B determines that the controller 100 has been attached to the connector 402L side by detecting the ground potential 131 at the GPIO(L1) port 461. Subsequently, the attachment 400B closes the switch 436L. This enables the power supply to the controller 100.
[0203] Furthermore, when the controller 100 is attached to the connector 402L side of the attachment 400B, the same process as described above is executed. Then, when the attachment 400B detects that the signal input to the GPIO(L3) port 463 has changed from L to H, it changes the output signal of the GPIO(L4) port 464 from L to H.
[0204] Other processing and operations are the same as when the controller 100 is attached to the connector 402R side of attachment 400B.
[0205] (d7: Resistance value design) The potential acquired by the ADC port 1182 of the controller 100 is a value that can identify the electronic device to which the controller 100 is attached. For example, the resistors 322 of attachment 300 (see Figure 10), 324 of attachment 300A (see Figure 12), 444R (or 444L) of attachment 400A (see Figure 13), and 432R (or 432L) of attachment 400B (see Figure 14) are designed to have different resistance values. The magnitude of each resistance value may be determined according to the resolution (grayscale) of the ADC port 1182.
[0206] [E. Variant] The processing required in the aforementioned electronic devices may be achieved by a processor executing a program, or some or all of the processing may be achieved by hardwired circuits such as ASICs (Application Specific Integrated Circuits) or FPGAs (Field Programmable Gate Arrays). Therefore, in this specification, the term "processor" includes not only CPUs (Central Processing Units), MPUs (Micro Processing Units), and GPUs (Graphics Processing Units), but also hardwired circuits such as ASICs and FPGAs. Note that hardwired circuits may also be small-scale ICs (integrated circuits).
[0207] In the above description, an example configuration was described in which the potential acquired by the ADC port 1182 of the controller 100 is transmitted to the main unit 200, and the main unit 200 identifies the electronic equipment connected to the controller 100. However, all or part of the process for identifying the electronic equipment connected to the controller 100 may be implemented in the controller 100.
[0208] In the above explanation, a controller 100 that supports I2C, UART, and SPI was used as an example, but a configuration that supports only two of these communication methods may also be adopted.
[0209] [F. Advantages] The controller 100 according to this embodiment can change the function of the communication port or the terminal electrically connected to the communication port depending on the acquired potential, thereby reducing the number of terminals that need to be provided on the electronic device.
[0210] According to this embodiment, the controller 100 can acquire the potential generated by supplying the power supply potential of the controller 100 to the electronic device, even if the electronic device to which it is attached does not have a battery.
[0211] The embodiments disclosed herein should be considered in all respects to be illustrative and not restrictive. The scope of the present invention is indicated by the claims rather than by the foregoing description, and all modifications within the meaning and scope equivalent to the claims are intended to be included. [Explanation of symbols]
[0212] 1 System, 4 External power supply, 100 Controller, 102, 202, 302, 402, 402L, 402R Connector, 110, 210, 310, 450 Control circuit, 112, 212 Processor, 114, 214 Volatile memory, 116 Non-volatile memory, 118, 218 Interface circuit, 120, 220 Battery, 122 Operating unit, 124, 320 Sensor, 126 Actuator, 130, 230 Wireless communication circuit, 131, 241, 321, 434L, 434R, 442L, 442R, 428, 446L, 446R Ground potential, 132 Power supply potential, 133, 322, 324, 432L, 432R, 444L, 444R Resistors: 136, 243, 402R7, 424L, 424R, 430L, 430R, 440L, 440R Switches: 137, 327, 414 Power buses: 138, 247 Power outputs: 200 Main unit: 216 Storage: 229, 410 USB controllers: 300, 300A, 400, 400A, 400B Attachments: 402L1, 402R1, 1021, 2021, 3021 T1 terminals: 402L2, 402R2, 1022, 2022, 3022 T2 terminals: 402L3, 402R3, 1023, 2023, 3023 T3 terminals: 402L4, 402R4, 1024, 2024, 3024 T4 terminals: 402L5, 402R5, 1025, 2025, 3025 T5 terminals: 402L6, 402R6, 1026, 2026, 3026 T6 terminals: 402L7, 402R7, 702L7, 1028, 2027 Power output terminals: 402L8, 402R8, 1027, 2028, 3027 Power input terminals: 402L9, 402R9, 1029, 2029 USB terminals: 412, 471, 472, 1189, 2189 USB ports: 416 CC port: 451 GPIO (R1) port: 453 GPIO (R3) port: 454 GPIO(R4) ports: 455, 456, 1185, 1186, 2185, 2186, 3105, 3106, 3123, 3124, 3125, 3126 Communication port: 461 GPIO(L1) port: 463 GPIO(L3) port: 464 GPIO(L4) ports: 1020, 3020 T7 terminals: 1183, 2183 GPIO(3) port: 1184,2184 GPIO(4) port, 1190 GPIO(7) port, 2181 GPIO(1) port, 1160, 2160 System program, 1162 Device information, 1182 ADC port, 2162 Application program, 3103, 3104 Communication control port, 3130 Interrupt port.
Claims
1. An electronic device that can be wired to each of several other different electronic devices, Control unit and An acquisition unit that acquires the potential generated when the aforementioned other electronic device is connected via a wired connection, It comprises two first terminals that are electrically connected to two of the multiple terminals provided on the other electronic device, The control unit, When the acquired potential is a first value, a signal corresponding to I2C (Inter Integrated Circuit) communication is transmitted or received via the two first terminals. When the acquired potential is a second value, the two first terminals transmit or receive a signal corresponding to UART (Universal Asynchronous Receiver Transmitter) communication. An electronic device that, when the acquired potential is a third value, transmits or receives signals corresponding to SPI (Serial Peripheral Interface) communication via the two first terminals.
2. The electronic device further comprises two second terminals, each electrically connected to two other terminals among the plurality of terminals provided on the other electronic device. The electronic device according to claim 1, wherein the control unit, when the acquired potential is the first value, receives a communication request signal or transmits a signal indicating a communication-ready state via the two second terminals.
3. The electronic device according to claim 1 or 2, wherein the acquisition unit acquires the potential generated in an electrical path formed between the power supply potential of the electronic device and the ground potential of the other electronic device.
4. The electronic device according to claim 2, wherein the control unit transmits or receives a signal indicating permission to transmit data corresponding to UART communication via the two second terminals when the acquired potential is the second value.
5. The electronic device according to claim 2, wherein the control unit transmits or receives a signal corresponding to SPI communication via the two second terminals in addition to the two first terminals when the acquired potential is the third value.
6. The electronic device according to claim 2, wherein the control unit transmits a signal indicating the charging state of the electronic device or receives a signal indicating the charging state of a second other electronic device via the two second terminals when the acquired potential is a fourth value.
7. The electronic device according to claim 6, wherein the control unit receives a signal indicating an operation to an operating unit provided on the other electronic device via at least a portion of the two second terminals.
8. The electronic device further comprises a third terminal which is electrically connected to yet another terminal among the plurality of terminals provided on the other electronic device. The electronic device according to claim 6 or 7, wherein when the electronic device is being charged, or when at least one of the following conditions is met, the notification unit of the other electronic device provides notification based on a signal from the third terminal.
9. The electronic device according to claim 1 or 2, wherein the control unit transmits device information stored in EEPROM (Electrically Erasable Programmable Read-Only Memory) to the other electronic device when the acquired potential is a first value.
10. The aforementioned electronic device is The acquisition unit includes a fourth terminal for forming an electrical path for acquiring potential, The electronic device according to claim 1 or 2, further comprising a fifth terminal for configuring another electrical path for the other electronic device to acquire potential when the electronic device is wired to the other electronic device.
11. The electronic device further comprises a transmitting unit that transmits the acquired potential to an external electronic device. The electronic device according to claim 1 or 2, wherein the control unit determines the type of communication for transmitting or receiving a signal based on information from the external electronic device based on the acquired potential.
12. A first electronic device that can be wired to each of several other different electronic devices, The system comprises a second electronic device which is one of the aforementioned multiple different electronic devices, The first electronic device is, Control unit and An acquisition unit that acquires the potential generated when the second electronic device is connected via a wire, The second electronic device comprises two first terminals, each electrically connected to two of the multiple terminals provided on the second electronic device, The control unit, When the acquired potential is a first value, a signal corresponding to I2C (Inter Integrated Circuit) communication is transmitted or received via the two first terminals. When the acquired potential is a second value, the two first terminals transmit or receive a signal corresponding to UART (Universal Asynchronous Receiver Transmitter) communication. A system that, when the acquired potential is a third value, transmits or receives signals corresponding to SPI (Serial Peripheral Interface) communication via the two first terminals.
13. A program that runs on an electronic device that can be wired to each of several other different electronic devices, wherein the electronic device has two first terminals that are electrically connected to two of several terminals provided on the other electronic devices, and the program runs on the electronic device, A process for acquiring the potential that occurs when the aforementioned other electronic device is connected via a wired connection, When the acquired potential is a first value, the process involves transmitting or receiving a signal corresponding to I2C (Inter Integrated Circuit) communication via the two first terminals. If the acquired potential is a second value, the process involves transmitting or receiving a signal corresponding to UART (Universal Asynchronous Receiver Transmitter) communication via the two first terminals. A program that, when the acquired potential is a third value, causes the program to perform a process of transmitting or receiving a signal corresponding to SPI (Serial Peripheral Interface) communication via the two first terminals.