Kinetek Systems Inc.

Custom USB and Wireless USB Hardware and Firmware Development

Examples of our USB hardware and firmware development

USB has become the common link between embedded devices and the PC. Some recent medical, military and commercial projects we have completed using USB and wireless USB technology are:

Remote Weapons Platform

Remote Weapons Platform


If you just need a little glue logic, help partitioning
your system or if you need a timing critical parallel
processing hardware core, please contact us.

Call Today for a Free Estimate
303-444-8486 x27

sales@kineteksystems.com

USB Compatible Wireless Gyroscopic Sensor System

USB Compatible Wireless Gyroscopic Sensor System

Trans-Blood Vision Camera Catheter

Trans-Blood Vision Camera Catheter

What is USB?

USB (Universal Serial Bus) is a high speed bus for connecting peripheral devices to a host computer. Common USB devices are mice, keyboards, disks, printers, scanners, camcorders, digital cameras, scientific instrumentation and data acquisition equipment. Up to 127 peripheral devices can connect to a single host using a tiered star topology with hubs. Note! See the glossary of terms and acronyms at the end of this document.

USB Topology Pyramid

Purpose

This document is organized as three sets of questions to help you discover if USB is suitable, and if so then to create a high-level USB specification.

  • In question set 1 you to determine if USB is suitable from a business viewpoint.
  • Question set 2 leads you to determine if USB is suitable from a technical viewpoint.
  • The answers to question set 3 provide a high level specification for your USB interface needs.

Is Adding USB Good for Business?

The questions in this section are more for you to answer for yourself and your company.

  1. What is your current situation with respect to a USB interface?
  2. Are customers requesting USB? Are you losing sales because you don't have USB?
  3. What will be the effect of not providing USB?
  4. If you do nothing, will the situation get worse?
  5. Does this situation need to change? Is there a demand for improvement?
  6. You can get a USB interface. There are several companies that specialize in USB development?
  7. Help is right here. The following questions get you started with a high level specification.

Is USB a Technical Match for Your Product?

That depends on your answers to the following questions.

  1. What is the distance from the host to the furthest USB device?
    1. 5 meters or less. You can use a standard USB cable.
    2. 30 meters or less. You can extend the length up to 30 meters with hubs and/or active cables.
      Host <- 5m -> Hub1 <- 5m ->Hub2 <- 5m -> Hub3 <- 5m -> Hub4 <- 5m -> Hub5 <- 5m -> Device
    3. Greater than 30 meters. USB is not suitable for your product.
  2. What is the maximum throughput you need? USB supports three bit rates called SLOW (1.5Mb/s), FULL (12Mb/s) and HIGH (480Mb/s). There is packet and protocol overhead so the actual data throughput is less in each case. Hubs introduce delays and reduce throughput. Additional devices on the bus reduce throughput.
    1. < 1.5Mbs is designed for mice, keyboards, measurements from sensors.
    2. < 12Mbs is designed for audio, Flash memory drives, data acquisition.
    3. < 480Mbs is designed for video, disks, printers, scanners, etc.
    4. > 480Mbs. USB is not suitable for your product.
  3. How many devices need to be connected to a host?
    1. 1 or 2. You can connect directly to most computers which have 1 to 6 USB host ports.
    2. 7 or so. You need to use a hub.
    3. 127 or less. This requires many hubs. 127 is the limit of USB ports per controller.
    4. >127. Many computers have several USB controllers so 254 devices are possible.

If your application passes the limits for cable length, throughput and number of devices then USB can work for your product.

Specify a USB Device

Your answers to these questions form a high level specification for a USB product.

Overview of Product

  1. Is the product to be a device, hub or host?
    1. A device connects to a host computer or a hub. Examples are a mouse, disk, instrument, data acquisition, etc. A device may receive data from a host or provide data to a host.
    2. A hub expands the bus so more devices can be connected to a host.
    3. A host is usually a PC, Mac, Linux box, etc. The host is the bus controller and initiates all communication.
  2. Briefly describe your planned USB device.
    1. What is the device? What does it do?
    2. What are the USB device outputs to the USB host?
    3. What are the USB device inputs from the USB host?
  3. Is the USB cost a significant part of the product cost?
    1. Yes, the product is similar to a mouse or some other low cost device.
    2. No, the product is expensive and USB is an insignificant cost.
    3. Not sure or somewhere in between.

