Method for automatically allocating slave addresses based on resistance voltage drop

By setting a detection resistor in the slave machine and automatically allocating the slave machine address using the resistor voltage drop, the problem of long time and high resources allocation of communication address in the prior art is solved, and the communication effect of fast response and resource saving is achieved.

CN119544669APending Publication Date: 2025-02-28ZHUHAI YOUHANG TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411754336.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-02
Publication Date
2025-02-28

AI Technical Summary

Technical Problem

In the prior art, the communication address allocation process between the host and the slave machine takes a long time and consumes a lot of resources, making it difficult to meet the new requirements of high timeliness and resource saving.

Method used

By setting a detection resistor in each slave, the detection resistors in all slaves are connected in series, and the ground voltage drop to the DI connection end of the detection resistor within each slave corresponding to the detector itself is used to combine the voltage value loaded at the ESI end of the host machine to confirm the number of slaves and the position of slaves in the daisy chain, and then obtain the address value of slaves.

Benefits of technology

This method has simple steps, saves communication resources, fast response speed, greatly saves communication resources and costs, and provides a new bus-type communication method.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119544669A_ABST
    Figure CN119544669A_ABST
Patent Text Reader

Abstract

The method for automatically allocating the slave addresses based on the resistance voltage drop is simple in step, quick in response and capable of saving communication resources. The method comprises the following steps that a, input ends and output ends of communication interfaces of all slaves are connected end to end to form a daisy chain, the communication input end of the first slave is connected with an ESI end of a host, and the communication output end of the last slave is grounded; b, a detection resistor is arranged between the communication input end and the communication output end of each slave, and the detection resistors in all the slaves are connected in series; c, voltage is loaded at the ESI end of the host, each slave detects the voltage drop to ground of the DI connecting end of the detection resistor in the slave, and the detected voltage value serves as the address value of the slave and is sent to the host; and d, the host confirms the number and addresses of the slaves by reading the address values sent by the slaves and the voltage value loaded by the ESI end of the host. The invention is applied to the technical field of communication.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of communication technology, and in particular to a method for automatically allocating slave addresses based on resistance voltage drop. Background Art

[0002] In a master-slave communication system that communicates via a bus, a bus is generally used to transmit data between several slaves and a host. However, in the prior art, the host and the slave are generally connected and communicated in a question-and-answer manner. However, among the many slaves, the host cannot determine which slave requests to communicate with the host. The current method generally adopts a query method in which the slave pre-sets the address code and the host traverses the query method, and then determines how many peripherals there are and the address code of each peripheral according to the response request sent by the slave to the host, and then the host can communicate with the specified slave. There is also a method in which the host sends an address setting packet command to all slaves, and all slaves perform complex algorithms after receiving the address setting packet command, and convert the location information of the slave itself in the slave network into an address code, thereby determining the slave address. Regardless of the address setting mode, it takes a long time and more resources. For working conditions that require quick response, the existing method is difficult to meet the requirements. For this reason, it is necessary to design a new method to solve the communication problem that takes a long time and consumes a lot of resources to meet the new requirements of high timeliness and resource saving. Summary of the invention

[0003] The technical problem to be solved by the present invention is to overcome the deficiencies of the prior art and provide a method for automatically allocating slave addresses based on resistance voltage drop, which has simple steps, fast response and saves communication resources.

[0004] The technical solution adopted by the present invention is a method for automatically allocating slave addresses based on resistance voltage drop, in which a host and a plurality of slaves are connected to each other through an ESI bus, and the method comprises the following steps: a. A daisy chain is formed by connecting the communication input terminal and the communication output terminal of all the slaves end to end. At this time, the communication input terminal and the communication output terminal of all the slaves are connected in series, wherein the communication input terminal of the first slave is connected to the ESI terminal of the host, and the communication output terminal of the last slave is grounded; b. A detection resistor is provided between the communication input terminal and the communication output terminal of each slave, and the detection resistors in all the slaves are connected in series, where x is the serial number of the slave; c. Loading voltage or current on the ESI terminal of the host, each of the slaves detects the voltage drop of the DI connection terminal of the detection resistor inside itself to the ground, and uses the detected voltage value as the address value of the slave, and sends it to the host for storage; d. The host confirms the number of the slaves and the address of each slave by reading the address value sent by the slave and the voltage value loaded on the ESI terminal of the host.

[0005] Furthermore, an analog-to-digital conversion unit is provided in each of the slaves, and the analog-to-digital conversion unit converts the voltage value between the DI connection terminal of the corresponding detection resistor and the ground terminal detected by the slave into an address value.

[0006] Beneficial effects of the present invention: In the method of the present invention, by setting a detection resistor in each slave, the detection resistors in all the slaves are connected in series, and the voltage drop to ground at the DI connection end of the detection resistor inside the detector corresponding to each slave is used, combined with the voltage value loaded on the ESI end of the host, the number of slaves and the position of the slaves in the daisy chain can be confirmed, and then the address value of the slave can be obtained; the method has simple steps and saves communication resources. The communication system established by the method of the present invention greatly speeds up the response speed. Compared with the prior art, it greatly saves communication resources and costs, and is a new bus communication method. BRIEF DESCRIPTION OF THE DRAWINGS

