Help with connecting a PS2 keyboard (likely interrupt related)

Hi -

I am trying to connect a PS2 keyboard to an arduino nano iot 33.
I am using this PS2 library GitHub - PaulStoffregen/PS2Keyboard: PS/2 Keyboard Library for Arduino
I am using the example sketch just to test things out.
I was able to get this to work on my MKR 1010 with no problem. ( I was using pin 7 for irq and and pin 6 for data)
I then tried to use the same sketch on my nano iot 33 with not luck. ( used pins 7 for data & 8 for irq )
I'm pretty sure it has something to do with differences in the way the boards deal with interrupts.
When I put debugging statement in the interrupt function ( I know you are not supposed to print the serial monitor during an interrupt function - but it was just to test that its being called) on the MRK I only see the function being called when I press a button on the Ps2 keyboard - but on the NANO IOT 33 I see it being called randomly ?
I'm very new to microcontroller and never done anything with IRQ's yet (but eager to learn)
Based on the documentation it seems like those pins are valid to be used for IRQ.

Any help would be appreciated ..

By "irq" (IRQ) are you meaning an external interrupt?

Yes. That’s correct.

[url]https://github.com/ostaquet/Arduino-Nano-33-IoT-Ultimate-Guide/blob/master/README.md[/url]

That's an informative link.

It looks like external interrupts are possible with A1,A5,A7 and D2,4,9,10,11.
("8" is not on the list.)
The Nano33IoT doesn't like 5V applied to its inputs.

Thanks. I suspect the 5v on the input lines may be the issue. I tried the other pins with the same result.

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.