PS/2 Keyboard Musings
Posted: Mon Sep 21, 2020 9:34 pm
I mentioned on Tetroid's keyboard post below that I wondered whether it was possible to connect a PS/2 keyboard to a QL using an Arduino as a bridge. Please accept my ramblings as a method of getting my thoughts down. As someone who has only a small amount of knowledge on these topics (always dangerous), I apologise if what i'm about to write is absolute rubbish or has been covered elsewhere.
A bit of background. My QL came with a SPEM mechanical keyboard which has suffered over the years with failing key switches to the point that it became unusable. I mused that it must be possible to convert what a standard keyboard output to what the QL needed. This could be achieved by an arduino or something similar, I thought. This has nagged away for the last couple of years but I've yet to do anything about it. The idea came up again after seeing a video by Adrian Black on how he build a arduino converter so he could use an PS/2 keyboard on a Tandy 1000 computer. This however used a stream of data detailing the keystrokes, rather than the pin selection type the QL uses.
I found a keyboard matrix diagram online that identified which pins are required to be connected for each key. These were labelled J11 & J12. I have the ribbon cable off the old SPEM keyboard that i'd planned to connect between the arduino and the QL.
This raises a few questions:
1) Am I correct in thinking that the power would be provided to the J11(9 pin) socket and the current membrane will connect to the appropriate pin on the J12 (11 pin) socket?
2) Assuming 1 is correct. If I have the J11 connected to the Arduino Inputs and the J12 connected to the outputs, how would I be able to let the QL know that say pin 5 on the J11 connector and pin 7 on the J12 connector are being connected by the keyboard? I had planned to use Adrian's keyboard reading code and adapt it to fulfil the QL requirements.
3) Would the QL be able to provide enough power to supply the arduino and PS/2 keyboard?, or would this need to be externally powered?
4) Could a USB keyboard also be used, preferably wireless to make it a bit more practical?
5) The matrix diagram seems to miss off the up arrow key. Does anyone know which address this uses?
Thanks in advance for any help you are able to provide. As I said my technical knowledge is limited so I may need any advice in the simplest terms as possible.
Cheers,
Andy.
A bit of background. My QL came with a SPEM mechanical keyboard which has suffered over the years with failing key switches to the point that it became unusable. I mused that it must be possible to convert what a standard keyboard output to what the QL needed. This could be achieved by an arduino or something similar, I thought. This has nagged away for the last couple of years but I've yet to do anything about it. The idea came up again after seeing a video by Adrian Black on how he build a arduino converter so he could use an PS/2 keyboard on a Tandy 1000 computer. This however used a stream of data detailing the keystrokes, rather than the pin selection type the QL uses.
I found a keyboard matrix diagram online that identified which pins are required to be connected for each key. These were labelled J11 & J12. I have the ribbon cable off the old SPEM keyboard that i'd planned to connect between the arduino and the QL.
This raises a few questions:
1) Am I correct in thinking that the power would be provided to the J11(9 pin) socket and the current membrane will connect to the appropriate pin on the J12 (11 pin) socket?
2) Assuming 1 is correct. If I have the J11 connected to the Arduino Inputs and the J12 connected to the outputs, how would I be able to let the QL know that say pin 5 on the J11 connector and pin 7 on the J12 connector are being connected by the keyboard? I had planned to use Adrian's keyboard reading code and adapt it to fulfil the QL requirements.
3) Would the QL be able to provide enough power to supply the arduino and PS/2 keyboard?, or would this need to be externally powered?
4) Could a USB keyboard also be used, preferably wireless to make it a bit more practical?
5) The matrix diagram seems to miss off the up arrow key. Does anyone know which address this uses?
Thanks in advance for any help you are able to provide. As I said my technical knowledge is limited so I may need any advice in the simplest terms as possible.
Cheers,
Andy.