Author Topic: [REQUEST FOR TEST] TMK IBM PC Keyboard Converter  (Read 11930 times)

0 Members and 1 Guest are viewing this topic.

Offline hasu

  • Thread Starter
  • Posts: 3088
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: [REQUEST FOR TEST] TMK IBM PC Keyboard Converter
« Reply #100 on: Mon, 04 May 2020, 03:57:23 »
My fIrmware can still have a silly bug or room to improve but I'd suspect its power line first. I'm not totally sure power voltage drop causes  serious problem like these.

I checked again a few things again, Iím not doing any power shenanigans.

Soarers converter works without issue, I swap the fw to TMK and have issues.
Iíve tried on 2 different XT keyboards both built around the same time using two different ProMicros. Same issues.

I belive you can't get 5V at RAW on Pro Micro and you need to use VCC pin with J1 solder bridged. (It seems liek most of cheap Pro Mciros come without the solder bridge) I'm NOT sure that voltage of power matters, though.

It would be helpful if you can see whether there are any difference with 5V when you have time.
« Last Edit: Mon, 04 May 2020, 04:03:22 by hasu »
TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Offline acid2000

  • Posts: 18
Re: [REQUEST FOR TEST] TMK IBM PC Keyboard Converter
« Reply #101 on: Mon, 04 May 2020, 06:52:41 »
J1 on the pro micro is for voltage select. 3V vs 5V.

Iím running a 5V pro micro.

Running at 3v is way out of spec for an XT. In the past Iíve run accidentally on 3v and they wonít come up.
Even if they did (by tapping of the usb power) you would be driving a 5V GPIO with 3V, it would probably work but would be a PITA to set up.

Run your ProMicro at 5V.

Offline hasu

  • Thread Starter
  • Posts: 3088
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: [REQUEST FOR TEST] TMK IBM PC Keyboard Converter
« Reply #102 on: Mon, 04 May 2020, 07:25:16 »
J1 on the pro micro is for voltage select. 3V vs 5V.

Iím running a 5V pro micro.

Running at 3v is way out of spec for an XT. In the past Iíve run accidentally on 3v and they wonít come up.
Even if they did (by tapping of the usb power) you would be driving a 5V GPIO with 3V, it would probably work but would be a PITA to set up.

Run your ProMicro at 5V.

No, I'm not referring 3.3V Pro Micro.

Did you check the wiki page?
Beleive me, you will get only 4.6V typically from RAW pin even if you are using 5V version Pro Micro.
You should be able to confirm this with multimeter easily, or this can be evident from its schematic also.

To get proper 5V you have to do both two things below.
1) Make solder bridge on J1
2) Use VCC pin to give keyboard power , not RAW pin

https://github.com/tmk/tmk_keyboard/wiki/Pro-Micro#j1-solder-bridge

TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Offline Maledicted

  • Posts: 1084
  • Location: Wisconsin, United States
Re: [REQUEST FOR TEST] TMK IBM PC Keyboard Converter
« Reply #103 on: Mon, 04 May 2020, 08:48:07 »
J1 on the pro micro is for voltage select. 3V vs 5V.

Iím running a 5V pro micro.

Running at 3v is way out of spec for an XT. In the past Iíve run accidentally on 3v and they wonít come up.
Even if they did (by tapping of the usb power) you would be driving a 5V GPIO with 3V, it would probably work but would be a PITA to set up.

Run your ProMicro at 5V.

No, I'm not referring 3.3V Pro Micro.

Did you check the wiki page?
Beleive me, you will get only 4.6V typically from RAW pin even if you are using 5V version Pro Micro.
You should be able to confirm this with multimeter easily, or this can be evident from its schematic also.

To get proper 5V you have to do both two things below.
1) Make solder bridge on J1
2) Use VCC pin to give keyboard power , not RAW pin

https://github.com/tmk/tmk_keyboard/wiki/Pro-Micro#j1-solder-bridge

I suppose that could explain why all of my Pro Micros only intermittently worked with TMK, but Teensies work fine. I'll have to look at that.

I do still plan on flashing back to your most recently posted modified TMK firmware by the way, it was just getting late last night. Is there any sort of sniffing we could try to do on a computer that natively works with the beige label Z-150 to figure out how/why?

Also, maybe if you could point me to what values to play with, and what you think the general threshold may be, I could tweak the timings myself?

Offline acid2000

  • Posts: 18
Re: [REQUEST FOR TEST] TMK IBM PC Keyboard Converter
« Reply #104 on: Mon, 04 May 2020, 13:29:25 »
Iíve bought a Teensy 2.0 from an official distributor.

This will be the last time I give this a go. I hope it works.

Offline hasu

  • Thread Starter
  • Posts: 3088
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: [REQUEST FOR TEST] TMK IBM PC Keyboard Converter
« Reply #105 on: Wed, 06 May 2020, 02:25:27 »
J1 on the pro micro is for voltage select. 3V vs 5V.

Iím running a 5V pro micro.

Running at 3v is way out of spec for an XT. In the past Iíve run accidentally on 3v and they wonít come up.
Even if they did (by tapping of the usb power) you would be driving a 5V GPIO with 3V, it would probably work but would be a PITA to set up.

Run your ProMicro at 5V.

No, I'm not referring 3.3V Pro Micro.

Did you check the wiki page?
Beleive me, you will get only 4.6V typically from RAW pin even if you are using 5V version Pro Micro.
You should be able to confirm this with multimeter easily, or this can be evident from its schematic also.

To get proper 5V you have to do both two things below.
1) Make solder bridge on J1
2) Use VCC pin to give keyboard power , not RAW pin

https://github.com/tmk/tmk_keyboard/wiki/Pro-Micro#j1-solder-bridge

I suppose that could explain why all of my Pro Micros only intermittently worked with TMK, but Teensies work fine. I'll have to look at that.

If you can confirm that  the lower voltage power of Pro Micro affects any keyboard this would be worth sharing with the community and I would make a thread for this Pro Micro topic.


Quote
I do still plan on flashing back to your most recently posted modified TMK firmware by the way, it was just getting late last night. Is there any sort of sniffing we could try to do on a computer that natively works with the beige label Z-150 to figure out how/why?

Also, maybe if you could point me to what values to play with, and what you think the general threshold may be, I could tweak the timings myself?

It would be great if you can tweak code and test it in quick turnaround.

To get my current working source code repo from github.com run commands below, this is needed just once.
Code: [Select]
git clone -b ibmpc_z150at_fix https://github.com/tmk/tmk_keyboard.git
cd tmk_keyboard/
git submodule update --init
cd converter/ibmpc_usb/

Then, just run 'make' command to build firmware in 'tmk_keyboard/converter/ibmpc_usb/' directory.
Code: [Select]
make
You will find firmware file 'ibmpc_usb.hex' in the directory.

The current firmware should work with Z-150 AT until you press CapsLock, NumLock key.
Let me know one you can get this working on your side.
TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Offline acid2000

  • Posts: 18
Re: [REQUEST FOR TEST] TMK IBM PC Keyboard Converter
« Reply #106 on: Wed, 06 May 2020, 03:54:04 »
I bridged J1 in my Pro Micro, very little changed.

Teensy should arrive in the next few days. If it doesnít work with that then itís TMK otherwise it is the Pro Micro.

Offline acid2000

  • Posts: 18
Re: [REQUEST FOR TEST] TMK IBM PC Keyboard Converter
« Reply #107 on: Thu, 07 May 2020, 12:55:16 »
So I got the teensy 2. Wired it up with 1k pull ups and I still have problems.

Iíve attached the results of holding down Q for about 1m. You can see the incorrect key presses at the end.

Given Iíve now changed the hardware can we agree that this is a bug in TMK?

Offline hasu

  • Thread Starter
  • Posts: 3088
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: [REQUEST FOR TEST] TMK IBM PC Keyboard Converter
« Reply #108 on: Thu, 07 May 2020, 19:36:27 »
So I got the teensy 2. Wired it up with 1k pull ups and I still have problems.

Iíve attached the results of holding down Q for about 1m. You can see the incorrect key presses at the end.

Given Iíve now changed the hardware can we agree that this is a bug in TMK?

Thanks for the test. Can you attach it again or just post it with code tag?

TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Offline Maledicted

  • Posts: 1084
  • Location: Wisconsin, United States
Re: [REQUEST FOR TEST] TMK IBM PC Keyboard Converter
« Reply #109 on: Thu, 07 May 2020, 23:19:39 »
I haven't touched anything else with TMK yet, but I got one of those Monoprice adapters in. I initially didn't bother trying one since I literally bought every single design that looked different from one another in their listings and tested them previously. None worked, at least 2-3 ended up looking exactly the same as each other even though they didn't in the listing, and the Monoprice one actually looks a lot like most of those ones that matched.

The Monoprice adapter did, in fact, end up working with the beige label Z-150 though. Same thing as the first firmware you got working with it. 100% function other than the lock lights not illuminating.

Offline hasu

  • Thread Starter
  • Posts: 3088
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: [REQUEST FOR TEST] TMK IBM PC Keyboard Converter
« Reply #110 on: Fri, 08 May 2020, 00:29:23 »
I haven't touched anything else with TMK yet, but I got one of those Monoprice adapters in. I initially didn't bother trying one since I literally bought every single design that looked different from one another in their listings and tested them previously. None worked, at least 2-3 ended up looking exactly the same as each other even though they didn't in the listing, and the Monoprice one actually looks a lot like most of those ones that matched.

The Monoprice adapter did, in fact, end up working with the beige label Z-150 though. Same thing as the first firmware you got working with it. 100% function other than the lock lights not illuminating.

The Monoprice adapter did lock lights for other AT keyboards?
And it can handle F7 key correctly? This post on Deskthority referred the key.

https://github.com/tmk/tmk_keyboard/wiki/IBM-PC-AT-Keyboard-Protocol#monoprice-ps2-converter-bluecube
TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Offline Maledicted

  • Posts: 1084
  • Location: Wisconsin, United States
Re: [REQUEST FOR TEST] TMK IBM PC Keyboard Converter
« Reply #111 on: Fri, 08 May 2020, 01:23:37 »
I haven't touched anything else with TMK yet, but I got one of those Monoprice adapters in. I initially didn't bother trying one since I literally bought every single design that looked different from one another in their listings and tested them previously. None worked, at least 2-3 ended up looking exactly the same as each other even though they didn't in the listing, and the Monoprice one actually looks a lot like most of those ones that matched.

The Monoprice adapter did, in fact, end up working with the beige label Z-150 though. Same thing as the first firmware you got working with it. 100% function other than the lock lights not illuminating.

The Monoprice adapter did lock lights for other AT keyboards?
And it can handle F7 key correctly? This post on Deskthority referred the key.

https://github.com/tmk/tmk_keyboard/wiki/IBM-PC-AT-Keyboard-Protocol#monoprice-ps2-converter-bluecube

You are a hawk. Good call on F7. It does not work with the Monoprice adapter. I'm pretty sure that it worked with straight ps2 on the HP. The lock lights do work with the NEC APC-H410EA I tested with, and so did F7.

I flashed back to the first TMK firmware that that allowed full function sans the lock lights and confirmed that F7 works fine with the beige label Z-150 that way.

Offline hasu

  • Thread Starter
  • Posts: 3088
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: [REQUEST FOR TEST] TMK IBM PC Keyboard Converter
« Reply #112 on: Wed, 13 May 2020, 10:17:46 »
Maledicted,

Can you try this firmware with Z-150 AT and post hid_listen log?

https://raw.githubusercontent.com/tmk/tmk_keyboard/80a172448cebce73d232746ea0f8bd05934cb88c/converter/ibmpc_usb/binary/ibmpc_usb_atmega32u4.hex

I like to know if it shows 'PRT:11' instead of 'PRT:10', the firmware can recognize Z-150 AT specific protocol now.
Also press CapsLock to see how it goes in log.


Code: [Select]
Waiting for new device:.......
Listening:


TMK:a709d822/LUFA


USB configured.

