Firmware that emulates a trio of devices for Apple's ADB bus: a keyboard, a mouse, and a Global Village TelePort A300 ADB modem. The emulated keyboard and mouse are controlled by a PS/2 keyboard and mouse, the emulated modem is connected to a two-wire UART.
The menu key on the PS/2 keyboard is used as a modifier key which can be held and combined with the following keys:
Key | Function |
---|---|
F1 | Change UART baud rate to 300. |
F2 | Change UART baud rate to 1200. |
F3 | Change UART baud rate to 2400. |
F4 | Change UART baud rate to 4800. Note that this may cause the device connected to the UART to send faster than the Macintosh can receive, which will result in undefined behavior. |
Pause | Send power key keypress. Note that this cannot be used to start up the Macintosh, as the microcontroller requires power to be able to read the PS/2 keyboard. |
PS/2 mice require their host to send a command byte to start the flow of mouse movement data. TashTrio firmware sends this byte on startup only, meaning that the PS/2 mouse must be plugged in at powerup time or it will appear dead. Because some newer Macintosh computers are known to supply power to the ADB port even when powered down, it is necessary to connect the PS/2 mouse before connecting to the ADB.
Building the firmware requires Microchip MPASM, which is included with their development environment, MPLAB. Note that you must use MPLAB X version 5.35 or earlier or MPLAB 8 as later versions of MPLAB X have removed MPASM.
Just a quick, minimal schematic.
ICSP LVP with just an FT232R adapter appears to be one fast and cheap way.
There are certain limitations on PIC12F1840 when programmed the LVP way. In this method, the MCLR pin must remain MCLR and cannot take GPIO functions. Therefore, RA3 cannot be used if the firmware is programmed in LVP mode. RA3 is the PS/2 Keyboard Data signal, therefore the keyboard will not work if the firmware is programmed in LVP mode. When firmware is programmed in HVP mode (like with PICkit3), the RA3 pin can take GPIO function and the keyboard will work.
RA1 (UART RX) can be used instead of RA3 for PS2 keyboard data input. Switching between RA1 and RA3 could be implemented via 2-pole switch or jumper on the board.
One option on Windows is PICPgm. For FT232R, you need to use the USB LVP programmer preset and remap the pins. Attached a one-pager PICPgm hints for FT23.
Microchip PIC12F1840 Product page
Microchip PIC12F1840 Datasheet
8-bit PIC design recommendations
Topic: TMK ADB to USB keyboard converter