Some while ago I designed a mouse emulator for use by a severely
disabled programmer. He had no hand use but could operate a joystick
with his mouth. The 'input' was the two potentiometers from the
joystick and two pressure switches (suck, puff) for the mouse
buttons.
A two channel A/D converted the joystick pot info to digital. The
rest was coded into a 16C54 PIC (it was 1993!) In the process, I had
to crack the Microsoft mouse protocol. They would not tell me. It is
quite different from the Logitech mouse. If anyone is interested in
the protocol, code or how to get X Y voltages to emulate a mouse,
please contact me direct. (serious requests only please as my time is
limited)
In response to my previous mailing, is there no-one out there who has
used a PIC for closed-loop motor speed control?
Mike Bolton
Dr Mike Bolton
Clinical Engineering
Withington Hospital
Manchester M20 2LR UK
Phone (44) 161 291 3445
Fax (44) 161 291 3801
There is a lot of info out on the web about mouse protocols for all the common
PC mice. See this link for basics on serial and PS2. I also came up with a link
on USB quite readily. http://www.embeddedlinks.com/chipdir/oth/mouse.txt
> In response to my previous mailing, is there no-one out there who has
> used a PIC for closed-loop motor speed control?
I have done similar things several times.
In one case an inner control loop controlled the position of a gear-reduced
DC motor by adjusting PWM H-bridge outputs. The motor was connected to the
throttle of a gasoline engine. An outer control loop controlled the speed
of the gasoline engine by adjusting the desired motor position via the inner
control loop. The PID calculations were done in 24 bit floating point in a
16F876 every 10mS. The worst case control code time was 7mS per iteration.