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 3.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  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. - DSETK0023CE03 yellow linear
  8. Hardware
  9. --------
  10. Target MCU is ATMega32u4 but other USB capable AVR will also work.
  11. You can use PJRC Teensy as dev board.
  12. http://www.pjrc.com/teensy/
  13. Wiring:
  14. Mini-DIN Teensy
  15. -----------------------------------------------------
  16. pin1 +5V VCC
  17. pin2 MOUSE -
  18. pin3 RXD PD2(RXD)
  19. pin4 TXD PD3(TXD) NOTE: Not supported yet.
  20. pin5 READY -
  21. pin6 REMOTE -
  22. pin7 GND GND
  23. Firmware
  24. --------
  25. Build:
  26. $ cd x68k_usb
  27. $ make
  28. And load the binary to MCU with your favorite programmer.
  29. If you use Teensy you can load with PJRC Teensy Loader tool.
  30. http://www.pjrc.com/teensy/loader.html
  31. * * * * * * * * * * * * * * * * * *
  32. X68000 Keyboard Protocol
  33. ========================
  34. http://kyoutan.jpn.org/uts/pc/pic/x68key/
  35. Connector
  36. ---------
  37. Mini DIN 7pin(female connector on computer side)
  38. 7 6 5
  39. o o o
  40. 4 o = o 3
  41. o o
  42. 2 1
  43. Mini-DIN
  44. -------------
  45. pin1 +5V
  46. pin2 MOUSE
  47. pin3 RXD
  48. pin4 TXD
  49. pin5 READY
  50. pin6 REMOTE
  51. pin7 GND
  52. Signaling
  53. ---------
  54. - TXD,RXD
  55. Asynchronous, 2400baud, 1-startbit(L), 8-databit, 1-stopbit(H)
  56. - READY
  57. ready/not ready(1/0)
  58. Data from keyboard
  59. ------------------
  60. bit 7 make/break flag(0/1)
  61. bit 6-0 following scan code
  62. Data from computer
  63. ------------------
  64. - LED contorol ON/OFF(0/1)
  65. bit 7 1(fixed)
  66. bit 6 全角
  67. bit 5 ひらがな
  68. bit 4 INS
  69. bit 3 CAPS
  70. bit 2 コード入力
  71. bit 1 ローマ字
  72. bit 0 かな
  73. - Repeat delay
  74. bit 7 0(fixed)
  75. bit 6 1(fixed)
  76. bit 5 1(fixed)
  77. bit 4 0(fixed)
  78. bit 3-0 delay
  79. REPEAT_DELAY = 200+delay*100 ms
  80. default: 500ms
  81. - Repeat time
  82. bit 7 0(fixed)
  83. bit 6 1(fixed)
  84. bit 5 1(fixed)
  85. bit 4 1(fixed)
  86. bit 3-0 time
  87. REPEAT_TIME = 30+time^2*5 ms
  88. default: 110ms
  89. Scan Codes
  90. ----------
  91. ,---. ,---. ,-------------------, ,-------------------. ,-----------. ,---------------.
  92. | 61| | 62| | 63| 64| 65| 66| 67| | 68| 69| 6A| 6B| 6C| | 5A| 5B| 5C| | 5D| 52| 53| 54|
  93. `---' `---' `-------------------' `-------------------' `-----------' `---------------'
  94. ,-----------------------------------------------------------. ,-----------. ,---------------.
  95. | 01| 02| 03| 04| 05| 06| 07| 08| 09| 0A| 0B| 0C| 0D| 0E| 0F| | 36| 5E| 37| | 3F| 40| 41| 42|
  96. |-----------------------------------------------------------| |------------ |---------------|
  97. | 10 | 11| 12| 13| 14| 15| 16| 17| 18| 19| 1A| 1B| 1C| | | 38| 39| 3A| | 43| 44| 45| 46|
  98. |------------------------------------------------------. 1D | `---=====---' |---------------|
  99. | 71 | 1E| 1F| 20| 21| 2l| 23| 24| 25| 26| 27| 28| 29| | ___| 3C|___ | 47| 48| 49| 4A|
  100. |-----------------------------------------------------------| | 3B|---| 3D| |-----------|---|
  101. | 70 | 2A| 2B| 2C| 2D| 2E| 2F| 30| 31| 32| 33| 34| 70 | `---| 3E|---' | 4B| 4C| 4D| |
  102. `-----------------------------------------------------------| .---=====---. |-----------| 4E|
  103. | 5F| 55 | 56 | 35 | 57 | 58 | 59 | 60| | 72 | 73 | | 4F| 50| 51| |
  104. `---------------------------------------------' `-----------' `---------------'