USB Hardware and Power

  1. What USB speed is required?
    1. High Speed - 480 Mbits/s
    2. Full Speed - 12 Mbits/s
    3. Low Speed - 1.5 Mbits/s
  2. Do you want to add USB connectivity as a retrofit, redesign, or new design?
    1. For an existing product with a serial port you can add an external serial port to USB converter. There are parallel port to USB converters also. Device drivers make the USB port look like a virtual COMM port. This can be the lowest development cost.
    2. For redesigns and new designs where you layout a new circuit board there are a number of USB chips and USB microcontrollers available.
  3. What is the USB silicon?
    1. Microcontroller with built-in USB hardware. This is a good solution for simple cost sensitive products.
    2. Use external USB chip when a chosen microcontroller does not have built-in USB.
    3. USB on an FPGA is good when there is space on an existing FPGA.
    4. Converter chip from serial or parallel to USB mounts on your PCB.
    5. Stand-alone dongle type USB converters are off-the-shelf devices that convert RS-232, RS-485 or parallel ports to USB. These direct connections to legacy devices come with "virtual comm port" drivers.
  4. How is the device powered or what is the USB power class? The USB cable has the 5V VBUS line to provide device power.
    1. Low-power bus-powered functions: All power to these devices comes from VBUS. They may draw no more than 100mA at any time.
    2. High-power bus-powered functions: All power to these devices comes from VBUS. They must draw no more than 100mA at power-up and may draw up to 500mA after being configured.
    3. Self-powered functions: May draw up to 100mA from VBUS to allow the USB interface to function when the remainder of the function is powered down. All other power comes from an external source.
    4. Can the device be suspended when the system goes into low-power mode?
  5. What connector style do you plan to use?
    1. B-Connecter - This is the original larger connector that you may have seen.
    2. Mini-B - This smaller connector is designed for OTG mobile devices such as phones and palms and pocket PCs.

Protocol Questions

  1. Which data transfer modes are required? There are four transfer modes: Control, Bulk, Interrupt and Isochronous. All devices use the Control transfer and may use one or more of the others.
    1. Bulk transfers are non-periodic, large burst communications typically used for a transfer that can use any available bandwidth and can also be delayed until bandwidth is available. Disks, printers and scanners are examples.
    2. Interrupt transfer characteristics are small data, non-periodic, low-frequency, and bounded-latency. They are typically used to handle service needs. Mice and keyboards are examples
    3. Isochronous transfers are used when working with isochronous data. They provide periodic, continuous communication between host and device. Streaming audio and video are examples.

Device Class Questions

For the purposes of USB, a device class is a group of devices (or interfaces) which have certain attributes or services in common. Typically, two devices (or interfaces) are placed in the same class if they provide or consume data streams having similar data formats or if both devices use a similar means of communicating with a host system.

  1. Does the product fit into an existing device class? The existing classes are:
    1. Audio - The Audio Device Class applies to all devices or functions embedded in composite devices that are used to manipulate audio, voice, and sound-related functionality.
    2. Chip/Smart card - This class specifies a protocol by which a host computer interacts with Chip cards and Smart cards, or with an interface to these devices. Neither the mechanics of the interface, nor the content of the data is of significance in this specification. This class specifies the USB-related configuration information and communication channels.
    3. Common class - This class serves as a guideline for the development of USB class specifications, as well as defining common class capabilities. As such, it defines how devices and interfaces using the class or common capability are to be implemented and how developers of generic or adaptive device drivers will interact with compliant implementations.
    4. Communications - Given the broad nature of communication equipment, this specification defines an architecture that is capable of supporting any communication device. Telecommunications devices are: analog modems, ISDN terminal adapters, digital telephones, and analog telephones. Networking devices are: ADSL modems, cable modems, 10BASE-T Ethernet adapters/hubs, and "Ethernet" cross-over cables.
    5. Content security - The need for the protected and controlled distribution of digital content is the basis of the USB Content Security Interface (CSI).
    6. Device Firmware Upgrade - This class is used by any device to provide the ability to upgrade the firmware of those devices.
    7. Human Interface Device (HID) - consists primarily of devices that are used by humans to control the operation of computer systems.

      Typical examples of HID class devices include:

      1. Keyboards and pointing devices—mouse, trackball, and joystick.
      2. Front-panel controls—knobs, switches, buttons, and sliders.
      3. Telephones, remote controls, games—data gloves, throttles, steering wheels, and rudder pedals.
      4. Data in a similar format to HID devices—bar-code readers, thermometers, or voltmeters.
    8. Image - This class includes Still Image Capture Devices such as digital still cameras.
    9. IrDA - This class specifies a USB IrDA Bridge device.
    10. Mass storage - Disks such as flash, hard, CD, DVD, Floppy, and tape drives.
    11. Monitor - This class focuses on the management and control of a monitor's brightness, contrast, size and position, as well as internal settings used to adjust the performance of the monitor for different video adapter modes.
    12. Open USBDI (Open Universal Serial Bus Driver Interface) - This class defines a standard driver interface to facilitate use on different host operating systems.
    13. Physical Interface Device (PID) - This is an extension of the HID class for devices that require "real time" physical feedback. The main focus for the definition is for the use of haptic devices and the implementation of force feedback systems.
    14. Power - Examples are batteries, chargers, power supplies, power converters, outlets, and uninterruptible power supplies.
    15. Printer - Class for printers.
    16. Test & Measurement - This class includes:
      • Minimal devices. Such as ADCs, DACs, sensors, and transducers.
      • Devices that communicate with IEEE-488 messages.
      • Devices with sub-addressable components such as mainframes with instrument cards.
    17. Video - This class is for streaming video devices such as web cams, digital camcorders, analog video converters, and TV tuners.

