2
Figure 1. Sunplus SPCP825A –ADNS-6010 Optical Mouse Hardware Block Diagram
Firmware Confi gurable GPIO
The reference fi rmware is confi gured to use the GPIO pins
as shown on the schematic in Appendix A. However, it
may be more optimal to use a diff erent I/O confi guration
to meet the mechanical constraints of PCB design. The
reference fi rmware is designed to be easily confi gured
to another set of pin connections. This is accomplished
through changes in the I/O defi nitions at the beginning
of the SPC825A_A6010.asm listing. The following state-
ments are the pin defi nitions as they exist today. The
fi rmware will use these defi nitions to read and confi gure
the GPIO pins, without any other modifi cation.
Communications between the Sunplus SPCP825A and
the ADNS-6010 are done through the integrated SPI
interface. The serial port cannot be activated while the
chip is in power down mode (NPD low) or reset (RESET
high). When the SPI is enabled through PB0 (NCS), the
PB2 (SCLK), PB3 (MISO), and PB1 (MOSI) GPIO pins serve
special functions to enable the SPI interface to talk with
external hardware. During normal operation, the Sunplus
SPCP825A SPI is always confi gured as a Master to output
the serial clock on PB2. Therefore, the USB microcontroller
always initiates communication. Data sent by the ADNS-
6010 optical sensor is received on the PB3 (MISO), and
data is shifted out to the ADNS-6010 through the PB1
(MOSI). See the schematic in Appendix A. When writing
to the ADNS-6010, the microcontroller drive both the
SCLK and the MOSI lines. When reading from the ADNS-
6010, the microcontroller drives both the SCLK and MOSI
lines initially. After t
SRAD
delay, the ADNS-6010 will drive
the data via MISO. The microcontroller is only driving the
SCLK line (outputs SCLK for the serial interface).
Optical Sensor
Avago Technologies ADNS-6010 optical sensor is used in
this reference design as the primary navigation engine.
This Optical Navigation Technology contains an Image Ac-
quisition System, a Digital Signal Processor, a two channel
quadrature output, and a four-wire serial port. The
Sunplus SPCP825A periodically reads the ADNS-6010’s
Delta_X and Delta_Y registers to obtain any horizontal
and vertical motion information happening as a result of
the mouse being moved. The output of the ADNS-6010
optical sensor is 4-wire serial port.
This motion information will be reported to the PC to
update the position of the cursor. The advantages of using
ADNS-6010 optical sensor are the best tracking accuracy,
fl exibility of programming the optical sensor via the SPI
port, and the automatic frame rate feature (1000fps to
7080fps). Besides, ADNS-6010 optical sensor performs
excellent tracking on diffi
cult surfaces which convention-
al Led based technology is unable to track such as glossy
and smooth surfaces. In addition, Burst mode is another
special serial port operation mode that may be used to
reduce the serial transaction time for three predefi ned
operations: motion read and SROM download and frame
capture. The speed improvement is achieved by continu-
ous data clocking to or from multiple registers.
Motion Read is activated by reading the Motion_Burst
register. The ADNS-6010 will respond with the contents
of the Motion, Delta_X, Delta_Y, SQUAL, Shutter_Upper,
Shutter_Lower and Maximum_Pixel registers in that
order. SROM download uses Burst Mode to load the
Left Button
ADNS-6010
Optical Mouse Sensor
Wheel Button
Right Button
Z Optics
Sunplus SPCP825A
USB interface
MISO
MOSI
SCLK
NCS
D+/D-
SCLK/SDATA
VREG
1.3
k Ohm
Avago Technologies