Electronic device and operating method of the electronic device
By introducing an address switching unit and a power switching unit in the electronic device, and switching using address and power control signals, the problem of limited number of slave devices in the prior art is solved, and a wider communication capability is achieved.
Patent Information
- Application Number
- CN202310792964.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-30
- Publication Date
- 2024-12-31
AI Technical Summary
Communication between various components in existing electronic devices is limited by the number of address bits and cannot effectively expand the number of slave devices.
By introducing an address switching unit and a power switching unit, switching is achieved using the address control signal and the power control signal to realize communication between multiple slave devices, and the communication capability is expanded.
Communication with a larger number of slave devices is achieved, breaking through the address digit limit, and improving the communication capabilities of electronic devices.
Smart Images

Figure CN119226203A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of electronics, and in particular to communication between various components in electronic equipment. Background Art
[0002] In electronic devices, functions such as information transmission, exchange, sharing, and logic control are usually performed between various components through a bus. There may be multiple slave devices in multiple components of an electronic device, which communicate with the same master device respectively. When a master device needs to send data to or receive data from one of the multiple slave devices associated with it, the master device sends the address of the slave device, and based on the address, the corresponding slave device can be selected to send or receive data with the master device.
[0003] The above-mentioned method of switching and expanding slave devices by using only addresses is limited by the address bits supported by various components in the electronic device, and the number of slave devices is limited. Summary of the invention
[0004] It is desirable to provide an electronic device and an operating method thereof, which support two master devices to communicate with a greater number of slave devices.
[0005] According to one aspect, an electronic device is provided, comprising: a control unit, which includes at least a first master device and a second master device; a controlled unit, which includes a plurality of slave devices, any one of the plurality of slave devices can be selected based on an address control signal from the first master device and a power control signal from the second master device to communicate with the control unit through a serial bus; a plurality of address switching units, each of the plurality of address switching units is connected to the first master device through a first switching switch, and is connected to corresponding slave devices of the plurality of slave devices through a plurality of second switching switches different from each other, so that a group of address switching units of the plurality of address switching units can be selected in response to the address control signal, wherein any two switching switches of the plurality of second switching switches are connected to different slave devices of the plurality of slave devices; and one or more power switching units, each of the one or more power switching units includes a third switching switch connected to the second master device and a plurality of fourth switching switches different from each other, so that one address switching unit of the corresponding group of address switching units can be selected in response to the power control signal, so that the selected one address switching unit is powered on and the other address switching units of the plurality of address switching units are powered off.
[0006] According to another aspect, an operating method of an electronic device according to an embodiment of the present invention is provided, the operating method comprising: selecting the group of address switching units among the multiple address switching units based on the address control signal, and selecting one address switching unit among the group of address switching units based on the power control signal, so that the selected one address switching unit is powered on, thereby selecting a specific slave device among the multiple slave devices; and performing data sending and / or receiving between the control unit and the specific slave device among the controlled unit.
[0007] According to still another aspect, a computer-readable medium is provided, storing a computer program, wherein when the computer program is executed by a processor or a computer, the processor or the computer executes the method according to various embodiments of the present invention.
[0008] According to various embodiments of various aspects of the present invention, in addition to using an address switching unit to switch between multiple slave devices according to an address control signal, power switching is also performed. Specifically, a group of address switching units among multiple address switching units is selected according to the address control signal, and a power switching unit is introduced, and one of the multiple address switching units is powered on according to the power control signal, and the one address switching unit is one of the address switching units in the group of address switching units, while the other address switching units are powered off. In this way, switching based on power is superimposed on switching between multiple slave devices based on addresses, thereby enabling communication with a larger number of slave devices. BRIEF DESCRIPTION OF THE DRAWINGS
[0009] Embodiments are illustrated by way of example only and not by way of limitation in the figures of the accompanying drawings in which like reference numerals refer to similar elements.
[0010] Figure 1 A block diagram of an electronic device according to an embodiment of the present invention is shown;
[0011] Figure 2 shows data transmitted by a first host device through a serial bus according to an embodiment of the present invention;
[0012] Figure 3 shows data transmitted by a second host device through a serial bus according to an embodiment of the present invention;
[0013] Figure 4 A topological structure diagram showing address-based switching between a plurality of slave devices in a control unit and a controlled unit in an electronic device according to an embodiment of the present invention;
[0014] Figure 5A topological structure diagram showing power-based switching between a control unit and a plurality of slave devices in a controlled unit in an electronic device according to an embodiment of the present invention is shown;
[0015] Figure 6 A product structure view of an electronic device according to an embodiment of the present invention is shown;
[0016] Figure 7 A flow chart showing an operating method of an electronic device according to an embodiment of the present invention is shown.
[0017] Various aspects and features of various embodiments of the present invention are described with reference to the above drawings. The above drawings are only illustrative and not restrictive. In addition, not all parts of the device of the embodiment of the present invention are marked with reference numerals in the above drawings. Only relevant parts are marked in some drawings, which does not limit the parts to those shown in the drawings of the specification. DETAILED DESCRIPTION
[0018] The electronic device of the present invention will be described below with reference to a scanning test device for, for example, a printed circuit board, but this is not restrictive, and it is understood that the electronic device of the present invention may also include other types of devices, such as computers, etc.
[0019] Figure 1 FIG. 1 shows a block diagram of an electronic device 10 according to an embodiment of the present invention. Figure 1 As shown, the electronic device 10 at least includes a control unit 11, an address switching unit 12, a power switching unit 13 and a plurality of slave devices 14. The plurality of slave devices 14 as a whole can be referred to as a controlled unit, or the controlled unit includes the plurality of slave devices 14. Although not shown, the power switching unit 13 can be multiple.
[0020] like Figure 1 As shown, the control unit 11 includes a first host device 111 and a second host device 112. Although only two host devices are shown, this is not restrictive and more than two host devices may be included. The address switching unit 12 includes a plurality of address switching units, such as Figure 1At least two address switching units 121 and 122 are shown. Each address switching unit includes a first switching switch connected to the first master device 111, and any one or more address switching units can be controlled and selected through the first switching switch; each address switching unit also includes a different second switching switch to connect to different slave devices in the multiple slave devices 14 through the different second switching switches, and each second switching switch can be connected to one or more slave devices 14. The second switching switch of each address switching unit is connected to the corresponding slave device through the corresponding sub-bus, which constitutes a sub-path, and each address switching unit supports multiple sub-paths. Figure 1 As shown, in each sub-path, each second switch of the address switching unit 12 is connected to only one slave device. By providing address information and controlling the first switch and the second switch of the address switching unit, each address switching unit 12 can be controlled separately to select a slave device to communicate with it. Although not shown, the power switching unit 13 can be one or more. The power switching unit is connected to the second main device 112 through a third switch to control the power supply to the corresponding power switching unit. At the same time, each power switching unit 13 also supports multiple sub-paths, which include multiple fourth switches to control the power supply of a corresponding group of address switching units. Specifically, by controlling multiple fourth switches that are different from each other, one address switching unit in a corresponding group of address switching units of each power switching unit can be selected, so that the selected address switching unit is powered on and the other address switching units are powered off.
[0021] The control unit 11 is capable of generating an address control signal and a power control signal corresponding to a specific slave device according to the address of a specific slave device to be communicated. In the case where each second switching switch is connected to only one slave device, the address control signal includes at least the address of each first switching switch of a group of address switching units to be selected and the address of a specific second switching switch of each address switching unit in a group of address switching units to be selected. The address control signal may also include the address of a slave device connected to a specific second switching switch. In the case where each second switching switch is connected to more than one slave device, the address control signal also includes the address of a specific slave device in at least two slave devices connected to the specific second switching switch. If there is only one power switching unit, the power control signal includes at least the address of the fourth switching switch corresponding to the address switching unit to be selected. If there are multiple power switching units, the power control signal includes the address of the third switching switch of the power switching unit to be selected, and the address of the fourth switching switch corresponding to the address switching unit to be selected.
[0022] Figure 2 and Figure 31 and 2 respectively show data transmitted by a first host device and a second host device through a serial bus according to an embodiment of the present invention. Figure 2 As shown, the structure of the data includes the start condition Srt (start), the address switch unit address ASUA (address switch unit address) (i.e., the address of the first switch) (e.g., 7 bits), the read / write bit R / W (read / write), the response bit ACK / NACK (non-acknowledged), the address switch unit sub-way (i.e., the second switch) address ASUSA (address switch unit slave address) (e.g., 7 bits), the slave address SAA (slave address) (e.g., 7 bits), the data DA (data) (e.g., 8 bits) and the end Sp (stop). The data to be transmitted can be transmitted in multiple "data DA" parts in a cycle until the data transmission is completed. The address control signal referred to in the present invention can refer to any type of data including the address switch unit address ASUA, the address switch unit sub-way address ASUSA and the slave address SAA.
[0023] like Figure 3 The structure of the data shown includes the start condition Srt, the power switching unit (third switching switch) address (e.g. 7 bits), the read / write bit R / W, the response bit ACK / NACK, the power switching unit sub-path (i.e., the fourth switching switch) address (e.g. 7 bits), data DA (e.g. 8 bits) and the end Sp.
[0024] After receiving Figure 2 and 3 The data shown in the figure is used as the address control signal and the power control signal. Figure 1 In the illustrated embodiment, the first master device 111 sends an address control signal for the specific slave device to the address switching unit 12, and the second master device 112 sends a power control signal for the specific slave device to the power switching unit 13, thereby controlling the address switching unit 12 and the power switching unit 13 to operate together to select the specific slave device to be communicated, thereby performing data transmission and reception between the master device and the specific slave device.
[0025] The address switching unit 12 receives the address from the control unit (such as Figure 1In the embodiment of the present invention, the first master device 111 is configured to receive an address control signal from the first master device 111 as shown, and in response to the address control signal, a group of address switching units can be selected. In a specific example, in response to the address control signal, not only the group of address switching units can be selected, but also a specific second switching switch connected to a slave device of each address switching unit in the group of address switching units can be selected, and further a specific slave device among multiple slave devices connected to the specific second switching switch (if there are multiple slave devices connected to the specific second switching switch) can be selected. Each group of address switching units can include multiple address switching units.
[0026] The power switching unit 13 receives the power from the control unit (such as Figure 1 In the embodiment of the present invention, the power supply control signal of the second master device 112 shown in the figure is used to control the power supply control signal of the second master device 112. In response to the power supply control signal, one of the multiple address switching units can be selected, so that the power supply of the one of the multiple address switching units is turned on, and the power supply of the other address switching units is turned off. When the address switching unit 12 selects a group of address switching units in response to the address control signal, the power supply switching unit 13 is controlled based on the power supply control signal to select an address switching unit, especially a specific address switching unit in the group of address switching units, and the specific address switching unit is powered on, so that the selection of a specific slave device connected to the specific address switching unit can be achieved.
[0027] Each of the plurality of slave devices 14 is connected to a corresponding second switch of the corresponding address switching unit 12. By controlling the address switching unit 12 and the power switching unit 13 by the first master device and the second master device, respectively, based on both the address control signal and the power control signal, each slave device 14 can be individually selected to achieve communication with the master device, especially data transmission and / or reception.
[0028] Although not shown, the electronic device 10 may also include a power supply unit that supplies power to the above-mentioned components in the electronic device. Although only one power switching unit 13 is shown, this is not restrictive. In a specific embodiment, it is desirable to include multiple power switching units 13, each power switching unit controls the power supply of a corresponding group of address switching units, and each group of address switching units includes multiple address switching units. Each power switching unit can select an address switching unit in a corresponding group of address switching units in response to a power control signal, so that the selected address switching unit is powered on and the other address switching units are powered off.
[0029] Figure 4 FIG. 2 shows a topological structure diagram of address-based switching between a plurality of slave devices in a control unit and a controlled unit in an electronic device 20 according to an embodiment of the present invention. Figure 4As shown, the electronic device 20 includes a control unit 11 having a first master device 111 and a second master device 112, 32 address switching units 12_1, 12_2, ... 12_32, 8 power switching units 13_1, 13_2, ... 13_8 and 512 slave devices 14_1, 14_2 ... 14_512. Figure 1 Similar components of the electronic device 10 are shown in Figure 2 Similar reference numerals are used in the drawings.
[0030] like Figure 2 The electronic device 20 shown is a scanning test device for testing electronic products (especially printed circuit boards). In the scanning test device, the multiple slave devices 1 include 512 magnetic sensor devices. In other types of devices, the multiple slave devices can also be other types of devices, for example, in a transmitting and / or receiving device, the multiple slave devices include multiple transmitting and / or receiving elements, such as antennas; in a communication device, the multiple slave devices include multiple communication elements.
[0031] like Figure 4 As shown, the control unit 11 is a microcontroller or similar device with an I2C (Inter Integrated Circuit, IIC, integrated circuit interconnection) bus, such as a field programmable gate array (FPGA), a digital signal processor (DSP), a microcontroller (MCU), etc. In addition, the control unit 11 includes an interface such as a USB interface to communicate with a computer. In an embodiment of the scan test device, the control unit 11 can communicate with the computer through the interface, but this is not restrictive, and it can also be imagined that the main device and the central processing unit are part of the computer and communicate with the central processing unit.
[0032] The first master device 111 of the control unit 11 communicates with multiple address switching units 12_1, 12_2, ... 12_32 through a first serial bus (I2C_SDA_1, I2C_SCL_1). Specifically, the first master device is connected to the address switching unit through a first switching switch (SDA_1, SCL_1). The second master device 112 communicates with multiple power switching units 13_1, 13_2, ... 13_8 through a second serial bus (I2C_SDA_2, I2C_SCL_2). Specifically, the second master device is connected to the power switching unit through a third switching switch (SDA_2, SCL_2). Figure 4The first and second buses shown support only three address selection bits respectively, that is, the first bus and the second bus can communicate with up to eight address switching units respectively. Thus, four of the 32 address switching units 12_1, 12_2, ... 12_32 are connected to the first bus in a group. That is, the address control signal transmitted to the address switching unit on the first bus includes the address of a group of address switching units (i.e., the address of the corresponding first switching switch), and thus, in response to the address control signal, the address of the group of address switching units is selected. There are exactly eight power switching units 13, so each power switching unit corresponds to each address of the second bus.
[0033] Each address switching unit includes different second switching switches (also called sub-routes, i.e., "SDA1, SCL1", "SDA2, SCL2", ... "SDA8, SCL8"), which are respectively connected to the corresponding slave devices through corresponding sub-buses I2C_SDA1_1, I2C_SCL1_1, ... I2C_SDA8_1, I2C_SCL8_1 ... I2C_SDA8_32, I2C_SCL8_32, such as Figure 2 As shown, each second switch communicates with two slave devices.
[0034] Taking the control unit 11 to communicate with the slave device 14_1 as an example, the address control signal sent from the first control unit 111 includes the address of a group of address switching units including address switching units 12_1, 12_2, 12_3 and 12_4, the address of the second switch "SDA1, SCL1" in the address switching unit, and the address of the first slave device 14_1 of the two slave devices connected to the second switch "SDA1, SCL1". In response to the address control signal, the first control unit can select a group of address switching units including address switching units 12_1, 12_2, 12_3 and 12_4, and can select a specific second switch of the address switching unit, and then select one of the two slave devices connected to the specific second switch.
[0035] Figure 5 The topological structure diagram of power-based switching between a control unit and a plurality of slave devices in a controlled unit in an electronic device 20 according to an embodiment of the present invention is shown.
[0036] The electronic device 20 also includes a power supply unit 15, which is used to supply power to various components of the electronic device via a power path 1V8DC. The power supply unit 15 may include an input interface 151 and an output interface 152, which receives a voltage from a power supply having a USB interface, for example, and the input voltage may be between 5-36 volts DC voltage; the output interface supplies power to the address switching unit and various slave devices, and the voltage may be 1.0, 1.2, 1.8, 3.3 volts DC voltage. Although not shown, the power supply unit 15 may also include a DC to DC conversion circuit to convert the input voltage into output voltages of different levels.
[0037] like Figure 5 As shown, each power switching unit receives the voltage from the output interface 152 of the power unit 15 as input I1 / 2 / 3 / 4 to respectively power each address switching unit of a group of address switching units. Each power switching unit includes fourth switching switches O1, O2, O3 and O4, which respectively power the corresponding address switching unit through the corresponding sub-buses 1V8DC_1, 1V8DC_2, 1V8DC_3, 1V8DC_4, ... 1V8DC_32. In response to the power control signal sent from the second control unit 112, any group of address switching units can be selected, and then any one of the address switching units in any group of address switching units can be selected to power it, while the other address switching units are powered off.
[0038] Taking the control unit 11 to communicate with the slave device 14_1 as an example, in response to the power control signal, the sub-bus 1V8DC_1 of the power switching unit is selected, that is, the address switching unit 12_1 in a group of address switching units including the address switching units 12_1, 12_2, 12_3 and 12_4 is selected to be powered, and the other address switching units are powered off. Thus, under the joint action of the address control signal and the power control signal, the slave device 14_1 can be selected to communicate with the control unit 11.
[0039] By introducing the above-described power supply-based switching between slave devices, it is possible to enable the control unit 11 to communicate with a greater number of slave devices.
[0040] Theoretically, one I2C bus can only support up to 2 7 -1 = 127 slave devices (7 address bits, minus 1 broadcast address) communication. Figure 2 and 3In the embodiment shown, the first and second buses only support 3 address selection bits respectively, the address switching unit can use a chip of model TCA9548, and each TCA9548 chip supports up to 8 sub-paths. The power switching unit can use a chip of model TPS22993, and each TPS22993 chip supports up to 4 loads, namely, the four fourth switching switches O1, O2, O3 and O4 shown in the figure.
[0041] Therefore, for the above Figure 2 and Figure 3 For the embodiment shown, through this topology, the master device can communicate with up to 8*8*4*2=512 slave devices. That is, two buses can be used to expand communication with 512 slave devices. Among them: 1) Each address switching unit supports up to 8 sub-paths, 2) The two buses support selection between up to 8 addresses (for the address switching unit, each address corresponds to a group of address switching units; for the power switching unit, each address corresponds to a power switching unit), 3) Each power switching unit supports up to 4 sub-paths, 4) Each sub-path of the address switching unit can be connected to 2 slave devices.
[0042] The above targets Figure 2 and Figure 3 The specific bus and the type of switching unit shown describe the number of slave devices that can be expanded as described above, which is not restrictive. The number of slave devices that can be expanded can vary according to the specific situation. For example, when each second switching switch of the address switching unit can be connected to n slave devices, the master device can communicate with up to 8*8*4*n slave devices. When n is greater than 2, it can be expanded to more than 512 slave devices. In short, when the bus connected to the address switching unit supports a maximum of a addresses, each address switching unit includes a maximum of b sub-paths, and each power switching unit includes a maximum of c sub-paths, and each sub-path of the address switching unit can be connected to n slave devices, the master device can communicate with a*b*c*n slave devices at most. Among them, multiple address switching units should be divided into a groups, each group is controlled by a power switching unit (that is, the number of address switching units in each group should be c (maximum value), and it can also be expected to be less than c).
[0043] Although the topology of the above embodiments of the present invention is shown with reference to the I2C bus, this is not restrictive, and an I3C (Improved Inter Integrated Circuit, IIIC) bus may also be used, and other types of buses are also contemplated, such as the System Management Bus (SMBus). Figure 2 and 3In the scanning test equipment shown, the magnetic sensor used for testing is usually designed and manufactured by MicroElectro Mechanical Systems (MEMS). The MEMS design can use I2C and I3C bus protocols.
[0044] MEMS sensors are very small, and it is expected that as many MEMS sensors as possible can be integrated into the smallest possible printed circuit board. The topology of the scanning test equipment described above can realize communication with a larger number of MEMS sensors, thereby making it possible to integrate more MEMS sensors for testing. Although the above description refers to the control unit including a first main device and a second main device to describe how to generate and send address control signals and power control signals, this is not restrictive. It is also conceivable to use two control units to perform the functions of the first and second main devices. The generation of control signals may also not be performed in the control unit described above.
[0045] In addition, if Figure 4 and 5 The magnetic sensor device used in the scan test device shown has only two I2C addresses, which are configured by applying a high level or a low level to an address selection pin, that is, one of the two magnetic sensor devices connected to the interface can be selected by applying a high level or a low level to the address selection pin after selecting the address of the corresponding interface of the address switching unit. In fact, if the slave device can support more I2C addresses, each second switch of the address switching unit can be connected to more slave devices. For example, Figure 2 and 3 In the case shown, the address of one slave device among the plurality of slave devices connected to the specific second switch included in the address control signal can be indicated by whether the applied level is high or low.
[0046] Furthermore, if Figure 3 As shown, each slave device is powered via the power path 1V8DC, and will not be powered off as the address switching unit and the power switching unit are disconnected, that is, each slave device is connected to the power supply independently of the address switching unit and the power switching unit to remain powered on. This is because the magnetic sensor needs to be calibrated each time it is powered off and then powered on before it can be used normally, which consumes time and manpower. For this reason, all magnetic sensors as slave devices are kept powered on during the power-on process of the device, and are no longer powered off in the middle. This is not restrictive either. In other application scenarios, the slave device can also be powered on and off as the address switching unit and the power switching unit are operated, that is, each slave device is powered on (powered on) only when it is selected.
[0047] Figure 6A product structure view of an electronic device 20 according to an embodiment of the present invention is shown. Figure 4 (a) shows a front view of a scanning test device as an electronic device 20, Figure 4 (b) shows a back view of the scanning test device as the electronic device 20. Figure 4 As shown, the scan test device includes a control unit 11, 32 address switching units 12 (shown in gray blocks), 8 power switching units 13 (shown in gray blocks), a plurality of slave devices 14 and a power supply unit 15. Figure 4 As shown in (a) and (b) respectively, the address switching unit 12 and the power switching unit 13 are provided on two opposite sides of the same circuit board. It can be seen that the address switching unit and the power switching unit can also be formed into one switching unit, so the address switching unit and the power switching unit mentioned in this specification and the claims can also be different parts of the same component, not limited to being formed by different components. In addition, other components in this specification and the claims are not limited to being formed by different components, but can be integrated into the same component.
[0048] Figure 7 A flow chart of an operating method 100 of an electronic device according to an embodiment of the present invention is shown.
[0049] According to the method 100, at step 110, an address control signal is received and a group of address switching units among a plurality of address switching units is selected based on the address control signal. The address control signal can include the address of the selected group of address switching units, the address of a specific second switch of each address switching unit in the group of address switching units, and the address of a specific slave device connected to the specific second switch.
[0050] Based on the address control signal, not only a group of address switching units among multiple address switching units can be selected, and the multiple address switching units may include multiple groups of address switching units, but also a specific second switching switch of each address switching unit in a group of address switching units and a slave device connected to the specific second switching switch can be selected.
[0051] At step 120, a power control signal is received and one of a group of address switching units selected according to the address control signal is selected based on the power control signal so that the selected one address switching unit is powered on and the other address switching units are powered off. The power control signal includes the address of the one address switching unit to be selected.
[0052] Although the processing according to the address control signal is described first and then the processing according to the power control signal is described, this is not restrictive, and the processing according to the power control signal may be performed first and then the processing according to the address control signal, or the above two processings may be performed simultaneously. After executing steps 110 and 120, a specific slave device among the plurality of slave devices is selected.
[0053] At step 130, data transmission and / or reception is performed between the master device and the selected one specific slave device.
[0054] Although the case of receiving the address control signal and the power control signal is described in steps 110 and 120, it is also conceivable to generate the above control signals locally, especially to generate the above address control signal and the power control signal according to the address of a specific slave device to communicate with the master device.
[0055] In one embodiment, a plurality of address switching units are communicated with through a first bus so that a group of address switching units among the plurality of address switching units is selected based on an address control signal; and a power switching unit is communicated with through a second bus so that one of the group of address switching units is selected based on a power control signal so that its power is turned on. Although the case of two buses is described, this is not restrictive.
[0056] In one embodiment, the plurality of slave devices include a plurality of magnetic sensor devices, in which case the power supply of each of the plurality of magnetic sensor devices is kept turned on independently of the address switching unit and the power switching unit.
[0057] In one embodiment, the plurality of slave devices include a plurality of magnetic sensor devices, each second switch of the plurality of address switching units communicates with two magnetic sensor devices, wherein the address of a slave device connected to the specific second switch described in the address control signal is indicated by whether the applied level is high or low. One of the two magnetic sensor devices connected to the specific second switch can be selected as a specific slave device communicating with the master device by applying a high level or a low level.
[0058] References Figure 1-7 Various embodiments of the method and device of the present invention are described, and these embodiments can be combined with each other to obtain different effects without being limited by the subject type. Furthermore, the various units / steps / processes mentioned above are not restrictive, and the functions of the various units / steps / processes mentioned above can be merged / combined / changed / modified to obtain corresponding effects.
[0059] The main device of the electronic device of the present invention includes a control unit, and the functions of the control unit can be implemented by software, or by hardware such as FPGA, for example, a processor can read computer programs in a memory and run these computer programs to implement the functions of the above-mentioned units. In one embodiment, the above-mentioned device of the present invention can also be implemented by a memory and a processor.
[0060] It can be understood that the methods of various embodiments of the present disclosure can be implemented by computer programs / software. These software can be loaded into the working memory of the processor and used to execute the methods according to various embodiments of the present disclosure when running.
[0061] Exemplary embodiments of the present disclosure cover both creating / using the computer program / software of the present disclosure from the outset and converting an existing program / software to use the computer program / software of the present disclosure by means of an update.
[0062] According to another embodiment of the present disclosure, a computer program product is provided, such as a machine (e.g., computer) readable medium, such as a CD-ROM, including a computer program code, which, when executed, causes a computer or a processor to perform a method according to each embodiment of the present disclosure. The machine readable medium is, for example, an optical storage medium or a solid-state medium supplied with or as part of other hardware.
[0063] The above describes specific embodiments of the present disclosure. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0064] The present disclosure is described above with reference to specific embodiments. It should be understood by those skilled in the art that the technical solution of the present disclosure can be implemented in various ways without departing from the spirit and basic features of the present disclosure. The specific embodiments are merely illustrative and not restrictive. In addition, these embodiments can be arbitrarily combined to achieve the purpose of the present disclosure. The scope of protection of the present disclosure is defined by the attached claims.
[0065] The word "comprising" in the specification and claims does not exclude the existence of other elements or steps. The expressions "first", "second", "third" and the order of the steps shown in the figures do not limit their order or quantity. The functions of the various elements described in the specification or recorded in the claims can also be split or combined and implemented by corresponding multiple elements or a single element.
Claims
1. An electronic device, comprising: a control unit comprising at least a first main device and a second main device; a controlled unit, comprising a plurality of slave devices, any one of the plurality of slave devices being selectable based on an address control signal from the first master device and a power control signal from the second master device to communicate with the control unit via a serial bus; a plurality of address switching units, each of which is connected to the first master device via a first switch and connected to a corresponding slave device of the plurality of slave devices via a plurality of second switches different from each other, so that a group of address switching units of the plurality of address switching units can be selected in response to the address control signal, wherein any two of the plurality of second switches are connected to different slave devices of the plurality of slave devices; and One or more power switching units, each of the one or more power switching units includes a third switching switch connected to the second main device and a plurality of fourth switching switches different from each other, so that one address switching unit in a corresponding group of address switching units can be selected in response to the power control signal, so that the selected address switching unit is powered on and the other address switching units in the plurality of address switching units are powered off.
2. The electronic device according to claim 1, wherein: Each second switch of each address switching unit in the plurality of address switching units is connected to a corresponding slave device, the address control signal includes the address of the first switch of a group of address switching units to be selected, the address of a specific second switch of each address switching unit in the group of address switching units to be selected, and the power control signal includes the address of the fourth switch corresponding to the address switching unit to be selected; And wherein, by selecting the group of address switching units and the specific second switching switch in the group of address switching units based on the address control signal, and selecting the one address switching unit in the group of address switching units based on the power control signal, a specific slave device among the multiple slave devices is selected to realize data sending and / or reception between the control unit and the one specific slave device.
3. The electronic device according to claim 1, wherein: Each of the second switching switches of each of the plurality of address switching units is connected to corresponding at least two slave devices, the address control signal includes the address of the first switching switch of a group of address switching units to be selected, the address of a specific second switching switch of each of the group of address switching units to be selected, and the address of a specific slave device among the at least two slave devices connected to the specific second switching switch, and the power control signal includes the address of the third switching switch of the one power switching unit to be selected, and the address of the fourth switching switch corresponding to the one address switching unit to be selected; And wherein, the specific one of the multiple slave devices is selected by selecting the group of address switching units, the specific second switching switches of the group of address switching units and the specific slave device based on the address control signal, and the one address switching unit in the group of address switching units is selected based on the power control signal to select the specific one of the multiple slave devices to realize data sending and / or reception between the control unit and the specific slave device.
4. The electronic device according to claim 1, wherein: The control unit generates the address control signal and the power control signal according to an address of a specific slave device to communicate with the control unit.
5. The electronic device according to any one of claims 1 to 4, wherein: The first master device is connected to the plurality of address switching units via a first bus, and the second master device is connected to the one or more power switching units via a second bus, and the first bus and the second bus are any one of an I2C bus and an I3C bus.
6. The electronic device according to any one of claims 1 to 4, wherein: The electronic device is a scanning test device for testing electronic products, and the plurality of slave devices include a plurality of sensor devices; or The electronic device is a transmitting and / or receiving device, and the plurality of slave devices include a plurality of transmitting and / or receiving elements.
7. The electronic device according to any one of claims 1 to 4, wherein: The electronic device is the scan test device, and the plurality of slave devices include a plurality of magnetic sensor devices, wherein each of the plurality of magnetic sensor devices is connected to a power source independently of the plurality of address switching units and the power switching unit to keep its power source turned on.
8. The electronic device according to claim 3, wherein: The plurality of slave devices include a plurality of magnetic sensor devices, each second switch of the plurality of address switching units is connected to corresponding two magnetic sensor devices, wherein the address of the one specific slave device is represented by whether the applied level is high or low.
9. An operating method of an electronic device according to any one of claims 1 to 8, the operating method comprising: selecting the group of address switching units among the plurality of address switching units based on the address control signal, and selecting one of the group of address switching units based on the power control signal so that the selected one address switching unit is powered, thereby selecting a specific slave device among the plurality of slave devices; and Data transmission and / or reception is performed between the control unit and the one specific slave device in the controlled unit.
10. The operating method according to claim 9, wherein: The address control signal includes an address of a first switch of a group of address switching units to be selected, an address of a specific second switch of each address switching unit in the group of address switching units to be selected, and an address of a specific slave device of the at least two slave devices connected to the specific second switch, and the power control signal includes an address of a third switch of the one power switching unit to be selected, and an address of a fourth switch of the one power switching unit corresponding to the one address switching unit to be selected; The operation method also includes: selecting the group of address switching units among the plurality of address switching units, the specific second switch, and the specific slave device connected to the specific second switch based on the address control signal; One of the group of address switching units is selected based on the power control signal so that the selected one address switching unit is powered on, thereby selecting the one specific slave device.
11. The operating method according to claim 10, further comprising: The address control signal and the power control signal are generated according to the address of the one specific slave device to communicate with the master device.
12. The operating method according to claim 11, further comprising: communicating with the plurality of address switching units through a first bus so that the group of address switching units among the plurality of address switching units is selected based on the address control signal; and The second bus communicates with the power switching unit so that one of the address switching units is selected based on the power control signal so that the power of the address switching unit is turned on.
13. The operating method according to any one of claims 10 to 12, wherein the plurality of slave devices comprises a plurality of magnetic sensor devices, and the operating method further comprises: The power supply of each of the plurality of magnetic sensor devices is kept turned on independently of the address switching unit and the power switching unit.
14. The operating method according to claim 10, wherein the plurality of slave devices include a plurality of magnetic sensor devices, each second switch of the plurality of address switching units communicates with two magnetic sensor devices, wherein: The address of a slave device connected to the specific second switch is represented by whether the applied level is high or low, and the operation method further includes: One of the two magnetic sensor devices connected to the specific second switch is selected as the specific slave device communicating with the control unit by applying a high level or a low level.
15. A computer-readable medium storing a computer program, which, when executed by a processor or a computer, causes the processor or the computer to perform the method according to any one of claims 9 to 14.
