View Full Version : Teensy 2.0 - acting as a switch?

02-26-2013, 09:36 PM
Greetings. Although I have a software background going back to 1982, my hardware skills have mostly been limited to soldering cables and making custom enclosures for existing things like the EFX-TEK Prop 1 or Arduinos. I am currently finishing up design on another joystick interface (I seem to be stuck on joystick projects (http://appleause.com/2013/01/04/teensy-2-0-icade-source-code/) lately) and I need a bit of hardware tutoring.

I am almost done with the board design for a Tandy 1000/Color Computer joystick interface that allows these analog joysticks to be used on a PC/Mac via USB. (Playing games specifically designed for an analog control with on emulator with keyboard or digital joytick does not quite recreate the original experience.) This has worked out very easily with the Teensy (I'll have posting source code and details when I get everything finalized.)

However, I also want to have an interface in the other direction, that would allow modern joysticks to be used with the old 1980s machines. I am using an Analog AD5206 to allow the Teensy to create the 100ohm variable resistance to emulate the old joystick, but I still need to figure out the

These joysticks have a normally open switch for the fire button. From the technical manual for the device, it appears to just connect a pin to ground:


In the back of my mind, from when I was toying with electronics in the late 80s (while working at Radio Shack, actually), I seem to recall using an NPN (or PNP?) transistor to do something like this, so I am trying to see what folks have done with Teensy hardware like this.

There is also a keyboard interface, that will need to do that for an 8x8 matrix. I have read tutorials doing similar things using a shift register, or a multiplexer of some kind, but my limited knowledge gets in the way of understanding.

I was hoping someone might be able to point me to something similar that I could look at for reference.