Global Sources
EE Times-Asia
Stay in touch with EE Times Asia
EE Times-Asia > Interface

Three easy steps to add USB to your design

Posted: 09 Jan 2014 ?? ?Print Version ?Bookmark and Share

Keywords:USB? microcontroller? MCU? Silicon Labs? CP2130?

These days, the most commonly employed means to enable communications between embedded applications and computers currently is the universal serial bus (USB), which is found on nearly every desktop computer, laptop computer, and tablet.

With the ubiquity of USB, embedded developers face the challenge of learning how to use the USB protocol and how to design it into their system. Unfortunately, the USB communications protocol is complex, and implementing a USB design using a general-purpose microcontroller (MCU) can be time-consuming and challenging. A handful of semiconductor vendors offer fixed-function communication bridges that are designed to simplify the addition of USB by eliminating the complexity associated with USB designs.

An example of this type of communication interface product is the Silicon Labs CP2130 USB-to-SPI bridge controller, which enables USB connectivity by interfacing through the serial peripheral interface (SPI) port on a general-purpose MCU. Figure 1 shows how a communication bridge interfaces with an embedded system. In addition to USB-to-SPI bridge devices, the following communication bridges supporting other interfaces are available:
???USB-to-UART, 2x UART, 4x UART

Figure 1: System-level USB host to MCU host connectivity.

Embedded systems targeting USB communications can be divided into two categories: upgrading a legacy design to use USB or enhancing a new design by adding USB. For either category, even developers without USB expertise can follow three easy steps to quickly enable USB communications:
1. Identify the desired communication peripheral on a host MCU
2. Build a prototype using an evaluation kit and jumper wires
3. Create a custom schematic and layout with a communication bridge

Additionally (to be discussed later), developers can create an application-customised part and driver.

Here's a closer look at each specific step, with the pros and cons of several design choices along the way.

Step 1: Identify the target communication peripheral on the host MCU
Whether upgrading a legacy design or enhancing a new design, developers must identify the host MCU's available communication peripheral(s). In the legacy design scenario, developers should look for any free peripherals on the host MCU. If there are none, the developer can use an addressable protocol such as SMBus/I2C. For new designs, developers can select a host MCU to match the desired communication protocol. For example, if SPI communication is the desired protocol, developers should select a host MCU that has an additional free SPI port. It is important to consider the maximum transfer rate requirements of the application when selecting a communication peripheral. If a large amount of data must be transferred at high speeds, SPI or UART are the best choices. If transfer speed is not important or multi-device bus connectivity with arbitration is important, SMBus/I2C is the best choice, only requiring two pins.

1???2???3?Next Page?Last Page

Article Comments - Three easy steps to add USB to your ...
*? You can enter [0] more charecters.
*Verify code:


Visit Asia Webinars to learn about the latest in technology and get practical design tips.

Back to Top