TP8833-35-15-25 USB+PS/2 3D 3/5Key Mouse Controller DataSheet Version:1.1 Jul./2002 http://www.topro.com.tw 5 F, No.10, Prosperity Road 1, Science-Based Industrial Park, Hsinchu 300, Taiwan, R.O.C 300 10 5 TPE: 5 F, No.27, Min Chuan W. Rd. Taipei 104, Taiwan, R.O.C 104 27 5 SHENZHEN: Room 802, Tower A, World Trade Plaza, Fahong Rd., Fatian, Shenzhen, China 9 A 802 (518033) H.Q.: Tel:886-3-5632515 Fax:886-3-5641728 TPE.: Tel:886-2-25856858 Fax:886-2-25941104 SHENZHEN:TEL:755-3679985 Fax:755-3679518 Page 1 of 35 TOPRO CONFIDNETIAL 2003/7/31 Print TP8833-35-15-25 USB+PS/2 3D 3/5Key Mouse Controller General Specification The TP88x5/x3 is to provide a reliable and low-cost solution of transferring mouse data to the host system through a USB environment and accept a report information from host system to indicate e-mail coming. This USB e-mail Mouse controller has been developed for applications requiring a low speed interface to the USB. It completely conforms to the USB 1.5 Mbps specification, version 1.1 and USB HID specification, version 1.1. TP88x5/x3 build in a RC Oscillator,so it doesn't need any external crystal for whole system. This e-mail mouse controller can interface five key-switches and six photo-couplers direct to USB and up to three indicator ELED to turn on/off an LED in order to indicate e-mail received by your mail server. Key de-bouncing circuit is provided to prevent false entry and improve the accuracy, and the noise immunity circuits to eliminate this noise. Selector Guide Part Number TP8833 (a)AP/BP TP8835 (a)AP/BP *TP8815 (a)AP/BP *TP8825 (a)AP/BP Interface USB+PS/2 USB+PS/2 USB+PS/2 USB+PS/2 No. of Keys 3 5 5 5 No. of LEDs 0 0 1 3 Support Buzzer NONE NONE NONE YES Note: 1."A"=>resolution in z direction=1/2. 2."B"=>resolution in z direction=1/4. 3.In USB mode,the "a" indicates Button-Wakeup only,if not,that indicates Button with Motion Wakeup. 4.A LED could instead of a Buzzer. 5. ` *' = development Page 2 of 35 TOPRO CONFIDNETIAL 2003/7/31 Print Pin/Package 18/DIP,SOP 20/DIP,SOP 20/DIP,SOP 22/DIP 24/SOP TP8833-35-15-25 USB+PS/2 3D 3/5Key Mouse Controller Features Built-in 6MHz RC oscillator or 6MHz external oscillator. Fully compliant with the USB 1.1 specification, supports control and interrupt transactions. Fully compliant with the HID 1.1 specification, supports remote wakeup and USB mouse boot protocol feature. Data transfer at USB low speed, Supports 1 device address and 2 endpoints. Integrated USB Transceiver & 1.5Mbps USB serial interface engine. Improved output drivers to reduce EMI. Single 5V power supply with DC supply voltage from 4.4v to 5.25v. Internal power-on-reset (POR). Built-in noise immunity circuit. Five key-switches and six photo-couples inputs. Both key-press and key release de-bounce intervals are 11ms. Support USB suspend mode and remote wakeup feature. Operating temperature range from 0 to 70 degree Celsius. Built-in auto-reference function. Auto speed with dynamic resolutions. Set on/off time for ELED1 and ELED2. When e-mail coming it can flashlight. Change frequency for buzzer when e-mail coming it will sing a song. PS/2 Support with compatible 2D & 3D & 5-button Wheel mode. PIN to PIN compatible with TP8301/02, TP88X5. Improved ESD protection. 5-button & 3D Wheel mode. Low power dissipation. Support USB suspend power management to lower suspend current . the LEDs and internal Clocks are turned off before the device goes into suspend and are turned on right after the device gets out of suspend. Page 3 of 35 TOPRO CONFIDNETIAL 2003/7/31 Print TP8833-35-15-25 USB+PS/2 3D 3/5Key Mouse Controller Contents 1. General Specification P. 2 --- P. 3 2. Pin Configurations and Package Type P. 5 --- P. 6 3. Pin Descriptions P. 7 --- P. 7 4. Functional Block Diagram P. 8 --- P. 8 5. Function Descriptions P. 9 --- P. 28 6. Absolute Maximum Ratings P. 29 --- P. 29 7. DC Electrical Characteristic P. 29 --- P. 30 8. AC Electrical Characteristic P. 30 --- P. 33 9. Application Diagrams P. 34 --- P. 35 Page 4 of 35 TOPRO CONFIDNETIAL 2003/7/31 Print TP8833-35-15-25 USB+PS/2 3D 3/5Key Mouse Controller Pin Configurations and Package Type 1. 5Key Series(TOP VIEW) ELED1 1 24 ELED2 Z2 2 23 Z1 ELED3/BUZZER 3 22 VDD D- 4 21 Y2 Y1 D+ 5 20 Y1 X2 RC 6 19 X2 ELED1 1 22 ELED2 Z2 2 21 Z1 ELED3/BUZZER 3 20 VDD D- 4 19 Y2 D+ 5 18 RC 6 17 TP8825A/BP TP8825A/BP LED 7 16 X1 XTAL1 8 15 XTAL2 9 VSS B4 LED 7 18 X1 L XTAL1 8 17 L 14 M XTAL2 9 16 M 10 13 R VSS 10 15 R 11 12 B5 B4 11 14 B5 NC 12 13 NC 22pin/DIP 24pin/SOP Z2 1 20 Z1 Z2 1 20 Z1 ELED 2 19 VDD TEST 2 19 VDD D-(DATA) 3 18 Y2 D-(DATA) 3 18 Y2 D+(CLK) 4 17 Y1 D+(CLK) 4 17 Y1 RC 5 16 X2 RC 5 16 X2 TP8815A/BP TP8835A/BP LED 6 15 X1 XTAL1 7 14 XTAL2 8 13 9 12 R 10 11 B5 VSS B4 LED 6 15 X1 L XTAL1 7 14 L M XTAL2 8 13 M 9 12 R 10 11 B5 VSS 20pin/DIP 20pin/SOP 20pin/DIP 20pin/SOP Page 5 of 35 B4 TOPRO CONFIDNETIAL 2003/7/31 Print TP8833-35-15-25 USB+PS/2 3D 3/5Key Mouse Controller 2. 3Key Series(TOP VIEW) Z2 1 18 Z1 TEST 2 17 VDD D-(DATA) 3 16 Y2 D+(CLK) 4 15 Y1 RC 5 14 X2 TP8833A/BP LED 6 13 X1 XTAL1 7 12 L XTAL2 8 11 M VSS 9 10 R 18pin/DIP 18pin/SOP Page 6 of 35 TOPRO CONFIDNETIAL 2003/7/31 Print TP8833-35-15-25 USB+PS/2 3D 3/5Key Mouse Controller Pin Descriptions Symbol Type Function D+(CLK) I/O Bi-directional data line. For USB environment, An external 7.5k resistor D-(DATA) I/O must be connected between the D- and Vdd to select low-speed operation. For PS2 environment, D+, D- are functioned as PS/2 CLK, DATA line XTAL1 I 6 MHz ceramic resonator or external clock input XTAL2 O 6 MHz ceramic resonator R I Five key-switches exert seven different combinations totally. Both key-pressed M I and key-released signals will be sent accompanied with horizontal and vertical L I state. B4 I The de-bounce interval for both key-press and key-release is 11ms. B5 I VSS G Ground VDD P Power X1 I Six photo-couple signals denote UP, DOWN, LEFT, RIGHT, Scrolling UP and X2 I Scrolling DOWN state. During the scanning period, as long as the Y1 I photo-couples change their state, the value of vertical or horizontal counter Y2 I will accordingly increase or decrease. Z1 I Z2 I BUZZER O Open Drain & can set on/off time. RC I Connect to external RC circuit for USB suspend mode power management LED O Open Drain & Control for the sink of photo diodes. ELED1 ELED2 ELED3 Page 7 of 35 O O O Open Drain output pin. A LED indicator, When e-mail coming, the host can control this pin state by send SET REPORT(see HID-Class Request or Functional Descriptions) , and also can set ON / OFF time. TOPRO CONFIDNETIAL 2003/7/31 Print TP8833-35-15-25 USB+PS/2 3D 3/5Key Mouse Controller Functional Block Diagram LED1 LED2 LED3 X1 X2 Y1 Y2 Z1 Z2 B4 B5 L R M LED Driver USB Command SIE XCVR Mouse Function D+/CLK D-/DA PS/2 Command DATA I/O OSC. Page 8 of 35 TOPRO CONFIDNETIAL 2003/7/31 Print TP8833-35-15-25 USB+PS/2 3D 3/5Key Mouse Controller Functional Descriptions The TP88X5/X3 supports the USB Specification 1.1 data model. Data from the USB host to the device is transmitted serially. The data are NRZI coded to increase transmission reliability; bit stuffing (inserting an extra 0 bit after any 6 consecutive 1 bits) is performed and a CRC check carried out. Bit stuffing, NRZI coding/decoding and CRC checks or generation are performed within the TP88X5/X3. The data is transmitted in packets. Three types of packets are defined for the USB: token, data and handshake. The token is always passed on by the host. It contains a PID (packet identifier) which defines the direction of the following data transmission and the address of the device and endpoints to be addressed. Depending on the previous token command, data is transferred from the USB host to the TP88X5/X3 (OUT transfer) or transferred from the TP88X5/X3 to the USB host (IN transfer). In the process the respective FIFOs are written (OUT) or read (IN). The data transfer is concluded with a handshake. If the data has been received successfully, an ACK is sent to the data source. If no data is ready for an IN transfer out of the TP88X5/X3, it sends an NAK handshake instead of the data (If endpoint is enabled). USB Engine The USB engine includes the Serial Interface Engine (SIE) and the low-speed USB I/O transceiver. The SIE block performs most of the USB Interface functions. Two endpoints are supported. Endpoint 0 is used to receive and transmit control (including setup) packet while Endpoint 1 is only used to transmit data packets. The USB SIE processes USB bus activity at the transaction level independently. It does all the NRZI encoding/decoding and bit stuffing/unstuffing. It also determines token type, checks address and endpoint values, generates and checks CRC values and controls the flow of data byte between the bus and Endpoint FIFOs. The SIU handles higher level and function specific tasks. During control transfers the SIU must interpret device requests and respond correctly. It also must coordinate Suspend/Resume, verify and select DATA toggle value, and perform function specific tasks. Page 9 of 35 TOPRO CONFIDNETIAL 2003/7/31 Print TP8833-35-15-25 USB+PS/2 3D 3/5Key Mouse Controller Attached A USB device may be attached or detached from the USB. The state of a USB device when it is detached from the USB is not defined by this specification. The specification only addresses required operations and attributions once the device is attached. Powered USB devices may obtain power from USB through the hub to which they are attached. A hub port must be powered in order to detect port status changes, including attach and detach. Hubs do not provide any downstream power until they are configured, at which point they will provide power as allowed by their configuration and power source. Default After the device has been powered, it must not respond to any bus transactions until it has received a reset from the bus. After receiving a reset, the device is then addressable at the default address. Address assigned All USB devices use the default address when initially powered or after the device has been reset. Each USB device is assigned a unique address by the host after attachment or after reset. A USB device maintains its assigned address while suspended. A USB device responds to requests on its default pipe whether the device is currently assigned a unique address or is using the default address. Configured Before the USB device's function may be used, the device must be configured. From the device's perspective, configuration involves writing a non-zero value to the device configuration register. Configuring a device or changing an alternate setting causes all of the status and configuration values associated with endpoints in the affected interfaces to be set to their default values. This includes setting the data toggle of any endpoint using data toggle to the value DATA0. Page 10 of 35 TOPRO CONFIDNETIAL 2003/7/31 Print TP8833-35-15-25 USB+PS/2 3D 3/5Key Mouse Controller Suspended In Order to conserve power, USB devices automatically enter the suspended state when the devicehas observed no bus traffic for a specified period. When suspended, the USB device maintains any internal status including its address and configuration. Bus Enumeration When a USB device is attached to or removed from the USB, the host uses a process known as bus enumeration to identify and manage the device state changes necessary. Dynamic Attachment and Removal USB devices may be attached and removed at any time. The hub that provides the attachment point or port is responsible for reporting any change in the state of the port. Address Assignment When a USB device is attached, the host is responsible for assigning a unique address to the device after the device has been reset by the host and the hub port where the device is attached has been enabled. Configuration A USB device must be configured before its function may be used. The host is responsible for configuring a USB device. The host typically requests configuration information from the USB device to determine the device's capabilities. Data Transfer Data may be transferred between a USB device endpoint and the host in one of four ways. Some endpoints may be capable of different types of data transfer. However once configured, a USB device endpoint uses only one data transfer method. Power Budgeting For bus-powered devices, power is limited resource. When a host detects the attachment of a bus-powered USB device, the host needs to evaluate the power requirements of the device. If USB Page 11 of 35 TOPRO CONFIDNETIAL 2003/7/31 Print TP8833-35-15-25 USB+PS/2 3D 3/5Key Mouse Controller device power requirements exceed available power, the device is not configured. Remote Wakeup Remote wakeup allows a suspended USB device to signal a host that may be suspended. This notifies the host that it should resume from its suspended mode, if necessary, and service the external event that triggered the suspended USB device to signal the host. USB Request The TP88X5/X3 supports the following USB standard request : (ref to USB spec. for detailed description) a. clear_feature : This request is used to clear endpoint_stall or disable device_remote_wakeup b. get_configuration: This request returns the current device configuration. If the returned value is zero, the device is not configured. c. get_descriptor : This request returns the specified descriptor if the descriptor exists. d. get_status : This request returns status for the specified recipient. e. set_address : This request sets the device address for all future device accesses. f. set_configuration : This request sets the device configuration. g. set_feature : This request is used to enable device_remote_wakeup feature. HID-Class Request The TP88X5/X3 supports the following HID class-specific requests : (ref to HID spec. for detailed description) a. get_class_descriptor : This request returns a class descriptor for the device. Page 12 of 35 TOPRO CONFIDNETIAL 2003/7/31 Print TP8833-35-15-25 USB+PS/2 3D 3/5Key Mouse Controller b. c. d. e. f. g. get_report : This request allows the host to receive a report via the control pipe. get_idle : This request reads the current idle rate for the input report. get_protocol : This request reads which protocol is currently active, either the boot protocol or the report protocol. This request is supported by devices in the boot subclass. set_report : This request allows the host to send a report to device, possibly setting the state of input, output, or feature controls. set_idle : This request silences a particular report on the interrupt pipe until new event or the specified amount of time passes. The default idle rate is infinity. set_protocol : This request switches between the boot protocol and the report protocol. USB Descriptors The TP88X5/X3 supports the following USB standard descriptors : (ref to USB spec. for detailed descriptor) a. device descriptor : A device descriptor describes general information about a USB device. It includes information that applies globally to device and all of the device's configurations. A USB device has only one device descriptor. b. configuration descriptor : The configuration descriptor describes information about a specific device configuration. c. interface descriptor : This descriptor describes a specific interface provided by associated configuration. d. endpoint descriptor : This descriptor contains the information required by the host to determine the bandwidth requirement of each endpoint. e. string descriptor : Page 13 of 35 TOPRO CONFIDNETIAL 2003/7/31 Print TP8833-35-15-25 USB+PS/2 3D 3/5Key Mouse Controller String descriptors are optional. If a device does not support string descriptors, all references to string descriptors within device, configuration, and interface descriptors must be reset to zero. HID Descriptors The TP88X5/X3 supports the following HID class-specific descriptors : (ref to HID spec. for detailed description) a. HID descriptor : The HID descriptor identifies the length and type of subordinate descriptors for a device. b. report descriptor : The report descriptor is made up of item, which provide information about the device. The length and content of a report descriptor vary depending on the number of data fields required for the device's reports. c. physical descriptor : The physical descriptor is a data structure that provides information about the specific parts of the human body that are activating controls. Mouse Report Format Byte0 Byte1 Byte2 Byte3 bit7 bit6 3 bit padding X displacement Y displacement Z displacement Host Request Report Format Bit7 bit6 Byte0 Select LED Byte1 Byte2 Page 14 of 35 bit5 bit4 bit3 bit2 bit1 bit0 th th 5 button 4 button Mbutton Rbutton Lbutton bit5 X bit4 bit3 bit2 bit1 Select LED flash cycle bit0 ELED ON/OFF ON Time(Unit = 0.1Second) OFF Time (Unit = 0.1Second) TOPRO CONFIDNETIAL 2003/7/31 Print TP8833-35-15-25 USB+PS/2 3D 3/5Key Mouse Controller Contents of descriptors a. device descriptor Offset Field 0 Blength 1 BdescriptorType 2 BcdUSB 4 BdeviceClass 5 BdeviceSubClass 6 BdeviceProtocol 7 BmaxPacketSize0 8 IdVendor 10 IdProduct 12 BdcDevice 14 IManufacturer 15 IProduct 16 ISerialNumber 17 BNumConfigurations size 1 1 2 1 1 1 1 2 2 2 1 1 1 1 value 0x12 0x01 0x0110 0x00 0x00 0x00 0x08 0x06A2 0x0001 0x0100 0x01 0x02 0x00 0x01 Description size of this descriptor in bytes DEVICE descriptor type USB specification release 1.10 class code subclass code protocol code Maximum packet size for endpoint zero Topro vender ID product ID device release number in bcd string index for iManufacturer string index for iProduct no string index number of possible configuration b. configuration Offset Field 0 BLength 1 BDescriptorType 2 WTotalLength 4 BNumInterfaces 5 BConfigurationValue 6 IConfiguration 7 BmAttributes 8 MaxPower size 1 1 2 1 1 1 1 1 Value 0x09 0x02 0x0022 0x01 0x01 0x04 0xa0 0x32 description size of this descriptor in bytes CONFIGURATION descriptor type configuration+interface+endpoint+HID number of interface configuration argument string index for iConfiguration bus powered + remote wakeup feature max. power consumption in 2mA unit c. interface descriptor Offset Field 0 BLength 1 BDescriptorType 2 BInterfaceNumber 3 BAlternateSetting 4 BNumEndpoint 5 BInterfaceClass Page 15 of 35 size 1 1 1 1 1 1 Value 0x09 0x04 0x00 0x00 0x01 0x03 description size of this descriptor in bytes INTERFACE descriptor type interface argument value used to select alternate setting number of endpoints(excluding ep0) HID class code TOPRO CONFIDNETIAL 2003/7/31 Print TP8833-35-15-25 USB+PS/2 3D 3/5Key Mouse Controller 6 7 8 BInterfaceSubClass 1 BInterfaceProtocol 1 IInterface 1 d. endpoint descriptor Offset Field 0 Blength 1 BdescriptorType 2 BendpointAddress 3 BmAttributes 4 WmaxPacketSize 6 Binterval e. HID descriptor Offset Field 0 Blength 1 BdescriptorType 2 BcdHID 4 BcountryCode 5 BnumberDescriptors 6 BdescriptorType 7 WreportLength f. Page 16 of 35 0x01 boot interface subclass code 0x02 mouse protocol 0x05 Interface string index size 1 1 1 1 2 1 size 1 1 2 1 1 1 2 Value 0x07 0x05 0x81 0x03 0x0008 0x0a Value 0x09 0x21 0x0100 0x00 0x01 0x22 0x0055 description size of this descriptor in bytes ENDPOINT descriptor type IN endpoint address interrupt pipe attribute maximum packet size interval for polling EP for data transfer description size of this descriptor in bytes HID descriptor type HID class specification release number Hardware target country number of HID class descriptors to follow report descriptor type total length of report descriptor report descriptor Item Usage page (generic desktop) Usage (mouse) Collection (application) Usage (pointer) Collection (Physical) Usage page (buttons) Usage minimum (button 1) Usage maximum (button 5) Logical minimum (0) Logical maximum (1) Report count (5) TOPRO CONFIDNETIAL Value(3D) 05 01 09 02 a1 01 09 01 a1 00 05 09 19 01 29 05 15 00 25 01 95 05 2003/7/31 Print TP8833-35-15-25 USB+PS/2 3D 3/5Key Mouse Controller Report size (1) Input(data, variable, absolute) Report count (1) Report size (3) Input (constant) Usage page (generic desktop) Usage (x) Usage (y) Usage (wheel) Logical minimum (-127) Logical maximum (127) Report size(8) Report count (3) Input (data, variable, relative) End collection Usage page(LEDs) Usage (Usage Selected Indicator) Collection (Logical) Usage (Num Lock) Logical Minimum(0) Logical Maximum(1) Reprot count (1) Report size (1) Output (Data,Var,Abs) End collection Report count (1) Report size (7) Output (Cnst,Ary,Abs) Usage (Flash On Time) Report count (2) Report size (8) Output (Data,Var,Abs) End collection g. Offset 0 1 Page 17 of 35 string descriptor Field Blength BdescriptorType size Value 1 0x04 1 0x03 75 01 81 02 95 01 75 03 81 03 05 01 09 30 09 31 09 38 15 81 25 7f 75 08 95 03 81 06 c0 05,08 09,3a a1, 02 09,01 15,00 25,01 95,01 75,01 91,02 C0 95,01 75,07 91,01 09,42 95,02 75,08 91,02 C0 Description size of this descriptor in bytes String descriptor type TOPRO CONFIDNETIAL 2003/7/31 Print TP8833-35-15-25 USB+PS/2 3D 3/5Key Mouse Controller 2 Bstring 2 0x0409 LangID code for English String index 1 for manufacturer Offset Field size Value Description 0 Blength 1 0x0c size of this string in bytes 1 BdescriptorType 1 0x03 String descriptor type 2 Bstring "TOPRO " String index 2 for product Offset Field Size 0 Blength 1 1 BdescriptorType 1 2 Bstring Value Description 0x14 size of this string in bytes 0x03 String descriptor type "USB Mouse" String index 4 for configuration Offset Field size Value Description 0 Blength 1 0x14 size of this string in bytes 1 BdescriptorType 1 0x03 String descriptor type 2 Bstring "HID Mouse" String index 5 for interface Offset Field Size Value Description 0 Blength 1 0x1e Size of this string in bytes 1 BdescriptorType 1 0x03 String descriptor type 2 Bstring "Interrupt Pipe" PS/2 Functional Descriptions (A) Operating mode There are four operating modes in PS/2 mouse : Page 18 of 35 TOPRO CONFIDNETIAL 2003/7/31 Print TP8833-35-15-25 USB+PS/2 3D 3/5Key Mouse Controller a. Reset Mode : In this mode a self-test is initiated during power-on or by a Reset command. After reset signal, PS/2 mouse will send: (a) Completion code AA & ID code 00. (b) Set default: sampling rate: 100 reports/s non-autospeed stream mode 4 counts/mm disable b. Stream Mode: The maximum rate of transfer is the programmed sampling rate. Data report is transmitted if (a) switch is pressed (b) movement has been detected c. Remote Mode: Data is transmitted only in response to a Read Data command. d. Wrap Mode: Any byte of data sent by the system, except hex EC ( Reset wrap mode ) or hex FF ( Reset), is returned by TP88X5/X3. (B) PS/2 Mouse Data Report: a. In stream mode: A data report is sent at the end of a sample interval. b. In remote mode: A data report is sent in response to Read Data command. Page 19 of 35 TOPRO CONFIDNETIAL 2003/7/31 Print TP8833-35-15-25 USB+PS/2 3D 3/5Key Mouse Controller c. Data report format: Byte Bit 1 0 1 2 3 4 5 6 7 2 0-7 3 0-7 4 0-7 Description Left button status; 1 = pressed Right button status; 1 = pressed Middle button status; 1 = pressed Reserved X data sign; 1 = negative Y data sign; 1 = negative X data overflow; 1 = overflow Y data overflow; 1 = overflow X data ( D0 - D7 ) Y data ( D0 - D7 ) Z data : D0 - D6,sign bit (3D mode) D0 - D3,4th- ,5th button (5-button 3D mode) (C) PS/2 mouse Data Transmission: a. TP88X5/X3 generates the clocking signal when sending data to and receiving data from the system. b. The system requests TP88X5/X3 to receive system data output by forcing the DATA line to an inactive level then allowing CLK line to go to an active level. c. Data transmission frame: Bit 1 2-9 10 11 Page 20 of 35 Function Start bit ( always 0 ) Data bits ( D0 - D7 ) Parity bit ( odd parity ) Stop bit ( always 1 ) TOPRO CONFIDNETIAL 2003/7/31 Print TP8833-35-15-25 USB+PS/2 3D 3/5Key Mouse Controller d. Data Output (data from TP88X5/X3 to system ): If CLK keep low (inhibit status), data will not transmit. If CLK raised to high and DATA is low(request-to-send),data is updated. After receiving data from system, TP88X5/X3 will not start transmitting until CLK and DATA are both high. If CLK and DATA are both high, the transmission is ready. DATA is valid prior to the falling edge of CLK and beyond the rising edge of CLK. During transmission, TP88X5/X3 check for line contention by checking for an inactive level on CLK lasting for no more than 100m sec. Contention occurs when the system lowers CLK to inhibit TP88X5/X3 output after TP88X5/X3 has started a transmission. If this occurs before the rising edge of the tenth clock, TP88X5/X3 internal store its data in its buffer and returns DATA and CLK to an active level. If the contention does not occur by the tenth clock, the transmission is completed. Following a transmission, the system inhibits TP88X5/X3 by holding CLK low until it can service the input or until the system receives a request to send a response from TP88X5/X3. e. Data Input ( from system to TP88X5/X3): System first check if TP88X5/X3 is transmitting data. If TP88X5/X3 is transmitting, the system can override the output by forcing CLK to an inactive level prior to the tenth clock. If the transmission of TP88X5/X3 beyond the tenth clock ,the system must receive the data. If TP88X5/X3 is not transmitting or if the system choose to override the output, the Page 21 of 35 TOPRO CONFIDNETIAL 2003/7/31 Print TP8833-35-15-25 USB+PS/2 3D 3/5Key Mouse Controller system force CLK to an inactive level for a period of not less than 100u sec while preparing for output. When the system is ready to output start bit (0), it allows CLK to go to active level. If request-to-send is detected, TP88X5/X3 clocks in 11 bits. Following the tenth clock, TP88X5/X3 checks for an active level on the DATA line, and if found, force DATA low, and clock once more. If framing error occurs, TP88X5/X3 continue to clock until DATA is high, then clocks the line control bit and request a Re-send. When the system sends out a command or a data that requires a response, the system must wait for TP88X5/X3 to response before sending its next output. (D) PS/2 Mouse Error Handling: a. A Re-send command ( FE ) following receipt of an invalid input or any input with incorrect polarity. b. If two invalid input are received in succession, an error code of hex FC will be sent to the system. c. The counter accumulators are cleared after receiving any command except "Re-send". d. As TP88X5/X3 receives a Re-send command ( FE ), it transmits its last packet of data. e. In the stream mode "Re-send" is received by TP88X5/X3 following a 4-byte data packet transmission to the system. TP88X5/X3 re-send the 4-byte data packet prior to clearing the counter. f. A response is sent within 25 ms if Page 22 of 35 TOPRO CONFIDNETIAL 2003/7/31 Print TP8833-35-15-25 USB+PS/2 3D 3/5Key Mouse Controller (a) The system requires a response (b) An error is detected during transmission g. When a command requiring a response is issued by the system, another command should not be issued until either the response is received or 25ms has passed. (E) PS/2 Mouse Commands Description: There are 16 valid commands that transmit between the system and TP88X5/X3. The "EA" code is always the first response to any valid input received from the system other than a Set Wrap Mode or Re-send command. The following table lists the commands: Hex Code FF FE F6 F5 F4 F3,XX F2 F0 EE EC EB EA E9 E8,XX E7 E6 Page 23 of 35 Command Reset Re-send Set Default Disable Enable Set Sampling Read Device Type TP88X5/X3 echo code FA,AA,00 XX,(XX,XX) FA FA FA Rate FA,FA FA,00(2D mode)/03(3D mode)/04(5-button 3D mode) Set Remote Mode FA Set Wrap Mode FA Reset Wrap Mode FA Read Data FA,XX,XX,XX,XX(3 XX in 2D mode) Set Stream Mode FA Status Request FA,XX,XX,XX,XX(3 XX in 2D mode) Set Resolution FA,FA Set Autospeed FA Reset Autospeed FA TOPRO CONFIDNETIAL 2003/7/31 Print TP8833-35-15-25 USB+PS/2 3D 3/5Key Mouse Controller The continuance command sequence below will activate 3-button 3D mode. F3,XX F3,XX F3,XX The continuance command sequence below will activate 5-button 3D mode. F3,C8 F3,64 F3,50 F3,C8 F3,C8 F3,50 The following describes valid commands: a. Reset ( FF ) TP88X5/X3 operation: (a) Complete the reset. (b) Transmit FA,AA,00 to the system. (c) Set default: sampling rate: 100 reports/s non-autospeed stream mode 4 counts/mm disable b. Re-send ( FE ) (a) Any time TP88X5/X3 receives an invalid command, it returns a Re-send command to the system. (b) When TP88X5/X3 receives a Re-send command, it retransmits its last output. If the Page 24 of 35 TOPRO CONFIDNETIAL 2003/7/31 Print TP8833-35-15-25 USB+PS/2 3D 3/5Key Mouse Controller last packet was a Re-send command, it transmits the packet just prior to the Re-send command. (c) In stream mode, if a Re-send command is received by TP88X5/X3 immediately following a 4-byte data packet transmission to the system, TP88X5/X3 will re-send the 4-byte data packet prior to cleaning the count accumulators. c. Set Default ( F6 ) The command reinitializes all conditions to the power-on defaults. d. Disable ( F5 ) This command is used in the stream mode to disable transmissions from TP88X5/X3. e. Enable ( F4 ) Enable transmissions, if in stream mode. f. Set Sampling Rate ( F3,XX ) In the stream mode, this command sets the sampling rate to the value indicated by byte hex XX, shown as follows: Second byte XX Sample Rate 0A 10/sec 14 20/sec 28 40/sec 3C 60/sec 50 80/sec 64 100/sec C8 200/sec g. Read Device Type ( F2 ) TP88X5/X3 always echoes " FA,00 " in 2D mode, "FA 03" in 3D mode. "FA,04" in Page 25 of 35 TOPRO CONFIDNETIAL 2003/7/31 Print TP8833-35-15-25 USB+PS/2 3D 3/5Key Mouse Controller 5-button 3D mode. h. Set Remote Mode ( F0 ) Data value are reported only in response to a Read Data command. i. Set Wrap Mode ( EE ) Wrap mode remains until Reset ( FF ) or Reset Wrap Mode( EC ) is received. j. Reset Wrap Mode ( EC ) TP88X5/X3 returns to the previous mode of operation after receiving this command. k. Read Data ( EB ) This command is executed in either remote or stream mode. The data is transmitted even if there has been no movement or the button status is unchanged since the last report. Following a Read Data command, the registers are cleared after a data transmission. l. Set Stream Mode ( EA ) This command sets TP88X5/X3 in stream mode. m. Status Request ( E9 ) When this command is issued by the system, TP88X5/X3 responds with a 3-byte status report as follows: Byte 1 Page 26 of 35 Bit 0 1 2 3 4 5 Description 1 = Right button pressed 1 = Middle button pressed 1 = Left button pressed Reserved 0 = Normal speed, 1 = Autospeed 0 = Disabled, 1 = Enabled TOPRO CONFIDNETIAL 2003/7/31 Print TP8833-35-15-25 USB+PS/2 3D 3/5Key Mouse Controller 2 3 6 7 0-7 0-7 0 = Stream mode, 1 = Remote mode Reserved Current resolution setting ( D0 - D7 ) Current sampling rate ( D0 - D7 ) n. Set Resolution ( E8,XX ) TP88X5/X3 provides four resolutions selected by the second byte of this command as follows: Second Byte XX 00 01 02 03 > 4 & <64 < 125 & > 64 7C 7D 7E 7F Resolution 1 counts/mm 2 counts/mm 4 counts/mm 8 counts/mm Set Eled or Buzzer on time counter Set Eled or Buzzer off time counter Select buzzer high byte Select buzzer low byte Select Eled1 Select Eled2 o. Set Autospeed ( E7 ) At the end of a sample interval in the stream mode, the current X and Y data values are converted new values. The sign bits are not involved in this conversion. The conversion is only in stream mode. The relationship between the input and output count is as follows: Input Output 0 0 1 1 2 1 3 3 Page 27 of 35 TOPRO CONFIDNETIAL 2003/7/31 Print TP8833-35-15-25 USB+PS/2 3D 3/5Key Mouse Controller 4 5 N( >=6 ) 6 9 2.0*N p. Reset Autospeed ( E6 ) This command restore normal speed. (G) BUZZER and ELED function: There are three special function support difference application and can control On/off independently by command F1/EF,select and set on/off time by option byte of command E8.All legal command and option TP88X5 will answer "FA". Testing Mode Descriptions Whenever "Test" pin is connected to logic 1, the chip will enter buyer's testing mode. If RC = "0" (i.e. connect to GND)The X direction output signals of comparators will present to "L" and "M" pin. Pressing "R" key can toggle the output from X direction to Y direction. If RC = "1"(i.e. connect to VDD)The TP88X5/X3 will enter engineer testing mode. Page 28 of 35 TOPRO CONFIDNETIAL 2003/7/31 Print TP8833-35-15-25 USB+PS/2 3D 3/5Key Mouse Controller Absolute Maximum Ratings Parameter Temperature under bias Storage temperature Power dissipation Supply voltage Symbol Top Tst Pdis Vcc min 0 -65 --4.5 Max 50 150 500 5.25 Parameter Symbol Supply voltage Vdd Operating current Iop USB characteristics: (Note) USB mode Suspended current Isu D+,D- Hi-Z state data line leakage Ilo D+,D- Differential input sensitivity Vdi D+,D- Differential common mode rangVcm D+,D- Single ended receiver threshold Vse D+,D- Static data line output low Vol D+,D- Static data line output high Voh USB Transceiver capacitance Cin PS/2 characteristics: CLK,DATA positive-going threshold Vt+ Voltage CLK,DATA negative-going threshold VtVoltage DATA, CLK input current Idc Test condition unit mW volt DC Characteristics DATA, CLK low output voltage Vprl Other characteristics: X1,X2,Y1,Y2,Z1,Z2 input reference Virh Voltage (comparator mode) X1,X2,Y1,Y2,Z1,Z2 input linkage Iil Current L,M,R,4th ,5th input(pull-down) current Imi Page 29 of 35 min max unit 4.4 5.25 V 20 mA 480 uA 0v