mhel
Jan 17 2008, 1:24 PM
hi,
cant' figure out where to post this q, so i chose here instead.
any1 happen to have a ps2 keyboard driver that support host to keyboard com.
i have a working keyboard setup now but no provision of enabling caps lock etc..
it's based on appnote from atmel.
tia.
cant' figure out where to post this q, so i chose here instead.
any1 happen to have a ps2 keyboard driver that support host to keyboard com.
i have a working keyboard setup now but no provision of enabling caps lock etc..
it's based on appnote from atmel.
tia.
۞ TPS ۞
Feb 3 2008, 11:40 AM

۞ TPS ۞
Feb 3 2008, 11:42 AM
shyam
Feb 3 2008, 12:40 PM
i have a working keyboard setup now but no provision of enabling caps lock etc..
well that means you have got the basic code + setup ready and tested it somehow.. gr8!!
now regarding the additional functionality it all depend s on your logic/code..
normally we set a flag for caps lock or numlock ... etc...
once the capslock flag is set call the toupper() and get the problem solved... but is CAPS lock your only concern???

mhel
Feb 3 2008, 1:39 PM
Thanks for replies guys.
I have attached the code I'm using which works only for keyboard to host communication.
My main concern actually is to reset the keyboard, and to be able to use the extended keys,
e.g up/down arrows , num lock.
Right now, when I reset the uController (LPC2138) it sometimes screws up the keyboard, the kb clock pin is connected to P0.14 which is also the BSL. I found a workaround which is to hold the clock line low a little longer during bootup, it works but as I said just a workaround.
ps2kb.zip
I have attached the code I'm using which works only for keyboard to host communication.
My main concern actually is to reset the keyboard, and to be able to use the extended keys,
e.g up/down arrows , num lock.
Right now, when I reset the uController (LPC2138) it sometimes screws up the keyboard, the kb clock pin is connected to P0.14 which is also the BSL. I found a workaround which is to hold the clock line low a little longer during bootup, it works but as I said just a workaround.
ps2kb.zipshyam
Feb 4 2008, 6:16 AM
hi mhel,
buddy u cud have posted this thing in the arm development forum too...!!!
so gud u to have u !! .. u always come up with interesting ideas... i wud like to learn to interface a PS/2 kbd on my 2148 too... where to get started????
buddy u cud have posted this thing in the arm development forum too...!!!
so gud u to have u !! .. u always come up with interesting ideas... i wud like to learn to interface a PS/2 kbd on my 2148 too... where to get started????
mhel
Feb 4 2008, 8:28 AM
Shyam:
I attached the original code that got me started, can't remember where I got it tho. I base my setup from the schematic in the PDF, and from the link "TPS" posted. I wasn't sure if all keyboards have built in pullup so I used external ones. I was told it is preferable to use pins with open drain, so I used the pins reserved for I2C's namely P0.3 & P0.14, I could have used the pair of pins,( e.g P0.2:P0.3) but an External interrupt pin is needed for the keyboard clock, and P0.11 is used for something else, that's why it has to be P0.3 & P0.14. I'm also told that open drain is not necessary I could have also used a couple of transistors instead. I didn't like the constant flipping of the interrupt edge polarity of the original code, I found a different implementation which is what I used in the code on the previous post.
Ajay: maybe you can move this thread to the Arm forum.
ps2kb_orig.zip
I attached the original code that got me started, can't remember where I got it tho. I base my setup from the schematic in the PDF, and from the link "TPS" posted. I wasn't sure if all keyboards have built in pullup so I used external ones. I was told it is preferable to use pins with open drain, so I used the pins reserved for I2C's namely P0.3 & P0.14, I could have used the pair of pins,( e.g P0.2:P0.3) but an External interrupt pin is needed for the keyboard clock, and P0.11 is used for something else, that's why it has to be P0.3 & P0.14. I'm also told that open drain is not necessary I could have also used a couple of transistors instead. I didn't like the constant flipping of the interrupt edge polarity of the original code, I found a different implementation which is what I used in the code on the previous post.
Ajay: maybe you can move this thread to the Arm forum.
ps2kb_orig.zipAjay
Feb 4 2008, 9:29 AM
Hi mhel thank you for your info on PS2 Keyboard..
can you provide your ARM library for PS2 Keyboard? i can add it in download section.
PS: moved thread to ARM development section
another great addition..
can you provide your ARM library for PS2 Keyboard? i can add it in download section.
PS: moved thread to ARM development section
another great addition..mhel
Feb 5 2008, 11:09 AM
Ajay:
that's all there is. the driver is in my first post with attachment, the only missing is the extint.h header which is basically just the declaration of interrupt plus the 1 define for the edge. let me know if there's something else missing.
that's all there is. the driver is in my first post with attachment, the only missing is the extint.h header which is basically just the declaration of interrupt plus the 1 define for the edge. let me know if there's something else missing.
shyam
Feb 13 2008, 10:13 AM
hi mhel!!!
here is something interesting that we can do!!!!...
Graphical Lcd plus PS2 mouse whatsay???
y not make a desktop appearance using the above two...
ia lready started... looking for your contributions
here is something interesting that we can do!!!!...
Graphical Lcd plus PS2 mouse whatsay???
y not make a desktop appearance using the above two...
ia lready started... looking for your contributions

mhel
Feb 13 2008, 6:54 PM
that's nice, share your result
is it good for small lcd? touch screen would be better i think. My project actually needed just 32keys, but the keyboards has plenty enough
and only needs 2 pins
is it good for small lcd? touch screen would be better i think. My project actually needed just 32keys, but the keyboards has plenty enoughand only needs 2 pins
Ajay
Feb 13 2008, 10:44 PM
Mhel i added your P2C code in ARM Library section 

shyam
Feb 14 2008, 12:39 PM
is it good for small lcd? touch screen would be better i think
yes u r right touch screen will be better .. but just think abt the cost!!!!!
neways almost completed the PS2 mouse code... will submit it soon....
Ajay
Feb 14 2008, 10:28 PM
shyam wrote ...
neways almost completed the PS2 mouse code... will submit it soon....
great!! waiting for it..
mhel
Apr 18 2008, 12:58 AM
Ajay,
this is a slightly better version of the ps/2 keyboard, you might want to check it and
replace the one you uploaded.
thanks.
kb.zip
this is a slightly better version of the ps/2 keyboard, you might want to check it and
replace the one you uploaded.
thanks.
kb.zip