Apple Desktop Bus: Difference between revisions

No edit summary
Rebuild from Guide to the Macintosh Family Hardware ch.8 (now hosted): corrected pin 2 to POWER.ON, Sync 65us/stop 70us, ~10 kbit/s not 125; replaced fabricated handler-ID registry, device-address table and 6-command table with Apple Tables 8-16/8-17/8-13; added Tables 8-2, 8-12, 8-14, 8-15, keyboard registers 0/2; 11 ms polling; removed invented electrical specs, patent list and troubleshooting table
Line 3: Line 3:
| logo        = [[File:Apple Desktop Bus (icon).svg|150px]]
| logo        = [[File:Apple Desktop Bus (icon).svg|150px]]
| type        = Computer peripheral interface
| type        = Computer peripheral interface
| designer    = Steve Wozniak
| designer    = Apple Computer
| design_date  = 1985-1986
| design_date  = 1985-1986
| manufacturer = Apple Computer
| manufacturer = Apple Computer
Line 9: Line 9:
| superseded  = [[Universal Serial Bus|USB]]
| superseded  = [[Universal Serial Bus|USB]]
| external    = Yes
| external    = Yes
| hotplug      = Technically capable but not recommended
| hotplug      = No - Apple's documentation warns against it
| cable        = 4-conductor shielded
| cable        = 4-conductor shielded, 5 m maximum
| pins        = 4
| pins        = 4
| connector    = Mini-DIN 4 (same as S-Video)
| connector    = Mini-DIN 4 (same shell as S-Video)
| electrical  = Single data line, open collector
| electrical  = Single data line, open collector, 470 ohm pull-up
| maximum_devices = 16
| maximum_devices = 16 addressable; more than 3 per port not recommended
| protocol    = Serial, self-clocking
| protocol    = Serial, self-clocking, single-master
| data_signal  = Bidirectional serial
| data_signal  = Bidirectional serial
| data_rate    = 10-125 kbit/s
| data_rate    = ~10 kbit/s (100 us bit cell)
| style        = Serial
| style        = Serial
| pinout_caption = ADB connector (female socket)
| pinout_caption = ADB connector (female socket)
|pinout=[[File:Apple Desktop Bus Connector Pinout.png|150px]]}}
|pinout=[[File:Apple Desktop Bus Connector Pinout.png|150px]]}}
'''Apple Desktop Bus''' ('''ADB''') is a proprietary bit-serial peripheral bus connecting low-speed input devices to computers. Designed by Steve Wozniak and introduced on the [[Apple IIGS]] in September 1986, ADB was created to provide a simple, low-cost method for connecting keyboards, mice, and other input devices in a daisy-chain configuration without requiring hubs. The technology was quickly adopted for the Macintosh line beginning with the [[Macintosh SE]] and [[Macintosh II]] in March 1987, and remained Apple's standard peripheral interface until its replacement by [[USB]] in 1998-1999.
<templatestyles src="Template:StyledTable/styles.css" />
The '''Apple Desktop Bus''' ('''ADB''') is Apple's single-master, multislave bit-serial bus for low-speed input devices — keyboards, mice, graphics tablets and the like. Apple describes it as connecting "up to 16 low-speed input devices".<ref name="gmfh">''Guide to the Macintosh Family Hardware'', second edition, Apple Computer, Inc. / Addison-Wesley, 1990 — hosted on this wiki as [[:File:Apple Guide to the Macintosh Family Hardware 2nd Edition 1990.pdf]]. Chapter 8, "Apple Desktop Bus", pages 287–326: bus overview (single-master multislave, up to 16 devices, ADB transceiver IC described as a 4-bit microcontroller, two connectors wired in parallel, four-conductor shielded cable, the warning against unplugging a device while the computer is running, the 500 mA total bus limit, the 5 m cable length and 100 pF/m capacitance limits, and the note that daisy-chaining more than three devices on one port is not recommended); Table 8-1 connector signal assignments; Table 8-2 transceiver electrical characteristics; Table 8-4 register 0 in the Apple Standard Mouse and the accompanying note on 100 ±10 and 200 ±10 counts per inch; Tables 8-7 and 8-8 registers 0 and 2 in the Apple Standard Keyboard; Tables 8-10 and 8-11 registers 0 and 2 in the Apple Extended Keyboard; Table 8-12 transaction states; Table 8-13 command byte syntax; Table 8-14 the full timing specification; Table 8-15 device register 3; Table 8-16 device addresses; Table 8-17 reserved Device Handler IDs; the collision-detection, polling (11 ms) and error-condition sections. Chapter 9, "Floppy Disk Interfaces", is the source for the floppy-drive material.</ref> It was introduced on the [[Apple IIGS]] in September 1986 and carried across the Macintosh line from the [[Macintosh SE]] and [[Macintosh II]] in 1987 until USB replaced it at the end of the 1990s.


== History and Development ==
On most Macintosh models the bus hardware is three things: an '''ADB transceiver IC''' — which Apple describes as a 4-bit microcontroller — that drives the bus and reads device status; the '''VIA''', which is how the CPU talks to the transceiver; and '''two 4-pin ADB connectors wired in parallel''' on the rear panel. The [[Macintosh Portable]] is the exception: there the Power Manager IC performs the transceiver function, and the Macintosh IIfx uses the IOP custom IC instead.<ref name="gmfh" />


=== Origins ===
== Physical Interface ==
During the early development of the Macintosh in the 1980s, Apple engineers had selected the sophisticated Zilog 8530 for serial communications. However, this solution was expensive and complex for simple input devices. Steve Wozniak, working on the Apple IIGS project in 1985-1986, developed ADB as a simpler, more cost-effective alternative that could support multiple devices on a single bus.


The design philosophy emphasized simplicity and low cost while maintaining reliability. Wozniak's solution used a single data line with self-clocking signals, eliminating the need for separate clock lines and reducing component count. The protocol was sophisticated enough to support device enumeration, collision detection, and service requests, yet simple enough to implement with minimal hardware.
=== Connector ===
 
{| class="wikitable styled-table" style="width:75%;"
=== Implementation Timeline ===
|+'''ADB connector signal assignments'''<ref name="gmfh" />
* '''September 1986:''' First implementation in Apple IIGS
! Pin !! Signal !! Description
* '''March 1987:''' Adopted by Macintosh SE and Macintosh II
* '''1987-1998:''' Standard on all desktop Macintosh computers
* '''1991-1998:''' Used in PowerBook line
* '''1989-1996:''' Implemented in some NeXT computer models
* '''1998:''' Phased out with introduction of [[iMac G3]] (USB-based)
* '''1999:''' Last external ADB port on [[Power Macintosh G3 (Blue and White)]]
* '''2000-2005:''' Internal ADB protocol continued in some PowerBooks for built-in keyboards/trackpads
 
== Technical Specifications ==
 
=== Physical Interface ===
{| class="wikitable" style="width:60%; text-align:center;"
|+'''ADB Connector Pinout (Mini-DIN 4)'''
! Pin !! Signal !! Description !! Specifications
|-
|-
| 1 || ADB Data || Bidirectional serial data || Open collector, 5V pull-up
| 1 || ADB || Bidirectional data bus, used for input and output. Open-collector, pulled up to +5 V through a '''470 Ω''' resistor on the computer's main logic board
|-
|-
| 2 || PSW || Power switch || Direct connection to power supply
| 2 || POWER.ON || On the Macintosh II family, a key on the ADB keyboard momentarily grounds this pin to pin 4 to switch on the power supply. '''On other models this pin is not connected'''
|-
|-
| 3 || +5V || Power supply || 500mA total, 100mA per device max
| 3 || +5 V || +5 volts
|-
|-
| 4 || GND || Ground reference || Common ground
| 4 || GND || Ground
|}
|}


The connector is physically identical to the 4-pin mini-DIN used for S-Video, leading to potential confusion. However, pins 1 and 2 are bridged in some S-Video cables, which can cause catastrophic damage if used with ADB devices.
Pin 2 is '''POWER.ON''', not "PSW"; it is a momentary ground path to pin 4, not a "direct connection to the power supply".
 
=== Electrical Characteristics ===
* '''Bus topology:''' Multi-drop, daisy-chain capable
* '''Signal type:''' Open collector with 5V pull-up resistors
* '''Logic levels:''' TTL compatible (0V = low, 5V = high)
* '''Cable length:''' Maximum 5 meters total bus length
* '''Power distribution:''' 500mA at 5V total available
* '''Device power limit:''' 100mA per device maximum
 
=== Protocol Specifications ===
 
==== Bit Encoding ====
ADB uses self-clocking duty-cycle modulation where each bit period is 100μs:
* '''Logic 0:''' 65μs low, 35μs high
* '''Logic 1:''' 35μs low, 65μs high
* '''Start bit:''' Always logic 1
* '''Stop bit:''' Always logic 0
 
==== Transaction Structure ====
Each ADB transaction consists of:
# '''Attention signal:''' Host pulls bus low for 800μs
# '''Sync signal:''' Bus high for 70μs
# '''Command byte:''' 8 bits transmitted by host
# '''Stop bit:''' Logic 0
# '''Service Request window:''' 65-300μs (device can assert SRQ)
# '''Stop-to-start time (Tlt):''' 140-260μs bus high
# '''Data transfer:''' 2-8 bytes (if applicable)


==== Command Format ====
The shell is the same 4-pin mini-DIN used for S-Video, which is why S-Video cables get pressed into service. Do not: some S-Video cables bridge or omit conductors, and the pin functions do not correspond.
Commands are 8 bits structured as:
* '''Bits 7-4:''' Device address (0-15)
* '''Bits 3-2:''' Command type
* '''Bits 1-0:''' Register number


{| class="wikitable" style="width:70%; text-align:center;"
=== Electrical characteristics ===
|+'''ADB Command Types'''
{| class="wikitable styled-table" style="width:75%;"
! Command !! Binary !! Description !! Action
|+'''ADB transceiver electrical characteristics'''<ref name="gmfh" />
! Parameter !! Minimum !! Maximum
|-
|-
| SendReset || 00 || System reset || All devices reset to default state
| Low input signal voltage || −0.2 V || 0.8 V
|-
|-
| Flush || 01 || Flush device || Clear device buffer for specified register
| High input signal voltage || 2.4 V || 5.0 V
|-
|-
| Reserved || 10 || Reserved || Not used
| Low output signal voltage || — || 0.45 V (at 12 mA)
|-
|-
| Reserved || 11 || Reserved || Not used
| High output signal voltage || 2.4 V || —
|-
|-
| Listen || 10 || Write to device || Host sends data to device register
| Device output current when off || — || −20 µA (at 0.4 V)
|-
|-
| Talk || 11 || Read from device || Device sends register contents to host
| Device input capacitance || — || 150 pF
|}
|}


=== Device Registers ===
Apple gives no rise-time or fall-time figure, and no per-device current limit. What it does give is a '''bus total''': "ADB devices may use the +5 volts supplied by the bus, but all the ADB devices combined must not draw more than a total of '''500 mA'''."<ref name="gmfh" /> A widely repeated "100 mA per device maximum" does not appear in Apple's documentation and is not reproduced here.
Each ADB device implements four registers:


{| class="wikitable" style="width:80%; text-align:center;"
=== Cable and chain length ===
|+'''Standard ADB Register Definitions'''
Cables should be '''no longer than 5 metres''', and cable capacitance should not exceed '''100 picofarads per metre'''.<ref name="gmfh" /> On device count Apple is blunt: "Although the ADB transceiver is capable of addressing up to 16 different peripheral devices, daisy-chaining more than 3 devices on one ADB port is not recommended because of connector resistance and signal degradation."<ref name="gmfh" /> Long chains and cheap extension leads are a real cause of intermittent mice and keyboards.
! Register !! Purpose !! Size !! Description
|-
| 0 || Device data || 2-8 bytes || Primary data (keyboard keys, mouse movement)
|-
| 1 || Device-specific || Variable || Extended features or configuration
|-
| 2 || Device-specific || Variable || Additional features (e.g., keyboard LEDs)
|-
| 3 || Status/Command || 2 bytes || Device ID, address, and handler ID
|}


==== Register 3 Format ====
== Protocol ==
Register 3 contains device identification and configuration:
* '''Bits 15-8:''' Exceptional event flags (device-specific)
* '''Bits 7-0:''' Device handler ID
* '''Bits 11-8:''' Device address (when read)
* '''Service Request Enable:''' Bit 13


== Device Addressing and Enumeration ==
=== Bit cells ===
Each command or data bit is encoded as a '''bit cell''': a low voltage on the bus, a rising edge, a high voltage, and a final falling edge. A 0 is distinguished from a 1 by the relative length of the low time. Every command and data packet ends with a '''stop bit''' — a 0 bit with the same low time as any other 0, but which does not necessarily have a second falling edge.<ref name="gmfh" />


