Author Topic: ADB to USB keyboard converter  (Read 285839 times)

0 Members and 4 Guests are viewing this topic.

Offline 128keaton

  • Posts: 15
    • Homepage
Re: ADB to USB keyboard converter
« Reply #250 on: Mon, 24 March 2014, 19:52:13 »
128keaton, yeah, as Hasu says, you want to plug the resistor into your breadboard to directly connect the 'data' and +5V pins. (You don’t need to attach it to the wires coming from your ADB plug.)

128keaton,
Pull up resistor should be connected in parallel between Data line and 5V. Your resistor is located in series. I assume green line is Data line, the line should be connected to a port PD0  directly and the resister between 5V and PD0.


For later reference,

PULL UP RESISTOR:
Code: [Select]
Keyboard       Conveter
               ,------.
5V------+------|VCC   |
        |      |      |
        R      |      |
        |      |      |
Data----+------|PD0   |
               |      |
GND------------|GND   |
               `------'
R: 1K Ohm resistor

WRONG:
Code: [Select]
Keyboard       Conveter
               ,------.
5V-------------|VCC   |                                                                                                             
               |      |
               |      |
               |      |
Data----R------|PD0   |
               |      |
GND------------|GND   |
               `------'


128keaton, yeah, as Hasu says, you want to plug the resistor into your breadboard to directly connect the 'data' and +5V pins. (You don’t need to attach it to the wires coming from your ADB plug.)



Alright. I did that, thanks. Still no success. Hm.

Any more ideas?

Key:
Yellow = 5V
Yellow/Orange = GND
Green/Yellow = DATA before 1k
White = DATA after 1k which leads to RX/0


« Last Edit: Mon, 24 March 2014, 19:55:11 by 128keaton »
Ducky Shine - Gray alum (stock)
AEKIII - Gray (stock) with Arduino Micro

Offline hasu

  • Thread Starter
  • Posts: 2646
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: ADB to USB keyboard converter
« Reply #251 on: Mon, 24 March 2014, 20:12:33 »
Error -17 means converter can't communicate with keyboard at all, check your wires again. Are you sure about connector pinouts?
Posting pics of your connector may help.
TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Offline 128keaton

  • Posts: 15
    • Homepage
Re: ADB to USB keyboard converter
« Reply #252 on: Mon, 24 March 2014, 20:22:03 »
Error -17 means converter can't communicate with keyboard at all, check your wires again. Are you sure about connector pinouts?
Posting pics of your connector may help.
This good enough?
Or do you need more detail. Are all of the ports mirrored?
« Last Edit: Mon, 24 March 2014, 20:45:00 by 128keaton »
Ducky Shine - Gray alum (stock)
AEKIII - Gray (stock) with Arduino Micro

Offline jacobolus

  • Posts: 3632
  • Location: San Francisco, CA
Re: ADB to USB keyboard converter
« Reply #253 on: Mon, 24 March 2014, 20:47:35 »
Perhaps you can figure it out with a continuity tester, probing some points on the keyboard itself and your breadboard?

Offline 128keaton

  • Posts: 15
    • Homepage
Re: ADB to USB keyboard converter
« Reply #254 on: Mon, 24 March 2014, 20:51:03 »
Perhaps you can figure it out with a continuity tester, probing some points on the keyboard itself and your breadboard?
Okay, ill do that really quick.
EDIT: It all connects fine! Everything seems to be how it should be! I tested to make sure my pens weren't reversed, and they weren't.
« Last Edit: Mon, 24 March 2014, 21:06:11 by 128keaton »
Ducky Shine - Gray alum (stock)
AEKIII - Gray (stock) with Arduino Micro

Offline hasu

  • Thread Starter
  • Posts: 2646
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: ADB to USB keyboard converter
« Reply #255 on: Mon, 24 March 2014, 21:11:36 »
Hmm, I think you connect them wrongly. Ask Google about ADB connector  pinouts and take time to look into your wires.
TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Offline 128keaton

  • Posts: 15
    • Homepage
Re: ADB to USB keyboard converter
« Reply #256 on: Mon, 24 March 2014, 21:18:10 »
Hmm, I think you connect them wrongly. Ask Google about ADB connector  pinouts and take time to look into your wires.

