background image

7

USB Firmware Description

A function call map for USB operation is shown in Figure 
6. The following are descriptions of the functions in 
SPCP825A _A6010.asm.

Start_up

 – This function is used for mouse sensor calibra-

tion. It proceeds for calibration when the output power 
measurement device is plugged to the mouse. Otherwise 
it skips the calibration process and proceeds to USB ini-
tialization. 

Read_LP_CFG_REG

 – This function reads the calibrated 

laser power confi guration register from EEPROM.

reset_ands6010

 – This function is responsible for 

resetting the hardware, loading the SROM (Shadow ROM) 
fi rmware into the ADNS-6010 optical sensor. Then ReadSPI 
and WriteSPI are called to set the resolution of the sensor 
to 2000cpi. The ID from the device and program are 
compared. If the ID is not the same, then the program is 
trapped in the dead loop, i.e. the device is unusable.  

hard_reset

 – This routine resets the serial interface and 

the ADNS-6010 internal registers by generating a pulse 
on the RESET pin.

LoadSROM

 – This routine is used to load the SROM 

(Shadow ROM) fi rmware into the ADNS-6010 optical 
sensor. It is called after hard_reset.

WriteSPI

 – Writes to the ADNS-6010 register. A write 

operation consists of two bytes. The fi rst  byte  contains 
the address (7 bits) and has “1” as its MSB. The second byte 
contains data. The microcontroller is responsible to drive 
both the SCLK and the MOSI lines. 

ReadSPI

 – Reads the desired ADNS-6010 registers. A read 

operation is composed of two parts. First, the microcon-
troller performs a write to the ADNS-6010, sending the 
address of the target register to be read. The microcon-
troller drives both the SCLK and MOSI lines. After t

SRAD

 

delay, the ADNS-6010 will drive the data via MISO. The mi-
crocontroller is only driving the SCLK line (outputs SCLK 
for the serial interface). 

CheckProductID

 – This function checks the product ID 

of the sensor chip being used. The ID returned should 
match with the ADNS-6010’s ID. Otherwise the program is 
trapped in the dead loop, i.e. the device is unusable.  

Check_SROM_ID

 – This function is to check the SROM 

ID, if product device and program ID do not match, the 
program is trapped in the dead loop, and thus the device 
is unusable.

disable_laser

 – This function is called to disable the 

operation of the laser.

AdjustLaser

 – This function is used to adjust the laser 

power. To meet Class 1 eye safety requirement, manu-
facturers are required to program LP_CFG0 and LP_CFG1 
to get laser output power as close to 506uW as possible.  
This is done by using a power meter which can measure 
the output laser power during mouse calibration.

SetDCMode

 – Set the laser to continuous on mode for 

laser calibration purpose. 

SetShutterMode

 – This function is responsible to on the 

laser only when illumination is required. This is to ensure 
safety to the users as well as for power saving. 

enable_laser

 – This function is to enable the laser.

check_susp

 – This function is used to determine whether 

the mouse is in the suspend mode. 

sample_mouse

 – This routine returns any updates in 

the X, Y and Z-wheel motion information. The motion of 
the Z-wheel is detected using the traditional method by 
decoding the quadrature signal generated by the pho-
totransistors. The X and Y directions of the movement 
are obtained by calling the ReadDeltaX and ReadDeltaY 
routines. The X, Y, and Z-wheel movement is stored in the 
[xCount], [yCount], and [zCount] variables which will be 
sent to the host in the main routine.

detect_key_change

 – This function is used to detect left, 

right or middle button changes. 

ReadMotionReg

 – Reads the ADNS-6010 Motion 

register. The data returned from this register will be used 
to determine if any motion has occurred or if any fault 
condition exists.

ReadDeltaX

 – Reads the ADNS-6010 Delta_X register for 

the X movement. Calls the ReadSPI routine to enable the 
SPI interface and perform reading operations through the 
two wire serial interface. Any new X motion information is 
added to the [xCount] variable.

ReadDeltaY

 – Reads the ADNS-6010 Delta_Y register for 

the Y movement. Calls the ReadSPI routine to enable the 
SPI interface and perform reading operations through the 
two wire serial interface. Any new Y motion information is 
added to the [yCount] variable.

Report_mouse_data

 – This function is used to send 

buttons, X, Y and Z-wheel data to the computer.

Содержание ADNK-6013-SP01

Страница 1: ...o moving parts which means high reliabil ity and less maintenance for the end user In addition precision optical alignment is not required facilitating high volume assembly The ADNS 6010 enables 400cp...

Страница 2: ...rive the data via MISO The microcontroller is only driving the SCLK line outputs SCLK for the serial interface Optical Sensor Avago Technologies ADNS 6010 optical sensor is used in this reference desi...

Страница 3: ...sses a button the switch will be closed and the pin will be pulled LOW to GND A LOW state at the pin is interpreted as the button being pressed A HIGH state is interpreted as the button has been relea...

Страница 4: ...6010 optical mouse sensor Dimension in millimeters inches Figure 5 Distance from lens reference plane to surface Enabling the SROM The ADNS 6010 must operate from the externally loaded programming Thi...

Страница 5: ...n Note 5088 LASER Power Adjustment Procedure 1 The ambient temperature should be 25C 5C 2 Set VDD3 to its permanent value 3 Ensure that the laser drive is at 100 duty cycle by setting bit 6 of registe...

Страница 6: ...e mouse 2 At this point the process of enumeration is completed Notes 1 idVendor should be changed to the value as supplied by the USB IF 2 idProduct should be assigned for specific product 3 MaxPower...

Страница 7: ...is to check the SROM ID if product device and program ID do not match the program is trapped in the dead loop and thus the device is unusable disable_laser This function is called to disable the oper...

Страница 8: ...nge cannot actually take place until after the status stage of this no data control transaction so the address is saved and a flag is set to indicate that a new address was just received The code that...

Страница 9: ...following string ADNS 6010 Mouse Configuration String A request for the configuration string will return the following string HID Compliant Mouse Endpoint 1 String A request for the endpoint string w...

Страница 10: ...it level block diagram for ADNK 6013 SP01 designer s kit optical mouse using the Avago Technologies ADNS 6010 optical mouse sensor and Sunplus SPCP825A USB Controller Appendix A Schematic Diagram of t...

Страница 11: ...05 1 Chip RES 12 7k 1 0805 1 Cer Cap 470pF 0805 1 Cer Cap 100nF 0805 6 CAPTANTALUM 4 7uF 20V CASE A 2 CAPTANTALUM 2 2uF 10V CASE A 2 PhotoTransistor DIP 1 2N3906 TO92 1 Resonator 6MHz SMD 1 Resonator...

Страница 12: ...12 Appendix C PCB Layout Figure C1 PCB Schematic Bottom Layer Figure C2 PCB Schematic Top Layer...

Страница 13: ...13 Figure C4 PCB Schematic Bottom Overlay Figure C3 PCB Schematic Top Overlay...

Страница 14: ...Y Y Y Y The following is the USB report protocol format and allows the additional wheel movement information in the fourth byte When the wheel is moved forward the fourth byte reports a 0x01 and when...

Страница 15: ...e Lens 5 ADNS 6130 001 Laser VCSEL Trim Lens Plate Lens 5 ADNS 6230 001 Laser VCSEL Assembly Clip VCSEL Clip 5 ADNV 6340 Single Mode Vertical Cavity Surface Emitting LASER VCSEL VCSEL 5 ADNK 6013 SP01...

Отзывы: