Universal multi-interface converter and data processing method

By combining the use of dual-port RAM modules and multiple transceivers, efficient conversion of USB interfaces and UART, I2C and SPI interfaces is achieved, solving the problem of mutual influence of interfaces in the prior art, improving data transmission efficiency and reducing equipment costs.

CN115098417BActive Publication Date: 2025-08-19SUZHOU MICROELECTRONICS IND TECH RES INST OF SCI & TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210801648.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-08
Publication Date
2025-08-19
Estimated Expiration
2042-07-08

AI Technical Summary

Technical Problem

Existing converters cannot support USB interfaces, UART, I2C and SPI interfaces at the same time, and multi-interface converters are likely to affect transmission efficiency between each other.

Method used

It adopts a combination design of dual-port RAM module, USB transceiver, conversion control module, UART transceiver, I2C transceiver and SPI transceiver to realize efficient conversion and transmission of data between different interfaces.

Benefits of technology

It realizes efficient integration of USB interface with UART, I2C and SPI interfaces, simplifies connection, improves data transmission efficiency, and reduces equipment costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115098417B_ABST
    Figure CN115098417B_ABST
Patent Text Reader

Abstract

The present invention discloses a universal multi-interface converter and data processing method, which includes: a dual-port RAM module; a USB transceiver for receiving host computer data and uploading specified interface data; a conversion control module for receiving host computer control instructions and completing corresponding interface parameter configuration; a UART transceiver for communicating with an external serial port device; an I2C transceiver for communicating with an external I2C device; and an SPI transceiver. The conversion control module is respectively connected to the USB transceiver, the RAM module, the UART transceiver, the I2C transceiver, and the SPI transceiver; and the RAM module is respectively connected to the USB transceiver, the protocol conversion control module, the UART transceiver, the I2C transceiver, and the SPI transceiver. Since the present invention adopts a USB direct chip method, the speed is not limited and the connection is simplified, which can solve the current problem of intercommunication between computers and three universal low-speed interface devices.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application specifically relates to a universal multi-interface converter and a data processing method. Background Art

[0002] Currently, no converter can simultaneously support conversion between USB interfaces and UART, I2C, and SPI interfaces. In addition, the interface rates of most multi-interface converters easily affect each other, resulting in reduced data transmission efficiency. Therefore, how to achieve the integration of the above interfaces without affecting each other's transmission efficiency is an urgent problem to be solved. Summary of the Invention

[0003] The main purpose of this application is to provide an efficient universal multi-interface converter.

[0004] To achieve the aforementioned invention objectives, the technical solution adopted in this application includes: a universal multi-interface converter, comprising:

[0005] Dual-port RAM module;

[0006] USB transceiver, used to receive data from the host computer and upload data to the specified interface;

[0007] Conversion control module, used to receive host computer control instructions and complete corresponding interface parameter configuration;

[0008] UART transceiver, used to communicate with external serial port devices and complete data transmission and reception;

[0009] I2C transceiver, used to communicate with external I2C devices and complete data transmission and reception;

[0010] SPI transceiver;

[0011] The conversion control module is connected to the USB transceiver, RAM module, UART transceiver, I2C transceiver and SPI transceiver respectively; the RAM module is connected to the USB transceiver, protocol conversion control module, UART transceiver, I2C transceiver and SPI transceiver respectively.

[0012] In another preferred embodiment, the UART transceiver is provided with a UART interface.

[0013] In another preferred embodiment, the SPI transceiver is provided with an SPI interface.

[0014] In another preferred embodiment, the I2C transceiver is provided with an I2C interface.

[0015] The present invention also provides a data processing method based on the above-mentioned universal multi-interface converter, which includes: after power-on, the universal multi-interface converter completes its own initialization work, automatically enters USB slave mode, and waits for the host computer to select the working mode; after receiving the setting command, selects the corresponding UART, SPI, I2C mode interface, completes parameter setting, and waits for data transmission.

[0016] Another preferred method is that when the serial port communication mode is selected and the serial port data sending mode is in progress, when the data sent by the host computer to the serial port is received, the USB transceiver caches the received data into the dual-port RAM module, and the conversion control module packages the data according to the set serial port working mode, and then sends the data through the serial port transceiver.