[0007] Figure 1 It is a simplified structural diagram of the method architecture of the present invention; Figure 2 is an equivalent circuit diagram of an embodiment of the present invention. DETAILED DESCRIPTION

[0008] like Figure 1 As shown, in the method of the present invention, a host 1 is connected to a plurality of slaves 2 via an ESI bus 3. In this embodiment, the number of slaves 2 is set to 6. The method comprises the following steps: a. The communication input terminals DI and the communication output terminals DO of the six slaves 2 are connected end to end to form a daisy chain, so that the communication input terminals DI and the communication output terminals DO of all the slaves 2 are connected in series, wherein the communication input terminal of the first slave 2 is connected to the ESI terminal of the host 1, and the communication output terminal DO of the last slave 2 is grounded.

[0009] b. A detection resistor Rx is set between the communication input terminal DI and the communication output terminal DO of each slave 2, the resistance values ​​of the detection resistors Rx set in all the slaves 2 are fixed and their resistance values ​​are approximately equal, and the detection resistors Rx in all the slaves 2 are connected in series, where x is the serial number of the slave in the daisy chain queue. In this embodiment, the maximum value of x is 6. The detection resistor Rx is connected between the communication input terminal DI and the communication output terminal DO of the corresponding slave 2, so that the detection resistors Rx in all the slaves 2 form a series connection structure.

[0010] c. A voltage or current is loaded on the ESI terminal of the host 1, and each of the slaves 2 detects the voltage drop of the DI connection terminal of the detection resistor Rx inside itself to the ground, and uses the detected voltage value as the address value of the slave, and sends it to the host 1 for storage.

[0011] d. The host 1 confirms the number of the slaves 2 and the address of each slave 2 by reading the address value sent by the slave and the voltage value loaded on the ESI terminal of the host 1.

[0012] An analog-to-digital conversion unit ADC is provided in each of the slaves 2 , and the analog-to-digital conversion unit ADC converts the voltage value between the DI connection terminal of the corresponding detection resistor Rx and the ground terminal detected by the slave 2 into an address value.

[0013] like Figure 2 The figure shows the equivalent circuit diagram when the number of slaves is 6. Assume that the voltage loaded on the ESI terminal of the host is V1, the voltage between the DI connection terminal of the first detection resistor R1 and the ground is V1, the voltage between the DI connection terminal of the second detection resistor R2 and the ground is V2, the voltage between the DI connection terminal of the third detection resistor R3 and the ground is V3, the voltage between the DI connection terminal of the fourth detection resistor R4 and the ground is V4, the voltage between the DI connection terminal of the fifth detection resistor R5 and the ground is V5, and the voltage between the DI connection terminal of the sixth detection resistor R6 and the ground is V6. Then the following formula is established: V1=6×V6, V2=5×V6, V3=4×V6, V4=3×V6, V5=2×V6.

[0014] Based on the above, the method of the present invention can quickly confirm the number of slaves and address values, providing an efficient environment for the host and slaves to communicate through the bus.

[0015] Finally, it should be emphasized that the above is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various changes and modifications. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.

Claims

1. A method for automatically assigning slave addresses based on resistance voltage drop, wherein a host (1) and a plurality of slaves (2) are connected to each other via an ESI bus (3), characterized in that: The method for automatically allocating slave addresses based on resistance voltage drop comprises the following steps: a. The communication input terminals (DI) and the communication output terminals (DO) of all the slaves (2) are connected end to end to form a daisy chain. At this time, the communication input terminals (DI) and the communication output terminals (DO) of all the slaves (2) are connected in series, wherein the communication input terminal of the first slave (2) is connected to the ESI terminal of the host (1), and the communication output terminal (DO) of the last slave (2) is grounded; b. A detection resistor (Rx) is provided between the communication input terminal (DI) and the communication output terminal (DO) of each of the slaves (2), and the detection resistors (Rx) in all the slaves (2) are connected in series, where x is the serial number of the slave; c. A voltage or current is applied to the ESI terminal of the host (1), and each of the slaves (2) detects the voltage drop of the DI connection terminal of the detection resistor (Rx) inside itself to the ground, uses the detected voltage value as the address value of the slave, and sends it to the host (1) for storage; d. The host (1) confirms the number of the slaves (2) and the address of each of the slaves (2) by reading the address value sent by the slave and the voltage value loaded on the ESI terminal of the host (1).

2. A method for automatically allocating slave addresses based on resistance voltage drop according to claim 1, characterized in that: An analog-to-digital conversion unit (ADC) is provided in each of the slaves (2), and the analog-to-digital conversion unit (ADC) converts a voltage value between a DI connection terminal of the corresponding detection resistor (Rx) and a ground terminal detected by the slave (2) into an address value.