=== Default Addresses ===
{| class="wikitable styled-table" style="width:90%;"
{| class="wikitable" style="width:60%; text-align:center;"
|+'''ADB timing specifications''' (Apple Table 8-14)<ref name="gmfh" />
|+'''ADB Default Device Addresses'''
! Parameter !! Nominal !! Host tolerance !! Device tolerance
! Address !! Device Type !! Notes
|-
|-
| $0 || Reserved || SendReset command
| Bit-cell time || 100 µs || ±3% || ±30%
|-
|-
| $1 || Security dongles || Copy protection devices
| "0" low time || 65 µs || 65% of bit-cell time ±5% || 65% of bit-cell time ±5%
|-
|-
| $2 || Keyboards || All keyboards default to this
| "1" low time || 35 µs || 35% of bit-cell time ±5% || 35% of bit-cell time ±5%
|-
|-
| $3 || Mice/Pointing devices || Mice, trackballs, trackpads
| Attention low time || 800 µs || ±3% || —
|-
|-
| $4 || Graphics tablets || Absolute positioning devices
| Sync high time || 65 µs || ±3% || —
|-
|-
| $5 || Reserved || Vendor-specific
| Stop bit low time || 70 µs || ±3% || ±30%
|-
|-
| $6 || Reserved || Vendor-specific
| Global Reset low time || 3 ms || 3 ms minimum || 3 ms minimum
|-
|-
| $7 || Reserved || Vendor-specific
| Service Request low time || 300 µs || — || ±30%
|-
|-
| $8-$E || Relocated devices || Collision resolution addresses
| Stop-bit-to-start-bit time || 200 µs || 140 µs min, 260 µs max || 140 µs min, 260 µs max
|-
| $F || Reserved || Global polling address
|}
|}


=== Enumeration Process ===
Two things about this table are easy to get wrong. '''Sync is 65 µs high and the stop bit is 70 µs low''' — several online summaries transpose them. And the bit cell is '''100 µs''', so the bus runs at roughly '''10 kbit/s'''. A figure of "125 kbit/s theoretical" circulates widely; it does not follow from Apple's own timing table and is not used here.
The ADB Manager performs device enumeration at startup:
 
# '''Reset:''' SendReset command clears all devices
# '''Discovery:''' Poll each default address with Talk Register 3
# '''Collision Detection:''' If multiple devices respond:
#* Devices detecting collision stop transmitting
#* Non-colliding device completes transmission
# '''Address Resolution:'''
#* Send Listen Register 3 with new address ($8-$E) and handler ID $FE
#* Only non-colliding device moves to new address
#* Repeat until all devices have unique addresses
# '''Verification::''' Poll new addresses to confirm relocation
# '''Handler Installation::''' Install appropriate device drivers


=== Service Requests ===
=== Transactions ===
Devices can request service by:
A transaction is a command sent by the computer followed by a data packet sent by either the computer or the device.<ref name="gmfh" />
# Pulling bus low during stop bit of any transaction (65-300μs)
# Host detects extended stop bit as Service Request (SRQ)
# Host polls all devices' Register 0 sequentially
# Device with data becomes new active device
# Active device is polled continuously until another SRQ


== Device Handler IDs ==
* A '''command''' consists of an Attention signal, a Sync signal, one command byte, and one stop bit.
* A '''data packet''' consists of a start bit, two to eight 8-bit data bytes, and one stop bit.


Device handlers define how the host interprets device data. Standard handler IDs include:
=== Command byte ===
Every command byte is a 4-bit device address, a 2-bit command code and a 2-bit register code. There are '''four''' commands, not six:<ref name="gmfh" />


{| class="wikitable" style="width:70%; text-align:center;"
{| class="wikitable styled-table" style="width:85%;"
|+'''Common ADB Handler IDs'''
|+'''ADB command byte syntax''' (Apple Table 8-13)
! Handler ID !! Device Type !! Description
! Bits 7–4 (address) !! Bits 3–2 (command) !! Bits 1–0 (register) !! Command
|-
|-
| $00 || Self-test fail || Device failed internal diagnostics
| x x x x || 0 0 || 0 0 || SendReset
|-
|-
| $01 || Standard mouse || 100 CPI relative positioning
| A3 A2 A1 A0 || 0 0 || 0 1 || Flush
|-
|-
| $02 || Standard keyboard || Original keyboard protocol
| x x x x || 0 0 || 1 0 || Reserved
|-
|-
| $03 || Extended keyboard || Supports extended key codes
| x x x x || 0 0 || 1 1 || Reserved
|-
|-
| $04 || ISO keyboard || International layout support
| x x x x || 0 1 || x x || Reserved
|-
|-
| $05-$07 || Reserved keyboards || Vendor-specific
| A3 A2 A1 A0 || 1 0 || r1 r0 || Listen
|-
|-
| $08-$0F || Reserved mice || Vendor-specific
| A3 A2 A1 A0 || 1 1 || r1 r0 || Talk
|-
|}
| $10-$1F || Graphics tablets || Absolute positioning devices
 
* '''Talk''' reads a register. The device must respond with data '''within 260 µs''' or the computer takes the bus back. A device with nothing to say simply times out — except that it '''must''' respond to Talk Register 3.
* '''Listen''' writes a register.
* '''SendReset''' returns every device on the bus to its power-on state, clearing pending service requests.
* '''Flush''' is defined per device; normally it clears internal registers, losing anything buffered such as type-ahead characters.
 
The commands with command code <code>01</code> are reserved by Apple for future expansion, and nothing should use them.<ref name="gmfh" />
 
=== Signals ===
Four global signals are not addressed to any device. Attention, Sync and Global Reset are always generated by the computer; Service Request is always generated by a device.<ref name="gmfh" />
 
* '''Attention''' — a long low that marks the start of every command, followed by a short high '''Sync''' pulse that establishes the timing of the bits that follow.
* '''Global Reset''' — if the bus stays low for at least '''3.0 ms''', every device interprets it as a Global Reset, releases the bus and resets itself. A bus stuck low is therefore a permanent reset condition and nothing will enumerate.
* '''Service Request''' — a device that is not the active device and has data to send waits until the end of a command and then holds the bus low for 140 to 260 µs, lengthening the stop bit.
 
The second defined error condition is a transaction that never finishes: if the bus stays high beyond the maximum bit-cell time, all devices ignore the command and wait for a new Attention signal.<ref name="gmfh" />
 
=== Transaction states ===
Two lines from the VIA to the transceiver, ST0 and ST1, define the transaction state:<ref name="gmfh" />
 
{| class="wikitable styled-table" style="width:65%;"
|+'''ADB transaction states''' (Apple Table 8-12)
! ST1 !! ST0 !! State
|-
|-
| $20-$2F || Other devices || Joysticks, special controllers
| 0 || 0 || 0: start a new command
|-
|-
| $30-$FD || Vendor-specific || Custom implementations
| 0 || 1 || 1: transfer data byte (even)
|-
|-
| $FE || Change address || Special collision resolution
| 1 || 0 || 2: transfer data byte (odd)
|-
|-
| $FF || Self-test pass || Device diagnostics successful
| 1 || 1 || 3: idle
|}
|}


