www.flickr.com
tres frijoles' photos More of tres frijoles' photos
You are here: tearsoffire.org > Projects Web > ElectronicsProjects > AvrProjects > HackedMouseUsb r5 - 26 Aug 2006 - 11:40 - ChristopherPepe


Start of topic | Skip to actions

HackedMouseUsb

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

toggleopenShow attachmentstogglecloseHide attachments
Topic attachments
I Attachment Action Size Date Who Comment
jpgjpg typical_optical_mouse.jpg manage 44.4 K 21 Aug 2006 - 21:27 ChristopherPepe typical use of this sensor
Edit | Attach | Printable | Raw View | Backlinks: Web, All Webs | History: r5 < r4 < r3 < r2 < r1 | More topic actions
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding tearsoffire.org? Send feedback