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

0 Members and 1 Guest are viewing this topic.

Offline hasu

  • Thread Starter
  • Posts: 2450
  • 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


X68000 keyboard
X68000 keyboard has basically ALPS linear switches, for example:
- 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
- 2017/05/09  Online Keymap Editor is available for TMK x68k converter now


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


Keymap Editor
You can download firmware binary from online editor without building source code yourself.

http://www.tmk-kbd.com/tmk_keyboard/editor/unimap/?x68k_usb




Program
With TMK x68k converter press the button on PCB to start programming mode, then use flash tool with firmware binary. See wiki page.
https://github.com/tmk/tmk_keyboard/wiki#flash-firmware

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


You can buy preassembled TMK x68k converter here

« Last Edit: Mon, 08 May 2017, 20:11:00 by hasu »
⚠ My Engrish is broken.  !!!FC980C Alt GB!!! HHKB Alt  ⌨ConvertersAlps64FC660C Alt

Offline hasu

  • Thread Starter
  • Posts: 2450
  • 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.  !!!FC980C Alt GB!!! HHKB Alt  ⌨ConvertersAlps64FC660C Alt

Offline Blaise170

  • Posts: 668
  • 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.
NEED TO SELL ASAP
More

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

Offline hasu

  • Thread Starter
  • Posts: 2450
  • 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.  !!!FC980C Alt GB!!! HHKB Alt  ⌨ConvertersAlps64FC660C Alt

Offline Blaise170

  • Posts: 668
  • 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.
NEED TO SELL ASAP
More

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

Offline alh84001

  • Posts: 270
  • Location: EU-HR-ZG
Re: SHARP X68000 keyboard converter
« Reply #5 on: Thu, 05 January 2017, 18:27:11 »
I just wired up a Pro Micro with a 7-pin mini-DIN port (I connected 5V, GND, RX and TX), and flashed the firmware which I got by issuing make in a pristine repo. Switches get registered with no issues, but I'm having trouble with LEDs. Only CAPS LED is working when the key is pressed (which i think is expected), and pressing BREAK does nothing (no LEDs light-up, including CAPS), which, looking at code, should work.

Offline hasu

  • Thread Starter
  • Posts: 2450
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: SHARP X68000 keyboard converter
« Reply #6 on: Thu, 05 January 2017, 19:22:44 »
glad you made your converter work.
Converter doesn't handle all LEDs at this time because I have no idea on how to use other LEDs. But I think you can control all LEDs as you want, see source code.

Do you have X68000 computer or know how it handles LEDs on those keys?
⚠ My Engrish is broken.  !!!FC980C Alt GB!!! HHKB Alt  ⌨ConvertersAlps64FC660C Alt

Offline alh84001

  • Posts: 270
  • Location: EU-HR-ZG
Re: SHARP X68000 keyboard converter
« Reply #7 on: Fri, 06 January 2017, 05:35:53 »
It turns out that I was stupid and I had a fork of the tmk cloned, which has not been rebased in quite a while, so I didn't have any of the changes related to LEDs. I cloned the original repo, built it, flashed it, and now all LEDs work when pressing BREAK key.

Thanks again, hasu, you're the man!

Offline hasu

  • Thread Starter
  • Posts: 2450
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: SHARP X68000 keyboard converter
« Reply #8 on: Mon, 08 May 2017, 20:08:23 »
Now Keymap Editor is available for TMK x68k converter(ATMega32u2).

You can download firmware binary from online editor without building source code yourself.

http://www.tmk-kbd.com/tmk_keyboard/editor/unimap/?x68k_usb

⚠ My Engrish is broken.  !!!FC980C Alt GB!!! HHKB Alt  ⌨ConvertersAlps64FC660C Alt