Table of Contents
The USB Wildcard User Guide
The USB Wildcard implements a standard USB (Universal Serial Bus) interface that allows a PC to communicate with Mosaic's embedded computers. This tiny 2" by 2.5" board is a member of the Wildcard™ series that connects to Mosaic controllers .
This document describes the capabilities of the USB Wildcard, tells how to configure the hardware and choose between self powered and bus powered modes, describes how to install device drivers on your PC, and presents an overview of the USB driver software that runs on the Mosaic controller. A glossary of the Mosaic software device driver functions, demonstration program source code, and hardware schematics are presented.
Universal Serial Bus (USB) is a serial port standard that enables reliable communication between electronic devices. It is implemented on a variety of electronic products including personal computers (PCs), digital cameras, printers, keyboards and mice. A USB system comprises a “host controller” (typically a PC) and one or more USB peripheral “devices”. “USB hubs” allow a single host controller to communicate with multiple USB devices. The use of hubs allows configuration of a “star” network topology or a branching tree network structure, subject to a limit of 5 levels of branching and no more than 127 devices per USB host controller.
The USB standard as of the time of this writing is USB 2.0. USB 2.0 devices are backwardly compatible with the earlier USB 1.1 standard.
USB signals are transmitted on a twisted pair of data cables labeled D+ and D−. These use differential signaling to minimize the effects of electromagnetic noise on longer lines. Transmitted signal levels are 0.0 to 0.3 volts for a logical low, and 2.8 to 3.6 volts for a logical high. A VBUS power line (nominally +5V when connected to the USB Wildcard) and a GND (ground) wire complete the 4-wire USB cable. A metallic shield protects the data from electromagnetic interference; the shield is typically grounded only at the host controller (not at the USB peripheral device). Table 1‑1 summarizes the USB cable wiring.
For experts interested in the low level signaling scheme on the USB cable, the USB standard uses NRZI (non-return to zero, inverted) modulation to encode the serial data. The NRZI encoding method does not change the signal for transmission of a 0 data bit, and it inverts the signal level for transmission of each 1 in the data stream. The USB protocol uses bit stuffing: the protocol inserts a logic 0 after each five bits of logic 1, and the USB receiver ignores a 0 following five logic 1s. Fortunately, the USB hardware handles the signaling, so you don’t have to worry about these low-level details.
Table 1‑1 USB cable specification.
USB supports three data rates: a “Low Speed” rate of up to 1.5 Megabits per second (MBit/s); a “Full Speed” rate of up to 12 Mbit/s; and a “Hi-Speed” rate of up to 480 Mbit/s. A device can have a data transfer rate lower than these values and still comply with the standard. Mosaic’s USB Wildcard is implemented using the industry standard FT245BM chip made by FTDI, which can transfer data at rates to 2.4 Mbit/s and complies with the USB 2.0 full speed standard. The end-to-end data throughput is set by the speed with which the Mosaic controller can process the serial data. For controllers based on the HCS12 processor (PDQ Board, PDQScreen, etc.) the throughput is on the order of 320 kilobits per second while the processor is dedicated to USB communications. For controllers based on the older HC11 processor (QCard, QScreen, etc.) throughput is typically on the order of 40 kilobits per second while the processor is dedicated to USB communications.
USB Cables and Receptacles
USB connectors are designed to be simple and robust so they can safely be handled, inserted, and removed without risk of damage. Connectors cannot be plugged-in upside down, and it is clear when the plug and socket are correctly mated. The connectors from incompatible USB devices are themselves incompatible. USB cables are conveniently held in place by the gripping force from the receptacle without the need for the fasteners. A cable length of up to 5 meters per node is supported by the USB standard.
USB connectors are designed such that “hot plugging” will not cause any component damage. The connector construction ensures that the external sheath on the plug makes contact with its counterpart in the receptacle before the four connectors within are connected. This sheath is typically connected via the shield wire to the system ground at the host, allowing otherwise damaging static charges to be safely discharged by this route (rather than via delicate electronic components). After the shield makes contact, the power and ground connections are made, followed by the data connections. This sequence assures trouble-free hot plugging.
Type A and Type B Plugs and Receptacles
The USB standard specifies that each host is equipped with a type “A” receptacle. Each peripheral device is typically equipped with a type “B” receptacle. A standard USB “detachable cable” is configured with a type “A” plug on one end and a type “B” plug on the other. The original USB standard specifies 4-wire cables terminated by plugs containing 4 pins (sometimes referred to as 4 positions) as summarized in Table 1‑1. The full size Type A (host) and Type B (peripheral) receptacles and their pin numbers are illustrated in Figure 1‑1.
Figure 1‑1 Full size Type A and Type B USB receptacles; pin numbers are shown looking into each receptacle.
The USB 2.0 standard adds the use of 5-pin “Mini-B” receptacles and plugs on the peripheral device, and the 5-pin “Mini-A” receptacles and plugs for host devices. The extra pin is for the “USB On The Go” feature that enables a peripheral to optionally act as a host (for example, a digital camera could act as a host when connected to a printer, removing the need for a PC when printing pictures). If the “On The Go” feature is not needed, the extra position is left unconnected on the peripheral device. Table 1‑2 summarizes the 5-pin Mini-B connector pinout, and Figure 1‑2 illustrates the Mini-A and Mini-B plugs.
Table 1‑2 5-position Mini-B USB connector pinout.
Figure 1‑ 2 5 position USB Mini-A (left) and Mini-B (right) plugs showing pin numbers (not to scale).
The USB Wildcard includes a 5-pin Mini-B receptacle, and does not implement the “USB On The Go” capability. Most PC hosts use the full size Type A receptacle. Thus, the most common cable to use with the USB Wildcard has a type A plug that connects to the host PC, and a 5-position type Mini-B plug that connects to the USB Wildcard. This cable is known as a “Type A to 5-pin Type Mini-B USB cable”. Mosaic Industries sells this cable, and it is also available from USB cable vendors.
Note that the USB standard also provides for a 4-pin Mini-B receptacle and plug; these have a different shape and are not compatible with the 5-pin receptacle on the USB Wildcard.
The Series "A" plug which attaches to the PC is approximately 4 by 12 mm, the Series "B" approximately 7 by 8 mm, and the Mini-B plugs approximately 3 by 7 mm.
A comparison of Table 1‑1 with Table 1‑2 shows that most of the pins of a Mini-USB connector are the same as those in a standard USB connector. The exception is the addition of the “ID” pin on the Mini-B connector at position 4. This pin is not connected in a “slave only” device such as the USB Wildcard.
Any cable with a receptacle or with two "A" or two "B" connectors is, by definition, not USB. However, many cable manufacturers make and sell USB-compatible (yet not strictly conforming) extension cables with a Standard-A plug on one end and Standard-A receptacle on one end.
The 5-pin Mini-B receptacle on the USB Wildcard may not meet the needs of some instrument designers who need a panel-mounted USB receptacle. For these cases the 5-pin 0.1” in-line header H4 provides an interface for connecting a Type B panel-mount receptacle.
The following parts may prove useful. Note that these panel mount receptacles are full sized Type B receptacles, not Mini-B receptacles.
Frontx.com part number P1122-012 is a USB Type B panel mount receptacle with a 1-foot cable terminated by a 5-position header that mates directly to H4 on the USB Wildcard. Related parts from Frontx.com include versions with 1.5 foot and 2.5 foot cables. The 5-position connector is not keyed, so be sure to check the orientation before plugging it in. The signal names of the H4 connector are clearly visible on the legend of the USB Wildcard.
L-com.com part number ECJ504B-UB is a Type B panel-mount jack with 10" wire leads. This part is slightly less convenient because it does not include the female 5-pin 0.1" in-line header that mates directly with H4 on the USB Wildcard.
USB peripherals can be "self powered" or "bus powered". Self powered devices supply their own power, while bus powered devices draw power from the USB VBUS wire. The USB standard makes provision for bus powered devices drawing up to 500 mA (milliamps), provided that at startup they draw no more than 100 mA until the peripheral device announces itself to the host on the USB bus. The FTDI chip on the USB Wildcard handles this sequence properly, powering only the USB circuitry until the Wildcard has announced itself, and then gating power from the USB VBUS wire to the +5V bus on the Wildcard and controller stack.
The voltage on the USB VBUS wire may vary from 4.35 to 5.25 volts with respect to the GND line on the USB cable, although most hosts and hubs offer much better voltage regulation than this. In particular, a USB host supplying the lower 4.35V limit may result in processor resets or poor reliability, so make sure to check the voltage levels supplied by the host before relying on the USB bus to power your controller stack.
When shipped from Mosaic, each USB Wildcard is configured to announce itself as a 500mA bus powered USB 2.0 device. This configuration supports either powering mode, as it is permissable to announce the peripheral as a bus powered device and then not draw the current from the USB bus.
Note that up to 500mA of current is available from a host port or a self-powered hub, but not from a bus-powered hub. A bus-powered hub can draw up to 500mA from its upstream host, and can supply at most 100mA to each of four downstream USB peripherals. Please keep this in mind if you are counting on bus power to supply the current needs of the Mosaic controller circuitry.
See the section below titled "Self Power/Bus Power Jumper" for more information about the powering modes.
Home|Site Map|Products|Manuals|Resources|Order|About Us
Copyright (c) 2006 Mosaic Industries, Inc.
Your source for single board computers, embedded controllers, and operator interfaces for instruments and automation