Thats what I am using.  I tested the connection from the keyboard connector, from the Arduino to the board inside the KB. Wrote down the results. I plugged the keyboard into the Macintosh Classic and tested the voltage from the pins, and they matched what they should be. Basically, I got 4.8 V from the classic instead of -4.8 V like if my pins were reversed. I did get the data pin wrong, so I switched that. But its not working still :X. Honestly, I think it has something to do with how I am compiling it, or how I am uploading it, or my Digital pin, or the code itself. Everything is wired how it should.
« Last Edit: Mon, 24 March 2014, 21:38:12 by 128keaton »
Ducky Shine - Gray alum (stock)
AEKIII - Gray (stock) with Arduino Micro

Offline jacobolus

  • Posts: 3632
  • Location: San Francisco, CA
Re: ADB to USB keyboard converter
« Reply #257 on: Mon, 24 March 2014, 21:40:38 »
When I get home Iíll try to take a picture showing how I connect this up on a breadboard using a Teensy 2.0.

Offline 128keaton

  • Posts: 15
    • Homepage
Re: ADB to USB keyboard converter
« Reply #258 on: Mon, 24 March 2014, 21:42:42 »
When I get home I’ll try to take a picture showing how I connect this up on a breadboard using a Teensy 2.0.
Okay, thank you very much! May I ask for an ETA? It is late here in the CST.
EDIT: It works now. I changed my pin and it works!
« Last Edit: Mon, 24 March 2014, 21:52:01 by 128keaton »
Ducky Shine - Gray alum (stock)
AEKIII - Gray (stock) with Arduino Micro

Offline hasu

  • Thread Starter
  • Posts: 2646
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: ADB to USB keyboard converter
« Reply #259 on: Tue, 25 March 2014, 09:54:19 »
See this. D0 in Arduino Micro is not PD0.  PD0 is D3 in marking of Arduino Macro PCB. Very confusing, huh.
http://arduino.cc/en/uploads/Main/arduino-micro-schematic.pdf
TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Offline 128keaton

  • Posts: 15
    • Homepage
Re: ADB to USB keyboard converter
« Reply #260 on: Tue, 25 March 2014, 10:19:11 »
See this. D0 in Arduino Micro is not PD0.  PD0 is D3 in marking of Arduino Macro PCB. Very confusing, huh.
http://arduino.cc/en/uploads/Main/arduino-micro-schematic.pdf
Wow! Seriously!?! Well, note that on GitHub and the main page.
Ducky Shine - Gray alum (stock)
AEKIII - Gray (stock) with Arduino Micro

Offline 128keaton

  • Posts: 15
    • Homepage
Re: ADB to USB keyboard converter
« Reply #261 on: Tue, 25 March 2014, 13:55:58 »
Hmm. Could someone help me change the key codes? I don't quite understand how to do it. My keyboard has the option and cmd key codes switched and I want to change the ` key to esc, any suggestions?
Ducky Shine - Gray alum (stock)
AEKIII - Gray (stock) with Arduino Micro

Offline jacobolus

  • Posts: 3632
  • Location: San Francisco, CA
Re: ADB to USB keyboard converter
« Reply #262 on: Tue, 25 March 2014, 14:06:45 »
Which type of keyboard do you have? I updated some of the ADB converter code to use the newer features of Hasuís firmware a few months ago, and should probably make some pull requests. Basically though you need to edit keymap.c, and maybe config.h.

Offline 128keaton

  • Posts: 15
    • Homepage
Re: ADB to USB keyboard converter
« Reply #263 on: Tue, 25 March 2014, 14:45:55 »
Which type of keyboard do you have? I updated some of the ADB converter code to use the newer features of Hasuís firmware a few months ago, and should probably make some pull requests. Basically though you need to edit keymap.c, and maybe config.h.
Its the M0487 Apple Keyboard II
Ducky Shine - Gray alum (stock)
AEKIII - Gray (stock) with Arduino Micro

Offline jacobolus

  • Posts: 3632
  • Location: San Francisco, CA
Re: ADB to USB keyboard converter
« Reply #264 on: Tue, 25 March 2014, 14:52:57 »
So yeah, okay, take a look at keymap.c
https://github.com/tmk/tmk_keyboard/blob/master/converter/adb_usb/keymap.c

