sun_usb: Update README and rename to .md
This commit is contained in:
parent
8898747b09
commit
05c2df1237
1 changed files with 41 additions and 28 deletions
|
|
@ -1,30 +1,31 @@
|
||||||
Sun to USB keyboard protocol converter
|
Sun to USB keyboard protocol converter
|
||||||
======================================
|
======================================
|
||||||
Target MCU is ATMega32u4 but other USB capable AVR will also work.
|
Target MCU is ATMega32u2/4 but other USB capable AVR will also work.
|
||||||
|
|
||||||
This converter will work with Sun Type 2-5 Keyboards.
|
This converter will work with Sun Type 2-5 Keyboards.
|
||||||
|
|
||||||
|
|
||||||
Tested on:
|
Check wiki pages for other information about TMK keyobard firware.
|
||||||
Sun Type 3 Keyboard: http://blog.daveastels.com.s3-website-us-west-2.amazonaws.com/2014/12/27/type-3-keyboard.html
|
|
||||||
CTCSP SHORT TYPE KEYBOARD(Type 5): http://imgur.com/a/QIv6p
|
https://github.com/tmk/tmk_keyboard/wiki
|
||||||
|
|
||||||
|
|
||||||
Keymap of Type 3(keymap_sun3.c) were impoted from dastels's repository.
|
Update
|
||||||
https://github.com/dastels/tmk_keyboard/tree/master/converter/sun3_usb
|
------
|
||||||
|
2020-04-08 Added unimap support
|
||||||
|
|
||||||
|
|
||||||
Connector
|
Connector
|
||||||
---------
|
---------
|
||||||
8Pin mini DIN
|
Modern Type 4 and 5 keyboards uses 8Pin mini DIN.
|
||||||
___ ___
|
|
||||||
/ |_| \
|
___ ___
|
||||||
/ 8 7 6 \
|
/ |_| \
|
||||||
| 5 4 3 |
|
/ 8 7 6 \
|
||||||
\_ 2 1 _/
|
| 5 4 3 |
|
||||||
\_____/
|
\_ 2 1 _/
|
||||||
(receptacle)
|
\_____/
|
||||||
|
(receptacle)
|
||||||
|
|
||||||
Wiring:
|
Wiring:
|
||||||
Pin mini DIN MCU
|
Pin mini DIN MCU
|
||||||
|
|
@ -42,18 +43,19 @@ Connector
|
||||||
Protocol
|
Protocol
|
||||||
--------
|
--------
|
||||||
Signal: Asynchronous, Negative logic, 1200baud, No Flow control
|
Signal: Asynchronous, Negative logic, 1200baud, No Flow control
|
||||||
|
|
||||||
Frame format: 1-Start bit, 8-Data bits, No-Parity, 1-Stop bit
|
Frame format: 1-Start bit, 8-Data bits, No-Parity, 1-Stop bit
|
||||||
|
|
||||||
AVR USART engine expects positive logic while Sun keyboard signal is negative.
|
AVR USART engine expects positive logic while Sun keyboard signal is negative.
|
||||||
To use AVR UART engine you need external inverter in front of RX and TX pin.
|
To use AVR UART engine you need external inverter in front of RX and TX pin.
|
||||||
Otherwise you can software serial routine to communicate the keyboard.
|
Otherwise you can use software serial to communicate the keyboard.
|
||||||
|
|
||||||
This converter uses software method by default, so you don't need any inverter part. But
|
This firmware uses software serial by default, so you don't need any inverter.
|
||||||
it can also be built with 'make HARDWARE_SERIAL=y' to enable hardware serial if there
|
It can be still built with 'make HARDWARE_SERIAL=y' to enable hardware serial if you have inverter. You can use 74LS04 for example.
|
||||||
is an inverter present. Good results have been obtained using a 74LS04 and hardware serial.
|
|
||||||
|
|
||||||
|
|
||||||
Commands From System To Keyboard
|
### Commands From System To Keyboard
|
||||||
|
|
||||||
0x01 Reset
|
0x01 Reset
|
||||||
Keyboard responds with following byte sequence:
|
Keyboard responds with following byte sequence:
|
||||||
Success: 0xFF 0x04 0x7F
|
Success: 0xFF 0x04 0x7F
|
||||||
|
|
@ -69,27 +71,29 @@ Commands From System To Keyboard
|
||||||
0x0F Layout
|
0x0F Layout
|
||||||
Keyboard responds with 'Layout Response' 0xFE 0xXX
|
Keyboard responds with 'Layout Response' 0xFE 0xXX
|
||||||
|
|
||||||
Commands From Keyboard To System
|
### Commands From Keyboard To System
|
||||||
0x7F Idle
|
0x7F Idle
|
||||||
means no keys pressed.
|
means no keys pressed.
|
||||||
0xFE Layout Response
|
0xFE Layout Response
|
||||||
0xFF Reset Response(followed by 0x04)
|
0xFF Reset Response(followed by 0x04)
|
||||||
|
|
||||||
Reference
|
### Reference
|
||||||
http://kentie.net/article/sunkbd/page2.htm
|
- http://kentie.net/article/sunkbd/page2.htm
|
||||||
http://kentie.net/article/sunkbd/KBD.pdf
|
- http://kentie.net/article/sunkbd/KBD.pdf
|
||||||
|
|
||||||
|
|
||||||
Build Firmware
|
Build Firmware
|
||||||
--------------
|
--------------
|
||||||
Just use 'make'
|
Just use 'make'
|
||||||
|
|
||||||
$ cd sun_usb
|
$ cd sun_usb
|
||||||
$ make
|
$ make
|
||||||
|
|
||||||
Then, load the binary to MCU with your favorite programmer.
|
Then, load the binary to MCU with your favorite programmer.
|
||||||
|
|
||||||
|
|
||||||
Sun commands
|
Keyboard Control
|
||||||
------------
|
----------------
|
||||||
You can send Sun protocol commands with TMK `Magic` key combo. By default `Magic` key is `LShift` + `RShift`, `LAlt` + `RAlt' or `LMeta` + `RMeta`.
|
You can send Sun protocol commands with TMK `Magic` key combo. By default `Magic` key is `LShift` + `RShift`, `LAlt` + `RAlt' or `LMeta` + `RMeta`.
|
||||||
https://github.com/tmk/tmk_keyboard#magic-commands
|
https://github.com/tmk/tmk_keyboard#magic-commands
|
||||||
|
|
||||||
|
|
@ -106,3 +110,12 @@ PgDown: LED all On
|
||||||
Insert: Layout
|
Insert: Layout
|
||||||
Delete: Reset
|
Delete: Reset
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
Tested on
|
||||||
|
---------
|
||||||
|
### Type 3
|
||||||
|
http://blog.daveastels.com.s3-website-us-west-2.amazonaws.com/2014/12/27/type-3-keyboard.html
|
||||||
|
|
||||||
|
### CTCSP SHORT TYPE KEYBOARD(Type 5)
|
||||||
|
http://imgur.com/a/QIv6p
|
||||||
Loading…
Add table
Reference in a new issue