Adding a PS2 keyboard to your project

Tips, Tricks and methods for programming, learn ways of making your programming life easier, and share your knowledge with others.

Moderators: Benj, Mods

jose
Flowcode V4 User
Posts: 26
Joined: Sat Nov 01, 2008 12:11 am
Has thanked: 7 times
Been thanked: 10 times
Contact:

Adding a PS2 keyboard to your project

Postby jose » Mon Sep 05, 2011 7:36 pm

Hi,
This program decodes data comming from keyboard and display its decimal value on a LCD.
It decodes normal keys and some extended keys like the arrows keys that maybe can be usefull to control something. The key value is store in "key_data" variable and you can use it for others purposes.
I think there is enough comments in flowchart showing how it works

Regards
Jose
Attachments
PS2keyboard_jb.fcf
(13.25 KiB) Downloaded 895 times
These users thanked the author jose for the post (total 5):
DavidA (Tue Sep 06, 2011 9:55 am) • Benj (Tue Sep 06, 2011 9:58 am) • abed_hn (Sun Jan 26, 2014 11:45 pm) • jgu1 (Tue Jan 28, 2014 12:15 pm) • medelec35 (Fri May 30, 2014 11:06 pm)
Rating: 25%
 

jose
Flowcode V4 User
Posts: 26
Joined: Sat Nov 01, 2008 12:11 am
Has thanked: 7 times
Been thanked: 10 times
Contact:

Re: Adding a PS2 keyboard to your project

Postby jose » Thu Sep 15, 2011 11:35 pm

After pressing a extended key, an arrow for example, you have to press the next key twice to have its value.
This new file correct this problem.
Attachments
PS2keyboard_jb2.fcf
(13.79 KiB) Downloaded 904 times
These users thanked the author jose for the post (total 5):
Spanish_dude (Fri Sep 16, 2011 2:56 am) • Benj (Fri Sep 16, 2011 9:56 am) • abed_hn (Sun Jan 26, 2014 11:45 pm) • jgu1 (Tue Jan 28, 2014 12:16 pm) • medelec35 (Fri May 30, 2014 11:06 pm)
Rating: 25%
 

abed_hn
Posts: 1
Joined: Sun Jan 26, 2014 11:35 pm
Has thanked: 3 times
Contact:

Re: Adding a PS2 keyboard to your project

Postby abed_hn » Mon Jan 27, 2014 12:04 am

jose wrote:After pressing a extended key, an arrow for example, you have to press the next key twice to have its value.
This new file correct this problem.

Thank you very much ... jose:)
it's work fine with 16f877a ...


but it's not working with 16f628a
-----
when i put this MACRO (LCDdisplay)

if find this result



can you help me please ...

Genilsonsa
Posts: 150
Joined: Mon Oct 15, 2012 5:19 pm
Has thanked: 12 times
Been thanked: 18 times
Contact:

Re: Adding a PS2 keyboard to your project

Postby Genilsonsa » Fri May 30, 2014 6:25 pm

Good afternoon I come to thank the author of this topic, very useful projct this up until I added to my project I was doing. Thank you I ask
Last edited by Genilsonsa on Fri May 30, 2014 6:36 pm, edited 1 time in total.

kersing
Valued Contributor
Valued Contributor
Posts: 1905
Joined: Wed Aug 27, 2008 10:31 pm
Location: Netherlands
Has thanked: 549 times
Been thanked: 1063 times
Contact:

Re: Adding a PS2 keyboard to your project

Postby kersing » Fri May 30, 2014 6:34 pm

Please use English in this forum.
“Integrity is doing the right thing, even when no one is watching.”

― C.S. Lewis

Genilsonsa
Posts: 150
Joined: Mon Oct 15, 2012 5:19 pm
Has thanked: 12 times
Been thanked: 18 times
Contact:

Re: Adding a PS2 keyboard to your project

Postby Genilsonsa » Mon Oct 06, 2014 8:51 pm

Hello I need to make an interface to emulate a PS2 keyboard with pic 16F628A, but he would have to work with boot WINDOWS.Alguém can give me some light on how this will work.

Genilsonsa
Posts: 150
Joined: Mon Oct 15, 2012 5:19 pm
Has thanked: 12 times
Been thanked: 18 times
Contact:

Re: Adding a PS2 keyboard to your project

Postby Genilsonsa » Mon Oct 06, 2014 8:57 pm

It would be a project of emulating 14 letters of the keyboard .Pic send this to 14 letters pc.Tem how to implement this with Flowcode Can anyone help me on Protoco PS2.

User avatar
Benj
Matrix Staff
Posts: 14655
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4647 times
Been thanked: 4267 times
Contact:

Re: Adding a PS2 keyboard to your project

Postby Benj » Tue Oct 07, 2014 10:55 am

Hello,

As your making the keyboard itself is there any reason you are using PS/2 over USB? Our USB HID component will allow you to create a bootable keyboard using a USB enabled device.

I've had a quick look around but most projects seem to use a PS/2 keyboard to interface a PIC rather than using the PIC to create the keyboard.

Genilsonsa
Posts: 150
Joined: Mon Oct 15, 2012 5:19 pm
Has thanked: 12 times
Been thanked: 18 times
Contact:

Re: Adding a PS2 keyboard to your project

Postby Genilsonsa » Tue Oct 07, 2014 6:32 pm

Hello thank you for trying responder.Vou me implement this project via USB WITH PIC 18F2550 Thank .Very

Genilsonsa
Posts: 150
Joined: Mon Oct 15, 2012 5:19 pm
Has thanked: 12 times
Been thanked: 18 times
Contact:

Re: Adding a PS2 keyboard to your project

Postby Genilsonsa » Sat Oct 11, 2014 3:31 pm

Hello I have a doubt regarding the project with HID usb implementar.Tem like me who want to make a simulation in proteus or another program to see if it is working for windows 7 64bit

User avatar
Benj
Matrix Staff
Posts: 14655
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4647 times
Been thanked: 4267 times
Contact:

Re: Adding a PS2 keyboard to your project

Postby Benj » Mon Oct 13, 2014 12:25 pm

Hello,

With USB it's better to dive in and get it working on hardware, simulation will be tricky at best and might not be possible in Proteus.

Here is an USB Keyboard example which should work great with hardware.
http://www.matrixtsl.com/wiki/index.php ... 7a31b97c2a

One of our PIC ECIO devices might be good to help you get started as the USB communications comes working out the box and there is no nasty configuration setup etc.