You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

README.md 6.1KB

11 jaren geleden
11 jaren geleden
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. M0110/M0110A to USB keyboard converter
  2. ======================================
  3. This firmware converts the protocol of Apple Macintosh keyboard M0110/M0110A into USB.
  4. Target board of this project is [PJRC Teensy](http://www.pjrc.com/teensy/), though,
  5. you can use other board with USB AVR like `ATmega32U4` and `AT90USB`.
  6. ![M0110](https://raw.github.com/tmk/tmk_keyboard/master/converter/m0110_usb/doc/m0110.jpg)
  7. - M0110A support was contributed by [skagon@github](https://github.com/skagon).
  8. - M0120 also is supported. keys(+ * / and ,) on M0120 are recognized as cursor keys.
  9. Connection
  10. ----------
  11. You need 4P4C plug and cable to connect Teensy or other AVR dev board into the keyboard.
  12. Teensy port `PF0` is assigned for `CLOCK` line and `PF1` for `DATA` by default,
  13. you can change pin configuration with editing *config.h*.
  14. You can find 4P4C plugs on telephone handset cable. Note that it is *crossover* connection
  15. while Macintosh keyboard cable is *straight*.
  16. [![Conection](https://raw.github.com/tmk/tmk_keyboard/master/converter/m0110_usb/doc/teensy.jpg)]
  17. In this pic:
  18. 1. `GND`(Black)
  19. 2. `CLOCK`(Red)
  20. 3. `DATA`(Green)
  21. 4. `+5V`(Yellow)
  22. Note that wire colors may vary in your cable.
  23. ### Pinout
  24. - <http://pinouts.ru/Inputs/MacKeyboard_pinout.shtml>
  25. - <http://en.wikipedia.org/wiki/Modular_connector#4P4C>
  26. ![Jack fig](http://www.kbdbabel.org/conn/kbd_connector_macplus.png)
  27. ### Pull-up Registor
  28. You may need pull-up registors on signal lines(`CLOCK`, `DATA`) in particular
  29. when you have long or coiled cable. 1k-10k Ohm will be OK for this purpose.
  30. In some cases MCU can't read signal from keyboard correctly without pull-up resistors.
  31. Building Frimware
  32. -----------------
  33. To compile firmware you need AVR GCC. You can use [WinAVR](http://winavr.sourceforge.net/) on Windows.
  34. You can edit *Makefile* and *config.h* to change compile options and pin configuration.
  35. $ git clone git://github.com/tmk/tmk_keyboard.git (or download source)
  36. $ cd m0110_usb
  37. $ make -f Makefile.lufa clean
  38. $ make -f Makefile.lufa
  39. and program your Teensy with [PJRC Teensy loader](http://www.pjrc.com/teensy/loader.html).
  40. Keymap
  41. ------
  42. You can change keymaps by editing *keymap.c*.
  43. ### M0110 & M0120
  44. #### *Default*
  45. ,---------------------------------------------------------. ,---------------.
  46. | `| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backs| |Ctl| -|Lft|Rgt|
  47. |---------------------------------------------------------| |---------------|
  48. |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \| | 7| 8| 9| Up|
  49. |---------------------------------------------------------| |---------------|
  50. |Fn0 | A| S| D| F| G| H| J| K| L| ;| '|Return| | 4| 5| 6| Dn|
  51. |---------------------------------------------------------| |---------------|
  52. |Shift | Z| X| C| V| B| N| M| ,| ,| /|Shift | | 1| 2| 3| |
  53. `---------------------------------------------------------' |-----------|Ent|
  54. |Ctl|Alt | Space |Gui |Ctl| | 0| .| |
  55. `-----------------------------------------------' `---------------'
  56. #### *HHKB/WASD Layer(WASD/IJKL)*
  57. ,---------------------------------------------------------. ,---------------.
  58. |Esc| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|Delet| |Nlk| -|Lft|Rgt|
  59. |---------------------------------------------------------| |---------------|
  60. |Caps |Hom| Up|PgU| | | |PgU| Up|Hom|Psc|Slk|Pau|Ins| | 7| 8| 9| Up|
  61. |---------------------------------------------------------| |---------------|
  62. |Fn0 |Lef|Dow|Rig| | | |Lef|Dow|Rig| | |Return| | 4| 5| 6| Dn|
  63. |---------------------------------------------------------| |---------------|
  64. |Shift |End| |PgD| | | |PgD| |End| |Shift | | 1| 2| 3| |
  65. `---------------------------------------------------------' |-----------|Ent|
  66. |Ctl|Alt | Space |Gui |Ctl| | 0| .| |
  67. `-----------------------------------------------' `---------------'
  68. ### M0110A
  69. #### *Default*
  70. ,---------------------------------------------------------. ,---------------.
  71. | `| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backs| |Ctl| =| /| *|
  72. |---------------------------------------------------------| |---------------|
  73. |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| | | 7| 8| 9| -|
  74. |-----------------------------------------------------' | |---------------|
  75. |Fn0 | A| S| D| F| G| H| J| K| L| ;| '|Return| | 4| 5| 6| +|
  76. |---------------------------------------------------------| |---------------|
  77. |Shift | Z| X| C| V| B| N| M| ,| ,| /|Shft| Up| | 1| 2| 3| |
  78. |---------------------------------------------------------| |-----------|Ent|
  79. |Alt |Gui | Space | \|Lft|Rgt| Dn| | 0| .| |
  80. `---------------------------------------------------------' `---------------'
  81. #### *Cursor Layer(WASD/IJKL)*
  82. ,---------------------------------------------------------. ,---------------.
  83. |Esc| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|Delet| |Nlk| =| /| *|
  84. |---------------------------------------------------------| |---------------|
  85. |Caps |Hom| Up|PgU| | | |PgU| Up|Hom|Psc|Slk|Pau| | | 7| 8| 9| -|
  86. |-----------------------------------------------------' | |---------------|
  87. |Fn0 |Lef|Dow|Rig| | | |Lef|Dow|Rig| | |Return| | 4| 5| 6| +|
  88. |---------------------------------------------------------| |---------------|
  89. |Shift |End| |PgD| | | |PgD| |End| |Shif|PgU| | 1| 2| 3| |
  90. |---------------------------------------------------------| |-----------|Ent|
  91. |Alt |Gui | Space |Ins|Hom|End|PgD| | 0| .| |
  92. `---------------------------------------------------------' `---------------'
  93. Debug
  94. -----
  95. You can use [PJRC HID listen](http://www.pjrc.com/teensy/hid_listen.html) to see debug output.
  96. The converter has some functions for debug, press `<magickey>+H` simultaneously to get help.
  97. These function is totally undocumented, tentative, inconsistent and buggy.
  98. magickey: Shift+Option+Command(Shift+Alt+Gui or Shift+Alt+Control)