Multi-slave communication circuit and control method thereof

CN122547730APending Publication Date: 2026-08-11SUZHOU YIZHI SMART DRIVE TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-03-24
Publication Date
2026-08-11

AI Technical Summary

Technical Problem

[0005]本申请实施例提供了一种多从机通信电路及其控制方法,旨在解决传统采用RS485收发芯片的方式导致成本增加、占用空间大以及通信效率比较低的问题

Benefits of technology

[0017]本申请实施例通过在主机控制器和多个从机控制器之间设置开关控制模块,所述开关控制模块用于响应于所述控制信号,选择性地将主机控制器与任一从机控制器导通,如此,无需为每个从机配备独立的RS485收发芯片,即可实现串口通信节点的扩展,有效避免了因使用所带来的成本增加和PCB空间占用大的问题,并且由于通信链路中未引入半双工的RS485器件,因此,主机与从机之间可以实现全双工通信,从而提高通信效率。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122547730A_ABST
    Figure CN122547730A_ABST
Patent Text Reader

Abstract

This application relates to a multi-slave communication circuit and its control method, comprising: a master controller having a signal control terminal; a slave controller group including multiple slave controllers; and a switch control module having a control pin connected between the master controller and the multiple slave controllers, the control pin being connected to the signal control terminal for receiving a control signal sent by the master controller. The switch control module is configured to, in response to the control signal, connect the master controller to any one of the multiple slave controllers. This application can reduce costs and achieve full-duplex communication between the master and slave controllers, thereby improving communication efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of communication technology, and in particular to a multi-slave communication circuit and its control method. Background Technology

[0002] In recent years, the demand for the number of serial port peripheral interfaces of MCUs has been increasing in electronic products of various industries such as artificial intelligence, instrumentation, industrial automation, and new energy. If an MCU with more serial communication interfaces is selected, the number of pins will often increase dramatically, which will not only occupy more space and cause serious waste of GPIO, but also significantly increase the cost.

[0003] To alleviate the problem of limited MCU serial port resources, RS485 transceivers are often used in a master-slave communication architecture to connect the master to multiple slave devices, thereby expanding the serial port nodes.

[0004] However, this solution requires each slave device to be equipped with an independent RS485 transceiver chip. When there are a large number of slave devices, not only does the hardware cost increase and the space occupied increase, but also, since RS485 transceivers are essentially half-duplex devices, the method of using RS485 transceiver chips can only achieve half-duplex communication, resulting in relatively low communication efficiency. Summary of the Invention

[0005] This application provides a multi-slave communication circuit and its control method, aiming to solve the problems of increased cost, large space occupation, and low communication efficiency caused by the traditional use of RS485 transceiver chips.

[0006] In a first aspect, embodiments of this application provide a multi-slave communication circuit, including: A host controller, wherein the host controller has a signal control terminal; A slave controller group, wherein the slave controller group includes a plurality of slave controllers; A switch control module has a control pin, which is connected between the host controller and multiple slave controllers. The control pin is connected to the signal control terminal to receive a control signal sent by the host controller. The switch control module is configured to turn on any one of the multiple slave controllers in response to the control signal.

[0007] In some embodiments, the signal control terminal of the host controller includes an enable control terminal and a logic configuration terminal, and the control pin includes an enable control pin and a logic configuration pin. The enable control pin is connected to the enable control terminal, and the logic configuration pin is connected to the logic configuration terminal.

[0008] In some embodiments, the host controller includes a host transmitter, each slave controller includes a slave receiver, and the switch control module has a first set of switch pins. The first set of switch pins includes a host transmitter common pin and a plurality of slave receiver pins. The host transmitter common pin is connected to the host transmitter and can be selectively turned on by any one of the plurality of slave receiver pins. The plurality of slave receiver pins are respectively connected to the slave receivers in the plurality of slave controllers one by one.

