chipKIT® Development Platform

Inspired by Arduino™

Include PSKeyboard.h

Created Wed, 21 Dec 2011 18:24:33 +0000 by moses


Wed, 21 Dec 2011 18:24:33 +0000

Hi there, has anybody connected a PS/2 Keyboard to his chipkit 32max yet? If can't use the pskeyboard.h.

I would love to get some help.

Cheers moses


Wed, 21 Dec 2011 21:37:25 +0000

Can you be a little more specific about what the issues are?

Also, PS/2 keyboards are intended to operate at 5V. Many will work at 3.3V but some won't.

Gene Apperson Digilent


Thu, 22 Dec 2011 12:35:47 +0000

I want to include PSKeyboard library 2.1 from the arduino libraries and connect my chipkit32max to the keyboard as it is described on the arudino pages. It works with my arduino uno, but not with the chipkit.

During compiling the mpide reports the error that the library #include <avr/interrupt.h> is missing.

The pskeyboard library includes folling avr libraries: #include <avr/io.h> #include <avr/interrupt.h> #include <avr/pgmspace.h>

I think that's the problem.

Jacob Christ

Fri, 23 Dec 2011 02:16:05 +0000

If the lib includes avr code without condition this will defiantly be an issue and the libraries will need to be ported.



Fri, 23 Dec 2011 11:02:03 +0000

Yes, the library will need to be ported.

{rant} I do wish that library programmers would just use the standard wiring function calls instead of setting registers directly! There is very rarely any need to set registers directly, unless you are doing something to a peripheral for which there is no library or standard calls available for.

In the case of PS2 you are just using change notification interrupts and manipulating IO lines - there is NO excuse for doing it with AVR specific code.