Chameleon-PIC Nurve Networks, Chameleon-PIC Datasheet - Page 66

MCU, MPU & DSP Development Tools PIC24 & PROPELLER DEV SYSTEM (SBC)

Chameleon-PIC

Manufacturer Part Number
Chameleon-PIC
Description
MCU, MPU & DSP Development Tools PIC24 & PROPELLER DEV SYSTEM (SBC)
Manufacturer
Nurve Networks
Datasheet

Specifications of Chameleon-PIC

Processor To Be Evaluated
PIC24
Data Bus Width
16 bit
Interface Type
USB, VGA, PS/2, I2C, ISP, SPI
Operating Supply Voltage
3.3 V, 5 V
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
© 2009 NURVE NETWORKS LLC “Exploring the Chameleon PIC 16-Bit”
12.2.5 Mouse Initialization
During the mouse power up both the DATA and CLOCK lines must be pulled HIGH and/or released/tristated by the host.
The mouse will then run its power up self test or BAT and start sending the results to the host. The host watches the
CLOCK and DATA lines to determine when this transmission occurs and should look for the code $AA (ok) followed by
$00 (mouse device ID). However, you can forgo this step if you like and just wait 1-2 seconds and “assume” the mouse
was plugged in properly. You do not have to respond to this code in other words. If you wish to Reset the mouse, you can
at any time send the command code $FF, and the mouse should respond with a $FA to acknowledge that everything
went well.
Once the mouse sends the $AA, $00 startup codes then the mouse enters its standard default mode as explained in the
sections above. The only thing we need to do to get the mouse sending packets is to tell the mouse to start reporting
movement. This is done by sending the command “Enable Data Reporting” ($F4), the mouse responds with $FA to
acknowledge the command worked and then will start streaming out 3-byte movement packets at the default rate of 100
samples/sec. This step is necessary, since on start up if the mouse simply started streaming data packets the host could
lose important data, thus the mouse “waits” to be told to start streaming the data and reporting the motion.
The movement data packets are formatted as shown in Table 12.5. You simply need to read these packets and send
them upstream to your application.
12.2.6 Reading Mouse Movement
Assuming that the mouse has been initialized and is in Streaming mode with Reporting mode enabled, then you simply
loop and read each 3-byte movement packet. As you read the first byte you use it to determine the state of the buttons as
well as any overflows with the counters. Then the next two bytes, the X and Y deltas should be added to running counters
(16-bit) that track the absolute position of the mouse cursor. That’s it!
Of course, this is only for your edification, the Propeller driver does all this for you, so all you have to do is send a simple
command from the PIC to the Propeller to read the keyboard or mouse.
66

Related parts for Chameleon-PIC