[0009] In some embodiments, the host controller further includes a host receiver, and each slave controller further includes a slave transmitter. The switch control module also has a second set of switch pins, which includes a host receiver common pin and multiple slave transmitter pins. The multiple slave transmitter pins are respectively connected to the slave transmitter pins of the multiple slave controllers. The host receiver common pin is connected to the host receiver and can be selectively turned on by any one of the multiple slave transmitter pins.

[0010] In some embodiments, there are multiple signal control terminals, slave controller groups, and switch control modules, and each of the signal control terminals, slave controller groups, and switch control modules is connected in a one-to-one correspondence. Each switch control module is configured to control the target slave controller in the corresponding slave controller group to work according to the control signal sent by the signal control terminal, wherein the target slave controller is one of the slave controller groups.

[0011] Secondly, this application provides a multi-slave communication method applied to the circuit described above, the method comprising: The control signal is sent to the switch control module through the signal control terminal; The switch control module controls the master controller to connect to any one of the multiple slave controllers based on the control signal.

[0012] In some embodiments, the control signal includes a logic level signal of a logic configuration terminal. Based on the control signal, turning on any one of the multiple slave controllers includes: Based on the logic level signal, the host controller is connected to any one of the multiple slave controllers.

[0013] In some embodiments, there are multiple logic configuration terminals, each with a corresponding logic level signal. The step of connecting the host controller to any one of the multiple slave controllers based on the logic level signal includes: Based on the combined state of multiple logic level signals, the host controller is connected to any one of the multiple slave controllers.

[0014] In some embodiments, the control signal further includes an enable signal, wherein the enable control pin of the switch control module receives the enable signal and is used to enable or disable the switch control module.

[0015] In some embodiments, the number of signal control terminals, slave controller groups, and switch control modules are all multiple, and the signal control terminals, slave controller groups, and switch control modules are connected in a one-to-one correspondence. The method includes: Each control signal is sent to the corresponding switch control module through the corresponding signal control terminal; Each of the aforementioned switch control modules, based on the received control signals, connects the host controller and the target slave controller in the corresponding slave controller group.

[0016] This application provides a multi-slave communication circuit, including: a master controller having a signal control terminal; a slave controller group including multiple slave controllers; and a switch control module having a control pin connected between the master controller and the multiple slave controllers, with the control pin connected to the signal control terminal for receiving a control signal sent by the master controller. The switch control module is configured to, in response to the control signal, connect the master controller to any one of the multiple slave controllers.

[0017] This application embodiment sets up a switch control module between the host controller and multiple slave controllers. The switch control module is used to selectively connect the host controller to any slave controller in response to the control signal. In this way, it is not necessary to equip each slave with an independent RS485 transceiver chip, so as to realize the expansion of serial communication nodes. This effectively avoids the problems of increased cost and large PCB space occupation caused by use. Furthermore, since no half-duplex RS485 device is introduced into the communication link, full-duplex communication can be realized between the host and the slave, thereby improving communication efficiency. Attached Figure Description

[0018] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0019] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0020] One or more embodiments are illustrated by way of example with reference numerals in the accompanying drawings. These illustrations do not constitute a limitation on the embodiments. Elements with the same reference numerals in the drawings are denoted as similar elements. Unless otherwise stated, the figures in the drawings are not to be limited by scale.

[0021] Figure 1 A schematic diagram of the structure for expanding communication nodes using an RS485 bus for onboard communication; Figure 2 This application provides a schematic diagram of the structure of an extended communication node using a switch control module. Figure 3 The schematic diagram provided in this application illustrates the structure of concurrent communication using multiple switch control modules. Figure 4 A circuit diagram of the host controller provided in this application; Figure 5 A circuit diagram of the first switch control module provided in this application; Figure 6 A circuit diagram of the second switch control module provided in this application; Figure 7 A circuit diagram of the slave controller group provided in this application; Figure 8 This is a flowchart illustrating the first embodiment of a control method for multi-slave communication provided in this application.

