CN205210878U - USB interface converting equipment based on STM32 singlechip - Google Patents
USB interface converting equipment based on STM32 singlechip Download PDFInfo
- Publication number
- CN205210878U CN205210878U CN201520966054.3U CN201520966054U CN205210878U CN 205210878 U CN205210878 U CN 205210878U CN 201520966054 U CN201520966054 U CN 201520966054U CN 205210878 U CN205210878 U CN 205210878U
- Authority
- CN
- China
- Prior art keywords
- interface
- chip
- chip microcomputer
- usb
- stm32 single
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000006243 chemical reaction Methods 0.000 claims abstract description 59
- 238000004891 communication Methods 0.000 claims abstract description 32
- 230000009286 beneficial effect Effects 0.000 description 2
- 238000010586 diagram Methods 0.000 description 2
- 238000000034 method Methods 0.000 description 2
- 230000002457 bidirectional effect Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
Landscapes
- Power Sources (AREA)
Abstract
一种基于STM32单片机的USB接口转换设备,其结构为:PC机通过USB中间连接在STM32单片机的USB接口上,STM32单片机的SPI接口、USARTI接口和I2C接口分别连接在电平转换模块上;STM32单片机的CAN接口通过CAN通信芯片连接在电平转换模块上,STM32单片机的USART2接口通过通信芯片连接在电平转换模块上;电平转换模块包括有电平转换芯片和电源转换模块。本实用新型能够使USB接口转换设备兼容不同的测试系统电压需求,适用性能强,使用方便成本小。
A USB interface conversion device based on STM32 single-chip microcomputer, its structure is: the PC is connected to the USB interface of the STM32 single-chip microcomputer through USB, and the SPI interface, USARTI interface and I2C interface of the STM32 single-chip microcomputer are respectively connected to the level conversion module; STM32 The CAN interface of the single-chip microcomputer is connected to the level conversion module through the CAN communication chip, and the USART2 interface of the STM32 single-chip microcomputer is connected to the level conversion module through the communication chip; the level conversion module includes a level conversion chip and a power conversion module. The utility model can make the USB interface conversion equipment compatible with different test system voltage requirements, has strong applicability, convenient use and low cost.
Description
技术领域 technical field
本实用新型涉及通信技术,特别涉及一种基于USB的接口转换设备。 The utility model relates to communication technology, in particular to a USB-based interface conversion device.
背景技术 Background technique
在电子通信等领域常常涉及到不同接口信号之间的转换,如USB转换RS232、USB转SPI等协议之间的转换。但现有的信号转换设备大多是都是一对一的,即一种转接头只能转换一种信号,则对于一些需要使用多种通信格式的应用终端则需要配置多种转接口,使用不方便。现在虽有USB转接多种接口的设备,但其需要特定的上位机软件,无法兼容通用的上位机软件如串口助手。并且大多支持某种通信协议的一种情况,以SPI通信协议为例,SPI通信协议有4种模式,一般的转接口只支持其中一种模式。如果待测试的芯片为电压芯片,例如1.5V和1.2V电压的芯片,传统的5V或3.3V转换接口由于没有电平转换电路,对于这类低电压器件则无法测量,因此提出一种基于STM32芯片的USB接口转换设备。 In the field of electronic communication, the conversion between different interface signals is often involved, such as the conversion between USB to RS232, USB to SPI and other protocols. However, most of the existing signal conversion devices are one-to-one, that is, one adapter can only convert one signal, and for some application terminals that need to use multiple communication formats, it is necessary to configure multiple adapters. convenient. Although there are devices that connect USB to multiple interfaces, they require specific host computer software and cannot be compatible with general host computer software such as serial port assistants. And most of them support a certain communication protocol. Taking the SPI communication protocol as an example, the SPI communication protocol has 4 modes, and the general interface only supports one of the modes. If the chip to be tested is a voltage chip, such as a chip with a voltage of 1.5V and 1.2V, the traditional 5V or 3.3V conversion interface cannot be measured for such low-voltage devices because there is no level conversion circuit. Therefore, a method based on STM32 is proposed. The chip's USB interface conversion device.
发明内容 Contents of the invention
为了解决上述技术问题,本实用新型提供了一种基于STM32单片机的USB接口转换设备,通过在PC机与外部接口之间设置STM32单片机和电平转换模块,并且在STM32单片机和电平转换模块设置有通信芯片,在电平转换模块的输出端设置有电源转换模块,解决了现有技术中存在的一种转接头只能转换一种信号,则对于一些需要使用多种通信格式的应用终端则需要配置多种转接口,使用不方便的技术问题。 In order to solve the above technical problems, the utility model provides a USB interface conversion device based on the STM32 single-chip microcomputer, by setting the STM32 single-chip microcomputer and the level conversion module between the PC and the external interface, and setting the STM32 single-chip microcomputer and the level conversion module There is a communication chip, and a power conversion module is installed at the output end of the level conversion module, which solves the problem that one kind of adapter in the prior art can only convert one kind of signal, and some application terminals that need to use multiple communication formats It is necessary to configure a variety of adapters, which is a technical problem that is inconvenient to use.
为了实现上述目的,本实用新型采用的技术方案是:一种基于STM32单片机的USB接口转换设备,其特征在于:PC机通过USB中间连接在STM32单片机的USB接口上,STM32单片机的SPI接口、USARTI接口和I2C接口分别连接在电平转换模块上;STM32单片机的CAN接口通过CAN通信芯片连接在电平转换模块上,STM32单片机的USART2接口通过通信芯片连接在电平转换模块上;电平转换模块包括有电平转换芯片和电源转换模块。 In order to achieve the above object, the technical solution adopted by the utility model is: a USB interface conversion device based on STM32 single-chip microcomputer, which is characterized in that: PC is connected to the USB interface of STM32 single-chip microcomputer through USB, the SPI interface of STM32 single-chip microcomputer, USARTI The interface and the I2C interface are respectively connected to the level conversion module; the CAN interface of the STM32 microcontroller is connected to the level conversion module through the CAN communication chip, and the USART2 interface of the STM32 single chip is connected to the level conversion module through the communication chip; the level conversion module Including level conversion chip and power conversion module.
所述的CAN通信芯片为TAJ1050,通信芯片为MAX485,电平转换芯片为芯片YF08E。 The CAN communication chip is TAJ1050, the communication chip is MAX485, and the level conversion chip is YF08E.
本实用新型的有益效果在于:本实用新型提供了一种基于STM32单片机的USB接口转换设备,通过在PC机与外部接口之间设置STM32单片机和电平转换模块,并且在STM32单片机和电平转换模块设置有通信芯片,在电平转换模块的输出端设置有电源转换模块。通过上述结构,本实用新型能够使USB接口转换设备兼容不同的测试系统电压需求,适用性能强,使用方便成本小。 The beneficial effects of the utility model are: the utility model provides a USB interface conversion device based on the STM32 single-chip microcomputer, by setting the STM32 single-chip microcomputer and the level conversion module between the PC and the external interface, and between the STM32 single-chip microcomputer and the level conversion The module is provided with a communication chip, and the output end of the level conversion module is provided with a power conversion module. Through the above structure, the utility model can make the USB interface conversion device compatible with different test system voltage requirements, has strong applicability, and is convenient to use and low in cost.
附图说明 Description of drawings
图1:为本实用新型的电路框图。 Fig. 1: is the circuit block diagram of the present utility model.
图2:为本实用新型的电路原理图。 Fig. 2: is the schematic circuit diagram of the utility model.
具体实施方式 detailed description
如图1-2所示的一种基于STM32单片机的USB接口转换设备,其结构为:PC机通过USB中间连接在STM32单片机1的USB接口上,STM32单片机1的SPI接口6、USARTI接口4和I2C接口5分别连接在电平转换模块3上;STM32单片机1的CAN接口9通过CAN通信芯片10连接在电平转换模块3上,STM32单片机1的USART2接口7通过通信芯片8连接在电平转换模块3上;电平转换模块3包括有电平转换芯片3-1和电源转换模块3-2。所述的CAN通信芯片10为TAJ1050,通信芯片8为MAX485,电平转换芯片3-1为芯片YF08E。 As shown in Figure 1-2, a USB interface conversion device based on STM32 single-chip microcomputer, its structure is: PC is connected to the USB interface of STM32 single-chip microcomputer 1 through USB, SPI interface 6 of STM32 single-chip microcomputer 1, USARTI interface 4 and The I2C interface 5 is respectively connected to the level conversion module 3; the CAN interface 9 of the STM32 single-chip microcomputer 1 is connected to the level conversion module 3 through the CAN communication chip 10, and the USART2 interface 7 of the STM32 single-chip microcomputer 1 is connected to the level conversion through the communication chip 8 On the module 3; the level conversion module 3 includes a level conversion chip 3-1 and a power conversion module 3-2. The CAN communication chip 10 is TAJ1050, the communication chip 8 is MAX485, and the level conversion chip 3-1 is chip YF08E.
电平转换芯片3-1的输入端输入一种电平的设备接口,经过电平转换芯片后经过电源转换模块3-2,输出另一种接口的电平信号接至外设。现以SPI接口为例进行说明:如STM32单片机1的SPI接口6为3.3V电平标准,而与之进行通信的芯片SPI接口13电平标准为1.8V,它们之间存在电平不兼容的问题,通过转换,能够使3.3V电平芯片与1.8V电平芯片进行兼容通信。 The input terminal of the level shifting chip 3-1 inputs a level device interface, passes through the level shifting chip and then passes through the power conversion module 3-2, and outputs another level signal of the interface to be connected to the peripheral device. Now take the SPI interface as an example to illustrate: For example, the SPI interface 6 of STM32 microcontroller 1 is 3.3V level standard, and the chip SPI interface 13 level standard for communicating with it is 1.8V, and there is a level incompatibility between them. The problem is that through conversion, 3.3V level chips can be compatible with 1.8V level chips for communication.
电平转换芯片3-1内部设有输入与输出两组接口,输入接口设有若干双向IO接口,IO接口电压与输出接口电压相同,电平转换模块能够使两个不同的电压标准进行双向通信。 There are two sets of input and output interfaces inside the level conversion chip 3-1. The input interface is equipped with several bidirectional IO interfaces. The voltage of the IO interface is the same as the voltage of the output interface. The level conversion module can enable two different voltage standards to communicate bidirectionally. .
本实用新型提供了一种USB转接UASRT、I2C、485、CAN、SPI协议的转接口,上述转换接口的测试工作均可在串口助手中完成。同时提供电平转换模块3,使转换接口能够兼容不同的电平需求。 The utility model provides an interface for transferring USB to UASRT, I2C, 485, CAN, and SPI protocols. The test work of the above-mentioned conversion interface can be completed in the serial port assistant. At the same time, a level conversion module 3 is provided to make the conversion interface compatible with different level requirements.
STM32单片机1的USB接口通过USB线连接到PC,USB线不仅作为PC机与STM32单片机1的通信接口,而且也作为该系统的供电接口,USB接口输入的+5V电压通过稳压芯片稳定为3.3V。通过STM32单片机1后,经过各个接口输出到电平转换芯片3-1的输入端,经过电平转换芯片3-1和电源转换模块3-2转换后连接到外部输出端。USART27与485通信芯片8连接,将RS232串口通信协议转换为485通信协议,485通信芯片8与电平转换芯片3-1的输入端连接。CAN接口9与CAN通信芯片10相连,CAN接口9与CAN通信芯片10相连进行CAN协议通信,CAN芯片10与电平转换芯片3-1的输入端连接。 The USB interface of STM32 microcontroller 1 is connected to the PC through a USB cable. The USB cable is not only used as the communication interface between the PC and STM32 microcontroller 1, but also as the power supply interface of the system. The +5V voltage input by the USB interface is stabilized to 3.3 by the voltage regulator chip. V. After passing through the STM32 single-chip microcomputer 1, it is output to the input terminal of the level conversion chip 3-1 through various interfaces, and then connected to the external output terminal after being converted by the level conversion chip 3-1 and the power conversion module 3-2. The USART27 is connected with the 485 communication chip 8 to convert the RS232 serial port communication protocol into the 485 communication protocol, and the 485 communication chip 8 is connected with the input end of the level conversion chip 3-1. The CAN interface 9 is connected to the CAN communication chip 10, the CAN interface 9 is connected to the CAN communication chip 10 for CAN protocol communication, and the CAN chip 10 is connected to the input end of the level conversion chip 3-1.
本实用新型的有益效果是:基于STM32单片机的USB接口转换设备,通过USB线连接到PC机的USB口,在PC机上安装ST公司的VCP驱动程序,可以将STM32单片机的USB设备识别为一个串口设备,即像操作串口设备一样操作STM32单片机的USB接口。同时本实用新型增加了电平转换模块,能够使USB接口转换设备兼容不同的测试系统电压需求。 The beneficial effect of the utility model is: the USB interface conversion device based on the STM32 single-chip microcomputer is connected to the USB port of the PC through the USB cable, and the VCP driver program of ST Company is installed on the PC, so that the USB device of the STM32 single-chip microcomputer can be identified as a serial port Device, that is, operate the USB interface of the STM32 microcontroller like operating a serial device. At the same time, the utility model adds a level conversion module, which can make the USB interface conversion equipment compatible with different test system voltage requirements.
Claims (2)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201520966054.3U CN205210878U (en) | 2015-11-28 | 2015-11-28 | USB interface converting equipment based on STM32 singlechip |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201520966054.3U CN205210878U (en) | 2015-11-28 | 2015-11-28 | USB interface converting equipment based on STM32 singlechip |
Publications (1)
Publication Number | Publication Date |
---|---|
CN205210878U true CN205210878U (en) | 2016-05-04 |
Family
ID=55848584
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201520966054.3U Active CN205210878U (en) | 2015-11-28 | 2015-11-28 | USB interface converting equipment based on STM32 singlechip |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN205210878U (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112256608A (en) * | 2020-12-23 | 2021-01-22 | 智道网联科技(北京)有限公司 | Data conversion method, device and electronic device |
CN113056096A (en) * | 2019-12-29 | 2021-06-29 | 苏州匠致电子科技有限公司 | Domestic control mainboard based on godson 2K |
-
2015
- 2015-11-28 CN CN201520966054.3U patent/CN205210878U/en active Active
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113056096A (en) * | 2019-12-29 | 2021-06-29 | 苏州匠致电子科技有限公司 | Domestic control mainboard based on godson 2K |
CN112256608A (en) * | 2020-12-23 | 2021-01-22 | 智道网联科技(北京)有限公司 | Data conversion method, device and electronic device |
CN112256608B (en) * | 2020-12-23 | 2022-03-04 | 智道网联科技(北京)有限公司 | Data conversion method and device and electronic equipment |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN205210878U (en) | USB interface converting equipment based on STM32 singlechip | |
CN105629828B (en) | Multi-protocols isolated form digital signal driving source | |
CN204229835U (en) | A kind of USB interface modular converter | |
CN206696843U (en) | A kind of USB turns UART communication modules | |
CN209281378U (en) | Chip commissioning device | |
CN103853684A (en) | Serial bus communication bridging device | |
CN203658990U (en) | Debugging device for central processing unit | |
CN203786725U (en) | A serial bus communication bridge | |
CN203366045U (en) | A digital quantity input-output device based on a CAN bus | |
CN204302969U (en) | The USB/RS232-CAN translation debugging device of various configurations mode | |
CN203012707U (en) | USB (Universal Serial Bus) serial port three-in-one converter | |
CN103279055A (en) | Design scheme of adaptor board for connecting Arinc708 board card with field programmable gate array (FPGA) development board | |
CN203502842U (en) | GLCC multiphase flow metering device controller | |
CN201130373Y (en) | Apparatus for converting ARINC429 device into USB interface | |
CN203502955U (en) | A processor system with multi-channel data real-time transmission and processing technology | |
CN103743494B (en) | A kind of multi-channel temperature acquisition device and method | |
CN203250164U (en) | BCD code conversion device | |
CN102779107A (en) | COM port adapter for connecting USB (universal serial bus) device | |
CN203025276U (en) | Tester of capacitive touch screen module | |
CN201435072Y (en) | Universal data acquisition unit based on USB interface | |
CN205430174U (en) | Real -time measurement system of solar cell panel voltage electric current | |
CN205983121U (en) | Switching station is synthesized intelligent terminal and is observed and controled board | |
CN206601595U (en) | Electric monitoring platform based on multiprocessor | |
CN204480238U (en) | A kind of universal serial bus switching device shifter | |
CN105573953B (en) | More subcard high speed interactive type communication modules and system based on universal serial bus |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C14 | Grant of patent or utility model | ||
GR01 | Patent grant |