Chip, circuit and method for configuring address by using single pin
By using switching networks and voltage divider circuits in bus communication equipment and using single pins to realize multi-bit address configuration, the problems of poor flexibility and poor scalability in the prior art are solved, and an efficient and reliable address configuration solution is achieved.
Patent Information
- Application Number
- CN202411215877.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-30
- Publication Date
- 2024-11-15
AI Technical Summary
In bus communication equipment, the existing address configuration method has problems such as poor flexibility, limited address resources, poor reliability and poor scalability in high-integration electronic systems. Especially in multi-device scenarios, unit address signals cannot meet the needs. .
通过在芯片内部设置开关网络,利用单引脚外接的配置电阻与芯片内部电阻构建分压电路,实现多位地址信号的配置,采用多组开关电路分时导通,生成多位地址信号,实现灵活、可靠和高扩展性的地址配置。
It realizes higher flexibility, pin saving, reduce interference, automated judgment and strong scalability address configuration, providing a reliable and economical solution for efficient communication of multiple devices in complex systems.
Smart Images

Figure CN118964229A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of bus communication technology, and specifically relates to a chip, circuit and method for configuring an address using a single pin. Background Art
[0002] In a bus communication device, when configuring the address of a slave device, if there are many slave devices, for example, more than or equal to three, a 1-bit address signal cannot meet the requirements, and a multi-bit address signal is required. Common address configuration methods for generating multi-bit address signals include using multiple configuration pins to generate multi-bit address signals. These methods have technical problems such as high cost, limited address bits, and poor integration in the application scenarios of highly integrated electronic systems.
[0003] Therefore, a chip, circuit and method using a single pin to configure the address are needed. By setting a switch network inside the chip, different voltage divider circuit configurations are constructed according to the configuration resistor connected to the single pin and the resistance inside the chip, thereby realizing the configuration of multi-bit addresses and achieving higher flexibility and reliability. Summary of the invention
[0004] The present application provides a chip, circuit and method for configuring an address using a single pin to solve the problems of poor flexibility, limited address resources, poor reliability and weak scalability of existing address configuration circuits when the logic circuit of a communication device is fixed.
[0005] In a first aspect, the present application provides a chip using a single pin to configure an address, comprising: a configuration pin for externally connecting a configuration resistor; an address output terminal for outputting an N-bit address signal, where N is a natural number greater than or equal to 2; a switch network, comprising at least two groups of switch circuits, each group of switch circuits comprising a switch and a resistor connected in series, and each group of switch circuits being coupled between a power supply voltage and a configuration pin or between the configuration pin and a reference ground;
[0006] When configuring the address, each group of switch circuits in the switch network is turned on respectively to generate the value of each bit of the N-bit address signal in turn.
[0007] In a second aspect, the present application provides a circuit for configuring an address using a single pin, comprising: a configuration resistor network, comprising at least two configuration resistors and an output terminal, each configuration resistor having a first terminal and a second terminal, the first terminal being coupled to a power supply voltage or a reference ground; a chip for configuring an address using a single pin, comprising a configuration pin, an address output terminal and a switch network, the configuration pin being coupled to the output terminal of the configuration resistor network, the address output terminal outputting an N-bit address signal, N being a natural number greater than or equal to 2; the switch network comprising at least two groups of switch circuits, each group of switch circuits comprising a switch and a resistor connected in series, the each group of switch circuits being coupled between the power supply voltage and the configuration pin or between the configuration pin and the reference ground;
[0008] When configuring the address, each group of switch circuits in the switch network is turned on respectively to generate the value of each bit of the N-bit address signal in turn.
[0009] In a third aspect, the present application provides a method for configuring an address using a single pin, the method comprising: determining the number of bits N of the address signal output by the address output terminal according to the number of devices; determining the number of groups of switch circuits in the switch network according to the number of bits N of the address signal; the configuration pin is coupled to a power supply voltage or a reference ground via a configuration resistor to generate a value of the address signal.
[0010] Through one or more embodiments of the present application, at least the following technical effects can be achieved:
[0011] Any technical solution provided in this specification, by setting up a switch network with multiple groups of switch circuits, utilizes the time-sharing conduction of the multiple groups of switch circuits to realize the output of address signals and the configuration of address information, the configuration resistor externally connected to the configuration pin can form at least one voltage divider circuit with the switch network, so that the voltage on the configuration pin can be variable when the configuration resistance changes, thereby achieving the purpose of multiple address configurations through a single configuration pin, and has significant technical effects such as high flexibility, pin saving, interference reduction, automatic judgment and strong scalability, and provides a reliable and economical address configuration solution for efficient communication of multiple devices in complex systems. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0013] Figure 1 An example diagram of the circuit structure of the existing multi-pin configuration address signal is given;
[0014] Figure 2A circuit structure diagram of configuring a multi-bit address signal on a single pin according to an embodiment of the present invention is provided;
[0015] Figure 3 A circuit structure diagram of configuring a four-bit address signal on a single pin according to an embodiment of the present invention is provided;
[0016] Figure 4 A circuit structure diagram of configuring a four-bit address signal on a single pin according to another embodiment of the present invention is provided;
[0017] Figure 5 A circuit structure diagram of configuring an eight-bit address signal on a single pin according to an embodiment of the present invention is provided;
[0018] Figure 6 A circuit structure diagram of configuring an eight-bit address signal on a single pin according to another embodiment of the present invention is provided;
[0019] Figure 7 A flow chart of a method for configuring an address using a single pin according to an embodiment of the present invention is provided. DETAILED DESCRIPTION
[0020] The technical solutions in the embodiments of the present application will be described clearly and completely below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present application.
[0021] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0022] It should be understood that in the following description, "circuit" refers to a conductive loop composed of at least one element or subcircuit through electrical connection or electromagnetic connection. When an element or circuit is said to be "connected to" another element or an element / circuit is said to be "connected between" two nodes, it can be directly coupled or connected to another element or there can be an intermediate element, and the connection between the elements can be physical, logical, or a combination thereof. Conversely, when an element is said to be "directly coupled to" or "directly connected to" another element, it means that there is no intermediate element between the two.
[0023] In multi-device bus communication, the address configuration of the slave device is often configured by simply pulling the pin high or grounding it.
[0024] Figure 1 An example circuit structure diagram of an existing multi-pin configuration address signal is given. Among them, the I2C slave device provides configuration pins A0, A1, and A2. By connecting these pins to a high level, such as the power supply voltage VDD, or a low level, such as the ground GND, different binary combinations are formed to configure different values of the address signal. In this example, three configuration pins can form 8 different address combinations. For example, in the figure, pins A0 and A1 are connected to the power supply voltage VDD, and pin A2 is connected to the ground GND. The address of the I2C slave device is configured to A2A1A0=011. Figure 1 The existing address configuration method has the following disadvantages, including: the number of configuration pins is limited. When the number of slave devices is large, the pin resources cannot meet the number of addresses that need to be configured; lack of flexibility, it is difficult to dynamically change the device address, and any address change requires physical rewiring or hardware modification, which has high maintenance costs; the pins are directly connected to the power supply or ground, which is easily affected by power supply noise and electromagnetic interference, resulting in address misjudgment or instability, especially in long-distance communication or strong interference environments. This problem is more prominent.
[0025] Figure 2 A circuit structure diagram of configuring a multi-bit address signal with a single pin according to an embodiment of the present invention is given. In the circuit, an I2C slave device uses a single configuration pin PIN_ADDR, an address output terminal ADDR_OUT is coupled to the output terminal of a digital converter, and a switch network has at least two groups of switch circuits, each of which includes a switch and a resistor connected in series, wherein each group of switch circuits is coupled between a power supply voltage VDD and the configuration pin PIN_ADDR or between the configuration pin PIN_ADDR and a reference ground GND. The at least two groups of switch circuits can be configured according to Figure 2The switch network shown is configured as n1 series resistors RH and switches SWH and / or n2 series resistors RL and switches SWL, wherein the series resistors RH and switches SWH are coupled between the supply voltage VDD and the configuration pin PIN_ADDR, and the series resistors RL and switches SWL are coupled between the configuration pin PIN_ADDR and the reference ground GND, wherein n1 and n2 are natural numbers greater than or equal to 1. Figure 2 As shown, the digital converter includes a comparator having a first comparison terminal, a second comparison terminal and an output terminal, the first comparison terminal receiving a reference voltage VREF, the second comparison terminal coupled to the configuration pin PIN_ADDR, and the output terminal coupled to the address output terminal ADDR_OUT. In one embodiment, the digital converter may also include a device such as an analog-to-digital converter or a level selector, or any circuit that can generate a logic 0 or a logic 1 according to the voltage on the configuration pin PIN_ADDR to configure the address signal.
[0026] The I2C slave device is connected to an external configuration resistor network through a single configuration pin PIN_ADDR, wherein the configuration resistor network includes at least two configuration resistors and an output terminal, each configuration resistor having a first terminal and a second terminal, wherein the first terminal is coupled to a power supply voltage VDD or a reference ground GND, and the second terminal is coupled to the output terminal of the configuration resistor network. In one embodiment, the configuration resistor network further includes a switch, such as Figure 2 As shown, the switch has an input terminal and an output terminal, the input terminal is coupled to the second terminal of each configuration resistor, and the output terminal is coupled to the output terminal of the configuration resistor network. The at least two configuration resistors can be configured according to Figure 2 The configuration resistor network shown is configured as n3 configuration resistors RextH having first terminals coupled to the supply voltage VDD and / or n4 configuration resistors RextL having first terminals coupled to the reference ground GND, wherein n3 and n4 are natural numbers greater than or equal to 1.
[0027] The I2C device sets N address bits according to the number of address bits required, and runs N working cycles when configuring the address information. In the i-th working cycle, the value of the i-th bit of the N-bit address signal is generated according to the voltage on the configuration pin, where N is a natural number greater than or equal to 2, and i is a natural number less than or equal to N. Figure 2In the switch network shown, the switches in each group of switch circuits are controlled by control signals in the I2C device, and the control signals are CTRLH1 to CTRLHn1 and CTRLL1 to CTRLLn2, which respectively control the switch network to turn on the switch circuit corresponding to the i-th address signal in the i-th working cycle. In one embodiment, the configuration resistor network configures the at least two configuration resistors as configuration resistors RextH1 to RextHn3 whose first ends are coupled to the supply voltage VDD, and n3 is set to be greater than or equal to 2, then the switch network should at least configure a series resistor RL1 and switch SWL1 to a series resistor RLn2 and switch SWLn2 to form n2 voltage divider circuits; similarly, when the configuration resistor network configures the at least two configuration resistors as configuration resistors RextL1 to RextLn4 whose first ends are coupled to the reference ground GND, and n4 is set to be greater than or equal to 2, then the switch network should at least configure a series resistor RH1 and switch SWH1 to a series resistor RHn1 and switch SWHn1 to form n1 voltage divider circuits. In one embodiment, the configuration resistor network configures the at least two configuration resistors as configuration resistors RextH1 to RextHn3 whose first ends are coupled to the supply voltage VDD and configuration resistors RextL1 to RextLn4 whose first ends are coupled to the reference ground GND, and n3 is set to be greater than or equal to 1, and n4 is set to be greater than or equal to 1. Then, the switch network can be configured with a series resistor RL1 and a switch SWL1 to a series resistor RLn2 and a switch SWLn2 to form n2 voltage divider circuits, or a series resistor RH1 and a switch SWH1 to a series resistor RHn1 and a switch SWHn1 to form n1 voltage divider circuits, or a series resistor RL1 and a switch SWL1 to a series resistor RLn2 and a switch SWHn2 and a series resistor RH1 and a switch SWH1 to a series resistor RHn1 and a switch SWHn1 to form n1+n2 voltage divider circuits.
[0028] Figure 3 A circuit structure diagram of configuring a four-bit address signal on a single pin according to an embodiment of the present invention is given. Figure 3As shown, in the circuit, the I2C slave device uses a single configuration pin PIN_ADDR, the address output terminal ADDR_OUT is coupled to the output terminal of the comparator, and the switch network has four groups of switch circuits, each of which includes switches and resistors connected in series, wherein the switches are all transistors, and each group of switches and resistors connected in series are respectively the first resistor R1 and the first switch tube SW1, the second resistor R2 and the second switch tube SW2, the third resistor R3 and the third switch tube SW3, and the fourth resistor R4 and the fourth switch tube SW4. Among them, the first ends of the first resistor R1 to the fourth resistor R4 are all coupled to the configuration pin PIN_ADDR, the first switch tube SW1 is a P-type transistor, the first end is coupled to the power supply voltage VDD, and the second end is coupled to the second end of the first resistor R1. The control end receives the control signal CTRL1 and is turned on or off under the control of the control signal CTRL1. The control signal CTRL1 is generated by the internal logic circuit of the chip and can be started by the chip when the system is powered on or reset. It should be noted that any generation circuit and control logic that can generate the control signal CTRL1 are within the protection scope of this application. Exemplarily, when the control signal CTRL1 is at a logic high level, the first switch tube SW1 is turned off, and when the control signal CTRL1 is at a logic low level, the first switch tube SW1 is turned on, thereby controlling the connection between the power supply voltage VDD and the first resistor R1. The second switch tube SW2 uses a P-type transistor, the first end is coupled to the power supply voltage VDD, the second end is coupled to the second end of the second resistor R2, and the control end receives the control signal CTRL2 to control the connection between the power supply voltage VDD and the second resistor R21; the third switch tube SW3 uses an N-type transistor, the first end is coupled to the reference ground GND, the second end is coupled to the second end of the third resistor R3, and the control end receives the control signal CTRL3 to control the connection between the reference ground GND and the third resistor R3; the fourth switch tube SW4 uses an N-type transistor, the first end is coupled to the reference ground GND, the second end is coupled to the second end of the fourth resistor R4, and the control end receives the control signal CTRL4 to control the connection between the reference ground GND and the fourth resistor R4.
[0029] The I2C slave device is externally connected to a configuration resistor network through a single configuration pin PIN_ADDR. The configuration resistor network has a first configuration resistor Rext1, a second configuration resistor Rext2 and a switch for selecting a switch DIP. The first ends of the first configuration resistor Rext1 and the second configuration resistor Rext2 are both coupled to the power supply voltage VDD, and the second ends are respectively connected to two input ends of the selection DIP, and the output end of the DIP is connected to the configuration pin PIN_ADDR.
[0030] like Figure 3As shown, the inverting input terminal of the comparator is connected to the switch network and receives the voltage signal of the configuration pin PIN_ADDR, and the non-inverting input terminal is coupled between the first reference resistor Rref1 and the second reference resistor Rref2 connected in series. In one embodiment, the first reference resistor Rref1 and the second reference resistor Rref2 have the same resistance value, so that the reference voltage VREF obtained by the non-inverting input terminal of the comparator is VDD / 2.
[0031]
[0032] Table 1
[0033] Table 1 shows the Figure 3 The circuit structure shown in FIG. 1 is configured to generate an address signal value. The address bits of the circuit are A3, A2, A1, and A0, which correspond to the output results of the comparator when the first switch tube SW1 to the fourth switch tube SW4 of the circuit are turned on respectively. Figure 2 In the address configuration circuit shown, the reference voltage VREF is configured as half of the power supply voltage VDD. According to the data in Table 1, the resistance values of the first configuration resistor Rext1, the second configuration resistor Rext2, the third resistor R3 and the fourth resistor R4 are configured such that Rext1 is greater than R3 and greater than R4, and Rext2 is greater than R3 but less than R4.
[0034] When the first switch tube SW1 and the second switch tube SW2 are turned on respectively, since the first ends of the first switch tube SW1 and the second switch tube SW2 and the first ends of the first configuration resistor Rext1 and the second configuration resistor Rext2 are all connected to the power supply voltage VDD, the voltage of the configuration pin PIN_ADDR is maintained at a voltage value close to the power supply voltage VDD and greater than the reference voltage VREF. Therefore, A0 and A1 are both 0 when the configuration resistor network connects the first configuration resistor Rext1 or the second configuration resistor Rext2 to the configuration pin PIN_ADDR.
[0035] When the third switch tube SW3 and the fourth switch tube SW4 are turned on respectively, since the first ends of the first configuration resistor Rext1 and the second configuration resistor Rext2 are connected to the power supply voltage VDD, and the first ends of the third switch tube SW3 and the fourth switch tube SW4 are connected to the reference ground GND, the voltage of the configuration pin PIN_ADDR is determined by the voltage divider circuit composed of the configuration resistor and the internal resistor. Figure 2When the configuration resistor network of the address configuration circuit shown connects Rext1 to the configuration pin PIN_ADDR, the voltage of the configuration pin PIN_ADDR is determined by the voltage division of the first configuration resistor Rext1 and the third resistor R3 on the power supply voltage VDD when the third switch tube SW3 is turned on, and is determined by the voltage division of the first configuration resistor Rext1 and the fourth resistor R4 on the power supply voltage VDD when the fourth switch tube SW4 is turned on. Since Rext1 is greater than R3 and greater than R4, the voltage of the configuration pin PIN_ADDR is less than half of the power supply voltage VDD when the third switch tube SW3 and the fourth switch tube SW4 are respectively turned on, that is, less than the reference voltage VREF, and the comparator output results are both 1, that is, A3 and A2 are both 1; when Figure 2 When the configuration resistor network of the address configuration circuit shown connects Rext2 to the configuration pin PIN_ADDR, the voltage of the configuration pin PIN_ADDR is determined by the voltage division of the power supply voltage VDD by the second configuration resistor Rext1 and the third resistor R3 when the third switch tube SW3 is turned on, and is determined by the voltage division of the power supply voltage VDD by the second configuration resistor Rext1 and the fourth resistor R4 when the fourth switch tube SW4 is turned on. Since Rext2 is greater than R3 but less than R4, the voltage of the configuration pin PIN_ADDR is less than half of the power supply voltage VDD, that is, less than the reference voltage VREF, when the third switch tube SW3 is turned on alone, and is greater than half of the power supply voltage VDD, that is, greater than the reference voltage VREF, when the fourth switch tube SW4 is turned on alone, so A3 and A2 are 0 and 1 respectively.
[0036] Figure 4 A circuit structure diagram of a single pin configured with a four-bit address signal according to another embodiment of the present invention is given. Figure 4 As shown in the figure, the single configuration pin PIN_ADDR of the I2C slave device, the address output terminal ADDR_OUT, the switch network, the comparator and Figure 2 The structure of the address configuration circuit shown is the same and will not be described in detail. The configuration resistor network in the circuit has a first configuration resistor Rext1, a second configuration resistor Rext2 and a switch for selecting DIP. The first ends of the first configuration resistor Rext1 and the second configuration resistor Rext2 are both coupled to the reference ground GND, and the second ends are respectively connected to the two input ends of the selected DIP, and the output end of the DIP is connected to the configuration pin PIN_ADDR. The configuration of the comparator and the reference voltage VREF in the circuit is the same as Figure 3 The configuration of the comparator and the reference voltage VREF shown in FIG. 5 is the same and will not be described in detail.
[0037]
[0038] Table 2
[0039] Table 2 shows the Figure 4The circuit structure shown in FIG. 1 is configured to generate an address signal value. The address bits of the circuit are A3, A2, A1, and A0, which correspond to the output results of the comparator when the first switch SW1 to the fourth switch SW4 are turned on independently. Figure 3 In the address configuration circuit shown, the reference voltage VREF is configured as half of the power supply voltage VDD. According to the data in Table 2, the resistance values of the first configuration resistor Rext1, the second configuration resistor Rext2 and the first resistor R1 and the second resistor R2 are configured such that Rext1 is greater than R1 but less than R2, and Rext2 is greater than R1 and greater than R2.
[0040] When the third switch tube SW3 and the fourth switch tube SW4 are turned on respectively, since the first ends of the third switch tube SW3 and the fourth switch tube SW4 and the first ends of the first configuration resistor Rext1 and the second configuration resistor Rext2 are all connected to the reference voltage GND, the voltage of the configuration pin PIN_ADDR is maintained at a voltage value close to the reference voltage GND and is less than the reference voltage VREF. Therefore, A3 and A2 are both 1 when the configuration resistor network is connected to the first configuration resistor Rext1 or the second configuration resistor Rext2.
[0041] When the first switch tube SW1 and the second switch tube SW2 are turned on respectively, since the first ends of the first configuration resistor Rext1 and the second configuration resistor Rext2 are connected to the reference ground GND, the first ends of the first switch tube SW1 and the second switch tube SW2 are connected to the power supply voltage VDD, and the voltage of the configuration pin PIN_ADDR is determined by the voltage divider circuit composed of the configuration resistor and the internal resistor. Figure 3 When the configuration resistor network of the address configuration circuit shown connects Rext1 to the configuration pin PIN_ADDR, the voltage of the configuration pin PIN_ADDR is determined by the voltage division of the first configuration resistor Rext1 and the first resistor R1 on the power supply voltage VDD when the first switch tube SW1 is turned on alone, and is determined by the voltage division of the first configuration resistor Rext1 and the second resistor R2 on the power supply voltage VDD when the second switch tube SW2 is turned on. Since Rext1 is greater than R1 but less than R2, the voltage of the configuration pin PIN_ADDR is greater than half of the power supply voltage VDD, that is, greater than the reference voltage VREF, when the first switch tube SW1 is turned on alone, and is less than half of the power supply voltage VDD, that is, less than the reference voltage VREF, when the second switch tube SW2 is turned on alone, so A1 and A0 are 1 and 0 respectively; when Figure 3When the configuration resistor network of the address configuration circuit shown connects Rext2 to the configuration pin PIN_ADDR, the voltage of the configuration pin PIN_ADDR is determined by the voltage division of the power supply voltage VDD by the second configuration resistor Rext2 and the first resistor R1 when the first switch tube SW1 is turned on, and is determined by the voltage division of the power supply voltage VDD by the second configuration resistor Rext2 and the second resistor R2 when the second switch tube SW2 is turned on. Since Rext2 is greater than R1 and greater than R2, the voltage of the configuration pin PIN_ADDR is greater than half of the power supply voltage VDD when the first switch tube SW1 and the second switch tube SW2 are respectively turned on, that is, greater than the reference voltage VREF, and the comparator output results are both 1, that is, A3 and A2 are both 1.
[0042] Figure 5 A circuit structure diagram of configuring an eight-bit address signal on a single pin according to an embodiment of the present invention is given. Figure 5 As shown, in the circuit, the I2C slave device uses a single configuration pin PIN_ADDR, the address output terminal ADDR_OUT is coupled to the output terminal of the comparator, and the switch network has eight groups of switch circuits, each of which includes switches and resistors connected in series, wherein the switches all use transistors, and each group of switches and resistors in series are respectively a first resistor R1 and a first switch tube SW1, a second resistor R2 and a second switch tube SW2, a third resistor R3 and a third switch tube SW3, a fourth resistor R4 and a fourth switch tube SW4, a fifth resistor R5 and a fifth switch tube SW5, a sixth resistor R6 and a sixth switch tube SW6, a seventh resistor R7 and a seventh switch tube SW7, an eighth resistor R8 and an eighth switch tube SW8, wherein the first ends of the first resistors R1 to R8 are all coupled to the configuration pin PIN_ADDR, the first ends of the first resistors R1 to R8 are all coupled to the configuration pin PIN_ADDR, the second resistors R2 and the second switch tube SW2 are all coupled to the configuration pin PIN_ADDR, and the third resistors R3 and the third switch tube SW3 are all coupled to the configuration pin PIN_ADDR. A switch tube SW1 uses a P-type transistor, with a first end coupled to the power supply voltage VDD, a second end coupled to the second end of the first resistor R1, and a control end receiving a control signal CTRL1 to control the on-off between the power supply voltage VDD and the first resistor R1; the configuration of the second switch tube SW2 and the second resistor R2 to the fourth switch tube SW4 and the fourth resistor R4 is the same as the configuration of the first switch tube SW1 and the first resistor R1, and will not be repeated; the fifth switch tube SW5 uses an N-type transistor, with a first end coupled to the reference ground GND, a second end coupled to the second end of the fifth resistor R5, and the control end controls the on-off between the reference ground GND and the fifth resistor R5; the configuration of the sixth switch tube SW6 and the sixth resistor R6 to the eighth switch tube SW8 and the eighth resistor R8 is the same as the configuration of the fifth switch tube SW5 and the fifth resistor R5, and will not be repeated. The configuration of the comparator and the reference voltage VREF in the circuit is the same as Figure 3 The configuration of the comparator and the reference voltage VREF shown in FIG. 5 is the same and will not be described in detail.
[0043] The I2C slave device is externally connected to a configuration resistor network through a single configuration pin PIN_ADDR, and the configuration resistor network has a first configuration resistor Rext1 to a fourth configuration resistor Rext4 and a switch for applying a selector SEL. The first ends of the first configuration resistor Rext1 to the fourth configuration resistor Rext4 are all coupled to the power supply voltage VDD, and the second ends are respectively connected to the four input ends of the selector SEL, and the output end of SEL is connected to the configuration pin PIN_ADDR.
[0044]
[0045]
[0046] Table 3
[0047] Table 3 shows the Figure 5 The circuit structure shown in the figure configures an address signal value. The address bits of the circuit are A7, A6, A5, A4, A3, A2, A1, and A0, which correspond to the output results of the comparator when the first switch tube SW1 to the eighth switch tube SW8 of the circuit are turned on respectively. Figure 5 The address configuration circuit shown in the figure, the reference voltage VREF is configured as half of the supply voltage VDD, and according to the data in Table 3, the resistance values of the first configuration resistor Rext1 to the fourth configuration resistor Rext4 and the fifth resistor R5 to the eighth resistor R8 are configured as Rext1 <R5<Rext2<R6<Rext3<R7<Rext4<R8。
[0048] When the first switch SW1 to the fourth switch SW2 are turned on respectively, the voltage of the configuration pin PIN_ADDR is Figure 2 The address configuration circuit shown is similar, and the principle is not repeated here. A3, A2, A1, and A0 are all 0.
[0049] When the fifth switch tube SW5 to the eighth switch tube SW8 are turned on respectively, since the first end of the configuration resistor is connected to the power supply voltage VDD, the first end of the fifth switch tube SW3 to the eighth switch tube SW8 is connected to the reference ground GND, and the voltage of the configuration pin PIN_ADDR is determined by the voltage divider circuit, and the voltage divider circuit is composed of the configuration resistor selected by the selector SEL and the resistor in the corresponding switched-on switch circuit in the switch network. The principle of the voltage divider circuit here is similar to the address configuration circuit in the above embodiments, and will not be repeated here. Figure 4When the configuration resistor network of the shown address configuration circuit connects Rext1 to the configuration pin PIN_ADDR, since Rext1 < R5 < R6 < R7 < R8, the address bits A7, A6, A5, and A4 will be configured as 0000 when the fifth switch SW3 to the eighth switch SW8 are turned on respectively; when the configuration resistor network connects Rext2 to the configuration pin PIN_ADDR, since R5 < Rext2 < R6 < R7 < R8, the address bits A7, A6, A5, and A4 will be configured as 0001 when the fifth switch SW3 to the eighth switch SW8 are turned on respectively; when the configuration resistor network connects Rext3 to the configuration pin PIN_ADDR, since R5 < R6 < Rext3 < R7 < R8, the address bits A7, A6, A5, and A4 will be configured as 0011 when the fifth switch SW3 to the eighth switch SW8 are turned on respectively; when the configuration resistor network connects Rext4 to the configuration pin PIN_ADDR, since R5 < R6 < R7 < Rext4 < R8, the address bits A7A6A5A4 will be configured as 0111 when the fifth switch SW3 to the eighth switch SW8 are turned on respectively.
[0050] Figure 6 The circuit structure diagram for configuring an eight-bit address signal with a single pin according to another embodiment of the present invention is given, as Figure 6 shown. In this circuit, the single configuration pin PIN_ADDR of the I2C slave device, the address output terminal ADDR_OUT, the switch network, the comparator are Figure 4 the same as the structure of the shown address configuration circuit, which will not be elaborated here; in this circuit, the configuration resistor network has a first configuration resistor Rext1 to a fourth configuration resistor Rext4 and a switcher with an application strobe SEL. The first ends of the first configuration resistor Rext1 to the fourth configuration resistor Rext4 are all coupled to the reference ground GND, and the second ends are respectively connected to the four input terminals of the strobe SEL, and the output terminal of SEL is connected to the configuration pin PIN_ADDR. The configuration of the comparator and the reference voltage VREF in this circuit is Figure 3 the same as the configuration of the comparator and the reference voltage VREF shown in
[0051]
[0052] Table 4
[0053] Table 4 gives a value of an address signal configured according to the Figure 6 shown circuit structure. The address bits of this circuit are A7, A6, A5, A4, A3, A2, A1, and A0 respectively, corresponding to the output results of the comparator when the first switch SW1 to the eighth switch SW8 are turned on respectively. According to Figure 6The address configuration circuit shown, the reference voltage VREF is configured to be one-half of the supply voltage VDD. According to the data shown in Table 4, the resistance values of the first configuration resistor Rext1 to the fourth configuration resistor Rext4 and the first resistor R1 to the fourth resistor R4 are configured as Rext1 < R1 < Rext2 < R6 < Rext3 < R7 < Rext4 < R8;
[0054] When the fifth switch tube SW5 to the eighth switch tube SW8 are respectively turned on, the voltage condition of the configuration pin PIN_ADDR is similar to that of Figure 3 the address configuration circuit shown, and the principle will not be elaborated. A7, A6, A5, and A4 are all 0.
[0055] When the first switch tube SW1 to the fourth switch tube SW4 are respectively turned on, since the first ends of the configuration resistors are all connected to the reference ground GND, and the first ends of the first switch tube SW1 to the fourth switch tube SW4 are all connected to the supply voltage VDD, the voltage of the configuration pin PIN_ADDR is determined by the voltage division circuit. The voltage division circuit is composed of the configuration resistor selected by the selector SEL and the resistor in the corresponding conducting switch circuit in the switch network. The principle of the voltage division circuit here is similar to that of the address configuration circuit in the above embodiments and will not be elaborated here. When Figure 5 the configuration resistor network of the address configuration circuit shown connects Rext1 to the configuration pin PIN_ADDR, since Rext1 < R1 < R2 < R3 < R4, the address bits A3, A2, A1, A0 will be configured as 1111 when the first switch tube SW1 to the fourth switch tube SW4 are respectively turned on; when the configuration resistor network connects Rext2 to the configuration pin PIN_ADDR, since R1 < Rext2 < R2 < R3 < R4, the address bits A3, A2, A1, A0 will be configured as 1110 when the first switch tube SW1 to the fourth switch tube SW4 are respectively turned on; when the configuration resistor network connects Rext3 to the configuration pin PIN_ADDR, since R1 < R2 < Rext3 < R3 < R4, the address bits A3, A2, A1, A0 will be configured as 1100 when the first switch tube SW1 to the fourth switch tube SW4 are respectively turned on; when the configuration resistor network connects Rext4 to the configuration pin PIN_ADDR, since R1 < R2 < R3 < Rext4 < R4, the address bits A3, A2, A1, A0 will be configured as 1000 when the first switch tube SW1 to the fourth switch tube SW4 are respectively turned on.
[0056] Figure 7A flow chart of a method for configuring an address using a single pin according to an embodiment of the present invention is provided. In the method, step S1 is to determine the number of bits N of the address signal output by the address output terminal according to the number of devices; step S2 is to determine the number of groups of switch circuits in the switch network according to the number of bits N of the address signal; step S3 is to generate the value of the address signal by coupling the single pin to the power supply voltage or the reference ground through a configuration resistor. Furthermore, the method also includes step S4, step S4 is to change the value of the address signal by adjusting the resistance value of the configuration resistor.
[0057] Those skilled in the art can, based on the four-bit address configuration circuit embodiment and the eight-bit address configuration circuit embodiment shown in this specification, combine the flowchart of the method for using a single-pin configuration address to expand the number of groups of switch circuits in the switch network and the number of configuration resistors in the configuration resistor network; the switch can also select devices that can switch the configuration resistor network to access the configuration pin according to actual needs, such as a data selector, a single-pole multi-way switch, etc.; the configuration of the reference voltage can also be configured according to actual needs or the ratio of the resistance value of the configuration resistor to the resistance value of the resistor in the switch network.
[0058] In the above various embodiments, the switches in each address configuration circuit can be selected by technicians in this field according to actual needs. The specific types of transistors used in all switch tubes in each embodiment are not used as limitations on the scope of protection of the independent claims in this specification.
[0059] Although the present invention has been described with reference to illustrative embodiments, this description is not intended to be interpreted in a limiting sense. Various modifications and combinations of the illustrative embodiments, as well as other embodiments of the present invention, will be apparent to those skilled in the art when referring to the description. It is therefore intended that the appended claims cover all such modifications or embodiments.
Claims
1. A chip using a single pin to configure an address, comprising: One configuration pin for external configuration resistor; Address output terminal, outputting N-bit address signal, N is a natural number greater than or equal to 2; A switch network, comprising at least two groups of switch circuits, each group of switch circuits comprising a switch and a resistor connected in series, each group of switch circuits being coupled between a supply voltage and a configuration pin or between a configuration pin and a reference ground; When configuring the address, each group of switch circuits in the switch network is turned on respectively to generate the value of each bit of the N-bit address signal in turn.
2. The chip using a single pin configuration address as claimed in claim 1, wherein when the configuration resistor receives a supply voltage, at least one set of switch circuits in the switch network is coupled between the configuration pin and a reference ground. 3 . The chip using a single pin configuration address as claimed in claim 1 , wherein when the configuration resistor is coupled to a reference ground, at least one set of switch circuits in the switch network is coupled between a power supply voltage and a configuration pin.
4. The chip using a single-pin configuration address according to claim 1 has N working cycles. In the i-th working cycle, the value of the i-th bit of the N-bit address signal is generated according to the voltage on the configuration pin, where i is a natural number less than or equal to N.
5. The chip using a single pin configuration address according to claim 1, further comprising a digital converter, The digital converter outputs the value of each bit of the N-bit address signal according to the voltage on the configuration pin, and the value of each bit of the N-bit address signal is logic 0 or logic 1.
6. According to the chip using a single pin to configure the address as described in claim 5, the digital converter is a comparator having a first comparison terminal, a second comparison terminal and an output terminal, the first comparison terminal receives a reference voltage, the second comparison terminal is coupled to the configuration pin, and the output terminal is coupled to the address output terminal.
7. A circuit for configuring an address using a single pin, comprising: A configuration resistor network includes at least two configuration resistors and an output terminal, each configuration resistor has a first terminal and a second terminal, and the first terminal is coupled to a supply voltage or a reference ground; A chip using a single pin to configure an address, comprising a configuration pin, an address output terminal and a switch network, wherein the configuration pin is coupled to the output terminal of the configuration resistor network, and the address output terminal outputs an N-bit address signal, where N is a natural number greater than or equal to 2; the switch network comprises at least two groups of switch circuits, each group of switch circuits comprises a switch and a resistor connected in series, and each group of switch circuits is coupled between a power supply voltage and a configuration pin or between a configuration pin and a reference ground; When configuring the address, each group of switch circuits in the switch network is turned on respectively to generate the value of each bit of the N-bit address signal in turn.
8. According to the circuit using a single-pin configuration address as described in claim 7, the configuration resistor network also includes a switch having an input and an output, the input of the switch is coupled to the second end of each configuration resistor, and the output of the switch is coupled to the output of the configuration resistor network.
9. The circuit using a single pin to configure the address according to claim 7, wherein when the first end of the configuration resistor is coupled to the supply voltage, at least one set of switch circuits in the switch network is coupled between the configuration pin and a reference ground.
10. The circuit using a single pin to configure the address according to claim 7, wherein when the first end of the configuration resistor is coupled to the reference ground, at least one set of switch circuits in the switch network is coupled between the supply voltage and the configuration pin.
11. A method for configuring an address using a single pin, the method comprising: Determine the number of bits N of the address signal output by the address output terminal according to the number of devices; Determining the number of groups of switch circuits in the switch network according to the number of bits N of the address signal; The configuration pin is coupled to a power supply voltage or a reference ground through a configuration resistor to generate a value of an address signal.
12. The method according to claim 11 further comprises: The value of the address signal is changed by adjusting the resistance of the configuration resistor.
