1 Sun to USB keyboard protocol converter
2 ======================================
3 Target MCU is ATMega32u2/4 but other USB capable AVR will also work.
5 This converter will work with Sun Type 2-5 Keyboards.
8 Check wiki pages for other information about TMK keyobard firware.
10 https://github.com/tmk/tmk_keyboard/wiki
15 2020-04-08 Added unimap support
20 Modern Type 4 and 5 keyboards uses 8Pin mini DIN.
32 ----------------------------------
45 Signal: Asynchronous, Negative logic, 1200baud, No Flow control
47 Frame format: 1-Start bit, 8-Data bits, No-Parity, 1-Stop bit
49 AVR USART engine expects positive logic while Sun keyboard signal is negative.
50 To use AVR UART engine you need external inverter in front of RX and TX pin.
51 Otherwise you can use software serial to communicate the keyboard.
53 This firmware uses software serial by default, so you don't need any inverter.
54 It can be still built with 'make HARDWARE_SERIAL=y' to enable hardware serial if you have inverter. You can use 74LS04 for example.
57 ### Commands From System To Keyboard
60 Keyboard responds with following byte sequence:
61 Success: 0xFF 0x04 0x7F
68 followed by LED status byte:
70 LED: CapsLk ScrLk Compose NumLk
72 Keyboard responds with 'Layout Response' 0xFE 0xXX
74 ### Commands From Keyboard To System
76 means no keys pressed.
78 0xFF Reset Response(followed by 0x04)
81 - http://kentie.net/article/sunkbd/page2.htm
82 - http://kentie.net/article/sunkbd/KBD.pdf
87 For TMK converter with ATmega32U2 just run `make` to build firmware hex file.
88 For other DIY converters with ATmega32U4 like Teensy2 or Pro Micro use `make -f Makefile.atmega32u4` instead of `make`.
93 Then, load the hex file into MCU with your favorite programmer. If you have `dfu-programmer` installed you can use `make dfu`.
101 You can send Sun protocol commands with TMK `Magic` key combo. By default `Magic` key is `LShift` + `RShift`, `LAlt` + `RAlt' or `LMeta` + `RMeta`.
102 https://github.com/tmk/tmk_keyboard#magic-commands
104 Following Sun specific commands are available. For example, to send 'Bell On' you can press `LShift` + `RShift` + `Up` keys simultaneously.
107 ----- Sun converter Help -----
122 http://blog.daveastels.com.s3-website-us-west-2.amazonaws.com/2014/12/27/type-3-keyboard.html
124 ### CTCSP SHORT TYPE KEYBOARD(Type 5)
125 http://imgur.com/a/QIv6p