USB Keyboard IF

Nagging hardware related question? Post here!
Maskenlos
Over Heated PSU
Posts: 141
Joined: Sat Nov 03, 2018 12:14 pm

USB Keyboard IF

Post by Maskenlos »

Hi all,

based on the project from Alex:

https://github.com/xelalexv/spectratur

I build a keyboard interface for the QL. Basically it consists of an Arduino Nano and a switch matrix array MT8812. The matrix array is directly attached to the original keyboard sockets (J11 and J12) thus I expect only minor incompatibilities. It allows to attach a PS/2 or USB (emulating PS/2) Keyboard to the Arduino. Currently it is in a very early stage but I want to use the opportunity to ask for your opinion and features you may interested in.

So far what I obtained:

- Build the IF on my breadboard, all keys are working as expected. More testing is required
- Only add 2 additional keys so far, "Backspace" and "Delete"
- Only German keymap so far. No idea if modification for UK keymap is required. But it should be doable

What to do next:

- Build a proper PCB which fits inside the QL (obvious)
- Define keypad keys
- Any additional Key combinations required more than Delete and Backspace? What do you would need?
- Joystick support to map Joystick on (variable) keys. Is this a need from your point of view?

Any comment is highly appreciated.

Best regards,

Stephan
20211222_093540.jpg


User avatar
Pr0f
QL Wafer Drive
Posts: 1307
Joined: Thu Oct 12, 2017 9:54 am

Re: USB Keyboard IF

Post by Pr0f »

Nice project - does it deal with CRTL, ALT and SHIFT keys and combinations of those with other keys - the IPC code has some special cases - particularly with the HERMES IPC replacement - that you may want to handle.


User avatar
Peter
Font of All Knowledge
Posts: 2009
Joined: Sat Jan 22, 2011 8:47 am

Re: USB Keyboard IF

Post by Peter »

Impressive. I would be far more interested in a QL matrix to PS/2 converter though ;)


Maskenlos
Over Heated PSU
Posts: 141
Joined: Sat Nov 03, 2018 12:14 pm

Re: USB Keyboard IF

Post by Maskenlos »

Pr0f, anything particular you want me to test? So far I only tested the basic combinations with CTRL (e.g. CTRL + arrow left) and with SHIFT. This works well. I do not have a Hermes, so I can not test Hermes specific things.

Peter, fully understand your demand. Probably this is useful to you:

http://www.deblauweschicht.nl/tinkering/qlkeys1.html

Maybe I will give it a try after I have finished this small project. But in your special case the Arduino may be omitted?

Stephan


Derek_Stewart
Font of All Knowledge
Posts: 3975
Joined: Mon Dec 20, 2010 11:40 am
Location: Sunny Runcorn, Cheshire, UK

Re: USB Keyboard IF

Post by Derek_Stewart »

Maskenlos wrote:Pr0f, anything particular you want me to test? So far I only tested the basic combinations with CTRL (e.g. CTRL + arrow left) and with SHIFT. This works well. I do not have a Hermes, so I can not test Hermes specific things.

Peter, fully understand your demand. Probably this is useful to you:

http://www.deblauweschicht.nl/tinkering/qlkeys1.html

Maybe I will give it a try after I have finished this small project. But in your special case the Arduino may be omitted?

Stephan
Hi Stephan,

Looks good, I will have a go at making this interface, for one of my QLs.


Regards,

Derek
User avatar
bwinkel67
QL Wafer Drive
Posts: 1202
Joined: Thu Oct 03, 2019 2:09 am

Re: USB Keyboard IF

Post by bwinkel67 »

Maskenlos wrote:Hi all,

based on the project from Alex:

https://github.com/xelalexv/spectratur

I build a keyboard interface for the QL. Basically it consists of an Arduino Nano and a switch matrix array MT8812. The matrix array is directly attached to the original keyboard sockets (J11 and J12) thus I expect only minor incompatibilities. It allows to attach a PS/2 or USB (emulating PS/2) Keyboard to the Arduino. Currently it is in a very early stage but I want to use the opportunity to ask for your opinion and features you may interested in.
So 8x12 gives 96 keys. The QL has a 9x11 matrix for 99 keys. Which 3 keys are not supported. Also, in the picture I see 9 & 8 for ribbon cables going to the keyboard connector...so not all lines are used?

Nice seeing a German board. Very similar to the US ones except they don't have that little daughter board on top of memory near the CPU :)


Maskenlos
Over Heated PSU
Posts: 141
Joined: Sat Nov 03, 2018 12:14 pm

Re: USB Keyboard IF

Post by Maskenlos »

I just counted the keys on my QL, if not miss-count there are 65 keys. Could anyone kindly double confirm :D
To be honest, there are no keys missing, even better, there are keys on the PC Keyboard which not even exist on the QL keyboard:
- Backspace
- Delete
- / (on the Key-Pad)
- x (on the Key-Pad)

Also its a mystery that the QL has a 9x11 Matrix, the 8049 IPC only supports 8x8 Matrix. Kindly check the diagram below. So a MT8812 and 3 external diodes will do the job. 8 & 9 ribbon cable are correct, as I do not use pins 1,2 & 11 from J12.
Keyboard.png


Maskenlos
Over Heated PSU
Posts: 141
Joined: Sat Nov 03, 2018 12:14 pm

Re: USB Keyboard IF

Post by Maskenlos »

Sorry, of course 64 keys as there are 2 Shift keys. And in almost all cases 8x8 is 64 :-)


User avatar
XorA
Site Admin
Posts: 1368
Joined: Thu Jun 02, 2011 11:31 am
Location: Shotts, North Lanarkshire, Scotland, UK

Re: USB Keyboard IF

Post by XorA »

I am working on the firmware for a very similar USB->QL keyboard adapter!


User avatar
XorA
Site Admin
Posts: 1368
Joined: Thu Jun 02, 2011 11:31 am
Location: Shotts, North Lanarkshire, Scotland, UK

Re: USB Keyboard IF

Post by XorA »



Post Reply