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