Interfacing pic to joystick port

Thread Starter

Art

Joined Sep 10, 2007
806
Hi Guys,
I want to interface a pic port to a retro computer or arcade machine board of the variety that
expect microswitches to ground the appropriate input pins with action on the connected joystick.
The computers are Amiga, Atari, early Sega, etc, that all use joysticks with female D9 connector.

Since the retro computer’s joystick port pins are probably tied high with resistors already,
I expect it would be possible to just connect directly to the pic and sink the pins,
but this would typically be buffered in some way would it not?

Perhaps transistors such as BC549, or just use a digital logic IC as a buffer?
Any advice would be appreciated.
Cheers, Art.
 

Thread Starter

Art

Joined Sep 10, 2007
806
Thanks Max, I’m sure I can try one on it’s own just on a fire button or something,
but part of the question is for my education, not just getting the project to work.

The boards always look to be 5 Volt, and so is the micro, but still in this situation
I would expect an external IO interface to be buffered with something so the micro isn’t directly connected to the external port.
It’s an overall design question.

If the voltage of both circuits is the same, is it just to protect the micro in the circuit from unexpected current?
Also why would you choose a FET rather than a signal transistor or some other method?
 

MCU88

Joined Mar 12, 2015
358
Hi Guys,
I want to interface a pic port to a retro computer or arcade machine board of the variety that
expect microswitches to ground the appropriate input pins with action on the connected joystick.
The computers are Amiga, Atari, early Sega, etc, that all use joysticks with female D9 connector.

Since the retro computer’s joystick port pins are probably tied high with resistors already,
I expect it would be possible to just connect directly to the pic and sink the pins,
but this would typically be buffered in some way would it not?

Perhaps transistors such as BC549, or just use a digital logic IC as a buffer?
Any advice would be appreciated.
Cheers, Art.
Been there done that. No need for an buffer. A buffer is really only required in circuits to get around the 'loading effect' -- of other parts hanging off the circuit. Connect straight to the MCU's port configured as inputs. Throw on some 100K pull-up resistors for good measure.
 

Thread Starter

Art

Joined Sep 10, 2007
806
I don’t doubt it would just work, but is it proper?
One concern is AFAIK the pic isn’t completely protected from CMOS latchup,
so it would seem at least diode clamps on the pins would at least be the way to go if there was no hardware buffer.

The reason I’m so pedantic is it’s a hand wired, hand soldered protoboard with 11 chips so far,
and none are socketed or easily removable, so I’m interested in it’s long term service.
 

ErnieM

Joined Apr 24, 2011
8,377
Diode clamps on the outputs just put a secons diode in parallel with the existing ESD diodes inside the chip output pins.

If you add an intermediate buffer you have the same (non) issue with that devices output connected to the pull ups. It changes nothing.

The sole consequence I would forsee is the micro running off the power it would get from the pull up, but that also has to power your entire circuit too.

Just connect the micro output directly and sleep soundly.
 

Thread Starter

Art

Joined Sep 10, 2007
806
Ok I suppose two votes is enough, thanks :D
I don’t know whether to call them inputs or outputs.
 

Thread Starter

Art

Joined Sep 10, 2007
806
Ok, I just got the EEPROM running tonight, It’s an 8 device I2C bus,
and then some more that are powered and enabled, but not yet used.

at 0.1 second resolution It (currently provides over 7 hours,
so I think I can afford a much higher capture rate.
Note there’s no output to any computer’s joystick port yet ;)

 

Thread Starter

Art

Joined Sep 10, 2007
806
I didn’t listen at all :D I think I liked the idea of the pic port appearing as output when using the transistors.
Should I have used any current limiting resistors on the signals from the computer board?



and done :)
 
Top