Communication systems, interface multiplexing methods and media

By connecting and time-division multiplexing the SPI and I2C interfaces of the master control chip, the problem of wasted port resources in communication between the master control chip and the slave device chip is solved, and the optimized utilization of port resources is achieved.

CN123115017APending Publication Date: 2026-11-17SHENZHEN AIXIESHENG TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511984023.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-26
Publication Date
2026-11-17

AI Technical Summary

Technical Problem

In existing technologies, data communication between the master control chip and the slave device chip consumes too many port resources, resulting in resource waste.

Method used

By connecting the SPI interface of the first master control chip to the I2C interface of the second master control chip, sharing the port of the slave device chip, and using time-division multiplexing to switch the interface, the correct mode switching under different communication states is ensured.

Benefits of technology

This effectively reduces the port resource requirements of the device chip and achieves optimized utilization of port resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123115017A_ABST
    Figure CN123115017A_ABST
Patent Text Reader

Abstract

This invention discloses a communication system, comprising: a first master control chip, the first master control chip including n SPI interfaces; a second master control chip, the second master control chip including m I2C interfaces, where n is greater than m; and a slave device chip; wherein the n SPI interfaces are connected to n ports of the slave device chip; at least one of the m I2C interfaces is connected to an SPI interface, such that at least one I2C interface and the connected SPI interface are both connected to one port of the slave device chip, which is designated as the first port. The remaining ports of the slave device chip are designated as second ports. This interface connection method effectively reduces port resources.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of touch display technology, and more particularly to a touch system, a sensing coordinate correction method, a terminal, and a medium. Background Technology

[0002] like Figure 1 As shown, when there are three chips: master controller 1, master controller 2, and slave device chip, both master controller 1 and master controller 2 need to communicate with the slave device chip. The normal connection scheme is that master controller 1 (or 2) uses 4 SPI ports to connect with the slave device chip, and master controller 2 (or 1) uses 2 I2C ports to connect with the slave device chip. The slave device chip consumes a total of 6 port resources. Summary of the Invention

[0003] This invention provides a communication system, interface multiplexing method, and medium that can reduce port resources.

[0004] In a first aspect, a communication system is provided, comprising: a first master control chip, the first master control chip including n SPI interfaces; a second master control chip, the second master control chip including m I2C interfaces, where n is greater than m; a slave device chip; wherein the n SPI interfaces are connected to n ports of the slave device chip; at least one of the m I2C interfaces is connected to an SPI interface, such that at least one I2C interface and the connected SPI interface are both connected to one port of the slave device chip, which is designated as a first port; the port of the slave device chip that is simultaneously connected to both the I2C interface and the SPI interface is designated as a second port.

[0005] In some embodiments, any one of the m I2C interfaces is connected to each of the m SPI interfaces among the n SPI interfaces.

[0006] In some embodiments, the n SPI interfaces include SPI_CS, SPI_MOSI, SPI_MISO, and SPI_CLK, and the m I2C interfaces include I2C_CLK and I2C_SDA. The I2C_CLK is connected to one of SPI_CS, SPI_MOSI, SPI_MISO, and SPI_CLK, and the I2C_SDA is connected to the other of SPI_CS, SPI_MOSI, SPI_MISO, and SPI_CLK.

[0007] In some embodiments, the I2C_CLK is connected to the SPI_CLK, and the I2C_SDA is connected to the SPI_MOSI.

[0008] In a second aspect, an interface multiplexing method for the aforementioned communication system is provided, comprising: in a communication state, determining whether an SPI interface not connected to an I2C interface is at a low level; if the SPI interface not connected to an I2C interface is at a low level, then setting the first port to SPI slave mode and communicating with the SPI interface in the first master control chip; if the SPI interface not connected to an I2C interface is at a high level, then setting the first port to I2C slave mode and communicating with the I2C interface in the second master control chip.

[0009] In some embodiments, determining whether the SPI interface not connected to the I2C interface is at a low level includes: determining whether SPI_CS is at a low level; determining whether the SPI interface not connected to the I2C interface is at a high level includes: determining whether SPI_CS is at a high level; wherein SPI_CS is not connected to the I2C interface.

[0010] In some embodiments, in the absence of communication, the first port is set to I2C slave mode to communicate and interact with the I2C interface in the second master control chip.

