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

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
24
SPI communication code for the Cypress CY7C63000 or CY7C63001
(Please consult factory for the CY7C63722 or CY7C63723 codes.)
Note: This programming sequence is not covered in Avago's product warranty. It is only a recommended example when using the mentioned
Cypress microcontrollers. For the latest updates on Cypress microcontrollers, please contact Cypress at email: usbapps@cypress.com or call (858)
613-7929 (US).
The following code can be used to implement the SPI data communications. See the schematic in Figure 9.
;
;
;
;
;
;
;
Port1_Data:
Port1_Interrupt:
Port1_Pullup:
;

SDIO:
PD:
SCLK:
Pt1_Current:
;
;
Port1_Isink:
Port1_Isink0:
Port1_Isink1:
Port1_Isink3:
;
;
;
spi_addr:
spi_data:
bit_counter:
port1_wrote:
;
;
;
;
;
;
;
;
Notes:
CY7C63001 20pin package
ADNS-2051
SDIO line connected to pin5 (P1.0)
PD connected to pin 16 (P1.1)
SCLK line connected to pin15 (P1.3)
I/O port
3RUW ELW GH¿QLWLRQV
GPIO Isink registers
data memory variables
initialize Port 1
There are possible problems with the SPI port if the microcontroller starts executing
instructionsbefore the ADNS-2051 sensor has powered up. See page 18 for details.
It is assumed that power to the microcontroller is OK if the next instructions can be executed.
These instructions will reset the SPI port of the sensor.
equ
equ
equ
equ
equ
equ
equ
equ
equ
equ
equ
equ
equ
equ
equ
iowr Port1_Isink0
iowr Port1_Isink1
iowr Port1_Isink3
mov A, 0h
iowr Port1_Pullup
mov A, ~(PD|SDIO)
mov [port1_wrote], A
mov A, [port1_wrote]
iowr Port1_Data
mov A, 0
iowr Port1_Interrupt
01h
05h
09h
01h
02h
08h
00h
38h
38h
39h
3Bh
40h
41h
44h
45h
mov A, Pt1_Current
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
GPIO data port 1
Interrupt enable for port 1
Pullup resistor control for port 1
bit 0
bit 1
bit 3
port1 current setting
address of spi writes
data of spi writes
SPI bit counter
what we wrote last
select DAC setting
isink current Port 1 bit[0]
isink current Port 1 bit[1]
isink current Port 1 bit[3]
enable Port 1 bit [7:0] pullups
turn on the ADNS-2051
PD low, SCLK, SDIO
disable port 1 interrupts

Related parts for ADNS-2051