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

Post Reply
jose
Flowcode V4 User
Posts: 26
Joined: Sat Nov 01, 2008 12:11 am
Contact:

Adding a PS2 keyboard to your project

Post by jose »

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 952 times

jose
Flowcode V4 User
Posts: 26
Joined: Sat Nov 01, 2008 12:11 am
Contact:

Re: Adding a PS2 keyboard to your project

Post by jose »

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 956 times

abed_hn
Posts: 1
Joined: Sun Jan 26, 2014 11:35 pm
Contact:

Re: Adding a PS2 keyboard to your project

Post by abed_hn »

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
Contact:

Re: Adding a PS2 keyboard to your project

Post by Genilsonsa »

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: 1975
Joined: Wed Aug 27, 2008 10:31 pm
Location: Netherlands
Contact:

Re: Adding a PS2 keyboard to your project

Post by kersing »

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
Contact:

Re: Adding a PS2 keyboard to your project

Post by Genilsonsa »

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
Contact:

Re: Adding a PS2 keyboard to your project

Post by Genilsonsa »

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: 15062
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Contact:

Re: Adding a PS2 keyboard to your project

Post by Benj »

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
Contact:

Re: Adding a PS2 keyboard to your project

Post by Genilsonsa »

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
Contact:

Re: Adding a PS2 keyboard to your project

Post by Genilsonsa »

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: 15062
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Contact:

Re: Adding a PS2 keyboard to your project

Post by Benj »

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.

Post Reply