This firmware converts the protocol of Apple Macintosh keyboard M0110/M0110A into USB.
Target board of this project is [PJRC Teensy](http://www.pjrc.com/teensy/), though,
you can use other board with USB AVR like `ATmega32U4` and `AT90USB`.
This firmware converts the protocol of Apple Macintosh keyboard **M0110**, **M0110A** and **M0120** into USB. Target of this project is USB AVR controller **ATmega32U4**. Using this converter you can revive these retro keyboards with modern computer.
- M0110A support was contributed by [skagon@github](https://github.com/skagon).
- M0120 also is supported. keys(+ * / and ,) on M0120 are recognized as cursor keys.
@ -13,49 +15,42 @@ you can use other board with USB AVR like `ATmega32U4` and `AT90USB`.
Update
------
- 2013/08 Change port for signals PF to PD
- 2013/08: Change port for signals `PF` to `PD`
- 2013/09: Change port again, it uses inversely `PD0` for data and `PD1` for clock line now.
Connection
----------
You need 4P4C plug and cable to connect Teensy or other AVR dev board into the keyboard.
Teensy port `PD0` is assigned for `CLOCK` line and `PD1` for `DATA` by default,
you can change pin configuration with editing *config.h*.
Building Hardware
-----------------
You need **4P4C** cable and **ATMega32U4** board like PJRC [Teensy]. Port of the MCU `PD1` is assigned to `CLOCK` line and `PD0` to `DATA` by default, you can change pin configuration with editing `config.h`.
You can find 4P4C plugs on telephone handset cable. Note that it is *crossover* connection
You may need pull-up registors on signal lines(`CLOCK`, `DATA`) in particular
when you have long or coiled cable. 1k-10k Ohm will be OK for this purpose.
In some cases MCU can't read signal from keyboard correctly without pull-up resistors.
You may need pull-up registors on signal lines(`CLOCK`, `DATA`) in particular when you have long or coiled cable. **1k-10k Ohm** will be OK for this purpose. In that case the converter may not read signal from keyboard correctly without pull-up resistors.
Building Frimware
-----------------
To compile firmware you need AVR GCC. You can use [WinAVR](http://winavr.sourceforge.net/) on Windows.
You can edit *Makefile* and *config.h* to change compile options and pin configuration.
To compile firmware you need AVR GCC. You can edit *Makefile* and *config.h* to change compile options and pin configuration.
You can use [PJRC HID listen](http://www.pjrc.com/teensy/hid_listen.html) to see debug output.
The converter has some functions for debug, press `<magickey>+H` simultaneously to get help.
These function is totally undocumented, tentative, inconsistent and buggy.
You can use [PJRC HID listen](http://www.pjrc.com/teensy/hid_listen.html) to see debug output. The converter has some functions for debug, press `<Command>+H` simultaneously to get help.
magickey: Shift+Option+Command(Shift+Alt+Gui or Shift+Alt+Control)
- Command: `Shift+Option+Command`(`Shift+Alt+Gui` or `Shift+Alt+Control`)