eKM8022 Preliminary USB & PS/2 Mouse Controller 1. General Description The EKM8022 is an Mouse Controller designed to control both USB & PS/2 Mouse device with 400/800 dpi selector for XY Quadrature. This Mouse Controller can auto detect USB or PS/2 mode, and supports X,Y,Z three axes with 400/800 dpi, and L, R, M three buttons under both USB and PS2 mode. 2. Features ◆Universal Serial Bus Specification, version 1.1 ◆USB HID Specification, version 1.1 ◆Auto-detecting PS/2 port or USB port. ◆Compatible with Microsoft 3D PS/2 mouse. ◆Support 3D (X,Y,Z) 3 Key (L,R,M) input. ◆Support Z/2 mechanical and Z/4 Photo(eKM8022B) Z-axis input type. ◆ Support Agilent HDNS-2000、ADNS2051、ELAN eKL0001、PixArt PAN101BOI/BSI Optical Mouse Sensor. ◆Applications: 3D, 3 Buttons USB and PS/2 Combo Mouse with 400/800 dpi. ◆ Package: ◇DIP18-eKM8022AP ◇SOP18-eKM8022AM ◇DIP20-eKM8022BP ◇ SOP20-eKM8022BM 1 2003/12/5 eKM8022 Preliminary USB & PS/2 Mouse Controller 3. Pin assignment ◆eKM8022A (18-Pin) L KEY 1 ● 18 X1 IR_C 2 17 X2 Z1 3 16 Y1 Z2 4 15 Y2 R KEY 5 14 M KEY D_SEL 6 13 D+/CLK VSS 7 12 D-/Data V3.3 8 11 VDD OSCI 9 10 OSCO Symbol I/O PIN OSCI I 9 6MHz ceramic resonator input. OSCO I/O 10 Return path for 6-MHz ceramic resonator. V3.3V O 8 3.3V DC voltage output from internal regulator. This pin has to be tied to a 4.7 F capacitor. X1 I 18 X axis Input 1 X2 I 17 X axis Input 2 Y1 I 16 Y axis Input 1 Y2 I 15 Y axis Input 2 Z1 I 3 Z axis Input 1 Z2 I 4 Z axis Input 2 R I 5 Right Key Input M I 14 Middle Key Input L I 1 Left Key Input IR_C I/O 2 IR Control Pin. D_SEL I 6 400DPI D+ / CLK I/O 13 USB D+ or PS/2 CLK I/O D- / DATA I/O 12 USB D- or PS/2 Data I/O VDD - 11 5 V Power Input VSS - 7 GND 2 Function μ :Floating,800DPI:Ground 2003/12/5 eKM8022 Preliminary USB & PS/2 Mouse Controller ◆eKM8022B (20-Pin) L KEY 1 ● 20 X1 IR_C 2 19 X2 Z1 3 18 Y1 Z2 4 17 Y2 R KEY 5 16 M KEY D_SEL 6 15 IR_C2 VSS 7 14 D+/CLK VSS 8 13 D-/Data V3.3 9 12 VDD OSCI 10 11 OSCO Symbol I/O PIN OSCI I 10 6MHz ceramic resonator input. OSCO I/O 11 Return path for 6-MHz ceramic resonator. V3.3V O 9 3.3V DC voltage output from internal regulator. This pin has to be tied to a 4.7 F capacitor. X1 I 20 X axis Input 1 X2 I 19 X axis Input 2 Y1 I 18 Y axis Input 1 Y2 I 17 Y axis Input 2 Z1 I 3 Z axis Input 1 Z2 I 4 Z axis Input 2 R I 5 Right Key Input M I 16 Middle Key Input L I 1 Left Key Input IR_C I/O 2 IR Control Pin. IR_C2 I/O 15 IR Control Pin D_SEL I 6 400DPI D+ / CLK I/O 14 USB D+ or PS/2 CLK I/O D- / DATA I/O 13 USB D- or PS/2 Data I/O VDD - 12 5 V Power Input VSS - 7,8 GND 3 Function μ :Floating,800DPI:Ground 2003/12/5 eKM8022 Preliminary USB & PS/2 Mouse Controller 4. Function description X1 X2 Y1 Y2 X Y Z1 Z2 Z X-COUNTER Y-COUNTER USB PROTOCOL CONTROLLER DATA PROCESS Z-COUNTER PS/2 PROTOCOL CONTROLLER BTM REGISTER IR_C MULTIPLEXER IR_C LMR MODE SELECTOR L M R ◆PS/2 function description DATA I/O D+/CLK D-/DATA DETECT CIRCUIT Fig-1 : Function block ◇PS/2 Mouse Commands Description Hex Code 4 Command EKM8022 echo code FF Reset FA,AA,00 FE Resend XX,(XX,XX) F6 Set Default FA F5 Disable FA F4 Enable FA F3,XX Set Sampling Rate FA,FA F2 Read Device Type FA,00 F0 Set Remote Mode FA EE Set Wrap Mode FA EC Reset Wrap Mode FA EB Read Data FA,XX,XX,XX EA Set Stream Mode FA E9 Status Request FA,XX,XX,XX E8 Set Resolution FA,FA E7 Set Autospeed FA E6 Reset Autospeed FA 2003/12/5 eKM8022 Preliminary USB & PS/2 Mouse Controller ◇Microsoft PS/2 scrolling mouse (A) Entering procedure: Except in WRAP mode, while eKM8022 received the following consecutive command. i. F3 C8 ---- set sampling rate 200/sec ii. F3 64 ---- set sampling rate 100/sec iii. F3 50 ---- set sampling rate 80/sec (B) Operating: a. All of the commands in legacy mode still be valid. b. The ID code of read device type command (F2) will changed from "00" to be "03". c. Data report will be four bytes format: Byte Bit 1 0 1 2 3 4 5 6 7 0-7 0-7 0-7 2 3 4 Description Left button status; 1 = pressed Right button status; 1 = pressed Middle button status; 1 = pressed Reserve 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-D7) (C) Exiting Microsoft scrolling mode: There are two ways to exit: a. Power off. b. Reset command (FF). Z-axis Input Function : The Z0-Z7 limit value is ±7 Z-axis counter accumulates the Z1, Z2 phase changed by movement. This mode includes noise immunity. Z/2 : 2 dot per count. The wheel should stay at Z1=0, Z2=0 or Z1=1, Z2=1 Phase Z/4 : 4 dots per count. the wheel should stay at Z1=0, Z2=0 phase. 5 2003/12/5 eKM8022 Preliminary USB & PS/2 Mouse Controller ◆USB function Description ◇Each Descriptor in USB Mode. Byte1 Byte2 Byte3 Byte4 Byte5 Byte6 Byte7 Byte8 Descriptor Type Device Descriptor Configuration Descriptor 12 01 10 01 00 00 00 08 67 12 10 02 01 00 00 02 00 01 09 02 22 00 01 01 00 A0 04 00 00 01 03 01 02 21 00 01 00 01 22 48 07 05 81 03 08 00 0A 05 01 09 02 A1 01 05 09 19 01 29 04 15 00 25 01 95 04 75 01 81 02 95 01 75 04 81 03 05 01 09 01 A1 00 09 30 09 31 15 81 25 7F 75 08 95 02 81 06 C0 09 38 95 01 81 06 09 3C 15 00 25 01 75 01 95 01 B1 22 95 07 B1 01 C0 32 09 Interface Descriptor 00 09 HID Descriptor 00 Endpoint HID Report Descriptor ◇USB Mouse Report Data Type Byte0 Byte1 Byte2 Byte3 6 Bit7 Bit6 Bit5 Bit4 Bit3 Bit2 Bit1 Bit0 0 0 0 0 0 M R L Bit7 Bit6 Bit5 Bit4 Bit3 Bit2 Bit1 Bit0 Bit2 Bit1 Bit0 Bit2 Bit1 Bit0 X-AXIS Bit7 Bit6 Bit5 Bit4 Bit3 Y-AXIS Bit7 Bit6 Bit5 Bit4 Bit3 Z-AXIS 2003/12/5 eKM8022 Preliminary USB & PS/2 Mouse Controller 5. Absolute Maximum Rating Symbol Temperature under bias Storage temperature Input voltage Output voltage min 0 -65 -0.5 -0.5 Max 70 150 6.0 6.0 unit ºC ºC V V 6. Electrical Characteristic (T = 0ºC ~70ºC, VDD=4.4~5.2V, VSS=0V) Symbol Parameter Condition Min Type Max Unit 3.0 3.3 3.6 V - 2.3 V 3.3V Regulator VRag Output voltage of 3.3v Regulator VDD = 4.2V ~ 5.2V VResetL Low Power Reset detecting low Voltage VResetH Low Power Reset detecting high Voltage 2.4 - V - - 1 μA MCU operating Input Leakage Current for input pins VIN=VDD,VSS VIHX Clock Input High Voltage OSCI 2.5 - - V VILX Clock Input Low Voltage OSCI - - 1.0 V 1.1 - V IIL GPIO Pins VHL High/Low level transfer point Input VOH Output High Voltage IDrive = 5.0mA 2.4 - - V VOL Output Low Voltage ISink = 5.0mA - - 0.4 V IPH Input current with pull-high resister - 25 - μA IPL Input current with pull-low resister - 330 - μA 2.8 - 3.6 V - - 0.3 V The input pin with internal pull-high resistor of Port6 or port7 is connected to VSS. The input pin with internal pull-low resistor of Port6 is connected to VDD. USB Interface 7 VOH Static Output High VOL Static Output Low VDI Differential Input Sensitivity 0.2 - - V VCM Differential Input Command Mode Range 0.8 - 2.5 V VSE Single Ended Receiver Threshold 0.8 - 2.0 V CIN Transceiver Capacitance - - 20 pF 3.0 - 3.6 V -20% 1.5 +20 % VRG Output Voltage of Internal Regulator RPH Internal Pull-high Resistor USB operation Mode USB operation Mode Ω k 2003/12/5 eKM8022 Preliminary USB & PS/2 Mouse Controller 7. Application circuit ◆NOTICE eKM8022A R2 11 VDD + C4 C3 VDD C2 7 VSS VSS PORT 8 + C1 V3.3 R1 1 L ◇R1 = 100KΩ For eKM8022 MTP ◇R2 = 10Ω For Keeping From EST ◇C1 = 4.7uF Should Be Close To V3.3 ◇C2 = 10uF Should Be Close To eKM8022 For Keeping From ESD ◇C3 = 0.1uF Should Be close To Port For Keeping From ESD ◇C4 Is Reserved For Keeping From EMI 8 2003/12/5 eKM8022 Preliminary USB & PS/2 Mouse Controller ◆eKM8022A_Mechanical Z/2 Application For Ball Type 6 1 eKM8022A 10 IR_C 11 VDD 12 DATA 7 VSS D+/CLK X1 D-/DATA X2 VSS R3 6 PORT 2 VDD 13 CLK 5 2 Y1 16 4 15 6 17 5 1 2 D_SEL V3.3 100K Y2 18 4 200 1 VDD 10uF 14 + Z1 M Z2 1 4 1 2 2 Z-AXIS 5 0.1uF L 3 R 9 V3.3 OSCI OSCO 8 4.7uF + 10 6M 20P 20P :R3 GND FOR 800DPI,FLOATING FOR 400DPI。 NOTE ◆eKM8022B_Photo_Z/4 Application For Ball Type V3.3 eKM8022B 10 12 VDD Z1 VDD 14 CLK 13 DATA 8 VSS D+/CLK 2 4 Z2 VSS IR_C2 V3.3 2 16 5 VDD 10uF R3 6 + 0.1uF R4 7 10 L X1 M X2 R Y1 4 1K 6 1 15 IR_C 100K 1 1 5 + 9 6 D-/DATA 4.7uF PORT 3 5 2 20 4 19 6 18 5 1 2 D_SEL Y2 VNN OSCI OSCO 17 4 200 11 6M 20P 20P :R3 GND FOR 800DPI,FLOATING FOR 400DPI;R4 GND AND L KEY PULL HIGH 100K FOR MTP。 NOTE 9 2003/12/5 eKM8022 Preliminary USB & PS/2 Mouse Controller ◆eKM8022A_Mechanical Z/2 Application For OM01(ADNS2051 Compatible) 100uF + 0.1uF ELAN SERSOR eKM8022A 13 10 2 X2 11 VDD 3 X1 13 CLK 12 DATA 7 VSS D+/CLK Y1 D-/DATA Y2 Y1 16 XY_LED 5 Y2 15 REFA 1 + 2 3 1 2 4 Z-AXIS 15 Z1 Z2 8 D_SEL 6 7 + 4.7uF TIO REFB PD R3 6 HLMP-ED80 TCLK 16 1 51K ROCSB 4 VSS 11 9 X1 18 4.7uF PORT ROSCA X2 17 VDD VDD GND 14 R_BIN GND 0.1uF 8 10 12 V3.3 VDD 12K 100K 10uF + 1 0.1uF L 14 M 5 Q1 1.5K 2 IR_C 3904 R 9 OSCI 10 OSCO 6M 20P 20P :R3 GND FOR 800DPI,FLOATING FOR 400DPI。 NOTE ◆eKM8022B_ Photo Z/4 Application For e OM01 (ADNS2051 Compatible) 100uF + 0.1uF ELAN SERSOR_1 eKM8022B 13 10 12 VDD X2 VDD X1 14 CLK 13 DATA 8 VSS D+/CLK Y1 D-/DATA Y2 VSS VNN 4.7uF PORT + 9 D_SEL V3.3 100K VDD 1 Z1 Z2 L 10uF + 0.1uF 16 IR_C2 2 19 3 20 4 18 5 17 7 6 R 1 16 R3 15 11 X2 51K HLMP-ED80 9 X1 ROCSB Y1 XY_LED Y2 6 7 + TCLK 4.7uF TIO REFB PD GND 3 14 R_BIN GND 0.1uF 8 10 12 4 12K 15 M IR_C ROSCA REFA R4 1.5K 5 VDD Q1 2 3904 10 OSCI OSCO 11 V3.3 6M 20P 20P Z1 6 1 5 2 Z2 1K IR_C2 4 :R3 GND FOR 800DPI,FLOATING FOR 400DPI;R4 GND AND L KEY PULL HIGH 100K FOR MTP。 NOTE 10 2003/12/5 eKM8022 Preliminary USB & PS/2 Mouse Controller ◆eKM8022A_Mechanical Z/2 Application For OM01 (HDNS2000 Compatible) 100uF + 0.1uF ELAN SENSOR 13 14 eKM8022A 10 X2 11 VDD 2 3 X1 13 CLK 12 DATA 18 4 D+/CLK Y1 16 D-/DATA Y2 15 R_BIN 11 ROSCA HLMP-ED80 51K X2 17 VDD 68 VDD 5 X1 ROSCB Y1 XY_LED Y2 REFA 9 Q1 6 3904 7 + 7 VSS 4.7uF VSS 1 TCLK 4.7uF PORT + 16 1 2 1 2 Z-AXIS VDD 3 Z1 4 15 Z2 GND PD GND 10 12 6 D_SEL 8 REFB TIO 0.1uF 8 V3.3 R3 10uF 100K + 1 0.1uF L 14 M 5 Q1 1.5K 2 IR_C 3904 R 9 10 OSCO OSCI 6M 20P 20P :R3 GND FOR 800DPI,FLOATING FOR 400DPI。 NOTE ◆eKM8022B_ Photo Z/4 Application For OM01 (HDNS2000 Compatible) 100uF + 0.1uF ELAN SENSOR_1 13 14 eKM8022B 10 12 VDD X2 VDD X1 14 CLK 13 DATA 2 19 3 20 4 D+/CLK Y1 18 D-/DATA Y2 17 5 68 VDD R_BIN ROSCA 11 HLMP-ED80 51K X2 X1 ROSCB Y1 XY_LED Y2 REFA 9 Q1 6 7 3904 + 8 VSS 4.7uF VSS 4.7uF PORT VNN + 9 D_SEL V3.3 VDD 10uF + 100K 1 0.1uF 16 Z1 L Z2 IR_C2 10 6 1 16 R3 15 TCLK REFB TIO GND PD GND 0.1uF 8 10 12 3 4 15 1.5K M IR_C 5 7 R4 Q1 2 3904 R OSCI OSCO V3.3 11 6M Z1 20P 6 1 20P 5 2 Z2 1K IR_C2 4 :R3 GND FOR 800DPI,FLOATING FOR 400DPI;R4 GND AND L KEY PULL HIGH 100K FOR MTP。 NOTE 11 2003/12/5 eKM8022 Preliminary USB & PS/2 Mouse Controller ◆eKM8022A_Mechanical Z/2 Application For HDNS2000 4.7uF HDNS-2000 0.1uF + 13 14 eKM8022A VDD NRESET VDD OSC_OUT 15 11 HLMP-ED80 18M 10 X2 11 VDD VDD X1 13 CLK D+/CLK 12 DATA Y1 D-/DATA Y2 17 2 18 3 16 4 15 5 8 7 XA OSC_IN Q1 YB XY_LED YA SCLK 7 VSS VSS V3.3 V3.3 VDD 10uF Z1 Z2 0.1uF 1 3 1 2 4 1 2 8 GND REFB GND 6 3904 1 16 10 12 Z-AXIS L + 14 4.7uF M 5 R3 SDIO 2.2uF 100K + VDD3 0.1uF + PORT 9 XB 2 IR_C 6 Q1 1.5K R 3904 D_SEL 9 OSCI 10 OSCO 6M 20P 20P :R3 GND FOR 800DPI,FLOATING FOR 400DPI。 NOTE ◆eKM8022B_ Photo Z/4 Application For HDNS2000 4.7uF + HDNS-2000_1 0.1uF 13 14 eKM8022B VDD NRESET VDD OSC_OUT 15 11 HLMP-ED80 18M 10 12 VDD X2 VDD X1 14 CLK 13 DATA D+/CLK Y1 D-/DATA Y2 19 2 20 3 18 4 17 5 9 7 XA OSC_IN Q1 YB XY_LED YA SCLK 8 VSS V3.3 VSS V3.3 + 4.7uF PORT 8 1 L 10uF 16 + 0.1uF 5 R3 R4 6 7 10 SDIO GND 2.2uF 100K VDD VDD3 0.1uF + Z1 M Z2 R IR_C2 REFB GND IR_C VNN 6 3904 1 16 10 12 3 4 15 1.5K D_SEL 9 XB Q1 2 3904 OSCI OSCO 11 V3.3 6M 20P 20P Z1 6 1 5 2 Z2 1K IR_C2 4 :R3 GND FOR 800DPI,FLOATING FOR 400DPI;R4 GND AND L KEY PULL HIGH 100K FOR MTP。 NOTE 12 2003/12/5 eKM8022 Preliminary USB & PS/2 Mouse Controller ◆eKM8022A_Mechanical Z/2 Application For ADNS 2051 4.7uF + ADNS-2051 0.1uF eKM8022A 13 10 11 VDD X2 VDD X1 13 CLK 12 DATA D+/CLK Y1 D-/DATA Y2 17 2 18 3 16 4 15 5 V3.3 VSS VSS + 8 1 2 1 VDD 2 3 4 L V3.3 M Z1 R D_SEL Z-AXIS 10uF 1 1 14 16 6 11 18M XA XB OSC_IN YB XY_LED YA REFA HLMP-ED80 9 6 7 R_BIN + R1 5 Z2 OSC_OUT 2.2uF 100K 4.7uF PORT 14 VDD 15 REFB SCLK GND SDIO GND 0.1uF 8 10 12 PD R3 + 0.1uF IR_C 2 Q1 1.5K 3904 9 OSCI OSCO 10 6M 20P 20P :R3 GND FOR 800DPI,FLOATING FOR 400DPI。 NOTE ◆eKM8022B_ Photo Z/4 Application For ADNS 2051 4.7uF + ADNS-2051 0.1uF eKM8022B 13 10 12 VDD X2 VDD X1 14 CLK 13 DATA D+/CLK Y1 D-/DATA Y2 19 2 20 3 18 4 17 5 14 8 VSS VDD OSC_OUT 11 18M XA XB OSC_IN YB XY_LED YA REFA 6 7 R_BIN + VSS 2.2uF 4.7uF PORT R1 REFB + 9 V3.3 Z1 V3.3 Z2 3 1 16 4 15 100K VDD 1 10uF + 16 0.1uF 5 R4 R3 7 6 10 HLMP-ED80 9 IR_C2 15 SCLK GND SDIO GND 0.1uF 8 10 12 PD L M 1.5K IR_C R Q1 2 3904 VNN V3.3 D_SEL OSCI OSCO 6M 20P 11 Z1 20P 6 1 5 2 1K IR_C2 4 :R3 GND FOR 800DPI,FLOATING FOR 400DPI;R4 GND AND L KEY PULL HIGH 100K FOR MTP。 Z2 NOTE 13 2003/12/5 eKM8022 Preliminary USB & PS/2 Mouse Controller ◆eKM8022A_Mechanical Z/2 Application For PAN101BOI(PixArt) 300K 300K 300K 300K eKM8022A PAN101BOI R1 10 11 VDD X2 VDD X1 13 CLK 12 DATA D+/CLK Y1 D-/DATA Y2 17 12 18 14 16 17 15 15 13 7 VSS VSS V3.3 16 4.7uF PORT + 7 1 2 3 1 2 4 Z-AXIS 8 VDD Z1 6 8 D_SEL Z2 9 R3 V3.3 4.7uF 0.1uF 10uF 10 11 + 1 0.1uF 14 5 9 1uF L M IR_C OSCI OSCO XB SDIO YB PD YA LED NC OSCOUT 18 19 20 HLMP-ED80 2 3 NC 18M VDD OSCIN VDD VSS_LED VRB VRT VSSA 4 1 5 6 VAY Q1 1.5K R SCLK VSSD 0.1uF 100K XA 2 10 3904 6M 20P 20P :R3 GND FOR 800DPI,FLOATING FOR 400DPI。 NOTE ◆eKM8022B_ Photo Z/4 Application For PAN101BOI(PixArt) 300K 300K 300K 300K eKM8022B PAN101BOI_1 R1 10 12 VDD X2 VDD X1 14 CLK 13 DATA 8 VSS D+/CLK Y1 D-/DATA Y2 D_SEL VSS 4.7uF PORT 19 12 20 14 18 17 17 15 6 R3 7 R4 13 V3.3 16 7 + VNN 9 V3.3 8 9 100K VDD 1 Z1 L 10uF + 0.1uF 16 Z2 M IR_C2 5 3 4.7uF 10 4 11 1uF 15 SCLK XB SDIO YB PD YA LED NC OSCOUT 18 19 20 HLMP-ED80 2 3 NC 18M VDD OSCIN VDD VSS_LED VRB VSSD 0.1uF VRT VSSA 4 1 5 6 VAY Q1 1.5K 2 R 0.1uF XA IR_C 10 OSCI OSCO 3904 11 V3.3 6M 20P 20P Z1 6 1 5 2 Z2 1K IR_C2 4 :R3 GND FOR 800DPI,FLOATING FOR 400DPI;R4 GND AND L KEY PULL HIGH 100K FOR MTP。 NOTE 14 2003/12/5