ADNK-3061 Avago Technologies US Inc., ADNK-3061 Datasheet - Page 12

KIT REFERENCE DESIGN ADNK-3060

ADNK-3061

Manufacturer Part Number
ADNK-3061
Description
KIT REFERENCE DESIGN ADNK-3060
Manufacturer
Avago Technologies US Inc.
Datasheets

Specifications of ADNK-3061

Main Purpose
Reference Design, Optical Mouse
Utilized Ic / Part
ADNS-3060, CY7C63743-PC
Description/function
Optical Mouse Sensor Kit
Interface Type
USB
Product
Display Modules
Touch Panel
No Touch Panel
For Use With/related Products
CY7C63743-PC
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
Lead Free Status / RoHS Status
Lead free / RoHS Compliant, Lead free / RoHS Compliant
Interrupt Service Routines (ISR)
The CY7C63743-PC features 12 different sources of inter-
rupts. There are only four ISRs implemented in this appli-
cation. If an interrupt is enabled and the conditions for
the interrupts are met, the microcontroller will generate
an interrupt. Upon servicing the interrupt, the hardware
will first disable all interrupts by clearing the Global
Interrupt Enable bit. This is followed by an automatic
CALL instruction to the ROM address of the interrupt
being serviced in the Interrupt Vector. The instruction in
the Interrupt Vector is typically a JMP instruction to the
Interrupt Service Routine (ISR). A RETI or RET instruction
at the end of the ISR brings the program counter (PC)
back to the location prior to the interrupt (POR and USB­
B­us Reset are exceptions).
DualMain – When power is first applied to the CY7C63743-
PC, a Power On Reset (POR) occurs; the microcontroller
starts executing code from address 0x00. This is a JMP
instruction to the DualMain routine. This routine initial-
izes the program stack pointer (PSP), data stack pointer
(DSP), ram variables, and the GPIO pins. This routine calls
GetMouseType which returns the interface of the mouse.
If a USB­ interface is detected, the program jumps to
the usbMain loop. Otherwise, the program goes to the
ps2Main loop.
DualUsbBusReset_ps2Error – The USB­-PS2 Interrupt Mode bit
in the USB­ Status and Control Register is defaulted to
“0”, or USB­ mode. This indicates that the USB­ B­us Reset
interrupt will be generated if the SE0 condition (D+ and
D- are both LOW) exists for 256us. This ISR enables the
USB­ Device Address, sets up the endpoint modes and
jumps to usbMain for the USB­ initialization.
Dual1msTimer – This ISR reads the current status of the
buttons. Therefore, every one millisecond the button
state is updated; the button status information will be
used by the ProcessButtons function at a later time. This
ISR maintains the dualInterface1ms counter variable
which is used as a 1ms timing reference in other parts
of the program. This routine also handles the entrance
or exit from suspend. The mouse will prepare to enter
a suspend (low power) state if there is no bus activity in
3ms. If the mouse is configured for remote wakeup, the
B­us Reset and wakeup interrupts are enabled prior to sus-
pending the chip. The program then enters a suspended
state, and will wake at least as often as the wakeup timer
interrupts or as a result of the USB­ B­us Reset interrupt.
Each time the chip wakes up due to the wake up timer
interrupt, the state of the buttons is examined by the
GetButtons function. If a change in the button state has
occurred, the mouse will generate a resume signal to
the host and exit the ISR. If the device is not enabled
for remote wakeup, only the USB­ bus reset interrupt is
enabled, and the part is suspended. Only a B­us Reset can
wake up the chip. If the resume was due to bus activity,
12
the firmware returns to the main loop. If the resume was
due to a button press, a K state is driven upstream for 14
milliseconds prior to returning to the main loop. Moving
the mouse will not wake the suspended system.
DualUsbEndpoint0_ps2Error – This ISR is entered upon
receiving an Endpoint 0 interrupt. Endpoint 0 inter-
rupts occur during the Setup, data, and status phases of
a control transfer. This ISR handler jumps to the proper
routine to handle one of these phases.
DualUsbEndpoint1_ps2Error – This ISR is entered upon
receiving an Endpoint 1 interrupt. If the ACK bit is set,
indicating that a mouse packet was just transmitted
to the host successfully, the SIE automatically sets the
endpoint mode to NAK_IN mode, and the data toggle
bit is flipped for the next transaction. The data toggle bit
should never be toggled if the interrupt was a result of a
NAK transaction.
Manufacturer String
A request for the manufacturer string will return the
following string: “Avago Mouse”.
Product String
A request for the product string will return the following
string:
“ADNS-3060 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 will return the following
string:
“Endpoint 1 Interrupt Pipe”.
Notes:
1. The Manufacturer String should be changed to the name of your
2. The Product String should be changed to your product’s name.
company.

Related parts for ADNK-3061