[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Game port
Rubywand <rubywand@swbell.net> wrote:
> David Empson writes ...
> >
>
> ....
>
> >
> > A final note: the IIc does not have a button 2 input, and its button 0
> > and 1 inputs are not quite the same as other machines, since they double
> > up as mouse detection and button signals (which use the opposite logic -
> > connecting to ground when the mouse is plugged in or the button is
> > pressed).
>
> The last statement is a bit hard to follow.
The two switch inputs (SW0 and SW1) are used for mouse presence detect
and the mouse pushbutton. (I'd have to look up the manual to tell you
which was which.) Mouse presence detect is tied to ground inside the
mouse. The mouse button signal is connected to ground while the mouse
button is pressed.
> If the normal (when plugged in) mouse button status is at Gnd, how can
> pressing a button bring the line to Gnd? Do you mean that plugging in the
> mouse puts Mouse ID (PB1) at Gnd and that Mouse Button (PB0) is normally
> at "1" until it is pressed?
Yes.
> Regarding pinout of 9-pin A2 mouses, is the following correct?
[Mouse diagram snipped] Yes that looks correct. It agrees with the IIc
manual.
> Does the IIc+ also omit a connection for PB2?
According to the IIc technical reference (2nd edition, which includes
the IIc+), the IIc+ is identical to every other IIc as far as the game
connector is concerned.
> > You cannot reliably put a TTL level into a IIc. The only officially
> > supported input combinations are a switched +5V with pulldown (as on
> > earlier machines), or a similar transistor configuration (fully
> > saturated PNP, with Vce <= 0.3V, and current into the IIc >= 30 mA,
> > according to the techincal reference).
> >
> > The IIc manual specifically excludes a schottky gate output, switched
> > ground through a transistor (open collector), and emitter follower
> > transistor configuration.
>
> It seems like about the only way to exclude Open Collector is for
> the //c PB inputs to include a resistor going to Ground.
The IIc inputs have both pullup and pulldown resistors (different
values), so the input normally sits somewhere between +5V and ground if
nothing is connected. According to my calculations, this is about 3.2V
for SW0/MSW and 2.9V for SW1/MID.
The signal then passes through either of two paths, effectively a 2.5V
comparator on SW0/MSW and a 2.2V comparator on SW1/MID. If the input
signal is lower than the threshold, the mouse signal goes active. If
the input signal is higher than the threshold, the joystick signal goes
active. (This also goes through an optocoupler.) There is probably a
minimum current requirement to activate the signal reliably.
An open collector output would not provide any current into the pin, so
it wouldn't activate either the joystick or mouse signal. You would
need an external pullup at the very least.
> To interface such an input to TTL, you would be stuck with
> something like ...
>
> +5V
> \ E
> \ | about 1k
> |--B-----/\/\/\--------<--- Output from TTL gate
> PB input / |
> ---------o----/ C PNP Transistor
> |
> Z
> Z
> |
> Gnd
>
> i.e. your saturated PNP transistor.
>
> Would the above circuit work on a //c?
This type of circuit is given as an example of something that will work
(assuming we are talking about the same type of transistor - some parts
of my electronics knowledge are a little rusty; the diagram in the IIc
manual shows an arrow pointing in towards the base, on the upper signal,
which you have labelled as the emitter).
There is no pulldown resistor on the pushbutton input in the IIc's
diagram (though I have no idea why - there is one for the pushbutton
example). It also specifies a minimum input current of 30 mA.
--
David Empson
dempson@actrix.gen.nz
Snail mail: P.O. Box 27-103, Wellington, New Zealand