Wednesday, December 5, 2012

USB: Universal Serial Bus … or, as I call it, the Ubiquitous Serial Bus.

Because we spend so much time in our pickup truck … it’s the only vehicle we’ll let our dog ride in due to her steady shedding of hair. (We’re just lucky that dog hair doesn’t cause global warming or the arctic would be the new Tahiti.) … Anyway, we spend a lot of time in the truck, so I put a couple of phone chargers in the glove box.

My iPhone is one of the new varieties that require the Lightning adapter. I had previously purchased an auto “cigarette lighter” device with a couple of USB ports to provide power, and put one of the rather expensive, new, Apple Lightning cords in the glove box. My wife’s phone using a USB charging cable, and I had grabbed one I thought would work out of my collection of cables: all types, all sizes, all colors, and all ready to go. Unfortunately, I had put a “mini” USB cable in the glove box, not a “micro” USB cable which her phone requires. I quickly rectified that mistake at our next visit to homebase, and now we’re merrily talkin’ and chargin’ our way down the highway. Watch for us in the white truck with the spotted dog.

That got me thinking about the USB standard and how it has changed things. In the early PC days, there were many, many ports on the computer to connect devices. Then, along came the USB standard, and they were all replaced by one.

However, we went from too many “ports” to too many “receptacles.” Receptacles are the “holes” you plug a USB “plug” into. When the USB system first came out, there were just two kinds of plugs and receptacles. The familiar, flat, about one-inch wide plug that is reminiscent of a duck’s bill and the rather square plug you usually found on the other end of the cable. The “duck bill” is called a type “A” and is what you usually find as the USB connection on most computers. The rather square one is called a type “B” and is often found on printers, scanners, and other early USB peripherals – that is the devices that were connected to the computer.

However, there is a variety of smaller USB connectors designed to work on small devices such as portable music players … not iPods, they have their own, proprietary connectors … the older “30-pin” connector and the new Lightning connector … or on smart phones … again not the Apple variety.

Let’s start at the beginning. Take yourself back to the mid-nineties. Computers were catching on in homes and businesses, and all kinds of new devices to plug into computers were coming on the market. At that time there were several ways to plug those peripheral devices into the computer. The serial port, a receptacle about two inches wide with a double row of connections surrounded by a metal shell called a “D-shell.” Remember those? They usually had two screws to securely connect them to the computer or device. Plus there was the “parallel port,” similar to the serial port, but wider. It was used most often to connect to printers. There were also special ports for keyboards and mice, often called the PS/2 ports because IBM had them in their second generation computer family. There were also audio plugs and video ports, and possibly other special connections such as telephone or ethernet cable.

At issue wasn’t so much a problem of how many different ports there were on the back of the computer, but rather a competition of devices to connect to those ports. The serial port was most often used to connect to a modem so you could dial up servers and even the early Internet. That was the hay-day of AOL, and everyone got a diskette in their mail every two weeks with a free offer to join. Typically a printer hogged the parallel port. But then people started to get scanners. They also used the parallel port. Now what?

A common solution was for scanners to add a second receptacle and you would plug the scanner into the computer via the parallel port cable and then plug a second cable into the scanner’s second connector for the printer. This would work, but often with difficulties. If you turned the scanner off while printing, that could mess things up, for example. This type of connection (or in fancy, computer talk, a “network”) is called “daisy chaining.” I could imagine a person with several printers and other devices and each one was connected on a long line of daisy chained cables.

Or, you could buy a switch box to switch from, say one parallel attached printer to a second printer. Sadly, you often had to reboot after switching the box to get the new printer recognized.

On the horizon were dozens of new devices that you would want to connect to your computer from smartphones to music players to digital cameras to … you finish the list. There were also software limitations to the number of devices. There are very limited number of ways to attach the peripheral devices in the original IBM PC software implementation due to the requirements such as non-shareable IRQ lines and I/O (Input/Output) address space. IRQ was the way the operating system would be “interrupted” by a request from an external device and memory address mapping was the primary method to send data to devices such as graphic displays, modems, and printers.

