Go to the CD home page

1998-11-09, BG9807,
Technical Backgrounder From Philips Semiconductors

Universal Serial Bus Backgrounder from Philips Semiconductors

Introduction

The concept of "plug and play" enables new cards to be easily added inside a computer, but adding peripherals outside the actual case involves a confusing mix of cables, connectors and drivers (see diagram 1). The Universal Serial Bus (USB) standard has been designed to solve this problem by providing a medium-speed bus with a bandwidth of 12 Mbits/s so that mice, keyboards, monitors, loudspeakers, scanners, joysticks, set-top boxes, telephones, printers, etc. can all be simply connected to the PC using a standardized cabling system.

Diagram 1: PC connectivity vision
 
Diagram 1

What are the limits to USB?
The only limit to USB is that it cannot handle the bandwidth required for uncompressed live video, as no single USB device can have more than 6 Mbits/s total bandwidth. Compressed video streams, such as those from videoconferencing cameras (using H.320) and MPEG1, fit well within USB, as do images from still cameras. MPEG2, however, can only be handled when a system does not have too many active devices, as it requires the full 6 Mbits/s bandwidth to maintain a high picture quality.

For the higher throughput requirements of MPEG2 and DVD, the (Internet access required) IEEE1394 standard was devised. Standards for 100, 200, and 400 Mbits/s were approved by the IEEE as far back as 1995, and it is roadmapped up to 1600 Mbits/s. However, IEEE1394 is not designed to replace USB but to work alongside it: USB handles low- to medium-speed applications, whilst 1394 is reserved for high-speed applications. Philips Semiconductors has physical and link layer devices available for IEEE1394.

USB is happening
Today, high-end PCs often have one or more USB connectors and many other PCs have USB support built into the motherboard. There is also an increasing number of USB-equipped devices available such as monitors, and this means that USB is slowly becoming the de-facto standard - especially as the cost for OEMs of adding these connectors is very small, because it only involves putting two small connectors onto the board with the rest of the USB implementation being done in software.

As it is the operating system itself that recognises the devices connected over the USB, Microsoft's commitment to supporting USB in Windows has given USB a big push. USB drivers are now available for Windows '95 and Windows NT and are integrated into Windows '98.

Philips Semiconductors has always been at the forefront of USB developments, continually demonstrating innovative industry-first solutions. It is actively contributing to the standardization process, as author of the USB Audio Device Class specifications, member of the hub and communications committee and review member of the Infrared Data Association (IrDA) committee.

Philips Semiconductors' was the first company to launch a basic USB transceiver (Product info on PDIUSBP11 PDIUSBP11) and a complete hub device, the Product info on PDIUSBH11 PDIUSBH11. These were developed at Philips' Asia Product Innovation Center which is responsible for development of the 'FlexiUSB(TM)' range of hub and interface ICs; dedicated devices with embedded USB functionality for audio, monitors, imaging and PC peripherals are being developed by other Philips groups around the world. A USB competence centre has been established in Belgium - Philips' International Technology Centre Leuven (ITCL) - which serves Philips Electronics directly and customers via Philips' global sales and applications support organizations. For example, Business Electronics and Consumer Electronics have used this competence to help develop USB digital speakers and USB equipped monitors.

How USB works

Up to 127 devices can be connected to one PC
Hubs are used to provide branching with one upstream port and a number of downstream ports. The convention is that those ports going towards the computer are "upstream" whilst those going away are "downstream", with upstream type connectors being square to differentiate them from rectangular downstream connectors. All interconnecting cables have a square upstream connector at one end and a rectangular downstream connector at the other, so it is impossible to connect things the wrong way round. Hubs can be either bus powered, in which case they can supply each of the downstream devices with up to 100 mA each, or self-powered, i.e. with their own power source, and can supply each downstream device with up to 500 mA.

The monitor is the perfect place to build in a USB hub as the keyboard, mouse, printer, scanner, etc. can all be easily plugged into them as they are on the user's desk - unlike the PC which is usually on the floor. Having a USB-compliant monitor also enables all the controls on the monitor to be adjusted, including brightness, contrast, and colour balance, from the keyboard over the USB.