[0022] Explanation of icon numbers: The system includes a master controller 10, a slave controller group 20, a first slave controller group 21, a second slave controller group 22, a slave controller 201, a switch control module 30, an enable control pin EN, a first logic configuration pin A, a second logic configuration pin B, a master transmit common pin YCOM, and a master receive common pin XCOM. Detailed Implementation

[0023] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0024] The following disclosure provides numerous different embodiments or examples for implementing various structures of this application. To simplify the disclosure, specific examples of components and arrangements are described below. These are merely examples and are not intended to limit the scope of this application. Furthermore, reference numerals and / or letters may be repeated in different examples. Such repetition is for simplification and clarity and does not in itself indicate a relationship between the various embodiments and / or arrangements discussed.

[0025] It should be understood that, when used in this specification and the appended claims, the terms "comprising" and "including" indicate the presence of the described features, integrals, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or collections thereof.

[0026] It should also be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the scope of the application. As used in this specification and the appended claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise.

[0027] It should also be further understood that the term “and / or” as used in this application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.

[0028] As used in this specification and the appended claims, the term "if" may be interpreted, depending on the context, as "when," "once," "in response to determination," or "in response to detection." Similarly, the phrase "if determined" or "if [described condition or event] is detected" may be interpreted, depending on the context, as "once determined," "in response to determination," "once [described condition or event] is detected," or "in response to detection of [described condition or event]."

[0029] To alleviate the problem of limited MCU serial port resources, RS485 transceivers are often used in a master-slave communication architecture to connect the master to multiple slave devices, thereby expanding the serial port nodes.

[0030] like Figure 1 As shown, each node on the RS485 bus must have an RS485 chip. When there are 8 slave nodes, 9 RS485 chips are required, which not only takes up more PCB space but also significantly increases the cost.

[0031] In addition, the nodes of the RS485 bus are highly coupled, and when a node fails, it will cause the bus to be paralyzed. Furthermore, RS485 is a half-duplex communication, which has low communication efficiency.

[0032] To address the aforementioned issues, this application provides a multi-slave communication circuit that can reduce costs, enable full-duplex communication between the master and slave devices, and thereby improve communication efficiency.

[0033] See Figure 2 , Figure 2 This application provides a schematic diagram of a multi-slave communication circuit, which includes a master controller 10, a slave controller group 20, and a switch control module 30.

[0034] The host controller 10 has a signal control terminal; The slave controller group 20 includes a plurality of slave controllers 201; The switch control module 30 has a control pin, which is connected between the host controller 10 and multiple slave controllers. The control pin is connected to the signal control terminal to receive the control signal sent by the host controller 10. The switch control module 30 is configured to turn on the host controller 10 and any one of the multiple slave controllers in response to the control signal.

[0035] This embodiment sets up a switch control module 30 between the host controller 10 and multiple slave controllers 201. The switch control module 30 is used to selectively connect the host controller 10 to any slave controller in response to the control signal. In this way, the serial communication node can be expanded without equipping each slave with an independent RS485 transceiver chip, which effectively avoids the problems of increased cost and large PCB space occupation caused by use. Furthermore, since no half-duplex RS485 device is introduced into the communication link, full-duplex communication can be achieved between the host and the slave, thereby improving communication efficiency.

[0036] See Figure 3 In some embodiments, there are multiple signal control terminals, slave controller groups 20, and switch control modules 30, and the signal control terminals, slave controller groups 20, and switch control modules 30 are connected in a one-to-one correspondence. Each switch control module 30 is configured to control the target slave controller in the corresponding slave controller group 20 to work according to the control signal sent by the signal control terminal, wherein the target slave controller is one of the slave controller groups 20.

[0037] For example, the multiple slave controller groups 20 are respectively a first slave controller group 21 and a second slave controller group 22; the multiple signal control terminals are respectively a first group of signal control terminals and a second group of signal control terminals; and the multiple switch control modules 30 are respectively a first switch control module and a second switch control module.

