HT6523
PS/2 Mouse Controller
Features
·
Compatible with IBM PS/2 mouse
·
Integrated oscillator circuit with external resistor
·
6MHz clock frequency
·
Minimal external components
·
Three key-switches and four photo-coupler inputs
·
Supports test mode operation
·
16-pin DIP package
General Description
The HT6523 is a PS/2 compatible mouse controller IC.
Capable of driving up to 3 key-switches and 4
photo-couplers directly into a 6-pin connector line.
Pin Assignment
N C
1
2
3
4
5
6
7
8
T E S T
R E S E T
O S C
N C
C L K
D A T A
V S S
1 6
1 5
1 4
1 3
1 2
1 1
1 0
9
V D D
Y 2
Y 1
X 2
X 1
L B
M B
R B
H T 6 5 2 3
1 6 D IP -A
Pin Description
Pin No.
1, 5
2
3
4
6
7
8
9
10
11
12
13
14
15
16
Pin Name
NC
TEST
RESET
OSC
CLK
DATA
VSS
RB
MB
LB
X1
X2
Y1
Y2
VDD
I/O
¾
I
I
I
I/O
I/O
¾
No connection
If TEST is floating or connected to VSS, then the chip is under normal opera-
tion. If TEST is connected to VDD, it will operate under the TEST mode.
Input to reset internal LSI
OSC is connected to an external resistor then to VDD to generate a 6MHz sys-
tem clock.
Synchronous clock signal. The mouse generates a clock signal when sending
data to and receiving data from the system.
Bidirectional data transmission line
Negative power supply, ground
In the non-active state these 3 switch inputs are pulled low. To activate they
must be connected to VDD.
In the TEST mode, MB, LB will indicate the condition of the X1, X2 inputs, if RB
is left floating or connected to VSS. Also in the TEST mode, if RB is connected
to VDD then MB and LB will indicate the condition of the Y1 and Y2 inputs.
Mouse interface input terminal. Four photo-coupler signals denote UP, DOWN,
LEFT and RIGHT state.
Positive power supply
Description
I
I
¾
Rev. 1.20
1
March 6, 2003
HT6523
Absolute Maximum Ratings
Supply Voltage ...........................V
SS
-0.3V
to V
SS
+5.5V
Input Voltage............................. VSS-0.3 to VDD+0.3V
Storage Temperature ............................-50°C to 125°C
Operating Temperature...........................-25°C to 70°C
Note: These are stress ratings only. Stresses exceeding the range specified under
²Absolute
Maximum Ratings² may
cause substantial damage to the device. Functional operation of this device at other conditions beyond those
listed in the specification is not implied and prolonged exposure to extreme conditions may affect device reliabil-
ity.
D.C. Characteristics
Symbol
V
DD
I
DD
V
IL
Parameter
Operating Voltage
Operating Current
Input Low Voltage for I/O Ports
5V
3V
V
IH
Input High Voltage for I/O Ports
5V
3V
V
IL1
Input Low Voltage (RESET)
5V
3V
V
IH1
Input High Voltage (RESET)
5V
3V
V
IL2
Input Low Voltage (X1, X2, Y1, Y2)
5V
3V
V
IH2
Input High Voltage (X1, X2, Y1, Y2)
5V
3V
I
OL
I/O Ports Sink Current
5V
3V
I
OH
I/O Ports Source Current
5V
3V
I
OL1
CLK, DATA Sink Current
5V
3V
I
OH1
CLK, DATA Source Current
5V
3V
R
PH
Pull-high Resistance of CLK, DATA
5V
R
PL
Pull-low Resistance of TEST, RB,
MB, LB
Pull-low Resistance of X1, X2, Y1,
Y2
3V
5V
3V
5V
V
OL
=0.3V
V
OL
=0.5V
V
OH
=2.7V
V
OH
=4.5V
V
OL
=0.3V
V
OL
=0.5V
V
OH
=2.7V
V
OH
=4.5V
¾
¾
¾
¾
¾
¾
Test Conditions
V
DD
¾
5V
3V
Conditions
¾
f
SYS
=6MHz, No load
¾
Min.
4.75
¾
0
0
2.1
3.5
0
0
2.3
3.8
0
0
2
3
1.5
4
-1
-2
8
8
-1.5
-1.5
5
3
10
8
60
35
Typ.
¾
¾
¾
¾
¾
¾
¾
¾
¾
¾
¾
¾
¾
¾
2.5
6
-1.5
-3
¾
¾
-2.5
-2.5
7.5
4.7
30
17
100
60
Max.
5.25
5
0.9
V
1.5
3
V
5
0.7
V
1.3
3
V
5
1
V
2
3
V
5
¾
¾
¾
¾
¾
¾
¾
¾
10
kW
6.3
50
kW
35
160
kW
90
mA
Unit
V
mA
¾
¾
¾
¾
¾
mA
mA
mA
R
PL1
Rev. 1.20
2
March 6, 2003
HT6523
A.C. Characteristics
Symbol
f
SYS
t
RES
Parameter
3V
System Clock (RC OSC)
5V
External Reset Low Pulse Width
3V
Test Conditions
R
OSC
=120K
R
OSC
=120K
¾
Min.
5.4
5.4
1
Typ.
6
6
¾
Max.
6.6
6.6
¾
Unit
MHz
MHz
ms
Functional Description
Power-on Reset
The Mouse logic generates a power-on reset at power
up after 600 millisecond
±
20%.
Modes of Operation
·
Reset
After power up or when receiving a reset command,
CLK and DATA lines can go to a positive level. The
mouse waits between 300 to 500 milliseconds and
sends AA to the host, followed by a device ID of 00.
After reset the mouse is set to its default values: Incre-
mental stream mode, 1:1 scaling, report rate of 100, 6
counts per mm at 320 DPI or 4 counts per mm at 200
DPI, and then disable itself. No further action occurs
until a command is sent from the host.
·
Stream
In this mode, a data report is transmitted to the system
if a switch is pressed or released, or if at least one
count of movement has been detected. The maximum
rate of transfer is the programmed sample rate.
·
Remote
in the mouse and no transmissions are made. If CLK
is high and DATA is low (request-to-send), the data is
also updated in the mouse, the mouse inputs the host
data, and no transmissions are started by the mouse
until CLK and DATA are both high. If CLK and DATA
are both high, the mouse proceeds to output 0 start
bit, 8 data bits, parity bit, and stop bit if a transmission
is required. Data is valid prior to the falling edge of
CLK and beyond the rising edge of CLK. During trans-
mission, the mouse checks for a line contention by
checking for an inactive level on CLK at intervals not
to exceed 100
ms.
Contention occurs when the host
lowers CLK to inhibit the mouse output after the
mouse starts a transmission. If this occurs before the
rising edge of the tenth clock (parity bit), the mouse in-
ternally stores its data packet in the mouse buffer and
returns both DATA and CLK high. If there is no con-
tention by the tenth clock, the mouse completes the
transmission. Following a transmission, the host can
inhibit the mouse until it services the input or until it re-
quests to send a response if necessary.
·
Data input
In this mode, data is transmitted only in response to a
read data command.
·
Wrap
In this mode, any byte of data sent by the system, ex-
cept hex EC or hex FF, is returned by the mouse.
Data Transmission
During data transmission, CLK is used to clock serial
data. The mouse generates a clocking signal when
sending data to and receiving data from the system. The
system requests the mouse receiving system data out-
put by forcing the data line to an inactive level and allow-
ing CLK to go to an active level.
Communication is bidirectional using the clock and data
signal lines. The signal for each of these lines comes
from open collector devices, allowing either the mouse
or the system to force a line to an inactive level. During a
non-transmission state, CLK and DATA are both held at
an active level.
·
Data output
When the mouse is ready to transmit, it checks for an
inhibit signal or a host request-to-send status on CLK
and DATA. If CLK is low, data is continuously updated
When the host is ready to send data to the mouse, it
first checks to see if the mouse is transmitting data. If
the mouse is transmitting, the host can override the
mouse output by forcing CLK low before the tenth
clock. If the mouse transmits beyond this, the host re-
ceives the data. If the mouse is not transmitting or if
the host overrides the mouse output, the host forces
CLK to an inactive level for a period of not less than
100
ms
while preparing for output. When the system is
ready to output 0 start bit (data line is low), it allows
CLK to go to an active level. The mouse checks this
state every 10ms.
If request-to-send is detected, the mouse clocks 11
bits. After the tenth clock, the mouse checks for a high
on the DATA line and if found, the mouse forces DATA
to a low level and clocks once more. This signals the
host to return to the ready state when it can accept in-
put or go to an inhibit mode until ready. If DATA is
found at an inactive level following clock 10, a framing
error has occurred and the mouse continues to clock
until DATA is high, then clocks the line control bit and
request a resend. For host commands and data trans-
mission that requires a response, the host waits for
the mouse to respond before sending its next output.
Rev. 1.20
3
March 6, 2003
HT6523
The response must be within 20ms, unless the host
inhibits the mouse output or inhibits the data transmis-
sions from the system that require a response. If the
host initiates a command or data transmission and the
response is invalid or has a parity error, the host re-
transmits the command or data. If after two retries the
response is still invalid or has a parity error, the host
resets the mouse.
Data Format
The following data report format is valid for the stream
and remote modes and is 3 bytes long:
Byte
3
Bit
7
6-1
0
7
6-1
0
7
6
5
4
3
2
1
0
Description
MSB of Y Data
Y Data
LSB of Y Data
MSB of X Data
X Data
LSB of X Data
Y Data Overflow 1=Overflow
X Data Overflow 1=Overflow
Y Data sign 1=Negative
X Data sign 1=Negative
Reserved always=1
Reserved for middle Button
Right Button Status 1=Pressed
Left Button Status 1=Pressed
Commands
·
The following table lists all the valid commands:
Hex Code
FF
FE
F6
F5
F4
F3
F2
F0
EE
EC
EB
EA
E9
E8
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 scaling 2:1
Reset scaling
2
1
·
The following describe valid commands:
Hex Code
FF
Command
Reset
Description
This command cause the mouse to enter a reset mode and do an internal self-test.
The system can send this command when it detects an error in any transmission
from the mouse. The Resend command could be sent following a mouse transmis-
sion and before the system enables the interface allowing the next mouse output.
On receipt of Resend, the mouse retransmits the previous three bytes if the previ-
ous output was a 3-byte packet. The previous two bytes if the previous output was a
2-byte packet, and the previous one byte if the previous output was a 1-byte packet,
unless the previous output from the mouse was a Resent command. In this case,
the mouse will resend the previous output prior to the Resend command. If a Re-
send command is received by the mouse from the host immediately following a
3-byte data packet transmission from the mouse to the host while the mouse is in
stream mode. The mouse should resend the 3-byte data packet prior to clearing the
count accumulators.
This command reinitializes all conditions to the power-on default state.
This command is used in the stream mode to stop transmissions initiated from the
mouse. It responds to all other commands while disabled. If the mouse is in the
stream mode, it must be disabled before sending it any command that requires a
response.
Begin transmission, if in stream mode
In the stream mode, this command sets the sampling rate to the value indicated by
bytes hex XX shown in the following figure:
Second Byte hex XX (sample rate): hex 0A (10/sec), hex 14 (20/sec),
hex 28 (40/sec), hex 3C (60/sec), hex 50 (80/sec), hex 64 (100/sec),
hex C8 (200/sec)
This command always receives a response of hex 00
FE
Resend
F6
Set default
F5
Disable
F4
Enable
F3, XX
Set sampling
rate
F2
Read device type
Rev. 1.20
4
March 6, 2003
HT6523
Hex Code
F0
EE
EC
Command
Set remote mode
Set wrap mode
Reset wrap mode
Description
This command sets the remote mode. Data values are reported only in response to
a Read Data command.
This command sets the wrap mode. This mode remains until hex FF or hex EC is
received.
This command resets the wrap mode
This command requests that all data defined in the data packet format be transmit-
ted. This command is executed in either remote or stream mode. The data is trans-
mitted even if there has been no movement since the last report or the switch status
is unchanged. Following a Read Data command, the accumulators are cleared af-
ter a data transmission.
This command sets the stream mode
When this command is issued by the system, the mouse responds with a 3-byte
status report as follows:
Byte
3
2
1
E9
Status request
0~7
0~7
7
6
5
4
3
2
1
0
Bit
Description
Current sampling rate
Current resolution setting
always = 0
0 = Stream mode, 1 = Remote mode
0 = Disabled, 1 = Enabled
0 = Scaling 1:1, 1 = Scaling 2:1
always = 0
1 = Left button pressed
Reserved for middle button
1 = Right button pressed
EB
Read data
EA
Set stream mode
The mouse provides four resolutions selected by the second byte of this command
as follows:
Second Byte
E8, XX
Set resolution
hex XX
hex 00
hex 01
hex 02
hex 03
200 DPI
1
2
4
8
Resolution (Counts per mm)
320 DPI
1
3
6
12
400 DPI
2
4
8
16
Scaling is used to provide a course/fine tracking response. At the end of a sample
interval in the stream mode, the current X and Y data values are converted to new
values. The sign bits are not involved in this conversion. 2:1 scaling is only per-
formed in stream mode. In response to a Read Data command, the mouse will
transmit the current value before conversion.
Input
E7
Set scaling 2:1
0
1
2
3
4
5
N (³6)
This command restores 1:1 scaling
Output
0
1
1
3
6
9
2.0
´
N
E6
Reset scaling
Rev. 1.20
5
March 6, 2003