As you can see itís currently set up with a layout that looks like an Apple Extended Keyboard. You can leave that part if you like, or you can try to make it look more like your M0487 layout.

Hereís the part which sets which characters get sent:
https://github.com/tmk/tmk_keyboard/blob/master/converter/adb_usb/keymap.c#L196

You can replace:
LGUI -> LALT
RGUI -> RALT (though your keyboard doesnít have one of these)
LALT -> LGUI

to swap command and option back to normal.

Then you can do GRV -> ESC and ESC -> GRV to swap those two.

Offline 128keaton

  • Posts: 15
    • Homepage
Re: ADB to USB keyboard converter
« Reply #265 on: Tue, 25 March 2014, 15:27:19 »
So yeah, okay, take a look at keymap.c
https://github.com/tmk/tmk_keyboard/blob/master/converter/adb_usb/keymap.c

As you can see itís currently set up with a layout that looks like an Apple Extended Keyboard. You can leave that part if you like, or you can try to make it look more like your M0487 layout.

Hereís the part which sets which characters get sent:
https://github.com/tmk/tmk_keyboard/blob/master/converter/adb_usb/keymap.c#L196

You can replace:
LGUI -> LALT
RGUI -> RALT (though your keyboard doesnít have one of these)
LALT -> LGUI

to swap command and option back to normal.

Then you can do GRV -> ESC and ESC -> GRV to swap those two.

Okay, the GUI and ALT worked! But switching the GRV and ESC doesn't work. Hmm.
Ducky Shine - Gray alum (stock)
AEKIII - Gray (stock) with Arduino Micro

Offline blargg

  • Posts: 45
    • My github
Re: ADB to USB keyboard converter
« Reply #266 on: Wed, 09 April 2014, 20:31:06 »
it occurs to me that it should be possible to detect the type of keyboard at ADB startup, by looking at the original handler id the keyboard has, and swap layouts dynamically.  Useful for people building external converter boxes that need to handle both "standard" and "extended" keyboards.
I added detection of extended and compact keyboard and have it use a different keymap for each to the version on github.

I'm still fuzzy on what layers give in the absence of support for media keys (I'd like to add those at some point, but I don't have the motivation so far to figure out how to do so).
« Last Edit: Wed, 09 April 2014, 22:01:52 by blargg »

Offline MAR82

  • Posts: 473
  • Location: It says I'm in France
  • Keyboard Addict
Re: ADB to USB keyboard converter
« Reply #267 on: Fri, 25 April 2014, 07:24:50 »
Hi guys I’ve been a bit of a lurker for some time gaining information on cool keyboards.

But here is my issue, I’ve got myself an Apple Extended II (but it’s an AZERTY) and I’d like to convert it over to USB. The only problem is that I tried looking at the files that are provided at the beginning of this post, and I have no idea what to do with them. I've never done much more than simple single file sketches on an Arduino   :-[

I don’t know how to build the HEX file or how to modify the keymap to be AZERTY. If anyone can point me to a guide that will take me through the steps of doing it, or explain it to me themselves (or even better send me the HEX file  ;D )

I don’t think it really make a difference, but I’ll be flashing this to a 32u4 with the Sparkfun bootloader.

Any help is appreciated, thanks

Edit: I also have an Arduino Micro and two USBASP v2.0 if that can help
« Last Edit: Sat, 26 April 2014, 13:57:13 by MAR82 »

Offline MAR82

  • Posts: 473
  • Location: It says I'm in France
  • Keyboard Addict
