Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

A mouse input design. Please help.

Is it easier to create an input device with PS/2 interface or USB interface?

  • USB

    Votes: 0 0.0%
  • PS/2

    Votes: 0 0.0%

  • Total voters
    0
Status
Not open for further replies.

bobolified

New Member
Well what I want to do is similar to a mouse input device. I'm not sure if I want to go with a PS/2 or a USB design. I want to create an input device that has the functionality of a mouse left button when clicked. I took apart Logitech Wheel mouse to see what's inside and I am guessing it has a quadrature encoder from what I read. So do I just need to buy a quadrature encoder?

I did some research on how to design a PS/2 mouse and I found this site:

**broken link removed**

The author used to provide a link to his full written PS/2 mouse program for PIC16F but it's not there anymore. I'm not sure if I should buy a PIC16F and program it or should I just buy a quadrature encoder? Which is an easier way?

Please any suggestions would be helpful. Thank You.
 
bobolified said:
The author used to provide a link to his full written PS/2 mouse program for PIC16F but it's not there anymore.

Here it is. This is the software part only. You can get the whole PDF using the link:

Full PDF on PS2
 

Attachments

  • ps2_mouse_16f84.pdf
    263.3 KB · Views: 1,024
bobolified said:
I want to create an input device that has the functionality of a mouse left button when clicked.
bobolified said:
... should I just buy a quadrature encoder?

Considering your first statement, what function would a quadrature encoder perform here? When the left button on a mouse is clicked, a set of switch contacts are actuated. A quadrature encoder has nothing to do with the switch.
Quadrature encoders are used [in mice] to:
a) provide information to the system regarding mouse movement in the x- and y-axes when they're rotated by the ball moving against the table
b) indicate that the wheel on the unit has been rotated

JB
 
The quadrature encoder is what the logitech mouse use to sense x and y position. It doesnt have anything to do with the left mouse button function. I just stated that I think that's what I saw inside the logitech mouse.

I found some of PS/2 mouse controllers that i could use.

PS/2 mouse controllers:

http://www.datasheetcatalog.com/datasheets_pdf/E/M/8/4/EM84502.shtml

http://www.datasheetcatalog.com/datasheets_pdf/B/U/9/2/BU9206.shtml

How would I provide clock inputs for these type of controllers?

I'm not sure which one to use. Has anyone experienced with these type of controllers? Their specs are alright for what I want to do.
 
Be aware that what you see is not always what you get :?

I once dismantle a HP mouse with a Logitec chip in it. There is no quatratue signal coming out of these opto couplers at all only a coded signal. So there is no way to "see" the 90° shifted pulses or even to reuse these optocouplers as standard light switch (unless you try to break the Logitec code). The connection pins are +5V; 5VGND and code.

I then dismantle a MS mouse with a Zilog chip. Here again no 90° shifted square pulses. The led is driven by a 5kHz signal out of the Zilog chip so the output of the optocoupler is also a 5kHz signal.
When there is no movement of the ball both signals have an amplitude of 1.5V. Once you turn on the ball both signal start to increase to 5V asynchronously. So instead of 90° shift there is a difference in amplitude to detect L/R movement.
The connection pins are +5V; Signal A and Signal B

Hope this helps, at least you don't have to do these measurements again.
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top