Tim Riker <
[email protected]> writes:
On Monday, July 18, 2022 at 10:15:36 PM UTC-6, Jerry Penner wrote:
I converted a USB wheel mouse to work with the DIN-9 Apple //e mouse
card. I removed the USB driver chip that read the signals from the
phototransistor/LED pairs for the X- and Y-axes and routed them to the X
and Y inputs. The phototransistors output the supply voltage (+5V) when they >> detect light, which is perfect for the Apple mouse card.
The button on the mouse was the wrong sense (active-high), so I inverted
it using a pull-down 10kΩ resistor. That's the value I've seen in Apple
circuits for similar functions, and it worked well.
I don't have a schematic handy, but that's how it can be done. It does
depend on what you've got for a mouse. The optical mice encode
everything within their controller chips, and output USB data, so that
makes it much harder to use them.
Thanks for the reply!
If I can find a PC bus mouse / serial mouse, is that an easier place to start? Is your
converted mouse an optical or ball mouse? I'm not sure what the Apple is expecting as a
signal. How does it know the difference between moving right and moving left, for example?
If you can find any mouse with a ball in it (I should have said that in
my first reply), I would bet you can make it work.
Optical mice typically have a single chip that talks USB, processes the
image from a very small optical scanner, and produces the mouse-protocol
data to the host computer via USB. I wouldn't say it's impossible to
make this work, but it's way harder than what I did. It might be
impossible, but I don't know. Someone might have more patience to try
than I.
To answer your question about how the Apple knows if you're moving left
or right (or up or down), here is the AppleMouse connector's pinout:
| Pin | Name | Description |
|-----|----------|-----------------------------------------------------------------------|
| 1 | /MOUSEID | Active-low, disables hand-controller timer. Tie to ground for mouse. |
| 2 | VCC +5V | Power. |
| 3 | GND | Ground. |
| 4 | XDIR | Mouse x-direction indicator. |
| 5 | XMOVE | Mouse X-movement indicator. 90° out of phase w.r.t. XDIR. |
| 6 | n.c. | Not connected. |
| 7 | /MSWITCH | Mouse button, active-low. |
| 8 | YDIR | Mouse Y-direction indicator. |
| 9 | YMOVE | Mouse Y-movement interrupt. 90° out of phase w.r.t. YDIR. |
Each axis has two pins: whether or not there is movement, and if there
is, which direction it's going.
The phototransistors on my mouse have two outputs for each axis,
generating a four-valued signal (quadrature) and I just had to hook them
up to the appropriate XDIR, XMOVE and YDIR, YMOVE pins. On my first
try, the mouse moved up and down fine, but reversed from left to right,
so I had the XDIR and XMOVE signals mixed up. All the signals are TTL
(0-5V) levels.
Another note about my mouse hack: at first I left the USB driver chip
on the mouse circuit board. The mouse signals sent to the IIe were very erratic. I suspected that the chip was messing with the signals
somehow. When I removed the chip entirely, it worked perfectly. I
don't have an oscilloscope, otherwise I would have taken a look at the
signal lines to see what that chip was doing to them.
--
Jerry jerry+a2 at jpen.ca
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)