I have been looking at writing a program for a ps/2 mouse .
It looks like a lot of work.
So I was thinking. :idea:
Maybe usb would be better :?:
The first step would be to gather information.
Does anyone have information on usb<--->mouse communication :?:
I have to use either a 16f84a or 16f628a.
I might have to use C to write it the firmware.
I want to emulate a popular mouse signal so I don't need custom software drivers.
It's always a good idea when you have a question like this to search the application notes at microchip. Have a look at This Application Note for a description of how to use a 16C745 to act as a USB mouse.
The 16C745 is a one time programmable chip and so is not very cheap to develop on. It does however come in a JW version which has a window and can be UV erased.
Your probably better of going with a 18F2455 which also supports USB. Again, look for an App Note.
Be warned, USB device descriptors are a world unto themselves. What seems like a simple change, like length of packet for example, ends up breaking it completely.
Just to add a little bit more, serial and PS2 are easy, USB is difficult, and requires a PIC with specific hardware support - you can't do it with an 84 or 628.
You can download PS2 code (for keyboard and mouse) from the EPE website.
ok I got a copy of usb complete.
let me give you my review.
usb is not for hobbyists.
What is EPE?
I guess I will go back to ps/2.
Has anyone followed my other thread?
I want to emulate a mouse .
I have found 1 example for ps/2.
The problem with it is I can't seem to simulate it,or understand the code.
The hardware is simple though.
Radio shack quit selling parts here so they are hard to get.
I tried to use mikroc to write it.
It has a ps/2 library, but only for reading keys.
And it has a usart library ,but it won't do the ninth parity bit.
hmm..
maybe I will look at writing a library.
I think the hardware usart on the 16f628a will do ps/2 ,won't it?
I just need to figure out some of those register bit settings.............