[0038] The first set of signal control terminals of the host controller 10 is connected to the first slave controller group 21 through the first switch control module; the second set of signal control terminals of the host controller 10 is connected to the second slave controller group 22 through the second switch control module.

[0039] In some embodiments, the signal control terminal of the host controller includes an enable control terminal and a logic configuration terminal, and the control pin includes an enable control pin and a logic configuration pin. The enable control pin is connected to the enable control terminal, and the logic configuration pin is connected to the logic configuration terminal.

[0040] The number of logical configuration terminals can be set according to the actual situation, and this application does not impose a specific limit.

[0041] For example, such as Figures 4-7 As shown, the host controller 10 (i.e. Figure 4 The main MCU's signal control terminal includes an enable control terminal, a first logic configuration terminal, and a second logic configuration terminal. The control pins include an enable control pin EN, a first logic configuration pin A, and a second logic configuration pin B. The enable control pin EN is connected to the enable control terminal, the first logic configuration pin A is connected to the first logic configuration terminal, and the second logic configuration pin B is connected to the second logic configuration terminal.

[0042] For example, when there are two signal control terminals, the enable control terminal, the first logic configuration terminal, and the second logic configuration terminal of the first group of signal control terminals are EN1, A1, and B1, respectively, and the enable control terminal, the first logic configuration terminal, and the second logic configuration terminal of the second group of signal control terminals are EN2, A2, and B2, respectively. EN1 is connected to the enable control pin EN of the first switch control module U1, A1 is connected to the first logic configuration pin A of the first switch control module U1, B1 is connected to the second logic configuration pin B of the first switch control module U1, EN2 is connected to the enable control pin EN of the second switch control module U2, A2 is connected to the first logic configuration pin A of the second switch control module U2, and B2 is connected to the second logic configuration pin B of the second switch control module U2.

[0043] In some embodiments, the host controller 10 includes a host transmitter MCU_TX, each slave controller includes a slave receiver DEV_RX, and the switch control module 30 has a first set of switch pins. The first set of switch pins includes a host transmitter common pin YCOM and multiple slave receiver pins (e.g., Y1-Y4). The host transmitter common pin YCOM is connected to the host transmitter and can be selectively turned on by any one of the multiple slave receiver pins. The multiple slave receiver pins are respectively connected to the slave receivers in the multiple slave controllers one by one.

[0044] like Figures 4-7 As shown, exemplarily, it is assumed that the multiple slave controllers in the slave controller group 20 are slave controller 1 (i.e., Figure 7 Slave MCU1), Slave Controller 2 (i.e. Figure 7 Slave MCU2), slave controller 3 (i.e. Figure 7 From MCU3), slave controller 4 (i.e. Figure 7 The slave receivers DEV_RX of slave controllers 1, 2, 3, and 4 are DEV_RX11, DEV_RX12, DEV_RX13, and DEV_RX14, respectively. DEV_RX11 is connected to Y1, DEV_RX12 to Y2, DEV_RX13 to Y3, and DEV_RX14 to Y4. The master transmit common pin YCOM can be selectively connected to one of Y1-Y4.

[0045] For example, when there are two slave controller groups 20 and two switch control modules 30, the master transmitter can be MCU_TX1 and MCU_TX2. MCU_TX1 is connected to YCOM in the first switch control module U1, and MCU_TX2 is connected to YCOM in the second switch control module U2.

[0046] The slave controllers in the first slave controller group 21 are slave controller 1, slave controller 2, slave controller 3, and slave controller 4. The slave receivers DEV_RX of slave controller 1, slave controller 2, slave controller 3, and slave controller 4 are DEV_RX11, DEV_RX12, DEV_RX13, and DEV_RX14, respectively. DEV_RX11 is connected to Y1 in the first switch control module U1, DEV_RX12 is connected to Y2 in the first switch control module U1, DEV_RX13 is connected to Y3 in the first switch control module U1, and DEV_RX14 is connected to Y4 in the first switch control module U1. The master transmit common pin YCOM in the first switch control module U1 can be selectively connected to one of Y1-Y4 in the first switch control module U1.

[0047] The multiple slave controllers in the second slave controller group 22 are slave controller 5 (i.e. Figure 7 From MCU5), slave controller 6 (i.e. Figure 7 From MCU6), slave controller 7 (i.e. Figure 7 From MCU7), slave controller 8 (i.e. Figure 7 The slave receivers DEV_RX of slave controllers 5, 6, 7, and 8 (from MCU8) are DEV_RX21, DEV_RX22, DEV_RX23, and DEV_RX24, respectively. DEV_RX21 is connected to Y1 in the second switch control module U2, DEV_RX12 is connected to Y2 in the second switch control module U2, DEV_RX13 is connected to Y3 in the second switch control module U2, and DEV_RX14 is connected to Y4 in the second switch control module U2. The master transmit common pin YCOM in the second switch control module U2 can be selectively connected to one of Y1-Y4 in the second switch control module U2.

[0048] like Figures 4-7 As shown, in some embodiments, the host controller 10 further includes a host receiver MCU_RX, and each slave controller further includes a slave transmitter DEV_TX. The switch control module 30 also has a second set of switch pins, which includes a host receiver common pin XCOM and multiple slave transmitter pins (e.g., X1-X4). The multiple slave transmitter pins are respectively connected to the slave transmitters in the multiple slave controllers one-to-one. The host receiver common pin XCOM is connected to the host receiver and can be selectively turned on by any one of the multiple slave transmitter pins.

[0049] For example, assuming that the multiple slave controllers in the slave controller group 20 are slave controller 1, slave controller 2, slave controller 3, and slave controller 4, and the slave transmitters DEV_TX of slave controller 1, slave controller 2, slave controller 3, and slave controller 4 are DEV_TX11, DEV_TX12, DEV_TX13, and DEV_TX14 respectively, then DEV_TX11 is connected to X1, DEV_TX12 is connected to X2, DEV_TX13 is connected to X3, and DEV_TX14 is connected to X4. The master receive common pin XCOM can be selectively connected to one of X1-X4.

[0050] For example, when there are two slave controller groups 20 and two switch control modules 30, the master receiver MCU_RX can be MCU_RX1 and MCU_RX2. MCU_RX1 is connected to the XCOM in the first switch control module U1, and MCU_RX2 is connected to the XCOM in the second switch control module U2.

[0051] Since YCOM and XCOM in the first switch control module U1 and the second switch control module U2 are respectively connected to MCU_TX1, MCU_RX1 and MCU_TX2, MCU_RX2 of the host controller 10 (i.e., U3), full-duplex serial port expansion in concurrent communication mode is realized.

[0052] The slave controllers in the first slave controller group 21 are slave controller 1, slave controller 2, slave controller 3, and slave controller 4. The slave transmitters DEV_TX of slave controllers 2, 3, and 4 are DEV_TX11, DEV_TX12, DEV_TX13, and DEV_TX14, respectively. DEV_TX11 is connected to X1 in the first switch control module U1, DEV_TX12 is connected to X2 in the first switch control module U1, DEV_TX13 is connected to X3 in the first switch control module U1, and DEV_TX14 is connected to X4 in the first switch control module U1. The master receiver common pin XCOM in the first switch control module U1 can be selectively connected to one of X1-X4.

[0053] The slave controllers in the second slave controller group 22 are slave controller 5, slave controller 6, slave controller 7, and slave controller 8. The slave transmitters DEV_TX of slave controllers 5, 6, 7, and 8 are DEV_TX21, DEV_TX22, DEV_TX23, and DEV_TX24, respectively. DEV_TX21 is connected to X1 in the second switch control module U2, DEV_TX12 is connected to X2 in the second switch control module U2, DEV_TX13 is connected to X3 in the second switch control module U2, and DEV_TX14 is connected to X4 in the second switch control module U2. The master receiver common pin XCOM in the second switch control module U2 can be selectively connected to one of X1-X4 in the second switch control module U2.

[0054] The enable control pin EN, the first logic configuration pin A, and the second logic configuration pin B in the switch control module 30 constitute the control unit of the switch control module 30. In addition to implementing the bidirectional communication logic between the master MCU and the slave MCU, the control unit in the switch control module 30 also controls the enable and high-impedance states of the switch module.

[0055] YCOM, Y1-Y4, XCOM, and X1-X4 in the switch control module 30 constitute the switch module.

[0056] Specifically, firstly, the master MCU enables the switch module through the control unit in the switch control module 30. Then, the master MCU sets the bridging logic between the master MCU and the slave MCU through the control unit, ultimately realizing bidirectional communication between the master MCU and the slave MCU. That is, the bridging logic is determined by setting the state of the input signal of the switch control module 30 through the master MCU.

[0057] Thus, the switch control module 30 enables one-to-one full-duplex bridged communication between the master MCU and the slave MCU, offering advantages such as high communication efficiency, small footprint, low power consumption, and low coupling. When a slave MCU node fails, it does not affect the normal communication of the remaining slave MCU nodes.

[0058] In addition, if the host controller 10 (master MCU) has more than two serial ports, it can also realize concurrent communication mode, which improves the communication efficiency between the master MCU and the slave MCU.

[0059] It should be noted that communication between the master MCU and the slave MCU can be implemented using a variety of common communication protocols, including but not limited to UART, I²C and CAN.

[0060] Based on the multi-slave communication circuits provided in the above embodiments, refer to the first embodiment of a control method for multi-slave communication provided in this application, such as... Figure 8 As shown, the method includes: Step 110: Send the control signal to the switch control module through the signal control terminal.

[0061] Step 120: Control the switch control module to connect the host controller to any one of the multiple slave controllers based on the control signal.

[0062] In some embodiments, the control signal includes a logic level signal of the logic configuration terminal. Based on the control signal, connecting the host controller to any one of the plurality of slave controllers includes: connecting the host controller to any one of the plurality of slave controllers based on the logic level signal.

[0063] In some embodiments, there are multiple logic configuration terminals, each with a corresponding logic level signal. The step of connecting the host controller to any one of the multiple slave controllers based on the logic level signal includes: connecting the host controller to any one of the multiple slave controllers based on the combined state of the multiple logic level signals.

[0064] For example, in some embodiments, the control signal includes a two-bit logic level signal, which is formed by combining the logic values ​​of the level signals corresponding to the first logic configuration terminal A and the second logic configuration terminal B, wherein the logic value of the level signal of the first logic configuration terminal is the first bit of the two-bit logic level signal, and the logic value of the level signal of the second logic configuration terminal is the second bit of the two-bit logic level signal.

[0065] For example, when the logic value of the first logic configuration terminal A is 0, it represents a low-level signal; when the logic value of the second logic configuration terminal B is 0, it represents a low-level signal, and the combination forms "00"; When the logic value of the first logic configuration terminal A is 0, it represents a low-level signal; when the logic value of the second logic configuration terminal B is 1, it represents a high-level signal, and the combination forms "01"; When the logic value of the first logic configuration terminal A is 1, it represents a high-level signal; when the logic value of the second logic configuration terminal B is 0, it represents a low-level signal, and the combination forms "10". When the logic value of the first logic configuration terminal A is 1, it represents a high-level signal; when the logic value of the second logic configuration terminal B is 1, it represents a high-level signal, and the combination forms "11".

[0066] In some embodiments, the plurality of slave controllers are respectively a first slave controller, a second slave controller, a third slave controller, and a fourth slave controller; The step of connecting the host controller to any one of the multiple slave controllers based on the control signal includes: 1) When the two logic level signals are "00", the host controller and the first slave controller (e.g., Figure 7 The MCU1 is turned on. 2) When the two logic level signals are "01", the host controller and the second slave controller (e.g., Figure 7 (MCU2) is turned on; 3) When the two logic level signals are "10", the host controller and the third slave controller (e.g., Figure 7 (MCU3) is turned on; 4) When the two logic level signals are "11", the host controller and the fourth slave controller (e.g., Figure 7 The MCU4 is turned on.

[0067] The switch control module consists of YCOM, Y1-Y4, XCOM, and X1-X4. YCOM and Y1-Y4, and XCOM and X1-X4, are two independent bridge switches. The bridging logic of these switches is related to the input states of the control units EN, A, and B. Specifically, when EN is enabled, A and B each input logic at high or low levels, resulting in four possible combinations: 00, 01, 10, and 11. These correspond to YCOM bridging Y1-Y4 and XCOM bridging X1-X4, respectively.

[0068] For example, see Figures 4-7 For 1)-4), the following explanation will be given using two sets of switch control modules as an example: When the combined state of AB in the first switch control module is 00, then YCOM in the first switch control module is bridged to Y1, XCOM in the first switch control module is bridged to X1, and MCU1 is turned on. When the combined state of AB in the first switch control module is 01, then YCOM in the first switch control module is bridged to Y2, and XCOM in the first switch control module is bridged to X2; MCU2 is turned on. When the combined state of AB in the first switch control module is 10, then YCOM in the first switch control module is bridged to Y3, and XCOM in the first switch control module is bridged to X3; MCU3 is turned on. When the combination state of AB in the first switch control module is 11, then YCOM in the first switch control module is bridged to Y4, and XCOM in the first switch control module is bridged to X4; MCU4 is turned on.

[0069] When the combined state of AB in the second switch control module is 00, then YCOM in the second switch control module is bridged to Y1, and XCOM in the second switch control module is bridged to X1, and MCU5 is turned on. When the combined state of AB in the second switch control module is 01, then YCOM in the second switch control module is bridged to Y2, and XCOM in the second switch control module is bridged to X2; MCU6 is turned on. When the combined state of AB in the second switch control module is 10, then YCOM in the second switch control module is bridged to Y3, and XCOM in the second switch control module is bridged to X3; MCU7 is turned on. When the combined state of AB in the second switch control module is 11, then YCOM in the second switch control module is bridged to Y4, and XCOM in the second switch control module is bridged to X4; MCU8 is turned on.

[0070] In some embodiments, the control signal further includes an enable signal, wherein the enable control pin of the switch control module receives the enable signal and is used to enable or disable the switch control module.

[0071] In some embodiments, the number of signal control terminals, slave controller groups, and switch control modules are all multiple, and the signal control terminals, slave controller groups, and switch control modules are connected in a one-to-one correspondence. Referring to a second embodiment of a control method for multi-slave communication provided in this application, the method includes: Step 210: Send each control signal to the corresponding switch control module through the corresponding signal control terminal.

[0072] Step 220: Control each of the switch control modules to turn on the host controller and the target slave controller in the corresponding slave controller group based on the received control signal.

[0073] For example, when the host controller sends two sets of control signals, such as A1B1 being 00 and A2B2 being 11, the combined state of AB in the first switch control module is 00, and the target slave controller (i.e., MCU1) in the first slave controller group is turned on; the combined state of AB in the second switch control module is 11, and the target slave controller (i.e., MCU8) in the second slave controller group is turned on.

[0074] The storage medium is a physical, non-transient storage medium, such as a USB flash drive, external hard drive, read-only memory (ROM), magnetic disk, or optical disk, or any other physical storage medium capable of storing program code. The computer-readable storage medium can be non-volatile or volatile.

[0075] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this application.

[0076] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative. For example, the division of each unit is merely a logical functional division, and there may be other division methods in actual implementation. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed.

[0077] The steps in the methods of this application embodiment can be adjusted, merged, or deleted according to actual needs. The units in the apparatus of this application embodiment can be merged, divided, or deleted according to actual needs. Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0078] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, a terminal, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application.

