IRQ Issue with Arduino UNO + Ethernet Shield + PS/2 Keyboard

Hi,

I am having trouble using the PS/2 Keyboard library with the Ethernet shield attached. I have tried it without the shield and it works fine using the allowed IRQ pins 2 and 3 but with the shield it seems that it is unable to read the keyboard input. The IRQ allowed pins, according to the library, are 2 and 3. The data pin it seems can be any digital pin, I have tried using 7, 2 and 5 but that didn't help.

Symptoms:

Keyboard lights flash (Normal on the working sample sketch without the shield) No response to keyboard input with the Ethernet shield attached.

I can only assume that it is an IRQ pin problem and that the Ethernet shield is using those pins.

It is integral to my project that I use an Ethernet shield, does anyone have an suggestions on the IRQ problem?

Thanks,

David

IIRC some ethernet shields have a possibility to cut the IRQ line on the bottom side of the PCB. It uses pin 2 (?) to indicate there is data received.

That means that pin3 should be free for your KB.

Check shieldlist.org to see whcih pins your ethernet shield uses.

Hmm, I thought the same so I tried pin 3 for the IRQ and another pin for the Data but the keyboard.available() is still not picking it up.

I have used a couple of serial.print statements within the test sketch to see at which point the program stops, it just never is able to see the keyboard with keyboard.available.

Does anyone know if it would be possible to create a new interrupt pin and allow the PS2Keyboard library to use that?

Check this one - http://www.arduino.cc/playground/Main/PinChangeInt -
ANy pin can generate an interrupt but you have to add some logic to determine the pin

Thanks for that.

I just had a quick read and I think I get it.....

I don't really know what kind of interrupt the ps2keyboard library expects to use, RISING, FALLING or CHANGE. I guess I will just have to have a go. I have ordered a rev3 2560 mega because it has more external interrupts which is pretty lazy.

I will give this a go tonight.

hi David, i have the same problem... can you help me?