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

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
PS/2 Functions
PS2Main – Initializes the PS/2 related parameter to their default
state, enables the serial interface and sends a B­AT code (AAh
followed by 00h) to the host. After the initialization, the
program goes into the infinite PS2TaskLoop loop.
PS2TaskLoop – This function spins in an infinite loop waiting for
an event that needs servicing. The ProcessButtons and Read-
ProcessOptics functions are called within this loop to retrieve
any new motion or button information. The data received
from these functions will be loaded into the endpoint 1
buffer to be sent to the host.
PS2BAT – delays for 500 milliseconds, then sends the AAh
followed by 00h initialization string to the host for the PS/2
B­asic Assurance Test.
PS2SendResponseByte – Sends a response byte (ACK, ERROR,
RESEND) to the host.
PS2Send – This routine sends a byte to the host according to
the standard PS/2 protocol. This routine calls send_0 and
send_1 routines that shift the bits out serially over the PS/2
interface.
PS2Receive – This routine receives a byte from the host according
to the standard PS/2 protocol. This routine calls the GetBit
function to clocks each bit in.
PS2Resend – A copy of the last transmission is always left intact
in the message buffer. To re-send it, this routine simply resets
the message length.
PS2SetDefault – This routine is called in response to a SET
DEFAULT command from the host. It then sets the mouse
parameters to the default settings.
PS2DisableMouse – Disables the mouse.
PS2EnableMouse – Enables the mouse.
PS2SetSampleRate – This routine is called in response to a SET
SAMPLE RATE command from the host. It then verifies that
the requested sample rate is valid and sets the sample rate
for the mouse. Valid sample rates are defined in the PS/2
Mouse specification.
PS2ReadDeviceType – This routine is called in response to a READ
DEVICE TYPE request from the host. This mouse always sends
a 0x00 in response to this request.
PS2SetRemoteMode – This routine is called in response to a SET
REMOTE MODE command from the host. The PS/2 mode is
then set to remote mode.
PS2SetWrapMode – This routine is called in response to a SET
WRAP MODE command from the host. It then sets the
mouse mode to wrap mode. See the PS/2 specification for
more details on wrap mode.
PS2ResetWrapMode - This routine is called in response to a RESET
WRAP MODE command from the host. The mode is then
reset to the previous mode. According to the IB­M PS/2 speci-
11
fication, if stream mode is enabled, the mouse is disabled
when the wrap mode is reset.
PS2ReadData – This routine is called in response to a READ DATA
command from the host. This routine then sends a mouse
packet in response to the command.
PS2SetStreamMode – This routine is called in response to a SET
STREAM MODE command from the host. Stream mode is
then enabled. See the PS/2 specification for more informa-
tion about stream mode.
PS2StatusRequest – This routine is called in response to a STATUS
REQUEST command from the host. A three byte report is sent
to the host in response to this request. See the PS/2 mouse
specification for more details.
PS2SetResolution – This routine is called in response to a SET
RESOLUTION command from the host. Set Resolution is a
two byte command; the 2nd byte being the resolution itself.
This routine is called after reception of the first byte, and so
does nothing by itself.
PS2SetScaling – This routine is called in response to a SET
SCALING command from the host. Scaling then changes to
2:1.
PS2ResetScaling – This routine is called in response to a RESET
SCALING command from the host. The scaling is then reset
back to 1:1.
PS2GetHostByte(void) – This routine checks to see if the host is
requesting to send data, and if so, it clocks in a data byte from
the host. The function returns the received byte in the accu-
mulator and implicitly clears the carry to 0 if the reception
occurred without errors.
PS2DoCommand – This routine dispatches the received PS/2
command byte to the proper handler.
LoadMousePacket – This routine formats a mouse packet
according to the PS/2 Mouse specification and loads it to the
buffer.
PS2SendNextByte – This routine sends the next byte in buffer to
the host.
ResetMouseReportInterval – This routine resets the mouse report
interval to the value last sent by the host. The report interval
is counted down in the main loop to provide a time base for
sending mouse data packets.
CheckWheel – This function checks whether the proper
sequence of commands have been issued by the host to
enable the wheel of the mouse. The sequence is three con-
secutive setting rate commands of 200, 100 and 80 reports
per second.
send_1 – sends a PS/2 1 bit
send_0 – sends a PS/2 0 bit
GetBit – receives a PS/2 bit from the host

Related parts for ADNK-3061