Apple Desktop Bus: Difference between revisions
Created page with "{{Infobox connector | name = Apple Desktop Bus | logo = 150px | type = Computer peripheral interface | designer = Steve Wozniak | design_date = 1985-1986 | manufacturer = Apple Computer | production = 1986-1999 | superseded = USB | external = Yes | hotplug = Technically capable but not recommended | cable = 4-conductor shielded | pins = 4 | connector = Mini-..." |
No edit summary |
||
| (5 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
{{Infobox connector | {{Infobox connector | ||
| name = Apple Desktop Bus | | name = Apple Desktop Bus | ||
| logo = [[File: | | logo = [[File:Apple Desktop Bus (icon).svg|150px]] | ||
| type = Computer peripheral interface | | type = Computer peripheral interface | ||
| designer = | | designer = Steve Wozniak | ||
| design_date = 1985-1986 | | design_date = 1985-1986 | ||
| manufacturer = | | manufacturer = Apple Computer | ||
| production = 1986-1999 | | production = 1986-1999 | ||
| superseded = [[Universal Serial Bus|USB]] | | superseded = [[Universal Serial Bus|USB]] | ||
| Line 20: | Line 20: | ||
| 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]]}} | ||
'''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. | |||
'''Apple Desktop Bus''' ('''ADB''') is a proprietary bit-serial peripheral bus connecting low-speed input devices to computers. Designed by | |||
== History and Development == | == History and Development == | ||
| Line 36: | Line 35: | ||
* '''1987-1998:''' Standard on all desktop Macintosh computers | * '''1987-1998:''' Standard on all desktop Macintosh computers | ||
* '''1991-1998:''' Used in PowerBook line | * '''1991-1998:''' Used in PowerBook line | ||
* '''1989-1996:''' Implemented in some | * '''1989-1996:''' Implemented in some NeXT computer models | ||
* '''1998:''' Phased out with introduction of [[iMac]] | * '''1998:''' Phased out with introduction of [[iMac G3]] (USB-based) | ||
* '''1999:''' Last external ADB port on [[Power Macintosh G3 (Blue and White)]] | * '''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 | * '''2000-2005:''' Internal ADB protocol continued in some PowerBooks for built-in keyboards/trackpads | ||
| Line 343: | Line 342: | ||
=== ADB to USB Adapters === | === ADB to USB Adapters === | ||
* '''Griffin iMate | * '''Griffin iMate:''' Original commercial adapter (discontinued) | ||
* '''Wombat | * '''Wombat:''' Modern bidirectional ADB-USB converter | ||
* '''Belkin F5U118 | * '''Belkin F5U118:''' Simple ADB to USB adapter | ||
=== USB to ADB Adapters === | === USB to ADB Adapters === | ||
* '''Wombat | * '''Wombat:''' Allows USB devices on ADB Macs | ||
* '''DIY solutions | * '''DIY solutions:''' Arduino-based converters | ||
=== Replacement Controllers === | === Replacement Controllers === | ||
* '''PIC16F87/88 | * '''PIC16F87/88:''' Drop-in replacement for failed SE controllers | ||
* '''Custom ASICs | * '''Custom ASICs:''' Modern reproductions for restoration | ||
== Legacy and Impact == | == Legacy and Impact == | ||
| Line 404: | Line 403: | ||
* Hardware copy-protection dongles | * Hardware copy-protection dongles | ||
* Modems and telecommunications devices | * 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 | |||
|- | |||
| Attention || 800 μs || ±3% || Host pulls bus low to initiate transaction | |||
|- | |||
| Sync || 70 μs || ±10% || Bus high between attention and command | |||
|- | |||
| Bit cell (total) || 100 μs || ±3% || Total time for one bit transmission | |||
|- | |||
| Logic 0 low time || 65 μs || ±3% || Low portion of logic 0 bit cell | |||
|- | |||
| Logic 0 high time || 35 μs || ±3% || High portion of logic 0 bit cell | |||
|- | |||
| Logic 1 low time || 35 μs || ±3% || Low portion of logic 1 bit cell | |||
|- | |||
| Logic 1 high time || 65 μs || ±3% || High portion of logic 1 bit cell | |||
|- | |||
| Stop bit || 0 || Always || Stop bit is always logic 0 | |||
|- | |||
| Service Request || 300 μs || Minimum || Device extends stop bit low to assert SRQ | |||
|- | |||
| Tlt (Stop-to-start) || 140-260 μs || Range || Bus high between command and data | |||
|- | |||
| SRQ detection window || 65-300 μs || Range || Period when devices can assert service request | |||
|} | |||
=== Transaction State Machine === | |||
Each ADB transaction follows a structured sequence: | |||
# '''Idle State:''' Bus remains high, devices wait for attention signal | |||
# '''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 === | |||
The collision detection system enables automatic address resolution: | |||
'''Collision Detection Process:''' | |||
# Device begins transmitting its data | |||
# 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 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 === | |||
The Service Request (SRQ) signal allows devices to request host attention without being polled: | |||
'''SRQ Assertion:''' | |||
* 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:''' | |||
# 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 == | |||
=== Extended Keyboard Protocol === | |||
The Extended Keyboard Protocol distinguishes between left and right modifier keys: | |||
{| class="wikitable" style="width:80%; text-align:center;" | |||
|+'''Extended Keyboard Protocol (Handler ID $03)''' | |||
! Register !! Format !! Description | |||
|- | |||
| 0 || 2 bytes || Two key events: 7-bit keycode + 1-bit up/down flag each | |||
|- | |||
| 1 || Undefined || Reserved for vendor use | |||
|- | |||
| 2 || 2 bytes || LED status and modifier key states | |||
|- | |||
| 3 || 2 bytes || Device address and handler ID | |||
|} | |||
'''Register 2 Extended Format:''' | |||
* 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:''' | |||
* $32: Left Shift | |||
* $38: Right Shift | |||
* $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 | |||
|- | |||
| $01 || Keyboard || Apple Keyboard || Original keyboard protocol | |||
|- | |||
| $02 || Keyboard || Apple Extended Keyboard || Standard extended keyboard | |||
|- | |||
| $03 || Keyboard || Extended Protocol || Distinguishes left/right modifiers | |||
|- | |||
| $04 || Keyboard || ISO Layout || International keyboard support | |||
|- | |||
| $05 || Keyboard || Apple Adjustable Keyboard || Ergonomic split keyboard | |||
|- | |||
| $06-$07 || Keyboard || Reserved || Future keyboard types | |||
|- | |||
| $08 || Keyboard || JIS Layout || Japanese keyboard | |||
|- | |||
| $09-$0F || Keyboard || Vendor-specific || Third-party keyboards | |||
|- | |||
| colspan="4" style="background:#f0f0f0" | | |||
|- | |||
| $01 || Mouse || Standard Mouse || 100 CPI, single button | |||
|- | |||
| $02 || Mouse || 200 CPI Mouse || Enhanced resolution | |||
|- | |||
| $03 || Mouse || Mouse Systems A3 || Three-button mouse | |||
|- | |||
| $04 || Mouse || Extended Mouse || Multi-button support | |||
|- | |||
| $05-$0F || Mouse || Vendor-specific || Third-party mice | |||
|- | |||
| colspan="4" style="background:#f0f0f0" | | |||
|- | |||
| $10-$1F || Tablet || Graphics tablets || Absolute positioning devices | |||
|- | |||
| $20 || Joystick || Standard joystick || Game controllers | |||
|- | |||
| $21-$2F || Other || Special devices || Miscellaneous input | |||
|- | |||
| $30-$3F || Reserved || Apple reserved || Future Apple devices | |||
|- | |||
| $40-$FD || Vendor || Vendor-specific || Custom implementations | |||
|- | |||
| $FE || System || Change address || Collision resolution command | |||
|- | |||
| $FF || System || Self-test passed || Device diagnostics success | |||
|} | |||
== Advanced Implementation Details == | |||
=== Electrical Specifications === | |||
{| class="wikitable" style="width:75%; text-align:center;" | |||
|+'''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 === | |||
'''Power-On Reset:''' | |||
# 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):''' | |||
* Command: Address $0, Command $0, Register $0 | |||
* All devices reset to startup state | |||
* Devices clear pending actions | |||
* Return to default addresses | |||
* Preserve handler ID settings | |||
=== Data Register Formats === | |||
'''Register 0 (Primary Data):''' | |||
* 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):''' | |||
* Vendor-defined functionality | |||
* Configuration storage | |||
* Extended data for complex devices | |||
* Not standardized by Apple | |||
'''Register 2 (Device-Specific):''' | |||
* Secondary configuration | |||
* LED control (keyboards) | |||
* Button mapping (mice) | |||
* Calibration data (tablets) | |||
'''Register 3 (Status/Configuration):''' | |||
{| class="wikitable" style="width:70%; text-align:center;" | |||
! 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 === | |||
'''Timeout Handling:''' | |||
* 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:''' | |||
* 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:''' | |||
# Detect bus stuck low > 1ms | |||
# Issue reset pulse | |||
# Wait for bus to return high | |||
# Resume normal operations | |||
# Log error for diagnostic purposes | |||
== Troubleshooting == | == Troubleshooting == | ||
| Line 426: | Line 731: | ||
=== Diagnostic Tools === | === Diagnostic Tools === | ||
* '''ADB Parser | * '''ADB Parser:''' Classic Mac OS tool for bus analysis | ||
* '''TechTool | * '''TechTool:''' Hardware diagnostic suite | ||
* '''MacsBug | * '''MacsBug:''' Low-level debugging access to ADB | ||
[[Category:Apple Desktop Bus]] | [[Category:Apple Desktop Bus]] | ||
[[Category:Apple Vintage Computers]] | |||
[[Category:Apple Vintage Accessories]] | |||