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

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
26
nextr:
rd1:
rdx:
;
;
;
;
;
;
;
;
;


;
WriteSPI:
Waitspi:
WriteSPI routine
Includes delays for long traces or cables between the uP and ADNS-2051.
Has correct timing of SCLK and SDIO
On entry:
spi_data = Data to be written to the SPI register
2Q H[LW
VSLBGDWD
XQGH¿QHG
mov [spi_data], A
mov A, 08h
mov [bit_counter], A
mov A, SDIO
or [port1_wrote], A
mov A, [port1_wrote]
iowr Port1_Data
mov A, ~SCLK
and [port1_wrote], A
mov A, [port1_wrote]
iowr Port1_Data
nop
nop
nop
nop
nop
nop
nop
mov A,[spi_data]
asl
mov [spi_data], A
iord Port1_Data
and A, SDIO
jz rdx
mov A, 01h
or [spi_data], A
mov A, SCLK
or [port1_wrote], A
mov A, [port1_wrote]
iowr Port1_Data
nop
nop
nop
nop
nop
nop
nop
dec [bit_counter]
jnz nextr
ret
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 Waitspi
XQGH¿QHG
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
write a 1 to SDIO
lower SCLK
wait for cable to settle
if ADNS-2051 is connected to
IC via short PCB traces,
then the number of NOPs can
reduced or eliminated
shift next bit
shift next bit
read SDIO
raise SCLK
wait for cable to settle
wait 200us (optional)
about 3us per loop
write address

Related parts for ADNS-2051