Comparison of Several Solutions for Extending USB Connections

Publisher:760802csyLatest update time:2013-11-25 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

Comparison of Several Solutions for Extending USB Connections

  USB (Universal Serial Bus) is now recognized as the preferred connection solution for many common off-the-shelf peripherals such as keyboards, mice, printers and storage devices. For equipment manufacturers dedicated to industrial and consumer markets, USB has also become a preferred choice for their connection needs to the PC. In fact, for any application using a standard PC as a controller device, the benefits of the USB interface are obvious. Although high-volume, short-life cycle general peripherals can do without USB interfaces, some customized applications with longer life cycles need to add USB connections to solve the problem of modern PCs lacking traditional connection interfaces.

  Among these interfaces that are not supported by modern PCs, the RS-232 serial interface is a typical example. From a software perspective, RS-232 is easier to implement than USB and still meets the needs of many applications. However, most modern PCs have removed the RS-232 interface.

  Simple serial communication solutions are often cheaper than complex alternatives, such as RS-232 interfaces, which cost less than USB interfaces. The basic components of RS-232 solutions include a UART and a driver and a simple handshake protocol, which can be easily implemented even in microcontrollers with very limited resources. Moreover, the characteristics of RS-232 interfaces make it a robust short-distance point-to-point communication solution that can withstand harsh working environments. Such requirements are very typical in many industrial control or measurement implementations. For these reasons, RS-232 interfaces are still active in many application areas.

. Due to the lack of RS-232 support in modern PCs, the support of RS-232 in PC-as-controller applications is disappointing. The options for implementing RS-232 peripheral support seem to be few: find a PC with a PCI card that provides RS-232 or redesign the peripheral to support USB interface type. Replacing RS-232 with USB requires a lot of design work. These impacts are not only reflected in the hardware, but more importantly, they bring very huge changes to the embedded software.

  There is now a third option available for supporting RS-232 peripherals on modern PCs. This approach requires less engineering work than the other options and maintains the integrity and stability of legacy devices. The benefit of this approach is that it provides a transparent conversion between USB and RS-232 interfaces. This solution is supported by a range of chips from FTDI that eliminate the complexity associated with using standard UART ports to implement embedded USB support. This technology provides a simple and low-cost solution for supporting legacy RS-232 peripherals. Figure 1 shows how a small PCB can use FTDI chips to provide this solution.

Comparison of Several Options for Extending USB Connections
Figure 1: A traditional RS-232 modem connected to a modern PC.

Comparison of Several Solutions for Extending USB Connections


   The fifth generation of chips in the FTDI family now supports USB 1.0 and USB 2.0 protocols (low speed, full speed and high speed). These devices provide a range of asynchronous and synchronous serial interface solutions, including UART interfaces (RS-232/RS-422/RS-485) and FIFOs. In addition to integration at the PCB level, these chips can be used to make USB to RS-232 interface conversion cables between PCs and peripherals. The chip in the cable completes all the interface conversion work between the PC and the peripherals. Since the baud rate of USB is much higher than the baud rate of RS-232 (6000:1), these devices must not only provide a compatible USB interface, but also be able to buffer, analyze and reassemble data to meet the specifications of the RS-232 protocol. These are based on FTDI's proprietary IP implementation, including a USB protocol engine, a UART controller, a serial interface engine and a USB transceiver. Figure 2 shows the block diagram of one of the chips, the FT232R.

Comparison of several solutions for extending USB connections
Figure 2: Block diagram of the FT232R architecture.

Comparison of Several Solutions for Extending USB Connections
    The software running on the original device does not need to be changed, but the application running on the PC needs to know that a USB connection is being used instead of an RS-232 connection, just in terms of the COM port being used. When a USB to RS-232 adapter cable is connected to the PC's USB port, the PC's operating system creates a virtual COM port. The application communicates with the USB interface through this virtual COM port without any modification to the application on the PC. The application only needs to know the specific COM port to which the adapter cable is connected to communicate with it. No changes are required to the peripheral's software or hardware. The software code listed in Figure 3 gives an example of how an application can determine the COM port to which it is connected, and it also shows some sample code to configure the UART.

Comparison of Several Solutions for Extending USB Connections

Comparison of several solutions for extending USB connections
Figure 3: Application software reference code based on VCP driver.

   USB is easy to implement on PCs. Most operating systems for desktops or laptops, including Linux, now support USB as standard. But in embedded devices, the use of USB interfaces is still determined by whether it is easily supported by the microcontroller in the embedded device. This means integrating USB interfaces on the microcontroller like integrating UART, SPI and I2C interfaces. This will make the microcontroller more complex and therefore put cost pressure on the device integration manufacturer.

  However, using FTDI's USB interface chip, the embedded device only needs to use the UART interface on the microcontroller to communicate with the USB chip to achieve the USB interface connection. As mentioned earlier, the heavy USB protocol is borne by the dedicated hardware and firmware integrated in the FTDI device. So now by sending some simple commands through a standard COM port, any embedded device using a microcontroller can easily support USB.

Reference address:Comparison of Several Solutions for Extending USB Connections

Previous article:Comparison of CMOS and CCD image sensors for surveillance
Next article:Digital interface series articles: SPI bus

Latest Analog Electronics Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号