[0017] Another preferred method is to select serial communication mode and be in serial port data receiving mode. When receiving data uploaded from the serial port to the host computer, the serial port transceiver buffers the received data into the dual-port RAM module. The conversion control module parses the serial port data, packages it according to the USB format, and then sends the data through the USB transceiver.

[0018] Another preferred method is that when the SPI communication mode is selected and the SPI data sending mode is in place, when the data sent by the host computer to the SPI interface device is received, the USB transceiver caches the received data into the dual-port RAM module, and the conversion control module packages the data according to the set SPI working mode, and then sends the data through the SPI transceiver.

[0019] Another preferred method is to select the SPI communication mode and be in the SPI data receiving mode. When the SPI receives data uploaded to the host computer, the SPI transceiver caches the received data into the dual-port RAM module, the conversion control module parses the SPI data, and then packages the data according to the USB format, and then sends the data through the USB transceiver.

[0020] Another preferred method is that when the I2C communication mode is selected and the I2C data sending mode is in place, when the data sent by the host computer to the I2C interface device is received, the USB transceiver caches the received data into the dual-port RAM module, and the conversion control module packages the data according to the set I2C working mode, and then sends the data through the I2C transceiver.

[0021] Another preferred method is to select the I2C communication mode and receive data using SPI. When receiving data uploaded by I2C to the host computer, the I2C transceiver caches the received data into the dual-port RAM module, and the conversion control module parses the I2C data, packages the data according to the USB format, and then sends the data through the USB transceiver.

[0022] Compared with the prior art, the present application has the following advantages: since the present invention adopts the USB direct connection chip method, the speed is not limited and the connection is simplified; the universal multi-interface converter design adopted by the present invention can solve the current problem of intercommunication between computers and three universal low-speed interface devices, and it has the advantages of simple control, easy use, easy portability and low price. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] Figure 1 This is a diagram showing the external interfaces of the universal multi-interface converter of the present invention;

[0024] Figure 2 This is a diagram showing the relationship between the internal functional modules of the universal multi-interface converter of the present invention;

[0025] Figure 3 This is a flow chart of the control process of the universal multi-interface converter in the present invention. DETAILED DESCRIPTION

[0026] Reference Figure 2 , universal multi-interface converter, including USB transceiver, conversion control module, dual-port RAM module, UART transceiver, SPI transceiver, I2C transceiver. The conversion control module and USB transceiver, dual-port RAM module, UART transceiver, SPI transceiver, I2C transceiver bidirectional transmission; dual-port RAM module and USB transceiver, conversion control module, UART transceiver, SPI transceiver bidirectional transmission. Figure 1 The universal multi-interface converter provides peripheral interfaces including USB, UART, SPI, and I2C. The SPI and I2C interfaces use master mode to connect to external devices. The USB interface uses slave mode to support interconnection with host computers, including computers. The UART interface does not distinguish between master and slave devices.

[0027] Reference Figure 3 , the data processing method based on the above universal multi-interface converter is as follows:

[0028] After power-on, the universal multi-interface converter completes its initialization and automatically enters USB slave mode, waiting for the host computer to select the operating mode. After receiving the setup command, it selects the corresponding UART, SPI, or I2C mode interface, completes parameter settings, and waits for data transmission.

[0029] When the serial port communication mode is selected and the serial port data sending mode is in progress, when the data sent by the host computer to the serial port is received, the USB transceiver will cache the received data into the dual-port RAM module, and the conversion control module will package the data according to the set serial port working mode, and then send the data through the serial port transceiver.

[0030] When the serial port communication mode is selected and the serial port is in the data receiving mode, when the serial port receives data uploaded to the host computer, the serial port transceiver will cache the received data into the dual-port RAM module, the conversion control module will parse the serial port data, and then package the data according to the USB format, and then send the data through the USB transceiver.

[0031] When the SPI communication mode is selected and the SPI data sending mode is in progress, when the data sent by the host computer to the SPI interface device is received, the USB transceiver will cache the received data into the dual-port RAM module, and the conversion control module will package the data according to the set SPI working mode, and then send the data through the SPI transceiver.

