Add Sun converter initial files.
[tmk_keyboard.git] / converter / sun_usb / README
CommitLineData
97ee1be5 1Sun to USB keyboard protocol converter
2======================================
3
4TODO
5----
6AVR UART engine expect positive logic while Sun keyboard signal is inverted serial.
7To use AVR UART engine you need inverter in front of RX and TX pin.
8Otherwise you can software serial routine to communicate the keyboard.
9
10
11Hardware
12--------
13Target MCU is ATMega32u4 but other USB capable AVR will also work.
14You can use PJRC Teensy as dev board.
15 http://www.pjrc.com/teensy/
16
17Connector
18 8Pin mini DIN
19 ___ ___
20 / |_| \
21 / 8 7 6 \
22 | 5 4 3 |
23 \_ 2 1 _/
24 \_____/
25 (receptacle)
26
27Wiring:
28Pin mini DIN Teensy
29----------------------------------
301 GND GND
312 GND GND
323 5V
334 RX/TX(Mouse)
345 RX PD2
356 TX PD3
367 GND GND
378 5V VCC
38
39
40
41Firmware
42--------
43Build:
44 $ cd sun_usb
45 $ make
46
47And load the binary to MCU with your favorite programmer.
48If you use Teensy you can load with PJRC Teensy Loader tool.
49 http://www.pjrc.com/teensy/loader.html
50
51
52* * * * * * * * * * * * * * * * * *
53
54
55X68000 Keyboard Protocol
56========================
57http://kyoutan.jpn.org/uts/pc/pic/x68key/
58
59
60Connector
61---------
62Mini DIN 7pin(female connector on computer side)
63 7 6 5
64 o o o
65 4 o = o 3
66 o o
67 2 1
68
69 Mini-DIN
70 -------------
71 pin1 +5V
72 pin2 MOUSE
73 pin3 RXD
74 pin4 TXD
75 pin5 READY
76 pin6 REMOTE
77 pin7 GND
78
79
80Signaling
81---------
82- TXD,RXD
83 Asynchronous, 2400baud, 1-startbit(L), 8-databit, 1-stopbit(H)
84
85- READY
86 ready/not ready(1/0)
87
88
89Data from keyboard
90------------------
91bit 7 make/break flag(0/1)
92bit 6-0 following scan code
93
94
95Data from computer
96------------------
97- LED contorol ON/OFF(0/1)
98 bit 7 1(fixed)
99 bit 6 全角
100 bit 5 ひらがな
101 bit 4 INS
102 bit 3 CAPS
103 bit 2 コード入力
104 bit 1 ローマ字
105 bit 0 かな
106
107- Repeat delay
108 bit 7 0(fixed)
109 bit 6 1(fixed)
110 bit 5 1(fixed)
111 bit 4 0(fixed)
112 bit 3-0 delay
113 REPEAT_DELAY = 200+delay*100 ms
114 default: 500ms
115
116- Repeat time
117 bit 7 0(fixed)
118 bit 6 1(fixed)
119 bit 5 1(fixed)
120 bit 4 1(fixed)
121 bit 3-0 time
122 REPEAT_TIME = 30+time^2*5 ms
123 default: 110ms
124
125
126Scan Codes
127----------
128,---. ,---. ,-------------------, ,-------------------. ,-----------. ,---------------.
129| 61| | 62| | 63| 64| 65| 66| 67| | 68| 69| 6A| 6B| 6C| | 5A| 5B| 5C| | 5D| 52| 53| 54|
130`---' `---' `-------------------' `-------------------' `-----------' `---------------'
131,-----------------------------------------------------------. ,-----------. ,---------------.
132| 01| 02| 03| 04| 05| 06| 07| 08| 09| 0A| 0B| 0C| 0D| 0E| 0F| | 36| 5E| 37| | 3F| 40| 41| 42|
133|-----------------------------------------------------------| |------------ |---------------|
134| 10 | 11| 12| 13| 14| 15| 16| 17| 18| 19| 1A| 1B| 1C| | | 38| 39| 3A| | 43| 44| 45| 46|
135|------------------------------------------------------. 1D | `---=====---' |---------------|
136| 71 | 1E| 1F| 20| 21| 2l| 23| 24| 25| 26| 27| 28| 29| | ___| 3C|___ | 47| 48| 49| 4A|
137|-----------------------------------------------------------| | 3B|---| 3D| |-----------|---|
138| 70 | 2A| 2B| 2C| 2D| 2E| 2F| 30| 31| 32| 33| 34| 70 | `---| 3E|---' | 4B| 4C| 4D| |
139`-----------------------------------------------------------| .---=====---. |-----------| 4E|
140 | 5F| 55 | 56 | 35 | 57 | 58 | 59 | 60| | 72 | 73 | | 4F| 50| 51| |
141 `---------------------------------------------' `-----------' `---------------'
Imprint / Impressum