Logo and Compliance Questions

  1. Do you want to use the USB logo? If so then how will you get USB-IF Compliance testing?
    1. Independent test labs.
    2. USB-IF Sponsored Compliance Workshops are three days and take place once a year.
    3. WHQL (Windows Hardware Quality Labs)
  2. You need a USB Vendor ID and User ID for driver selection. If you aren't already a USB vendor, there are two preferred options for doing this. See www.usb.org.
    1. Become a member of the USB-IF (Implementers Forum). Among the many benefits of being a member is the assignment of a vendor ID to your company (if one has not been previously assigned). Membership fee is $2500 per year.
    2. Become a USB-IF non-member logo licensee. Logo licensees are eligible to use the USB logo in conjunction with products that pass USB-IF compliance testing. In addition, a vendor ID is assigned to your company if one has not been previously assigned. The logo administration fee is $1500 for a two-year term (this fee is waived for USB-IF members). Note, this is also available without the logo license for products without compliance testing.

What's Next?

Kinetek can develop USB interfaces and device drivers for your product. Send us a filled out questionnaire and we will provide you with a free estimate. We may need to contact you for clarification and additional details. We will sign a nondisclosure agreement upon request.

USB Specifications

USB Development Tools

  • Windows Driver Development Kit (DDK)
  • Mac USB Software Development Kit (SDK)
  • Demonstration or evaluation board for your USB microcontroller or USB chip
  • Compiler for the microcontroller being used.
  • Emulator
  • USB Protocol Analyzer
  • USBCV compliance test tool
  • Sample USB software

Glossary of Terms and Acronyms

ADC - Analog to Digital Converter.

ADSL - Asymmetric Digital Subscriber Line is digital telecommunications with much faster data transmission from server to client and slower from client to server.

Bulk Transfer - USB transfer characterized by non-periodic, large communication bursts that use any available bandwidth and can delay until bandwidth is available. A disk is an example. See also Control, Isochronous and Interrupt transfers.

Composite device - A device with more than one function. A DVD player is an example because it has audio and video and therefore has a Audio Class and a Video Class.

Control Transfer - All USB devices support Control transfers. They allow the host to send device configuration and commands and receive device status. See also Bulk, Isochronous and Interrupt transfers.

DAC - Digital to Analog Converter

Device - A USB device is either a peripheral that performs one or more functions, or a hub.

Enumerate - process of configuring the bus. It occurs when the bus starts or a device is hot-plugged or unplugged from the bus.

FPGA - Field-Programmable Gate Array is a programmable logic chip with thousands of gates. Function - A function is a USB device that is able to transmit or receive data or control information over the bus and provides a capability to the host.

Haptic - is the application of tactile sensation to human interaction with computers. Haptic devices provide information to the computer and also receive information from the computer in the form of a felt sensation on some part of the body.

Host - The host computer with its operating system and USB hardware. The host is the USB master and originates all communications.

Hub - is a special device to expand the USB bus. Hubs are responsible for the removal and addition of USB devices connected to them. Hubs are either self-powered or bus-powered and provide power control of the devices under them.

IrDA - Infrared communication commonly used with Palms and printers.

IEEE-488 - An 8-bit parallel bus commonly used with test equipment. Also called General Purpose Interface Bus.

Interrupt Transfer - This transfer handles the problem when a device has data for the host. The host periodically polls the device which can respond with data or with a NAK (no data to send.) Data transferred is small, non periodic and low frequency. The periodic poll gives guaranteed latency. A mouse and keyboard are examples. See also Bulk, Control and Isochronous transfers.

ISDN - Integrated Services Digital Network. Digital telecommunications lines that transmit both voice and digital data at rates up to 128Kbits.

Isochronous Transfer - provides periodic, continuous communication between host and device. Streaming audio or video are examples. See also Bulk, Control and Interrupt transfers.

kb - kilo-bits or 1 thousand bits.

Mb - mega-bits or 1 million bits.

OTG - On-The-Go is an extension to the USB spec for portable devices. An OTG device is a USB peripheral with limited host capabilities.

USBCV - is the compliance test tool which evaluates High, Full and Low-speed USB devices for conformance to the USB Device Framework, Hub device class, HID and OTG specifications.

USB-IF - USB Implementers Forum Inc. is a non-profit corporation to provide a support organization and forum for the advancement and adoption of Universal Serial Bus technology. The Forum facilitates the development of high-quality compatible USB peripherals (devices), and promotes the benefits of USB and the quality of products that have passed compliance testing.

VBUS - The USB cable has VBUS and GND wires to deliver power to devices. VBUS is +5 V at the source.