Apple Desktop Bus
Encyclopedia
Apple Desktop Bus is an obsolete bit-serial
Serial communications
In telecommunication and computer science, serial communication is the process of sending data one bit at a time, sequentially, over a communication channel or computer bus. This is in contrast to parallel communication, where several bits are sent as a whole, on a link with several parallel channels...

 computer bus
Computer bus
In computer architecture, a bus is a subsystem that transfers data between components inside a computer, or between computers.Early computer buses were literally parallel electrical wires with multiple connections, but the term is now used for any physical arrangement that provides the same...

 connecting low-speed devices to computers. Used primarily on the Macintosh
Macintosh
The Macintosh , or Mac, is a series of several lines of personal computers designed, developed, and marketed by Apple Inc. The first Macintosh was introduced by Apple's then-chairman Steve Jobs on January 24, 1984; it was the first commercially successful personal computer to feature a mouse and a...

 platform, ADB equipment is still available but not supported by most Apple hardware manufactured since 1999.

History

ADB was created by Steve Wozniak
Steve Wozniak
Stephen Gary "Woz" Wozniak is an American computer engineer and programmer who founded Apple Computer, Co. with Steve Jobs and Ronald Wayne...

, who had been looking for a project to work on in the mid-1980s. Someone suggested that he should create a new connection system for devices like mice and keyboards, one that would require only a single daisy-chained cable, and be inexpensive to implement. As the story goes, he went away for a month and came back with ADB.

The first system to use ADB was the Apple IIGS
Apple IIGS
The Apple , the fifth and most powerful model in the Apple II series of personal computers produced by Apple Computer. The "GS" in the name stands for Graphics and Sound, referring to its enhanced graphics and sound capabilities, both of which greatly surpassed previous models of the line...

 in 1986. It was subsequently used on all Apple Macintosh
Macintosh
The Macintosh , or Mac, is a series of several lines of personal computers designed, developed, and marketed by Apple Inc. The first Macintosh was introduced by Apple's then-chairman Steve Jobs on January 24, 1984; it was the first commercially successful personal computer to feature a mouse and a...

 machines starting with the Macintosh II
Macintosh II
The Apple Macintosh II was the first personal computer model of the Macintosh II series in the Apple Macintosh line and the first Macintosh to support a color display.- History :...

 and Macintosh SE
Macintosh SE
The Macintosh SE was a personal computer manufactured by Apple between March 1987 and October 1990. This computer marked a significant improvement on the Macintosh Plus design and was introduced by Apple at the same time as the Macintosh II....

, before it was replaced by USB
Universal Serial Bus
USB is an industry standard developed in the mid-1990s that defines the cables, connectors and protocols used in a bus for connection, communication and power supply between computers and electronic devices....

, starting on the iMac
IMac
The iMac is a range of all-in-one Macintosh desktop computers built by Apple. It has been the primary part of Apple's consumer desktop offerings since its introduction in 1998, and has evolved through five distinct forms....

 in 1998. ADB was also used on a number of other 680x0-based microcomputers made by Sun, HP, NeXT and such.

No machines being built today use ADB for device interconnection, but up to February 2005, PowerBook
PowerBook
The PowerBook was a line of Macintosh laptop computers that was designed, manufactured and sold by Apple Computer, Inc. from 1991 to 2006. During its lifetime, the PowerBook went through several major revisions and redesigns, often being the first to incorporate features that would later become...

s and iBook
IBook
The iBook was a line of laptop computers sold by Apple Computer from 1999 to 2006. The line targeted the consumer and education markets, with lower specifications and prices than the PowerBook, Apple's higher-end line of laptop computers....

s still used the simple ADB protocol in the internal interface with the built-in keyboard
Keyboard (computing)
In computing, a keyboard is a typewriter-style keyboard, which uses an arrangement of buttons or keys, to act as mechanical levers or electronic switches...

 and touchpad
Touchpad
A touchpad is a pointing device featuring a tactile sensor, a specialized surface that can translate the motion and position of a user's fingers to a relative position on screen. Touch pads are a common feature of laptop computers, and they are also used as a substitute for a mouse where desk...

. The internal connection for the trackpads has now been changed to USB.

Physical

In keeping with Apple's general philosophy of industrial design, ADB was intended to be as simple to use as possible, while still being inexpensive to implement. A suitable connector was found in the form of the 4 pin mini-DIN connector, which is also used for S-Video
S-Video
Separate Video, more commonly known as S-Video and Y/C, is often referred to by JVC as both an S-VHS connector and as Super Video. It is an analog video transmission scheme, in which video information is encoded on two channels: luma and chroma...

. The connectors were small, widely available, and can only be inserted the "correct way". They do not "lock" into position, but even with a friction fit they are firm enough for light duties like those intended for ADB. ADB can be implemented for less than a penny; the connector always costs more than the controller hardware.

ADB's protocol required only a single pin for data, labeled ADB. Two of the other pins were used for +5 V power supply and ground. The +5 V pin guaranteed at least 500 mA, and required devices to use only 100 mA each. ADB also included the PSW pin which was attached directly to the power supply of the host computer. This was included to allow a key on the keyboard to start up the machine without needing the ADB software to interpret the signal. In more modern designs an auxiliary microcontroller is always kept running, so it is economical to use a power-up command over the standard USB channel.

Most serial digital interfaces use a separate clock pin to signal the arrival of individual bits of data. However, Wozniak decided that a separate wire for a clock signal was not necessary; and as ADB was designed to be low-cost, it made economical sense to leave it out.

