Difference between revisions of "Interfacing with a mouse"

From Mech
Jump to navigationJump to search
Line 7: Line 7:
The goal of the project is to interface the PIC184520 with a PS/2 mouse - specifically, an ione Lynx-M9 Wheel Optical mouse with a USB to PS/2 adapter. The mouse's XY coordinates will be displayed on an LCD screen and will be updated when the mouse moves.
The goal of the project is to interface the PIC184520 with a PS/2 mouse - specifically, an ione Lynx-M9 Wheel Optical mouse with a USB to PS/2 adapter. The mouse's XY coordinates will be displayed on an LCD screen and will be updated when the mouse moves.


The PS/2 connector is traditionally used to connect mice and keyboards to computer systems. The connector uses six pins: clock, data, 5V, GND and two that are not connected. The PS/2 connector is fully documented here: [http://en.wikipedia.org/wiki/PS/2_connector PS/2 connector.] We used a Parallax PS/2 to Breadboard Adapter for connect the optical mouse to the PIC18. Documentation and ordering information for the adapter can be found here: [http://www.parallax.com/Store/Microcontrollers/PropellerProgrammingKits/tabid/144/CategoryID/20/List/0/SortField/0/Level/a/ProductID/513/Default.aspx Breadboard Adapter].
The PS/2 connector is traditionally used to connect mice and keyboards to computer systems. The connector uses six pins: clock, data, 5V, GND and two that are not connected. The PS/2 connector is fully documented here: [http://en.wikipedia.org/wiki/PS/2_connector PS/2 connector.] We used a Parallax PS/2 to Breadboard Adapter to connect the optical mouse to the PIC18. Documentation and ordering information for the adapter can be found here: [http://www.parallax.com/Store/Microcontrollers/PropellerProgrammingKits/tabid/144/CategoryID/20/List/0/SortField/0/Level/a/ProductID/513/Default.aspx Breadboard Adapter].

On this page you will find the steps to use a PS/2 mouse's output to meet your needs. The code, circuit diagram, and notes about the interface are included. This is currently a work in progress, but should be a good foundation for those looking to build on it and be able to use a PS/2 mouse in their own projects.


== PS/2 Interface ==
== PS/2 Interface ==

Revision as of 00:57, 12 February 2009

Original Assignment

Interface the PIC with a PS/2 optical mouse and display (x,y) position data on either an LCD screen (see, e.g., C Example: Serial LCD or C Example: Parallel Interfacing with LCDs) or the PC (e.g., in Matlab or hyperterminal).

Overview

Ione Lynx-M9 mouse [1]

The goal of the project is to interface the PIC184520 with a PS/2 mouse - specifically, an ione Lynx-M9 Wheel Optical mouse with a USB to PS/2 adapter. The mouse's XY coordinates will be displayed on an LCD screen and will be updated when the mouse moves.

The PS/2 connector is traditionally used to connect mice and keyboards to computer systems. The connector uses six pins: clock, data, 5V, GND and two that are not connected. The PS/2 connector is fully documented here: PS/2 connector. We used a Parallax PS/2 to Breadboard Adapter to connect the optical mouse to the PIC18. Documentation and ordering information for the adapter can be found here: Breadboard Adapter.

On this page you will find the steps to use a PS/2 mouse's output to meet your needs. The code, circuit diagram, and notes about the interface are included. This is currently a work in progress, but should be a good foundation for those looking to build on it and be able to use a PS/2 mouse in their own projects.

PS/2 Interface