Apple Desktop Bus

Early during the creation of the Macintosh computer, the engineering team had selected the fairly sophisticated Zilog 8530 to supply serial communications.

With no card slots, the Macintosh was unable to easily add support for Ethernet or similar local area networking standards.

This left the Mac with the original single-purpose mouse and keyboard ports, and no general-purpose system for low-speed devices to use.

PowerPC-based PowerBooks and iBooks still used the Apple Desktop Bus protocol in the internal interface with the built-in keyboard and touchpad.

ADB protocol requires only a single pin for data, labeled Apple Desktop Bus.

This is included to allow a keypress on the keyboard to start 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.

The Apple Desktop Bus system is based around the devices having the ability to decode a single number (the address) and being able to hold several small items of data (their registers).

The commands are: For instance, if the mouse is known to be at address $D, the computer will periodically send out a 1-byte message on the bus that looks something like: 1101 11 00 This says that device $D (1101) should talk (11) and return the contents of register zero (00).

Registers one and two are undefined, and are generally intended to allow 3rd party developers to store configuration information.

When the machine is first powered on, the ADB device driver will send out talk commands asking each of these known default addresses, in turn, for the contents of register three.

Although it was not common, it is possible for the Apple Desktop Bus to have more than one device of the same sort plugged in — two graphics tablets or software copy protection dongles, for instance.

After receiving a message from the host, the devices wait a short random time before responding, and then only do so after "snooping" the bus to make sure it was not busy.

With two dongles plugged in, for instance, when the bus is first setting up and queries that address, one of them will be the first to respond due to the random wait timer.

Apple attempted to help by using U-shaped soft plastic 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 third-party manufacturers.

ADB is implemented in an early Microchip PIC microcontroller in the Macintosh SE.