Electronic Components Datasheet Search
  English  ▼

X  

ADNS2051 Datasheet(PDF) 23 Page - Agilent(Hewlett-Packard)

Part # ADNS2051
Description  Optical Mouse Sensor
PDF  40 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Manufacturer  HP [Agilent(Hewlett-Packard)]
Direct Link  http://www.home.agilent.com
Logo HP - Agilent(Hewlett-Packard)

ADNS2051 Datasheet(HTML) 23 Page - Agilent(Hewlett-Packard)

Back Button ADNS2051 Datasheet HTML 19Page - Agilent(Hewlett-Packard) ADNS2051 Datasheet HTML 20Page - Agilent(Hewlett-Packard) ADNS2051 Datasheet HTML 21Page - Agilent(Hewlett-Packard) ADNS2051 Datasheet HTML 22Page - Agilent(Hewlett-Packard) ADNS2051 Datasheet HTML 23Page - Agilent(Hewlett-Packard) ADNS2051 Datasheet HTML 24Page - Agilent(Hewlett-Packard) ADNS2051 Datasheet HTML 25Page - Agilent(Hewlett-Packard) ADNS2051 Datasheet HTML 26Page - Agilent(Hewlett-Packard) ADNS2051 Datasheet HTML 27Page - Agilent(Hewlett-Packard) Next Button
Zoom Inzoom in Zoom Outzoom out
 23 / 40 page
background image
23
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 Agilent'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.
; 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
Port1_Data:
equ 01h
; GPIO data port 1
Port1_Interrupt: equ 05h
; Interrupt enable for port 1
Port1_Pullup:
equ 09h
; Pullup resistor control for port 1
;
; Port bit definitions
SDIO:
equ 01h
; bit 0
PD:
equ 02h
; bit 1
SCLK:
equ 08h
; bit 3
Pt1_Current:
equ 00h
; port1 current setting
;
; GPIO Isink registers
Port1_Isink:
equ 38h
Port1_Isink0:
equ 38h
Port1_Isink1:
equ 39h
Port1_Isink3:
equ 3Bh
;
;
; data memory variables
spi_addr:
equ 40h
; address of spi writes
spi_data:
equ 41h
; data of spi writes
bit_counter:
equ 44h
; SPI bit counter
port1_wrote:
equ 45h
; what we wrote last
;
;
; initialize Port 1
;
mov A, Pt1_Current
; select DAC setting
iowr Port1_Isink0
; isink current Port 1 bit[0]
iowr Port1_Isink1
; isink current Port 1 bit[1]
iowr Port1_Isink3
; isink current Port 1 bit[3]
mov A, 0h
; enable Port 1 bit [7:0] pullups
iowr Port1_Pullup
mov A, ~(PD|SDIO)
; turn on the ADNS-2051
mov [port1_wrote], A
mov A, [port1_wrote]
iowr Port1_Data
; PD low, SCLK, SDIO
mov A, 0
iowr Port1_Interrupt ; disable port 1 interrupts
; 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.
Resync_sensor:
mov A,~(SCLK|SDIO|PD) ; set the SCLK, SDIO and PD lines low
and [port1_wrote], A
mov A, [port1_wrote]



Html Pages

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40


Datasheet Download

Go To PDF Page


Link URL



Does ALLDATASHEET help your business so far?  [ DONATE ] 

About Alldatasheet   |   Advertisement   |   Contact us   |   Privacy Policy   |   Link to Datasheet    |   Link Exchange   |   Manufacturer List
All Rights Reserved©Alldatasheet.com


Mirror Sites
English : Alldatasheet.com  |   English : Alldatasheet.net  |   Chinese : Alldatasheetcn.com  |   German : Alldatasheetde.com  |   Japanese : Alldatasheet.jp
Russian : Alldatasheetru.com  |   Korean : Alldatasheet.co.kr  |   Spanish : Alldatasheet.es  |   French : Alldatasheet.fr  |   Italian : Alldatasheetit.com
Portuguese : Alldatasheetpt.com  |   Polish : Alldatasheet.pl  |   Vietnamese : Alldatasheet.vn
Indian : Alldatasheet.in  |   Mexican : Alldatasheet.com.mx  |   British : Alldatasheet.co.uk  |   New Zealand : Alldatasheet.co.nz
Family Site : ic2ic.com  |   icmetro.com