Keyboard firmwares for Atmel AVR and Cortex-M
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

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