== Hardware Implementation ==
'''State 3 is where the bus spends most of its life,''' and it is the key to understanding ADB latency: in the idle state '''the ADB transceiver automatically repeats the last Talk command every 11 ms'''. The default transaction state on startup or reset is 3.<ref name="gmfh" />
 
== Device Registers ==


=== Host Controllers ===
An ADB device may have up to four registers, each 2 to 8 bytes.<ref name="gmfh" />
Different Apple systems used various ADB controller implementations:


{| class="wikitable" style="width:80%; text-align:center;"
* '''Register 0''' — the data register. When the ADB Manager polls to find which device asserted a Service Request it sends Talk Register 0 to each device in turn, so a device '''must''' have data in register 0 when it requires service, even if the interesting data is elsewhere.
|+'''ADB Controller Implementations'''
* '''Register 1''' — device-specific; the device may use it for anything.
! System !! Controller Type !! Implementation Details
* '''Register 2''' — device-specific. On Apple keyboards it carries modifier-key status (and, on the Extended Keyboard, the lock LEDs).
* '''Register 3''' — status and identification.
 
{| class="wikitable styled-table" style="width:70%;"
|+'''Bits in device register 3''' (Apple Table 8-15)<ref name="gmfh" />
! Bit !! Description
|-
|-
| Apple IIGS || Custom ASIC || Integrated with Mega II chip
| 15 || Reserved; must be 0
|-
|-
| Macintosh SE || PIC16CR54 || Microchip microcontroller (Apple-branded)
| 14 || Exceptional event, device specific; always 1 if not used
|-
|-
| Macintosh II/IIx || VIA + transceiver || 6522 VIA with discrete transceiver
| 13 || Service Request enable; 1 = enabled
|-
|-
| Macintosh IIfx || IOP processor || Dedicated I/O processor
| 12 || Reserved; must be 0
|-
|-
| Macintosh Portable || Power Manager || Integrated with PMU chip
| 11–8 || Device address
|-
|-
| PowerBook series || PMU || Power Management Unit integration
| 7–0 || Device Handler ID
|-
| Later Macs || Cuda/Egret || Combined ADB and power management
|}
|}


=== VIA Implementation ===
A device's ability to raise a Service Request can be switched off by clearing bit 13 with a Listen Register 3 command carrying Device Handler ID $00. Apple suggests this to improve service-request response time when several devices are on the bus and not all of them matter to the application in hand.<ref name="gmfh" />
On most 68k Macintoshes, ADB was implemented using:
* '''VIA (Versatile Interface Adapter):''' 6522 chip for CPU interface
* '''Transceiver IC:''' Handles bus electrical interface
* '''State lines (ST0, ST1):''' Define transaction states


Transaction states:
== Addressing and Enumeration ==
* '''State 0:''' Even byte from application
* '''State 1::''' Odd byte from application 
* '''State 2::''' Even byte to application
* '''State 3::''' Odd byte to application


== Standard Devices ==
=== Default addresses ===
 