Types of cables
Each connector has four wires for Vcc, Ground, D+ and D-, providing power for low power devices and the two data connections. There are two types of cable: non-shielded cable is capable of handling 1.5 Mbits/s and is designed for low demand applications such as keyboards, joysticks and mice; shielded twisted pair cable is capable of handling 12 Mbits/s and is used for all the other applications. These are differentiated electrically using a static reporting mechanism whereby the high speed version has D+ high and the low speed version has D- high. The USB standard limits the maximum cable length to five metres (see diagrams 2 and 3).

Diagram 2: The physical configuration of USB
 
Diagram 2

Diagram 3: The logical connection of USB
 
Diagram 3

When the physical connections of devices and hubs are resolved down to the logical connection, every device has a direct route to the PC or host in what is called a tiered star topology, i.e. connections are always PC to device or device to PC and never device to device.

How does the PC work out all the addresses for all the devices connected over the USB? Whenever the PC is switched on, every device and hub connected to the USB assumes the address #0 and all downstream connections are disabled. The PC then interrogates the USB and finds the first device, say, a hub. It allocates the address #1 to this hub and activates the first of its downstream connectors. It then interrogates down this connection to find the next device or hub, which is still set at address #0, and allocates it address #2. The process continues with each device or hub being identified in turn and allocated a unique address number until they are all found or the limit of 127 is reached. At the same time as allocating an address number, the PC also determines what device drivers should be loaded for each device.

The beauty of this system is that it enables devices to be added or removed without turning off the PC or upsetting the existing configuration - "hot plug-n-play". A new device automatically has the address #0, as it has just been powered up, and the computer simply determines what it is, loads the appropriate drivers and allocates a previously unused address number. The removal of a device is noted by the computer as a non-responding device and its address number is put back into the list of available addresses.

Packets and transfers
Each packet contains a 7-bit address that identifies the target device. In addition, there is a 4-bit Endpoint address and an I/O bit, giving 16 in and 16 out Endpoints - each of which are addressable buffers within the device for, say, volume, overload warning, brightness, etc.

There are four types of transfer over the USB. The first is Control, which is bi-directional, and is used to set up the USB structure and address allocation. The second is Interrupt which provides a time-critical, uni-directional link from the device to the host PC for a mouse, keyboard or joystick. The third, Bulk, has a variable bandwidth, which is adjusted by the host PC depending on the amount of traffic on the USB and is used for devices such as a scanner or printer, where delivery of data is not time-critical. The fourth is Isochronous and has a fixed bandwidth that is pre-negotiated with the host PC for devices that must have a certain bandwidth available at all times, such as an audio or MPEG1 stream, and has bounded latency, i.e. there is a maximum permitted delay in the signal. Bulk and Isochronous are uni-directional links but can be either from the computer to the device or vice versa (see diagram 4).

Diagram 4: Frame build-up for each millisecond time frame
 
Diagram 4

Control always has at least 10 % of the frame. Interrupt and Isochronous have fixed bandwidth allocation, whilst Bulk is dynamically allocated depending on the job in hand. Each frame is 12 kbits wide.

The USB protocol contains error recovery and correction techniques to ensure that all data transfers over the USB are correct, with an acknowledge signal sent back if a packet is received safely. There is also guaranteed delivery, i.e. the system keeps trying to send a packet until it is received correctly or until the operation times out and a fault is reported on screen.

The exception to this is Isochronous traffic which, by its very nature, is time-critical. For example, re-sending a packet of sound data would put it out of sync, so a faulty transmission is ignored. In reality, this is a rare occurrence and for an audio stream, is unlikely to be noticed, especially with the necessary error detection and correction mechanisms in place.

USB devices
Philips Semiconductors offers two approaches to integrating our USB products into peripherals. The innovative FlexiUSB architecture provides unprecedented design flexibility and the cost efficiency required for fast, successful implementation of USB in PC peripherals, especially when adding USB functionality to existing designs. Complementing these devices is a growing range of devices with embedded USB functionality, providing simple dedicated and efficient single-chip design-in solutions for specific applications.

