Spis treści:
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
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:
- NC – not connected
- ACT# (OUT) – Negative clock phase output (CH340T: output state after USB configuration; active in low state)
- TXD (OUT) – Serial data output (reverse phase output CH340R).
- RXD (IN) – Serial data input, set controlled pull-up and pull-down resistor
- V3 (POWER) – VCC connections to external 3.3V power supply; connection of 10nF decoupling capacitor for 5V power supply
- UD+ (USB signal) – Direct connection to D+ data line of USB bus, sets internal pull-up resistor
- UD- (USB signal) – Direct connection to the D- data line of the USB bus
- GND (POWER) – Common ground, ground connection for USB
- XI (IN) – Quartz oscillator input, connection of quartz and quartz oscillator capacitor outside
- XO (OUT) – Quartz oscillator output, connection of quartz and quartz oscillator capacitor outside
- CTS# (IN) – Modem communication input signal, clearing sending, active in low state
- DSR# (IN) – Modem communication input signal, equipment readiness, active in low state
- RI# (IN) – Modem communication input signal, ringing signal oscillation, active in low (high) state.
- DCD# (OUT) – Modem communications input signal, carrier wave detection, active in low (high) state
- DTR# (OUT) – Modem connectivity output signal, data endpoint is ready, active in low (high) state
- RTS# (OUT) – Modem communication output signal, send request, active in low (high) state
- 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
- R232 (IN) – RS232 switch, active at high level, set internal pull-up resistor
- VCC (POWER) – Positive power input, requires an external 100nF coupling capacitor
- 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.