USB - universal serial bus
  USB 1 (1.1) 12 Mb/s or 1.5 Mb/s. 

  Supports 1.5Mb/s subchannel for low speed devices, i.e keyboard, mouse.
    
  USB 2.0 480 Mb/s or 120MB/s.  Backwards compatible.

  Capable of 127 devices per root hub.
    All devices must share the bandwidth.  

    As more devices added, overhead slows interface.
 
    However, different speed devices do not affect each other.
      Bus only slows while slow device putting data on bus.

  Multiple root hubs in PCI slots acceptable.

  Plug and Play - auto-configured on the fly.

  Hot swapable - all devices can be on when connnecting.  

  Requires support of OS.

  Requires a controller card (primary hub).

  Bigest advantage of USB is that the protocol covers all aspects of
    the technology.  Plugs, cables, hubs, voltage levels, signal encoding 
    protocols, timing, interface circuitry and protocols, etc. 
      More complete than firewire.


  Device classes provide a grouping where existing generic drivers may exist
    for a variety of devices, such as printers, audio, HID (mouse), networking,
    etc.
    

http://www-128.ibm.com/developerworks/power/library/pa-spec7.html?ca=dgr-mw27USB 
  
USB - universal serial cables.
  NRZI - no change 1, change 0.

  Cable connectors keyed (shaped) to go in one way.
  Styles
    A - flat - from pc or hub.

    B - to device which may be an extension hub. 
 
    Mini A/B - used to connect compact devices. 
      Same plug - additional line allows devices to indentify if connection
      is type A or B.

    Sometimes intermixed.

  Cable lengths limited to 5M (twisted pair) for high speed 
    and 3M (not twisted) for low.

  4 wire cable
    Pair of transmit/receive data lines

    Power/Ground for low power devices (5 volt).
      .5 - 2.5 Watts.  10 mA to 500mA. (Active hub)
      > .5, use active hub. 

  Data lines used to transmit address, data, and control info.


USB hubs
  Requires a controller card (primary hub).

  Hubs can be used to extend distance.
    Limit of 5 hubs daisy-chained. Max of 30M.

  PC capable of multiple independent hubs.
    Two pcs cannot be hooked together with only USB.

    Special cabling allows 2 hubs or pcs to interact.

  USB-on-the-Go designed to allow peripheral devices to connect to each
    other without a root hub. (2003?)

  Additionally, there are any number of interfaces.  USB to
    parallel (printer)        serial        SCSI
    Ethernet                  TV/Video      Keyboard/mouse.


USB Actions
  New device ids itself as @0

  Root Hub then assigns an available address to it.

  Each device can have up to 16 logical data pipes or channels (each direction)
    for assigned @.

    Think single printer, fax, scanner device.

  Root hub generates a clock frame once a second +/- 0.05 msec.

  Communication between hub and devices done by frames.


USB Frames
  Frame - communication session.

  Frames consist of 1 or more packets.

  Frames can be viewed as a bi-directional session.

  All frames are initiated by hub.

  Subsequent packets within the frame can move between hub and device in 
    either direction depending on specific activity.


Four general types of frames.
  Control - configure devices, give commands, check status.

  Isochronous - used with time sensitive devies - phones, sound. Precise
    time intervals but no retransmit on error.

  Bulk - large data transfers to/from non-time sensitive devices
    e.g printers,  Zip drives.

  Interrupt - USB does not support device initiated interrupts. Master hub
    poles devices for attention need (50 msec) in round robin fashion. 

    "Interrupt" driven devices may be poled more often than other devices.

    One of the reasons for the length limit even with hubs.


Frame contains one or more packets of one or more of four packet types

  Token - from root
    SOF - start of frame.
    IN - poll packet asks device to return certain data.
    OUT - announces that data will be sent to device.
    SETUP - used for configuration.

  Data - bidirectional, up to 64 bytes at a time.
    Sync field 8-bit.
    Packet type id 8-bit.
    Data being moved.
    CRC cyclic redundency check 16-byte.

  Three types of handshaking
    ACK - previous data packet correctly received.
    NAK - error (CRC error detected).
    STALL - busy (wait).