Willy, znalazłem to o czym mówiłem, wprawdzie jest to o myszy amigowej, ale działają one identycznie, jedyna różnica to zamienione miejscami dwa sygnały we wtyku (Yb i Xb z tego co pamiętam)
Amiga Mouse
The Amiga supplied mouse is rather simple as mice go. It provides the
basic XY quadrature signals and lets the Amiga figure it out from there.
This is actually a good thing, as it lets us use other devices by simply
removing any back end processing or signal massaging circuits to get back
to the raw XY signals.
Basically, the Amiga mouse has two rollers that touch the mouse ball in
the X and Y direction. As the ball rotates in the X (right <-> left)
direction, X roller shaft spins. If the ball rotates in the Y (up down)
direction, the Y roller shaft spins. Any combination of XY direction, and
the roller shafts spin a proportionate amount in the X and Y directions.
Each shaft is connected at the end to a slotted disk. Each disk has a
LED emitter/ detector pair that "reads" the slots as they spin by, creating
a logic pulse for each slot seen.
Notice that there are two detectors for the X disk and two for the Y
disk. Each pair are mounted physically 180 degrees apart on the slotted
disk. The odd number of slots appear to be cut into each disk, so that it
is impossible for the pair of logic pulses to occur exactly at the same
time. This is how the mouse can signal the direction that the mouse is
moving.
For example, lets look at just the X slotted disk/detector pair. Lets
call the two output signals Xa and Xb. If the mouse is moving to the
right, the signals would look like this;
____ _______ _______
Xa | | | | |
|_______| |________| |________
____ _______ _______
Xb | | | | |
|_______| |________| |________
The graphics are terrible, but you get the picture. If the mouse is
moving in the opposite direction, then Xb would go low first, followed by
Xa.
The same thing happens for the Ya and Yb pair. In fact, you can treat
the Y pair as up down equivalent to the X pair.
Each of the four detector signals (x pair, y pair) is conditioned by a
LM339 Quad Voltage Comparator IC. The LM339 basically shapes up the
signals before being sent to the Amiga. Each of the four comparators is
used, one for each of the detector signals.
The 10K, 2.7K resistor divider sets a trip voltage of around 1.0 volts
for the comparator. This is important since the detector puts out around
.5V for a low pulse. The resistor divider is also shared by all four
comparators in the LM339.
The two mouse buttons are simply switches to ground. When you press one
of the buttons, it grounds a DB9 pin. The corresponding pull-up resistors
must be inside the Amiga.
The mouse cord terminates inside the mouse in a connector marked CN-1.
Below is the pinouts for the mouse cord.
DB9 CN-1 Function
-------------------------------------
6 1 Left Button
9 6 Right Button
8 9 Signal Ground
7 8 Vcc (+5 Volts)
3 5 Ya
1 2 Yb
2 3 Xa
4 4 Xb
5 7 No Connect
Shield Drain Wire Ground