Silan Semiconductors SC84510 PS/2 SCROLLING MOUSE CONTROLIER DESCRIPTION The SC84510 Scrolling Mouse Controller is specially designed to control PS/2 mouse device. This single chip can interface three keyswitches four photo-couples plus x-axis direct to 8042 controller. SC84510 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 DIP-16 mistaken for movement signals by traditional mouse controller and the cursor of the display screen is thus moved frequently up and down or back and forth. This will consume a great amount of energy. The SC84510 mouse controller provides noise immunity circuits to eliminate these noises in order to reduce energy consumption. FEATURES * Low power dissipation. * Using 50k ±5% resistor for RC oscillation. * Six types Z direction input: * Compatible with legacy PS/2 mouse. * Compatible with Microsoft scrolling mouse. 1. Photo couples input. (Z/1) * Built-in noise immunity circuit. 2. Key-switches input. * Built-in current comparator for photo-couples input. 3. Voltage-sensing input. * Built-in three steps dynamic input impedance. 4. Mechanical input. (Z/1) * Three key-switches and four photo-couples inputs. 5. Photo couples input. (Z/4) * Both key-press and key-release debounce interval 12 ms. 6. Mechanical input. (Z/2) * The sampling rate of motion detector is about 65KHz. ORDERING INFORMATION SC84510AP DIP-16 Package, Photo couples input. (Z/1) SC84510BP DIP-16 Package, Key-switches input. SC84510CP DIP-16 Package, Voltage-sensing input. SC84510DP DIP-16 Package, Mechanical input. (Z/1) SC84510EP DIP-16 Package, Photo couples input. (Z/4) SC84510FP DIP-16 Package, Mechanical input. (Z/2) HANGZHOU SILAN MICROELECTRONICS JOINT-STOCK CO.,LTD Rev: 1.0 1 2000.12.31 Silan Semiconductors SC84510 PIN CONFIGURATIONS 1 16 OSCR OSC OUT 2 15 Y2 Z1 3 Z2 4 CLK 5 DATA 6 OPT 7 10 M VSS 8 9 SC84510A/B/C/E/F VDD 14 Y1 13 X2 12 X1 11 L R BLOCK DIAGRAM DATA CLK 6 5 THREE TYPES SELECTOR Z1 3 Z2 4 COMPARATOR VOLTAGE SENSOR KEY-SWITCH DETECTOR Z-AXIS COUNTER X2 13 Y1 14 Y2 15 L 11 M 10 R 9 OSCR 16 OSC.OUT 2 COUNTER MULTIPLEXER DEBOUNCE 12 DETECTOR 7 X1 COMPARATOR OPT COMMAND STATUS DATA I/O TIMING CONTROLLER SYSTEM CLOCK GENERATOR RC & CRYSTAL OSCILLATION HANGZHOU SILAN MICROELECTRONICS JOINT-STOCK CO.,LTD Rev: 1.0 2 2000.12.31 Silan Semiconductors SC84510 ABSOLUTE MAXIMUM RATINGS (Tamb=25°C, unless otherwise specified) Characteristic Symbol Value Unit Temperature Under Bias TOPR 0 ~ 70 °C Storage Temperature range TSTR -65 ~ +150 °C Input Voltage VIN -0.3 ~ +6.0 V Output Voltage VO -0.3 ~ +6.0 V DC ELECTRICAL CHARACTERISTICS (Tamb=25~70°C) Parameter Symbol Min Typ Max Unit VDD 4.5 5 5.5 V Iop -- -- 1.2 mA Vt+ 0.6VDD -- 0.8 VDD V Vt- 0.2 VDD -- 0.4 VDD V (Vin=0V) Idc 0.56 -- 1.86 mA (Iprl=-4mA) Vprl -- -- 0.4 V Ipl 60 -- -- µA Iph -- -- 110 µA Vpi 0.8 -- 1.2 V Vpi 1.5 -- 2.8 V L, M, R, OPT, Z1, Z2 (Key Mode) Input Low Voltage Vail -- -- 0.3 VDD V L, M, R, OPT, Z1, Z2 (Key Mode) Input High Voltage Vaih 0.7 VDD -- -- V Rmi 92 -- 310 kΩ Operating Voltage Operating Current (No Load) CLK, DATA Positive-going Threshold Voltage CLK, DATA Negative-going Threshold Voltage DATA, CLK Input Current (pull up resistor) DATA, CLK Low Output Voltage X1, X2, Y1, Y2, Z1, Z2 (Photo Mode) Low Input Reference Current X1, X2, Y1, Y2, Z1, Z2 (Photo Mode) High Input Reference Current X1, X2, Y1, Y2, Z1, Z2 (Photo Mode) Input Current (Input Impedance) (80µA) X1, X2, Y1, Y2, Z1, Z2 (Photo Mode) Input Current (Input Impedance) (500µA) L, M, R, Z1, Z2 (Key & Voltage Mode) Input Resistor (Vin=VDD) OPT Input Resistor (Vin=VDD) Rxi 133 -- 400 kΩ OPT High Output Current (Vin=VDD) Vopt 4.5 -- -- V Iil 0 -- -1.0 µA 3.2 -- -- 4.5 -- -- 5.5 -- -- L, M, R, X1, X2, Y2, Y2, Z1, Z2 Input Leakage Current (Vin=0V) VDD=4.5V OPT High Output Current (Iopt=10mA) VDD=5V VDD=5.5V Idc V HANGZHOU SILAN MICROELECTRONICS JOINT-STOCK CO.,LTD Rev: 1.0 3 2000.12.31 Silan Semiconductors Note: SC84510 1. All voltage in above table are compared with VSS. 2. All parameters in above table are tested under VDD=5V. 3. CLK & DATA output gates are open drains that connect to pull up resistors. X1, X2, Y1, Y2 input impedance UNIT:K¡ MAX. 16.0 15.0 14.0 TYP. 13.0 12.0 MIN. 11.0 10.0 9.0 8.0 7.0 6.0 5.0 4.0 3.0 2.0 1.0 0 1.0 10.0M 2.0 3.0 4.0 5.0 VOLTAGE (LIN) AC ELECTRICAL CHARACTERISTICS (Tamb=25~70°C) Symbol Min Typ Oscillating Frequency Parameter Fosc 34.3-10% 34.3 Key Debounce Tkd -- 12 Max Unit 34.3+10% kHz -- ms Rising Edge Crossed Width Fosc=35KHz Tr 14.3 -- -- µs Falling Edge Crossed Width Tf 14.3 -- -- µs Tmca -- 42.9 -- µs Mouse CLK Inactive Time Tmci -- 42.9 -- µs Mouse Sample DATA from CLK rising Edge Tmdc -- 14.3 -- µs System CLK Active Time Tsca -- 42.9 -- µs Mouse CLK Active Time System CLK Inactive Time Tsci -- 42.9 -- µs Time from DATA Transition to Falling Edge of CLK Tsdc -- 14.3 -- µs Time from rising Edge of CLK to DATA Transition Tscd -- 28.6 -- µs Tpi 0 -- 50 µs Time to mouse Inhibit after the 11th CLK to ensure mouse does not start another Transmission The AC timings are measured under using 35KHz system clock signal. HANGZHOU SILAN MICROELECTRONICS JOINT-STOCK CO.,LTD Rev: 1.0 4 2000.12.31 Silan Semiconductors SC84510 PIN DESCRIPTION Pin Name I/O Description INPUT: 200kΩ pull low to VSS. When OPT is connected to VDD, SC84510 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 OPT I/O 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 60µs. OSC OUT O OSCR I CLK I/O Connect to 8042 auxiliary port CLK line. DATA I/O Connect to 8042 auxiliary port DATA line. RC mode oscillation with 50kΩ resistor. R I M Three key-switches inputs. 200kΩ resistor pull low. L X1 X2 I Three step dynamic input impedance. Use current comparator to measure photo-couples “ON”, or “OFF”. Y1 Y2 Z-axis input. Z1 Photo mode: Three steps dynamic input impedance. Current comparator input. I Z2 Key mode: 200kΩ resistor pull low. 7 levels increased by “M” key. Voltage mode: 200kΩ resistor pull low. 7 levels voltage comparator. Mechanical mode: 13.2kΩ resistor pull low. VSS Negative power. VDD Power line. HANGZHOU SILAN MICROELECTRONICS JOINT-STOCK CO.,LTD Rev: 1.0 5 2000.12.31 Silan Semiconductors SC84510 FUNCTION DESCRIPTIONS 1. 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 SC84510. (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. (c) Data report format: Byte Bit Description 1 0 Left button status; 1 = pressed 1 Right button 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) HANGZHOU SILAN MICROELECTRONICS JOINT-STOCK CO.,LTD Rev: 1.0 6 2000.12.31 Silan Semiconductors SC84510 (C) PS/2 mouse Data Transmission: (a) SC84510 generates the clocking signal when sending data to and receiving data from the system. (b) The system requests SC84510 receive system data output by forcing the DATA line to an inactive level and allowing CLK line to go to an active level. (c) Data transmission frame: Bit Function 1 Start bit (always 0) 2~9 Data bits (D0~D7) 10 Parity bit (odd parity) 11 Stop bit (always 1) (d) Data Output (data from SC84510 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 SC84510 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, SC84510 check for line contention by checking for an inactive level on CLK at intervals not to exceed 100µ sec. Contention occurs when the system lowers CLK to inhibit SC84510 output after SC84510 has started a transmission. If this occurs before the rising edge of the tenth clock, SC84510 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, thetransmission is complete. Following a transmission, the system inhibits SC84510 by holding CLK low until it can service the input or until the system receives a request to send a response from SC84510. (e) Data Input (from system to SC84510): System first check if SC84510 is transmitting data. If SC84510 is transmitting, the system can override the output forcing CLK to an inactive level prior to the tenth clock. If SC84510 transmission is beyond the tenth clock, the system receives the data. If SC84510 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, SC84510 clocks 11 bits. Following the tenth clock SC84510 checks for an active level on the DATA line, and if found, force DATA low, and clock once more. If occurs framing error, SC84510 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 SC84510 to response before sending its next output. HANGZHOU SILAN MICROELECTRONICS JOINT-STOCK CO.,LTD Rev: 1.0 7 2000.12.31 Silan Semiconductors SC84510 (D) PS/2 Mouse Error Handling: (a) A Resend command (FE) following receipt of an invalid input or any input with incorrect parity. (b) If two invalid input are received in succession, an error code of hex FC send to the system. (c) The counter accumulators are cleared after receiving any command except “Resend”. (d) SC84510 receives a Resend command (FE), it transmit its last packet of data. (e) In the stream mode “Resend” is received by SC84510 following a 3-byte data packet transmission to the system. SC84510 resend the 3-byte data packet prior to clearing the counter. (f) A response is sent within 25 ms if a The system requires a response b An error is detected in the transmission (g) 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 SC84510. 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: The following describes valid commands: Hex Code Command SC84510 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, XX Set Resolution FA, FA E7 Set Auto-speed FA E6 Reset Auto-speed FA HANGZHOU SILAN MICROELECTRONICS JOINT-STOCK CO.,LTD Rev: 1.0 8 2000.12.31 Silan Semiconductors SC84510 The following describes valid command: (a) Reset (FF) SC84510 operation: a Completion the reset. b Transmitted FA, AA, 00 to the system. c Set default: sampling rate: 100 reports/s non-auto-speed stream mode 2 dots/count disable (b) Resend (FE) a. Any time SC84510 receives an invalid command; it returns a Resend command to the system. b. When SC84510 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. c. In stream mode if a Resend command is received by SC84510 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 SC84510. (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 Sample Rate 0A 10/sec 14 20/sec 28 40/sec 3C 60/sec 50 80/sec 64 100/sec C8 200/sec HANGZHOU SILAN MICROELECTRONICS JOINT-STOCK CO.,LTD Rev: 1.0 9 2000.12.31 Silan Semiconductors SC84510 (g) Read Device Type (F2) SC84510 always echoes “ FA, 00 “ following this command. (h) Set Remote Mode (F0) Data values 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) SC84510 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. (l) Set Stream Mode (EA) This command sets SC84510 in stream mode. (m) Status Request (E9) When this command is issued by the system, SC84510 respond with a 3-byte status report as follows: Byte Bit 1 0 1 = Right button pressed Description 1 1 = Middle button pressed 2 1 = Left button pressed 3 Reserved 4 0 = Normal speed, 1 = Auto-speed 5 0 = Disabled, 1 = Enabled 6 0 = stream mode, 1 = Remote mode 7 Reserved 2 0~7 Current resolution setting (D0~D7) 3 0~7 Current sampling rate (D0~D7) (n) Set Resolution (E8, XX) SC84510 provides four resolutions selected by the second byte of this command as follows: Second Byte XX Resolution 00 8 dots/count 01 4 dots/count 02 2 dots/count 03 1 dot/count (o) Set Auto-speed (E7) HANGZHOU SILAN MICROELECTRONICS JOINT-STOCK CO.,LTD Rev: 1.0 10 2000.12.31 Silan Semiconductors SC84510 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 Output 0 0 1 1 2 1 3 3 4 6 5 9 N( ≥6) 2.0*N (p) Reset Auto-speed (E6) This command restores normal speed. 2. MICROSOFT PS/2 SCROLLING MOUSE MODE: (A) Entering procedure: Except in WRAP mode, While SC84520 received the following consecutive command. (a) F3 C8 ---- set sampling rate 200/sec (b) F3 64 ---- set sampling rate 100/sec (c) F3 50 ---- set sampling rate 80/sec (B) Operating: (a) All of the command in legacy mode still is 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 button 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) HANGZHOU SILAN MICROELECTRONICS JOINT-STOCK CO.,LTD Rev: 1.0 11 2000.12.31 Silan Semiconductors SC84510 (C) Exiting Microsoft scrolling mode: There are two ways to exit: (a) Power off. (b)Reset command (FF). 3. Z-AXIS INPUT FUNTION: 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 follow: Value Rate per second 1 2.7 2 6.4 3 9.2 4 12.8 5 15 6 18 7 20 (C) Voltage-sensing mode: There are 7 voltage levels in Z1, Z2 input. The transmission table is the same as keyswitch mode. The relationship between the value of Z-axis counter and the voltage as follows: Value Voltage 0 1V ↓ 1 1.0V – 1.6V 2 1.6V – 2.2V 3 2.2V - 2.8V 4 2.8V – 3.4V 5 3.4V – 4.0V 6 4.0V – 4.6V 7 4.6V ↑ Under VDD = 5V condition (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 dots per count. Counted by Z2 changing phase. HANGZHOU SILAN MICROELECTRONICS JOINT-STOCK CO.,LTD Rev: 1.0 12 2000.12.31 Silan Semiconductors SC84510 TIMING DIAGRAM (1) Photo-couples pulse width X1(Y1) X2(Y2) Tr Tf (2) PS/2 Mouse (A) Receiving Data 1st CLK Inhibit CLK 2rd CLK 9th CLK 10th CLK 11th CLK Tmca Tmci DATA Tmdc Start Bit Bit0-Bit7 Parity Bit Stop Bit Line Control Bit (B) Sending Data CLK 1st CLK Tscl 2nd CLK 10th CLK 11th CLK Tsca Tpi DATA Tsdc Tscd Start Bit Bit0-Bit7 Parity Bit Stop Bit AC TIMING POINT Output: DATA CLK PIN VDD-2.6 VSS+0.4V +1.6V Input: VSS X1, X2, Y1, Y2 PIN VDD-0.8V VSS+0.8V CLK, DATA PIN VDD L, M, R PIN VSS HANGZHOU SILAN MICROELECTRONICS JOINT-STOCK CO.,LTD Rev: 1.0 13 2000.12.31 Silan Semiconductors SC84510 SC84510 I/O PIN EQUIVALENT CIRCUITS CLK: X1, X2, Y1, Y2: X1,X2,Y1,Y2 PHASE DIGITAL SIGNAL VCC VCC 13.2kO PS/2 MOUSE ENABLE CLK CLK INPUT SIGNAL VCC CLK INPUT SIGNAL VCC VPP/4 80 13.2k 51k R, M, L: DATA: VCC (R,M,L) (R, L, M) INTERNAL SIGNAL VCC DATA PS/2 MOUSE ENABLE DATA INPUT SIGNAL DATA INPUT SIGNAL HANGZHOU SILAN MICROELECTRONICS JOINT-STOCK CO.,LTD Rev: 1.0 14 2000.12.31 Silan Semiconductors SC84510 APPLICATIONS CIRCUITS 1 2 1 VDD Y2 15 3 4 5 CLK Y1 14 5 6 DATA X2 13 6 2 OSC OUT X1 12 Z2 4 7 OPT Z1 3 L 11 M 10 R 9 OSCR 51k 16 10f 8 VSS SC84510A/E 1 2 3 4 5 6 1 VDD Y2 15 5 CLK Y1 14 6 DATA X2 13 7 OPT X1 12 OSC OUT Z2 4 Z1 3 51k 2 16 8 L 11 M 10 R 9 OSCR VSS 10f SC84510B HANGZHOU SILAN MICROELECTRONICS JOINT-STOCK CO.,LTD Rev: 1.0 15 2000.12.31 Silan Semiconductors SC84510 APPLICATIONS CIRCUITS (continued) 1 2 3 4 5 6 1 VDD Y2 15 5 CLK Y1 14 6 DATA X2 13 7 OPT X1 12 2 Z2 OSC OUT 4 Z1 3 OSCR L 11 M 10 R 9 51k 16 8 VSS 10f SC84510CP 1 2 3 4 5 6 1 VDD Y2 15 5 CLK Y1 14 6 DATA X2 13 7 OPT X1 12 2 Z2 4 A* OSC OUT Z1 3 B L 11 M 10 R 9 OSCR 51k 16 8 VSS 10f COM SC84510D/F HANGZHOU SILAN MICROELECTRONICS JOINT-STOCK CO.,LTD Rev: 1.0 16 2000.12.31 Silan Semiconductors SC84510 PACKAGE OUTLINE DIP-16-300-2.54 UNIT: mm 7.62 6.40 0.25 2.54 1.50 15 degree 3.30 5.08 3.51 19.4 0.46 HANGZHOU SILAN MICROELECTRONICS JOINT-STOCK CO.,LTD Rev: 1.0 17 2000.12.31