EM84510 PS/2 SCROLLING MOUSE CONTROLLER GENERAL DESCRIPTION The EM84510 Scrolling Mouse Controller is specially designed to control PS/2 mouse device. This single chip can interface three key-switches four photo-couples plus z-axis direct to 8042 controller. EM84510 can receive command and echo status or data format which are compatible with IBM PS/2 mode mouse. Key debouncing circuit is provided to prevent false entry and improve the accuracy. In the traditional mouse, a great number of noises are generated when the grid is partially closed or opened. These noises are usually mistaken for movement signals by traditional mouse controller and the cursor of the dispaly screen is thus moved frequently up and down or back and forth. This will consume a great amount of energy. The EM84510 mouse controller provides noise immunity circuits to eliminat these noise in order to reduce energy consumption. FEATURES • • • • • • • • • • • • Using 51k ±5% resistor for RC oscillation. Compatible with legacy PS/2 mouse. Compatible with Microsoft scrolling mouse. Built-in noise immunity circuit. Built-in current comparator for photo-couples input. Built-in three step dynamic input impedance. Three key-switches and four photo-couples inputs. Six types Z direction input: 1. Photo couples input. (Z/1) 4. Mechanical input. (Z/1) 2. Key-switches input. 5. Photo couples input. (Z/4) 3. Voltage-sensing input. 6. Mechanical input. (Z/2) Both key-press and key-release debounce interval 12 ms. The sampilng rate of motion detector is about 65KHz. Low power dissipation. Package type: EM84510AP : 16DIP, Photo couples input. (Z/1) EM84510DP: 16DIP, Mechanical input. (Z/1) EM84510BP : 16DIP, Key-switches input. EM84510EP : 16DIP, Photo couples input. (Z/4) EM84510CP : 16DIP, Voltage-sensing input. EM84510FP : 16DIP, Mechanical input. (Z/2) PIN ASSIGNMENT EM84510A/B/C/D/E/FP VDD OSC.OUT Z1 Z2 CLK DATA OPT VSS 1 2 3 4 5 6 7 8 * This specification are subject to be changed without notice. 16 15 14 13 12 11 10 9 OSCR Y2 Y1 X2 X1 L M R 5.30.2001 1 EM84510 PS/2 SCROLLING MOUSE CONTROLLER FUNCTIONAL BLOCK DIAGRAM THREE TYPES SELECTOR Z1 Z2 COMPARATOR VOLTAGE SENSOR KEY-SWITCH DETECTOR DATA CLK Z-AXIS COUNTER C O M P A R A T O R OPT X1 X2 Y1 Y2 L M R D ME O T T E I C O T NO COUNTER DATA I/O MULTIPLEXER R D E B O U N C E COMMON STATUS TIMING CONTROLLER SYSTEM CLOCK GENERATOR OSCR OSC.OUT RC OSCILLATION PIN DESCRIPTIONS Symbol I/O OPT I/O OSC.OUT OSCR CLK DATA R/M/L O I I/O I/O I X1 X2 Y1 Y2 Z1 Z2 VSS VDD I Function INPUT: 200kohm pull low to VSS. When OPT is connected to VDD, EM84510 will enter test mode. In test mode, L will be the output of X1,while M will be the output of X2. Toggling R key can change these output to be Y1,Y2 or Z1,Z2 respectively. OUTPUT: 2kHz Z-axis LED driving source. "1"= VDD, "0"= floating High duty is about 60us. RC mode oscillation with 51kohm resistor. Connect to 8042 auxiliary port CLK line. Connect to 8042 auxiliary port DATA line. Three key-switches inputs. 200kohm resistor pull low. Three step dynamic input impedance. Use current comparator to measure photo-couples "ON" ,or "OFF". Z-axis inputs. Photo mode: Three step dynamic input impedance. Current comparator input. Key mode: 200kohm resistor pull low. 7 levels increased by "M" key. Voltage mode: 200kohm resistor pull low. 7 levels voltage comparator. Mechanical mode : 13.2kohm resistor pull low. Negative power. Power line. * This specification are subject to be changed without notice. 5.30.2001 2 EM84510 PS/2 SCROLLING MOUSE CONTROLLER FUNCTION DESCRIPTIONS Legacy PS/2 mouse operating: (A) Operating mode There are four operating modes in PS/2 mouse: 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 2 dot/count disable b. Stream Mode: The maximum rate of transfer is the programmed sample rate. Data report is transmitted if (a) switch is pressed (b) movement has been detect 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 EM84510. B). PS/2 Mouse Data Report: i). In stream mode: A data report is sent at the end of a sample interval. ii). In remote mode: A data report is sent in response to Read Data command. iii). Data report format: Byte 1 2 3 Bit 0 1 2 3 4 5 6 7 0-7 0-7 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 ) * This specification are subject to be changed without notice. 5.30.2001 3 EM84510 PS/2 SCROLLING MOUSE CONTROLLER C) PS/2 mouse Data Transmission: i). EM84510 generates the clocking signal when sending data to and receiving data from the system. ii). The system requests EM84510 receive system data output by forcing the DATA line to an inactive level and allowing CLK line to go to an active level. iii). Data transmission frame: Bit 1 2-9 10 11 Function Start bit ( always 0 ) Data bits ( D0 - D7 ) Parity bit ( odd parity ) Stop bit ( always 1 ) iv). Data Output ( data from EM84510 to system ): If CLK is low ( inhibit status ) , data is no transmission. If CLK is high and DATA is low ( request-to-send ), data is updated. Data is received from the system and no transmission are started by EM84510 until CLK and DATA 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, EM84510 check for line contention by checking for an inactive level on CLK at intervals not to exceed 100u sec. Contention occurs when the system lowers CLK to inhibit EM84510 output after EM84510 has started a transmission. If this occurs before the rising edge of the tenth clock, EM84510 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 complete. Following a transmission, the system inhibits EM84510 by holding CLK low until it can service the input or until the system receives a request to send a response from EM84510. v). Data Input ( from system to EM84510 ): System first check if EM84510 is transmitting data. If EM84510 is transmitting, the system can override the output forcing CLK to an inactive level prior to the tenth clock. If EM84510 transmission is beyond the tenth clock, the system receives the data. If EM84510 is not transmitting or if the system choose to override the output, the system force CLK to an inactive level for a period of not less than 100µ sec while preparing for output. When the system is ready to output start bit (0), it allows CLK go to active level. If request-to-send is detected, EM84510 clocks 11 bits. Following the tenth clock EM84510 checks for an active level on the DATA line, and if found, force DATA low , and clock once more. If occurs framing error, EM84510 continue to clock until DATA is high, then clocks the line control bit and request a Resend. When the system sends out a command or data transmission that requires a response, the system waits for EM84510 to response before sending its next output. D). PS/2 Mouse Error Handling: i). A Resend command ( FE ) following receipt of an invalid input or any input with incorrect parity. ii). If two invalid input are received in succession, an error code of hex FC send to the system. * This specification are subject to be changed without notice. 5.30.2001 4 EM84510 PS/2 SCROLLING MOUSE CONTROLLER iii). The counter accumulators are cleared after receiving any command except “Resend”. iv). EM84510 receives a Resend command ( FE ), it transmit its last packet of data. v). In the stream mode “Resend” is received by EM84510 following a 3-byte data packet transmission to the system. EM84510 resend the 3-byte data packet prior to clearing the counter. vi). A response is sent within 25 ms if a). The system requires a response b). An error is detected in the transmission vii). When a command requiring a response is issued by the system ,another command should not be issue until either the response is received or 25ms has passed. E). PS/2 Mouse Commands Description: There are 16 valid commands that transmits between the system and EM84510. The “FA” code is always the first response to any valid input received from the system other than a Set Wrap Mode or Resend command. The following table list the commands: Hex Code FF FE F6 F5 F4 F3,XX F2 F0 EE EC EB EA E9 E8,XX E7 E6 Command Reset Resend Set Default Disable Enable Set Sampling Rate Read Device Type Set Remote Mode Set Wrap Mode Reset Wrap Mode Read Data Set Stream Mode Status Request Set Resolution Set Autospeed Reset Autospeed EM84510 echo code FA,AA,00 XX,(XX,XX) FA FA FA FA,FA FA,00 FA FA FA FA,XX,XX,XX FA FA,XX,XX,XX FA,FA FA FA The following describes valid commands: a). Reset ( FF ) EM84510 operation: i). Completion the reset. ii). Transmitted FA,AA,00 to the system. iii). Set default: sampling rate: 100 reports/s non-autospeed * This specification are subject to be changed without notice. 5.30.2001 5 EM84510 PS/2 SCROLLING MOUSE CONTROLLER stream mode 2 dots/count disable b). Resend ( FE ) i). Any time EM84510 receives an invalid command, it returns a Resend command to the system. ii). When EM84510 receives a Resend command, it retransmits its last packet of data. If the last packet was a Resend command, it transmits the packet just prior to the Resend command. iii). In stream mode, if a Resend command is received by EM84510 immediately following a 3-byte data packet transmission to the system. 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 stop transmissions from EM84510. e). Enable ( F4 ) Begins 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 in following: Second byte XX 0A 14 28 3C 50 64 C8 Sample Rate 10/sec 20/sec 40/sec 60/sec 80/sec 100/sec 200/sec g). Read Device Type ( F2 ) EM84510 always echoes “ FA,00 “ following this command. 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 ) EM84510 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 since the last report or the button status is unchanged. Following a Read Data command, the registers are cleared after a data transmission. * This specification are subject to be changed without notice. 5.30.2001 6 EM84510 PS/2 SCROLLING MOUSE CONTROLLER l). Set Stream Mode ( EA ) This command sets EM84510 in stream mode. m). Status Request ( E9 ) When this command is issued by the system, EM84510 respond with a 3-byte status report as follows: Byte 1 2 3 Bit 0 1 2 3 4 5 6 7 0-7 0-7 Description 1 = Right button pressed 1 = Middle button pressed 1 = Left button pressed Reserved 0 = Normal speed, 1 = Autospeed 0 = Disabled, 1 = Enabled 0 = Stream mode, 1 = Remote mode Reserved Current resolution setting ( D0 - D7 ) Current sampling rate ( D0 - D7 ) n). Set Resolution ( E8,XX ) EM84510 provides four resolutions selected by the second byte of this command as follows: Second Byte XX 00 01 02 03 Resolution 8 dot/count 4 dot/count 2 dot/count 1 dot/count 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 follows: Input 0 1 2 3 4 5 N(≥6 ) Ouput 0 1 1 3 6 9 2.0*N p). Reset Autospeed ( E6 ) This command restore normal speed. * This specification are subject to be changed without notice. 5.30.2001 7 EM84510 PS/2 SCROLLING MOUSE CONTROLLER Microsoft PS/2 scrolling mouse mode: (A) Entering procedure: Except in WRAP mode, while EM84510 received the following consecutive command. i. F3 C8 ii. F3 64 iii. F3 50 ---- set sampling rate 200/sec ---- set sampling rate 100/sec ---- 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 1 2 3 4 Bit 0 1 2 3 4 5 6 7 0-7 0-7 0-7 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 (a) Photo couples input : Z-axis counter accumulates the Z1, Z2 phase changed by movement. This mode includes noise immunity. Z/1 : 1 dot per count. Z/4 : 4 dots per count. Counted by Z1=1, Z2=1 phase, the wheel should stay at Z1=0, Z2=0 phase. (b) Key-switches input : Pressing Z1, Z2 will start to fill the Z-axis counter with the value beginning at one. Toggling "M" key can increase the value any time by one. The limit value is ±7. The relationship between the value and the transmission rate as follows : * This specification are subject to be changed without notice. 5.30.2001 8 EM84510 PS/2 SCROLLING MOUSE CONTROLLER Value 1 2 3 4 5 6 7 Rate per second 2.7 6.4 9.2 12.8 15 18 20 (c) Voltage-sensing mode : There are 7 voltage levels in Z1, Z2 input. The transmission table is the same as key-switches mode. The relationship between the value of Z-axis counter and the voltage as folllows : Value 0 1 2 3 4 5 6 7 Under VDD=5V condition. Voltage 1V↓ 1.0V-1.6V 1.6V-2.2V 2.2V-2.8V 2.8V-3.4V 3.4V-4.0V 4.0V-4.6V 4.6V↑ (d) Mechanical mode : The function is the same as photo couples input mode, except there is no noise immunity. Z/1 : 1 dot per count. Z/2 : 2 dot per count. Counted by Z2 changing phase. * This specification are subject to be changed without notice. 5.30.2001 9 EM84510 PS/2 SCROLLING MOUSE CONTROLLER ABSOLUTE MAXIMUM RATINGS Parameter Temperature under bias Storage temperature range Input voltage Output voltage Sym. TOPR TSTR VIN VO Ratings 0~70 -65~150 -0.3~6.0 -0.3~6.0 Unit °C °C V V DC ELECTRICAL CHARACTERISTICS (TA=25°C to 70°C) Parameters Sym. Min. Typ. Max. VDD 4.5 5 5.5 V IOp IPL 60 - 1.2 - mA µA IPh - - 110 µA X1,X2,Y1,Y2,Z1,Z2 (photo mode) VPI 0.8 - 1.2 V input current (input impedance) (80µA) X1,X2,Y1,Y2,Z1,Z2 (photo mode) input current (input impedance) (500µA) VPI 1.5 - 2.8 V CLK, DATA postive-going threshold voltage Vt+ 0.6VDD - 0.8VDD V CLK, DATA negative-going threshold voltage L,M,R,OPT,Z1,Z2 (key mode) input low voltage L,M,R,OPT,Z1,Z2 (key mode) input high voltage L,M,R,Z1,Z2 (key & voltage mode) input resistor (Vin=VDD) OPT input resistor (Vin=VDD) DATA, CLK input current (pull up resistor) (Vin=0V ) DATA,CLK low output voltage (Iprl=-4mA) L,M,R,X1,X2,Y1,Y2,Z1,Z2, OPT input leakage current (Vin=0V) OPT high output current VDD=4.5V (Iopt=10mA) VDD=5V VDD=5.5V Vt - 0.2VDD - 0.4VDD V Vail Vaih Rmi 0.7VDD 92 - 0.3VDD 310 V V KΩ Rxi Idc 133 0.56 - 400 1.86 KΩ mA Vprl Iil 0 - 0.4 -1.0 V µA Idc 3.2 4.5 5.5 - - V Operating voltage Operating current X1,X2,Y1,Y2,Z1,Z2 (photo mode) low input reference current X1,X2,Y1,Y2,Z1,Z2 (photo mode) high input reference current (no load) * This specification are subject to be changed without notice. Unit 5.30.2001 10 EM84510 PS/2 SCROLLING MOUSE CONTROLLER * All voltages in above table are compared with VSS. * All parameters in above table are tested under VDD=5V. * CLK & DATA output gates are open drains that connect to pull up resistors. * X1, X2,Y1,Y2 Input Impedance MAX. 16.0K 15.0K 14.0K TYP. 13.0K 12.0K MIN. 11.0K 10.0.K 9.0K 8.0K 7.0K 6.0K 5.0K 4.0K 3.0K 2.0K 1.0K 0 1.0 10.0M * This specification are subject to be changed without notice. 2.0 3.0 4.0 5.0 VOLTS (LIN) 5.30.2001 11 EM84510 PS/2 SCROLLING MOUSE CONTROLLER AC ELECTRICAL CHARACTERISTICS (TA=0°C to 70°C) Parameters Oscillating Frequency (OSCR=51KΩ) Key Debounce Rising Edge Crossed Width Fosc=35 KHz Falling Edge Crossed Width Fosc=35 KHz Mouse CLK Active Time Mouse CLK Inactive Time Mouse Sample DATA from CLK rising Edge System CLK Active Time System CLK Inactive Time Time from DATA Transition to Falling Edge of CLK Time from rising Edge of CLK to DATA Transition Time to mouse Inhibit after the 11th CLK to ensure mouse does not start another Transmission Sym. Min. Typ. Max. Fosc Tkd Tr Tf Tmca Tmci Tmdc 37.5-10% 14.6 14.6 - 37.5 12 40 40 13.3 37.5+10% - Tsca Tsci Tsdc Tscd Tpi 0 40 40 13.3 26.7 - 50 Unit KHz ms us us us us us us us us us us PS. The AC timings are measured under using 35 KHz system clock signal. TIMING DIAGRAM (1) Photo-couples pulse width : X1 (Y1) X2 (Y2) Tf Tr (2) PS/2 Mouse (A) Receiving DATA 1st CLK Inhibit 2nd CLK 9th CLK 10th CLK 11th CLK CLK > > < Tmca < > ••••• < Tmci Tmdc DATA Start Bit ••••••••• Bit0 -Bit7 ••• ••••• Parity Bit * This specification are subject to be changed without notice. Stop Bit Line Control Bit •• 5.30.2001 12 EM84510 PS/2 SCROLLING MOUSE CONTROLLER (B) Sending DATA 1st CLK 2nd CLK 10th CLK 11th CLK CLK > < Tsci > < Tsdc > > ••••••••••• < > Tsca < < Tpi Tscd DATA ••••••••• Start Bit ••• ••••• Parity Bit Bit0 -Bit7 ••••••••• Stop Bit AC Timing point: DATA, CLK PIN VDD-2.6 VSS+0.4V 1.6V X1,X2,Y1,Y2 PIN VSS VDD-0.8V CLK,DATA PIN VSS+0.8V VDD L,M,R PIN VSS EM84510 I/O pin equivalent circuit : R,M,L : DATA : VCC (R,M,L) (R,M,L) INTERNAL SIGNAL VCC DATA PS2 MOUSE ENABLE DATA OUTPUT SIGNAL DATA INPUT SIGNAL CLK : X1,X2,Y1,Y2 : X1,X2,Y1,Y2 - VCC + PHASE DIGITAL SIGNAL VCC 13.2K 12.5K VDD VDD PS2 MOUSE ENABLE CLK CLK OUTPUT SIGNAL VDD 4 CLK INPUT SIGNAL + - 80µA 30K 51k * This specification are subject to be changed without notice. 13.2K 12.5K 5.30.2001 13 EM84510 PS/2 SCROLLING MOUSE CONTROLLER 9 EM84510A EM84510E R 10 M 11 L Z1 1 2 3 4 5 6 51K 8 V SS 16 OSCR OSC.OUT Z2 3 4 12 X1 7 OPT 2 13 X2 6 DATA 14 Y1 CLK 5 1 VDD Y2 15 R R 10µF APPLICATION CIRCUIT * This specification are subject to be changed without notice. 5.30.2001 14 9 1 2 3 4 5 6 51K 16 8 V SS OSCR OSC.OUT EM84510B R 10 M 11 L Z2 Z1 3 4 12 X1 7 OPT 2 13 X2 6 DATA 14 Y1 CLK 5 1 VDD Y2 15 R 10µF EM84510 PS/2 SCROLLING MOUSE CONTROLLER * This specification are subject to be changed without notice. 5.30.2001 15 9 8 V SS OSCR EM84510C R 10 L M 11 3 1 2 3 4 5 6 51K 16 Z2 OSC.OUT Z1 4 12 X1 7 OPT 2 13 X2 14 Y1 5 CLK 6 DATA 1 VDD Y2 15 R 10µF EM84510 PS/2 SCROLLING MOUSE CONTROLLER * This specification are subject to be changed without notice. 5.30.2001 16 * This specification are subject to be changed without notice. 1 5 1 2 3 4 5 6 VDD Y2 15 CLK Y1 14 6 DATA X2 7 OPT 2 X1 OSC.OUT 16 OSCR Z2 Z1 L 51K 8 V SS R EM84510D EM84510F 5.30.2001 * Mechanical Encoder 12 4 A * 3 B 10µF COM 11 10 9 R 17 EM84510 PS/2 SCROLLING MOUSE CONTROLLER M 13 EM84510 PS/2 SCROLLING MOUSE CONTROLLER PAD DIAGRAM Z2 4 Z1 OSCOUT VDD 3 2 1 ZZ0 1 OSCR ZZ0 16 15 14 Y2 Y1 EM84510E (0,0) 5 RTSCK RXDBDAT 6 13 OPT 7 8 NC 8 GND GND NC 9 10 11 12 R M L X1 X2 Chip Size : 1780 µm x 1430 µm (EL5750) Pad No. 1 1 2 3 4 5 6 7 8 8 9 10 11 12 13 14 15 16 Sym. ZZ0 VDD OSCOUT Z1 Z2 RTSCK RXDBDAT OPT NC GND GND NC R M L X1 X2 Y1 Y2 OSCR * This specification are subject to be changed without notice. X -15.9 -192.3 -382.4 -552.5 -719.1 -702.5 -702.5 -705.9 -457.5 -255.9 -135.3 15.0 178.1 349.6 522.0 713.5 713.5 710.7 710.7 529.9 Y 557.3 551.5 557.7 557.7 557.7 -129.1 -329.8 -527.5 -529.9 -532.9 -556.0 -553.7 -553.7 -553.7 -553.7 -549.9 -429.3 431.1 557.9 557.7 5.30.2001 18 EM84510 PS/2 SCROLLING MOUSE CONTROLLER Z2 4 Z1 OSCOUT VDD 3 2 1 ZZ0 1 OSCR ZZ0 16 15 Y2 Y1 14 EM84510F (0,0) 5 RTSCK RXDBDAT 6 X2 13 OPT 7 8 GND 8 8 GND GND 8 9 10 11 12 GND R M L X1 Chip Size : 1780 µm x 1430 µm (EL5750) Pad No. 1 1 2 3 4 5 6 7 8 8 8 8 9 10 11 12 13 14 15 16 Sym. ZZ0 VDD OSCOUT Z1 Z2 RTSCK RXDBDAT OPT GND GND GND GND R M L X1 X2 Y1 Y2 OSCR * This specification are subject to be changed without notice. X -15.9 -192.3 -382.4 -552.5 -719.1 -702.5 -702.5 -705.9 -457.5 -255.9 -135.3 15.0 178.1 349.6 522.0 713.5 713.5 710.7 710.7 529.9 Y 557.3 551.5 557.7 557.7 557.7 -129.1 -329.8 -527.5 -529.9 -532.9 -556.0 -553.7 -553.7 -553.7 -553.7 -549.9 -429.3 431.1 557.9 557.7 5.30.2001 19