[0011] In some embodiments, setting the first port to SPI slave mode if the SPI interface not connected to the I2C interface is at a low level includes: if the SPI interface not connected to the I2C interface is at a low level, determining whether the first port is in SPI slave mode; if not, determining whether the first port is in SPI slave mode; if the SPI interface not connected to the I2C interface is at a high level, setting the first port to I2C slave mode includes: if the SPI interface not connected to the I2C interface is at a high level, determining whether the first port is in I2C slave mode; if not, setting the first port to I2C slave mode.

[0012] In a third aspect, a computer-readable storage medium stores a computer program that, when executed by a processor, implements the interface reuse method as described above.

[0013] In the aforementioned communication system, interface multiplexing method, and medium-based solution, the SP pin of the first master control chip is connected to the I2C pin of the second master control chip, using the same slave device chip port, thereby reducing port resources on the slave device chip side. Interface multiplexing is achieved through time-division multiplexing. Attached Figure Description

[0014] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0015] Figure 1 This is a schematic diagram of the connection structure between the master control chip and the slave device in the background technology;

[0016] Figure 2 This is a schematic diagram of the connection structure between the master control chip and the slave device in one embodiment of the present invention;

[0017] Figure 3 This is a flowchart of an interface reuse method in one embodiment of the present invention. Detailed Implementation

[0018] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0019] This invention provides a communication system, such as... Figure 2 As shown, it includes: a first master control chip 10, which includes n SPI interfaces; a second master control chip 20, which includes m I2C interfaces, where n is greater than m; and a slave device chip 30. The n SPI interfaces are connected to n ports of the slave device chip 30. At least one of the m I2C interfaces is connected to an SPI interface, such that at least one I2C interface and the connected SPI interface are both connected to one port of the slave device chip 30, which is called the first port. The remaining ports of the slave device chip 30 are called the second ports.

[0020] In some embodiments, the second master control chip 20 has only one I2C interface and the first master control chip 10 has one SPI interface connected to one port of the slave device chip 30, thus reducing the number of ports of the slave device chip by one.

[0021] In some embodiments, any one of the m I2C interfaces is connected to each of the m SPI interfaces among the n SPI interfaces. The second master control chip 20 has m I2C interfaces that, together with the m SPI interfaces of the first master control chip 10, connect to the ports of the m slave device chips 30, thus reducing the number of ports on the slave device chips by m.

[0022] In some embodiments, such as Figure 2 As shown, the n SPI interfaces include SPI_CS, SPI_MOSI, SPI_MISO, and SPI_CLK, and the m I2C interfaces include I2C_CLK and I2C_SDA. I2C_CLK is connected to one of SPI_CS, SPI_MOSI, SPI_MISO, and SPI_CLK, and I2C_SDA is connected to the other of SPI_CS, SPI_MOSI, SPI_MISO, and SPI_CLK.

[0023] In some embodiments, I2C_CLK is connected to SPI_CLK, and I2C_SDA is connected to SPI_MOSI. SPI_CS is reserved to not share a port with I2C. Figure 1 As shown, the port in slave device chip 30 connected to SPI_CS and SPI_MISO is the second port, and the port in slave device chip 30 connected to SPI_MOSI and SPI_CLK is the first port.

[0024] In a second aspect, an interface multiplexing method for the aforementioned communication system is provided, comprising: in a communication state, determining whether an SPI interface not connected to an I2C interface is at a low level; if the SPI interface not connected to an I2C interface is at a low level, then setting the first port to SPI slave mode and communicating with the SPI interface in the first master control chip 10; if the SPI interface not connected to an I2C interface is at a high level, then setting the first port to I2C slave mode and communicating with the I2C interface in the second master control chip 20.

[0025] Specific reference Figure 2 When the SPI_CS pin is detected to be low (the CS pin is always low during SPI communication as it functions as a chip select), the port of slave chip 30 is initialized to SPI slave mode, enabling slave chip 30 to communicate normally with the first master chip 10 via SPI. When the SPI_CS pin is detected to be high, the port of slave chip 30 is initialized to I2C slave mode, enabling slave chip 30 to communicate normally with the second master chip 20 via I2C. In this way, time-division multiplexing interaction between the first master chip 10, the second master chip 20, and the slave chip 30 can be achieved when sharing a port.

[0026] In some embodiments, determining whether the SPI interface not connected to the I2C interface is at a low level includes: determining whether SPI_CS is at a low level; determining whether the SPI interface not connected to the I2C interface is at a high level includes: determining whether SPI_CS is at a high level; wherein SPI_CS is not connected to the I2C interface.

