print

USB Embedded Host Stack


The content on this page is a condensed version of Microchip Technology’s Application Note AN1140, which can be downloaded for free at www.microchip.com/usb. Visitors will also find information on other application notes, development systems, datasheets, technical training, samples and much more.


Under the USB standard, USB devices may not communicate directly with each other. They may only communicate with a USB host which controls the bus on which one or more devices communicate. The most common USB host is a PC. With the introduction of Microchip’s microcontrollers with the USB On-The-Go (OTG) module, it is now possible for embedded applications to utilize the wide range of USB devices as a USB embedded host.


A USB embedded host differs from a USB host in several small but important aspects. A USB embedded host:

  • Supports only specific peripheral devices and/or classes of devices.
  • Supports only transfer type required by the supported devices.
  • Offers optional Hub support.
  • Has relaxed power requirements.

These restrictions allow an embedded host to be implemented on a device with fixed, limited memory.

A device can be a dual role device by supporting both embedded host and USB device functionality via two receptacles. For example, a digital camera can act as a peripheral device when downloading pictures to a PC, and act as an embedded host when transferring pictures to a printer. The camera would determine its role as device or host depending on what cable was attached. If a cable was attached to the Type-A receptacle, the camera would act as the host. If a cable was attached to the Type-B receptacle, the camera would act as the device. The Type-A and Type-B receptacles must both operate concurrently unless they are only accessible one at a time.

A USB On-The-Go device is a device that can dynamically change its role from an embedded host to a peripheral device without changing cables. OTG devices use a micro-AB receptacle. The initial configuration is determined by the cable orientation. If the micro-A plug of the cable is inserted, the device will initially act as an embedded host. If the micro-B plug of the cable is inserted, the device will initially act as a peripheral device.

The choice of whether or not to utilize OTG depends on the need for the two devices to dynamically switch modes. In most cases, the host-peripheral role is constant for a pair of communicating devices. For example, the dual role digital camera described above would never need to swap roles with the PC, or with the printer, so it would not require OTG functionality.

Microchip provides a royalty-free USB Embedded Host Stack for use with Microchip microcontrollers. This Stack is designed to run on all Microchip devices that have the USB OTG module. Stack operation can be configured through the use of various compile-time options to optimize both speed and size for a particular application.

 

Contact Information

Microchip Technology Inc.
Microchip Technology Inc.

2355 W. Chandler Blvd.
Chandler, AZ, 85224
USA

tele: 480.792.7200
toll-free: 888.MCU.MCHP
fax: 480.792.7277
lit_inquiry@microchip.com
www.microchip.com

Share and Enjoy:
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google

Comments

Leave a Reply

Comment

Security Code: