ADNK-3061 Avago Technologies US Inc., ADNK-3061 Datasheet - Page 8

KIT REFERENCE DESIGN ADNK-3060

ADNK-3061

Manufacturer Part Number
ADNK-3061
Description
KIT REFERENCE DESIGN ADNK-3060
Manufacturer
Avago Technologies US Inc.
Datasheets

Specifications of ADNK-3061

Main Purpose
Reference Design, Optical Mouse
Utilized Ic / Part
ADNS-3060, CY7C63743-PC
Description/function
Optical Mouse Sensor Kit
Interface Type
USB
Product
Display Modules
Touch Panel
No Touch Panel
For Use With/related Products
CY7C63743-PC
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
Lead Free Status / RoHS Status
Lead free / RoHS Compliant, Lead free / RoHS Compliant
Dual USB and PS2 Functions
GetMouseType – called in dualMain when the mouse is first
plugged into the PC. This routine returns the interface of
the mouse. The following sequences are performed by
the micro-controller to determine the mouse type.
SPIInit – This routine is called in the try_download to enable
the SPI interface. The CY7C63743-PC is always configured
as a Master to drive the serial clock on P0.7. The clock is
set to HIGH in idle state, and the SCLK frequency is set to
send a bit rate of 1Mbit/s.
SensorReset – This routine resets the serial interface and
the ADND-3060 internal registers by generating a pulse
on the RESET pin.
LoadSROM – called in try_download after the initialization
of the SPI interface. This routine is used to load the SROM
(Shadow ROM) firmware into the ADNS-3060 optical
sensor. It should be called after SensorReset.
ProcessButtons – This routine is called within the infinite
loop of usbTaskLoop and ps2TaskLoop. The state of the
buttons is updated every one ms in the Dual1msTimer
Interrupt Service Routine (ISR). This routine compares
the current state of the buttons with their last state to
detect any changes in the status. If the status of these
buttons remains until the expiration of debounce timer
(15ms), the new button state is confirmed. This routine
will record the new button state in the [buttonValue]
variable which will be reported to the host in the main
loop.
8
Delay 50mS.
Initialize the PS2 B­AT delay counter.
For a period of 2ms, poll the SCLK and SDATA lines
every 10µs. If we get 4 samples in a row with non-
zero data on either line, detect a PS2 interface. If 2mS
expires, enable the USB­ pull up resistor and delay
500µS.
Poll the SCLK and SDATA lines indefinitely until a non-
zero condition exists on either line. During this polling
period, we begin to count down the PS2 B­AT delay.
If SCLK(D+) is sampled high, detect a PS2 interface.
If SDATA(D-) sampled high, disable the USB­ connect
resistor and Delay 100µS.
If D+ and D- are both 0, detect a USB­ interface, else
detect a PS2 interface.
ReadProcessOptics – This routine returns any updates in the
X, Y and Z-wheel motion information. The motion of the
Z-wheel is detected using the traditional method by
decoding the quadrature signal generated by the pho-
totransistors. The X and Y directions of the movement
are obtained by calling the ReadDeltaX and ReadDeltaY
routines. The X, Y, and Z-wheel movement is stored in the
[xCount], [yCount], and [zCount] variables which will be
sent to the host in the main routine.
ReadMotionReg – Reads the ADNS-3060 Motion register.
The data returned from this register will be used to
determine if any motion has occurred or if any fault
condition exists.
ReadDeltaX – Reads the ADNS-3060 Delta_X register for the
X movement. Calls the ReadSPI routine to enable the SPI
interface and perform reading operations through the
four-wire serial interface. Any new X motion information
is added to the [xCount] variable.
ReadDeltaY – Reads the ADNS-3060 Delta_Y register for
the Y movement. Calls the ReadSPI routine to enable the
SPI interface and perform reading operations through
the four-wire serial interface. Any new Y motion informa-
tion is added to the [yCount] variable.
WriteSPI – Writes to the ADNS-3060 register. A write
operation consists of two bytes. The first byte contains
the address (7 bits) and has “1” as its MSB­. The second
byte contains data. The microcontroller to drive both
the SCLK and the MOSI lines. SPIWriteRoutine is called to
carry the write operation.
ReadSPI – Reads the desired ADNS-3060 registers. A read
operation is composed of two parts. First, the microcon-
troller performs a write to the ADNS-3060, sending the
address of the target register to be read. The microcon-
troller drives both the SCLK and MOSI lines. After t
delay, the ADNS-3060 will drive the data via MISO. The
microcontroller is only driving the SCLK line (outputs
SCLK for the serial interface). SPIWriteRoutine is called to
carry the write operation.
SPIWriteRoutine – Writes the data to be transmitted onto
the SPI pins.
CheckProductID – This function checks the product ID of the
sensor chip being used. The ID returned should match
with the ADNS-3060’s ID.
GetButtons – Returns the current state of the buttons.
SRAD

Related parts for ADNK-3061