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.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  1. X68000 to USB keyboard protocol converter
  2. =========================================
  3. SHARP X68000 is a hobby computer released in Japan.(1987-93)
  4. http://en.wikipedia.org/wiki/Sharp_X68000
  5. X68000 keyboard has ALPS linear switches.
  6. - DSETK0016CE01 green linear
  7. - DSETK0022CE02 yellow linear
  8. - DSETK0023CE03 yellow linear
  9. Hardware
  10. --------
  11. Target MCU is ATMega32u4 but other USB capable AVR will also work.
  12. You can use PJRC Teensy as development board.
  13. http://www.pjrc.com/teensy/
  14. Wiring:
  15. Mini-DIN Teensy
  16. -----------------------------------------------------
  17. pin1 +5V VCC
  18. pin2 MOUSE -
  19. pin3 RXD PD2(RXD)
  20. pin4 TXD PD3(TXD) NOTE: Not supported yet.
  21. pin5 READY -
  22. pin6 REMOTE -
  23. pin7 GND GND
  24. Firmware
  25. --------
  26. Build:
  27. $ cd x68k_usb
  28. $ make
  29. And load the binary to MCU with your favorite programmer.
  30. If you use Teensy you can load with PJRC Teensy Loader tool.
  31. http://www.pjrc.com/teensy/loader.html
  32. * * * * * * * * * * * * * * * * * *
  33. X68000 Keyboard Protocol
  34. ========================
  35. http://kyoutan.jpn.org/uts/pc/pic/x68key/
  36. Connector
  37. ---------
  38. Mini DIN 7pin(female connector on computer side)
  39. 7 6 5
  40. o o o
  41. 4 o = o 3
  42. o o
  43. 2 1
  44. Mini-DIN
  45. -------------
  46. pin1 +5V
  47. pin2 MOUSE
  48. pin3 RXD
  49. pin4 TXD
  50. pin5 READY
  51. pin6 REMOTE
  52. pin7 GND
  53. Signaling
  54. ---------
  55. - TXD,RXD
  56. Asynchronous, 2400baud, 1-startbit(L), 8-databit, 1-stopbit(H)
  57. - READY
  58. ready/not ready(1/0)
  59. Data from keyboard
  60. ------------------
  61. bit 7 make/break flag(0/1)
  62. bit 6-0 following scan code
  63. Data from computer
  64. ------------------
  65. - LED control ON/OFF(0/1)
  66. bit 7 1(fixed)
  67. bit 6 全角
  68. bit 5 ひらがな
  69. bit 4 INS
  70. bit 3 CAPS
  71. bit 2 コード入力
  72. bit 1 ローマ字
  73. bit 0 かな
  74. - Repeat delay
  75. bit 7 0(fixed)
  76. bit 6 1(fixed)
  77. bit 5 1(fixed)
  78. bit 4 0(fixed)
  79. bit 3-0 delay
  80. REPEAT_DELAY = 200+delay*100 ms
  81. default: 500ms
  82. - Repeat time
  83. bit 7 0(fixed)
  84. bit 6 1(fixed)
  85. bit 5 1(fixed)
  86. bit 4 1(fixed)
  87. bit 3-0 time
  88. REPEAT_TIME = 30+time^2*5 ms
  89. default: 110ms
  90. Scan Codes
  91. ----------
  92. ,---. ,---. ,-------------------, ,-------------------. ,-----------. ,---------------.
  93. | 61| | 62| | 63| 64| 65| 66| 67| | 68| 69| 6A| 6B| 6C| | 5A| 5B| 5C| | 5D| 52| 53| 54|
  94. `---' `---' `-------------------' `-------------------' `-----------' `---------------'
  95. ,-----------------------------------------------------------. ,-----------. ,---------------.
  96. | 01| 02| 03| 04| 05| 06| 07| 08| 09| 0A| 0B| 0C| 0D| 0E| 0F| | 36| 5E| 37| | 3F| 40| 41| 42|
  97. |-----------------------------------------------------------| |------------ |---------------|
  98. | 10 | 11| 12| 13| 14| 15| 16| 17| 18| 19| 1A| 1B| 1C| | | 38| 39| 3A| | 43| 44| 45| 46|
  99. |------------------------------------------------------. 1D | `---=====---' |---------------|
  100. | 71 | 1E| 1F| 20| 21| 2l| 23| 24| 25| 26| 27| 28| 29| | ___| 3C|___ | 47| 48| 49| 4A|
  101. |-----------------------------------------------------------| | 3B|---| 3D| |-----------|---|
  102. | 70 | 2A| 2B| 2C| 2D| 2E| 2F| 30| 31| 32| 33| 34| 70 | `---| 3E|---' | 4B| 4C| 4D| |
  103. `-----------------------------------------------------------| .---=====---. |-----------| 4E|
  104. | 5F| 55 | 56 | 35 | 57 | 58 | 59 | 60| | 72 | 73 | | 4F| 50| 51| |
  105. `---------------------------------------------' `-----------' `---------------'
  106. LED Special Functions
  107. ---------------------
  108. http://homepage2.nifty.com/m_kamada/docs/unlistedx68k.htm#keyboard
  109. 1. Random Illumination
  110. Plug in with pressing F1, F2 and F3.
  111. 2. Sequential Illumination
  112. Plug in with pressing 記号入力(52), 登録(53) and HELP.
  113. 3. Scan code Display
  114. Plug in with pressing かな(5A), ローマ字(5B) and コード入力(5C).
  115. You can see its scan code on LEDs by pressing a key.
  116. +---------------------------------------------------+
  117. |bit|6 |5 |4 |3 |2 |1 |0 |
  118. |---+----+--------+---+----+----------+--------+----|
  119. |LED|全角|ひらがな|INS|CAPS|コード入力|ローマ字|かな|
  120. +---------------------------------------------------+