USB To Serial
The best buddy of your on-board computer.
Last updated
The best buddy of your on-board computer.
Last updated
USB to Serial chips serve as critical components in modern electronics, streamlining data communication between devices.These chips act as USB bus conversion tools, enabling a smooth transition from USB to UART or USB to printer interfaces. In UART mode, these chips extend common MODEM liaison signals, enabling the extension of a computer's UART interface or the direct integration of standard serial devices onto the USB bus. With a compact form factor and a wide range of applications, USB-to-Serial chips play an important role in improving the connectivity of electronic systems.
Not all microcontrollers can be programmed directly over USB. Some require an additional interface: a USB-to-serial chip. This is the case for the STM32WL on the microcontroller.
The CH340E chip is the one recommended by RAKwireless in their datasheet. So, without further ado, I used this solution in the project. Its package is relatively compact (3x3mm) and integrates well into the board.
Protocol
USB 2.0
Pull-up Resistor
Built-in
Crystal
Built-in
UART Speed
From 50bps To 2Mbps
Operating Current
~ 7mA
Sleep Current
~ 0.09mA (@ Vcc = 3.3V)
The CH340E is the smallest USB-to-serial module I've found on the market. It is not available in any other package than MSOP-10 (3x3mm).
The available pins are listed in the table below:
1
UD+
Directly connect to D+ data wire of USB bus
2
UD-
Directly connect to D+ data wire of USB bus
3
GND
Connect to GND
4
RTS#
MODEM liaison output signal.
Active low state.
5
CTS#
MODEM liaison input signal.
Active in low state.
6
TNOW
Ongoing data transmission status indicator.
Active in high state.
7 & 10
VCC
Power Supply
8
TXD
Transmit asynchronous data output
9
RXD
Receive asynchronous data input
The CH340E chip is wired according to the datasheet. Two decoupling capacitors are connected to power supplies #7 and #10.
The TXD pin sends data to the microcontroller, which receives it on its RX pin. And vice versa, the microcontroller sends information to the CH340E, which receives it on its RXD pin. This explains the RX/TX inversion between the CH340E and the microcontroller.