Re: ADB to USB keyboard converter
« Reply #268 on: Tue, 29 April 2014, 14:31:49 »
OK guys I was able to figure it out.(I'm typing this with it) :thumb:
It turns out I was downloading just the files for the ADB converter, and not the whole project. (stupid me :rolleyes:)
So now I got it working, the only thing I'm having a problem with is that I have two keys that are inverted. The "≤" key is giving me "<", and vice versa. I guess I'll have to understand how to modify the keymap.
The only other issue is my page up key isn't working but that's because the switch isn't working  :mad:. Does anyone knows where I can find one switch (or clone)?

Offline jacobolus

  • Posts: 3632
  • Location: San Francisco, CA
Re: ADB to USB keyboard converter
« Reply #269 on: Tue, 29 April 2014, 22:40:28 »
The only other issue is my page up key isn't working but that's because the switch isn't working  :mad:. Does anyone knows where I can find one switch (or clone)?
Iím out of the country for another 2 weeks, or Iíd send you one. If you get your post count up, you could try the 'classifieds' section. ("[WTB] One dampened tactile Alps switch" or whatever)

Offline hasu

  • Thread Starter
  • Posts: 2646
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: ADB to USB keyboard converter
« Reply #270 on: Wed, 30 April 2014, 21:50:30 »
MAR82, great. The key swap problem is an unfixed old bug. Yes, you just swap two keycodes.

This is that issue on github and my thoughs.
https://github.com/tmk/tmk_keyboard/issues/35
TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Offline MAR82

  • Posts: 473
  • Location: It says I'm in France
  • Keyboard Addict
Re: ADB to USB keyboard converter
« Reply #271 on: Mon, 05 May 2014, 12:57:52 »
Sorry I've been so busy with work and stuff around the house, to be able to get back to this.
But thanks to you and to everyone one that has contributed to the project, I can now use this lovely ADB Apple Extended II.
I looked at the link that you gave me and yes I can also confirm that the keys work properly on a Mac. So what I think I'll do is just use AutoHotkey for when ever I want to use it on a Windows machine.

Here is what it looks like for now (http://imgur.com/a/JM52n) I think I'll get some Sugru to wrap it in; I don't think the converter will ever get to hot so it should be safe.

I know the power key does what the names says (it powers down a Windows PC, but does nothing on a Mac). But it would be nice if in the future it could be used for selecting different layout layers, or something cool like that.

But once again thanks for the code  :thumb:

Offline hasu

  • Thread Starter
  • Posts: 2646
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: ADB to USB keyboard converter
« Reply #272 on: Mon, 12 May 2014, 19:52:28 »
I think so, it is no problem about Sugru wrapping, AVR chip does not get hot much.

Hmm, I didn't know Mac doens't accept power key(PWR). There are two kind of power key, KC_PWR and KC_POWER. KC_PWR is used often in Windows keyboard  and works with Windows and Linux, while KC_POWER works with Linux and OSX but doesn't with Windows.

In short, just replace PWR with POWER in you keymap.c POWER key will work with your Mac.
TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Offline 125ml

  • Posts: 16
Re: ADB to USB keyboard converter
« Reply #273 on: Sat, 21 June 2014, 16:21:28 »
Has anyone had success with the Adafruit ATmega32u4 chip for an ADB-USB converter. I seem to be having some problems.

So far I have the GND and VCC connected to GND and VCC (as you would expect) and the Data line connected to F0 and 10k pull-up resistor between the data and VCC lines.
Since i connected up the data line my Mac now recognises the chip as an ADB keyboard converter, but doesn't register any key presses. So I'm thinking that the data port is wrong.
I've followed (as best I can, I'm quite new to coding in C) the instructions from the Git pages but only get an error when I try to change the ADB_PORT, ADB_PIN, ADB_DDR, ADB_DATA_BIT #define statements in the config.h file.
Most likely I am missing something.

Any chance of a pointer?

Thanks.


Offline hasu

  • Thread Starter
  • Posts: 2646
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: ADB to USB keyboard converter
« Reply #274 on: Sat, 21 June 2014, 17:44:37 »
By default this converter uses D0 pin for data line now. Check README.md and first post of this thread.
If you want to use F0 instead you can edit config.h.
TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Offline 125ml

  • Posts: 16
Re: ADB to USB keyboard converter
« Reply #275 on: Sun, 22 June 2014, 01:56:54 »
thanks Hasu,
I still couldn't get config.h to compile when I tried to change the port.
So, I've moved the data line over to D0 and it is working.
Thanks for the guidance.

I now have another fantastic keyboard in my collection and the tools to get more and annoy my wife.
Cheers to everyone who has contributed to the code on this. Great work.

Offline gustavQ

  • Posts: 20
Re: ADB to USB keyboard converter
« Reply #276 on: Sun, 06 July 2014, 17:57:39 »
Hi guys,

i'm having here a weird situation. I managed to put working the converter with a pro micro with a breadboard just to try out. Then I did these connections in the pro micro:


I added a button between the gnd and the rst to be able to enter into the boot loader when I want. It is working, because I already upload the hex file twice using this mechanism. The resistance is an 1k and is the same I used in the prototype circuit. Also in both cases I use a ADB cable leaving the brown (Power ON) cable to connect.
Now, with all the connections, the converter is not working. I can't figure out why. Can be the button? It shouldn't be.

Offline hasu

  • Thread Starter
  • Posts: 2646
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: ADB to USB keyboard converter
« Reply #277 on: Sun, 06 July 2014, 19:12:43 »
Tact switch and resistor look to me ok.
Not sure how you connected ADB cable. No photo of another side?
TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Offline urbanredfox

  • Posts: 4
Re: ADB to USB keyboard converter
« Reply #278 on: Wed, 16 July 2014, 23:45:22 »
Wow this is quite impressive. I skimmed the 10 pages a few months ago and decided to get a teensy and try it out instead of my iMate deal since some of the keys don't work. I just finished reading all 10 pages today and I must say awesome work! I plugged in my Apple Adjustable keyboard and now have a power button that pulls up the shutdown menu.

I did notice one thing that was interesting however I have not investigated yet. On the Adjustable keyboard if I press any of the media keys, volume up, volume down, mute, microphone (what ever this button did) the I no longer can type from this keyboard. Computer seems to respond from other keyboard. I'll pull up the debugger later this week and see what the output looks like as well as look deeper into the code. All I've done so far is verified that the ExtraKey_Enable is set to yes in the Make file.

I'll report back what I find and maybe post some photos when I make a more permanent solution. After all who doesn't like photos.

Offline hasu

  • Thread Starter
  • Posts: 2646
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: ADB to USB keyboard converter
« Reply #279 on: Sun, 20 July 2014, 10:04:20 »
I confirmed the issue you mentioned on Adjustable Keyboard, the keyboard stops working and only replys with error code 'FFEF' instead of keycode after those media keys are pressed.

Hmm, those media keys  don't yield a keycode unlike other keys, it may need some special initialization or procedure to get keycode of the keys. we'll need to look for the information among old apple documentations.


https://github.com/tmk/tmk_keyboard/issues/130
« Last Edit: Sun, 20 July 2014, 10:46:33 by hasu »
TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Offline urbanredfox

  • Posts: 4
Re: ADB to USB keyboard converter
« Reply #280 on: Sun, 20 July 2014, 22:46:46 »
Glad to hear it's not just me. I started reading up on the basics of ADB in the hackipedia tech notes, I haven't run across anything related to special/media keys yet but I'll keep digging.

Offline hasu

  • Thread Starter
  • Posts: 2646
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: ADB to USB keyboard converter
« Reply #281 on: Mon, 21 July 2014, 08:10:10 »
With oscilloscope I found Adjustable keyboard uses 'Service Request' after a media key is pressed. 'Service Request' is used for 'multiple devices' support in ADB. Tmk ADB converter doesn't support 'Service Request' because it is limited to handle *only one keyboard* at same time. This casues the issue that the keyboard stops working after using media keys.

I pushed this commit to fix the problem but note that this does not add support for the mediakeys, they are just ignored. Try the latest version of master branch. https://github.com/tmk/tmk_keyboard/commit/79840c678

Adjustable keyboard behaves as if two devices exists for some reason, one is normal alpha-numeric keyboard and other is media buttons device. To use the media button part we need to add 'multiple devices' support and this will be somewhat hard work. I don't have a plan for this currently.
TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Offline Tomin8or

  • Posts: 6
Re: ADB to USB keyboard converter
« Reply #282 on: Mon, 21 July 2014, 14:38:40 »
Ok, so I have an Apple Extended Keyboard 2 and a teensy 2.0.  I followed this guide almost exactly, with the only deviation being that I ran the cable out the left side of the casing and cut off the ADB connector there.  the wires are soldered onto the exact same pins on both the ADB pcb and connected in the same place on the teensy as pictured on that guide.  Wehn the keyboard is pullged in onboth Windows 7 and OSX 10.9.2, the numlock and other 2 led's flash once and then nothing happens.  Is this something that could be fixed with the pullup resistor? What does the resistor do (ELI5 style please)?  I got the board from my parents, and it worked on the old Mac (SEII I think) they had it on.

Any help would be greatly appreciated, as I am really not sure where to go from here.

Edit: I have also tried multiple USB cables, to no avail.

Edit 2: The guide: http://ifixit.org/blog/4468/hack-it-better-apple-extended-keyboard-ii/
« Last Edit: Mon, 21 July 2014, 20:41:42 by Tomin8or »

Offline hasu

  • Thread Starter
  • Posts: 2646
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: ADB to USB keyboard converter
« Reply #283 on: Mon, 21 July 2014, 16:35:42 »
No photo?
which guide are you following? what is ELI5?

EDIT: Ah OK, urban dic helped me.
http://www.urbandictionary.com/define.php?term=ELI5
« Last Edit: Mon, 21 July 2014, 16:39:20 by hasu »
TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Offline Tomin8or

  • Posts: 6
Re: ADB to USB keyboard converter
« Reply #284 on: Mon, 21 July 2014, 20:42:48 »
Added the link to the guide, guess I just forgot to paste it in last time.

Offline hasu

  • Thread Starter
  • Posts: 2646
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: ADB to USB keyboard converter
« Reply #285 on: Mon, 21 July 2014, 21:10:35 »
You are always strongly recommended to add pull-up resistor, but in many cases it will work without this unless you are so unlucky. So I'm guess you are connected to data line wrongly. Power lines 5V and GND seems to be OK because it has LED flash when powering on.

Ah, the port was changed from PF0 to PD0 after that guide is written. You need to resolder data line to PD0, not PF0.
You should read README.md first...

« Last Edit: Mon, 21 July 2014, 21:12:25 by hasu »
TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Offline Tomin8or

  • Posts: 6
Re: ADB to USB keyboard converter
« Reply #286 on: Mon, 21 July 2014, 21:35:24 »
Tried this, still no dice. Just the lights and then nothing.

Offline hasu

  • Thread Starter
  • Posts: 2646
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: ADB to USB keyboard converter
« Reply #287 on: Mon, 21 July 2014, 22:02:20 »
hmm, you seems to be unlucky. Post photos of your connection if you need further help.
TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Offline Tomin8or

  • Posts: 6
Re: ADB to USB keyboard converter
« Reply #288 on: Mon, 21 July 2014, 22:18:56 »
Pic of relevant connections.

Offline hasu

  • Thread Starter
  • Posts: 2646
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: ADB to USB keyboard converter
« Reply #289 on: Mon, 21 July 2014, 23:18:30 »
Looks like wiring is OK but again, make sure red and black line should not touch each other.
Still no luck? It is time to add pullup resistor finally.

TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Offline blargg

  • Posts: 45
    • My github
Re: ADB to USB keyboard converter
« Reply #290 on: Tue, 22 July 2014, 20:30:48 »
You've got your ADB socket miswired. I have one like that and the one in the linked Hack It Better article both are wired with ground in the upper-left (white in the article), and data in the lower-right (blue in the article). You've got them swapped. I also highly recommend you use a pull-up resistor, otherwise you're just asking for rare problems that are hard to reproduce or diagnose. If you don't have a resistor (1K-10K is fine), you can run a few of the other port pins as pull-ups and connect them together with the data pin.

Offline Tomin8or

  • Posts: 6
Re: ADB to USB keyboard converter
« Reply #291 on: Fri, 25 July 2014, 18:50:38 »
Got mine working today, as I finally got proper resistors.  The nearest place I could buy them has weird hours and is overrun with vacationers this time of year, so I had to order them from Amazon, but hey it works.  Thanks a bunch for the help and for doing all the hard work for us in writing the code to make it work.  Stuff like this is why I am starting in on a Computer Engineering major next year.

Offline blargg

  • Posts: 45
    • My github
Re: ADB to USB keyboard converter
« Reply #292 on: Fri, 25 July 2014, 20:02:55 »
Was it miswired in your pictures or was I incorrect?

Offline Tomin8or

  • Posts: 6
Re: ADB to USB keyboard converter
« Reply #293 on: Fri, 25 July 2014, 23:01:31 »
It was properly wired.

Small gallery: http://imgur.com/a/GEYEB

Edit: For those doing this in the future, if you solder onto the adb connector's pcb, make sure you realize they are not the same on opposite sides.  The pins have different locations (I used the right side connector to solder to so I could run the cable out the left).
« Last Edit: Fri, 25 July 2014, 23:03:38 by Tomin8or »

Offline urbanredfox

  • Posts: 4
Re: ADB to USB keyboard converter
« Reply #294 on: Tue, 05 August 2014, 23:11:32 »
Hi Hasu,

I tried the latest version of the master branch and it works great no more freezing of the keyboard. Thanks for all the help.

Just out of curiosity is the lack of Service Request due to hardware limitations or outside of the scope of this project?

With oscilloscope I found Adjustable keyboard uses 'Service Request' after a media key is pressed. 'Service Request' is used for 'multiple devices' support in ADB. Tmk ADB converter doesn't support 'Service Request' because it is limited to handle *only one keyboard* at same time. This casues the issue that the keyboard stops working after using media keys.

I pushed this commit to fix the problem but note that this does not add support for the mediakeys, they are just ignored. Try the latest version of master branch. https://github.com/tmk/tmk_keyboard/commit/79840c678

Adjustable keyboard behaves as if two devices exists for some reason, one is normal alpha-numeric keyboard and other is media buttons device. To use the media button part we need to add 'multiple devices' support and this will be somewhat hard work. I don't have a plan for this currently.

Offline hasu

  • Thread Starter
  • Posts: 2646
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: ADB to USB keyboard converter
« Reply #295 on: Tue, 05 August 2014, 23:30:10 »
Great!

It is just a limitation of current firmware, I think 'multi devices' or Service Request support is certainly possible but I hesitate to implement it due to my laziness.
TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Offline DamnDan

  • * Destiny Supporter
  • Posts: 138
  • Location: Poland
  • The Insane One
    • My Deviantart
Re: ADB to USB keyboard converter
« Reply #296 on: Thu, 02 October 2014, 06:27:47 »
Hello Geekhackers,

As I totally lack knowledge in terms of making key matrix and making hex files (i know...big newbie), and before I go long way to learn how to do this, I need to ask you a question:

Does anyone have a ready made HEX file for m0118 board? :(

This would help my Apple board to finally get some use :)

Thanks,
Damndan

Offline hasu

  • Thread Starter
  • Posts: 2646
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: ADB to USB keyboard converter
« Reply #297 on: Thu, 02 October 2014, 13:41:27 »
M0118 will work with this converter, I have M0116 and it work. You'll have to use ISO keymap, see here.
https://github.com/tmk/tmk_keyboard/issues/35#issuecomment-43660429
TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Offline DamnDan

  • * Destiny Supporter
  • Posts: 138
  • Location: Poland
  • The Insane One
    • My Deviantart
Re: ADB to USB keyboard converter
« Reply #298 on: Sun, 05 October 2014, 03:47:26 »
M0118 will work with this converter, I have M0116 and it work. You'll have to use ISO keymap, see here.
https://github.com/tmk/tmk_keyboard/issues/35#issuecomment-43660429

Hey Hasu :)


Thank you for the tip :) Now I have a fully functioning M0118 :)

Have a great day! :)

Edit:
Found one small thing that I do not know how to change

Is there any way i could change the right command key into right alt?


If there is....where do i change that O,o

I read somewhere that it is not possible with this converter, but it is always better to ask before you give up ;P
« Last Edit: Wed, 08 October 2014, 03:20:59 by DamnDan »

Offline hasu

  • Thread Starter
  • Posts: 2646
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: ADB to USB keyboard converter
« Reply #299 on: Wed, 08 October 2014, 07:05:04 »
Apple Desktop keyboard(Apple IIGS) and Apple Standard keyboard including M0116 and M0118 can not discriminate between left and right modifier. Or those keyboard has same scan code for both left and right modifier key.
So both of those command keys in your pic are same key in reality. If you assign right Alt to the left Command key right Commad key also emits right Alt.

While Extended keyboard(AEK and AEKII) has discriminate between left and right modifier keys except Command keys.

This is ADB protocol limitation, not TMK converter one.
TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt