1 # Sun to USB keyboard protocol converter
3 A converter for using non-USB Sun keyboards.
5 Original code from the [TMK firmware](https://github.com/tmk/tmk_keyboard/tree/master/converter/sun_usb). Ported to QMK by [Yann Hodique](https://github.com/sigma).
7 Keyboard Maintainer: [Yann Hodique](https://github.com/sigma)
8 Hardware Supported: See hardware section below
9 Hardware Availability: self-built
11 Make example for this keyboard (after setting up your build environment):
13 make converter/sun_usb/type5:default
15 See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information.
20 Target MCU is ATMega32u4 but other USB capable AVR will also work. The maintainer mostly uses Teensy 2.0 boards.
21 Supported keyboards: Sun Type 3 and 5 Keyboards,
39 ----------------------------------
52 Signal: Asynchronous, Negative logic, 1200baud, No Flow control
53 Frame format: 1-Start bit, 8-Data bits, No-Parity, 1-Stop bit
55 AVR USART engine expects positive logic while Sun keyboard signal is negative.
56 To use AVR UART engine you need external inverter in front of RX and TX pin.
57 Otherwise you can software serial routine to communicate the keyboard.
59 This converter uses software method, you doesn't need any inverter part.
62 Commands From System To Keyboard
65 Keyboard responds with following byte sequence:
66 Success: 0xFF 0x04 0x7F
73 followed by LED status byte:
75 LED: CapsLk ScrLk Compose NumLk
77 Keyboard responds with 'Layout Response' 0xFE 0xXX
79 Commands From Keyboard To System
82 means no keys pressed.
84 0xFF Reset Response(followed by 0x04)
88 * http://kentie.net/article/sunkbd/page2.htm
89 * http://kentie.net/article/sunkbd/KBD.pdf