eKM8021
Preliminary USB & PS/2 Mouse Controller
This specification may change with out further notice. 1
SPECIFICATION
1. General Description
The EKM8021 is an Mouse Controller designed to control both USB & PS/2 Mouse device.
This Mouse Controller can auto detect USB or PS/2 mode, and supports X,Y,Z three axes , and
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, Z/2 Photo, and Z/4 Photo(eKM8021B) Z-axis input type.
Support Agilent HDNS-2000 Optical Mouse Sensor.
Applications
3D, 3 Buttons USB and PS/2 Combo Mouse.
eKM8021
Preliminary USB & PS/2 Mouse Controller
This specification may change with out further notice. 2
3. Applications
USB & PS/2 3D 3Key Mouse
USB & PS/2 3D 3Key Optical Mouse
4. Pin Configuration
Z1 1 18 X1
Z2 2 17 X2
L Key 3 16 Y1
R Key 4 15 Y2
M Key 5 14 IR_C
VSS 6 13 D+/CLK
VSS 7 12 D-/Data
V3.3 8 11 VDD
OSCI 9 10 OSCO
eKM8021A (18-Pin)
Z1 1 18 X1
Z2 2 17 X2
L Key 3 16 Y1
R Key 4 15 Y2
M Key 5 14 IR_C
Z_SEL 6 13 D+/CLK
VSS 7 12 D-/Data
V3.3 8 11 VDD
OSCI 9 10 OSCO
eKM8021B (18-Pin)
eKM8021
Preliminary USB & PS/2 Mouse Controller
This specification may change with out further notice. 3
5. Pin Description
Symbol I/O Pin Function
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 volta
g
e output from internal re
g
ulator. This pin has to b
e
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
1 Z axis Input 1
Z2 I
2 Z axis Input 2
R I
4 Right Key Input
M I
5 Middle Key Input
L I 3 Left Key Input
IR_C I/O 14 IR Control Pin.
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 - 6,7 GND. EKM8021A Type both two pin should tired to GND
Z_SEL I 6
Z/2 : FloatingZ/4: Ground This function onl
y
support b
y
eKM8021B
eKM8021
Preliminary USB & PS/2 Mouse Controller
This specification may change with out further notice. 4
6. Function Description
X
Y
Z
DETECT
CIRCUIT
X-COUNTER
Y-COUNTER
Z-COUNTER
MODE
SELECTOR
DATA
I/O D+/CLK
D-/DATA
BTM REGISTER
L M R
X1
X2
Y1
Y2
Z1
Z2
LMR
DATA
PROCESS
MULTIPLEXER
USB PROTOCOL
CONTROLLER
PS/2 PROTOCOL
CONTROLLER
IR_C
IR_C
Fig-1 : Function block
6.1 PS/2 Mouse Function Description
PS/2 Mouse Commands Description
Hex Code Command EKM8021 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
eKM8021
Preliminary USB & PS/2 Mouse Controller
This specification may change with out further notice. 5
Microsoft PS/2 scrolling mouse
(A) Entering procedure: Except in WRAP mode, while eKM8021 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 Description
1 0 Left button status; 1 = pressed
1 Right buton status; 1 = pressed
2 Middle button status; 1 = pressed
3 Reserve
4 X data sign; 1 = negative
5 Y data sign; 1 = negative
6 X data overflow; 1 = overflow
7 Y data overflow; 1 = overflow
2 0-7 X data (D0-D7)
3 0-7 Y data (D0-D7)
4 0-7 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.
eKM8021
Preliminary USB & PS/2 Mouse Controller
This specification may change with out further notice. 6
6.2 USB Mouse Function Description
Each Descriptor in USB Mode.
Descriptor Type Byte1 Byte2 Byte3 Byte4 Byte5 Byte6 Byte7 Byte8
12 01 10 01 00 00 00 08
67 12 02 00 01 00 01 02
Device Descriptor 00 01
09 02 22 00 01 01 00 A0
Configuration Descriptor 32
09 04 00 00 01 03 01 02
Interface Descriptor 00
09 21 10 01 00 01 22 48
HID Descriptor 00
Endpoint 07 05 81 03 04 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
HID Report Descriptor
01 B1 22 95 07 B1 01 C0
USB Mouse Report Data Type
Bit7 Bit6 Bit5 Bit4 Bit3 Bit2 Bit1 Bit0
Byte0 0 0 0 0 0 M R L
Bit7 Bit6 Bit5 Bit4 Bit3 Bit2 Bit1 Bit0
Byte1 X-AXIS
Bit7 Bit6 Bit5 Bit4 Bit3 Bit2 Bit1 Bit0
Byte2 Y-AXIS
Bit7 Bit6 Bit5 Bit4 Bit3 Bit2 Bit1 Bit0
Byte3 Z-AXIS
eKM8021
Preliminary USB & PS/2 Mouse Controller
This specification may change with out further notice. 7
7. ABSOLUTE MAXIMUM RATINGS
Symbol min Max unit
Temperature under bias 0 70 ºC
Storage temperature -65 150 ºC
Input voltage -0.5 6.0 V
Output voltage -0.5 6.0 V
8. DC ELECTRICAL CHARACTERISTICS
Symbol Parameter Condition Min Type Max Unit
3.3V Regulator
VRag Output voltage of 3.3v Regulator VDD = 4.2V ~ 5.2V 3.0 3.3 3.6 V
VResetL Low Power Reset detecting low Voltage - 2.3 V
VResetH Low Power Reset detecting high Voltage 2.4 - V
MCU operating
IIL Input Leakage Current for input pins VIN=VDD,VSS - - 1
μA
VIHX Clock Input High Voltage OSCI 2.5 - - V
VILX Clock Input Low Voltage OSCI - - 1.0 V
GPIO Pins
VHL High/Low level transfer point Input 1.1 - V
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 The input pin with
internal pull-high resistor
is connected to VSS - 25 -
μA
IPL Input current with pull-low resister The input pin with
internal pull-low resistor
is connected to V3.3. - 330 -
μA
USB Interface
VOH Static Output High 2.8 - 3.6 V
VOL Static Output Low - - 0.3 V
VDI Differential Input Sensitivity 0.2 - - V
VCM Dif f erential Input Command Mode Range
USB operation Mode
0.8 - 2.5 V
VSE Single Ended Receiver Threshold 0.8 - 2.0 V
CIN Transceiver Capacitance - - 20 pF
VRG Output Voltage of Internal Regulator 3.0 - 3.6 V
RPH Internal Pull-high Resistor
(USB Spec 5%)
USB operation Mode
-20% 1.5 +20% kΩ
eKM8021
Preliminary USB & PS/2 Mouse Controller
This specification may change with out further notice. 8
9. AC ELECTRICAL CHARACTERISTICS
Parameter Sym. Min. Typ. Max. Unit
Time from DATA transition to falling edge of CLK T1 5 25 µS
Time from rising edge of CLK to DATA transition T2 5 T4 - 5 µS
Duration of CLK inactive T3 30 40 50 µS
Duration of CLK active T4 30 40 50 µS
Time to auxiliary device inhibit after clock 11 to ensure
the auxiliary device does not start another transmission T5 50
µS
Time from inactive to active CLK transition, used to time
when auxiliary device samples DATA T6 5 25
µS
System clock FCLK 1.843 MHz
Watchdog (Ta=0to25, VDD=5V, VSS=0V) Twdt 500Us
~
16Ms
eKM8021
Preliminary USB & PS/2 Mouse Controller
This specification may change with out further notice. 9
10. PS/2 TIMING DIAGRAMS
Fig 1. PS/2output data timings
Fig 2. PS/2 input data timings
eKM8021
Preliminary USB & PS/2 Mouse Controller
This specification may change with out further notice. 10
11. APPLICATION CIRCUIT
X-AXIS
1
2
6
5
4
eKM8021A
OSCO
OSCI
X1
X2
Y1
Y2
Z1
Z2
LED
L
M
R
VDD
VSS
VSS
V3.3
D+/CLK
D-/DATA
50K
20P
V3.3
12
+
4.7uF
CON
VDD
D+/CLK
D-/DATA
VSS
+
10uF
0.1uF
20P
VDD
12
Z-AXIS
6M
Y-AXIS
1
2
6
5
4
1K
V3.3
eKM8021A_Mechanical_Z/2 Application
eKM8021
Preliminary USB & PS/2 Mouse Controller
This specification may change with out further notice. 11
eKM8021A_Z/2
OSCO
OSCI
X1
X2
Y1
Y2
Z1
Z2
LED
L
M
R
VDD
VSS
VSS
V3.3
D+/CLK
D-/DATA
50K
+
10uF
CON
VDD
D+/CLK
D-/DATA
VSS
Z-AXIS
VDD
1K
20P
1
2
6
5
4
6M
+
4.7uF
20P
2K
0.1uF
Y-AXIS
1
2
6
5
4
V3.3
X-AXIS
1
2
6
5
4
V3.3
eKM8021A_Photo_Z/2 Application
eKM8021
Preliminary USB & PS/2 Mouse Controller
This specification may change with out further notice. 12
20P
1K
V3.3
12
V3.3
VDD
0.1uF
20P
eKM8021B
OSCO
OSCI
X1
X2
Y1
Y2
Z1
Z2
LED
L
M
R
VDD
VSS
Z_SEL
V3.3
D+/CLK
D-/DATA
6M
12
Z-AXIS
+
4.7uF
CON
VDD
D+/CLK
D-/DATA
VSS
Y-AXIS
1
2
6
5
4
X-AXIS
1
2
6
5
4
+
10uF
eKM8021B_Mechanical_Z/2 Application
eKM8021
Preliminary USB & PS/2 Mouse Controller
This specification may change with out further notice. 13
20P
CON
VDD
D+/CLK
D-/DATA
VSS
2K
+
10uF
X-AXIS
1
2
6
5
4
20P
V3.3
1
2
6
5
4
6M
+
4.7uF Y-AXIS
1
2
6
5
4
V3.3
eKM8021B_Z/2
OSCO
OSCI
X1
X2
Y1
Y2
Z1
Z2
LED
L
M
R
VDD
VSS
Z_SEL
V3.3
D+/CLK
D-/DATA
1K
0.1uF
Z-AXIS
VDD
eKM8021B_Photo_Z/2 Application
eKM8021
Preliminary USB & PS/2 Mouse Controller
This specification may change with out further notice. 14
X-AXIS
1
2
6
5
4
+
10uF
CON
VDD
D+/CLK
D-/DATA
VSS
V3.3
V3.3
2K
Z-AXIS
20P
VDD
0.1uF
eKM8021B_Z/4
OSCO
OSCI
X1
X2
Y1
Y2
Z1
Z2
LED
L
M
R
VDD
VSS
Z_SEL
V3.3
D+/CLK
D-/DATA
1
2
6
5
4
Y-AXIS
1
2
6
5
4
6M
1K
+
4.7uF
20P
eKM8021B_Photo_Z/4 Application
eKM8021
Preliminary USB & PS/2 Mouse Controller
15 This specification may change with out further notice.
© 2002 ELAN Microelectronics Corporation
All Rights Reserved
Printed in Taiwan, ROC, 09/2002
The contents of this specification are subject to change without notice. ELAN Microelectronics assumes no
responsibility for errors that may appear in this specification. ELAN Microelectronics makes no commitment
to update, or to keep current, the information contained in this specification. The products described herein
are not intended for use in life support appliances, devices, or systems. Use of ELAN Microelectronics
products in such applications are not supported and is prohibited.
NO PAR T OF THIS SPECIFICATION MAY BE REPRODUCED OR TRANSMITTED IN ANY FORM OR BY
ANY MEANS WITHOUT THE EXPRESS WRITTEN PERMISSION OF ELAN MICROELECTRONICS.
ELAN MICROELECTRONICS CORPORATION
Headquarters:
No. 12, Innovation Road 1,
Science-based Industrial Park,
Hsinchu, Taiwan, R.O.C.
Tel: +886 3 5639977
Fax: +886 3 5639966
http://www.emc.com.tw
Hong Kong Office:
Rm. 1005B, 10/F Empire Centre
68 Mody Road, Tsimshatsui
Kowloon , HONG KONG
Tel: +852 2838-8715
Fax: +852 2838-0497