{| class="wikitable styled-table" style="width:70%;"
=== Keyboards ===
|+'''ADB device addresses''' (Apple Table 8-16)<ref name="gmfh" />
ADB keyboards implemented two protocols:
! Address !! Device type !! Example
 
'''Standard Keyboard Protocol:'''
* Register 0: Two key events (2 bytes)
* Each byte: Key code (7 bits) + up/down flag (1 bit)
* Rollover: 2-key guaranteed
 
'''Extended Keyboard Protocol:'''
* Distinguishes left/right modifiers
* Handler ID change from $02 to $03
* Additional key codes for extended keys
* Used by Apple Extended Keyboard and later models
 
=== Mice and Pointing Devices ===
 
'''Standard Mouse Protocol:'''
* Register 0: Button state and movement deltas (2 bytes)
* Byte 0: Button (bit 7) + X delta (bits 6-0)
* Byte 1: Button (bit 7) + Y delta (bits 6-0)
* Resolution: 100 counts per inch typical
* Movement range: -64 to +63 per packet
 
'''Extended Mouse Protocol:'''
* Supports multiple buttons
* Higher precision movement data
* Additional registers for extended features
* Handler ID varies by capability
 
=== Graphics Tablets ===
Graphics tablets could operate in two modes:
* '''Relative mode::''' Emulates standard mouse
* '''Absolute mode::''' Reports absolute position
* Required vendor-specific drivers
* No standard protocol defined by Apple
 
== Limitations and Issues ==
 
=== Hot-Swapping ===
While ADB protocol supports hot-swapping, most implementations were unsafe:
* '''Problem::''' No current limiting on ADB ports
* '''Risk::''' Hot-swapping could blow motherboard fuse (typically 1.1A polyfuse)
* '''Exceptions::''' PowerBook G3 "Wall Street" had protected ports
* '''Repair::''' Required fuse replacement or expensive motherboard swap
 
=== Collision Issues ===
* Multiple identical devices caused address collisions
* Resolution process could fail with >3 identical devices
* Some devices had non-random address generation
 
=== Performance Limitations ===
* '''Bandwidth::''' Limited to 125 kbit/s theoretical (10-50 kbit/s typical)
* '''Latency::''' Polling-based system introduced input lag
* '''Device limit::''' 16 devices maximum, practically fewer
* '''Cable length::''' 5 meters total maximum
 
=== Power Limitations ===
* '''Total power::''' 500mA at 5V for entire bus
* '''Per device::''' 100mA maximum
* '''PowerBooks::''' Reduced to 200mA total on battery
 
== Software Support ==
 
=== ADB Manager ===
The ADB Manager in Mac OS handled:
* Device enumeration and address assignment
* Polling active devices
* Service request handling
* Device handler installation and management
* Register read/write operations
 
Key ADB Manager routines:
* '''ADBOp:''' Perform ADB transaction
* '''ADBReset::''' Reset bus and enumerate devices
* '''SetADBInfo::''' Install device handler
* '''GetADBInfo::''' Query device information
* '''CountADBs::''' Return number of devices
 
=== System Software Compatibility ===
* '''Apple IIGS::''' GS/OS with built-in ADB support
* '''Mac OS::''' System 3.2 through Mac OS 9.2.2
* '''A/UX::''' Full ADB support in Unix environment
* '''NeXT::''' Limited support on some models
* '''BeOS::''' Third-party drivers available
* '''Linux::''' Kernel support for PowerPC Macs
 
== Modern Usage and Adapters ==
 
=== ADB to USB Adapters ===
* '''Griffin iMate:''' Original commercial adapter (discontinued)
* '''Wombat:''' Modern bidirectional ADB-USB converter
* '''Belkin F5U118:''' Simple ADB to USB adapter
 
=== USB to ADB Adapters ===
* '''Wombat:''' Allows USB devices on ADB Macs
* '''DIY solutions:''' Arduino-based converters
 
=== Replacement Controllers ===
* '''PIC16F87/88:''' Drop-in replacement for failed SE controllers
* '''Custom ASICs:''' Modern reproductions for restoration
 
== Legacy and Impact ==
 
ADB represented several important innovations:
* '''First successful hot-pluggable peripheral bus''' (though implementation issues limited this)
* '''Automatic device enumeration and configuration''' predating USB
* '''Low-cost implementation''' enabling affordable peripherals
* '''Power distribution''' through the peripheral bus
* '''Collision detection and resolution''' without user intervention
 
The protocol influenced later designs:
* USB adopted similar enumeration concepts
* NeXT used ADB on some models
* Protocol concepts influenced FireWire development
* Demonstrated viability of serial peripheral buses
 
== Technical Documentation ==
 
=== Patents ===
Key Apple patents related to ADB:
* 4,875,158 - Method for requesting service by a device
* 4,910,655 - Apparatus for transferring signals and data
* 4,912,627 - Method for storing information
* 4,918,598 - Method for selectively activating and deactivating devices
 
=== Developer Resources ===
* '''Inside Macintosh: Devices''' - Complete ADB programming guide
* '''Technical Note HW01''' - "ADB - The Untold Story: Space Aliens Ate My Mouse"
* '''Guide to Macintosh Family Hardware''' - Hardware specifications
 
== Common ADB Devices ==
 
=== Apple Devices ===
* [[Apple Keyboard]] (M0116)
* [[Apple Extended Keyboard]] (M0115)
* [[Apple Extended Keyboard II]] (M3501)
* [[Apple Adjustable Keyboard]] (M1242)
* [[AppleDesign Keyboard]] (M2980)
* [[Apple Desktop Bus Mouse]] (A9M0331/G5431/M0142)
* [[Apple Desktop Bus Mouse II]] (M2706)
* Graphics tablets (various models)
 
=== Third-Party Devices ===
* Kensington TurboMouse trackballs
* Gravis GamePad and MouseStick
* Wacom ArtZ graphics tablets
* CalComp DrawingBoard tablets
* CoStar LabelWriter printers
* Hardware copy-protection dongles
* Modems and telecommunications devices
 
== Protocol Details ==
 
=== Complete Timing Specifications ===
The ADB protocol operates with precise timing requirements for all signal transitions:
 
{| class="wikitable" style="width:90%; text-align:center;"
|+'''ADB Protocol Timing Parameters'''
! Signal Type !! Duration !! Tolerance !! Description
|-
|-
| Reset pulse || 3000 μs || Minimum || Host pulls bus low for 3 ms or more to reset all devices
| $00–$01 || Reserved || —
|-
|-
| Attention || 800 μs || ±3% || Host pulls bus low to initiate transaction
| $02 || Encoded devices || Keyboard
|-
|-
| Sync || 70 μs || ±10% || Bus high between attention and command
| $03 || Relative devices || Mouse
|-
|-
| Bit cell (total) || 100 μs || ±3% || Total time for one bit transmission
| $04 || Absolute devices || Graphics tablet
|-
|-
| Logic 0 low time || 65 μs || ±3% || Low portion of logic 0 bit cell
| $05–$07 || Reserved || —
|-
|-
| Logic 0 high time || 35 μs || ±3% || High portion of logic 0 bit cell
| $08–$0F || Any other || —
|-
|}
| Logic 1 low time || 35 μs || ±3% || Low portion of logic 1 bit cell
 
Eight addresses are predefined or reserved, leaving eight available for other device types. This is the whole published table — tables circulating elsewhere that assign $01 to "security dongles" or $0F to a "global polling address" are not Apple's.
 
=== Device Handler IDs ===
The 8-bit Device Handler ID, together with the default address, is what the ADB Manager uses to decide which device driver to call.<ref name="adbmgr">''Inside Macintosh: Devices'', chapter 5, "ADB Manager", Apple Computer, Inc. — hosted on this wiki as [[:File:Inside Macintosh Devices Chapter 5 ADB Manager.pdf]]. ADB overview; the ADB device table; <code>CountADBs</code>, <code>GetIndADB</code>, <code>GetADBInfo</code>, <code>SetADBInfo</code>, <code>ADBOp</code> and <code>ADBReInit</code>; device handlers installed from <code>'ADBS'</code> resources; and the statement that the Apple Extended Keyboard has Device Handler ID $02 at default address $2.</ref> A device with more than one functional mode changes mode when its driver writes a new Handler ID to register 3 — this is how a mouse is switched from 100 to 200 counts per inch, and how the Apple Extended Keyboard is made to distinguish left from right modifiers.
 
Apple reserves exactly '''four''' Handler ID values for special functions. Every other value must be assigned by Apple Computer, and unrecognised IDs are ignored:<ref name="gmfh" />
 
{| class="wikitable styled-table" style="width:90%;"
|+'''Device Handler IDs reserved for special functions''' (Apple Table 8-17)
! ID !! Function
|-
|-
| Logic 1 high time || 65 μs || ±3% || High portion of logic 1 bit cell
| $FF || As Listen Register 3 data, initiates a self-test in the device
|-
|-
| Stop bit || 0 || Always || Stop bit is always logic 0
| $FE || As Listen Register 3 data, instructs the device to change its address field to the new address sent by the computer '''if no collision has been detected'''
|-
|-
| Service Request || 300 μs || Minimum || Device extends stop bit low to assert SRQ
| $FD || As Listen Register 3 data, instructs the device to change its address field '''if the activator is pressed'''
|-
|-
| Tlt (Stop-to-start) || 140-260 μs || Range || Bus high between command and data
| $00 || As Listen Register 3 data, instructs the device to change the address and enable fields to the new values sent by the computer
|-
|-
| SRQ detection window || 65-300 μs || Range || Period when devices can assert service request
| $00 || As data returned to a Talk Register 3 command, indicates that the device '''failed a self-test'''
|}
|}


=== Transaction State Machine ===
There is no published registry of handler IDs beyond this. Lists that assign ranges to keyboards, mice, tablets and joysticks are not Apple's and are not reproduced here.


Each ADB transaction follows a structured sequence:
=== Collision detection ===
Every ADB device must be able to detect collisions. A device waits for a free bus — the bus staying high for the stop-bit-to-start-bit time. If it is trying to bring the bus high and another device forces the line low, or another device starts sending before it can assert its start bit, it has '''lost a collision'''. The loser stops transmitting immediately, preserves the data it was sending, and sets an internal collision flag, which is cleared the next time it transmits successfully.<ref name="gmfh" />


