free 8051 Microcontroller Projects AVR PIC Microcontroller Projects Tutorials Ebooks Libraries, interfacing tutorials, lcd tutorial, stepper motor, dc motor 8051 assembly language programming electronics and communication ECE CSE pdf ebooks library BE final year project ideas Embedded systems

 
8051 microcontroller 8051 microcontroller
Forums

Go to page  [1] 2
Moderators: Ajay, Junied , abbas1707, Arun Kumar V, pdi33, Shailesh NAYAK, ۞ TPS ۞, shyam, sashijoseph
Author Post
mhel
Thu Jan 17 2008, 01:24PM
 User Offline
Registered Member #5217
Joined: Sat Dec 22 2007, 03:02PM

Posts: 36
Thanked 9 times in 9 posts
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.

Back to top


۞ TPS ۞
Sun Feb 03 2008, 11:40AM

 User Offline
Registered Member #2712
Joined: Tue Jul 31 2007, 12:06AM

Posts: 469
Thanked 66 times in 56 posts


Online Component Shoppe
http://www.onlinetps.com/
Components at cheap rates in India
Back to top


۞ TPS ۞
Sun Feb 03 2008, 11:42AM

 User Offline
Registered Member #2712
Joined: Tue Jul 31 2007, 12:06AM

Posts: 469
Thanked 66 times in 56 posts
may be this link also help you
http://www.beyondlogic.org/keyboard/keybrd.htm


Online Component Shoppe
http://www.onlinetps.com/
Components at cheap rates in India
Back to top


shyam
Sun Feb 03 2008, 12:40PM

 User Offline

Registered Member #2984
Joined: Mon Aug 06 2007, 11:33AM

Posts: 723
Thanked 107 times in 103 posts
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???

lProgress is not made by early risers or hard workers, but by LAZY people, trying to find easier ways to do the same........
Back to top


mhel
Sun Feb 03 2008, 01:39PM
 User Offline
Registered Member #5217
Joined: Sat Dec 22 2007, 03:02PM

Posts: 36
Thanked 9 times in 9 posts
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
Back to top



This post has been thanked 1 time
 shyam 
shyam
Mon Feb 04 2008, 06:16AM

 User Offline

Registered Member #2984
Joined: Mon Aug 06 2007, 11:33AM

Posts: 723
Thanked 107 times in 103 posts
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????

lProgress is not made by early risers or hard workers, but by LAZY people, trying to find easier ways to do the same........
Back to top


mhel
Mon Feb 04 2008, 08:28AM
 User Offline
Registered Member #5217
Joined: Sat Dec 22 2007, 03:02PM

Posts: 36
Thanked 9 times in 9 posts
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
Back to top


Ajay
Mon Feb 04 2008, 09:29AM
Rickey's World Admin

 User Offline

Registered Member #1
Joined: Fri Feb 24 2006, 04:56AM

Posts: 3757
Thanked 697 times in 656 posts
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..

www.rickeyworld.info
If you feel satisfied with the user's forum reply please click on the thank button.

Obey forum rules!
Respect others!
Back to top


mhel
Tue Feb 05 2008, 11:09AM
 User Offline
Registered Member #5217
Joined: Sat Dec 22 2007, 03:02PM

Posts: 36
Thanked 9 times in 9 posts
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.

Back to top


shyam
Wed Feb 13 2008, 10:13AM

 User Offline

Registered Member #2984
Joined: Mon Aug 06 2007, 11:33AM

Posts: 723
Thanked 107 times in 103 posts
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

lProgress is not made by early risers or hard workers, but by LAZY people, trying to find easier ways to do the same........
Back to top


Go to page  [1] 2  

Jump:     Back to top

Syndicate this thread: rss 0.92 Syndicate this thread: rss 2.0 Syndicate this thread: RDF
Powered by e107 Forum System

8051 Microcontroller Projects 8051 AVR tutorials PIC microcontroller, 8051 assembly language programming electronics and communication ECE CSE pdf ebooks library BE final year project ideas Embedded systems