# USB to Serial Port chip CH340

Datasheet

Version: 3D

https://wch-ic.com

## 1. Overview

CH340 is a USB bus adapter chip, can realize USB to serial port or USB to print port.

In serial port mode, CH340 provides commonly used MODEM contact signals, which are used to expand asynchronous serial ports for computers, or directly upgrade ordinary serial port devices to the USB bus. For instructions on USB to print port, please refer to manual (2) CH340DS2.

![](https://www.embedr.app/api/datasheets/ds_0d6c5a7a41a7180d0648/asset?path=images%2Fe29a385472d1ae0052c3947b949232c6a2de8415a42bc8a55bf7a560d3ac239b.jpg)

## 2. Features

 Full-speed USB device interface, compatible with USB V2.0.

Simulation of standard serial ports, used to upgrade original serial port peripherals, or add additional seria ports through USB.

 The serial port application program under the Windows operating system on the computer side is fully compatible, no need to be modified.

 Hardware full-duplex serial port, built-in transceiver buffer, supports communication baud rate of 50bps\~2Mbps.

 Support commonly used MODEM contact signals RTS, DTR, DCD, RI, DSR, CTS

 Provide RS232, RS485, RS422 interfaces by adding level conversion devices.

CH340R supports IrDA specification SIR infrared communication, and baud rate from 2400bps to 115200bps.

 Built-in firmware, and software compatible with CH341, you can use the VCP driver of CH341 directly.

 Support 5V and 3.3V supply voltage.

CH340C/N/K/E/X/B has a built-in clock, requires no external crystal. CH340B also has a built-in EEPROM for configuring the serial number.

 SOP-16, SOP-8 and SSOP-20, ESSOP-10, MSOP-10 lead-free packages are available, RoHS compatible.

## 3. Package

![](https://www.embedr.app/api/datasheets/ds_0d6c5a7a41a7180d0648/asset?path=images%2Fc7764c57cc6ae282ee3657bf9dd17c3fad96debab7f54aeecfb60e57370c8d89.jpg)

<table><tr><td>Package</td><td colspan="2">Shaping Width</td><td colspan="2">Pin Spacing</td><td>Package Description</td><td>Order Model</td></tr><tr><td>SOP-16</td><td>3.9mm</td><td>150mil</td><td>1.27mm</td><td>50mil</td><td>Small Out-Line Package</td><td>CH340G</td></tr><tr><td>SOP-16</td><td>3.9mm</td><td>150mil</td><td>1.27mm</td><td>50mil</td><td>Small Out-Line Package</td><td>CH340C</td></tr><tr><td>SOP-16</td><td>3.9mm</td><td>150mil</td><td>1.27mm</td><td>50mil</td><td>Small Out-Line Package</td><td>CH340B</td></tr><tr><td>SOP-8</td><td>3.9mm</td><td>150mil</td><td>1.27mm</td><td>50mil</td><td>Small Out-Line Package</td><td>CH340N</td></tr><tr><td>ESSOP-10</td><td>3.9mm</td><td>150mil</td><td>1.00mm</td><td>39mil</td><td>Exposed Shrink Small Outline Package</td><td>CH340K</td></tr><tr><td>MSOP-10</td><td>3.0mm</td><td>118mil</td><td>0.50mm</td><td>19.7mil</td><td>Miniature Small Outline Package</td><td>CH340E</td></tr><tr><td>MSOP-10</td><td>3.0mm</td><td>118mil</td><td>0.50mm</td><td>19.7mil</td><td>Miniature Small Outline Package</td><td>CH340X</td></tr><tr><td>SSOP-20</td><td>5.3mm</td><td>209mil</td><td>0.65mm</td><td>25mil</td><td>Shrink Small Outline Package</td><td>CH340T</td></tr><tr><td>SSOP-20</td><td>5.3mm</td><td>209mil</td><td>0.65mm</td><td>25mil</td><td>Shrink Small Outline Package</td><td>CH340R</td></tr></table>

Note: CH340C, CH340N, CH340K, CH340E, CH340X and CH340B have a built-in clock and do not require an external crystal.  
CH340B has a built-in EEPROM for configuration of the serial number, as well as some of the functions can be customized, etc. The CH343P is recommended for smaller sizes.

CH340K has three built-in diodes to prevent the MCU from backing up current to the CH340 through the I/O pins when it is powered independently.

CH340K's backplane is pin 0#GND, an optional connection; pin 3#GND is a required connection.

CH340X is improved based on the CH340E by adding the IO tolerant 5V feature for 3.3V supply.

CH340X pin 6# can be switched from TNOW to DTR# if an external resistor is added; see Section 5.3 for details of the two configurations.

CH340C can be switched from TNOW to DTR# by adding a 4.7KΩ pull-down resistor to pin 8# if the lot number starts with 4 and the last 3 bits are greater than B40.

CH340R provides reverse polarity TXD and MODEM signals and has been discontinued.

CH340's USB transceiver is designed to be fully internalized according to USB2.0, and it is recommended that the UD+ and UD- pins are not connected with additional resistors.

4. Pin

<table><tr><td>SSOP20 Pin No.</td><td>SOP16 Pin No.</td><td>ESSOP10 Pin No.</td><td>SOP8 Pin No.</td><td>Pin name</td><td>Type</td><td>Pin description (The description in brackets is only for the CH340R model)</td></tr><tr><td>19</td><td>16</td><td>7</td><td>5</td><td>VCC</td><td>Power</td><td>Positive power input terminal, requires an external 0.1uF power decoupling capacitor.</td></tr><tr><td>8</td><td>1</td><td>3、0</td><td>3</td><td>GND</td><td>Power</td><td>Common ground, directly connected to the ground of the USB bus</td></tr><tr><td>5</td><td>4</td><td>10</td><td>8</td><td>V3</td><td>Power</td><td>When the power supply voltage is 3.3V, connect VCC to input the external power supply. When the power supply voltage is 5V, connect an external decoupling capacitor with a capacity of 0.1uF.</td></tr><tr><td rowspan="3">9</td><td rowspan="3">7</td><td rowspan="3">None</td><td rowspan="3">None</td><td>XI</td><td>Input</td><td>CH340T/R/G: The input terminal of crystal oscillation requires an external 12MHz crystal and oscillation capacitor.</td></tr><tr><td>NC.</td><td>Empty pin</td><td>CH340C: Empty pin, must be suspended</td></tr><tr><td>RST#</td><td>Input</td><td>CH340B: External reset input, active low, built-in pull-up resistor</td></tr><tr><td rowspan="3">10</td><td rowspan="3">8</td><td rowspan="3">None</td><td rowspan="3">None</td><td>XO</td><td>Output</td><td>CH340T/R/G: The output terminal of crystal oscillation needs to be connected to an external 12MHz crystal and oscillation capacitor.</td></tr><tr><td>OUT#</td><td>Output</td><td>CH340C: MODEM general output signal, software defined, active low. Some lot of CH340C can optionally be switched to the second DTR#</td></tr><tr><td>NC.</td><td>Empty pin</td><td>CH340B: Empty pin, must be suspended</td></tr><tr><td>6</td><td>5</td><td>1</td><td>1</td><td>UD+</td><td>USB signal</td><td>Connect directly to the D+ data line of the USB bus without a series resistor</td></tr><tr><td>7</td><td>6</td><td>2</td><td>2</td><td>UD-</td><td>USB signal</td><td>Connect directly to the D- data line of the USB bus without a series resistor</td></tr><tr><td>20</td><td>None</td><td>None</td><td>None</td><td>NOS#</td><td>Input</td><td>Disable USB device suspension, active low, built-in pull-up resistor</td></tr><tr><td>3</td><td>2</td><td>8</td><td>6</td><td>TXD</td><td>Output</td><td>Serial data output (CH340R model is inverted output)</td></tr><tr><td>4</td><td>3</td><td>9</td><td>7</td><td>RXD</td><td>Input</td><td>Serial data input with built-in controllable pull-up and pull-down resistors</td></tr><tr><td>11</td><td>9</td><td>5</td><td>None</td><td>CTS#</td><td>Input</td><td>MODEM contact input signal, clear to send, active low (high)</td></tr><tr><td>12</td><td>10</td><td>None</td><td>None</td><td>DSR#</td><td>Input</td><td>MODEM contact input signal, data device ready, active low (high)</td></tr><tr><td>13</td><td>11</td><td>None</td><td>None</td><td>RI#</td><td>Input</td><td>MODEM contact input signal, ringing indication, active low (high)</td></tr><tr><td>14</td><td>12</td><td>None</td><td>None</td><td>DCD#</td><td>Input</td><td>MODEM contact input signal, carrier detection, active low (high)</td></tr><tr><td>15</td><td>13</td><td>4</td><td>None</td><td>DTR#</td><td>Output</td><td>MODEM contact output signal, data terminal ready, active low (high)</td></tr><tr><td>16</td><td>14</td><td>6</td><td>4</td><td>RTS#</td><td>Output</td><td>MODEM contact output signal, request to send, active low (high)</td></tr><tr><td>2</td><td>None</td><td>None</td><td>None</td><td>ACT#</td><td>Output</td><td>USB configuration completion status output, active low</td></tr><tr><td>18</td><td>15</td><td>None</td><td>None</td><td>R232</td><td>Input</td><td>CH340T/R/G/C: Auxiliary RS232 enable, active high level, built-in pull-down</td></tr><tr><td rowspan="2">17</td><td rowspan="2">15</td><td rowspan="2">None</td><td rowspan="2">None</td><td>TNOW</td><td>Output</td><td>CH340T/E/X/B: The serial port sends ongoing status indication, high level is active. CH340X external resistor can be switched to DTR#</td></tr><tr><td>IR#</td><td>Input</td><td>CH340R: Serial port mode setting input, built-in pull-up resistor, low level is SIR infrared serial port, high level is ordinary serial port</td></tr><tr><td rowspan="2">1</td><td rowspan="2">None</td><td rowspan="2">None</td><td rowspan="2">None</td><td>CKO</td><td>Output</td><td>CH340T: clock output</td></tr><tr><td>NC.</td><td>Empty pin</td><td>CH340R: Empty pin, must be suspended</td></tr></table>

Note: The unused I/O pins of CH340 can be dangled. The application diagram is an example of CH340T, etc., and also applies to CH340G/C/N/K/E/X/B, etc.

## 5. Function Description

## 5.1 Clock, Reset, Power, Connection

When the CH340G/CH340T/CH340R chip works normally, it requires an external 12MHz clock signal to be provided to the XI pin. Under normal circumstances, the clock signal is generated by the built-in inverter of CH340 through stable frequency oscillation of the crystal. The peripheral circuit only needs to connect a 12MHz crystal between the XI and XO pins, and connect the oscillation capacitors from the XI and XO pins to ground respectively. CH340C/N/K/E/X/B chips have built-in clock generators, no need for external crystals and capacitors.

The CH340 chip has a built-in power-on reset circuit. The CH340B chip also provides an active low-level externa reset input pin.

The CH340 chip supports 5V power supply voltage or 3.3V power supply voltage. When using a 5V operating voltage, the VCC pin of the CH340 chip inputs an external 5V power supply, and the V3 pin should be connected to an external power supply decoupling capacitor with a capacity of 0.1uF. When using a 3.3V working voltage, the V3 pin of the CH340 chip should be connected to the VCC pin, and an external 3.3V power supply should be input at the same time, and the working voltage of other circuits connected to the CH340 chip should not exceed 3.3V.

The IO of CH340X and CH340C/N starting with lot number 4 support 5V withstand voltage to prevent inward current flow.

CH340K not only prevents inward current backflow, but also reduces the external drive capability, which can reduce the outward current backflow of CH340.

The CH340 chip automatically supports USB device suspension to save power consumption. When the NOS# pin is low level, USB device suspension will be prohibited.

The DTR# pin of the CH340G/C/T/K chip is used as a configuration input pin before the USB configuration is completed. It can be connected to an external 4.7KΩ pull-down resistor to generate a default low level during USB enumeration and send it to the USB bus through the configuration descriptor. Apply for larger supply current.

The CH340 chip has a built-in USB pull-up resistor, and the UD+ and UD- pins should be directly connected to the USB bus.

The pins of the CH340 chip in asynchronous serial port mode include: data transmission pins, MODEM contact signal pins, and auxiliary pins.

Data transmission pins include: TXD pin and RXD pin. When the serial port input is idle, RXD should be high level. For the CH340G/C/T/R chip, if the R232 pin is high level to enable the auxiliary RS232 function, then an inverter is automatically inserted inside the RXD pin, which defaults to low level. When the serial port output is idle, the TXD of the CH340G/C/N/E/X/B/T chip is high level, the TXD of the CH340K chip is a weak high level, and the TXD of the CH340R chip is low level.

MODEM contact signal pins include: CTS# pin, DSR# pin, RI# pin, DCD# pin, DTR# pin, RTS# pin, CH340C also provides OUT# pin. All these MODEM contact signals are controlled and defined by computer applications. Auxiliary pins include: IR# pin, R232 pin, CKO pin, ACT# pin, TNOW pin. A low level on the IR# pin will enable the infrared serial port mode. The R232 pin is used to control the auxiliary RS232 function. When R232 is high level, the RXD pin input is automatically inverted. The ACT# pin is the USB device configuration completion status output (such as USB infrared adapter ready). The TNOW pin indicates that the CH340 is sending data from the serial port with a high level, and becomes low level after the transmission is completed. In half-duplex serial port modes such as RS485, TNOW can be used to indicate the serial port transceiver switching status. The IR# and R232 pins are only checked once after power-on reset.

## 5.2 CH340B Configuration Information

The CH340B chip also provides an EEPROM configuration data area. Product serial number and other information can be set for each chip through special computer tool software. The configuration data area is shown in the table below.

<table><tr><td>Byte address</td><td>Abbreviation</td><td>Description of the configuration data area</td><td>Default value</td></tr><tr><td>00H</td><td>SIG</td><td>For CH340B: The internal configuration information valid flag must be 5BH.For CH340H/S: The external configuration chip valid flag must be 53H. Other values are invalid.</td><td>00H</td></tr><tr><td>01H</td><td>MODE</td><td>Serial port mode, must be 23H</td><td>23H</td></tr><tr><td>02H</td><td>CFG</td><td>Specific configuration, bit 5 is used to configure the product serial number string: 0=valid; 1=invalid</td><td>FEH</td></tr><tr><td>03H</td><td>WP</td><td>Internal configuration information write protection flag, if it is 57H, it is read-only, otherwise it can be rewritten.</td><td>00H</td></tr><tr><td>05H~04H</td><td>VID</td><td>Vendor ID, vendor identifier, high byte follows, any value. Set to 0000H or 0FFFFH to use vendor defaults for VID and PID.</td><td>1A86H</td></tr><tr><td>07H~06H</td><td>PID</td><td>Product ID, product identification code, high byte last, any value</td><td>7523H</td></tr><tr><td>0AH</td><td>PWR</td><td>Max Power, maximum supply current in 2mA increments</td><td>31H</td></tr><tr><td>17H~10H</td><td>SN</td><td>Serial Number, product serial number ASCII string, length 8.Serial number is disabled if the first byte is not an ASCII character (21H to 7FH).</td><td>12345678</td></tr><tr><td>3FH~1AH</td><td>PROD</td><td>For CH340B: Product String, product description Unicode string. The first byte is the total number of bytes (not exceeding 26H), the second byte is 03H, and the following is a Unicode string. If it does not meet the above characteristics, the manufacturer&#x27;s default instructions will be used.</td><td>The first byte 00H uses the default product description</td></tr><tr><td>Other addresses</td><td></td><td>(Reserved unit)</td><td>00H or FFH</td></tr></table>

## 5.3 DTR and Multi-Mode MCUs Download

For CH340X, pin 6# defaults to TNOW, which has a weak pull-up during power-on or reset. During normal operation, the TNOW output is used for half-duplex transceiver switching. By adding an external resistor to the 6# pin, TNOW can be switched to DTR#. The two options are as follows:

① If the 6# pin is connected to an external 4.7KΩ pull-down resistor to GND, it will enter the open source DTR enhancement mode, and the 6# pin will automatically switch to the open source driven DTR# for connecting to the BOOT mode pin of the MCU. The default DTR# is It is not output and is kept low by an external resistor, but the DTR# pin can be set by the application program to output a high level or not. It is used for multi-mode MCU downloads where DTR# defaults to a low level.

② If a 4.7KΩ resistor is connected between the 6# pin and the 5# pin, it will enter the push-pull DTR enhancement mode, and the 6# pin will automatically switch to the push-pull driven DTR# for connecting to the control pin of the MCU. The DTR# pin can be set to output high level or low level by the application program, which is used for multi-mode MCU download with DTR# default high level.

For CH340C whose lot number starts with 4 and whose last three digits are greater than B40, pin 8# defaults to OUT#, has a weak pull-up during power-on or reset, and is the OUT# output of MODEM during normal operation. If an external 4.7KΩ pull-down resistor is connected to the 8# pin, it will enter the open source DTR enhancement mode. The 8# pin will automatically switch to the second DTR# of the open-source driver for connecting to the BOOT mode of the MCU. The default second DTR# is not output, is kept low by an external resistor, but this DTR# pin can be set by the application to output high level or not, for multi-mode MCU downloads where DTR# defaults to low level. In addition, the original DTR# of pin 13# is used for multi-mode MCU download with DTR# default high level.

## 5.4 Serial Port Characteristics

CH340 has a built-in independent transceiver buffer and supports simplex, half-duplex or full-duplex asynchronous serial communication. Serial data includes 1 low-level start bit, 5, 6, 7 or 8 data bits, 1 or 2 high-level stop bits, and supports odd/even/flag/blank check test. CH340 supports common communication baud rates: 50, 75, 100, 110, 134.5, 150, 300, 600, 900, 1200, 1800, 2400, 3600, 4800, 9600, 14400, 19200, 28800, 33600, 38400, 56000, 57600, 76800, 115200, 128000, 153600, 230400, 460800, 921600, 1500000, 2000000.

For applications with one-way 1Mbps and above, or two-way 500Kbps and above, it is recommended to use CH343 to enable hardware automatic flow control.

The allowable baud rate error of the CH340 serial port receive signal is about 2%, the baud rate error of the CH340G/CH340T/CH340R serial port transmit signal is less than 0.3%, and the baud rate error of the CH340C/340N/340K/340E/340X/340B serial port transmit signal is less than 1.8%.

Under the Windows operating system on the computer side, the CH340 driver can emulate the standard serial port, so most of the original serial port applications are fully compatible and usually do not require any modification.

CH340 can be used to upgrade original serial port peripherals, or add additional serial ports to the computer through the USB bus. By adding an external level conversion device, RS232, RS485, RS422 and other interfaces can be further provided.

CH340R only needs to add an infrared transceiver, and can add a SIR infrared adapter to the computer through the USB bus to achieve infrared communication between the computer and external devices that comply with the IrDA specification.

## 6. Parameters

6.1 Absolute Maximum Value (Critical or exceeding the absolute maximum value will probably cause the chip to work improperly or even be damaged)

<table><tr><td>Name</td><td colspan="2">Parameter Description</td><td>Min.</td><td>Max.</td><td>Unit</td></tr><tr><td rowspan="2">TA</td><td rowspan="2">Ambient temperature during operation</td><td>CH340G/T/R</td><td>-40</td><td>85</td><td>°C</td></tr><tr><td>CH340C/N/K/E/X/B</td><td>-20</td><td>70</td><td>°C</td></tr><tr><td>TS</td><td colspan="2">Ambient temperature during storage</td><td>-55</td><td>125</td><td>°C</td></tr><tr><td>VCC</td><td colspan="2">Power supply voltage (VCC is connected to the power supply, GND is connected to the ground)</td><td>-0.5</td><td>6.0</td><td>V</td></tr><tr><td>VIO</td><td colspan="2">The voltage on the input or output pin</td><td>-0.5</td><td>VCC+0.5</td><td>V</td></tr></table>

6.2 5V Electrical Parameters (Test conditions: $\mathrm { T A } { = } 2 5 ^ { \circ } \mathrm { C } ,$ , VCC=5V, does not include pins to connect to USB bus)

<table><tr><td>Name</td><td colspan="3">Parameter Description</td><td>Min.</td><td>Typ.</td><td>Max.</td><td>Unit</td></tr><tr><td>VCC</td><td>Power voltage</td><td colspan="2">The V3 pin is only connected to an external capacitor and is not connected to VCC.</td><td>4.0</td><td>5</td><td>5.3</td><td>V</td></tr><tr><td rowspan="2">ICC</td><td rowspan="2" colspan="2">Total power supply current during operation</td><td>CH340G/C/N/K/E/X/T/R</td><td></td><td>7</td><td>20</td><td>mA</td></tr><tr><td>CH340B</td><td></td><td>6</td><td>15</td><td>mA</td></tr><tr><td rowspan="2">ISLP</td><td rowspan="2" colspan="2">Total supply current in USB suspended</td><td>CH340G/K/T/R/B</td><td></td><td>0.09</td><td>0.2</td><td>mA</td></tr><tr><td>CH340C/N/E/X</td><td></td><td>0.05</td><td>0.15</td><td>mA</td></tr><tr><td>VIL</td><td colspan="3">low level input voltage</td><td>0</td><td></td><td>0.9</td><td>V</td></tr><tr><td>VIH</td><td colspan="3">High level input voltage</td><td>2.3</td><td></td><td>VCC</td><td>V</td></tr><tr><td>VOL</td><td colspan="3">Low level output voltage (6mA sink current)</td><td></td><td></td><td>0.5</td><td>V</td></tr><tr><td>VOH</td><td colspan="3">High-level output voltage (2mA output current)(Only 100uA output current during chip reset)</td><td>VCC-0.6</td><td></td><td></td><td>V</td></tr><tr><td>IUP</td><td colspan="3">Input current of input terminal with built-in pull-up resistor</td><td>3</td><td>150</td><td>300</td><td>uA</td></tr><tr><td>IDN</td><td colspan="3">Input current of the input terminal with built-in pull-down resistor</td><td>-40</td><td>-100</td><td>-300</td><td>uA</td></tr><tr><td>VR</td><td colspan="3">Voltage threshold for power-on reset</td><td>2.4</td><td>2.6</td><td>2.8</td><td>V</td></tr></table>

6.3 3.3V Electrical Parameters (Test conditions: $\mathrm { T A } { = } 2 5 ^ { \circ } \mathrm { C }$ , VCC=V3=3.3V, does not include pins to connect to USB bus)

<table><tr><td>Name</td><td>Parameter Description</td><td>Min.</td><td>Typ.</td><td>Max.</td><td>Unit</td></tr></table>

<table><tr><td rowspan="2">VCC</td><td rowspan="2">Power voltage</td><td rowspan="2" colspan="2">V3 pin connected to VCC pin</td><td>CH340G/T/R</td><td>2.9</td><td>3.3</td><td>3.6</td><td rowspan="2">V</td></tr><tr><td>CH340C/N/K/E/X/B</td><td>3.1</td><td>3.3</td><td>3.6</td></tr><tr><td rowspan="2">ICC</td><td rowspan="2" colspan="2">Total power supply current during operation</td><td colspan="2">CH340G/C/N/K/E/X/T/R</td><td></td><td>4</td><td>12</td><td>mA</td></tr><tr><td colspan="2">CH340B</td><td></td><td>3</td><td>9</td><td>mA</td></tr><tr><td rowspan="2">ISLP</td><td rowspan="2" colspan="2">Total supply current in USB suspended</td><td colspan="2">CH340G/K/T/R/B</td><td></td><td>0.08</td><td>0.2</td><td>mA</td></tr><tr><td colspan="2">CH340C/N/E/X</td><td></td><td>0.04</td><td>0.15</td><td>mA</td></tr><tr><td>VIL</td><td colspan="4">low level input voltage</td><td>0</td><td></td><td>0.8</td><td>V</td></tr><tr><td>VIH</td><td colspan="4">High level input voltage</td><td>1.9</td><td></td><td>VCC</td><td>V</td></tr><tr><td>VOL</td><td colspan="4">Low level output voltage (4mA sink current)</td><td></td><td></td><td>0.5</td><td>V</td></tr><tr><td>VOH</td><td colspan="4">High-level output voltage (2mA output current)(Only 40uA output current during chip reset)</td><td>VCC-0.6</td><td></td><td></td><td>V</td></tr><tr><td>IUP</td><td colspan="4">Input current of input terminal with built-in pull-up resistor</td><td>3</td><td>70</td><td>200</td><td>uA</td></tr><tr><td>IDN</td><td colspan="4">Input current of the input terminal with built-in pull-down resistor</td><td>-30</td><td>-70</td><td>-200</td><td>uA</td></tr><tr><td>VR</td><td colspan="4">Voltage threshold for power-on reset</td><td>2.4</td><td>2.6</td><td>2.8</td><td>V</td></tr></table>

## 6.4 Timing Parameters (Test conditions: TA=25℃, VCC=5V or 3.3V)

<table><tr><td>Name</td><td colspan="2">Parameter Description</td><td>Min.</td><td>Typ.</td><td>Max.</td><td>Unit</td></tr><tr><td rowspan="2">FD</td><td rowspan="2">CH340C/N/K/E/X/Binternal clock error(Year-on-yearinfluence baud rate)</td><td>TA=-5°C~55°C</td><td>-1.2</td><td>±0.8</td><td>+1.2</td><td>%</td></tr><tr><td>TA=-25°C~75°C</td><td>-1.8</td><td>±1.0</td><td>+1.8</td><td>%</td></tr><tr><td>FCLK</td><td colspan="2">The frequency of the input clock signal tothe XI pin</td><td>11.98</td><td>12.00</td><td>12.02</td><td>MHz</td></tr><tr><td>TPR</td><td colspan="2">Power-on reset time</td><td>20</td><td>35</td><td>50</td><td>mS</td></tr></table>

## 7. Applications

## 7.1 USB to 9-wire Serial Port (Figure Below)

The figure below shows the USB to RS232 serial port implemented by CH340T (or CH340C/B). CH340 provides commonly used serial port signals and MODEM signals. It converts the TTL serial port into an RS232 serial port through the level conversion circuit U8. Port P11 is a DB9 pin. Its pins and functions are the same as the ordinary 9-pin serial port of the computer. Similar models of U8 There are MAX213/ADM213/SP213/MAX211, etc.

If you only need to implement USB to TTL serial port, you can remove U8 and capacitor C46/C47/C48/C49/C40 in the figure. The signal lines in the figure can only be connected to RXD, TXD and the public ground wire. Other signal lines can be selected as needed and can be left floating when not needed.

P2 is the USB port. The USB bus includes a pair of 5V power lines and a pair of data signal lines. Usually, the +5V power line is red, the ground line is black, the D+ signal line is green, and the D- signal line is white. The maximum power supply current provided by the USB bus can reach 500mA. Generally, the CH340 chip and low-power USB products can directly use the 5V power supply provided by the USB bus. If the USB product provides a standing power supply through other power supply methods, the CH340 should also use the standing power supply to avoid I/O current backflow with the USB power supply. If you need to use the power of the USB bus at the same time, you can connect the 5V power line of the USB bus and the 5V standing power supply of the USB product through a resistor with a resistance of about 1Ω, and the ground wires of the two are directly connected.

The capacitor C8 of the V3 pin has a capacity of 0.1μF and is used for decoupling the internal 3.3V power node of the CH340. The capacity of C9 is 0.1μF and is used for decoupling the external power supply.

For the CH340G/T/R chip, crystal X2, capacitors C6 and C7 are used in the clock oscillation circuit. X2 is a quartz crystal with a frequency of 12MHz, and C6 and C7 are monolithic or high-frequency ceramic capacitors with a capacity of 33pF. If X2 uses a low-cost ceramic crystal, the capacities of C6 and C7 must use the crysta manufacturer's recommended values, which are generally 47pF.For crystals that have difficulty starting vibration, it is recommended that the C6 capacity be halved.

For CH340C/N/K/E/X/B chips, crystal X2 and capacitors C6 and C7 are not needed.

When designing the PCB, you need to pay attention to: decoupling capacitors C8 and C9 should be as close as possible to the connected pins of CH340; keep the D+ and D- signal lines close to parallel wiring, and try to provide ground wires or copper on both sides to reduce external interference signal interference; try to shorten the length of the signal lines related to the XI and XO pins. In order to reduce high-frequency interference, you can surround the relevant components with ground wires or cover them with copper.

![](https://www.embedr.app/api/datasheets/ds_0d6c5a7a41a7180d0648/asset?path=images%2F4f57c90c785f9c68b0423d3ac924a13b2a07e72b27183f5732e20d7b6a711205.jpg)

![](https://www.embedr.app/api/datasheets/ds_0d6c5a7a41a7180d0648/asset?path=images%2F419ca12f6008431df75190b37e42c1c64920916b660be3f9d95017f8a6d69e34.jpg)

## 7.2 USB to RS232 Serial Port (Figure Below)

The figure is the USB to the most basic and most commonly used 3-wire RS232 serial port, U5 for MAX232/ICL232/SP232 and so on.

CH340 did not use to the signal line can be suspended. For CH340C/N/K/E/X/B chips, X4 and C21 and C22 are not required.

![](https://www.embedr.app/api/datasheets/ds_0d6c5a7a41a7180d0648/asset?path=images%2Fe21eaf088fbafec1e6b5b544dffb17ade1bbce3a0b61de12c0d6110e89699859.jpg)

## 7.3 USB to RS232 Serial Port, Simplified Version (Figure Below)

The figure also shows a USB-to-3-wire RS232 serial port. The function of this circuit is the same as that in Section 7.2, except that the level amplitude of the output RS232 signal is slightly lower. The R232 pin of CH340 is high level and the auxiliary RS232 function is enabled. Just add a diode, transistor, resistor and capacitor to replace the dedicated level conversion circuit U5 in Section 7.2. Therefore, the hardware cost is lower.

![](https://www.embedr.app/api/datasheets/ds_0d6c5a7a41a7180d0648/asset?path=images%2F0df58d991093277a28ccdad10e71449b7917b7b75109bc3a15cc8f8ff424da9b.jpg)

## 7.4 USB to RS485 Serial Port

The TNOW pin can be used to control the DE (Active high transmit enable) and RE# (Active low receive enable) pins of the RS485 transceiver.

## 7.5 USB Infrared Adapter (Figure Below)

![](https://www.embedr.app/api/datasheets/ds_0d6c5a7a41a7180d0648/asset?path=images%2F9a5c9c122981ace2207837429fa3d275684052cc5779112b8c7ce9bc92bbeee0.jpg)

The figure above is a USB infrared adapter composed of USB to IrDA infrared chip CH340R and infrared transceiver U14 (ZHX1810/HSDL3000 and other similar models). Resistor R13 is used to weaken the impact of large current on other circuits during the infrared transmission process, and can be removed when the requirements are not high. The current limiting resistor R14 should be adjusted according to the recommended value of the manufacturer of the actually selected infrared transceiver U14.

7.6 Connect to MCU Serial Port, Unified Power Supply (Figure Below)  
![](https://www.embedr.app/api/datasheets/ds_0d6c5a7a41a7180d0648/asset?path=images%2Fe177919ed7980b65d4dc7c69f5f674c43e4b18464b17e4b6013c0869f44c0758.jpg)

The figure is a reference circuit for connecting the MCU microcontroller to the CH340 chip through the TTL serial port to achieve USB communication under the unified power supply mode. This product chooses self-power supply mode, VCC supports 5V or 3.3V (When VCC is 3.3V, V3 needs to be shorted to VCC), and the USB bus power VBUS is not used at all (If necessary, the MCU can detect whether it is connected through the I/O series resistor) efficient). CH340 and MCU use the same power supply VCC, so there is no mutual current backflow between CH340 and MCU through the I/O of dual power supplies.

Signal lines not used by the CH340 can be dangled. For CH340C/N/K/E/X/B chips, X6 and C17 and C18 are not

required.

7.7 Connect to MCU, Supply Power to Each, and Prevent Flooding in Both Directions (Figure Below)

![](https://www.embedr.app/api/datasheets/ds_0d6c5a7a41a7180d0648/asset?path=images%2F3b19dfbec340ce07df1a72f99bd6d4456657582a152d57cacf8fbe700a13ceaf.jpg)  
The figure above is a reference circuit for connecting the MCU microcontroller to the CH340 chip through the TTL serial port to achieve USB communication in dual power supply mode. CH340 is powered by the USB bus VBUS, and the MCU uses another power supply VDD. VDD supports 5V, 3.3V or even 2.5V and 1.8V.

The RXD pin of the MCU in the figure should have an internal pull-up resistor enabled. If not, it is recommended to add a 2KΩ\~22KΩ pull-up resistor to the RXD pin and connect it to the MCU power supply VDD. Prevent external irrigation when CH340 has power but MCU has no power. Diodes D6 and D7 and NMOS transistor Q5 in the figure are used to prevent the CH340 from causing current backflow to the power-off MCU through the RXD or TXD internal diode of the MCU in dual power supply mode. The connection between D7 and RTS/BOOT0# is optional. Diode D6 is used for the situation when the TXD high level of CH340 flows back to the MCU through the RXD internal diode of the MCU; the diode D7 is used for the situation when the RTS high level of CH340 flows back to the MCU through the BOOT internal diode of the MCU; NMOS Tube Q5 addresses the situation where the RXD internal pull-up current of the CH340 backs up current to the MCU through the TXD internal diode of the MCU.

Prevent internal filling when CH340 has no power but MCU has power. The IOs of CH340K, CH340X, and CH340C and CH340N with lot numbers starting with 4 automatically prevent internal backflow, that is, no backflow current will be generated when the CH340 has no power but the MCU has power. In addition, D6, D7 and Q5 can prevent CH340 from draining current to the power-off MCU, so the above figure can achieve complete two-way anti-backflow. For other lot numbers or models of CH340, an additional anti-injection circuit is required. Usually an NMOS tube is connected in series with a Schottky diode to prevent bidirectional backflow. For example, a Schottky diode is connected in series to the drain D end of Q5 and its anode is connected to the RXD of CH340. An NMOS tube is connected in series between D6 and CH340, its drain is connected to D6, and its gate is connected to the power supply VCC of CH340. If it is determined that a certain situation will not occur, the corresponding NMOS tube or diode can be removed. For example, the IO of some models of MCU supports anti-backflow or 5VT, or the MCU has a permanent self-provided power supply. There is no need to worry about CH340 draining current out of the MCU. Then D6, D7, and Q5 can be removed and short-circuited.

Diodes are prioritized with low-power Schottky diodes BAS70, BAT54, or B0520, etc.

NMOS tubes are prioritized with low power, small capacitance NMOS tubes 2SK3018, 1012, etc.

In general, it is not recommended that the CH340 and MCU be powered separately from each other. If necessary, then you can also use CH340K or VIO power pin to support I / O independent power supply USB to serial chip CH343.

## 7.8 Connect to MCU, Supply Power to Each, and Prevent Internal Flooding (Figure Below)

![](https://www.embedr.app/api/datasheets/ds_0d6c5a7a41a7180d0648/asset?path=images%2F301aa4ff2072de1b8cc3e93fc49f7088db3749cf80f686f55ec272bb6d9eab65.jpg)

The figure above is a reference circuit for connecting the MCU microcontroller to the CH340K chip through the TTL serial port to achieve USB communication in dual power supply mode. CH340K is powered by the USB bus VBUS (VCC), and the MCU uses another power supply VDD. VDD supports 5V, 3.3V or even 2.5V and 1.8V. The bottom plate of the CH340K package has an optional GND pin. You can choose to connect it to GND or leave it floating according to the PCB routing convenience. The TXD, RTS# pins and RXD pins of the CH340K chip have built-in diodes to prevent current sinking (as shown in the figure), and a weak pull-up resistor of about 75KΩ is built-in to maintain the high level in the default or idle state (not marked in figure), this can not only achieve low-level driving and weak high-level driving, but also reduce the current backflow when CH340K and MCU are powered independently. CH340K can completely prevent the MCU power supply from sinking current into the powered-down CH340K, and can also reduce the external current sinking from the CH340K power supply into the powered-down MCU (not exceeding 150μA).

In addition, CH340X and CH340C and CH340N with lot numbers starting with 4 can also completely prevent the MCU power supply from sinking the current of the power-off CH340, thereby preventing the CH340 from wasting the current of the MCU power supply after the USB power is turned off. If you need to completely prevent the CH340K power supply from sinking current into the power-off MCU, refer to the diagram in Section 7.7 to add NMOS and diodes.

When used for communication baud rate of 120Kbps or more, it is recommended to enable built-in or external pull-up resistor of 2KΩ to 22KΩ for MCU's RX pin, or use other models of USB-to-serial chips with VIO power supply pin to support independent power supply to the I/O.

The DTR# pin of the CH340K chip is a normal push-pull output, and the CTS# pin is a normal input with a built-in pull-up resistor. Neither of these two pins have built-in diodes, neither have the function of preventing current backflow, and are generally not used to connect to MCUs.

DTR# can be used to control the power switch from VCC to VDD. As shown in the figure below, 4 power supply control schemes are available. The T4 scheme and the Q1 scheme (Q1 should choose an N-MOSFET with a lower Vth) are simplified schemes. The VDD output voltage is about VCC-0.8V and the current does not exceed 200mA;

the T6 scheme and the Q3 scheme are complete schemes. D10 in the figure is used to prevent VDD from supplying power to VCC and is optional.

![](https://www.embedr.app/api/datasheets/ds_0d6c5a7a41a7180d0648/asset?path=images%2Fb7bbb5b48b1b014041dc3aa1ceb94af76a7e6151f25af2574ca5bb5d1fc78b70.jpg)

7.9 MCU USB One-click Download (Figure Below)

![](https://www.embedr.app/api/datasheets/ds_0d6c5a7a41a7180d0648/asset?path=images%2F98d3a20f7a5f7fb425422764e7d2d28a2f8b6826449834e714e1174553a788c9.jpg)

The figure above is a one-click download reference circuit for a multi-mode MCU based on USB to serial port, without manual settings or manual reset. The MCU type targeted in the figure above: The MCU itself needs to support one-click download through the serial port. NRST is a low-level active reset input. BOOT0 defaults to a low level to select the application, and a high level to select Boot-Loader download. For example, 32F103 etc. The figure shows CH340X. The 4.7KΩ pull-down resistor can be selected from 3 to 5.6KΩ. This resistor also serves as the BOOT0 pull-down resistor of the MCU. For CH340C whose lot number starts with 4 and the las three digits are greater than B40, you can use OUT# plus a pull-down resistor as the second DTR# to connect to BOOT0.

Note: For other MCUs with opposite BOOT mode levels, you can directly use the DTR# of CH340C/G to control (default high level), or use the DTR# of CH340X with a resistor connected between pins 6# and 5# (push Set DTR enhancement mode, default high level). MCU normal working state: The pull-down resistor makes CH340X enter the open-source DTR enhanced mode, pin 6# is switched to DTR#, DTR# is not output by default, BOOT0 remains low level, RTS# defaults to high level, and the MCU runs the application normally.

One-click download: Open the serial port with the download tool program on the computer, set DTR# to high level, set RTS# to low level, and then high level, and the MCU enters the BOOT download program. After the download is completed, set DTR# to low level, set RTS# to low level, and then high level. The MCU will run the application normally and keep DTR# unchanged before closing the serial port. Note that the MODEM data and pin level are inverted. Unified power supply method: CH340X uses the same 5V or 3.3V power supply of the MCU. The disadvantage is that CH340X will consume sleep current by tens of uA.

Independent power supply mode: CH340X uses the USB VBUS power supply, which does not consume the MCU power supply current at all. After the CH340X itself is powered off, it basically does not affect the IO of the MCU. However, it is necessary to avoid the situation where some MCUs pour power back into the MCU because the USB has power but the MCU has no power. If you need to completely prevent the CH340 power supply from sinking current into the power-off MCU, refer to the diagram in Section 7.7 to add NMOS and diodes. If the NRST pin needs to support additional manual reset, a 1\~2KΩ resistor can be connected between RTS# and NRST or a diode with the anode connected to NRST.