intro
i pretty much abandoned the
HackedMouse as soon as i figured out how to control it. I got busy with
other projects and just never went back to it. i also came into an old optical USB mouse. seeing as how my new laptop doesn't have PS/2 and does have USB i figured i might as well attack this one instead. I can't tell you much about it because all i have is the circuit board. i took it apart a while ago and threw out everything else. i know it had a scroll wheel with click and 4 buttons. i am guessing that most cheap optical mice are pretty much the same though.
It appears that the clock may be too fast for the avronics board to keep up with. The mouse is also causing the avronics board to reboot often. I need to get some time on the scope and add a pullup to the /RESET pin on the atmega32 to hopefully fix this.
implementation
Serial Interface
Serial Bus Sequence
- SCK High at system power up
- SCK High after data transfer
- SCK falling edge
- SDIO data latches
- SCK rising edge
- SDIO read/write
Serial Timing
I need to sniff the existing commands in order to fully emulate the optical sensor. I bit bang the interface to keep it simple.
- Data read on rising edge
- Data latched on falling edge
- SCK is driven by the USB chip
- leading 1 is a write command
- leading 0 is a read command
- all communication is driven by the master (USB chip)
Serial Registers
| Address | Register |
| 0x00 | Product_ID |
| 0x01 | Revision_ID |
| 0x02 | Motion |
| 0x03 | Delta_X |
| 0x04 | Delta_Y |
| 0x05 | SQUAL |
| 0x06 | Average_Pixel |
| 0x07 | Maximum_Pixel |
| 0x08 | Reserved |
| 0x09 | Reserved |
| 0x0a | Configuration_bits |
| 0x0b | Reserved |
| 0x0c | Data_Out_Lower |
| 0x0d | Data_Out_Upper |
| 0x0e | Shutter_Lower |
| 0x0f | Shutter_Upper |
| 0x10 | Frame_Period_Lower |
| 0x11 | Frame_Period_Upper |
Hardware
the optical sensor is disconnected from the USB controller. in it's place the
AVRonics controller is wired into the SCK and SDIO serial interface of the USB controller. it is now possible to control the x,y position of the cursor with the
AVRonics board.
new pointing device
the first app will be a RS232 interface into the 'mouse' so i should be able to control the cursor with minicom.
--
ChristopherPepe - 21 Aug 2006