|
|
Home » News » industry information » USB interface chip CP2102 data introduction (II)

USB interface chip CP2102 data introduction (II)

Views: 4     Author: Site Editor     Publish Time: 2018-08-07      Origin: Site

The internal EEPROM is programmed via USB, allowing the OEM's USB configuration data and serial number to be written directly to the CP2102/CP2103 on the system board at the factory and test. Cygnal provides an internal EEP-ROM programming setup tool for the CP2102/CP2103, as well as a free library that drives the Windows DLL format. This library is available. The EEP-ROM programming steps are integrated into the OEM's custom software for pipelined testing and serial number management in manufacturing. The EEP-ROM has a typical write life of 100,000 times and a data retention time of 100 years. To prevent changing the USB descriptor, it should be locked.

 

Other functions:

In addition to the above functions, the CP2103 can also implement the RS485 interface and USB interface conversion function. The CP2103 supports four GPIO pins that can be defined according to the control information.

 

Typical application circuit: hardware circuit design:

The original device's RS232 interface uses only TXD/RXD 2 pin signals and ground 3 lines. The level driver between the MCU 8031 and the RS232 interface uses Maxim's MAX202CPE, and the optocoupler 6N137 is used for isolation.

 

The circuit has been fully reliable through board and software and hardware debugging. For serial port expansion, the instrument needs 2 to 3 external decoupling capacitors, and the REGIN terminal needs to add decoupling capacitors in parallel with 0.1μF and 1.0μF. The power supply for the CP2102 is provided by the USB interface of the computer, and then three protective tubes are connected for ease of use. This circuit uses only the TXD/RXD 2 pins on the CP2102's UART bus, and the rest is left floating. The MCU can directly identify the signal on the UART bus of the CP2102. To ensure the stability of data transmission and reception, and avoid interference in the communication process, the optocoupler is used for isolation, and the RST is pulled up to VDD by a 4.7 kΩ resistor.

 

When the CP2102 converter is connected to the host, the corresponding virtual serial port driver must be selected according to the operating system. You don't have to modify the device's application to access the virtual serial port just like accessing a standard physical serial port. The port device will generate a new port for the CP2102 USB to UART Bridge Controller (COM×) (x varies depending on the configuration of the computer) At this point, the driver installation is successful. In essence, all data communication for the virtual serial port is sufficient for USB bus transmission, but on the device, the transceiver is RS232 data.

 

software design:

The computer adopts the C language communication control function and is set according to the serial port mode to realize the interface communication software design. The MCU communication program is as follows. The communication program is debugged at a baud rate of 9 600 to 600, and the communication is accurate and reliable.

 

Conclusion:

The RS232 conversion to USB interface circuit based on CP2102/CP2103 has the characteristics of simple circuit, reliable operation and low cost. It can upgrade its RS232 device to USB interface device without any modification to the original RS232 traditional device.


Links

Contact Us

> Tel:86-562-2821018
> Fax:86-562-2821558
> Mob:86-13305620368
> Email:mpp@film-capacitor.com
> Address:NO.1771 QiFeng Road, Shizishan Economic Development Zone,Tongling, Anhui, China
Copyright  2017 Anhui Safe Electronics Co., LTD. All rights reserved. Sitemap      Log in to my mailbox