[0032] When the SPI communication mode is selected and the SPI data receiving mode is in place, when the SPI receives data uploaded to the host computer, the SPI transceiver caches the received data into the dual-port RAM module, the conversion control module parses the SPI data, and then packages the data according to the USB format, and then sends the data through the USB transceiver.

[0033] When the I2C communication mode is selected and the I2C data sending mode is in place, when the data sent by the host computer to the I2C interface device is received, the USB transceiver caches the received data into the dual-port RAM module, and the conversion control module packages the data according to the set I2C working mode, and then sends the data through the I2C transceiver.

[0034] When the I2C communication mode is selected and SPI receives data, when the data uploaded to the host computer by I2C is received, the I2C transceiver will cache the received data into the dual-port RAM module, and the conversion control module will parse the I2C data, then package the data according to the USB format, and then send the data through the USB transceiver.

[0035] The above embodiments are intended only to illustrate the technical concepts and features of the present invention. Their purpose is to enable those skilled in the art to understand the contents of the present invention and implement them accordingly. They are not intended to limit the scope of protection of the present invention. Any equivalent changes or modifications made in accordance with the spirit of the present invention are intended to be covered by the scope of protection of the present invention.

Claims

1. A data processing method based on a universal multi-interface converter, the universal multi-interface converter comprising: Dual-port RAM module; USB transceiver, used to receive data from the host computer and upload data to the specified interface; Conversion control module, used to receive host computer control instructions and complete corresponding interface parameter configuration; UART transceiver, used to communicate with external serial port devices and complete data transmission and reception; I2C transceiver, used to communicate with external I2C devices and complete data transmission and reception; SPI transceiver; wherein the conversion control module is respectively connected to the USB transceiver, RAM module, UART transceiver, I2C transceiver and SPI transceiver; the RAM module is respectively connected to the USB transceiver, protocol conversion control module, UART transceiver, I2C transceiver and SPI transceiver; the UART transceiver is provided with a UART interface; the SPI transceiver is provided with an SPI interface, and the I2C transceiver is provided with an I2C interface. The processing method comprises: after power-on, the universal multi-interface converter automatically enters USB slave mode after completing its own initialization work, and waits for the host computer to select the working mode; after receiving the setting command, the corresponding UART, SPI, I2C mode interface is selected, and the parameter setting is completed. , waiting for data transmission; when the serial port communication mode is selected and it is in the serial port sending data mode, when the data sent by the host computer to the serial port is received, the USB transceiver will cache the received data in the dual-port RAM module, and the conversion control module will package the data according to the set serial port working mode, and then send the data through the serial port transceiver; when the serial port communication mode is selected and it is in the serial port receiving data mode, when the data uploaded by the serial port to the host computer is received, the serial port transceiver will cache the received data in the dual-port RAM module, the conversion control module will parse the serial port data, and then package the data according to the USB format, and then send the data through the USB transceiver; when the SPI communication mode is selected and it is in the SPI sending data mode, when the data sent by the host computer to the SPI interface device is received, the USB transceiver will cache the received data in the dual-port RAM module, and the conversion control module will package the data according to the set SPI working mode, and then send the data through the SPI transceiver.

2. The data processing method according to claim 1, wherein: When the SPI communication mode is selected and the SPI data receiving mode is in place, when the SPI receives data uploaded to the host computer, the SPI transceiver caches the received data into the dual-port RAM module, the conversion control module parses the SPI data, and then packages the data according to the USB format, and then sends the data through the USB transceiver.

3. The data processing method according to claim 1, wherein: When the I2C communication mode is selected and the I2C data sending mode is in place, when the data sent by the host computer to the I2C interface device is received, the USB transceiver caches the received data into the dual-port RAM module, and the conversion control module packages the data according to the set I2C working mode, and then sends the data through the I2C transceiver.

4. The data processing method according to claim 1, wherein: When the I2C communication mode is selected and SPI receives data, when the data uploaded to the host computer by I2C is received, the I2C transceiver will cache the received data into the dual-port RAM module, and the conversion control module will parse the I2C data, then package the data according to the USB format, and then send the data through the USB transceiver.

Citation Information

Patent Citations

  • Multi-interface bus converting expanding chip design

    CN104794088A

  • Controllable USB (Universal Serial Bus) master-slave mode exchange method

    CN112799995A