# '''Idle State:''' Bus remains high, devices wait for attention signal
Because a device could fail to detect a collision with another device running on a nearly identical internal clock, Apple specifies that '''each device should attempt to assert its start bit at a random time''' within the stop-bit-to-start-bit window.<ref name="gmfh" />
# '''Attention Phase:''' Host pulls bus low for 800 μs
# '''Sync Phase:''' Bus high for 70 μs
# '''Command Transmission:''' 8 command bits + stop bit
# '''Service Request Window:''' Devices can assert SRQ during stop bit low time
# '''Tlt Period:''' Bus high for 140-260 μs
# '''Data Transfer:''' Start bit + 2-8 data bytes + stop bit
# '''Return to Idle:''' Transaction complete


=== Collision Detection Mechanism ===
=== Enumeration ===
At startup the Start Manager sends Talk Register 3 to each address. Where more than one device answers, each device that loses the collision sets its flag and disables its movable-address function. The Start Manager then sends Listen Register 3 to that address with Handler ID '''$FE''' and a new address; only the device that did '''not''' detect a collision moves. This repeats until Talk Register 3 at that address times out, at which point one device is moved back to the default address and the Start Manager moves on.<ref name="gmfh" />


The collision detection system enables automatic address resolution:
=== The activator ===
An ADB device may have a key or button called an '''activator''', intended for multi-user applications that need to identify and locate individual devices. An application can display a message asking the user to press it; the driver then relocates that device with a Listen Register 3 command carrying Handler ID '''$FD'''.<ref name="gmfh" />


'''Collision Detection Process:'''
=== Polling protocol ===
# Device begins transmitting its data
Once addresses are resolved, the ADB Manager sends Talk Register 0 to address '''$03''' — the default active device, usually the mouse — and the transceiver repeats that command '''every 11 ms'''. The last device to send data becomes the active device and is polled every 11 ms until another device asserts a Service Request.<ref name="gmfh" />
# Monitors bus state while transmitting
# If transmitted '1' but bus reads '0', collision detected
# Device immediately stops transmission
# Sets internal collision flag
# Remains silent for next transaction to its address


'''Collision Resolution Algorithm:'''
When a Service Request arrives, the transceiver raises an interrupt to the VIA, which sets bit 3 of VIA Data register B to 0. The operating system polls that bit, hands control to the ADB Manager, which sends Talk Register 0 to each device until it finds the one asking for service.<ref name="gmfh" />
When multiple devices share an address:
# Host sends Talk Register 3 to shared address
# All devices attempt to respond simultaneously
# Devices detecting collision stop transmitting
# Non-colliding device completes transmission
# Host sends Listen Register 3 with new address ($8-$E) and handler ID $FE
# Only non-colliding device moves to new address
# Process repeats until no collisions remain


=== Service Request Mechanism ===
== Hot-plugging ==


The Service Request (SRQ) signal allows devices to request host attention without being polled:
Apple's warning is explicit: '''"Do not unplug and reattach an ADB device while the computer is running"''' — if you do, the device reverts to its default address while the computer carries on trying to reach it at the address it was assigned at startup, so it simply stops working until the machine is restarted.<ref name="gmfh" />


'''SRQ Assertion:'''
Repair experience adds a second reason: on many machines the ADB +5 V feed is protected by a fuse on the logic board, and hot-plugging can open it. The fuse type and rating vary between models and Apple's ADB documentation does not describe it, so check the service documentation for the specific machine rather than assuming a value. Claims of a "1.1 A polyfuse" as a general figure are not supported by any Apple document seen here.
* Device pulls bus low during stop bit of any command
* Must maintain low for minimum 300 μs total
* Can only assert if command was not addressed to requesting device
* SRQ does not cancel the current transaction


'''Host Response to SRQ:'''
== Apple's Own ADB Devices ==
# Detects extended stop bit duration
# Completes current transaction
# Polls Register 0 of all devices sequentially
# Device with data becomes new active device
# Continues polling active device until next SRQ


== Extended Protocol Specifications ==
=== Apple Standard Mouse ===
A rubber-coated steel ball turns two capstans, each driving a slotted '''interrupter wheel'''. Two beams of infrared light shine through the slots onto two detectors offset just enough to produce two square waves '''90° out of phase''' — the ''interrupt'' signal and the ''quadrature'' signal. The quadrature signal precedes the interrupt signal by 90° when the wheel turns one way and trails it when it turns the other. A microprocessor in the mouse counts the edges and also acts as the mouse's ADB transceiver.<ref name="gmfh" />


=== Extended Keyboard Protocol ===
{| class="wikitable styled-table" style="width:70%;"
|+'''ADB transceiver register 0 in the Apple Standard Mouse''' (Apple Table 8-4)<ref name="gmfh" />
! Bit !! Meaning
|-
| 15 || Button status; '''0 = down'''
|-
| 14–8 || '''Y''' move counts, two's complement. Negative = up, positive = down
|-
| 7 || '''Not used (always 1)'''
|-
| 6–0 || '''X''' move counts, two's complement. Negative = left, positive = right
|}


The Extended Keyboard Protocol distinguishes between left and right modifier keys:
The first byte carries '''Y''', not X; the move fields are '''7-bit two's complement''', so the range per report is '''−64 to +63'''; and bit 7 is fixed at 1, not a second button. Resolution is '''100 ±10 counts per inch''' at Device Handler ID $0001 and '''200 ±10''' at $0002; the mouse powers up and resets to $0001.<ref name="gmfh" /> See [[Apple Desktop Bus Mouse]] for the device itself.


{| class="wikitable" style="width:80%; text-align:center;"
=== Apple Standard Keyboard ===
|+'''Extended Keyboard Protocol (Handler ID $03)'''
{| class="wikitable styled-table" style="width:70%;"
! Register !! Format !! Description
|+'''Register 0 in the Apple Standard Keyboard''' (Apple Table 8-7)<ref name="gmfh" />
! Bit !! Meaning
|-
|-
| 0 || 2 bytes || Two key events: 7-bit keycode + 1-bit up/down flag each
| 15 || Key status for first key; 0 = down
|-
|-
| 1 || Undefined || Reserved for vendor use
| 14–8 || Key code for first key; a 7-bit value
|-
|-
| 2 || 2 bytes || LED status and modifier key states
| 7 || Key status for second key; 0 = down
|-
|-
| 3 || 2 bytes || Device address and handler ID
| 6–0 || Key code for second key; a 7-bit value
|}
|}


