Author Topic: SHARP X68000 keyboard converter  (Read 4545 times)

0 Members and 1 Guest are viewing this topic.

Offline hasu

  • Thread Starter
  • Posts: 1845
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
SHARP X68000 keyboard converter
« on: Sat, 24 March 2012, 05:17:29 »
SHARP X68000 is a hobby computer released in Japan.(1987-93)
http://en.wikipedia.org/wiki/Sharp_X68000

You can buy preassembled TMK converter here

X68000 keyboard has ALPS linear switches.
- DSETK0016CE01   (ALPS green linear switch)
- DSETK0022CE02   (ALPS yellow linear switch)
- DSETK0023CE03   (ALPS yellow linear switch)

 I have a DSETK0016CE01 with green one.

Album: http://imgur.com/a/N1yMX


Update
-2013/06/22  Add LED support


Hardware
Target MCU is ATMega32u4/u2 but other USB capable AVR also should work.
You can use a PJRC Teensy2.0 for this converter.

Connector
X68000 keyboard has a Mini DIN 7pin connector.
keyboard plug:

converter jack:



Wiring
Code: [Select]
    Mini-DIN            Teensy
    -----------------------------------------------------
    pin1   +5V          VCC
    pin2   MOUSE        -
    pin3   RXD          PD2(RXD)
    pin4   TXD          PD3(TXD)
    pin5   READY        -
    pin6   REMOTE       -
    pin7   GND          GND

Firmware
Source: https://github.com/tmk/tmk_keyboard

Build
Code: [Select]
    $ git clone git://github.com/tmk/tmk_keyboard.git
    $ cd tmk_keyboard/converter/x68k_usb
    $ make

Program
Load the binary(hex) to MCU with your favorite programmer.
If you use Teensy you can load with PJRC Teensy Loader tool.
    http://www.pjrc.com/teensy/loader.html

X68000 Keyboard Protocol
See README.
https://github.com/tmk/tmk_keyboard/tree/master/converter/x68k_usb
« Last Edit: Wed, 06 January 2016, 01:05:42 by hasu »
⚠ My Engrish is broken.  TMK firmware  ⌨ TMK HHKB Alt controller  ⌨TMK Converters

Offline hasu

  • Thread Starter
  • Posts: 1845
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: SHARP X68000 keyboard converter
« Reply #1 on: Sat, 22 June 2013, 03:05:43 »
Finally added LED support.
⚠ My Engrish is broken.  TMK firmware  ⌨ TMK HHKB Alt controller  ⌨TMK Converters

Offline Blaise170

  • Posts: 649
  • Location: Danville, KY
  • Alps is Love
    • BlaiseXYZ
Re: SHARP X68000 keyboard converter
« Reply #2 on: Thu, 28 April 2016, 11:24:16 »
Is there a way to turn on all of the LEDs using a single key? I tried looking at the code but I'm not very well versed in it. I think it would be cool to be able to press a key (break for example) and have the LEDs all turn on or off. I also tried using the scancode trick but none of them are high enough to trigger all of the LEDs.
Current Keyboards
More


My Haul from Japan (Coming Soon)
More


Wanted List
More
Kingsaver or other Alps TKL, Alps SKCM (Amber, Double Action, Brown, Neon Green)

Offline hasu

  • Thread Starter
  • Posts: 1845
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: SHARP X68000 keyboard converter
« Reply #3 on: Fri, 29 April 2016, 01:50:22 »
Is there a way to turn on all of the LEDs using a single key? I tried looking at the code but I'm not very well versed in it. I think it would be cool to be able to press a key (break for example) and have the LEDs all turn on or off. I also tried using the scancode trick but none of them are high enough to trigger all of the LEDs.

I added sample code in keymap.c, see the latest code on github repository. I converted x68k keymap from legacy format to current one and added an action_function to toggle LEDs.

https://github.com/tmk/tmk_keyboard/blob/3c109203c3d0451dd5009acbe3fc5452934b0449/converter/x68k_usb/keymap.c#L75-L92

You can toogle all LEDs with 'BREAK' key now.

To control seven LEDs just send 1-byte command like below. For example to turn only CAPS on you can send 0b11110111 and to turn INS and CAPS on send 0b11100111. Use 'serial_send()' to send the command.

Quote

- LED control ON/OFF(0/1)                                                                         
    bit 7   1(fixed)                                                                               
    bit 6   全角
    bit 5   ひらがな
    bit 4   INS
    bit 3   CAPS
    bit 2   コード入力
    bit 1   ローマ字
    bit 0   かな

⚠ My Engrish is broken.  TMK firmware  ⌨ TMK HHKB Alt controller  ⌨TMK Converters

Offline Blaise170

  • Posts: 649
  • Location: Danville, KY
  • Alps is Love
    • BlaiseXYZ
Re: SHARP X68000 keyboard converter
« Reply #4 on: Fri, 29 April 2016, 07:38:06 »
That's amazing Hasu! Thanks for that. I'll rebuild my converter later today when I get time.
Current Keyboards
More


My Haul from Japan (Coming Soon)
More


Wanted List
More
Kingsaver or other Alps TKL, Alps SKCM (Amber, Double Action, Brown, Neon Green)