Electronic device
By using a shared serial bus and encoder identifier change bit string method between multiple slaves, the problem of reduced interrupt identification efficiency when the number of slaves increases is solved, and interrupt slaves can be accurately identified in a short time. function.
Patent Information
- Application Number
- CN202410185404.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2023-02-21
- Filing Date
- 2024-02-19
- Publication Date
- 2024-08-23
AI Technical Summary
In the existing technology, when the number of slaves increases, the time required to determine the interrupt slave becomes longer and the wiring area increases, making it impossible to efficiently identify the slave that is asserting the interrupt request.
Multiple slaves are used to communicate serially through a shared clock bus, data bus and interrupt bus, and an encoder is used to change the bit position in the interrupt status bit string according to the identifier of the slave to determine the interrupt, thereby identifying the interrupt in a short time Interrupt slave.
It is possible to keep the wiring area unchanged when the number of slaves increases, and determine the interrupting slaves in a short time, improving the efficiency of interrupt identification.
Smart Images

Figure CN118535499A
Abstract
Description
Technical Field
[0001] The present disclosure relates to an electronic device. Background Art
[0002] Japanese Patent Publication No. 2016-532967 discloses a device. In the device, an IRQ bus is coupled to a plurality of slaves and a host. Each slave asserts an interrupt request by driving the IRQ bus during a period of time corresponding to the identification information of each slave. Each slave generates a pulse having a width specified for the group to which each slave belongs. A long pulse width is assigned to a slave with a high priority. A short pulse width is assigned to a slave with a low priority. The host uses the duration of the IRQ bus assertion to identify the group with the highest priority, including the slave being asserted. The host scans the IRQ status register on the slave to which the pulse width observed on the IRQ bus is assigned (paragraphs 0034, 0035, and 0036). Summary of the invention
[0003] In the device disclosed in the publication of JP-2016-532967, it is possible to determine that a slave is asserting an interrupt request, and the slave belongs to a group to which a pulse width less than the duration of assertion of the IRQ bus is assigned. However, in order to determine whether each slave is asserting an interrupt request, it is necessary to scan the slaves belonging to the group. Therefore, it takes a long time to determine the slave that has asserted the interrupt request.
[0004] An aspect of the present disclosure is made in view of this problem.
[0005] One aspect of the present disclosure provides an electronic device capable of identifying a slave device in which an interruption has occurred in a short time, for example.
[0006] An electronic device according to one embodiment of the present invention comprises a host and a plurality of slaves, wherein the plurality of slaves are respectively assigned a plurality of identifiers different from each other, and each of the plurality of slaves sends a first signal to the host, wherein the first signal represents a bit string, and the bit string includes a bit indicating whether an interrupt has occurred in each of the slaves, and the position of the bit is changed according to the identifier assigned to each of the slaves. BRIEF DESCRIPTION OF THE DRAWINGS
[0007] Figure 1 It is a block diagram of an electronic device according to the first embodiment. Figure 2 This is a block diagram of the electronic device according to the first embodiment and the vicinity of a host included in the electronic device. Figure 3 This is a block diagram of the vicinity of each slave device included in the electronic device of the first embodiment. Figure 4This is a block diagram of an interrupt request circuit and a controller included in each slave included in the electronic device according to the first embodiment. Figure 5A This is a diagram showing an interruption state obtained by the encoder included in the electronic device according to the first embodiment. Figure 5B This is a diagram showing an interruption state obtained by the encoder included in the electronic device according to the first embodiment. Figure 5C This is a diagram showing an interruption state obtained by the encoder included in the electronic device according to the first embodiment. Figure 5D This is a diagram showing an interruption state obtained by the encoder included in the electronic device according to the first embodiment. Figure 6 This is a table showing the relationship between a multi-slave address (MSA) assigned to a slave included in the electronic device of the first embodiment, an interrupt status value when no interrupt occurs in the slave, and an interrupt status value when an interrupt occurs in the slave. Fig. 7A This is a sequence diagram showing the flow of communication between a master device included in the electronic device according to the first embodiment and a plurality of slave devices. Figure 7B This is a sequence diagram showing the flow of communication between a master device included in the electronic device according to the first embodiment and a plurality of slave devices. Figure 7C This is a sequence diagram showing the flow of communication between a master device included in the electronic device according to the first embodiment and a plurality of slave devices. Figure 8 This is a timing chart showing waveforms of potentials supplied to a clock bus, a data bus, a first data terminal, and a second data terminal included in the electronic device according to the first embodiment. Fig. 9 This is a block diagram of an electronic device according to the first embodiment in which multiple slave addresses are assigned by a daisy chain method. DETAILED DESCRIPTION
[0008] Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. In addition, in the accompanying drawings, the same or equivalent elements are denoted by the same reference numerals, and repeated descriptions are omitted.
[0009] 1. First Embodiment 1.1 Determination of the slave device that generates the interrupt In the case where the host has a plurality of interrupt terminals and a plurality of wirings connect a plurality of slaves to the plurality of interrupt terminals of the host, respectively, when an interrupt signal is input to the host, it is possible to determine that an interrupt has occurred in the slave connected to the interrupt terminal to which the interrupt signal is input. However, in this case, as the number of slaves increases, the number of wirings increases. Therefore, as the number of slaves increases, the area occupied by the wiring increases.
[0010] When the host has an interrupt terminal shared by multiple slaves and multiple slaves are connected to the interrupt terminal of the host by wiring, when an interrupt signal is input, the host cannot identify the slave in which the interrupt is occurring. Therefore, the host confirms whether an interrupt has occurred in each slave one by one. This method is also called a polling method. However, in this case, as the number of slaves increases, the time required to confirm whether an interrupt has occurred becomes longer.
[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 confirm whether an interruption occurs does not increase even when the number of slaves increases.
[0012] 1.2 Electronic equipment Figure 1 It is a block diagram of an electronic device according to the first embodiment.
[0013] Figure 1 The electronic device 1 of the first embodiment shown is a robot cleaner. The electronic device 1 detects the surrounding conditions and performs cleaning based on the detected surrounding conditions. The electronic device 1 may be an electronic device other than a robot cleaner.
[0014] like Figure 1 As shown, the electronic device 1 includes a host 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 host 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, 23) respectively include a plurality of second clock (SCL) terminals (21a, 22a, 23a), a plurality of second data (SDA) terminals (21b, 22b, 23b), and a plurality of second interrupt (INT) terminals (21c, 22c, 23c). In the first embodiment, the plurality of slaves 21, 22 and 23 are three slaves. The number of slaves provided by the electronic device may also be increased or decreased. The number of slaves provided by the electronic device can be increased within the range of the performance of the clock bus 31 and the data bus 32.
[0015] The master 11 and the plurality of slaves 21, 22, 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 wirings. The wirings include patterns and wires provided on a printed circuit board.
[0016] The first clock terminal 11a and the second clock terminals (21a, 22a, 23a) are electrically connected to a common clock bus 31. Thus, 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, 23b) are electrically connected to a common data bus 32. Thus, 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, 23c) are electrically connected to a common interrupt bus 33. Thus, 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 the power 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 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 line 51. Thus, the clock bus 31, the data bus 32, and the interrupt bus 33 are pulled up to the power line 51. The power line 51 is supplied with the power supply potential VI0. Thus, the clock bus 31, the data bus 32, and the interrupt bus 33 are supplied with a potential High (H) equivalent to the power supply potential VI0.
[0020] The master 11 transmits a clock signal from the first clock terminal 11a. The clock bus 31 transmits the transmitted clock signal from the first clock terminal 11a to the second clock terminals (21a, 22a, 23a). The slaves 21, 22, and 23 receive the transmitted clock signal through the second clock terminals 21a, 22a, and 23a, respectively. Thus, the master 11 transmits the clock signal to the slaves 21, 22, and 23.
[0021] The host 11 transmits a data signal from the first data terminal 11b. The data bus 32 transmits the transmitted data signal from the first data terminal 11b to the second data terminal (21b, 22b, 23b). The slaves (21, 22, 23) receive the transmitted data signal through the second data terminals (21b, 22b, 23b), respectively. Thus, the host 11 transmits the data signal to the slaves 21, 22, and 23. The host 11 transmits the data signal in synchronization with the clock signal transmitted from the first clock terminal 11a. The slaves (21, 22, 23) receive the data signal in synchronization with the clock signal received through the second clock terminals (21a, 22a, 23a), respectively.
[0022] Each slave 20 included in the 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 host 11 receives the transmitted data signal through the first data terminal 11b. Thus, each slave 20 transmits a data signal to the host 11. Each slave 20 transmits a data signal in synchronization with a clock signal received through the second clock terminal 20a of each slave 20. The host 11 receives a data signal in synchronization with a clock signal transmitted from the first clock terminal 11a.
[0023] Each slave 20 sends an interrupt signal from the second interrupt terminal 20c provided in each slave 20. The interrupt bus 33 transmits the transmitted interrupt signal from the second interrupt terminal 20c to the first interrupt terminal 11c. The host 11 receives the transmitted interrupt signal through the first interrupt terminal 11c. Thus, each slave 20 sends an interrupt signal to the host 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-squared-C; I 2 C) bus.
[0025] Each slave 20 is a device that operates by serial communication and outputs an interrupt signal indicating that the 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 also be a device other than a sensor.
[0026] The slave (hereinafter referred to as "interrupt slave") that has obtained the measurement value contained in the slaves 21, 22 and 23 and sent to the host 11 sends an interrupt signal to the host 11. When receiving the interrupt signal sent, the host 11 sends a signal indicating a read request of the measurement value to the interrupt slave. In response to receiving the signal indicating a read request of the sent measurement value, the interrupt slave sends the signal indicating the measurement value to the host 11. The host 11 receives the signal indicating the sent measurement value. The host 11 or a controller communicatively connected to the host 11 uses the measurement value represented by the received signal for controlling the electronic device 1. For example, each slave 20 is a time-of-flight (TOF) sensor that measures the distance and obtains the measurement value of the distance. In addition, the host 11 or the controller uses the measurement value of the distance for controlling the automatic driving of the sweeping robot.
[0027] The host 11 cannot identify the interrupt slave that sent the interrupt signal from the received interrupt signal itself. Therefore, the electronic device 1 is provided with a function for the host 11 to identify the interrupt slave after the host 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, 23) have multiple unique addresses that are different from each other. The multiple unique addresses are also called multi-slave addresses (MSA). The multiple MSAs are identifiers for identifying the multiple slaves 21, 22, and 23 from each other. In the first embodiment, the multiple MSAs are assigned by the host 11. There is also a case where the host 11 does not assign MSAs to the multiple slaves 21, 22, and 23. For example, when the multiple slaves 21, 22, and 23 are already identifiable devices, the host 11 does not assign MSAs to the multiple slaves 21, 22, and 23.
[0029] The host 11 can make the slave with the address send a data signal indicating a bit string by sending a data signal indicating an address and a read request. In addition, the host 11 can receive the sent data signal indicating a bit string. The host 11 can make the slaves 21, 22, and 23 send a data signal indicating a bit string by setting the address to GA. The host 11 can make the slaves included in the slaves 21, 22, and 23 and assigned an MSA consistent with the MSA send a data signal indicating a bit string by setting the address to MSA.
[0030] The host 11 transmits a data signal indicating an address and a write request, and then transmits a data signal indicating a bit string, so that the slave having the address can receive the data signal indicating the bit string. The host 11 sets the address to GA, so that the slaves 21, 22, and 23 can receive the data signal indicating the bit string. The host 11 sets the address to MSA, so that the slaves included in the slaves 21, 22, and 23 and having the same MSA as the MSA can receive the data signal indicating the bit string.
[0031] 1.3 Host Figure 2 This is a block diagram of the electronic device according to the first embodiment and the vicinity of a host included in the electronic device.
[0032] like Figure 2 As shown in the figure, the host 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 11 a is electrically connected to an input terminal of the buffer 72 . The output terminal of the buffer 72 is electrically connected to the controller 71 . Thus, the clock signal transmitted from the first clock terminal 11 a is input to the controller 71 via the buffer 72 .
[0034] The first data terminal 11b is electrically connected to an input terminal of the buffer 73. The output terminal of the buffer 73 is electrically connected to the controller 71. Thus, a data signal transmitted from the first data terminal 11b or a data signal received by 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 line 91. The ground potential is supplied to the ground line 91. When the gate of the pull-down transistor 76 is applied with the on potential H, the pull-down transistor 76 conducts the drain of the pull-down transistor 76 with the source of the pull-down transistor 76, pulls the first clock terminal 11a down to the ground line 91, and supplies the potential Low (L) equivalent to the ground potential to the first clock terminal 11a. When the gate of the pull-down transistor 76 is applied with the off potential L, the pull-down transistor 76 does not conduct the drain of the pull-down transistor 76 with the source of the pull-down transistor 76, and supplies the potential H to the first clock terminal 11a. The controller 71 supplies the on potential H or the off potential L to the gate of the pull-down transistor 76 via the buffer 74. As a result, the controller 71 causes the host 11 to transmit a clock signal from the first clock terminal 11 a .
[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 line 91. When the gate of the pull-down transistor 77 is applied with the on potential H, 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 the first data terminal 11b down to the ground line 91, and provides the potential L to the first data terminal 11b. When the gate of the pull-down transistor 77 is applied with the off potential L, the pull-down transistor 77 makes the drain of the pull-down transistor 77 not conductive with the source of the pull-down transistor 77, and provides the potential H to the first data terminal 11b. The controller 71 provides the on potential H or the off potential L to the gate of the pull-down transistor 77 via the buffer 75. Thus, the controller 71 causes the host 11 to send a data signal from the first data terminal 11b.
[0037] 1.4 Slave Figure 3 This is a block diagram of the electronic device according to the first embodiment and the vicinity of each slave device included in the electronic device.
[0038] like Figure 3 As shown, 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 obtaining a measured value to be sent to the host 11. The interrupt request circuit 111 provides a potential 141 indicating whether an interrupt is requested to the controller 112. When the interrupt request circuit 111 requests an interrupt, the potential 141 is set to a potential H. When the interrupt request circuit 111 does not request an interrupt, the potential 141 is set to a potential L.
[0040] The second clock terminal 20a of each slave 20 is electrically connected to an input terminal of the buffer 113. The output terminal of the buffer 113 is electrically connected to the controller 112. Thus, the clock signal received through 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 the input terminal of the buffer 114. The output terminal of the buffer 114 is electrically connected to the controller 112. Thus, a data signal transmitted from the second data terminal 20b or received by 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 line 91. When the gate of the pull-down transistor 118 is applied with the on-potential H, 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 the second clock terminal 20a down to the ground line 91, and supplies the potential L to the second clock terminal 20a. When the gate of the pull-down transistor 118 is applied with the off-potential L, the pull-down transistor 118 makes the drain of the pull-down transistor 118 not conductive with the source of the pull-down transistor 118, and supplies the potential H to the second clock terminal 20a. The controller 112 supplies the on-potential H or the 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 line 91. When the gate of the pull-down transistor 119 is applied with the on-potential H, 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 the second data terminal 20b down to the ground line 91, and provides the potential L to the second data terminal 20b. When the gate of the pull-down transistor 119 is applied with the off-potential L, the pull-down transistor 119 makes the drain of the pull-down transistor 119 not conductive with the source of the pull-down transistor 119, and provides the potential H to the second data terminal 20b. The controller 112 provides the on-potential H or the 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 20 b.
[0044] The controller 112 is electrically connected to the input terminal of the buffer 117. The output terminal of the buffer 117 is electrically connected to the gate of the pull-down transistor 120. The drain of the pull-down transistor 120 is electrically connected to the second interrupt terminal 20c provided in each slave 20. The source of the pull-down transistor 120 is electrically connected to the ground line 91. When the gate of the pull-down transistor 120 is applied with the on-potential H, 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 line 91, and provides the potential (L) to the second interrupt terminal 20c. When the gate of the pull-down transistor 120 is applied with the off-potential L, the pull-down transistor 120 makes the drain of the pull-down transistor 120 not conductive with the source of the pull-down transistor 120, and provides the potential H to the second interrupt terminal 20c. The controller 112 provides the on-potential H or the off-potential L to the gate of the pull-down transistor 120 via the buffer 117. Thus, the controller 112 causes each slave 20 to send 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, a potential L is applied to the second interrupt terminal 20c. When no interrupt occurs, a potential H is applied to the second interrupt terminal 20c. The potential L and the potential H represent a logical value 1 and a logical value 0. The logical value 1 and the logical value 0 are opposite to each other. Therefore, the logical value represented by the potential provided to the second interrupt terminal 20c is opposite to the logical value represented by the potential provided by the interrupt request circuit 111.
[0045] Thus, the second clock terminal 20a can be used for both input and output. In addition, the second data terminal 20b can be used for both input and output. In addition, 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 in a wired-OR connection. Therefore, when a potential L is provided to any one of the second data terminals 21b, 22b, and 23b, a potential L is provided to all of the first data terminal 11b and the second data terminals 21b, 22b, and 23b. In this regard, the same is true 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 by wired OR. Therefore, when the potential L is provided to any one of the second interrupt terminals 21c, 22c and 23c, the potential L is provided to all of the first interrupt terminal 11c and the second interrupt terminals 21c, 22c and 23c. In this regard, the second interrupt terminals 21c, 22c and 23c are the same even if they are open collector outputs.
[0048] 1.5 Slave Controller Figure 4 This is a block diagram of an interrupt request circuit and a controller included in each slave included in the electronic device according to the first embodiment.
[0049] like Figure 4 As shown, the controller 112 included in each slave 20 includes an MS 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 MSA 201 possessed by each slave 20. The MSA 201 possessed by each slave 20 is an identifier unique to each slave 20, which is different from the MSA possessed by other slaves. The output MSA 201 is a bit string containing a plurality of bits. In the first embodiment, the plurality of bits is 8 bits. The MSA output unit 161 that outputs the MSA 201 is an example of an identifier output unit that outputs an identifier unique to each slave 20. Therefore, the controller 112 may also include an identifier output unit that outputs an identifier other than the MSA 201 to replace the MSA output unit 161. Identifiers other than the MSA 201 are values representing values stored in a one-time programmable (OTP) memory possessed by each slave 20, values of potentials assigned to terminals possessed by each slave 20, and the like. However, compared with identifiers other than the MSA 201, the MSA 201 can be efficiently set, and the circuit constituting the electronic device 1 can be simplified.
[0051] The encoder 162 encodes the provided potential 141 into an interrupt state 202 based on the output MSA201. The interrupt state 202 obtained by encoding is a bit string including a plurality of bits. In the first embodiment, the plurality of bits are 8 bits. The interrupt state 202 includes a bit indicating whether an interrupt has occurred in each slave 20. The value of the bit is opposite to the value indicating the potential 141 provided by the interrupt request circuit 111. Therefore, the value of the bit is 0 indicating that an interrupt has occurred. The value of the bit is 1 indicating that no interrupt has occurred. The encoder 162 changes the position of the bit indicating whether an interrupt has occurred based on the MSA201. Thus, the interrupt slave in which the interrupt has occurred can be determined based on the position. The encoder 162 changes the position based on a part of the plurality of bits included in the MSA201. For example, the encoder 162 changes the position based on the lower 3 bits included in the plurality of bits. Thus, the potential 141 can be efficiently encoded, and the circuit constituting the electronic device 1 can be simplified. The encoder 162 sets the interrupt state 202 in the register 181.
[0052] The interface 163 is electrically connected to the buffers 113, 114, 115, and 116. In response to receiving the data signal indicating the GA and the read request of each slave 20 through the second data terminal 20b, the interface 163 causes each slave 20 to transmit the data signal indicating the interrupt state 202 set in the register 181 from the second data terminal 20b. The interface 163 is I 2 C interface.
[0053] 1.6 Interrupt Status FIG. 5A to FIG. 5D This is a diagram showing an interruption state obtained by the encoder included in the electronic device according to the first embodiment.
[0054] like FIG. 5A to FIG. 5D As shown, the interrupt state 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 upper bit to the lower bit in the order of the records. The encoder 162 shifts the bit indicating whether an interrupt has occurred in each slave 20 from the lowest eighth bit 228 to the upper bit only by the number of times that is consistent with the value of the lower 3 bits of the MSA 201 possessed by each slave 20. Thus, the encoder 162 changes the position based on the value. The position may also be changed based on the value by other methods.
[0055] Each slave 20 has MSA[00h] when MSA201 is not assigned by the master 11. Therefore, even when MSA201 is not assigned to each slave 20 by the master 11, when the encoder 162 encodes the potential 141 as the interrupt status 202 according to MSA201, 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 "0×0" of the lower 3 bits of MSA[00h] indicates whether an interrupt has occurred in the first slave 21, the second slave 22, and the third slave 23. For example, Figure 5A As shown, the first slave 21, the second slave 22, and the third slave 23 have GA200 (GA "0×29"), but when the MSA201 is not assigned to the first slave 21, the second slave 22, and the third slave 23, in the interrupt status 202 obtained by the first slave 21, the second slave 22, and the third slave 23, the common eighth bit 228 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 MSA201 is not assigned to each slave 20 by the host 11, when the encoder 162 does not encode the potential 141 as 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] like Figure 5B As shown, when MSA 201 (MSA "0×40") is assigned to the first slave 21, the encoder 162 of the first slave 21 shifts the bit indicating whether an interrupt has occurred in the first slave 21 from the eighth bit 228 at the lowest position to the upper position by 0 times, which is the number of times that the value "0×0" of the lower 3 bits of MSA "0×40" assigned to the first slave 21 is consistent. That is, the bit is not shifted from the eighth bit 228 at the lowest position. Therefore, in the interrupt status 202 obtained by the first slave 21, the eighth bit 228 at the lowest position indicates whether an interrupt has occurred in the first slave 21.
[0057] like Figure 5CAs shown, when MSA 201 (MSA "0×41") is further assigned to the second slave 22, the encoder 162 of the second slave 22 shifts the bit indicating whether an interrupt has occurred in the second slave 22 from the eighth bit 228 at the lowest position upward by one time, which is the number of times that the value "0×1" of the lower 3 bits of MSA "0×41" assigned to the second slave 22 is consistent. Therefore, in the interrupt status 202 obtained by the second slave 22, the seventh bit 227, which is one bit higher than the eighth bit 228 at the lowest position, indicates whether an interrupt has occurred in the second slave 22.
[0058] like Figure 5D As shown, when MSA 201 (MSA "0×42") is further assigned to the third slave 23, the encoder 162 of the third slave 23 shifts the bit indicating whether an interrupt has occurred in the third slave 23 from the eighth bit 228 at the lowest position to the upper position twice, which is the number of times that the value "0×2" of the lower 3 bits of MSA "0×42" assigned to the third slave 23 is consistent. Therefore, in the interrupt status 202 obtained by the third slave 23, the sixth bit 226, which is 2 bits higher than the eighth bit 228 at the lowest position, indicates whether an interrupt has occurred in the third slave 23.
[0059] like Figure 5B to Figure 5D As shown, the positions of the eighth bit 228, the seventh bit 227, and the sixth bit 226, which respectively indicate whether an interrupt has occurred in the first slave 21, the second slave 22, and the third slave 23, are different from each other. Therefore, it is possible to determine whether an interrupt has occurred in the first slave 21, the second slave 22, and the third slave 23, respectively, based on the interrupt status 202 obtained by the first slave 21, the second slave 22, and the third slave 23. 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 overlap by logical sum. The host 11 uses this situation to determine whether an interrupt has occurred in the first slave 21, the second slave 22, and the third slave 23.
[0060] The number of slaves that the host 11 can determine whether an interrupt occurs through a single read request depends on the number of bits of communication performed between the host 11 and each slave 20. For example, if the number of bits of communication performed between the host 11 and the slave 20 is 8 bits, the number of slaves that the host 11 can determine whether an interrupt occurs is 8.
[0061] 1.7 Interrupt Status Value Figure 6This is a table showing the relationship between the MSA given to the slave included in the electronic device of the first embodiment, the interrupt status value when no interrupt occurs in the slave, and the interrupt status value when an interrupt occurs in the slave.
[0062] As described above, the bit indicating whether an interrupt has occurred included in the interrupt status 202 obtained by each slave 20 is shifted upward from the lowest eighth bit 228 by the number of times that the value of the lower 3 bits of the MSA 201 assigned to each slave 20 matches. Figure 6 As shown, 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 is generated 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. Therefore, 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 correspond to the MSA "0x40", "0x41", "0x42", "0x43", "0x44", "0x45", "0x46", and "0x47", respectively.
[0063] The bit indicating whether an interrupt has occurred included in the interrupt status 202 obtained by each slave 20 has a value of "0" when an interrupt has occurred in each slave 20. This bit has a value of "1" when no interrupt has occurred in each slave 20. Bits other than this bit included in the interrupt status 202 obtained by each slave 20 have a value of "1".
[0064] Therefore, when no interruption occurs in each slave 20, all of the 8 bits included in the interruption status 202 obtained by each slave 20 have a value of "1". When an interruption occurs in each slave 20, one of the 8 bits has a value of "0", and seven of the 8 bits have a value of "1". Therefore, whether an interruption occurs can be determined based on the presence or absence of a bit having a value of "0". In addition, the interruption slave in which the interruption occurs can be determined based on the position of the bit having a value of "0".
[0065] 1.8 Communication between a master and multiple slaves FIG. 7A to FIG. 7C This is a sequence diagram showing the flow of communication between a master device included in the electronic device according to the first embodiment and a plurality of slave devices.
[0066] As shown in FIG. 7 , in step S1, the host 11 transmits the seventh signal 371 from the first data terminal 11b. The transmitted seventh signal 371 indicates the MSA 201 (MSA “0×40”) 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 through the second data terminal 21b. Thus, the host 11 transmits the seventh signal 371 indicating the MSA “0×40” assigned to the first slave 21 to the first slave 21. The first slave 21 sets the MSA “0×40” indicated by the received seventh signal 371 as the MSA of the first slave 21.
[0067] In the next step S2, the host 11 transmits the seventh signal 372 from the first data terminal 11b. The transmitted seventh signal 372 indicates the MSA 201 (MSA "0×41") provided 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 through the second data terminal 22b. Thus, the host 11 transmits the seventh signal 372 indicating the MSA "0×41" assigned to the second slave 22 to the second slave 22. The second slave 22 sets the MSA "0×41" indicated by the received seventh signal 372 as the MSA of the second slave 22.
[0068] In the next step S3, the host 11 transmits the seventh signal 373 from the first data terminal 11b. The transmitted seventh signal 373 indicates the MSA 201 (MSA "0×42") provided 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 through the second data terminal 23b. Thus, the host 11 transmits the seventh signal 373 indicating the MSA "0×42" assigned to the third slave 23 to the third slave 23. The third slave 23 sets the MSA "0×42" indicated by the received seventh signal 373 as the MSA of the third slave 23.
[0069] The setting of MSA from step S1 to step S3 can be performed by any method. For example, the setting of MSA can be performed by a daisy-chain method, an enable (En) method, a fuse repair (Fuse_trim) method, etc. However, an example of the setting of MSA based on the daisy-chain method will be described later.
[0070] like Figure 7BAs shown, in the next step S4, the second slave 22 and the third slave 23 included in the slaves 21, 22 and 23, which are interrupt slaves generating interrupts, respectively send third signals 332 and 333 from the second interrupt terminals 22c and 23c. The sent 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 third signals 332 and 333 sent from the second interrupt terminals 22c and 23c to the first interrupt terminal 11c, respectively. The host 11 receives the transmitted third signals 332 and 333 through the first interrupt terminal 11c. As a result, the second slave 22 and the third slave 23 send the third signals 332 and 333 to the host 11, respectively. The second interrupt terminals 21c, 22c and 23c are wired or connected through the interrupt bus 33. Therefore, when an interrupt occurs in any one of the slaves 21, 22, and 23, no matter which slave the interrupt occurs in, the potential L is provided to the first interrupt terminal 11c, the second interrupt terminals 21c, 22c, and 23c, and the interrupt bus 33. Therefore, when the host 11 receives an interrupt signal, it can determine that an interrupt occurs in any one of the slaves 21, 22, and 23, but cannot determine in which slave the interrupt occurs.
[0071] In the next step S5, the host 11 sends a fourth signal 340 from the first data terminal 11b in response to receiving the third signals 332 and 333. The sent fourth signal 340 indicates GA200 (GA "0x29") and the 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. Thus, the host 11 sends 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 respond to receiving the fourth signal 340 by sending the first signals 311, 312 and 313 from the second data terminals 21b, 22b and 23b, respectively. The sent first signals 311, 312 and 313 respectively represent the interrupt status 202 (interrupt status "11111111", "11111101" and "11111011") obtained by the slaves 21, 22 and 23.
[0073] The slaves 21, 22 and 23 simultaneously transmit the first signals 311, 312 and 313. The data bus 32 connects the second data terminals 21b, 22b and 23b by wired OR. Therefore, the data bus 32 overlaps the plurality of first signals 311, 312 and 313 transmitted simultaneously to generate the second signal 320, and transmits the generated second signal 320 to the first data terminal 11b. The host 11 receives the transmitted second signal 320 through the first data terminal 11b. The value of the i-th bit included in the overlapped interruption state 251 (overlapped interruption state "11111001") represented by the second signal 320 becomes the logical sum of the value of the i-th bit included in the interruption state 202 (interruption states "11111111", "11111101" and "11111011") represented by the first signals 311, 312 and 313 respectively. For example, the value "0" of the seventh bit 227 contained in the overlapping interrupt state "11111001" becomes the logical sum of the seventh bit values "1", "0" and "1" contained in the interrupt states "11111111", "11111101" and "11111011" represented by the first signals 311, 312 and 313 respectively.
[0074] The host 11 determines that the second slave 22 and the third slave 23 assigned with MSA "0×41" and MSA "0×42" are interruption slaves in which an interruption has occurred. The MSA "0×41" and MSA "0×42" correspond to the seventh bit 227 and the sixth bit 226 having a value of "0" indicating that an interruption has occurred, which are included in the overlapping interruption state 251 (overlapping interruption state "11111001"). Thus, the host 11 determines the interruption slave in which an interruption has occurred based on the second signal 320. The host 11 can determine the interruption slave by receiving the second signal 320 only once. Thus, the interruption slave can be determined in a short time.
[0075] like Figure 7C As shown, in the next step S7, the host 11 transmits the fifth signal 352 from the first data terminal 11b. The transmitted fifth signal 352 indicates the MSA 201 (MSA "0×41") and the request 252 for reading the measured value given to the second slave 22 determined as the interrupt slave that has been interrupted. 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. Thus, the host 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 through the second data terminal 20b, and transmits the sixth signal 362 from the second data terminal 20b when the MSA 201 (MSA "0x41") indicated by the received fifth signal 352 is consistent with the MSA assigned to each slave 20. Each slave 20 does not transmit the sixth signal 362 when the MSA "0x41" indicated by the received fifth signal 352 is inconsistent with the MSA of each slave 20. Thus, the second slave 22, which is determined to have the MSA "0x41" consistent with the MSA "0x41" indicated by the fifth signal 352 and is an interrupt slave that has been interrupted, receives the fifth signal 352 through 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 transmits the sixth signal 362 from the second data terminal 22b to the first data terminal 11b. The host 11 receives the transmitted sixth signal 362 through the first data terminal 11b. Thus, the second slave 22 transmits the sixth signal 362 to the host 11 in response to receiving the transmitted fifth signal 352. The host 11 receives the transmitted sixth signal 362 through the first data terminal 11b. Thus, the host 11 can obtain the measured value 262 obtained by the second slave 22.
[0077] In the next step S9, the host 11 transmits the fifth signal 353 from the first data terminal 11b. The transmitted fifth signal 353 indicates the MSA 201 (MSA "0x42") and the request 252 for reading the measured value given to the third slave 23 which is determined to be an interrupt slave having an interrupt. 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. Thus, the host 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 through the second data terminal 20b, and transmits the sixth signal 363 from the second data terminal 20b when the MSA 201 (MSA "0x42") indicated by the received fifth signal 353 is consistent with the MSA assigned to each slave 20. Each slave 20 does not transmit the sixth signal 363 when the MSA "0x42" indicated by the received fifth signal 353 is inconsistent with the MSA of each slave 20. Thus, the third slave 23, which is determined to have the MSA "0x42" consistent with the MSA "0x42" indicated by the fifth signal 353 and is an interrupt slave that has been interrupted, receives the fifth signal 353 through 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 transmits the sixth signal 363 from the second data terminal 23b to the first data terminal 11b. The host 11 receives the transmitted sixth signal 363 through the first data terminal 11b. Thus, the third slave 23 transmits the sixth signal 363 to the host 11 in response to receiving the transmitted fifth signal 353. The host 11 receives the transmitted sixth signal 363 through the first data terminal 11b. Thus, the host 11 can obtain the measured value 263 obtained by the third slave 23.
[0079] 1.9 Waveforms of Potentials Given by the Clock Bus, Data Bus, First Data Terminal, and Second Data Terminal Figure 8 The timing chart shows waveforms of potentials supplied to the clock bus, data bus, first data terminal, and second data terminal of the electronic device according to the first embodiment. Figure 7B The waveforms of the potentials in steps S5 and S6 are shown.
[0080] like Figure 8 As shown, the master 11 supplies a potential H to the first clock terminal 11a and the clock bus 31 during startup 401. While the master 11 supplies the potential H to the first clock terminal 11a and the clock bus 31, the master 11 supplies a potential L to the first data terminal 11b and the data bus 32. Thus, the master 11 issues a start state to the slaves 21, 22, and 23. Thus, communication between the master 11 and the slaves 21, 22, and 23 starts.
[0081] Next, the host controller 11 repeatedly applies the potential L and the potential H alternately to the first clock terminal 11a and the clock bus 31. Thus, the host 11 transmits the clock signal 421. The transmitted clock signal 421 includes the first clock pulse 501 to the eighteenth clock pulse 518.
[0082] Next, the master 11 supplies a potential H to the first clock terminal 11a and the clock bus 31 in the stopper 402. While the master 11 supplies the potential H to the first clock terminal 11a and the clock bus 31, the master 11 supplies a potential H to the first data terminal 11b and the data bus 32. Thus, the master 11 issues a stop state to the slaves 21, 22, and 23. Thus, the communication between the master 11 and the slaves 21, 22, and 23 is stopped.
[0083] The host 11 supplies potentials indicating the values of the first bit to the seventh bit included in the GA200 to the first data terminal 11b and the data bus 32, respectively, in synchronization with the first clock pulse 501 to the seventh clock pulse 507. In addition, the host 11 supplies a potential H indicating the read request 250 (R) to the first data terminal 11b and the data bus 32, in synchronization with the eighth clock pulse 508. Thus, the host 11 transmits the fourth signal 340 indicating the GA200 and the read request 250 to the slaves 21, 22, and 23.
[0084] When the fourth signal 340 transmitted can be received normally, the slaves 21, 22 and 23 respectively provide a potential L indicating an acknowledgment (ACK) to the second data terminals 21b, 22b and 23b in synchronization with the ninth clock pulse 509. Thus, the slaves 21, 22 and 23 provide a potential L indicating an acknowledgment to the data bus 32 in synchronization with the ninth clock pulse 509. When the fourth signal 340 transmitted cannot be received normally, the slaves (21, 22, 23) provide a potential H indicating a negative acknowledgment (NACK) to the second data terminals (21b, 22b, 23b) in synchronization with the ninth clock pulse 509. Thus, the slaves 21, 22 and 23 provide a potential H indicating a negative acknowledgment to the data bus 32 in synchronization with the ninth clock pulse 509. Here, it is assumed that the slaves 21, 22 and 23 can receive the fourth signal 340 normally.
[0085] The first slave 21 supplies the potentials representing the values of the first bit 221 to the eighth bit 228 included in the interrupt state 202 (interrupt state "11111111") to the second data terminal 21b and the data bus 32, respectively, in synchronization with the tenth clock pulse 510 to the seventeenth clock pulse 517. The second slave 22 supplies the potentials representing the values of the first bit 221 to the eighth bit 228 included in the interrupt state 202 (interrupt state "11111101") to the second data terminal 22b and the data bus 32, respectively, in synchronization with the tenth clock pulse 510 to the seventeenth clock pulse 517. The third slave 23 supplies the potentials representing the values of the first bit 221 to the eighth bit 228 included in the interrupt state 202 (interrupt state "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. Thus, the slaves 11, 22, and 23 send first signals 311, 312, and 313 indicating interruption states "11111111", "11111101", and "11111011" to the master 11, respectively. The interruption states "11111111", "11111101", and "11111011" are read data returned to the read request 250. The first slave 21 provides the potential H indicating that no interruption has occurred to the second data terminal 21b in synchronization with the seventeenth clock pulse 517. The second slave 22 provides the potential L indicating that an interruption has occurred to the second data terminal 22b in synchronization with the sixteenth clock pulse 516. The third slave 23 provides the potential L indicating that an interruption has occurred to the second data terminal 23b in synchronization with the fifteenth clock pulse 515. Thus, the slaves 22 and 23 provide the potential L indicating that an interruption has occurred to the clock bus 31 in synchronization with the fifteenth clock pulse 515 and the sixteenth clock pulse 516. The slave 21 supplies the clock bus 31 with a potential H indicating that no interruption has occurred, in synchronization with the seventeenth clock pulse 517 .
[0086] When the master 11 can normally receive the transmitted second signal 320, it provides a potential H indicating a negative acknowledgement (NACK) to the first data terminal 11b and the data bus 32 in synchronization with the eighteenth clock pulse 518. Thus, the master 11 does not grant the authority to control the data bus 32 to each slave 20, and inhibits each slave 20 from further sending a signal.
[0087] 1.10 Assignment of multiple slave addresses based on daisy chain Fig. 9 This is a block diagram of an electronic device according to the first embodiment in which multiple slave addresses are assigned by a daisy chain method.
[0088] like Fig. 9As shown, when multiple slave addresses are assigned by daisy chain, the electronic device 1 has an enable wiring 531, a first daisy chain wiring 532, a second daisy chain wiring 533 and a third daisy chain wiring 534. The host 11 has a first enable (EN) terminal 11d and a general purpose input and output (GPIO) terminal 11f. The plurality of slaves (21, 22, 23) respectively have a plurality of general purpose input and output (GPIO) registers 551, 552 and 553, respectively have a plurality of second enable (EN) terminals 21d, 22d and 23d, respectively have a plurality of general purpose input and output (GPIO0) terminals 21e, 22e and 23e, respectively have a plurality of general purpose input and output (GPIO1) terminals 21f, 22f and 23f.
[0089] The first enable terminal 11d and the second enable terminals (21d, 22d, 23d) are electrically connected to a common enable wiring 531. Thus, 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 universal input / output terminal 21e to the universal input / output terminal 11f. The second daisy chain wiring 533 electrically connects the universal input / output terminal 22e to the universal input / output terminal 21f. The third daisy chain wiring 534 electrically connects the universal input / output terminal 23e to the universal 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 connect the main unit 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 input-output terminals 21e, 22e, and 23e can be used for input. The general input-output terminals 21f, 22f, and 23f can be used for output.
[0092] When the potential L is provided to the second enable terminal 20d of each slave 20, each slave 20 cannot send and receive data signals using the second clock terminal 20a and the second data terminal 20b of each slave 20. When the potential H is provided to the second enable terminal 20d, each slave 20 can send and receive data signals using the second clock terminal 20a and the second data terminal 20b.
[0093] When the potential L is supplied to the general input / output terminal 20e of each slave 20, the daisy chain mode of each slave 20 becomes invalid. Therefore, each slave 20 cannot accept the granting of MSA201 using the second clock terminal 20a and the second data terminal 20b. When the potential H is supplied to the general input / output terminal 20e, the daisy chain mode of each slave 20 becomes valid. Therefore, each slave 20 can accept the granting of MSA201 using the second clock terminal 20a and the second data terminal 20b.
[0094] Each slave 20 supplies a potential indicating a value set in the general input / output register 550 included in each slave 20 to the general input / output terminal 20 f.
[0095] In the initial state when the MSA 201 is provided in a daisy-chain manner, the master 11 provides a potential L to the first enable terminal 11d and the general input / output terminal 11f. In addition, a value "0" is set in the general input / output register 550. Therefore, each slave 20 provides a potential L indicating a value "0" to the general input / output terminal 20f. Therefore, a potential L is provided to the second enable terminal 20d and the general input / output terminal 20e. Therefore, each slave 20 cannot use the second clock terminal 20a and the second data terminal 20b to send and receive data signals. In addition, the daisy-chain mode of each slave 20 becomes invalid. Therefore, each slave 20 cannot use the second clock terminal 20a and the second data terminal 20b to accept the granting of the MSA 201.
[0096] Next, the host 11 increases the potential provided to the first enable terminal 11d and the general input / output terminal 11f from the potential L to the potential H. Thus, 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 input / output terminal 21e. Thus, the first slave 21 can use the second clock terminal 21a and the second data terminal 21b to send and receive data signals. In addition, the daisy chain mode of the first slave 21 becomes effective. Therefore, the first slave 21 can use the second clock terminal 21a and the second data terminal 21b to accept the granting of MSA201.
[0097] Next, the master 11 transmits the seventh signal 371 indicating the GA 200 (GA “0×29”) and the MSA 201 (MSA “0×40”) assigned to the first slave 21 to the first slave 21 .
[0098] Next, the first slave 21 receives the seventh signal 371 indicating the transmitted MSA 201 (MSA “0×40”) at the second data terminal 21 b capable of transmitting and receiving data signals. The first slave 21 sets the MSA “0×40” indicated by the received seventh signal 371 as the MSA of the first slave 21 .
[0099] Next, the master 11 lowers the potential supplied to the general input / output terminal 11f from the potential H to the potential L. Thus, the potential L is supplied to the first daisy chain wiring 532 and the general input / output terminal 21e. Thus, the daisy chain mode of the first slave 21 becomes invalid. Therefore, the first slave 21 cannot accept the granting of the MSA 201 using the second clock terminal 21a and the second data terminal 21b.
[0100] Next, the first slave 21 sets the value "1" in the general input / output register 551. As a result, the first slave 21 provides the potential H indicating the value "1" set in the general input / output register 551 to the general input / output terminal 21f. As a result, the potential H is given to the second daisy chain wiring 533 and the general input / output terminal 22e. As a result, the daisy chain mode of the second slave 22 becomes effective. Therefore, the second slave 22 can receive the MSA 201 using the second clock terminal 22a and the second data terminal 22b.
[0101] Next, the master 11 transmits the seventh signal 372 indicating the GA 200 (GA “0×29”) and the MSA 201 (MSA “0×41”) assigned to the second slave 22 to the second slave 22 .
[0102] Next, the second slave 22 receives the seventh signal 372 indicating the transmitted MSA 201 (MSA "0×41") through the second data terminal 22b, which can be used to send and receive data signals. The second slave 22 sets the MSA "0×41" indicated by the received seventh signal 372 as the MSA of the second slave 22.
[0103] Next, the second slave 22 sets the value "1" in the general input / output register 552. As a result, the second slave 22 provides the potential H indicating the value "1" set in the general input / output register 552 to the general input / output terminal 22f. As a result, the potential H is given to the third daisy chain wiring 534 and the general input / output terminal 23e. As a result, the daisy chain mode of the third slave 23 becomes effective. Therefore, the third slave 23 can receive the MSA 201 using the second clock terminal 23a and the second data terminal 23b.
[0104] Next, the master 11 transmits the seventh signal 373 to the third slave 23 , the seventh signal 373 indicating the GA 200 (GA “0×29”) and the MSA 201 (MSA “0×42”) assigned to the third slave 23 .
[0105] Next, the third slave 23 receives the seventh signal 373 representing the transmitted MSA 201 (MSA "0×42") through the second data terminal 23b, and the second data terminal 23b can be used to send and receive data signals. The third slave 23 sets the MSA "0×42" represented by the received seventh signal 373 as the MSA of the third slave 23.
[0106] Thus, 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 is completed.
[0107] The present disclosure is not limited to the above-described embodiments, and may be replaced with a structure that is substantially the same as the structure shown in the above-described embodiments, a structure that has the same function and effect, or a structure that can achieve the same purpose.
Claims
1. An electronic device, characterized in that: have: Host; and A plurality of slaves each of which is assigned a plurality of identifiers different from each other, Each slave included in the multiple slaves sends a first signal to the host, wherein the first signal represents a bit string, the bit string includes a bit indicating whether an interrupt has occurred in each slave, and each slave included in the multiple slaves changes the position of the bit based on an identifier assigned to each slave.
2. The electronic device according to claim 1, characterized in that: The host has a first data terminal, The plurality of slaves respectively have a plurality of second data terminals, The electronic device further includes a data bus, wherein the data bus connects the plurality of second data terminals to each other by wired OR and electrically connects the plurality of second data terminals to the first data terminal. Each slave sends the first signal from a second data terminal provided in the slave. The plurality of slaves simultaneously transmit a plurality of first signals respectively transmitted by the plurality of slaves, The data bus overlaps the plurality of first signals to generate a second signal, and transmits the second signal to the first data terminal. The host receives the second signal through the first data terminal.
3. The electronic device according to claim 1 or 2, characterized in that: The identifier comprises a plurality of bits, Each of the slaves changes the position based on a portion of the plurality of bits.
4. The electronic device according to claim 1, characterized in that: An interrupt slave included in the plurality of slaves that generates the interrupt sends a third signal to the host, The master sends a fourth signal to the plurality of slaves in response to receiving the third signal, The slaves transmit the first signal in response to receiving the fourth signal.
5. The electronic device according to claim 4, characterized in that: The plurality of slaves have a common address, and the fourth signal indicates the common address.
6. The electronic device according to claim 4 or 5, characterized in that: The host has a first data terminal and a first interrupt terminal, The plurality of slaves respectively have a plurality of second data terminals and a plurality of second interrupt terminals. The electronic device further comprises: a data bus that wires and connects the plurality of second data terminals to each other and electrically connects the plurality of second data terminals to the first data terminal; and an interrupt bus that connects the plurality of second interrupt terminals to each other and electrically connects the plurality of second interrupt terminals to the first interrupt terminal; The interrupt slave sends the third signal from a second interrupt terminal provided in the interrupt slave. The interrupt bus transmits the third signal from the second interrupt terminal of the interrupt slave to the first interrupt terminal. The host receives the third signal through the first interrupt terminal, and sends 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 receive the fourth signal respectively through the plurality of second data terminals, In response to receiving the fourth signal, each of the slaves transmits the first signal from a second data terminal included in the each slave.
7. The electronic device according to claim 1, characterized in that: The host determines an interrupt slave that generates the interrupt and is included in the plurality of slaves based on a second signal generated by superimposing a plurality of first signals respectively transmitted by the plurality of slaves, and transmits a fifth signal to the plurality of slaves. The interrupt slave sends a sixth signal to the host in response to receiving the fifth signal, The host receives the sixth signal.
8. The electronic device according to claim 7, characterized in that: The fifth signal indicates an identifier assigned to the interrupt slave, When the identifier represented by the fifth signal is consistent with the identifier assigned to each slave, each slave sends the sixth signal to the master; when the identifier represented by the fifth signal is inconsistent with the identifier assigned to each slave, the sixth signal is not sent to the master.
9. The electronic device according to claim 8, characterized in that: The host has a first data terminal, The plurality of slaves respectively have a plurality of second data terminals, The electronic device further comprises a data bus, wherein the data bus connects the plurality of second data terminals to each other by wired OR and electrically connects the plurality of second data terminals to the first data terminal; The host sends 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 through the second data terminal of the interrupt slave, and sends the sixth signal from the second data terminal of the interrupt slave in response to receiving the fifth signal. The data bus transmits the sixth signal from the second data terminal of the interrupt slave to the first data terminal. The host receives the sixth signal through the first data terminal.
10. The electronic device according to claim 7, characterized in that: Each of the slaves is a device that operates by serial communication and outputs an interrupt signal indicating that the operation is completed.
