Jump to content

Questions About The Ps/2 Protocol

Recommended Posts



I'am currently at the first steps of creating a pic mouse/pointing device with a PIC16 microcontroller. As interface i want to use ps/2.


But before I start i have a few questions.

I have read the following article http://www.computer-engineering.org/ps2protocol/


Am i correct? when i say, I can use Uart without a problem for this project?

And my next obvious question, is there anyone who has created a pic mouse device before? And can share some tips and maybe even some code?


Thx in advance,


Link to post
Share on other sites

Hi Yodar, unfortunately a uart will not work with the ps2 protocol, it is very similar to i2c though, so you may be able to use existing i2c code and modify it. If there is no special reason to use the ps2 protocol you may consider usb with a pic 16f765 ( i think) and use microchips mouce driver code from their website.

Link to post
Share on other sites

Ok thx, this is the advice I was looking for.


Only... Just after i posted this message I came to the conlusion that a pointing device/mouse could not accomplish mij wishes.

Im afraid my project will become a bit more difficult.


Basicly what i want is to send to mouse cursor of a computer desktop to some fixed X and Y coordination. The problem with a mouse is, that a mouse device only sends the distance it has moved since it last sended package. Im afraid ill have to write some computer program first which is capeble of setting the fixed X and Y coordinations of the mouse cursor.

And than send some data to the desktop program. This maybe can be done with a USB HID compliant device.


I have some expierence with a USB HID compliant device but, If its possible i would like to keep it as simple as possible. So is there maybe a existing program allready which can do this? Control the mouse cursor and has a easy to use interface?

Link to post
Share on other sites

Hi again, microchip provided source code for the 16f765 that would enumerate as a hid class mouse. You should be able to download from their website, the example code provided would move the mouse cursor in a circular motion on your screen, so it should be fairly easy for you to adapt.

Link to post
Share on other sites

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...