Every USB device contains a device descriptor with a Vendor ID
and Product ID that identify the device.
Descriptor size in bytes
Descriptor type (Device)
USB Specification release number (BCD) (2.00)
Endpoint 0 maximum packet size
Vendor ID (Lakeview Research, assigned by usb.org)
Product ID (assigned by vendor)
Device release number (BCD)
Manufacturer string index
Product string index
Device serial number string index
Number of configurations
that you’re likely to be dependent on
the driver’s provider to fix any problems.
Although you can write your own
driver, Windows driver writing isn’t an
easy task and thus isn’t worth
pursuing for most small-quantity
projects. Fortunately, generic drivers
are available from a variety of sources.
Drivers from device manufacturers
include the Microchip General-Purpose USB Windows Driver, Cypress
Semiconductor’s CY4604 USB
Developer’s uStudio, and the Silicon
Labs USBXpress host library. FTDI Chip
offers the D2XX Direct Driver, which
applications can use to access FTDI
Chip’s controllers using vendor-specific
USB IN BRIEF
Here are some essential facts for anyone who is
designing a device that uses a USB port.
HOSTS AND DEVICES
Windows includes drivers for popular device classes,
including human-interface devices (mice, keyboards,
game controllers), mass storage (drives), audio and video
devices, printers, cameras, and more.
Every USB communication is between a host and a
device. A USB host is a PC or another computer that
contains USB host-controller hardware and software. The
host controls communications on the bus. A USB device
contains USB device-controller hardware and program
code, often called device firmware. The device responds
to communications from the host.
On power-up or device attachment, the host
computer requests information from the device in a
process called enumeration. The device sends a series of
data structures called descriptors, which tell the host
about the device and its capabilities.
A Windows host compares the contents of the
descriptors with the information in the PC’s INF files. The
file with the best match tells the host what class driver or
device driver to assign to the device. (Other operating
systems use similar methods to select a driver.) The
driver is software that manages communications
between applications and the lower-level drivers that
access the USB hardware.
The device controller is hardware that can be
embedded in a microcontroller chip or in a separate chip
that interfaces to a microcontroller or other CPU.
Microcontrollers with embedded USB controllers are
available from many sources, including Microchip
Technology, Atmel Corporation, Silicon Laboratories,
and Cypress Semiconductor. Chips that interface to a
microcontroller or CPU are available from Philips
Semiconductors, National Semiconductor, and others.
Every USB device must have the intelligence to
understand and respond to received requests and other
events on the bus. Controller chips vary in how much
firmware support they require for handling the low-level
USB protocols. Most chip vendors provide example
firmware that you can adapt for a specific application.
TRANSFERTYPE CONTROL BULK INTERRUPT ISOCHRONOUS
REQUIRED BY ALL
ALLOWED AT LOW
MAXIMUM TIME BETWEEN TRANS- no no yes yes
TABLE 1. USB’s four transfer types provide options to
fit the needs of any device.
For every communication, the host specifies
an endpoint address in the device. The endpoint
address is typically a buffer or register that holds
received data or data waiting to transmit.
USB supports three bus speeds. Low speed
can guarantee bandwidth of only 800 bytes/sec
per endpoint address but is useful for some
inexpensive devices such as keyboards and mice.
Full speed can transfer data to or from an endpoint
address at up to 1.2 Megabytes/sec. For devices
that need more speed, a high-speed endpoint can
transfer data at over 30 Megabytes/sec.
USB uses four transfer types (Table 1). Typical
uses for each type include enumeration for control
transfers, printer and scanner data for bulk
transfers, mouse and keyboard data for interrupt
transfers, and real-time audio and video for