Electronic apparatus
By assigning unique identifiers to slave devices and using bit string changes to indicate interrupts, the system efficiently identifies interrupting slaves, addressing the inefficiencies of pulse width-based scanning in existing devices.
Patent Information
- Application Number
- JP2023025167
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2023-02-21
- Publication Date
- 2024-09-02
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing electronic devices require lengthy scanning processes to identify which slave device is asserting an interrupt request due to the use of pulse widths for identification, leading to inefficiencies in interrupt recognition.
The implementation of a system where each slave device is assigned a unique identifier, and a bit string indicating the presence of an interrupt is transmitted to the master, allowing for rapid identification of the interrupting slave through a bit position change based on the assigned identifier.
This approach enables quick identification of the interrupting slave device without increasing wiring area or time required for interrupt checks, even as the number of slaves increases.
Smart Images

Figure 2024118727000001
Abstract
Description
[Technical field]
[0001] The present disclosure relates to electronic devices. [Background technology]
[0002] Patent Document 1 discloses a device. In the device, an IRQ bus is coupled to a plurality of slave devices and a master device. Each slave device asserts an interrupt request by driving the IRQ bus for a period having a length corresponding to the identity of each slave device. Each slave device generates a pulse having a width defined for the group to which it belongs. High priority slave devices are assigned long pulse widths. Low priority slave devices are assigned short pulse widths. The master device uses the duration of the assertion of the IRQ bus to identify the highest priority group that contains the asserting slave device. The master device scans the IRQ status registers on the slave devices that are assigned the pulse width observed on the IRQ bus (paragraphs 0034, 0035 and 0036). [Prior art documents] [Patent documents]
[0003] [Patent Document 1] Special Publication No. 2016-532967 Summary of the Invention [Problem to be solved by the invention]
[0004] In the device disclosed in Patent Document 1, it is possible to identify that a slave device belonging to a group to which a pulse width equal to or less than the assertion duration of the IRQ bus is assigned is asserting an interrupt request. However, in order to identify whether each slave device is asserting an interrupt request, it is necessary to scan the slave devices belonging to that group. For this reason, it takes a long time to identify the slave device that has asserted the interrupt request.
[0005] In view of this problem, an aspect of the present disclosure provides an electronic device that can, for example, quickly identify a slave in which an interrupt has occurred. [Means for solving the problem]
[0006] An electronic device according to one embodiment of the present disclosure includes a master and a plurality of slaves, each of which is assigned a plurality of different identifiers, and each of the plurality of slaves transmits to the master a first signal indicating a bit string including a bit indicating whether an interrupt has occurred in each of the slaves, and changes the position of the bit based on the identifier assigned to each of the slaves. [Brief description of the drawings]
[0007] [Figure 1] 1 is a block diagram of an electronic device according to a first embodiment. [Diagram 2] 1 is a block diagram of an electronic device according to a first embodiment, in the vicinity of a master provided in the electronic device. [Diagram 3] 1 is a block diagram of an electronic device according to a first embodiment, in the vicinity of each slave included in the electronic device. [Figure 4] 2 is a block diagram of an interrupt request circuit and a controller provided in each slave included in the electronic device of the first embodiment. FIG. [Figure 5A] 4 is a diagram showing an interrupt status obtained by an encoder included in the electronic device of the first embodiment. FIG. [Figure 5B]4 is a diagram showing an interrupt status obtained by an encoder included in the electronic device of the first embodiment. FIG. [Figure 5C] 4 is a diagram showing an interrupt status obtained by an encoder included in the electronic device of the first embodiment. FIG. [Figure 5D] 4 is a diagram showing an interrupt status obtained by an encoder included in the electronic device of the first embodiment. FIG. [Figure 6] 1 is a table showing the relationship between a multi-slave address (MSA) assigned to a slave provided in an electronic device of a first embodiment, a value of an interrupt status when no interrupt has occurred in the slave, and a value of an interrupt status when an interrupt has occurred in the slave. [Figure 7A] 4 is a sequence diagram showing the flow of communication between a master and a plurality of slaves included in the electronic device of the first embodiment. FIG. [Figure 7B] 4 is a sequence diagram showing the flow of communication between a master and a plurality of slaves included in the electronic device of the first embodiment. FIG. [Figure 7C] 4 is a sequence diagram showing the flow of communication between a master and a plurality of slaves included in the electronic device of the first embodiment. FIG. [Figure 8] 4 is a timing chart showing waveforms of potentials applied to a clock bus, a data bus, a first data terminal, and a second data terminal included in the electronic device of the first embodiment. [Figure 9] FIG. 2 is a block diagram of an electronic device according to a first embodiment in which multiple slave addresses are assigned by a daisy chain method. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0008] Hereinafter, embodiments of the present disclosure will be described with reference to the drawings. In the drawings, the same or equivalent elements are denoted by the same reference numerals, and duplicated descriptions will be omitted.
[0009] 1. First embodiment 1.1 Identifying the slave where the interrupt occurred In the case where a master has multiple interrupt terminals and multiple wirings connect multiple slaves to the multiple interrupt terminals of the master, respectively, the master can determine that an interrupt has occurred in the slave connected to the interrupt terminal to which the interrupt signal is input when an interrupt signal is input. However, in this case, the number of wirings increases as the number of slaves increases. Therefore, the area occupied by the wirings increases as the number of slaves increases.
[0010] If the master has an interrupt terminal common to multiple slaves, and wiring connects multiple slaves to the master's interrupt terminal, the master cannot identify the slave in which the interrupt has occurred when an interrupt signal is input. For this reason, the master checks whether an interrupt has occurred in each slave one by one. This method is also called the polling method. However, in this case, the time required to check whether an interrupt has occurred increases as the number of slaves increases.
[0011] In view of these problems, the first embodiment provides an electronic device in which the area occupied by wiring does not increase and the time required to check whether an interrupt has occurred does not increase even if the number of slaves increases.
[0012] 1.2 Electronic equipment FIG. 1 is a block diagram of an electronic device according to a first embodiment.
[0013] The electronic device 1 of the first embodiment shown in Fig. 1 is a robot vacuum cleaner. The electronic device 1 detects the surrounding situation and performs cleaning based on the detected surrounding situation. The electronic device 1 may be an electronic device other than a robot vacuum cleaner.
[0014] As illustrated in FIG. 1, the electronic device 1 includes a master 11, a plurality of slaves 21, 22, and 23, a clock bus 31, a data bus 32, an interrupt bus 33, a pull-up resistor 41, a pull-up resistor 42, a pull-up resistor 43, and a power line 51. The master 11 includes a first clock (SCL) terminal 11a, a first data (SDA) terminal 11b, and a first interrupt terminal (INT) 11c. The plurality of slaves 21, 22, and 23 include a plurality of second clock (SCL) terminals 21a, 22a, and 23a, respectively, a plurality of second data (SDA) terminals 21b, 22b, and 23b, respectively, and a plurality of second interrupt (INT) terminals 21c, 22c, and 23c, respectively. In the first embodiment, the plurality of slaves 21, 22, and 23 are three slaves. The number of slaves included in the electronic device may be increased or decreased. The number of slaves that an electronic device has can be increased within the limits of the performance of the clock bus 31 and the data bus 32.
[0015] The master 11 and the multiple slaves 21, 22, and 23 are electronic circuits. The electronic circuits include integrated circuits, discrete circuits, etc. The clock bus 31, the data bus 32, and the interrupt bus 33 are wiring. The wiring includes patterns provided on a printed circuit board, electric wires, etc.
[0016] The first clock terminal 11a and the second clock terminals 21a, 22a, and 23a are electrically connected to a common clock bus 31. As a result, the clock bus 31 electrically connects the second clock terminals 21a, 22a, and 23a to the first clock terminal 11a.
[0017] The first data terminal 11b and the second data terminals 21b, 22b, and 23b are electrically connected to a common data bus 32. As a result, the data bus 32 electrically connects the second data terminals 21b, 22b, and 23b to the first data terminal 11b.
[0018] The first interrupt terminal 11c and the second interrupt terminals 21c, 22c, and 23c are electrically connected to a common interrupt bus 33. As a result, the interrupt bus 33 electrically connects the second interrupt terminals 21c, 22c, and 23c to the first interrupt terminal 11c.
[0019] One end of the pull-up resistor 41 is connected to the clock bus 31. The other end of the pull-up resistor 41 is connected to a power supply line 51. One end of the pull-up resistor 42 is connected to the data bus 32. The other end of the pull-up resistor 42 is connected to the power supply line 51. One end of the pull-up resistor 43 is connected to the interrupt bus 33. The other end of the pull-up resistor 43 is connected to the power supply line 51. As a result, the clock bus 31, the data bus 32 and the interrupt bus 33 are pulled up to the power supply line 51. The power supply line 51 is supplied with a power supply potential V IO As a result, the clock bus 31, the data bus 32, and the interrupt bus 33 are supplied with the power supply potential V IO A potential High (H) corresponding to
[0020] The master 11 transmits a clock signal from the first clock terminal 11a. The clock bus 31 carries the transmitted clock signal from the first clock terminal 11a to the second clock terminals 21a, 22a, and 23a. The slaves 21, 22, and 23 receive the transmitted clock signal at the second clock terminals 21a, 22a, and 23a, respectively. As a result, the master 11 transmits the clock signal to the slaves 21, 22, and 23.
[0021] The master 11 transmits a data signal from the first data terminal 11b. The data bus 32 carries the transmitted data signal from the first data terminal 11b to the second data terminals 21b, 22b, and 23b. The slaves 21, 22, and 23 receive the transmitted data signal at the second data terminals 21b, 22b, and 23b, respectively. As a result, the master 11 transmits the data signal to the slaves 21, 22, and 23. The master 11 transmits the data signal in synchronization with the clock signal transmitted from the first clock terminal 11a. The slaves 21, 22, and 23 receive the data signal in synchronization with the clock signal received at the second clock terminals 21a, 22a, and 23a, respectively.
[0022] Each slave 20 included in slaves 21, 22, and 23 transmits a data signal from the second data terminal 20b of each slave 20. The data bus 32 transmits the transmitted data signal from the second data terminal 20b to the first data terminal 11b. The master 11 receives the transmitted data signal at the first data terminal 11b. As a result, each slave 20 transmits a data signal to the master 11. Each slave 20 transmits a data signal in synchronization with the clock signal received at the second clock terminal 20a of each slave 20. The master 11 receives the data signal in synchronization with the clock signal transmitted from the first clock terminal 11a.
[0023] Each slave 20 transmits an interrupt signal from a second interrupt terminal 20c included in the slave 20. The interrupt bus 33 transfers the transmitted interrupt signal from the second interrupt terminal 20c to the first interrupt terminal 11c. The master 11 receives the transmitted interrupt signal at the first interrupt terminal 11c. As a result, each slave 20 transmits an interrupt signal to the master 11.
[0024] The clock bus 31 and the data bus 32 are serial buses. Therefore, the clock bus 31 is a serial clock bus. The data bus 32 is a serial data bus. The first clock terminal 11a and the second clock terminals 21a, 22a, and 23a are serial clock terminals. The first data terminal 11b and the second data terminals 21b, 22b, and 23b are serial data terminals. The serial bus is an I-squared C (I 2 C) It is a bus.
[0025] Each slave 20 is a device that operates through serial communication and outputs an interrupt signal when an operation is completed. In the first embodiment, each slave 20 is a sensor that performs measurement and obtains a measurement value. Each slave 20 may be a device other than a sensor.
[0026] A slave (hereinafter, referred to as an "interrupt slave") among the slaves 21, 22, and 23 that has acquired a measurement value to be transmitted to the master 11 transmits an interrupt signal to the master 11. When the master 11 receives the transmitted interrupt signal, the master 11 transmits a signal indicating a request to read the measurement value to the interrupt slave. In response to receiving the signal indicating a request to read the transmitted measurement value, the interrupt slave transmits a signal indicating the measurement value to the master 11. The master 11 receives the transmitted signal indicating the measurement value. The master 11 or a controller communicatively connected to the master 11 uses the measurement value indicated by the received signal to control the electronic device 1. For example, each slave 20 is a time-of-flight (TOF) sensor that measures distance to obtain a distance measurement value. In addition, the master 11 or the controller uses the distance measurement value to control the automatic travel of the robot cleaning.
[0027] The master 11 cannot identify the interrupt slave that transmitted the interrupt signal from the received interrupt signal itself. For this reason, the electronic device 1 is provided with a function that enables the master 11 to identify the interrupt slave after the master 11 receives the interrupt signal.
[0028] The slaves 21, 22, and 23 have a common address. The common address is also called a global address (GA). The multiple slaves 21, 22, and 23 each have a multiple unique address that is different from one another. The multiple unique addresses are also called a multi-slave address (MSA). The multiple MSAs are identifiers for identifying the multiple slaves 21, 22, and 23 from one another. In the first embodiment, the multiple MSAs are assigned by the master 11. There are also cases where the master 11 does not assign an MSA to the multiple slaves 21, 22, and 23. For example, if the multiple slaves 21, 22, and 23 are devices that can already be identified, the master 11 does not assign an MSA to the multiple slaves 21, 22, and 23.
[0029] By transmitting a data signal indicating an address and a read request, the master 11 can cause a slave having that address to transmit a data signal indicating a bit string. Furthermore, the master 11 can receive the transmitted data signal indicating the bit string. By setting the address to GA, the master 11 can cause the slaves 21, 22, and 23 to transmit a data signal indicating the bit string. By setting the address to MSA, the master 11 can cause a slave, among the slaves 21, 22, and 23, to which an MSA matching the MSA has been assigned, to transmit a data signal indicating the bit string.
[0030] Master 11 transmits a data signal indicating an address and a write request, and subsequently transmits a data signal indicating a bit string, thereby allowing a slave having that address to receive the data signal indicating the bit string. By setting the address to GA, master 11 allows slaves 21, 22, and 23 to receive the data signal indicating the bit string. By setting the address to MSA, master 11 allows slaves having an MSA matching the address, among slaves 21, 22, and 23, to receive the data signal indicating the bit string.
[0031] 1.3 Master FIG. 2 is a block diagram of the electronic device according to the first embodiment, in the vicinity of a master provided in the electronic device.
[0032] As shown in FIG. 2, the master 11 includes a controller 71, a buffer 72, a buffer 73, a buffer 74, a buffer 75, a pull-down transistor 76, and a pull-down transistor 77.
[0033] The first clock terminal 11a is electrically connected to an input terminal of a buffer 72. The output terminal of the buffer 72 is electrically connected to the controller 71. As a result, the clock signal transmitted from the first clock terminal 11a is input to the controller 71 via the buffer 72.
[0034] The first data terminal 11b is electrically connected to an input terminal of a buffer 73. The output terminal of the buffer 73 is electrically connected to the controller 71. As a result, a data signal transmitted from the first data terminal 11b or a data signal received at the first data terminal 11b is input to the controller 71 via the buffer 73.
[0035] The controller 71 is electrically connected to the input terminal of the buffer 74. The output terminal of the buffer 74 is electrically connected to the gate of the pull-down transistor 76. The drain of the pull-down transistor 76 is electrically connected to the first clock terminal 11a. The source of the pull-down transistor 76 is electrically connected to the ground 91. The ground 91 is supplied with a ground potential. When an on potential H is applied to the gate of the pull-down transistor 76, the pull-down transistor 76 makes the drain of the pull-down transistor 76 conductive with the source of the pull-down transistor 76, pulls down the first clock terminal 11a to the ground 91, and supplies a potential Low (L) corresponding to the ground potential to the first clock terminal 11a. When an off potential L is applied to the gate of the pull-down transistor 76, the pull-down transistor 76 does not make the drain of the pull-down transistor 76 conductive with the source of the pull-down transistor 76, and supplies a potential H to the first clock terminal 11a. The controller 71 applies an on potential H or an off potential L to the gate of the pull-down transistor 76 via the buffer 74. In this way, the controller 71 causes the master 11 to transmit a clock signal from the first clock terminal 11a.
[0036] The controller 71 is electrically connected to the input terminal of the buffer 75. The output terminal of the buffer 75 is electrically connected to the gate of the pull-down transistor 77. The drain of the pull-down transistor 77 is electrically connected to the first data terminal 11b. The source of the pull-down transistor 77 is electrically connected to the ground 91. When an on potential H is applied to the gate of the pull-down transistor 77, the pull-down transistor 77 makes the drain of the pull-down transistor 77 conductive with the source of the pull-down transistor 77, pulls down the first data terminal 11b to the ground 91, and applies a potential L to the first data terminal 11b. When an off potential L is applied to the gate of the pull-down transistor 77, the pull-down transistor 77 does not make the drain of the pull-down transistor 77 conductive with the source of the pull-down transistor 77, and applies a potential H to the first data terminal 11b. The controller 71 applies an on potential H or an off potential L to the gate of the pull-down transistor 77 via the buffer 75. As a result, the controller 71 causes the master 11 to transmit a data signal from the first data terminal 11b.
[0037] 1.4 Slave FIG. 3 is a block diagram of the electronic device according to the first embodiment, in the vicinity of each slave included in the electronic device.
[0038] As shown in FIG. 3, each slave 20 includes an interrupt request circuit 111, a controller 112, a buffer 113, a buffer 114, a buffer 115, a buffer 116, a buffer 117, a pull-down transistor 118, a pull-down transistor 119 and a pull-down transistor 120.
[0039] The interrupt request circuit 111 requests an interrupt when a measurement value to be transmitted to the master 11 is acquired. The interrupt request circuit 111 provides the controller 112 with a potential 141 indicating whether or not an interrupt is requested. When an interrupt is requested, the interrupt request circuit 111 sets the potential 141 to a potential H. When an interrupt is not requested, the interrupt request circuit 111 sets the potential 141 to a potential L.
[0040] The second clock terminal 20a of each slave 20 is electrically connected to an input terminal of a buffer 113. The output terminal of the buffer 113 is electrically connected to the controller 112. As a result, the clock signal received at the second clock terminal 20a is input to the controller 112 via the buffer 113.
[0041] The second data terminal 20b of each slave 20 is electrically connected to an input terminal of a buffer 114. The output terminal of the buffer 114 is electrically connected to the controller 112. As a result, a data signal transmitted from the second data terminal 20b or a data signal received at the second data terminal 20b is input to the controller 112 via the buffer 114.
[0042] The controller 112 is electrically connected to the input terminal of the buffer 115. The output terminal of the buffer 115 is electrically connected to the gate of the pull-down transistor 118. The drain of the pull-down transistor 118 is electrically connected to the second clock terminal 20a. The source of the pull-down transistor 118 is electrically connected to the ground 91. When an on potential H is applied to the gate of the pull-down transistor 118, the pull-down transistor 118 makes the drain of the pull-down transistor 118 conductive with the source of the pull-down transistor 118, pulls down the second clock terminal 20a to the ground 91, and applies a potential L to the second clock terminal 20a. When an off potential L is applied to the gate of the pull-down transistor 118, the pull-down transistor 118 does not make the drain of the pull-down transistor 118 conductive with the source of the pull-down transistor 118, and applies a potential H to the second clock terminal 20a. The controller 112 applies an on potential H or an off potential L to the gate of the pull-down transistor 118 via the buffer 115 .
[0043] The controller 112 is electrically connected to the input terminal of the buffer 116. The output terminal of the buffer 116 is electrically connected to the gate of the pull-down transistor 119. The drain of the pull-down transistor 119 is electrically connected to the second data terminal 20b. The source of the pull-down transistor 119 is electrically connected to the ground 91. When an on potential H is applied to the gate of the pull-down transistor 119, the pull-down transistor 119 makes the drain of the pull-down transistor 119 conductive with the source of the pull-down transistor 119, pulls down the second data terminal 20b to the ground 91, and applies a potential L to the second data terminal 20b. When an off potential L is applied to the gate of the pull-down transistor 119, the pull-down transistor 119 does not make the drain of the pull-down transistor 119 conductive with the source of the pull-down transistor 119, and applies a potential H to the second data terminal 20b. The controller 112 applies an on potential H or an off potential L to the gate of the pull-down transistor 119 via the buffer 116. As a result, the controller 112 causes each slave 20 to transmit a data signal from the second data terminal 20b.
[0044] The controller 112 is electrically connected to an input terminal of the buffer 117. An output terminal of the buffer 117 is electrically connected to a gate of the pull-down transistor 120. A drain of the pull-down transistor 120 is electrically connected to a second interrupt terminal 20c provided in each slave 20. A source of the pull-down transistor 120 is electrically connected to the ground 91. When an on potential H is applied to the gate of the pull-down transistor 120, the pull-down transistor 120 makes the drain of the pull-down transistor 120 conductive with the source of the pull-down transistor 120, pulls down the second interrupt terminal 20c to the ground 91, and applies a potential L to the second interrupt terminal 20c. When an off potential L is applied to the gate of the pull-down transistor 120, the pull-down transistor 120 does not make the drain of the pull-down transistor 120 conductive with the source of the pull-down transistor 120, and applies a potential H to the second interrupt terminal 20c. The controller 112 provides an on potential H or an off potential L to the gate of the pull-down transistor 120 via the buffer 117. This causes the controller 112 to cause each slave 20 to transmit an interrupt signal from the second interrupt terminal 20c. The controller 112 provides the potential provided by the interrupt request circuit 111 to the gate of the pull-down transistor 120. Therefore, when an interrupt occurs, the potential L is provided to the second interrupt terminal 20c. When no interrupt occurs, the potential H is provided to the second interrupt terminal 20c. The potentials L and H indicate a logical value 1 and a logical value 0. The logical values 1 and 0 are inverted to each other. Therefore, the logical value indicated by the potential provided to the second interrupt terminal 20c is inverted from the logical value indicated by the potential provided by the interrupt request circuit 111.
[0045] As a result, the second clock terminal 20a can be used for both input and output, the second data terminal 20b can be used for both input and output, and the second interrupt terminal 20c can be used for output.
[0046] The second data terminals 21b, 22b, and 23b are open drain outputs. The second data terminals 21b, 22b, and 23b are connected to a common data bus 32. Therefore, the data bus 32 connects the second data terminals 21b, 22b, and 23b to each other in a wired OR fashion. Therefore, when a potential L is applied to any of the second data terminals 21b, 22b, and 23b, the potential L is applied to the first data terminal 11b and all of the second data terminals 21b, 22b, and 23b. This is the same even if the second data terminals 21b, 22b, and 23b are open collector outputs.
[0047] The second interrupt terminals 21c, 22c, and 23c are open drain outputs. The second interrupt terminals 21c, 22c, and 23c are connected to a common interrupt bus 33. Therefore, the interrupt bus 33 connects the second interrupt terminals 21c, 22c, and 23c to each other in a wired OR fashion. Therefore, when a potential L is applied to any of the second interrupt terminals 21c, 22c, and 23c, the potential L is applied to the first interrupt terminal 11c and all of the second interrupt terminals 21c, 22c, and 23c. This is the same even if the second interrupt terminals 21c, 22c, and 23c are open collector outputs.
[0048] 1.5 Slave Controller FIG. 4 is a block diagram of an interrupt request circuit and a controller provided in each slave included in the electronic device of the first embodiment.
[0049] 4, the controller 112 provided in each slave 20 includes an MSA output unit 161, an encoder 162, and an interface 163. The interface 163 includes a register 181.
[0050] The MSA output unit 161 outputs the MSA201 possessed by each slave 20. The MSA201 possessed by each slave 20 is an identifier unique to each slave 20, different from the MSA possessed by other slaves. The output MSA201 is a bit string including a plurality of bits. In the first embodiment, the plurality of bits is eight bits. The MSA output unit 161 that outputs the MSA201 is an example of an identifier output unit that outputs an identifier unique to each slave 20. For this reason, the controller 112 may include an identifier output unit that outputs an identifier other than the MSA201, instead of the MSA output unit 161. The identifier other than the MSA201 is a value stored in a one-time programmable (OTP) memory provided in each slave 20, a value indicating a potential applied to a terminal provided in each slave 20, or the like. However, the MSA201 can be set more efficiently than an identifier other than the MSA201, and the circuit constituting the electronic device 1 can be simplified.
[0051] The encoder 162 encodes the applied potential 141 into the interrupt status 202 according to the output MSA 201. The interrupt status 202 obtained by encoding is a bit string including a plurality of bits. In the first embodiment, the plurality of bits is eight bits. The interrupt status 202 includes a bit indicating whether an interrupt has occurred in each slave 20. The value of the bit is inverted from the value indicating the potential 141 provided by the interrupt request circuit 111. Therefore, a value of the bit of 0 indicates that an interrupt has occurred. A value of the bit of 1 indicates that an interrupt has not occurred. The encoder 162 changes the position of the bit indicating whether an interrupt has occurred based on the MSA 201. This makes it possible to identify the interrupt slave in which the interrupt has occurred based on the position. The encoder 162 changes the position based on a part of the plurality of bits included in the MSA 201. For example, the encoder 162 changes the position based on the lower three bits included in the plurality of bits. This makes it possible to efficiently encode the potential 141, and to simplify the circuit constituting the electronic device 1. The encoder 162 sets the interrupt status 202 in the register 181 .
[0052] The interface 163 is electrically connected to the buffers 113, 114, 115, and 116. In response to a data signal indicating the GA and a read request of each slave 20 being received at the second data terminal 20b, the interface 163 causes each slave 20 to transmit a data signal indicating the interrupt status 202 set in the register 181 from the second data terminal 20b. 2 It is a C interface.
[0053] 1.6 Interrupt Status 5A to 5D are diagrams showing interrupt statuses obtained by an encoder provided in the electronic device of the first embodiment.
[0054] As shown in FIG. 5A to FIG. 5D, the interrupt status 202 includes a first bit 221, a second bit 222, a third bit 223, a fourth bit 224, a fifth bit 225, a sixth bit 226, a seventh bit 227, and an eighth bit 228. The first bit 221, the second bit 222, the third bit 223, the fourth bit 224, the fifth bit 225, the sixth bit 226, the seventh bit 227, and the eighth bit 228 are arranged from the highest to the lowest in the order described. The encoder 162 shifts the bit indicating whether an interrupt has occurred in each slave 20 from the lowest eighth bit 228 to the highest by the number of times that matches the value of the lowest three bits of the MSA 201 possessed by each slave 20. In this way, the encoder 162 changes the position based on the value. The position may be changed based on the value by other methods.
[0055] Each slave 20 has an MSA[00h] if the MSA 201 has not been given by the master 11. Therefore, even if the MSA 201 has not been given to each slave 20 by the master 11, when the encoder 162 encodes the potential 141 into the interrupt status 202 in accordance with the MSA 201, in the interrupt status 202 obtained by the first slave 21, the second slave 22, and the third slave 23, the eighth bit 228 corresponding to the value "0x0" of the lowest three bits of the MSA[00h] indicates whether an interrupt has occurred in the first slave 21, the second slave 22, and the third slave 23. 5A, when the first slave 21, the second slave 22, and the third slave 23 have the GA 200 (GA “0x29”), but the MSA 201 is not provided to the first slave 21, the second slave 22, and the third slave 23, the common eighth bit 228 in the interrupt status 202 obtained by the first slave 21, the second slave 22, and the third slave 23 indicates whether an interrupt has occurred in the first slave 21, the second slave 22, and the third slave 23. On the other hand, when the MSA 201 is not provided to each slave 20 by the master 11, and the encoder 162 does not encode the potential 141 into the interrupt status 202, the interrupt status 202 obtained by the first slave 21, the second slave 22, and the third slave 23 does not include a bit indicating whether an interrupt has occurred in the first slave 21, the second slave 22, and the third slave 23.
[0056] As shown in FIG. 5B, when the MSA 201 (MSA "0x40") is assigned to the first slave 21, the encoder 162 included in the first slave 21 shifts the bit indicating whether an interrupt has occurred in the first slave 21 from the eighth least significant bit 228 to a higher bit by 0 times, which is the number of times that matches the value "0x0" of the lowest 3 bits of the MSA "0x40" assigned to the first slave 21. In other words, the bit is not shifted from the eighth least significant bit 228. Therefore, in the interrupt status 202 obtained by the first slave 21, the eighth least significant bit 228 indicates whether an interrupt has occurred in the first slave 21.
[0057] 5C, when MSA 201 (MSA "0x41") is further assigned to the second slave 22, the encoder 162 included in the second slave 22 shifts the bit indicating whether an interrupt has occurred in the second slave 22 from the eighth least significant bit 228 to a higher bit only once, which is the number of times that matches the value "0x1" of the lowest 3 bits of the MSA "0x41" assigned to the second slave 22. Therefore, in the interrupt status 202 obtained by the second slave 22, the seventh bit 227, which is one digit higher than the eighth least significant bit 228, indicates whether an interrupt has occurred in the second slave 22.
[0058] 5D, when MSA 201 (MSA "0x42") is further assigned to the third slave 23, the encoder 162 included in the third slave 23 shifts the bit indicating whether an interrupt has occurred in the third slave 23 from the eighth least significant bit 228 to a higher bit by two times, which is the number of times that matches the value "0x2" of the lowest three bits of the MSA "0x42" assigned to the third slave 23. Therefore, in the interrupt status 202 obtained by the third slave 23, the sixth bit 226, which is two digits higher than the eighth least significant bit 228, indicates whether an interrupt has occurred in the third slave 23.
[0059] As shown in Figures 5B to 5D, the positions of the eighth bit 228, the seventh bit 227, and the sixth bit 226, which indicate whether an interrupt has occurred in the first slave 21, the second slave 22, and the third slave 23, respectively, are different from each other. Therefore, from the interrupt status 202 obtained by the first slave 21, the second slave 22, and the third slave 23, it is possible to specify whether an interrupt has occurred in the first slave 21, the second slave 22, and the third slave 23, respectively. This is the same even if the interrupt status 202 obtained by the first slave 21, the second slave 22, and the third slave 23 are combined by logical OR. The master 11 uses this to specify whether an interrupt has occurred in the first slave 21, the second slave 22, and the third slave 23.
[0060] The number of slaves for which the master 11 can determine whether an interrupt has occurred in response to a single read request depends on the number of bits of communication between the master 11 and each slave 20. For example, if the number of bits of communication between the master 11 and each slave 20 is 8 bits, the number of slaves for which the master 11 can determine whether an interrupt has occurred is 8.
[0061] 1.7 Interrupt Status Values FIG. 6 is a table showing the relationship between the MSA assigned to a slave provided in the electronic device of the first embodiment, the value of the interrupt status when no interrupt has occurred in the slave, and the value of the interrupt status when an interrupt has occurred in the slave.
[0062] As described above, the bit indicating whether an interrupt has occurred, which is included in the interrupt status 202 obtained by each slave 20, is shifted from the lowest eighth bit 228 to higher bits by the number of times that coincides with the value of the lowest three bits of the MSA 201 assigned to each slave 20. Therefore, as shown in Fig. 6, when the MSA 201 assigned to each slave 20 is "0x40", "0x41", "0x42", "0x43", "0x44", "0x45", "0x46" and "0x47", the bits indicating whether an interrupt has occurred in each slave 20 are the eighth bit 228, the seventh bit 227, the sixth bit 226, the fifth bit 225, the fourth bit 224, the third bit 223, the second bit 222 and the first bit 221, respectively. As a result, the eighth bit 228, the seventh bit 227, the sixth bit 226, the fifth bit 225, the fourth bit 224, the third bit 223, the second bit 222 and the first bit 221 are associated with the MSAs "0x40", "0x41", "0x42", "0x43", "0x44", "0x45", "0x46", "0x47" and "0x48", respectively.
[0063] A bit indicating whether an interrupt has occurred, which is included in the interrupt status 202 obtained by each slave 20, has a value of "0" if an interrupt has occurred in the slave 20. The bit has a value of "1" if an interrupt has not occurred in the slave 20. All other bits included in the interrupt status 202 obtained by each slave 20 other than the bit in question have a value of "1".
[0064] Therefore, when no interrupt has occurred in each slave 20, all of the eight bits included in the interrupt status 202 obtained by each slave 20 have the value "1". When an interrupt has occurred in each slave 20, one of the eight bits has the value "0" and seven of the eight bits have the value "1". Therefore, it is possible to identify whether an interrupt has occurred based on the presence or absence of a bit having the value "0". In addition, it is possible to identify the interrupt slave in which an interrupt has occurred based on the position of the bit having the value "0".
[0065] 1.8 Communication between a master and multiple slaves 7A to 7C are sequence diagrams showing the flow of communication between a master and a plurality of slaves provided in the electronic device of the first embodiment.
[0066] As illustrated in FIG. 7A, in step S1, the master 11 transmits a seventh signal 371 from the first data terminal 11b. The transmitted seventh signal 371 indicates the MSA 201 (MSA "0x40") to be assigned to the first slave 21. The data bus 32 transmits the transmitted seventh signal 371 from the first data terminal 11b to the second data terminal 21b. The first slave 21 receives the transmitted seventh signal 371 at the second data terminal 21b. As a result, the master 11 transmits to the first slave 21 the seventh signal 371 indicating the MSA "0x40" to be assigned to the first slave 21. The first slave 21 sets the MSA of the first slave 21 to the MSA "0x40" indicated by the received seventh signal 371.
[0067] In the next step S2, the master 11 transmits a seventh signal 372 from the first data terminal 11b. The transmitted seventh signal 372 indicates the MSA 201 (MSA "0x41") to be assigned to the second slave 22. The data bus 32 transmits the transmitted seventh signal 372 from the first data terminal 11b to the second data terminal 22b. The second slave 22 receives the transmitted seventh signal 372 at the second data terminal 22b. As a result, the master 11 transmits to the second slave 22 the seventh signal 372 indicating the MSA "0x41" to be assigned to the second slave 22. The second slave 22 sets the MSA of the second slave 22 to the MSA "0x41" indicated by the received seventh signal 372.
[0068] In the next step S3, the master 11 transmits a seventh signal 373 from the first data terminal 11b. The transmitted seventh signal 373 indicates the MSA 201 (MSA "0x42") to be assigned to the third slave 23. The data bus 32 transmits the transmitted seventh signal 373 from the first data terminal 11b to the second data terminal 23b. The third slave 23 receives the transmitted seventh signal 373 at the second data terminal 23b. As a result, the master 11 transmits to the third slave 23 the seventh signal 373 indicating the MSA "0x42" to be assigned to the third slave 23. The third slave 23 sets the MSA of the third slave 23 to the MSA "0x42" indicated by the received seventh signal 373.
[0069] The MSA can be set in steps S1 to S3 by any method. For example, the MSA can be set by a daisy-chain method, an enable (En) method, a fuse trim (Fuse_trim) method, etc. Among these, an example of the MSA setting by the daisy-chain method will be described later.
[0070] As shown in FIG. 7B, in the next step S4, the second slave 22 and the third slave 23, which are interrupt slaves in which an interrupt has occurred and are included in the slaves 21, 22, and 23, transmit third signals 332 and 333 from the second interrupt terminals 22c and 23c, respectively. The transmitted third signals 332 and 333 are interrupt signals indicating that an interrupt has occurred in the second slave 22 and the third slave 23, respectively. The interrupt bus 33 transmits the transmitted third signals 332 and 333 from the second interrupt terminals 22c and 23c to the first interrupt terminal 11c, respectively. The master 11 receives the transmitted third signals 332 and 333 at the first interrupt terminal 11c. As a result, the second slave 22 and the third slave 23 transmit the third signals 332 and 333 to the master 11, respectively. The second interrupt terminals 21c, 22c, and 23c are wired-OR connected by the interrupt bus 33. Therefore, when an interrupt occurs in any of the slaves 21, 22, and 23, a potential L is applied to the first interrupt terminal 11c, the second interrupt terminals 21c, 22c, and 23c, and the interrupt bus 33, regardless of which slave the interrupt occurs in. Therefore, when the master 11 receives an interrupt signal, it can identify which of the slaves 21, 22, and 23 has generated the interrupt, but it cannot identify which slave has generated the interrupt.
[0071] In the following step S5, the master 11 transmits a fourth signal 340 from the first data terminal 11b in response to receiving the third signals 332 and 333. The transmitted fourth signal 340 indicates GA 200 (GA “0x29”) and a read request 250. The data bus 32 transmits the fourth signal 340 from the first data terminal 11b to the second data terminals 21b, 22b, and 23b. As a result, the master 11 transmits the fourth signal 340 to the slaves 21, 22, and 23 in response to receiving the third signals 332 and 333.
[0072] In the next step S6, the slaves 21, 22 and 23 transmit first signals 311, 312 and 313 from the second data terminals 21b, 22b and 23b, respectively, in response to receiving the fourth signal 340. The transmitted first signals 311, 312 and 313 indicate the interrupt statuses 202 (interrupt statuses "11111111", "11111101" and "11111011") obtained by the slaves 21, 22 and 23, respectively.
[0073] The slaves 21, 22, and 23 simultaneously transmit first signals 311, 312, and 313. The data bus 32 connects the second data terminals 21b, 22b, and 23b in a wired-OR manner. Therefore, the data bus 32 generates a second signal 320 by superimposing the multiple first signals 311, 312, and 313 transmitted simultaneously, and transmits the generated second signal 320 to the first data terminal 11b. The master 11 receives the transmitted second signal 320 at the first data terminal 11b. The value of the i-th bit included in the overlapped interrupt status 251 (overlapped interrupt status "11111001") indicated by the second signal 320 is the logical sum of the values of the i-th bit included in the interrupt status 202 (interrupt statuses "11111111", "11111101", and "11111011") indicated by the first signals 311, 312, and 313, respectively. For example, the value "0" of the seventh bit 227 included in the overlapped interrupt status "11111001" is the logical sum of the values "1", "0", and "1" of the seventh bit included in the interrupt statuses "11111111", "11111101", and "11111011" indicated by the first signals 311, 312, and 313, respectively.
[0074] The master 11 determines that the second slave 22 and the third slave 23 to which the MSA "0x41" and the MSA "0x42" corresponding to the seventh bit 227 and the sixth bit 226 having the value "0" indicating that an interrupt has occurred, which are included in the overlapped interrupt status 251 (overlapping interrupt status "11111001"), are the interrupt slaves in which an interrupt has occurred. As a result, the master 11 identifies the interrupt slave in which an interrupt has occurred based on the second signal 320. The master 11 can identify the interrupt slave by simply receiving the second signal 320 once. As a result, the interrupt slave can be identified in a short time.
[0075] 7C, in the next step S7, the master 11 transmits a fifth signal 352 from the first data terminal 11b. The transmitted fifth signal 352 indicates the MSA 201 (MSA "0x41") assigned to the second slave 22 determined to be the interrupt slave in which the interrupt has occurred, and a request 252 to read the measured value. The data bus 32 transmits the transmitted fifth signal 352 from the first data terminal 11b to the second data terminals 21b, 22b, and 23b. As a result, the master 11 transmits the fifth signal 352 to the slaves 21, 22, and 23.
[0076] In the next step S8, each slave 20 receives the transmitted fifth signal 352 at the second data terminal 20b, and transmits a sixth signal 362 from the second data terminal 20b if the MSA 201 (MSA "0x41") indicated by the received fifth signal 352 matches the MSA assigned to each slave 20. Each slave 20 does not transmit the sixth signal 362 if the MSA "0x41" indicated by the received fifth signal 352 does not match the MSA that each slave 20 has. As a result, the second slave 22, which has the MSA "0x41" that matches the MSA "0x41" indicated by the fifth signal 352 and is determined to be an interrupt slave in which an interrupt has occurred, receives the fifth signal 352 at the second data terminal 22b. In response to receiving the fifth signal 352, the second slave 22 transmits the sixth signal 362 from the second data terminal 22b. The transmitted sixth signal 362 indicates the measurement value 262 measured by the second slave 22. The data bus 32 carries the transmitted sixth signal 362 from the second data terminal 22b to the first data terminal 11b. The master 11 receives the transmitted sixth signal 362 at the first data terminal 11b. As a result, the second slave 22 transmits the sixth signal 362 to the master 11 in response to receiving the transmitted fifth signal 352. The master 11 receives the transmitted sixth signal 362 at the first data terminal 11b. As a result, the master 11 can obtain the measurement value 262 obtained by the second slave 22.
[0077] In the next step S9, the master 11 transmits a fifth signal 353 from the first data terminal 11b. The transmitted fifth signal 353 indicates the MSA 201 (MSA "0x42") assigned to the third slave 23 determined to be the interrupt slave in which the interrupt has occurred, and a request 252 to read the measured value. The data bus 32 transmits the transmitted fifth signal 353 from the first data terminal 11b to the second data terminals 21b, 22b, and 23b. As a result, the master 11 transmits the fifth signal 353 to the slaves 21, 22, and 23.
[0078] In the next step S10, each slave 20 receives the transmitted fifth signal 353 at the second data terminal 20b, and transmits a sixth signal 363 from the second data terminal 20b if the MSA 201 (MSA "0x42") indicated by the received fifth signal 353 matches the MSA assigned to each slave 20. Each slave 20 does not transmit the sixth signal 363 if the MSA "0x42" indicated by the received fifth signal 353 does not match the MSA that each slave 20 has. As a result, the third slave 23, which has the MSA "0x42" that matches the MSA "0x42" indicated by the fifth signal 353 and is determined to be an interrupt slave in which an interrupt has occurred, receives the fifth signal 353 at the second data terminal 23b, and transmits the sixth signal 363 from the second data terminal 23b in response to receiving the fifth signal 353. The transmitted sixth signal 363 indicates the measurement value 263 measured by the third slave 23. The data bus 32 carries the transmitted sixth signal 363 from the second data terminal 23b to the first data terminal 11b. The master 11 receives the transmitted sixth signal 363 at the first data terminal 11b. As a result, the third slave 23 transmits the sixth signal 363 to the master 11 in response to receiving the transmitted fifth signal 353. The master 11 receives the transmitted sixth signal 363 at the first data terminal 11b. As a result, the master 11 can obtain the measurement value 263 obtained by the third slave 23.
[0079] 1.9 Waveforms of potentials applied to the clock bus, data bus, first data terminal and second data terminal 8 is a timing chart showing waveforms of potentials applied to the clock bus, the data bus, the first data terminal, and the second data terminal of the electronic device of the first embodiment. The timing chart shows waveforms of potentials in steps S5 and S6 shown in FIG. 7B.
[0080] 8, at start 401, the master 11 applies a potential H to the first clock terminal 11a and the clock bus 31. While applying the potential H to the first clock terminal 11a and the clock bus 31, the master 11 applies a potential L to the first data terminal 11b and the data bus 32. This causes the master 11 to issue a start condition to the slaves 21, 22, and 23. This starts communication between the master 11 and the slaves 21, 22, and 23.
[0081] Next, the master 11 repeatedly applies potential L and potential H alternately to the first clock terminal 11a and the clock bus 31. This causes the master 11 to transmit a clock signal 421. The transmitted clock signal 421 includes the first clock pulse 501 to the eighteenth clock pulse 518.
[0082] Next, at stop 402, the master 11 applies a potential H to the first clock terminal 11a and the clock bus 31. While applying the potential H to the first clock terminal 11a and the clock bus 31, the master 11 applies a potential H to the first data terminal 11b and the data bus 32. This causes the master 11 to issue a stop condition to the slaves 21, 22, and 23. This stops communication between the master 11 and the slaves 21, 22, and 23.
[0083] The master 11 applies potentials indicating the values of the first bit to the seventh bit included in the GA 200 to the first data terminal 11b and the data bus 32 in synchronization with the first clock pulse 501 to the seventh clock pulse 507. Furthermore, the master 11 applies potential H indicating a read request 250(R) to the first data terminal 11b and the data bus 32 in synchronization with the eighth clock pulse 508. As a result, the master 11 transmits a fourth signal 340 indicating the GA 200 and the read request 250 to the slaves 21, 22, and 23.
[0084] When the slaves 21, 22, and 23 can normally receive the transmitted fourth signal 340, they respectively apply a potential L indicating an acknowledge (ACK) to the second data terminals 21b, 22b, and 23b in synchronization with the ninth clock pulse 509. As a result, the slaves 21, 22, and 23 apply a potential L indicating an acknowledge to the data bus 32 in synchronization with the ninth clock pulse 509. When the slaves 21, 22, and 23 cannot normally receive the transmitted fourth signal 340, they respectively apply a potential H indicating a not acknowledge (NACK) to the second data terminals 21b, 22b, and 23b in synchronization with the ninth clock pulse 509. As a result, the slaves 21, 22, and 23 apply a potential H indicating a not acknowledge to the data bus 32 in synchronization with the ninth clock pulse 509. Here, it is assumed that the slaves 21, 22 and 23 have successfully received the fourth signal 340.
[0085] The first slave 21 applies potentials indicating the values of the first bit 221 to the eighth bit 228 included in the interrupt status 202 (interrupt status "11111111") to the second data terminal 21b and the data bus 32 in synchronization with the tenth clock pulse 510 to the seventeenth clock pulse 517. The second slave 22 applies potentials indicating the values of the first bit 221 to the eighth bit 228 included in the interrupt status 202 (interrupt status "11111101") to the second data terminal 22b and the data bus 32 in synchronization with the tenth clock pulse 510 to the seventeenth clock pulse 517. The third slave 23 applies potentials indicating the values of the first bit 221 to the eighth bit 228 included in the interrupt status 202 (interrupt status "11111011") to the second data terminal 23b and the data bus 32, respectively, in synchronization with the tenth clock pulse 510 to the seventeenth clock pulse 517. As a result, the slaves 21, 22, and 23 transmit first signals 311, 312, and 313 indicating the interrupt statuses "11111111", "11111101", and "11111011", respectively, to the master 11. The interrupt statuses "11111111", "11111101", and "11111011" are read data returned in response to the read request 250. The first slave 21 applies potential H indicating that no interrupt has occurred to the second data terminal 21b in synchronization with the seventeenth clock pulse 517. The second slave 22 applies a potential L indicating that an interrupt has occurred to the second data terminal 22b in synchronization with the 16th clock pulse 516. The third slave 23 applies a potential L indicating that an interrupt has occurred to the second data terminal 23b in synchronization with the 15th clock pulse 515. As a result, the slaves 22 and 23 apply a potential L indicating that an interrupt has occurred to the clock bus 31 in synchronization with the 15th clock pulse 515 and the 16th clock pulse 516, and the slave 21 applies a potential H indicating that an interrupt has not occurred to the clock bus 31 in synchronization with the 17th clock pulse 517.
[0086] If the master 11 can normally receive the transmitted second signal 320, it applies a potential H indicating a not acknowledge (NACK) to the first data terminal 11b and the data bus 32 in synchronization with the 18th clock pulse 518. In this way, the master 11 does not give each slave 20 the authority to control the data bus 32, and inhibits each slave 20 from transmitting further signals.
[0087] 1.10 Assigning multiple slave addresses using a daisy chain FIG. 9 is a block diagram of an electronic device according to a first embodiment in which multiple slave addresses are assigned by a daisy chain method.
[0088] 9, when a multi-slave address is assigned by the daisy chain method, the electronic device 1 includes an enable line 531, a first daisy chain line 532, a second daisy chain line 533, and a third daisy chain line 534. The master 11 includes a first enable (EN) terminal 11d and a general purpose input / output (GPIO) terminal 11f. The slaves 21, 22, and 23 include a plurality of general purpose input / output (GPIO) registers 551, 552, and 553, respectively, a plurality of second enable (EN) terminals 21d, 22d, and 23d, respectively, a plurality of general purpose input / output (GPIO0) terminals 21e, 22e, and 23e, respectively, and a plurality of general purpose input / output (GPIO1) terminals 21f, 22f, and 23f, respectively.
[0089] The first enable terminal 11d and the second enable terminals 21d, 22d, and 23d are electrically connected to a common enable wiring 531. As a result, the enable wiring 531 electrically connects the second enable terminals 21d, 22d, and 23d to the first enable terminal 11d.
[0090] The first daisy chain wiring 532 electrically connects the general-purpose input / output terminal 21e to the general-purpose input / output terminal 11f. The second daisy chain wiring 533 electrically connects the general-purpose input / output terminal 22e to the general-purpose input / output terminal 21f. The third daisy chain wiring 534 electrically connects the general-purpose input / output terminal 23e to the general-purpose input / output terminal 22f. Thus, the first daisy chain wiring 532, the second daisy chain wiring 533, and the third daisy chain wiring 534 daisy chain the master 11, the first slave 21, the second slave 22, and the third slave 23.
[0091] The second enable terminals 21d, 22d, and 23d can be used for input. The general-purpose input / output terminals 21e, 22e, and 23e can be used for input. The general-purpose input / output terminals 21f, 22f, and 23f can be used for output.
[0092] When a potential L is applied to the second enable terminal 20d of each slave 20, each slave 20 cannot transmit or receive data signals using the second clock terminal 20a and the second data terminal 20b of each slave 20. When a potential H is applied to the second enable terminal 20d, each slave 20 can transmit or receive data signals using the second clock terminal 20a and the second data terminal 20b.
[0093] When a potential L is applied to the general-purpose input / output terminal 20e of each slave 20, the daisy chain mode of each slave 20 is disabled. Therefore, each slave 20 cannot accept the provision of the MSA 201 using the second clock terminal 20a and the second data terminal 20b. When a potential H is applied to the general-purpose input / output terminal 20e, the daisy chain mode of each slave 20 is enabled. Therefore, each slave 20 can accept the provision of the MSA 201 using the second clock terminal 20a and the second data terminal 20b.
[0094] Each slave 20 provides a potential indicating a value set in the general-purpose input / output register 550 included in each slave 20 to the general-purpose input / output terminal 20f.
[0095] In the initial state when the MSA 201 is provided by the daisy chain method, the master 11 provides a potential L to the first enable terminal 11d and the general-purpose input / output terminal 11f. Also, the value "0" is set in the general-purpose input / output register 550. Therefore, each slave 20 provides a potential L indicating the value "0" to the general-purpose input / output terminal 20f. Therefore, the potential L is provided to the second enable terminal 20d and the general-purpose input / output terminal 20e. Therefore, each slave 20 cannot transmit or receive a data signal using the second clock terminal 20a and the second data terminal 20b. Also, the daisy chain mode of each slave 20 is disabled. Therefore, each slave 20 cannot accept the provision of the MSA 201 using the second clock terminal 20a and the second data terminal 20b.
[0096] Next, the master 11 raises the potentials applied to the first enable terminal 11d and the general-purpose input / output terminal 11f from potential L to potential H. As a result, the potential H is applied to the enable wiring 531 and the second enable terminal 20d. In addition, the potential H is applied to the first daisy chain wiring 532 and the general-purpose input / output terminal 21e. As a result, the first slave 21 becomes capable of transmitting and receiving data signals using the second clock terminal 21a and the second data terminal 21b. In addition, the daisy chain mode of the first slave 21 becomes active. As a result, the first slave 21 becomes capable of receiving the MSA 201 using the second clock terminal 21a and the second data terminal 21b.
[0097] Subsequently, the master 11 transmits to the first slave 21 a seventh signal 371 indicating the GA 200 (GA “0x29”) and the MSA 201 (MSA “0x40”) assigned to the first slave 21.
[0098] The first slave 21 then receives the seventh signal 371 indicating the transmitted MSA 201 (MSA "0x40") at the second data terminal 21b, which can now be used to transmit and receive data signals. The first slave 21 sets the MSA of the first slave 21 to the MSA "0x40" indicated by the received seventh signal 371.
[0099] Next, the master 11 lowers the potential applied to the general-purpose input / output terminal 11f from potential H to potential L. This causes the potential L to be applied to the first daisy chain wiring 532 and the general-purpose input / output terminal 21e. This disables the daisy chain mode of the first slave 21. Therefore, the first slave 21 cannot accept the application of the MSA 201 using the second clock terminal 21a and the second data terminal 21b.
[0100] Next, the first slave 21 sets a value "1" in the general-purpose input / output register 551. As a result, the first slave 21 applies a potential H indicating the value "1" set in the general-purpose input / output register 551 to the general-purpose input / output terminal 21f. As a result, the potential H is applied to the second daisy chain wiring 533 and the general-purpose input / output terminal 22e. As a result, the daisy chain mode of the second slave 22 is enabled. As a result, the second slave 22 becomes able to accept the provision of the MSA 201 using the second clock terminal 22a and the second data terminal 22b.
[0101] Subsequently, the master 11 transmits to the second slave 22 a seventh signal 372 indicating the GA 200 (GA “0x29”) and the MSA 201 assigned to the second slave 22 (MSA “0x41”).
[0102] The second slave 22 then receives the seventh signal 372 indicating the transmitted MSA 201 (MSA "0x41") at the second data terminal 22b, which can now be used to transmit and receive data signals. The second slave 22 sets the MSA of the second slave 22 to the MSA "0x41" indicated by the received seventh signal 372.
[0103] Next, the second slave 22 sets a value "1" in the general-purpose input / output register 552. As a result, the second slave 22 provides a potential H indicating the value "1" set in the general-purpose input / output register 552 to the general-purpose input / output terminal 22f. As a result, the potential H is provided to the third daisy chain wiring 534 and the general-purpose input / output terminal 23e. As a result, the daisy chain mode of the third slave 23 is enabled. As a result, the third slave 23 becomes able to accept the provision of the MSA 201 using the second clock terminal 23a and the second data terminal 23b.
[0104] Subsequently, the master 11 transmits to the third slave 23 a seventh signal 373 indicating the GA 200 (GA “0x29”) and the MSA 201 (MSA “0x42”) assigned to the third slave 23.
[0105] The third slave 23 then receives the seventh signal 373 indicating the transmitted MSA 201 (MSA "0x42") at the second data terminal 23b which can now be used to transmit and receive data signals. The third slave 23 sets the MSA of the third slave 23 to the MSA "0x42" indicated by the received seventh signal 373.
[0106] This completes the assignment of the MSA 201 (MSA "0x40", MSA "0x41" and MSA "0x42") to the first slave 21, the second slave 22 and the third slave 23.
[0107] The present disclosure is not limited to the embodiments, and may be replaced with a configuration that is substantially the same as the configuration shown in the above embodiment, a configuration that has the same action and effect, or a configuration that can achieve the same purpose. [Explanation of symbols]
[0108] 1 electronic device, 11 master, 11a first clock terminal, 11b first data terminal, 11c first interrupt terminal, 11d first enable terminal, 11f general-purpose input / output terminal, 20, 21, 22, 23 slave, 20a, 21a, 22a, 23a second clock terminal, 20b, 21b, 22b, 23b second data terminal, 20c, 21c, 22c, 23c second interrupt terminal, 20d, 21d, 22d, 23d second enable terminal, 20e, 21e, 22e, 23e general-purpose input / output terminal, 20f, 21f, 22f, 23f general-purpose input / output terminal, 31 clock bus, 32 data bus, 33 interrupt bus, 41, 42, 43 pull-up resistor, 51 power line, 71 controller, 72, 73, 74, 75 buffer, 76, 77 pull-down transistor, 91 ground, 111 interrupt request circuit, 112 controller, 113, 114, 115, 116, 117 buffer, pull-down transistor, 118, 119, 120, 141 potential, 161 multi-slave address (MSA) output, 162 encoder, 163 interface, 181 register, 200 global address (GA), 201 MSA, 202 interrupt status, 221 first bit, 222 second bit, 223 third bit, 224 fourth bit, 225 fifth bit, 226 sixth bit, 227 seventh bit, 228 eighth bit, 250 read request, 251 superimposed interrupt status, 252 request to read measured value, 262 measured value, 311, 312, 313 First signal, 320 Second signal, 332 Third signal, 333 Third signal, 340 Fourth signal, 352, 353 Fifth signal, 362, 363 Sixth signal, 371, 372,373 seventh signal, 401 start, 402 stop, 421 clock signal, 501 first clock pulse, 502 second clock pulse, 503 third clock pulse, 504 fourth clock pulse, 505 fifth clock pulse, 506 sixth clock pulse, 507 seventh clock pulse, 508 eighth clock pulse, 509 ninth clock pulse, 510 tenth clock pulse, 511 eleventh clock pulse, 512 twelfth clock pulse, 513 thirteenth clock pulse, 514 fourteenth clock pulse, 515 fifteenth clock pulse, 516 sixteenth clock pulse, 517 seventeenth clock pulse, 518 eighteenth clock pulse, 531 enable wiring, 532 first daisy chain wiring, 533 second daisy chain wiring, 534 3rd daisy chain wiring, 550, 551, 552, 553 General purpose input / output registers,
Claims
1. Master and A plurality of slaves each having a plurality of mutually different identifiers assigned thereto; Equipped with Each of the slaves transmits to the master a first signal indicating a bit string including a bit indicating whether an interrupt has occurred in the slave, and changes the position of the bit based on an identifier assigned to the slave. electronic equipment.
2. the master comprises a first data terminal; each of the plurality of slaves includes a plurality of second data terminals; a data bus for connecting the plurality of second data terminals to each other in a wired-OR manner and electrically connecting the plurality of second data terminals to the first data terminal; each of the slaves transmits the first signal from a second data terminal included in the each of the slaves; the plurality of slaves simultaneously transmitting a plurality of first signals respectively transmitted by the plurality of slaves; the data bus generates a second signal by superimposing the plurality of first signals and transmits the second signal to the first data terminal; The master receives the second signal at the first data terminal.
2. The electronic device according to claim 1.
3. the identifier comprises a plurality of bits; Each of the slaves changes the position based on a portion of the plurality of bits.
3. The electronic device according to claim 1 or 2.
4. an interrupt slave in which the interrupt has occurred, the interrupt slave being included in the plurality of slaves, transmits a third signal to the master; the master transmitting a fourth signal to the plurality of slaves in response to receiving the third signal; Each of the slaves transmits the first signal in response to receiving the fourth signal.
2. The electronic device according to claim 1.
5. the plurality of slaves have a common address; The fourth signal indicates the common address.
5. The electronic device according to claim 4.
6. the master comprises a first data terminal and a first interrupt terminal; each of the plurality of slaves includes a plurality of second data terminals and a plurality of second interrupt terminals; a data bus that connects the plurality of second data terminals to each other in a wired-OR manner and electrically connects the plurality of second data terminals to the first data terminal; an interrupt bus that connects the plurality of second interrupt terminals to each other in a wired-OR manner and electrically connects the plurality of second interrupt terminals to the first interrupt terminal; Equipped with the interrupt slave transmits the third signal from a second interrupt terminal included in the interrupt slave; the interrupt bus transmits the third signal from a second interrupt terminal of the interrupt slave to the first interrupt terminal; the master receiving the third signal at the first interrupt terminal and transmitting the fourth signal from the first data terminal in response to receiving the third signal; the data bus transmits the fourth signal from the first data terminal to the plurality of second data terminals; the plurality of slaves each receive the fourth signal at the plurality of second data terminals; Each of the slaves transmits the first signal from a second data terminal included in the each of the slaves in response to receiving the fourth signal.
6. The electronic device according to claim 4 or 5.
7. the master identifies an interrupt slave in which the interrupt has occurred, among the plurality of slaves, based on a second signal generated by superimposing a plurality of first signals transmitted by the plurality of slaves, and transmits a fifth signal to the plurality of slaves; the interrupt slave transmitting a sixth signal to the master in response to receiving the fifth signal; The master receives the sixth signal.
2. The electronic device according to claim 1.
8. the fifth signal indicates an identifier assigned to the interrupt slave; Each of the slaves transmits the sixth signal to the master when the identifier indicated by the fifth signal matches an identifier assigned to the each of the slaves, and does not transmit the sixth signal to the master when the identifier indicated by the fifth signal does not match an identifier assigned to the each of the slaves.
8. The electronic device according to claim 7.
9. the master comprises a first data terminal; each of the plurality of slaves includes a plurality of second data terminals; a data bus for connecting the plurality of second data terminals to each other in a wired-OR manner and electrically connecting the plurality of second data terminals to the first data terminal; the master transmits the fifth signal from the first data terminal; the data bus transmits the fifth signal from the first data terminal to the plurality of second data terminals; the interrupt slave receives the fifth signal at a second data terminal included in the interrupt slave, and transmits the sixth signal from a second data terminal included in the interrupt slave in response to receiving the fifth signal; the data bus transmits the sixth signal from a second data terminal of the interrupt slave to the first data terminal; The master receives the sixth signal at the first data terminal.
9. The electronic device according to claim 8.
10. Each of the slaves is a device that operates via serial communication and outputs an interrupt signal when an operation is completed.
10. The electronic device according to claim 7.
Citation Information
Patent Citations
Interruption control system
JP1989214954A
Abnormality detector
JP1993314084A
Bus arbitration device and bus arbitration method
JP2005316609A
Sensor module, measurement system, electronic apparatus, and mobile body
JP2019164443A
Optimal i3c in-band interrupt handling through reduced slave arbitration cycles
US20210216490A1