Keyboard start.
I428 wFF rFA A1433
PRT:10 ISR:FE90 rAA W1785 R2286
ID:0000(2) S2286 L2286 r29 rF0 r29
TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Offline Maledicted

  • Posts: 1084
  • Location: Wisconsin, United States
Re: [REQUEST FOR TEST] TMK IBM PC Keyboard Converter
« Reply #113 on: Thu, 14 May 2020, 18:03:02 »
Maledicted,

Can you try this firmware with Z-150 AT and post hid_listen log?

https://raw.githubusercontent.com/tmk/tmk_keyboard/80a172448cebce73d232746ea0f8bd05934cb88c/converter/ibmpc_usb/binary/ibmpc_usb_atmega32u4.hex

I like to know if it shows 'PRT:11' instead of 'PRT:10', the firmware can recognize Z-150 AT specific protocol now.
Also press CapsLock to see how it goes in log.


Code: [Select]
Waiting for new device:.......
Listening:


TMK:a709d822/LUFA


USB configured.

Keyboard start.
I428 wFF rFA A1433
PRT:10 ISR:FE90 rAA W1785 R2286
ID:0000(2) S2286 L2286 r29 rF0 r29

Alright, interesting results with this one. I flashed your new test firmware and now all 3 lock lights flash on, flicker, and then shut off whenever pressing caps lock or scroll lock. Until the lock lights shut off again, the keyboard doesn't respond to key presses, but resumes doing so after they do shut off. It does the same thing, in all regards, if I press l press caps lock on another connected keyboard. Pressing num lock works like the first working firmware in that it toggles num lock, but the lights do not react. I can type immediately after pressing this lock key.

I noticed that, sometimes, pressing caps lock will lock up the whole board and I have had to pres caps lock on another keyboard to return functionality to the Z-150. In these cases, the board doesn't seem to send any output related to having pressed caps lock to the computer until pressing caps lock on another keyboard and pressing a key, in which case it belatedly sends both.

This is the result of connecting the Teensy with the keyboard attached, and then pressing caps lock:

Keyboard start.
I250 wFF A1253
ERR:17 ISR:6A90
PRT:11 ISR:0000 X1755 rAA W2198 R2699
ID:0000(2) S2699 L2699 r58 wED
ERR:11

Offline hasu

  • Thread Starter
  • Posts: 3088
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: [REQUEST FOR TEST] TMK IBM PC Keyboard Converter
« Reply #114 on: Thu, 14 May 2020, 21:34:50 »
Alright, interesting results with this one. I flashed your new test firmware and now all 3 lock lights flash on, flicker, and then shut off whenever pressing caps lock or scroll lock. Until the lock lights shut off again, the keyboard doesn't respond to key presses, but resumes doing so after they do shut off. It does the same thing, in all regards, if I press l press caps lock on another connected keyboard. Pressing num lock works like the first working firmware in that it toggles num lock, but the lights do not react. I can type immediately after pressing this lock key.

Can you post the whole of log outputs during this process?

I guess the keyboard seems to wait for signal or something after the covnerter tries and fails to send 'set LED' command. I don't know why NumLock  behaves diffrently from other Lock keys, though.

Quote
I noticed that, sometimes, pressing caps lock will lock up the whole board and I have had to pres caps lock on another keyboard to return functionality to the Z-150. In these cases, the board doesn't seem to send any output related to having pressed caps lock to the computer until pressing caps lock on another keyboard and pressing a key, in which case it belatedly sends both.

Another 'set LED' command caused by another keyboard may recovers from lockup somehow.
TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Offline hasu

  • Thread Starter
  • Posts: 3088
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: [REQUEST FOR TEST] TMK IBM PC Keyboard Converter
« Reply #115 on: Wed, 03 June 2020, 02:19:39 »
Updated firmware.  commit:7cf306 2020-06-03

Chages since the last update commit:42b7bf:
- Improvement for XT protocol, especially for genuine IBM 83-key keyboard. The converter now should work well with them.
- Fix signaling on how to send command in AT protocol. Realforce 101 failed to receive 'Set LED' commands occasionally.
- Various improvements for compatibility and error recovery

TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt