]> git.donarmstrong.com Git - tmk_firmware.git/blob - converter/sun_usb/README
Add Sun converter initial files.
[tmk_firmware.git] / converter / sun_usb / README
1 Sun to USB keyboard protocol converter
2 ======================================
3
4 TODO
5 ----
6 AVR UART engine expect positive logic while Sun keyboard signal is inverted serial.
7 To use AVR UART engine you need inverter in front of RX and TX pin.
8 Otherwise you can software serial routine to communicate the keyboard.
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 Connector
18   8Pin mini DIN
19      ___ ___
20     /  |_|  \
21    / 8  7  6 \
22   | 5    4  3 |
23    \_ 2   1 _/
24      \_____/  
25    (receptacle)
26
27 Wiring:
28 Pin mini DIN        Teensy
29 ----------------------------------
30 1   GND             GND
31 2   GND             GND
32 3   5V
33 4   RX/TX(Mouse)
34 5   RX              PD2
35 6   TX              PD3
36 7   GND             GND
37 8   5V              VCC
38
39
40
41 Firmware
42 --------
43 Build:
44     $ cd sun_usb
45     $ make
46
47 And load the binary to MCU with your favorite programmer.
48 If you use Teensy you can load with PJRC Teensy Loader tool.
49     http://www.pjrc.com/teensy/loader.html
50
51
52 *   *   *   *   *   *   *   *   *   *   *   *   *   *   *   *   *   *
53
54
55 X68000 Keyboard Protocol
56 ========================
57 http://kyoutan.jpn.org/uts/pc/pic/x68key/
58
59
60 Connector
61 ---------
62 Mini 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
80 Signaling
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
89 Data from keyboard
90 ------------------
91 bit 7       make/break flag(0/1)
92 bit 6-0     following scan code
93
94
95 Data 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
126 Scan 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        `---------------------------------------------'         `-----------' `---------------'