ADNS-2051 Avago Technologies US Inc., ADNS-2051 Datasheet - Page 25

no-image

ADNS-2051

Manufacturer Part Number
ADNS-2051
Description
Optical Mouse Sensor,DIP
Manufacturer
Avago Technologies US Inc.
Datasheet

Specifications of ADNS-2051

Lead Free Status / RoHS Status
Lead free / RoHS Compliant
Other names
Q2072083C

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
ADNS-2051
Manufacturer:
原装AVAGO
Quantity:
20 000
25
Resync_sensor:
;
;
;
;
;
;
;

;

;
;
ReadSPI:
Waitrspi:
Waitrspi2:
ReadSPI routine
Includes delays for long traces or cables between the uP and ADNS-2051
Has correct timing of SCLK and SDIO
On entry:
VSLBGDWD
2Q H[LW
spi_data = register contents from ADNS-2051
XQGH¿QHG
mov A,~(SCLK|SDIO|PD)
and [port1_wrote], A
mov A, [port1_wrote]
iowr Port1_Data
call delay700us
call delay700us
call delay700us
call delay700us
call delay700us
call delay700us
mov A, (SCLK|SDIO|PD
or [port1_wrote], A
mov A, [port1_wrote]
iowr Port1_Data
call delay700us
mov A, ~PD
and [port1_wrote], A
mov A, [port1_wrote]
iowr Port1_Data
call delay700us
call delay700us
call delay700us
call delay700us
call delay700us
call delay700us
spi_addr = Address of SPI register in the ADNS-2051
VSLBDGGU
mov A, 64
mov [bit_counter], A
nop
nop
nop
nop
nop
nop
dec [bit_counter]
jnz Waitrspi
mov A,~80h
and [spi_addr], A
call writeaddr
mov A,64
mov [bit_counter], A
nop
nop
nop
nop
nop
nop
dec [bit_counter]
jnz Waitrspi2
mov A, 0h
XQGH¿QHG
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
set the SCLK, SDIO and PD lines low
If the power to the sensor needs more time
to stabilize, insert a delay here
wait about 4 milliseconds for the sensor
oscillator to stabilize
set the SCLK, SDIO and PD lines high
this shuts down the oscillator and
resets the SPI port
wait for the PD to reset the part
set the PD line low to put the sensor
back into normal operation
wait about 4 milliseconds for the sensor
oscillator to stabilize
sensor SPI port now in sync
wait 200us (optional)
(about 3us per loop)
read address
lower MSB of address (read)
wait 200us (about 3us per loop)(100us minimum required)
wait for data to be ready
clear the data

Related parts for ADNS-2051