So, a group of computer manufacturers, including IBM, DEC, NEC, Compaq, Intel, Microsoft … and later joined by HP, Lucent, and Phillips … developed the Universal Serial Bus. They established the USB Implementers Forum, Inc. (USB-IF) as a non-profit corporation to publish the specifications and provide a support organization and forum for the advancement and adoption of USB technology.

The design of USB is standardized in Universal Serial Bus Specification that provides the technical details to understand USB requirements. The specification describes the bus attributes, the protocol definition, types of transactions, bus management, and the programming interface required to design USB compatible peripherals and software. USB Specifications and all related documents may be downloaded from USB Implementers Forum web site.

Versions of USB specification:
  • Revision 1.0 released on January 15, 1996, introduced a low-speed transfer rate of 1.5 Mbit/s and a full-speed transfer rate of 12 Mbit/s.

  • Revision 1.1 released on September 23, 1998, introduced the improved specification and was the first widely used version of USB.

  • Revision 2.0 released on April 27, 2000. The major feature of revision 2.0 was the addition of a high-speed transfer rate of 480 Mbit/s.

  • Revision 3.0 released on November 17, 2008, brings significant performance enhancements to the USB standard while offering backward compatibility with the peripheral devices currently in use. Legacy USB 1.1/2.0 devices continue to work while plugged into new USB 3.0 host and new USB 3.0 devices work at USB 2.0 speed while plugged into USB 2.0 host. Delivering data transfer rates up to ten times faster (the raw throughput is up to 5.0 Gbit/s) than Hi-Speed USB (USB 2.0), SuperSpeed USB is the next step in the continued evolution of USB technology.
USB is designed to allow many peripherals to be connected using a single standardized interface. It provides an expandable, fast, bi-directional, low-cost, hot-pluggable, Plug and Play serial hardware interface that makes the life of the computer users easier allowing them to plug different peripheral devices into a USB port and have them automatically configured and ready to use. Using a single connector type, USB allows the user to connect a wide range of peripheral devices, such as keyboards, mice, printers, scanners, mass storage devices, telephones, modems, digital still-image cameras, video cameras, and audio devices to a computer.

USB devices do not directly consume system resources. They are not mapped into I/O address space, nor do they use IRQ lines or DMA channels. The only system resources required by a USB system are the memory buffers used by the USB system software. Due to its success and widespread acceptance, USB became the 'de-facto' industry standard for connecting peripheral devices to PCs and laptops.

USB has the following key features:
  • Single connector type: USB replaces all the different legacy connectors with one well-defined, standardized USB connector for all USB peripheral devices, eliminating the need for different cables and connectors and thus simplifying the design of the USB devices. So all USB devices can be connected directly to a standard USB port on a computer.

  • Hot-swappable: USB devices can be safely plugged and unplugged as needed while the computer is running. So there is no need to reboot.

  • Plug and Play: Operating system software automatically identifies, configures, and loads the appropriate device driver when a user connects a USB device.

  • High performance: USB offers low speed (1.5 Mbit/s), full speed (12 Mbit/s) and high speed (up to 480 Mbit/s) transfer rates that can support a variety of USB peripherals. USB 3.0 (SuperSpeed USB) achieves the throughput up to 5.0 Gbit/s.

  • Expandability: Up to 127 different peripheral devices may theoretically be connected to a single bus at one time. (And computers can have more than one bus.)

  • Power supplied from the bus: USB distributes the power to all connected devices eliminating the need for external power source for low-power devices. High-power devices can still require their own local power supply. USB also supports power saving suspend/resume modes.

  • Easy to use for end user: A single standard connector type for all USB devices simplifies the end user's task at figuring out which plugs go into which sockets. The operating system automatically recognizes the USB device attachment and loads appropriate device drivers.

  • Low-cost implementation: Most of the complexity of the USB protocol is handled by the host, which along with low-cost connection for peripherals makes the design simple and low cost.