FlexiUSB
Philips Semiconductors' USB Interface ICs are cost- and feature-optimized second generation solutions which all conform to the USB Specification Rev 1.1 and are fully compliant with most device class specifications. Moreover, they incorporate a number of other features including a programmable clock output, low frequency crystal oscillator and integrated termination resistors, and additional embedded functions.

These ICs include the GoodLink(TM), SOFTCONNECT(TM) and LazyClock(TM) features. GoodLink allows a quick visual check of whether peripherals connected to the hub downstream ports are working properly, delivering significant cost savings in user support 'hotline' costs, while SOFTCONNECT provides an extra level of peripheral control to the host connection. LazyClock keeps a very low clock frequency during suspend mode which results in a very low 'suspend' power consumption, allowing easy design of peripherals which comply with OnNow and USB power management requirements.

Philips currently has two hub ICs available: the Product info on PDIUSBH11A PDIUSBH11A, a compound USB hub with four downstream ports and three embedded functions; and the Product info on PDIUSBH12 PDIUSBH12 hub which supports two downstream ports and three embedded functions. In addition it has a range of USB interfaces: the Product info on PDIUSBD11 PDIUSBD11 with a 1 Mbits/s serial interface for low-end computer monitors and keyboards; and the Product info on PDIUSBD12 PDIUSBD12 with a 2 Mbytes/s parallel interface, a high performance USB function device ideal for many peripherals such as printers, scanners, external mass storage devices (e.g. Zip drives), digital still cameras, etc. It offers an immediate cost reduction for applications currently using low-end SCSI implementations and a low operating power allows implementation of bus-powered peripherals. Finally, the PDIUSBD10 is a low-cost variant of the PDIUSBD11 for low-speed hardware devices.

High quality digital audio sounds the end of PC sound cards
The USB concept enables sound processing to be taken outside of the PC case, an electrically noisy environment that can cause interference. By keeping the sound data in digital format right up to the last Digital to Analog Converter (DAC) in the external amplifier, extremely high quality hi-fi sound can be achieved, further assisting the PC in its move into the home environment. Philips already has USB speakers with built-in amplifiers available and as well as removing the need for PC sound cards, this approach provides for more than two channels. Therefore multi-channel surround sound is now possible as all the required data is stored in the digital data stream. Last but not least, PC-audio system costs will be reduced because a big part of the sound card functionality will be emulated on the host by the USB audio driver.

Sound information is sent over the USB through an Isochronous channel, which guarantees the bandwidth on the USB needed to deliver the necessary number of audio samples in time to a USB audio device, e.g. a USB digital speaker. (see "Packets and transfers"). In an Isochronous channel, a packet of audio samples is sent to the receiving USB audio device every millisecond. On average, each packet contains a number of samples according to the sampling frequency of the signal that is being played. For example, a CD quality signal at 44.1 KHz (i.e. 44100 samples per second) will use packets of 44 samples during 90 % of the time and 45 samples during 10 % of the time to match the exact sample rate:
[44 samples/packet x 0.9] + [45 samples/packet x 0.1] = 44.1 samples per millisecond (see diagram 5).

Diagram 5: Packet positions within each time frame can vary
 
Diagram 5

The receiving USB audio device decodes the incoming USB stream, distributes the "bursty" (i.e. all information concentrated in a packet) incoming audio data stream to a continuous datastream and converts this stream to a high quality analog audio signal.

An acknowledged leader in audio ICs, Philips Semiconductors was the first to the market with USB-enabled audio products, bringing high quality audio performance to the PC environment for the first time.

Philips Semiconductors currently has two families of audio ICs: Audio Playback Peripherals (APP) and Audio Playback Record Peripherals (APRP). These devices incorporate all the necessary analog and digital sound processing functions. Both families are available with either internal or external ROM, giving developers the possibility to develop systems to meet emerging USB standards using software stored in external ROM and to fix the software in internal ROM when standards are finalized.

