Google Chat: zj734465502@gmail.com
+86-0755-88291180
sales01@spotpear.com
dragon_manager@163.com
services01@spotpear.com
manager01@spotpear.com
WhatsApp:13246739196
Parameter Name | Parameters | |
Product Type | Industrial USB to UART/I2C/SPI/JTAG Converter | |
Power Supply | USB interface,5V | |
Operating Current | 55mA~65mA | |
Operating Voltage | 3.3V/5V (switchable via the switch) | |
Operating Temperature | -40℃~85℃ | |
Operating System | Linux, Windows 11 / 10 / 8.1 / 8 / 7 | |
USB Interface | Form Factor | USB-B Connector |
Interface Protection | Self-recovery fuse, ESD protection | |
UART Interface | Support Channels | 2 channels (The red double switch must be set to M0 mode) |
Interface Form | 6PIN Anti-reverse Connection Interface | |
Baudrate | 1200bps ~ 9Mbps (M0 mode) | |
1200bps ~ 7.5Mbps (M1/M2/M3 mode) | ||
Hardware Flow Control | CTS & RTS | |
I2C Interface | Support Channels | 1 channel (The red double switch must be set to M1/M2 mode) |
Interface Form | 12PIN anti-reverse connection interface (the first 4 pins are I2C) | |
SPI Interface | Support Channels | 1 channel (The red double switch must be set to M1/M2 mode) |
Interface Form | 12PIN anti-reverse connection interface (the last 8 pins are SPI) | |
JTAG Interface | Support Channels | 1 channel (The red double switch must be set to M3 mode) |
Interface Form | 12PIN anti-reverse connection interface (the last 8 pins are JTAG) |
In Mode 2, it operates as an HID plug-and-play device (Human Interface Device) and does not require drivers. Therefore, the newly added device may not be visible as a new port in the Device Manager.
Please power up after adjusting the mode.
The installation provides CH341PAR and CH343SER (driver demo), and you can view the serial port and corresponding ports through the device manager.
pip install pyserial
If you want to use two UART ports, you can switch to Mode0 and then connect to the PC.
The following is using two serial ports of the product to perform self-transmission and reception. Please switch to mode0.
USB TO UART/I2C/SPI/JTAG(UART0) | USB TO UART/I2C/SPI/JTAG(UART1) |
UART0.TXD | UART1.RXD |
UART0.RXD | UART1.TXD |
Set to the same baud rate, enter the characters to be sent, select "Add time stamp and packet display", and set "50ms/time, timed send".
Click on "Open Serial Ports" to receive data as shown below:
The following is a demonstration of self-sending and receiving using the product's two serial ports. (Sample demo)
USB TO UART/I2C/SPI/JTAG(UART0) | USB TO UART/I2C/SPI/JTAG(UART1) |
UART0.TXD | UART1.RXD |
UART0.RXD | UART1.TXD |
Click "Run" -> "Run Module" or directly click F5 to run the demos.
The effects as shown below:
If you want to use the serial port debugging assistant to send and receive UART when using I2C or SPI, please switch the mode to Mode 1 (Mode 2 is HID driverless mode and will not be displayed in the port).
The following is a sample demo that demonstrates how to acquire data (TF-Luna-related information and pinout) from the TF-Luna in I2C mode using the product's I2C function. (Sample demo).
Please set the mode switch to mode 1 or mode 2 and connect the computer after connecting the cable.
Peripheral(TF-Luna) | USB TO UART/I2C/SPI/JTAG |
Pin 1 | VCC |
Pin 2 | I2C.SDA |
Pin 3 | I2C.SCL |
Pin 4 | GND |
Pin 5 | GND (Connect it first, configure TF-Luna for I2C mode (required for TF-Luna)) |
Pin 6 | N/C |
① If you are using multiple USB TO UART/I2C/SPI/JTAG devices at the same time, please select the device at ① (similar to the device serial number, 0, 1, 2... etc.)
②Modify the I2C device address according to the actual need to operate.
Click "Run" -> "Run Module" or directly click F5 to run the demo.
The effects as shown below:
The following is a demonstration of using the I2C function of the product to turn on and off the data output of TF-Luna in I2C mode (TF-Luna-related information).
Download the I2C debugging software (USB TO UART_I2C_SPI_JTAG Software demo), no need to install it, directly open it to use.
Please switch the mode to mode 1 or mode 2 and connect the computer after connecting the cable.
Peripheral(TF-Luna) | USB TO UART/I2C/SPI/JTAG |
Pin 1 | VCC |
Pin 2 | I2C.SDA |
Pin 3 | I2C.SCL |
Pin 4 | GND |
Pin 5 | GND (Connect IT FIRST, configure TF-Luna for I2C mode (required for TF-Luna)) |
Pin 6 | N/C |
20 5A 05 07 00 66
Input 20 5A 05 07 01 67, clicking Write/Read will turn on the TF-Luna's data output (the TF-Luna's red light is on again).
The phenomenon is as follows (the shooting effect is more conspicuous than the human eye observation, please turn the TF-Luna to prevent the angle from not observing it).
If you want to use the serial port debugging assistant to send and receive UART when using I2C or SPI, please switch the mode to Mode 1 (Mode 2 is HID driverless mode and will not be displayed in the port).
The following is a demonstration of using the product's SPI function to turn on an OLED in SPI mode (OLED-related information) (sample demo)
The current example has already been set up, so there is no need to do the following operation:
The DLL file should be placed in the directory where the demo program is located, there are two DLL files stored in the sample file (corresponding to 64-bit system and 32-bit system respectively), please adjust according to the system.
Or you can modify the file path in the demo as the DLL file storage path.
Please set the mode switch to mode 1 or mode 2 and connect the computer after connecting the cable.
Peripheral | USB TO UART/I2C/SPI/JTAG |
RES | UART1.RTS (Used to control OLEDs for reset (required for OLEDs)) |
D/C | UART1.CTS (Used to indicate whether a command or data is being sent (required for OLEDs)) |
CS | SPI.CS0 |
CLK | SPI.SCK |
DIN | SPI.SDO |
GND | SPI.GND |
VCC | SPI.VCC |
① If you are using more than one USB TO UART/I2C/SPI/JTAG device at the same time, please select the device at ① in the CH347T_Config.py file (similar to the device serial number, 0, 1, 2... etc.)
Click "Run" -> "Run Module" or click F5 to run the demo.
The effect is shown below:
The following is a demonstration of using the SPI function of the product to light up the OLED in SPI mode (OLED-related information) Download the SPI debugging software (USB TO UART_I2C_SPI_JTAG Software demo), no need to install, and directly open the use.
Please set the mode switch to mode 1 or mode 2 and connect the computer after connecting the cable.
Peripheral | USB TO UART/I2C/SPI/JTAG |
RES | I2C.VCC ((Keeping the OLED in operation (required for OLED)) |
D/C | URAT0.GND (Used to indicate whether a command or data is being sent (required for OLEDs)) |
CS | SPI.CS0 |
CLK | SPI.SCK |
DIN | SPI.SDO |
GND | SPI.GND |
VCC | SPI.VCC |
Initialize SPI parameters according to the use of the environment, after selecting the parameters click on the initialization of SPI (more clicks on the initialization of SPI, to prevent initialization failure).
Enter the data to be sent in the SPI input box and select SPI Read, SPI Write or SPI Read/Write according to the desired operation.
AE D5 80 A8 3F D3 00 40 8D 14 20 00 A1 C8 DA 12 81 CF D9 F1 DB 40 A4 A6 AF 21 00 7F 22 00 07
Initialization effect as shown below: (the screen is not on).
Connect the D/C pin of the OLED to VCC (Connecting to GND for sending commands, to VCC for sending data):
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
The following is a demonstration of burning a demo into the STM32F429IGT6 development board using the product's JTAG interface.
Please note: Make sure the device is at 3V3 and not 5V (keep the same potential as the device to be burned).
External JTAG Interface | USB TO UART/I2C/SPI/JTAG |
TDI | TDI |
TDO | TDO |
TMS | TMS |
TCLK | TCK |
TRST (N/C) | TRST (N/C) |
GND | GND |
cd Desktop\USB-TO-UART-I2C-SPI-JTAG-Demo\Windows\Software\OpenOCD-CH347\bin
Note: The configuration file of the common chip is stored in "USB-TO-UART-I2C-SPI-JTAG-Demo\Windows\Software\OpenOCD-CH347\scripts\target", you can copy the file to the current folder.
openocd.exe -f ch347.cfg -f stm32f4x.cfg
telnet.exe Localhost 4444
Note: In the example file, there is a Test folder under the bin file, and there are two files under the folder that correspond to the clockwise and counterclockwise control of the light source by pressing the key under the Open429I-C (Package A).
halt
program STM32F429_439xx.hex
Or you can modify the file path of the demo as a DLL file storage path.
Note: The demo is modified based on the Raspberry Pi driver OLED demo.
Reference link: OLED related resource Reference example is the file under "../OLED_Module_Code /RaspberryPi/python". (Sample demo)
Download the file package to the Raspberry Pi and unzip the file:
wget https://files.waveshare.com/upload/2/2b/USB-TO-UART-I2C-SPI-JTAG-Demo.zip unzip USB-TO-UART-I2C-SPI-JTAG-Demo.zip -d ./USB-TO-UART-I2C-SPI-JTAG-Demo
Execute example:
Enter the driver file directory:
cd USB-TO-UART-I2C-SPI-JTAG-Demo/Raspberry/Driver/driver/
(You can skip this point if you have used the make command.) Install the execution environment:
sudo apt-get install raspberrypi-kernel-headers
Execute compilation and load the driver:
make sudo insmod ch34x_pis.ko
Use the driver demo to operate permanently:
sudo make install
pip install pyserial
ch34x_pis*"
Mode | Device number |
Mode 0 | tty* and tty* (often ttyACM*) |
Mode 1 | ch34x_pis* and tty* |
Mode 2 | hidraw* |
Mode 3 | ch34x_pis* and tty* |
uname -a
If the return value is armv61 or armv71, it means it is 32-bit ARM architecture (for Raspberry Pi). If the return value is aarch64, it means it is 64-bit ARM architecture (for Raspberry Pi). If the return value is x86_64, it is not Raspberry Pi.
Currently using the Raspberry Pi 64-bit libraries, if your query result is aarch64, then you do not need to do the following operations.
cd cd USB-TO-UART-I2C-SPI-JTAG-Demo/Raspberry/Lib/aarch64
For instance, copy the appropriate ".so" file into the I2C example folder.
sudo cp libch347.so ../../Code/I2C/
sudo cp libch347.so ../../Code/SPI/
1. Do not connect USB TO UART/I2C/SPI/JTAG first, use the commands to query the current device:
ls /dev/tty*
2. Connect the Raspberry Pi and USB TO UART/I2C/SPI/JTAG, and query "ls /dev/tty*", the new device is the device number of the product:
ls /dev/tty*
The following is a demonstration of using the product's two serial ports for self-sending and receiving, please switch the mode to mode 0 (for two tty* devices).
USB TO UART/I2C/SPI/JTAG(UART0) | USB TO UART/I2C/SPI/JTAG(UART1) |
UART0.TXD | UART1.RXD |
UART0.RXD | UART1.TXD |
1. Do not connect USB TO UART/I2C/SPI/JTAG first, and use commands to query the current device.
ls /dev/tty*
2. Connect the Raspberry Pi and USB TO UART/I2C/SPI/JTAG, query "ls /dev/tty*" again, and the new device is the device number of the product.
ls /dev/tty*
cd USB-TO-UART-I2C-SPI-JTAG-Demo/Raspberry/Code/UART/ vi UART.py
Move the cursor to position ① and change it to the recognized device number (move the cursor using 'up, down, left and right keys' -> click 'i' and then modify it -> click 'Esc' after modifying it -> input ':wq' to save and exit).
sudo python3 UART.py
If you want to use the UART to send and receive data when using I2C or SPI, switch the mode to mode 1 or mode 2 (mode 1 for ch34x_pis* and tty* devices, mode 2 for hidraw* devices).
Please switch to Mode 1 or Mode 2, and connect to the computer by connecting the cables.
Peripheral(TF-Luna) | USB TO UART/I2C/SPI/JTAG |
Pin 1 | VCC |
Pin 2 | I2C.SDA |
Pin 3 | I2C.SCL |
Pin 4 | GND |
Pin 5 | GND (Connect first and configure TF-Luna to I2C mode (required for TF-Luna)) |
Pin 6 | N/C |
Mode 1 Query 'ch34x_pis*' and 'tty*', can be queried once when the device is connected and once when the device is not connected.
ls /dev/ch34x_pis*
Mode 2 Query 'hidraw*', can be queried once when the device is connected and once when the device is not connected.
ls /dev/hidraw*
cd USB-TO-UART-I2C-SPI-JTAG-Demo/Raspberry/Code/I2C/ vi I2C.py
sudo python3 I2C.py
If you want to use I2C or SPI to transmit the data by UART, you can switch to mode 1 or mode 2.
Please set the mode switch to mode 1 or mode 2 and connect the computer after connecting the cable..
Peripheral | USB TO UART/I2C/SPI/JTAG |
RES | UART1.RTS (Used to control OLEDs for reset (required for OLEDs)) |
D/C | UART1.CTS (Used to indicate whether a command or data is being sent (required for OLEDs)) |
CS | SPI.CS0 |
CLK | SPI.SCK |
DIN | SPI.SDO |
GND | SPI.GND |
VCC | SPI.VCC |
Mode 1 Query 'ch34x_pis*' and 'tty*' once for both connected and unconnected devices.
ls /dev/ch34x_pis*
Mode 2 Query 'hidraw*' once for both connected and unconnected devices.
ls /dev/hidraw*
cd USB-TO-UART-I2C-SPI-JTAG-Demo/Raspberry/Code/SPI/ vi CH347T_Config.py
Move the cursor to position ① and change it to the recognized device number (move the cursor using 'up, down, left and right keys' -> click 'i' and then modify it -> click 'Esc' after modifying it -> input ':wq' to save and exit).
sudo python3 example.py
The effects as shown below: