News:

PROTON pic BASIC Compilers for PIC, PIC24, dsPIC33

Main Menu

PS/2

Started by Teo, May 06, 2021, 09:48 PM

Previous topic - Next topic

Teo

Hi all,
Someone can help me with a piece of code for PS/2 ?
I have to simulate a PC keyboard.
Thanks in advance ,
Teo

okmn

I found some codes, not proton code, but might be helpful for coding mentality / algorithm
link 1
link 2
link 3

Teo

Hi Okmn,
Thanks for the help
Teo

See_Mos

#3
I wrote some code using Proton back in 2006.  It was based on a UK magazine article, Wireless World I think.  I cannot find the folder with the printed information but I have found an unfinished program to read and control a PS/2 keyboard and display the codes and characters on an LCD display.

Due to changes of Proton it no longer compiles but it should not be difficult to make the changes needed.

Teo

Hi See_Mos,
Thanks in advance!
Teo

See_Mos

#5
Hi Teo,
This could take some time to complete but it is an interesting project.  I have a lot more reading to do.

Getting data from the PS/2 keyboard and sending control codes to the keyboard is a lot easier than using the PIC to emulate a keyboard.  It is not just about sending codes to the PC as many of the articles suggest.  The PIC has to respond to various control sequences at start up and during use.

Over the last few days I have gathered quite a lot of information.  Most of the articles are simply re-working of an original idea and deal mostly with getting data from the keyboard.  Nearly all of the code is incomplete or is reported as not be fully working, especially Arduino code!  One item using a 16F84 looked very interesting but the code was in ASM and the download password protected.

I cam across two ideas that have both the PIC and a keyboard connected at the same time.  What the authors do not admit is that the real keyboard is looking after the start sequence so that the processor can then send key codes.  More articles suggested using the IC from a PS/2 keyboard interfaced to a micro processor.


Teo

Thank you so much!
Teo

See_Mos

At last I found some time to work on this.

I now have some stable code written in Positron that works with two different PC's, one is 15 years old and the other ten years old, both with Windows 7.

I can boot both PC's without a keyboard connected, send caps lock, num lock, scroll lock as well as text and numbers to Notepad.
   
I just need to write up some notes when I get back from a short break.

Teo

Thanks for your help,
Teo

See_Mos

I have added the project to the WIKI > code examples > other example code.

Looking forward to comments and suggestions.

Teo

Thousands of thanks !
Teo