USB to UART bridging chip cp2101 and Its Application

Source: Internet
Author: User
Abstract:Cp2101 and its upgraded product cp2102 are highly integrated USB-UART bridging circuits manufactured by the United States's silicon company. They can use the simplest external circuit, the least external device and the smallest area of the circuit board for easy conversion from USB2.0 to UART. This paper introduces the main features and practical application methods of the circuit.

Keywords:Cp2101 UART USB IntroductionCp2101 and its upgraded product cp2102 is the USB-UART Bridge Circuit launched by the US silicon company. High Integration of the circuit, built-in full speed function controller, USB transceiver, crystal oscillator, EEPROM and asynchronous serial data bus (UART), supports full-function modem signal, no external USB device is required. Powerful, MLP-28 encapsulation, size only 5mm x 5mm, very small footprint. Similar to the working principle of other USB-UART transfer circuit, cp2101 virtualizes the USB port of the PC into a comport through the driver to achieve the purpose of expansion. The virtual comport (VCP) Device Driver allows a cp2101-based device to act as an added comport independent of any existing hardware in the form of PC application software. The comport uses the application software running on the PC to access a cp2101-based device by accessing a standard hardware comport. data transmission between the PC and cp2101 is completed through USB. Therefore, you can transmit data to a cp2101-based device via USB without modifying the existing software and hardware. 1 cp2101 featuresCp2101 is small but powerful. Its main features are as follows: · contains a USB transceiver, without an external receiver; · contains a clock circuit, without an external oscillator; · The internal 512-byte EEPROM can be used to store the product manufacturer's ID, product ID serial number, power parameters, device version number, and product description. · contains the power-on reset circuit; · The on-chip voltage can be adjusted to output a voltage of 3.3v. · complies with the USB specification (12 Mb/s). · the suspend pin supports USB status suspension. · asynchronous serial data bus (UART) compatible with all handshakes and modem interface signals. supported data formats include data bit 8, stop bit 1, 2, and check bit (including odd verification, even verification, and unverified ); · The baud rate range is 300B/s ~ 921.6kb/s; · contains a 512-byte receiving buffer and a 512-byte sending buffer; · supports hardware or X-on/X-off handshakes; · supports event status.

Figure 1

In addition, through the vendor and vendor free, suitable for Windows (including Windows CE), Linux, Mac OS-X and other operating system drivers, this eliminates the need for Secondary Development of the cp2101 series devices. In this way, you can use the software after welding and installing the driver.

2 Working PrincipleThe internal structure of cp2101 and the external basic connection circuit 1 are shown. As shown in figure 1, cp2101 requires a very small number of external devices for serial port expansion. Only three decoupling capacitors are required, which is very convenient to use. The USB function controller in 2.1 USB function controller and transceiver cp2101 is a high-speed circuit that complies with USB, with a transceiver and corresponding in-Chip pull resistors. The USB function controller manages all data transmission between the USB and UART, request commands issued by the USB master controller, and commands used to control the UART function. USB suspension and recovery signals support power management of cp2101 and external circuits. When a pending signal is detected on the bus, cp2101 enters the pending mode. When the pending mode is enabled, cp2101 sends the suspend and suspend signals, and after cp2101 is reset, cp2101 sends the signals until the USB-required device configuration is complete. The suspension mode of cp2101 will be canceled in any of the following circumstances: (1) When a continue signal is detected or a continue signal is generated; (2) a USB reset signal is detected; (3) device reset. When the suspension mode is exited, the suspend and suspend signals are canceled. Note that suspend and cp2101 are temporarily at a high level during the reset. To avoid this situation, you can use a large drop-down resistor (10kb Ω) to ensure that suspend is at a low level during the reset. The UART interface of the 2.3 asynchronous serial data bus (UART) interface cp2101 includes TX transmission and Rx reception data signals, as well as the control signals of RTS, CTS, DSR, DTR, DCD, and RI. UART supports the combination of RTS/CTS, DSR/DTR, and X-on/X-off handshakes. You can also program the UART to support various data formats and baud rates. UART data format and baud rate can be programmed on PC. Table 1 lists the data format and baud rate of the cp2101 serial bus.

Table 1 data format and baud rate of the cp2101 Serial Bus

Data bit 8
Stop bit 1
Check bit No verification, odd verification, or even verification
Baud Rate 300,600,120 921600
Note that the data bit and stop bit of the asynchronous serial data bus cp2101 are fixed. That is to say, you can change the check bit and the baud rate through software in actual use. However, changing the data bit and stop bit may cause exceptions in communication. 2.3 The eepromcp2101 is integrated with an EEPROM to store signals such as the USB vendor ID, product ID description, power supply parameters, device version number, and device serial number defined by the original manufacturer of the device. The definition of USB configuration data is optional. If the EEPROM is not used by the OEM data, configure the data by default. Note, however, for OEM applications that may use multiple cp2101-based devices to connect to the same PC, they require a specific serial number. The internal EEPROM can be programmed via USB so that oem usb configuration data and serial numbers can be directly written to cp2101 on the system during manufacturing and testing. Silicon provides a tool dedicated to programming cp2101 internal EEPROM, and also provides a library in Windows DLL format. This library integrates the eeprom programming steps into OEMs during the manufacturing process to facilitate pipeline testing and serial number management with custom software. The typical value of EEPROM is 100,000 times, and the data retention time is 100. 3. Application InstancesFor the actual application of cp2101, see circuit 2. The circuit is proved to be completely feasible after making and debugging.

Figure 2

(1) The above circuits support full-featured serial communication applications. To ensure data transmission stability and avoid interference during communication, you can also add a filter circuit on the USB interface. (2) The multi-channel RS-232 transceiver used in the circuit is a series of circuits such as max241 or max223 of Maxim Company (see the RS-232 transceiver Data Manual of Maxim company for details ), the series supports pending (when cp2101 enters the pending state, the suspend pin becomes high so that the RS-232 transceiver also enters the pending state) to keep receiving external data valid. When using the circuit, pay attention to the correct connection between the en pin and the shdn pin. In many simple serial communications, signals with only two txd/rxd pins can be used in this case with fewer channels and smaller RS-232 transceivers. (3) There is a large metal block at the bottom of cp2101, which is grounded inside the chip. Therefore, when making a board, ensure that no non-ground through hole passes through cp2101, or ensure that the through hole is not short-circuited with it. To ensure the reliability of the circuit operation, we do not recommend wiring the middle part of the cp2101 welding panel layer. (4) The signals on the UART bus of cp2101 can be directly identified by single chip microcomputer. Therefore, it is necessary to determine whether level conversion is required based on the specific application requirements.4 ConclusionCp2101 is a powerful USB-UART bridge circuit, 5mm x 5mm shape so that it occupies a very small space, it is very easy to use it to expand the USB port into a serial port. At the same time, because its internal storage product ID and other information registers can be directly rewritten through the USB port, the development of related products with its advantages of saving time and effort. The only pity is that, due to the limitations of UART itself, its maximum traveling rate can only reach 921600b/s, and it does not make much sense to make full use of USB2.0. Currently, cp2102 is available in the market.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.