[0079] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.

[0080] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Since these modifications and variations fall within the scope of the claims and their equivalents, this application also intends to include these modifications and variations.

[0081] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and these modifications or substitutions should all be covered within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A multi-slave communication circuit, characterized in that, include: A host controller, wherein the host controller has a signal control terminal; A slave controller group, wherein the slave controller group includes a plurality of slave controllers; A switch control module has a control pin, which is connected between the host controller and multiple slave controllers. The control pin is connected to the signal control terminal to receive a control signal sent by the host controller. The switch control module is configured to turn on any one of the multiple slave controllers in response to the control signal.

2. The multi-slave communication circuit according to claim 1, characterized in that, The host controller's signal control terminal includes an enable control terminal and a logic configuration terminal. The control pin includes an enable control pin and a logic configuration pin. The enable control pin is connected to the enable control terminal, and the logic configuration pin is connected to the logic configuration terminal.

3. The multi-slave communication circuit according to claim 1, characterized in that, The host controller includes a host transmitter, and each slave controller includes a slave receiver. The switch control module has a first set of switch pins, which includes a host transmitter common pin and multiple slave receiver pins. The host transmitter common pin is connected to the host transmitter and can be selectively connected to any one of the multiple slave receiver pins. The multiple slave receiver pins are respectively connected to the slave receivers in the multiple slave controllers.

