CP2104: Electrical characteristics, connection to microcontroller or sensor

By SILICON 192

CP2104: Electrical characteristics, connection to microcontroller or sensor

The CP2104 is a single-chip USB to UART bridge controller that provides a simple solution for upgrading RS-232/RS-485 designs to USB.
Its main function is to realize USB connection with serial communication devices such as microcontrollers, sensors, and global positioning systems. This bridge enables communication between a serial device and the USB interface of a computer or other host device. In order to facilitate serial communication, CP2104 is widely used in embedded systems, sensor networks, data acquisition and other fields.

 


 

Ⅰ.Electrical characteristics of CP2104


•Operating voltage: CP2104 usually supports 3.3V or 5V power supply, which means it can work normally in these two voltage ranges. This makes it suitable for a variety of embedded systems, as different devices may have different voltage requirements.
•IO level: The serial UART communication pins of the CP2104 chip (such as TX, RX, RTS, CTS, etc.) usually support working at the 3.3V or 5V level. So it is compatible with serial devices of different levels.
•Current requirements: The current requirements of the CP2104 are generally low, making it ideal for use in portable and low-power devices. Its current consumption mainly depends on its operating state, such as active mode or sleep mode. In active mode, the current consumption of the CP2104 is relatively high, which mainly depends on its workload. Generally speaking, the current consumption may range from tens to hundreds of milliamps, depending on the specific application and configuration. In sleep mode, the current consumption of CP2104 will be significantly reduced. This is because in this mode, most functions of the chip will be turned off, thereby reducing power consumption. Generally speaking, the current consumption in sleep mode usually ranges from a few milliamperes to tens of milliamperes, and the specific value also depends on the specific device and configuration.
•USB interface: CP2104 communicates with the host device through the USB 2.0 interface. It supports USB full-speed mode and typically works at a data transfer speed of 12 Mbps.
•GPIO pins: CP2104 also usually has some GPIO (General Purpose Input/Output) pins that can be used for digital signal communication or control with external devices.


Ⅱ. Use CP2104 to connect a microcontroller or sensor


1.Connect the hardware: Plug in the CP2104 chip on the PC or host computer. Connect the UART pins (TX, RX, RTS, CTS, etc.) of the CP2104 to the target microprocessor or sensor. Make sure these pins are connected correctly to enable bidirectional serial communication.
2.Install the driver: If the operating system does not automatically recognize the CP2104 and install the driver, you need to download and install the CP210x driver suitable for the operating system. These drivers are usually provided by Silicon Labs. After installing the driver, the CP2104 should be correctly recognized by the operating system.
3.Configure serial communication parameters: On the microcontroller or sensor, configure the serial communication parameters, such as baud rate, data bits, stop bits and parity check, etc., to ensure communication compatibility with CP2104.
4.Develop an application: Develop an application to communicate with the CP2104. Various programming languages and development environments can be used, such as C/C++, Python, Arduino IDE, etc., to write communication code with microcontrollers or sensors.
5.Testing and debugging: Before connecting and communicating, ensure proper testing and debugging in terms of hardware and software. Check that connections, data transfer and communication protocols are working properly.
6.Data transmission and communication: Once configuration and testing are completed, the CP2104 will allow data transmission and communication with the microcontroller or sensor through the USB interface. You can send data to the target device and receive data from the target device.

 

Ⅲ.System Overview of CP2104


The CP2104 is a highly-integrated USB-to-UART Bridge Controller providing a simple solution for updating RS-232/RS-485 designs to USB using a minimum of components and PCB space. The CP2104 includes a USB 2.0 full-speed function controller , USB transceiver, oscillator, one-time programmable ROM, and asynchronous serial data bus (UART) with full modem control signals in a compact 4 x 4 mm QFN-24 package (sometimes called “MLF” or “MLP”). No other external USB components are required.
The on-chip one-time programmable ROM may be used to customize the USB Vendor ID, Product ID, Product Description String, Power Descriptor, Device Release Number, Device Serial Number, and GPIO configuration as desired for OEM applications.


Ⅳ.Characteristics description table of CP2104


1.Global DC Electrical Characteristics(VDD = 3.0 to 3.6 V, –40 to +85 °C unless otherwise specified)


2.Reset Electrical Characteristics(–40 to +85 °C unless otherwise specified)


3.Voltage Regulator Electrical Specifications(–40 to +85 °C unless otherwise specified)


4.GPIO Output Specifications(–40 to +85 °C unless otherwise specified)

 

Ⅴ.Operating systems supported by CP2104


1.Windows: CP2104 chip usually has extensive support under Windows operating system. Silicon Labs provides CP210x drivers for various Windows versions, including Windows 7, Windows 8, Windows 10, and more.
2.macOS: CP2104 can also be used in macOS (Apple operating system). Similar to Linux, macOS also usually automatically loads the CP210x driver to support communication with the CP2104.
3.Linux: CP2104 is also supported under Linux operating system. Usually, the Linux kernel already contains the CP210x driver, so in most Linux distributions, just plug in the CP2104 device and the system will automatically load the corresponding driver.
4.Android: On Android mobile devices, CP2104 usually requires specific application support. You can look for serial communication apps for Android in the Google Play Store and use them to communicate with CP2104-connected devices.

 

.Pin layout diagram of CP2104

 

 

.USB Function Controller and Transceiver of CP2104


The Universal Serial Bus (USB) function controller in the CP2104 is a USB 2.0 compliant full-speed device with integrated transceiver and on-chip matching and pullup resistors. The USB function controller manages all data transfers between the USB and the UART as well as command requests generated by the USB host controller and commands for controlling the function of the UART and GPIO pins.
The USB Suspend and Resume signals are supported for power management of both the CP2104 device as well as external circuitry. The CP2104 will enter Suspend mode when Suspend signaling is detected on the bus. On entering Suspend mode, the CP2104 asserts the SUSPEND and SUSPEND signals . SUSPEND and SUSPEND are also asserted after a CP2104 reset until device configuration during USB Enumeration is complete.
The CP2104 exits the Suspend mode when any of the following occur: Resume signaling is detected or generated, a USB Reset signal is detected, or a device reset occurs. On exit of Suspend mode, the SUSPEND and SUSPEND signals are de-asserted.


Frequently Asked Questions


1.How to use CP2104 for virtual serial communication?
First installed the CP210x driver for the applicable operating system. This will allow the computer to correctly identify the CP2104 and create a virtual COM port. Insert the CP2104 chip into the USB port of the computer. Open the computer's Device Manager or Serial Device Manager and view the list of virtual COM ports. One or more virtual COM ports can be seen, which are associated with the CP2104. Use a programming language to write an application to communicate with the CP2104 through the virtual COM port.


2.Does CP2104 support flow control?
CP2104 supports flow control, including RTS/CTS and XON/XOFF. RTS/CTS: CP2104 has RTS and CTS pins for hardware flow control. When using hardware flow control, the CP2104 will use these two pins to control the flow of data. XON/XOFF: CP2104 also supports software flow control, using XON and XOFF characters to control data transmission. When the receiving buffer is about to overflow, the receiving end sends the XOFF character and the sending end pauses sending data.


3.What application scenarios are suitable for using CP2104?
Embedded systems, sensor networks, embedded consoles, industrial automation, data acquisition equipment, etc.


4.What are the alternative models of CP2104?
CP2102, CH340,FT232R, PL2303, MCP2200

Categories

Top