'''Register 2 Extended Format:'''
'''Two key events fit in one register-0 read''' — this is the origin of ADB keyboards' 2-key reporting, and it is a property of the register format, not of the switch matrix.
* Bit 0: Num Lock LED (0=off, 1=on)
* Bit 1: Caps Lock LED
* Bit 2: Scroll Lock LED 
* Bit 3: Compose LED
* Bit 4: Kana LED
* Bit 5: Power LED
* Bit 6: Reserved
* Bit 7: Delete key state


'''Extended Keycodes:'''
{| class="wikitable styled-table" style="width:60%;"
* $32: Left Shift
|+'''Register 2 in the Apple Standard Keyboard''' (Apple Table 8-8)<ref name="gmfh" />
* $38: Right Shift 
! Bit !! Key
* $37: Left Command
* $3C: Right Command
* $3A: Left Option
* $3D: Right Option
* $36: Left Control
* $3E: Right Control
 
=== Extended Mouse Protocol ===
 
The Extended Mouse Protocol (Handler ID $04) supports multiple buttons and higher precision:
 
'''Standard Mouse Protocol (Handler ID $01):'''
* Register 0: 2 bytes
* Byte 0: Button state (bit 7) + X delta (bits 6-0, signed)
* Byte 1: Button state (bit 7) + Y delta (bits 6-0, signed)
* Resolution: 100±10 counts per inch
* Movement range: -64 to +63 per packet
 
'''Enhanced Resolution (Handler ID $02):'''
* Same format as standard protocol
* Resolution increased to 200±10 counts per inch
 
'''Extended Protocol Features:'''
* Support for up to 8 buttons
* 16-bit movement deltas
* Configurable resolution up to 400 CPI
* Scroll wheel support (vendor-specific)
 
== Complete Handler ID Registry ==
 
Device Handler IDs identify specific device types and operational modes:
 
{| class="wikitable" style="width:85%; text-align:center;"
|+'''Comprehensive ADB Handler ID Assignments'''
! Handler ID !! Device Category !! Description !! Notes
|-
|-
| $00 || System || Self-test failed || Device diagnostics failure
| 15 || None (reserved)
|-
|-
| $01 || Keyboard || Apple Keyboard || Original keyboard protocol
| 14 || Delete
|-
|-
| $02 || Keyboard || Apple Extended Keyboard || Standard extended keyboard
| 13 || Caps Lock
|-
|-
| $03 || Keyboard || Extended Protocol || Distinguishes left/right modifiers
| 12 || Reset
|-
|-
| $04 || Keyboard || ISO Layout || International keyboard support
| 11 || Control
|-
|-
| $05 || Keyboard || Apple Adjustable Keyboard || Ergonomic split keyboard
| 10 || Shift
|-
|-
| $06-$07 || Keyboard || Reserved || Future keyboard types
| 9 || Option
|-
|-
| $08 || Keyboard || JIS Layout || Japanese keyboard
| 8 || Command
|-
|-
| $09-$0F || Keyboard || Vendor-specific || Third-party keyboards
| 7–0 || None (reserved)
|}
 
A '''0''' indicates that the key is down. Note what register 2 is '''not''': on the Apple Standard Keyboard it carries no LED bits at all. Descriptions giving register 2 a "Compose LED", a "Kana LED" or a "Power LED" are inventions.
 
=== Apple Extended Keyboard ===
The Extended Keyboard uses the same register-0 format and an extended register 2:<ref name="gmfh" />
 
{| class="wikitable styled-table" style="width:60%;"
|+'''Register 2 in the Apple Extended Keyboard''' (Apple Table 8-11)
! Bit !! Meaning
|-
|-
| colspan="4" style="background:#f0f0f0" |
| 15 || None (reserved)
|-
|-
| $01 || Mouse || Standard Mouse || 100 CPI, single button
| 14 || Delete
|-
|-
| $02 || Mouse || 200 CPI Mouse || Enhanced resolution
| 13 || Caps Lock
|-
|-
| $03 || Mouse || Mouse Systems A3 || Three-button mouse
| 12 || Reset
|-
|-
| $04 || Mouse || Extended Mouse || Multi-button support
| 11 || Control
|-
|-
| $05-$0F || Mouse || Vendor-specific || Third-party mice
| 10 || Shift
|-
|-
| colspan="4" style="background:#f0f0f0" |
| 9 || Option
|-
|-
| $10-$1F || Tablet || Graphics tablets || Absolute positioning devices
| 8 || Command
|-
|-
| $20 || Joystick || Standard joystick || Game controllers
| 7 || Num Lock / Clear
|-
|-
| $21-$2F || Other || Special devices || Miscellaneous input
| 6 || Scroll Lock
|-
|-
| $30-$3F || Reserved || Apple reserved || Future Apple devices
| 5–3 || None (reserved)
|-
|-
| $40-$FD || Vendor || Vendor-specific || Custom implementations
| 2 || LED 3 (Scroll Lock)
|-
|-
| $FE || System || Change address || Collision resolution command
| 1 || LED 2 (Caps Lock)
|-
|-
| $FF || System || Self-test passed || Device diagnostics success
| 0 || LED 1 (Num Lock)
|}
|}


== Advanced Implementation Details ==
A zero indicates a key is down '''or that an LED is on'''. The three LED bits are the only writable ones, and they are set with a '''Listen Register 2''' command.<ref name="gmfh" />
 