[0027] In some embodiments, in the absence of communication, the first port is set to I2C slave mode to communicate with the I2C interface in the second master control chip 20. In some embodiments, in the absence of communication, the first port can also be set to SPI slave mode to communicate with the SPI interface in the first master control chip 10.

[0028] In some embodiments, setting the first port to SPI slave mode if the SPI interface not connected to the I2C interface is at a low level includes: if the SPI interface not connected to the I2C interface is at a low level, determining whether the first port is in SPI slave mode; if not, determining whether the first port is in SPI slave mode; if the SPI interface not connected to the I2C interface is at a high level, setting the first port to I2C slave mode includes: if the SPI interface not connected to the I2C interface is at a high level, determining whether the first port is in I2C slave mode; if not, setting the first port to I2C slave mode.

[0029] In the aforementioned communication system, interface multiplexing method, and medium-based solution, the SP pin of the first master control chip is connected to the I2C pin of the second master control chip, using the same slave device chip port, thereby reducing port resources on the slave device chip side. Interface multiplexing is achieved through time-division multiplexing.

[0030] In a third aspect, a computer-readable storage medium stores a computer program that, when executed by a processor, implements the interface reuse method as described above.

[0031] It should be noted that the functions or steps that can be implemented by the computer-readable storage medium or computer device described above can be referred to the relevant descriptions on the server side and client side in the foregoing method embodiments. To avoid repetition, they will not be described one by one here.

[0032] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0033] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is used as an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.

[0034] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included within the protection scope of the present invention.

Claims

1. A communication system, characterized in that, include: The first main control chip includes n SPI interfaces; The second main control chip includes m I2C interfaces, where n is greater than m; From the device chip; The n SPI interfaces are connected to the n ports of the slave device chip; At least one of the m I2C interfaces is connected to an SPI interface, such that at least one I2C interface and the connected SPI interface are connected to one port of the slave device chip, which is the first port. The remaining ports of the slave device chip are the second ports.

2. The communication system according to claim 1, characterized in that, Each of the m I2C interfaces is connected to one of the m SPI interfaces among the n SPI interfaces.

3. The communication system according to claim 1 or 2, characterized in that, The n SPI interfaces include SPI_CS, SPI_MOSI, SPI_MISO, and SPI_CLK, and the m I2C interfaces include I2C_CLK and I2C_SDA. I2C_CLK is connected to one of SPI_CS, SPI_MOSI, SPI_MISO, and SPI_CLK, and I2C_SDA is connected to the other of SPI_CS, SPI_MOSI, SPI_MISO, and SPI_CLK.

4. The communication system according to claim 3, characterized in that, The I2C_CLK is connected to the SPI_CLK, and the I2C_SDA is connected to the SPI_MOSI.

5. A method for interface multiplexing in a communication system as described in any one of claims 1-4, characterized in that, include: In communication mode, determine whether the SPI interface that is not connected to the I2C interface is at a low level; If the SPI interface that is not connected to the I2C interface is at a low level, then the first port is set to SPI slave mode and communicates with the SPI interface in the first master control chip. If the SPI interface that is not connected to the I2C interface is at a high level, then the first port is set to I2C slave mode to communicate with the I2C interface in the second master control chip.

6. The interface reuse method according to claim 5, characterized in that, The step of determining whether the SPI interface that is not connected to the I2C interface is at a low level includes: determining whether SPI_CS is at a low level; The step of determining whether the SPI interface that is not connected to the I2C interface is at a high level includes: determining whether SPI_CS is at a high level; and the SPI_CS is not connected to the I2C interface.

7. The interface reuse method according to claim 5, characterized in that, In the absence of communication, the first port is set to I2C slave mode to communicate with the I2C interface in the second master control chip.

8. The interface reuse method according to claim 7, characterized in that, The step of setting the first port to SPI slave mode if the SPI interface not connected to the I2C interface is at a low level includes: if the SPI interface not connected to the I2C interface is at a low level, determining whether the first port is in SPI slave mode; if not, determining whether the first port is in SPI slave mode. If the SPI interface without an I2C interface is at a high level, then the first port is set to I2C slave mode, including: if the SPI interface without an I2C interface is at a high level, determining whether the first port is in I2C slave mode; if not, then setting the first port to I2C slave mode.

9. A computer-readable storage medium, characterized in that, A computer-readable storage medium stores a computer program that, when executed by a processor, implements the interface multiplexing method as described in any one of claims 5-8.