PicAxe reads USB mouse - any idea how?

albatros

New Member
Hello,

maybe this is a silly question - but let's give a try.

For my next PicAxe projects I'd like to use an USB-mouse as an input device.
As an example:
The mouse wheel - shall be used to select options ... or like a digital potentiometer( variable resistor)..
The mouse buttons - shall be used as switches-or push buttons ....
The PicAxe shall detect/count the amount of pulses (of the mousewheel....direction is in a first step not important
and the push button signals shall be input on a usual IN-pin of the PicAxe...)

Therefor I searched the web and this forum, but I couldn't find a hint or an example how to do this.

I found an USB-module on the PicAxe-Shop (~ 17 €) - and I'm not sure if this is the only solution.
Maybe I have to add - that I tried to read and understand the USB-protocol - but to be honest - this is
very complex and on a first look - I got the impression, it will take me day's / weeks to get into these details ...

Anybody ideas or hints for me?

Thanks in advance
albatros

P.S:
My fallback option is - to take all HW out of the mouse - and only leaving the sensors (IR-diode + buttons...)...
and rebuild the input-sequences ....the disadvantage is - that I have to adapt this for each different mouse-type
in future - w.r.t. different Mouse-HW inside.
 

techElder

Well-known member
Of course, experiment to your own satisfaction, but keep in mind that the PICAXE processors are not desktop computers. They have limits.
 

hippy

Ex-Staff (retired)
I found an USB-module on the PicAxe-Shop (~ 17 €) - and I'm not sure if this is the only solution.
Not sure what that module may be but I doubt it would help interface a PICAXE with a USB mouse. It would probably be better to find a 9-way D serial mouse with a scroll wheel but they are rare and I have no idea how easy they would be to decode.

Hacking the innards so you can directly interface the PICAXE to the scroll wheel and buttons would probably be easiest route to success.
 

PeteShep

Member
Following on from that one, have you considered a PS/2 mouse? They are the ones with the pastel green round connectors?
They sell for about £5 <> 7 Euro. With Scroll wheel. Google again.
Had a quick google for "PS/2 protocol" and the results seem to show a clocked serial signal. 8 bit + parity. 3 Bytes describe each movement...
Not seen any spec for the clock, or where it is sourced - would be easier from the PICAXE.
Sorry don't know anything else about them, so I'm leaving lots of room for foul ups!
 

erco

Senior Member
I suspect you have a long row to hoe in trying to read USB signals with a Picaxe. I bought some old mechanical ball mice to hack, but have not started that project yet. My plan is to read the optical encoders directly, bypassing the PS/2 hardware. Might be able to rewire the cable to suit my own evil needs though.
 

albatros

New Member
So thanks a lot for that quick response.

The idea to go via serial streams seems to be my prefered solution.

Furthermore, there exist several usb to serial transformers in the web, and i will investigate
In this direction.

Thanx
Albatros
 
Top