Now, to me, one of the greatest benefits of the USB specification is that it provides for a standard source of power and a specified voltage (5 volts). That is because the other thing that was proliferating at that time was the various power connectors. Every time you bought a new phone, you had to invest in a whole new power infrastructure from wall chargers to car chargers to solar chargers: each a different voltage and plug type. Most were unmarked, black boxes, so soon you had a drawer full of power adapters with no idea which device they were intended for or if you even still had that device!

Not only did USB specification standardize computer communications to devices, it started to standardize power adapters. That, of course, led to small devices, which also strengthened the need for various size connectors. So maybe the proliferation of USB connection types isn’t so bad after all.

Really, there are only three basic sizes, all of which come with two connectors. Although most USB devices have a normal size type “A” plug on one end, the other end may have a type “B” or a “mini-B” or even the slightly smaller “micro-B.” There are also “mini-A” and “micro-A” for very small computers … or other “hosts.”

Here’s a little chart and picture to help separate the different kinds of plugs and receptacles.

You will notice that the largest of these connectors has four wires. It is a very simple design. One wire is for power or VBUS and one is for ground (GND). The other two are used to carry the data signal as a twisted pair of balanced transmission wires (differential pair D+ and D-). As stated earlier, the VBUS carries +5 volts, give or take a small percentage. The miniature connectors have an additional pin used to identify “host” or computer from “slave.” It isn’t needed in the large version because the type-A is always the host and the type-B is always the slave or peripheral.

The USB design has been a great success. There was competition. The Institute of Electrical and Electronics Engineers or IEEE had developed a high speed bus design called variously IEEE 1394 (the specification number) or FireWire by Apple or, by Sony, i.Link. FireWire predates USB and had a higher transmission speed from the get-go. It also had more power in both voltage and current capability. In fact, the early USB specifications didn’t even require that power be provided. As USB designs increased speed, the IEEE specification kept pace leading to the faster FireWire-800 and calling the original FireWire “400.”

Primarily due to the higher speed of FireWire, it was used extensively for large data needs such as video cameras and connection to external hard disks or other storage devices. However, USB 2.0 is adequate for these uses and USB 3.0 is as good as FireWire, so we are starting to see FireWire ports disappear from most computers.

Like USB, the FireWire standard continues to expand, increasing speed and adding features. However, typically, FireWire connectors are more expensive. On the other hand, the standard allows more sophisticated implementations.

Apple has developed recently a proprietary interface called Thunderbolt that furthers the decline of FireWire from the company that most championed the standard, largely due to Apple’s commitment to media and video.

Ironically, video and display technology has led to a further and recent increase in interface devices adding HDMI to the already crowded computer monitor connection types while standards like the new Thunderbolt from Apple are merging USB and FireWire type uses with video connections to displays and televisions. Perhaps, at some point int he future, computers will only have one type of external connection for everything from Internet to peripheral devices to the display. It’s Déjà Vu all over again.

There are also the extensions to the original USB design. These are USB On-The-Go (OTG) and Certified Wireless USB. USB On-The-Go allows connecting portable peripheral devices to each other directly without having to connect to a PC. Certified Wireless USB is a wireless radio communication protocol that combines the ease-of-use of USB with the convenience of wireless technology. Like standard USB, the USB-IF organization also maintains the Compliance Program for OTG and Wireless USB devices.

So, the only thing that is constant is change, and the future will undoubtedly contain additional new ways to connect digital hosts. Wireless is quickly replacing wires and devices continue to shrink. How will you download the music to your new digital watch or update the software in the new sunglass / digital audio-video device of the future? And I don’t even want to talk about the digital rectal thermometer.

Chances are the Ubiquitous Serial Bus standard in one form or another will be part of that future. Yes, it is true, the future’s so bright I gotta wear shades.

No comments:

Post a Comment