Inside USB
ment USB protocols. To communicate with COM-port devices, the host must
support the COM-port software interface and must either support the USB
communication devices class or use a vendor-specific driver that implements a
virtual COM port.
A USB device can contain a microcontroller with an on-chip USB device con-
troller, or the USB device controller can be on a separate chip that interfaces to
a microcontroller or other CPU. The device can use a USB controller designed
specifically for COM-port applications or a generic controller that can be pro-
grammed for any use. The hardware that implements the low-level USB proto-
cols in the device controller is called the serial interface engine (SIE). Some
devices manage USB communications entirely in hardware and require no
firmware programming to support USB-specific protocols.
An On-The-Go (OTG) device is a USB device that can function as a lim-
ited-capability host and as a device (but not both at the same time). An OTG
device can function as a host to virtual COM-port devices or as a virtual
COM-port device.
9 4
A USB host manages power and communications on the bus and has these
responsibilities:
- Detect and enumerate all attached devices,.
- Detect when a device has been removed from the bus.
- Provide power to devices and work with the devices to conserve power when
possible. - Manage data flow on the bus.
- Perform error checking.
$ 8 4
In many ways, a device’s responsibilities mirror the host’s, but devices also have
unique duties. A USB device has these responsibilities:
- Detect voltage on the bus’s power-supply line and on detecting the voltage,
switch in a pull-up resistor to announce the device’s presence to the host. - Manage power. In normal operation, a device must limit the bus current con-
sumed to either 100 mA or a higher amount, up to 500 mA, in a configuration
supported by the device and requested by the host during enumeration. A
device must also detect the presence of the host’s periodic timing markers and
enter the low-power Suspend state when the markers are absent. While in the