Get Ready for
USB 2.0 has served devices well for a decade.
Now, USB 3.0 promises to extend the interface for
The USB 3.0 specification — released in
November ‘08 — defines a new, SuperSpeed bus that
operates in parallel with USB 2.0’s wires. The 5 Gbps
signaling rate is over 10 times faster than USB 2.0’s
top speed of 480 Mbps (see Table).
Plus, unlike USB 2.0, SuperSpeed has a pair of
wires for each direction so traffic can move in both
directions at once. The first SuperSpeed devices will
likely be drives and high-resolution video.
You don’t need to worry that all of your USB 2.0
devices will soon be obsolete, however, USB 3.0
supplements not replaces USB 2.0. A USB 3.0 host
must support USB 2.0 speeds.
Where possible, USB 3.0 builds on USB 2.0.
SuperSpeed devices use the same four transfer types,
descriptors (with some additions), USB classes, and
USB 3.0 also offers advances in power use.
SuperSpeed devices can draw up to 900 mA per
device, compared to 500 mA for USB 2.0. When
reducing power is feasible, USB 3.0 defines new
Every SuperSpeed device must support at least
one USB 2.0 speed, but the device doesn’t have to
fully function at that speed. The device might just
return a message saying that the device needs a
SuperSpeed host to perform its function.
USB 3.0 host and device controllers are just
beginning to be available. Windows 7 will add
support for USB 3.0 in a future service pack.
Low Half duplex* 3
12 Half duplex*
High Half duplex* 5
1.5 Mouse, keyboard
Full 5 Virtual COM port
480 Mass storage, video
Both directions take turns on one pair of wires.
Each direction has its own signal pair and ground wire.
USB 3.0’s SuperSpeed is over 10 times faster
than USB 2.0’s high speed.
WinUSB Example Firmware and Applications
PIC18F4550, PICDEM FS-USB board,
Windows Driver Kit (WDK) and
// Check the Setup packet to find out if the request
// is directed to an interface, names the WinUSB
// interface ID, and is a Vendor request.
if(SetupPkt.Recipient != RCPT_INTF) return;
if(SetupPkt.bIntfID != WINUSB_INTF_ID) return;
if(SetupPkt.RequestType != VENDOR) return;
// It’s a vendor-specific request to the WinUSB
// interface. Decode the request and call a routine
// to handle it.
// The Data stage is host-to-device.
// The Data stage is device-to-host.
Listing 4. If the WinUSB firmware has defined a received
request, the firmware calls a routine to handle the request.
device sends data in the Data stage and calls a
function to handle the request. The example
handles two requests. Request 1 has a host-to-device Data stage, and Request 2 has a device-to-host Data stage.
I patterned my code to handle the control-transfer requests after similar code in the USB
Framework. For requests where the device sends
data to the host, I used the Get_Descriptor
request as a model. Code for requests where the
host sends data to the device is less common,
but I found an example in the Framework’s
virtual COM port example in the
Installing a Device
The other side of WinUSB communications is
the PC software that detects the device, assigns a
driver, and exchanges data with the device.
An INF file is a text file that Windows uses to
match a driver to a device. The INF file for a
WinUSB device includes the VID and PID from
the device descriptor and a 128-bit value called a
GUID which applications use to identify a
specific WinUSB device. The GUID’s length and
the method used to generate the GUID make it
highly unlikely that multiple devices will have the
You can generate a GUID in several ways. In
Microsoft’s Visual Studio Standard edition and
higher, select Tools > Create GUID. Other
options are Microsoft’s GUID generator,
January 2010 43