Chameleon-AVR Nurve Networks, Chameleon-AVR Datasheet - Page 60

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

Chameleon-AVR

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

Specifications of Chameleon-AVR

Processor To Be Evaluated
AVR 328P
Data Bus Width
8 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
Byte 1
Byte 2
Byte 3
The movement counters are 9-bit 2's complement integers, since the serial protocol only supports 8-bits at a time, the
upper most sign bit for each 9-bit integer is stored in Byte 1 of the overall movement packet. Bit 4 holds the 9
movement and Bit 5 holds the 9
would be a lot of motion in one update, so just use byte 2 and 3 to track motion.
The motion counters are updated when the mouse reads its input and movement has occurred. The movement counters
once again only record differential or delta motion rather than absolute. With a 9-bit value recording each counter, a total
amount of -255 to +256 can be represented in 9-bit 2’s complement. If this range is exceeded, the appropriate overflow bit
is set for either the X or Y counter. Note that the movement counters are reset whenever a movement data packet is
successfully sent to the host. The counters are also reset after the mouse receives any command from the host other than
the "Resend" ($FE) command. Next, let’s discuss the different mouse operation modes.
12.2.3 Modes of Operation
There are four standard modes of operation which dictate how the mouse reports data to the host, they are:
RESET Mode - The mouse enters Reset mode at power-on or in response to the "Reset" ($FF) command. After entering
reset mode, the mouse performs a diagnostic self-test referred to as BAT (Basic Assurance Test) and sets the following
default values:
After Reset, the mouse sends a BAT completion code of either $AA (BAT successful) or $FC (Error). The host's response
to a completion code other than $AA is undefined. Following the BAT completion code of $AA (ok) or $FC (error), the
mouse sends its device ID of $00. This distinguishes the standard PS/2 mouse from a keyboard or a mouse in an
extended mode.
After the mouse has sent its device ID of $00 to the host, it will enter Stream mode. Note that one of the default values
set by the mouse is "Data Reporting Disabled". This means the mouse will not issue any movement data packets until
it receives the "Enable Data Reporting" command. The various modes of operation for the mouse are:
RESET - The mouse enters Reset mode at power-up or after receiving the "Reset" ($FF) command. For this
mode to occur both the DATA and CLOCK lines must be HIGH.
STREAMING - This is the default mode (after Reset finishes executing) and is the mode in which most software
uses the mouse. If the host has previously set the mouse to Remote mode, it may re-enter Stream mode by
sending the "Set Stream Mode" ($EA) command to the mouse.
REMOTE - Remote mode is useful in some situations and may be entered by sending the "Set Remote Mode"
($F0) command to the mouse.
WRAP - This diagnostic mode is useful for testing the connection between the mouse and its host. Wrap mode
may be entered by sending the "Set Wrap Mode" ($EE) command to the mouse. To exit Wrap mode, the host
must issue the "Reset" ($FF) command or "Reset Wrap Mode" ($EC) command. If the "Reset" ($FF) command
is received, the mouse will enter Reset mode. If the "Reset Wrap Mode" ($EC) command is received, the mouse
will enter the mode it was in prior to Wrap mode.
Sample Rate = 100 samples/sec.
Resolution = 4 counts/mm.
Scaling = 1:1.
Data Reporting Disabled.
Y overflow bit X overflow bit Y sign bit X sign bit Always 1 Middle Button Right Button Left Button
Bit 7
Bit 6
th
bit of the Y movement. Typically, you don’t need to worry about the 9
Bit 5
Table 12.6 – Mouse data packet format.
X Movement (delta)
Y Movement (delta)
Bit 4
Bit 3
© 2009 NURVE NETWORKS LLC “Exploring the Chameleon AVR 8-Bit”
Bit 2
Bit 1
Bit 0
th
bits since that
th
bit of the X
60

Related parts for Chameleon-AVR