CH340 – What is it? Technical data, diagram

Reading time: 4 min.

CH340 is a converter that allows devices to communicate via USB port to convert to serial protocol in operation as CH340 serial protocol providing common modem signal.

Key features of the CH340 converter

FTDI CH340C 3.3/5V USB Type C USB-UART Converter.

The CH340 converter provides full support for USB devices, conforming to the USB 2.0 specification, and requires only an external quartz resonator and sub-coupling capacitors to operate. The device emulates a standard serial interface, allowing communication with devices having an older communication interface. In addition, it allows you to add communication via a USB port. The converter is fully compatible with the Windows operating system. Data transmission is performed in full duplex, automatically setting the transmitter buffer. It supports data transmission speeds from 50 BPS to 2 Mbps. Supports popular modem signals such as RTS, DTR, DCD, DSR and CTS. The addition of a logic level converter enables it to work with devices with RS232, RS485, RS422 and other serial interfaces. The converter supports the IRDA and SIR communication standard, with data rates from 2,400 to 115,200 BPS.

Software compatibility includes CH341, with the possibility of using drivers for CH341. Power supply from a 5V or 3.3V voltage source is possible. The IC is housed in an SSOP-20 enclosure.

CH340 chip pinout description

The CH340 chip has the following leads:

  1. NC – not connected
  2. ACT# (OUT) – Negative clock phase output (CH340T: output state after USB configuration; active in low state)
  3. TXD (OUT) – Serial data output (reverse phase output CH340R).
  4. RXD (IN) – Serial data input, set controlled pull-up and pull-down resistor
  5. V3 (POWER) – VCC connections to external 3.3V power supply; connection of 10nF decoupling capacitor for 5V power supply
  6. UD+ (USB signal) – Direct connection to D+ data line of USB bus, sets internal pull-up resistor
  7. UD- (USB signal) – Direct connection to the D- data line of the USB bus
  8. GND (POWER) – Common ground, ground connection for USB
  9. XI (IN) – Quartz oscillator input, connection of quartz and quartz oscillator capacitor outside
  10. XO (OUT) – Quartz oscillator output, connection of quartz and quartz oscillator capacitor outside
  11. CTS# (IN) – Modem communication input signal, clearing sending, active in low state
  12. DSR# (IN) – Modem communication input signal, equipment readiness, active in low state
  13. RI# (IN) – Modem communication input signal, ringing signal oscillation, active in low (high) state.
  14. DCD# (OUT) – Modem communications input signal, carrier wave detection, active in low (high) state
  15. DTR# (OUT) – Modem connectivity output signal, data endpoint is ready, active in low (high) state
  16. RTS# (OUT) – Modem communication output signal, send request, active in low (high) state
  17. IR# (IN) – CH340R: serial interface mode setting input, set internal pull-up resistor, low level is infrared serial interface SIR, high level is standard serial interface CKO
  18. R232 (IN) – RS232 switch, active at high level, set internal pull-up resistor
  19. VCC (POWER) – Positive power input, requires an external 100nF coupling capacitor
  20. NOS# (IN) – Prohibits USB device from pausing, active in low state, set internal pull-up resistor

Functional description

The CH340 has built-in pull-up resistors at the USB connector. The UD+ and UD- pins must be connected directly to the USB bus. The CH340 also has a built-in reset circuit that activates whenever the power supply voltage is turned on. In normal operation, the CH340 requires a 12 MHz clock signal to be supplied to pin X1. In general, the clock signal is generated by the inverter, specifically by a quartz resonator. The connection of the 12 MHz quartz resonator between X1 and X0 requires additional capacitors to prevent excitation.

CH340 circuit power supply

The CH340 requires a 5V or 3.3V power supply. Using a 5V power supply, the V3 pin must be connected to ground through a 4.7 microfarad or 10 microfarad coupling capacitor. On the other hand, when using a 3.3V power supply, the V3 pin must be connected to the VCC pin and connected to a 3.3V power source.

CH340 automatically supports stopping data transmission in idle mode by switching to power saving mode. The NOS# pin can prevent an external USB device from suspending data transmission in asynchronous serial interface mode. The CH340 uses three data transmission pins: a signal pin and an assist pin. The data transmission pins include TXD and RXD of the UART interface. In the idle state of the serial interface, the RXD pin must be set to high.

If RS232 is in the high state, use the RS232 auxiliary function, and then INRXT will automatically start the inverter inside. The low state will be the default setting if the interface output is free. The XD pins on the CH340 will be in the high state, and the TXD pin will be in the low state. Modem signals include CTS#, DSR#, RI#, DCD#, and RTS#. All of these signals are controlled by a computer application in which we define the functions of each pin. Auxiliary pins include IR#, R232#, CKOH, CKL, and ACT#. When IR# is in the low state, it activates the serial interface for the infrared LED. R232# is used to control the auxiliary functions of the RS232 interface. When R232# is in the high state, the RXD pin automatically sets the internal inverter and output clock signal phase from CKOH to CKL. ACTH is the USB device responsible for configuring the final state of the output, for example, to check the readiness of the USB infrared diode adapter for data transmission. In this mode, R232# and IR# are detected once when power is resumed.

How useful was this post?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate this post.

Share:

Picture of Mateusz Mróz

Mateusz Mróz

Dreamer, fan of travels and technology news. He is eager to turn his ideas for Raspberry Pi and Arduino into reality. Stubborn autodidact - he asks for help only when the internet browser doesn’t have answers he is looking for. He thinks that everyone can achieve their goals with the right attitude.

See more:

Leave a Reply

Your email address will not be published. Required fields are marked *

For security, use of Google's reCAPTCHA service is required which is subject to the Google Privacy Policy and Terms of Use.