I am trying to use arduino to send scan codes set 2 into my PC. I can get it to work after the PC was booted up with a real keyboard plugged in. But I cant get the computer to recognize the arduino on boot up. I have read the protocol on PS/2 interface, lots of info but still no luck. Also I tried plugging my arduino setup into a new PC and it didn’t work at all. Why does it work on my older(7yo) pc but not the new one? Anyone have any info?
IIRC, a PC (via the BIOS on boot, I think) does some communication with the keyboard (it has a small microcontroller in it, of course) to verify that it is a keyboard; if that communication doesn't occur properly, it figures it isn't a keyboard or nothing - and doesn't recognize it...
You might want to read up on how this process works - at least, I think it works this way; there might be a special response you have to give to the PC for it to think that what you have hooked up is a keyboard...
I have read the protocol on PS/2 interface, lots of info but still no luck.
Have you found the page at http://www.computer-engineering.org/ps2keyboard/? The very bottom of that page shows a typical conversation between a PC and a keyboard as the PC boots up. (cr0sh recalled correctly. 8-))
I am reproducing the conversation here, formatted as code only to preserve its original spacing. There are more comments from the original author, including a comprehensive list of command/response codes, above this sequence at the bottom of that page.
Keyboard: AA Self-test passed ;Keyboard controller init Host: ED Set/Reset Status Indicators Keyboard: FA Acknowledge Host: 00 Turn off all LEDs Keyboard: FA Acknowledge Host: F2 Read ID Keyboard: FA Acknowledge Keyboard: AB First byte of ID Host: ED Set/Reset Status Indicators ;BIOS init Keyboard: FA Acknowledge Host: 02 Turn on Num Lock LED Keyboard: FA Acknowledge Host: F3 Set Typematic Rate/Delay ;Windows init Keyboard: FA Acknowledge Host: 20 500 ms / 30.0 reports/sec Keyboard: FA Acknowledge Host: F4 Enable Keyboard: FA Acknowledge Host: F3 Set Typematic Rate/delay Keyboard: FA Acknowledge Host: 00 250 ms / 30.0 reports/sec Keyboard: FA Acknowledge
You would be responsible for sending the parts labeled “
Keyboard:” from your Arduino. My apologies in advance if you already saw this and implemented it. It was not clear to me what you meant by “I have read the protocol on PS/2 interface”.
which ps/2 library are you using? Are you using the one from the playground?
I am guessing that the problem is that the keyboard start up is not being done right.
can you post your code?