| ??? 01/29/04 23:58 Read: times |
#63654 - Mouse encoders: PS/2 or directly? |
It seems I won't be getting that 2 encoders I had ordered - no provider in my country will sell just 2 of them, and because of their price, buying more (like a pack of 5 they offer) is out of question - so I'm stuck with getting the task done with encoders I have available - from a mouse.
And now my question is: Should I remove them from the mouse and try to interface them directly (or through just very little, necessary electronics) to the uC, or should I just use the original mouse hardware and read them through PS/2 protocol. In one hand, without the original mouse microcontroller, I'm at risk of all that "line noise" Erik was scaring me with, I use up at least 4 input bits, my readout timing is essential, but in the other hand, I looked at the PS/2 protocol and it seems to be a little overkill, really a lot of overhead - serial communication layer, recognising commands, setting up parameters, a lot of stuff I don't really need, plus apparently lower resolution (a pulse for 1 cycle, not for 1 edge). I've almost made up my mind for using PS/2 though, because it handles signal count for me, and provides some nice features (resend on error), I wanted to ask some experienced people first though - if I'm not making a big mistake. (I'd also appreciate a few hints on hardware solutions that I should use for connecting the PS/2 mouse to a microcontroller - like, can I drive the communication by connecting the mouse clock signal to an interrupt signal in uC? Or do I need to generate the clock signal myself?) |