4. The multi-slave communication circuit according to claim 3, characterized in that, The host controller further includes a host receiver, and each slave controller also includes a slave transmitter. The switch control module also has a second set of switch pins, which includes a host receiver common pin and multiple slave transmitter pins. The multiple slave transmitter pins are respectively connected to the slave transmitters in the multiple slave controllers. The host receiver common pin is connected to the host receiver and can be selectively turned on by any one of the multiple slave transmitter pins.

5. The multi-slave communication circuit according to any one of claims 1-4, characterized in that, The number of signal control terminals, slave controller groups, and switch control modules are all multiple, and the signal control terminals, slave controller groups, and switch control modules are connected in a one-to-one correspondence. Each switch control module is configured to control the target slave controller in the corresponding slave controller group to work according to the control signal sent by the signal control terminal, wherein the target slave controller is one of the slave controller groups.

6. A control method for multi-slave communication, characterized in that, Applied to the circuit as described in any one of claims 1-5, the method comprises: The control signal is sent to the switch control module through the signal control terminal; The switch control module controls the master controller to connect to any one of the multiple slave controllers based on the control signal.

7. The control method for multi-slave communication according to claim 6, characterized in that, The control signal includes a logic level signal at the logic configuration terminal. Based on the control signal, connecting the host controller to any one of the multiple slave controllers includes: Based on the logic level signal, the host controller is connected to any one of the multiple slave controllers.

8. The control method for multi-slave communication according to claim 7, characterized in that, The logic configuration terminals are multiple, each with a corresponding logic level signal. The step of connecting the host controller to any one of the multiple slave controllers based on the logic level signal includes: Based on the combined state of multiple logic level signals, the host controller is connected to any one of the multiple slave controllers.

9. The control method for multi-slave communication according to claim 6, characterized in that, The control signal also includes an enable signal, wherein the enable control pin of the switch control module receives the enable signal and is used to enable or disable the switch control module.

10. The control method for multi-slave communication according to claim 6, characterized in that, The number of signal control terminals, slave controller groups, and switch control modules are all multiple, and each of the signal control terminals, slave controller groups, and switch control modules is connected in a one-to-one correspondence. The method includes: Each control signal is sent to the corresponding switch control module through the corresponding signal control terminal; Each of the aforementioned switch control modules, based on the received control signals, connects the host controller and the target slave controller in the corresponding slave controller group.