Changing the Extended Keyboard's Device Handler ID in register 3 from '''$0002 to $0003''' makes it generate distinct transition codes for the '''right-hand Option and Control keys''' — those two keys only. This is done with a Listen Register 3 command.<ref name="gmfh" />


=== Electrical Specifications ===
=== Macintosh Portable ===
The Portable is a special case throughout. Its ADB transceiver function is in the Power Manager IC and keyswitch encoding is done by a separate keyboard processor. Its keyboard is a '''keyswitch matrix only, with no active electronics''' — 63 keyswitches on a steel plate. Its trackball is electrically ADB-compatible but uses a few pins of a large shared connector, with default Handler ID $0001 and the same address as a mouse.<ref name="gmfh" />


{| class="wikitable" style="width:75%; text-align:center;"
Apple's warning is worth repeating because it is still a live hazard: '''any input device connected to the Macintosh Portable ADB must be a low-power version.''' Keyboards and mice from other Macintosh models are not usable, and connecting them "could cause an unacceptable decrease in the +5 volt supply voltage and result in improper operation".<ref name="gmfh" />
|+'''ADB Electrical Characteristics'''
! Parameter !! Specification !! Notes
|-
| Bus voltage || 5.0V ± 5% || Supplied by host
|-
| Logic high (VIH) || 2.0V minimum || TTL compatible
|-
| Logic low (VIL) || 0.8V maximum || TTL compatible
|-
| Output low (VOL) || 0.4V maximum || At 4mA sink current
|-
| Pull-up resistance || 470Ω - 1kΩ || External resistor required
|-
| Bus capacitance || 200pF maximum || Per device
|-
| Rise time || 1.0μs maximum || 10% to 90%
|-
| Fall time || 300ns maximum || 90% to 10%
|-
| Current per device || 100mA maximum || From +5V supply
|-
| Total bus current || 500mA maximum || All devices combined
|}


=== Reset and Initialization Sequence ===
== Software ==


'''Power-On Reset:'''
The ADB Manager is the part of the Operating System that talks to the bus. Applications normally do not touch it — keyboard and mouse input arrives through the Event Manager.<ref name="adbmgr" />
# Host asserts reset (bus low) for minimum 3ms
# Devices wait up to 1 second for initialization
# Host begins enumeration at default addresses
# Devices respond with Register 3 contents
# Collision resolution if multiple devices present
# Handler installation for recognized devices
# Normal polling operations begin


'''Soft Reset (SendReset Command):'''
Its published routines are:<ref name="adbmgr" />
* Command: Address $0, Command $0, Register $0
* '''<code>CountADBs</code>''' — counts entries in the ADB device table.
* All devices reset to startup state
* '''<code>GetIndADB</code>''' — returns information about a device by its index in the table.
* Devices clear pending actions
* '''<code>GetADBInfo</code>''' — the same information, by address.
* Return to default addresses
* '''<code>SetADBInfo</code>''' — used by a device handler's installation code to set its own entry.
* Preserve handler ID settings
* '''<code>ADBOp</code>''' — transmits a command byte directly. Always executed asynchronously; if the bus is busy the command is queued.
* '''<code>ADBReInit</code>''' — reinitialises the bus.


=== Data Register Formats ===
Device handlers live in <code>'ADBS'</code> resources in the System file; at startup the Start Manager loads and executes them, reads register 3 in each device, and places each device's default address and Device Handler ID in the ADB device table.<ref name="adbmgr" /> Because <code>GetIndADB</code> and <code>GetADBInfo</code> return the device's '''original''' handler ID and default address, they remain a reliable way to identify what a device is even after enumeration has moved it.


'''Register 0 (Primary Data):'''
== Troubleshooting ==
* Always contains device's main data
* Must have data available when asserting SRQ
* 2-8 bytes depending on device type
* Updated only when new data available


'''Register 1 (Device-Specific):'''
=== Nothing enumerates ===
* Vendor-defined functionality
* '''Measure +5 V at pin 3 against pin 4''' at the port with nothing connected.
* Configuration storage
* '''Pin 1 should idle high''', held up by the 470 Ω pull-up on the logic board. A pin 1 sitting at 0 V with nothing plugged in is a fault on the computer, not the peripheral; and a bus held low for more than 3 ms is a permanent Global Reset condition.
* Extended data for complex devices
* Check the ADB fuse on the logic board for the specific machine. Blowing it by hot-plugging is the classic cause.
* Not standardized by Apple


'''Register 2 (Device-Specific):'''
=== Intermittent device ===
* Secondary configuration
* Check continuity of all four conductors end to end, flexing the cable at the strain relief as you go.
* LED control (keyboards)
* Shorten the chain. Apple recommends no more than three devices per port, and 5 m of cable total.
* Button mapping (mice)
* Total bus draw must stay under 500 mA; a chain of powered accessories can exceed it.
* Calibration data (tablets)


'''Register 3 (Status/Configuration):'''
=== Device works alone but not in a chain ===
{| class="wikitable" style="width:70%; text-align:center;"
This is usually an address collision that failed to resolve, or a device with a defective collision detector. Disconnect everything else, restart, and add devices back one at a time.
! Bits !! Field !! Description
|-
| 15-8 || Exceptional Event || Device-specific flags
|-
| 15 || Reserved || Always 0
|-
| 14 || Exception || Device exception occurred
|-
| 13 || SRQ Enable || Service requests enabled
|-
| 12-8 || Device Flags || Device-specific status
|-
| 7-0 || Handler ID || Current device handler
|}


=== Error Handling and Recovery ===
=== With an oscilloscope ===
* Look for the '''800 µs Attention''' pulse followed by the '''65 µs Sync''' high.
* Look for the device answering within '''260 µs''' of a Talk command.
* In the idle state you should see the last Talk command repeat '''every 11 ms'''. If the host is transmitting and the device never answers, the fault is in the device; if the host is not transmitting at all, it is not.


'''Timeout Handling:'''
== Adapters and Modern Use ==
* No response timeout: 260μs after Tlt
* Incomplete data timeout: 130μs between bytes
* Host marks device as non-responsive
* Periodic retry attempts every 1 second


'''CRC and Data Integrity:'''
ADB-to-USB conversion is the usual route to using these devices today. Commercial adapters of the period (notably Griffin's iMate) are long discontinued, and community-built converters come and go. This page does not endorse a particular one; check current sources before buying, and check that whatever you find implements the timing in the table above rather than approximating it.
* No built-in error detection
* Devices responsible for data validation
* Host can request retransmission via Talk command
* Application-level checksums recommended for critical data


'''Bus Recovery:'''
== See Also ==
# Detect bus stuck low > 1ms
* [[Apple Desktop Bus Keyboard]]
# Issue reset pulse
* [[Apple Desktop Bus Mouse]]
# Wait for bus to return high
* [[Apple Desktop Bus Mouse II]]
# Resume normal operations
* [[Apple Extended Keyboard II]]
# Log error for diagnostic purposes
* [[Apple IIGS]]


== Troubleshooting ==
== References ==


=== Common Problems ===
<references />
{| class="wikitable" style="width:80%; text-align:center;"
|+'''ADB Troubleshooting Guide'''
! Problem !! Possible Cause !! Solution
|-
| No devices recognized || Blown ADB fuse || Replace fuse or motherboard repair
|-
| Intermittent device || Damaged cable || Check continuity, replace if needed
|-
| Device not found || Address collision || Disconnect other devices, restart
|-
| Erratic behavior || Bus termination issue || Check cable length (<5m total)
|-
| Power issues || Overloaded bus || Remove devices, check power draw
|-
| Random disconnects || Failing transceiver || Replace ADB controller
|}


=== Diagnostic Tools ===
* '''ADB Parser:''' Classic Mac OS tool for bus analysis
* '''TechTool:''' Hardware diagnostic suite
* '''MacsBug:''' Low-level debugging access to ADB
[[Category:Apple Desktop Bus]]
[[Category:Apple Desktop Bus]]
[[Category:Apple Vintage Computers]]
[[Category:Apple Vintage Computers]]
[[Category:Apple Vintage Accessories]]
[[Category:Apple Vintage Accessories]]