The decoding transceiver
Transceiver
A transceiver is a device comprising both a transmitter and a receiver which are combined and share common circuitry or a single housing. When no circuitry is common between transmit and receive functions, the device is a transmitter-receiver. The term originated in the early 1920s...

 ASIC
Application-specific integrated circuit
An application-specific integrated circuit is an integrated circuit customized for a particular use, rather than intended for general-purpose use. For example, a chip designed solely to run a cell phone is an ASIC...

 was available only by request, as Apple preferred to work more closely with vendors. Apple possibly sold this hardware below cost to encourage peripheral development and their own economy of scale.

Communication

The ADB system is based around the devices having the ability to decode a single number (the address) and being able to hold several small bits of data (their registers). All traffic on the bus is driven by the host computer, which sends out commands to read or write data: devices are not allowed to use the bus unless the computer first requests it. These requests took the form of single-byte
Byte
The byte is a unit of digital information in computing and telecommunications that most commonly consists of eight bits. Historically, a byte was the number of bits used to encode a single character of text in a computer and for this reason it is the basic addressable element in many computer...

 strings. The upper four bits contained the address, the id of one device on the chain, allowing for up to 16 devices on a single bus. The next two bits specified one of four commands, and the final two bits indicated one of four registers. The commands were:
  • talk - send the contents of a register to the computer
  • listen - set the register to the following number
  • flush - clear the contents of the register
  • reset - tell everyone on the bus to reset


For instance, if the mouse was known to be at address $D, the computer would periodically send out a message on the bus that looked something like...

1101 11 00

This says that device $D (1101) should talk (11) and return the contents of register zero (00). To a mouse this means "tell me the latest position changes". Registers could contain between two and eight bytes. Register zero was generally the primary communications channel. Registers one and two were undefined, and were generally intended to allow 3rd party developers to store configuration information. Register three always contained device identification information.

The addresses and enumeration of the devices were set to default values when reset. For instance, all keyboards were set to $2, and all mice to $3. When the machine was first powered on the ADB device driver would send out talk commands asking each of these known default address, in turn, for the contents of register three. If no response came from a particular address, the computer marked it dead and didn't bother polling it later.

If a device did respond, it did so by saying it was moving to a new randomly selected "higher" address. The computer then responded by sending another command to that new address, asking the device to move to yet another new address. Once this completed that device was marked "live", and the system continued polling it in the future. Once all of the devices were enumerated in this fashion the bus was ready to be used.

Although it was not common, it was possible for the ADB bus to have more than one device of the same sort plugged in — two graphics tablets or software copy protection
Copy protection
Copy protection, also known as content protection, copy obstruction, copy prevention and copy restriction, refer to techniques used for preventing the reproduction of software, films, music, and other media, usually for copyright reasons.- Terminology :Media corporations have always used the term...

 dongles for instance. In this case when it asked for devices on that default address, both would respond and a collision could occur. The devices included a small bit of timing that allowed them to avoid this problem. After receiving a message from the host, the devices waited a short random time before responding, and then only did so after "snooping" the bus to make sure it was not busy.

With two dongles plugged in, for instance, when the bus was first setting up one of them would be the first to respond due to the random wait timer. The other would notice the bus was busy and not respond. The host would then send out another message to that original address, but since one device had moved to a new address, only the other would then respond. This process continued until no one responded to the request on the original address, meaning there were no more devices of that type to enumerate.

Data rates on the bus were theoretically as high as 125 kbit/s. However the actual speed was at best half that due to there being only one pin being shared between the computer and devices. In actual use the speed was much less than that, as the entire system was driven by how fast the computer polled the bus. The Mac OS
Mac OS
Mac OS is a series of graphical user interface-based operating systems developed by Apple Inc. for their Macintosh line of computer systems. The Macintosh user experience is credited with popularizing the graphical user interface...

 was not particularly well suited to this task, and the bus often got bogged down at about 10 kbit/s.

Problems

One peculiarity of ADB was that it in spite of being electrically unsafe for hot-swapping on all but a few machines, it had all of the basic capabilities needed for hot-swapping implemented in its software and support hardware.

It is important to stress that on practically all original ADB systems it is not safe to plug in or unplug a device once the system is powered on (unlike modern day busses designed with hot-swap in mind). This could cause the opening of a soldered-in fuse on the motherboard. If brought to an authorised dealer this could result in a motherboard swap at a significant expense. A simple alternative was to obtain a fuse at a nominal cost and wire it in parallel across the open motherboard fuse (not even requiring soldering if done appropriately).

The mini-DIN connector was only rated for 400 insertions and it was easy to bend a pin if not inserted with caution; in addition, the socket could become loose, resulting in intermittent function.

Presaging the disappearance of the second port on newer FireWire devices, some ADB devices lacked a pass-through connector, making it impossible to daisy-chain more than one such device at a time without obscure splitter units. Keyboards, software dongles, graphics tablets, game pads and joysticks typically had pass-through connectors, while few mice or trackballs had them.

While Mini-DIN connectors cannot be plugged in the "wrong way", it is possible to have trouble finding the right way without looking inside the circular connector's shroud. Apple attempted to help by using U-shaped grips around the connectors to key both plugs and sockets so the flat side has a specific relation to the shell keyway, but this feature was ignored by some 3rd-party manufacturers. Additionally, there are four ways to orient the receiving socket on a device such as a keyboard; various Apple keyboards have used at least three of these possible orientations.

External links

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK