Peter Hanlon
Member
I am using a Arduino Leonardo to try to interface a Flexible USB/PS2 Keyboard using the PS2Keyboard Library version 2.4. The keyboard is obtainable from Jaycar an Australian electronics outfit, and is flexible and immersible. It is labelled Digitech and is of Chinese origin. I suspect a link with Freescale or NXP. It works happily as a USB-connected Apple Mac or Windows device. It has a PS2 adapter plug which is just wire to wire passive.
I do not have a CRO, but have adapted the 2.4 code to debug the connection in various ways. I am pretty sure that it is trying to talk PS2 protocol rather than USB, as I can see an 11-bit periodicity in the clock signal, and the initial data it sends is hex AA, which it repeats as though it is expecting a host response, eventually filling the PS2Keyboard 45byte buffer, which is then discarded and refilled ad infinitum. The 'available' and 'read' functions return nothing, presumably because AA is not an expected scan code. The keyboard is also locked, and does not transport any keystrokes.
Assuming that an Ack of some sort was required, I would then require a host command capability. I tried to extend the PS2Interrupt routine to handle an 11-bit output, and provided a 'send' function to make use of it. The input still works, but there is no evidence of my output achieving anything.
I suppose I am asking for any comment (is AA a keyboard to host command and how is it responded to etc), but the extended experimental source might resonate with someone wanting to issue host to keyboard commands.
View attachment PS2Keyboard.cppView attachment PS2Keyboard.hView attachment keybrd.ino
I do not have a CRO, but have adapted the 2.4 code to debug the connection in various ways. I am pretty sure that it is trying to talk PS2 protocol rather than USB, as I can see an 11-bit periodicity in the clock signal, and the initial data it sends is hex AA, which it repeats as though it is expecting a host response, eventually filling the PS2Keyboard 45byte buffer, which is then discarded and refilled ad infinitum. The 'available' and 'read' functions return nothing, presumably because AA is not an expected scan code. The keyboard is also locked, and does not transport any keystrokes.
Assuming that an Ack of some sort was required, I would then require a host command capability. I tried to extend the PS2Interrupt routine to handle an 11-bit output, and provided a 'send' function to make use of it. The input still works, but there is no evidence of my output achieving anything.
I suppose I am asking for any comment (is AA a keyboard to host command and how is it responded to etc), but the extended experimental source might resonate with someone wanting to issue host to keyboard commands.
View attachment PS2Keyboard.cppView attachment PS2Keyboard.hView attachment keybrd.ino