The Product info on UDA1331 UDA1331 Audio Playback Peripheral (APP) was the first available USB-enabled audio IC. A DAC with DSP features, it incorporates all necessary analog and digital functions except ROM for the firmware. The second generation Product info on UDA1321 UDA1321 is functionally similar to the UDA1331, but has integrated program ROM loaded with USB Specification Rev 1.1 compliant code. It can be configured to support various application topologies and HID class connectivity, with the configuration stored in the internal ROM or an external EEPROM. These devices are suitable for USB audio applications including monitors, speakers, headsets and telephone/answering machines and for USB links in consumer audio devices.

The Product info on UDA1335H UDA1335H Audio Playback/Record Peripheral (APRP) is a full duplex stereo USB audio IC. This combined ADC/DAC includes DSP features, but requires external ROM for the microcontroller firmware. The second generation UDA1325 is functionally similar to the UDA1335H, but has integrated program ROM with USB Specification Rev 1.1 compliant code. It can be configured to support various application topologies and HID class connectivity, with the configuration stored in the internal ROM or an external EEPROM.

USB monitor microcontrollers
PC monitors are the ideal place for a USB hub and Philips Semiconductors' USB monitor microcontrollers provide an efficient one-chip solution. All Philips Semiconductors' DDC/USB-enabled monitor microcontrollers have an interface which complies with the USB Specification Rev 1.0 and with the USB Human Interface Device and Display Device Class. Three families are available for low-, medium- and high-end monitors. All are also available in OTP versions and include DDC functionality (DDC1, 2B, 2B+, 2AB and 2Bi ), sync processors, mode detectors, PWMs, ADCs, I2C-bus and general I/O ports, and each has a range of memory configurations.

They come in 52-, 56- and 64-pin SDIL packages but all fit into the same 64-pin SDIL socket, so one common PCB layout can be used. QFP80 packages are also available, ideal for USB LCD monitor applications.

Intended for low-end monitors, the P8xCx91 family incorporates a USB embedded function only. This allows the monitor to be controlled via the USB, but no USB peripherals can be plugged into the monitor. The P8xCx90 family is designed for mid-range monitors and contains a 4-port USB hub which allows the user to plug various USB peripherals into the monitor. A USB embedded function is also included for USB monitor control. The P8xCx95 high-end USB monitor microcontroller family offers essentially the same feature-set as the P8xCx90 family and also include a standard serial interface (UART), more DACs and more I/O pins.

PC peripheral USB microcontrollers
For PC peripherals, Philips Semiconductors has a range of dedicated 80C51-based USB peripheral microcontrollers. For low-speed peripherals, the P8xCx92 and P8xCx93 families are targeted mainly at application such as keyboards, and support a data transfer rate of 1.5 Mbits/s. The P8xCx92 family features a USB HID device class Rev.1.0. interface, the P8xCx93 family includes an integrated USB hub.

Imaging
The SAA8117 USB camera interface device is designed for video-conferencing and PC video camera applications. It features a USB interface and accepts D1 digital video input. Signal processing includes a programmable image scaler and up to 4x video compression. In development is a single-chip digital signal processor dedicated to digital still cameras. It will feature increased interfacing flexibility (USB, IrDA and IEEE1394), as well as enhanced image processing to give much sharper pictures than competitive products when using the same image sensors.

Conclusion
Philips has been pioneering the development of USB with a number of world firsts that will help manufacturers of USB-related products deliver products rapidly to market. Philips Semiconductors extensive range of FlexiUSB hub and interfaces and its dedicated solutions for audio, monitor and imaging applications allow designers to easily add USB functionality to existing designs or to develop new designs for specific applications (see diagram 6).

Diagram 6: USB connection
 
Diagram 6

Philips Semiconductors, a division of Royal Philips Electronics, headquartered in Eindhoven, The Netherlands, is the ninth largest semiconductor supplier in the world and the third largest supplier of discretes in the world. Philips Semiconductors' innovations in digital audio, video, and mobile technology position the company as a leader in the consumer, multimedia and wireless communications markets. Sales offices are located in all major markets around the world and are supported by systems labs.

Copyright © 2000
Royal Philips Electronics
All rights reserved.
Terms and conditions.


Go to Philips Semiconductors' home page Philips home Feedback your comments and questions Go to semiconductors.com search / index