Example: stock market

USB to serial chip CH340 - SparkFun Electronics

The DataSheet of CH340 (the first) 1. USB to serial chip CH340 . English DataSheet Version: 1D. 1. Introduction CH340 is a USB bus convert chip and it can realize USB convert to serial interface, USB convert to IrDA infrared or USB convert to printer interface. In serial interface mode, CH340 supplies common MODEM liaison signal, used to enlarge asynchronous serial interface of computer or upgrade the common serial device to USB bus directly. More detail about USB convert to printer interface please referring to the second manual CH340DS2. In infrared mode, add infrared transceiver to CH340 can compose USB infrared adapter, realize SIR. infrared communication. UART/RS232/IrDA infrared SIR. Computer CH340 . or other USB convert USB host chip parallel printer to USB printer 2. Features Full speed USB device interface, conforms to USB Specification Version , only needs crystal and capacitance external.

asynchronous serial interface of computer or upgrade the common serial device to USB bus directly. More detail about USB convert to printer interface please referring to the second manual CH340DS2. In infrared mode, add infrared transceiver to CH340 can compose USB infrared adapter, realize SIR infrared communication. USB 2. Features

Tags:

  Transceiver

Information

Domain:

Source:

Link to this page:

Please notify us if you found a problem with this document:

Other abuse

Transcription of USB to serial chip CH340 - SparkFun Electronics

1 The DataSheet of CH340 (the first) 1. USB to serial chip CH340 . English DataSheet Version: 1D. 1. Introduction CH340 is a USB bus convert chip and it can realize USB convert to serial interface, USB convert to IrDA infrared or USB convert to printer interface. In serial interface mode, CH340 supplies common MODEM liaison signal, used to enlarge asynchronous serial interface of computer or upgrade the common serial device to USB bus directly. More detail about USB convert to printer interface please referring to the second manual CH340DS2. In infrared mode, add infrared transceiver to CH340 can compose USB infrared adapter, realize SIR. infrared communication. UART/RS232/IrDA infrared SIR. Computer CH340 . or other USB convert USB host chip parallel printer to USB printer 2. Features Full speed USB device interface, conforms to USB Specification Version , only needs crystal and capacitance external.

2 Emulate standard serial interface, used to upgrade the former peripheral device, or add excess serial interface through USB. Totally compatible with serial application program in computer endpoint Windows operation system. Hardware full duplex serial interface, set transceiver buffer, supports communication baud rate varies from 50bps to 2 Mbps. Supports common MODEM liaison signal RTS, DTR, DCD, RI, DSR and CTS. Through adding level converter equipment to supply RS232, RS485, RS422 and other interface. Supports IrDA criterion SIR infrared communication, supports baud rate varies from 2400bps to 115200bps. For it is through USB converts to serial interface, only compatible with application layer not totally. Software compatible with CH341, using drive of CH341 directly. Support 5V and source voltage. Supply SSOP-20 package without lead, compatible with RoHS.

3 The DataSheet of CH340 (the first) 2. 3. Package Package shape Width of plastic Pitch of Pin Instruction of package Ordering type SSOP-20 209mil 25mil Shrink small outline package of 20-pin CH340T. SSOP-20 209mil 25mil Shrink small outline package of 20-pin CH340R. 4. Pins Pin Description(description in bracket is only about Pin No. Pin Name Pin Type CH340R). Positive power input port, requires an external 19 VCC POWER. power decoupling capacitance 8 GND POWER Public ground, ground connection for USB. connects of VCC to input outside power while , 5 V3 POWER connects of decoupling capacitance outside while 5V. Input of crystal oscillator, attachment of crystal and 9 XI IN. crystal oscillator capacitance outside Opposite output of crystal oscillator, attachment of 10 XO OUT. crystal and crystal oscillator capacitance outside Directly connect to D+ data wire of USB bus, set up 6 UD+ USB signal pull-up resistor internal 7 UD- USB signal Directly connect to D- data wire of USB bus Forbid USB device suspending, active with low, set up 20 NOS# IN.

4 Pull-up resistor internal 3 TXD OUT serial data output(opposite phasic output of CH340R). serial data input, set up controlled pull-up and 4 RXD IN. pull-down resistor MODEM liaison input signal, clear sending, active with 11 CTS# IN. low(high). MODEM liaison input signal, data equipment is ready, 12 DSR# IN. active with low(high). MODEM liaison input signal, oscillate ring to prompt, 13 RI# IN. active with low(high). The DataSheet of CH340 (the first) 3. MODEM liaison input signal, carrier wave detection, 14 DCD# OUT. active with low(high). MODEM liaison output signal, data endpoint is ready, 15 DTR# OUT. active with low(high). MODEM liaison output signal, request to send, active 16 RTS# OUT. with low(high). CH340T:negative phasic clock output 2 ACT# OUT (CH340R:USB configuration is finished state output, active with low). Assistant RS232 enable, active with high, set up 18 R232 IN.

5 Pull-down resistor internal NC. NC. CH340T: unconnected, must be suspended 17 CH340R: serial interface mode set input, set up pull-up IR# IN resistor internal, low level is SIR infrared serial interface, high level is common serial interface CKO. OUT(NC.) CH340T: clock output 1. NC CH340R:unconnected, must be suspend 5. Function description CH340 chip set up USB pull-up resistor internal, UD+ and UD- pins must be connected to USB bus directly. CH340 chip set up power up reset circuit internal. When CH340 chip is working normally, the outside must supply 12 MHz clock signal to XI pin. In generally, clock signal is generated by inverter in CH340 through oscillating of crystal keeping frequency. A. crystal of 12 MHz between XI and XO, XI and XO connect a high frequency oscillator capacitance to ground respectively can compose the peripheral circuit.

6 CH340 chip supports 5V and power voltage. When using 5V source power, the VCC input 5V. power and the pin of V3 must connect with 4700pF or decoupling capacitance. When using power voltage, connects V3 with VCC, and input power voltage. And the other circuit voltage which is connected with CH340 is no more than CH340 automatically supports USB device suspending to save power consume. NOS# is low level can forbid USB device suspending. In asynchronous serial interface mode, CH340 chip contains these pins: data transfer pin, MODEM. liaison signal pin and assistant pin. Data transfer pin contains: TXD pin and RXD pin. When serial interface is idle, RXD must be high-level. If R232 is high-level, use assistant RS232 function, then RXD pin automatically inserts a inverter internal, and low-level is in default. When serial interface output is free, the TXD in CH340H and CH340T.

7 Is high level, TXD in CH340R is low-level. MODEM liaison signal pin contains: CTS#, DSR#, RI#, DCD# and RTS#. All these MODEM liaison signal are controlled by computer application program and application program defines function. Assistant pin contains: IR#, R232, CKOH, CKOL and ACT#. When IR# is low-level, starts infrared serial interface mode. R232 is used to control assistant RS232 function. When R232 is high-level, RXD pin automatically insert a inverter internal, and output opposite phase clock from CKOH and CKOL. ACT# is USB device configuration finished state output (such as USB infrared adapter is ready) when R232 is low-level. IR# and R232 only be detected once a time after power reset. CH340 set separate transceiver buffer internal and supports simplex, semiduplex and full duplex asynchronous serial communication. serial data contains one low-level start bit , eight or nine data bit and The DataSheet of CH340 (the first) 4.

8 One high-level stop bit. Supporting odd check/even check/flag check/blank check. CH340 supports common baud rate: 50,75,100,110, ,150,300,600,900,1200,1800,2400,3600,480 0,9600,14400,19200,28800, 33600,38400, 56000,57600,76800,115200,128000,153600,2 30400,460800,921600,1500000,2000000 and so on. The baud rate error of serial transfer signal is less than , and permission baud rate error of serial receive signal is not less than In the WINDOWS operation system of computer endpoint, drive program of CH340 can communicate standard serial interface. So the mostly original serial interface application program is totally compatible, and without any modify. CH340 can be used to upgrade the former serial interface peripheral equipment, or add extra serial interface for computer via USB bus. Supply RS232, RS485, RS422 and other interface via adding level change device.

9 Only add infrared transceiver , CH340 can add SIR infrared adapter for computer via USB bus, realize infrared communication between computer and peripheral equipment which is according to IrDA criterion. 6. Parameter Absolute maximum rating (Stresses above those listed can cause permanent damage to the device. Exposure to maximum rated conditions can affect device operation and reliability.). Name Parameter note Min. Max. Units TA Ambient operating temperature -40 85 . TS Storage temperature -55 125 . VCC Voltage source (VCC connects to power, GND to ground) V. VIO The voltage of input or output pin VCC+ V. Electrical parameter (test conditions: TA=25 , VCC=5V, exclude pin connection of USB bus). (The every current parameter must multiply the coefficient of 40% when the power is ). Name Parameter note Min. Typical Max. Units V3 doesn't connect to VCC 5 VCC Source voltage V.

10 V3 connect to VCC ICC Total source current when working 12 30 mA. Total source current when VCC=5V mA. ISLP. USB suspending VCC= mA. VIL Input Voltage LOW V. VIH Input Voltage HIGH VCC+ V. VOL Output Voltage LOW (draw 4mA current) V. Output Voltage HIGH (output 3mA current). VOH V. (Output 100uA current during chip reset). IUP Input current with pull-up resistor internal 3 150 300 uA. IDN Input current with pull-down resistor internal -50 -150 -300 uA. VR Restrict voltage when power-up reset V. sequence parameter (test conditions: TA=25 ,VCC=5V). Name Parameter note Min. Typical Max. Units FCLK Frequency of input clock in XI MHz TPR Reset time of power-up 20 50 mS. The DataSheet of CH340 (the first) 5. 7. Application USB convert 9-wire serial interface (the following image). The following image is using CH340T to realize USB convert RS232 serial interface.


Related search queries