| Electronic Components Datasheet Search |
|
ADNS2051 Datasheet(PDF) 25 Page - Agilent(Hewlett-Packard) |
|
|
|||||||||||||||||||||||||||||
ADNS2051 Datasheet(HTML) 25 Page - Agilent(Hewlett-Packard) |
|
25 / 40 page ![]() 25 mov A, 0h ; clear the data mov [spi_data], A mov A, 08h mov [bit_counter], A mov A, SDIO or [port1_wrote], A mov A, [port1_wrote] ; write a 1 to SDIO iowr Port1_Data nextr: mov A, ~SCLK ; lower SCLK and [port1_wrote], A mov A, [port1_wrote] iowr Port1_Data nop ; wait for cable to settle nop ; if ADNS-2051 is connected to nop ; IC via short PCB traces, nop ; then the number of NOPs can nop ; reduced or eliminated nop nop mov A,[spi_data] ; shift next bit asl mov [spi_data], A ; shift next bit iord Port1_Data ; read SDIO and A, SDIO jz rdx rd1: mov A, 01h or [spi_data], A rdx: mov A, SCLK ; raise SCLK or [port1_wrote], A mov A, [port1_wrote] iowr Port1_Data nop ; wait for cable to settle nop nop nop nop nop nop dec [bit_counter] jnz nextr ret ; ; 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_addr = Address of SPI register in the ADNS-2051 ; spi_data = Data to be written to the SPI register ; ; On exit spi_addr = undefined ; spi_data = undefined ; WriteSPI: mov A, 64 ; wait 200us (optional) mov [bit_counter], A ; about 3us per loop Waitspi: nop nop nop nop nop nop dec [bit_counter] jnz Waitspi ; write address mov A, 80h |
|
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 |
| 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 |