Serial Port Complete - Latest Microcontroller projects

(lily) #1

Chapter 14


Suspend state, the device must limit its current consumption and monitor the
bus, exiting the Suspend state when bus activity resumes.


  • Respond to requests sent by the host during and after enumeration.

  • Perform error checking.

  • Exchange data with the host. A virtual COM-port device receives COM-port
    data from the host and sends COM-port data as needed to the host.

  • As needed, send and receive COM-port parameters and status and control
    information.


!


The USB 2.0 specification defines three bus speeds: high speed at 480 Mbps,
full speed at 12 Mbps, and low speed at 1.5 Mbps. USB devices in the commu-
nication devices class must support full speed, high speed, or both. Almost all
high-speed devices also support full speed because adding support for full speed
is rarely difficult and enables the device to work when attached to full-speed
hosts. USB hosts in recent PCs support all three speeds.
The bus speeds describe the rate that information travels on the bus. The theo-
retical maximum data-transfer rate for the bulk endpoints used on most virtual
COM ports is 1.216 Megabytes/s at full speed and 53.248 Megabytes/s at high
speed. The real-world maximum throughput is less and varies with the pro-
gramming on the host and device, the hardware capabilities of the host and
device, and how busy the bus is.

0   


All bus traffic travels to or from device endpoints. An endpoint serves as a
buffer for received data or data waiting to transmit. Typically an endpoint is a
block of data memory or a register in the device controller.
Every device must implement endpoint zero, which is bidirectional. A device
can have up to 30 additional endpoint addresses. Each of these endpoint
addresses has a number (1 to 15) and direction (IN or OUT). The direction is
defined from the host’s perspective: an IN endpoint provides data to send to the
host and an OUT endpoint stores data received from the host. Device hardware
or firmware configures each endpoint address for a specific USB transfer type
and direction. The number of available endpoints varies with the device con-
troller. A USB virtual COM port typically uses three endpoint addresses in
addition to endpoint zero.
Free download pdf