Multi-function joystick buttons without relays

Dec 15, 2008 5 Replies

I've successfully interfaced an xbox controller with my pc via USB and autohotkey scripting. What I'm stuck on now is figuring out the wiring for creating alternate functionality in each button.



Say I have five buttons - A B C D E - on the joystick. Each button is a SPST momentary switch, which pulls to ground when activated. I now want to introduce button X to the mix. Which means wiring X across buttons A through E so that X is now also activated with each press of A through E (similar idea to having a second keyboard where all characters are capitalized by default). Can it be done without use of PICs, DPST switches or relays for each button?


yes, use an AND gate or a "diode and"

s
f

I'm not sure I follow how you'd accomplish this with logic gates. Would you mind explaining how you would go about wiring this?

I want to effectively create another set of buttons - AX BX CX DX EX - by wiring up five additional momentary switches. When the AX button is pressed, it not only pulls A to ground but also X. Thus, the joystick controller simply sees this as simultaneous pressing of A and X.

It's also known as the diode-or:

formatting link

In the first circuit shown, the +5VA, B, and C each have a pullup R (4.7k-22k) to the +5v., and the button to ground is to the left of each diode. The one they have labeled "TERMPOWER OUT" is your "X".

Have Fun! Rich

Existing: ___ Gnd---+---o o---A----------------------------+-->

| ___ | +---o o---B----------------------+--> | | ___ | | +---o o---C----------------+--> | | | ___ | | | +---o o---D----------+--> | | | | ___ | | | | +---o o---E----+--> | | | | | | | | | Added: | | | | | [D1] [D2] [D3] [D4] [D5] ___ | | | | | Gnd---+---o o---EX---+--> | | | | | ___ | | | | +---o o---DX---------+--> | | | | ___ | | | +---o o---CX---------------+--> | | | ___ | | +---o o---BX---------------------+--> | | ___ | +---o o---AX---------------------------+-->

The banded end of each diode is at the bottom.

Ed

I thought you wanted something slightly different.

UPPERCASE = outputs lowercase = inputs (low when pressed)

A = a ? ax B = b ? bx C = c ? cx D = d ? dx E = e ? ex X = ax ? bx ? cx ? dx ? ex (I used an uncommon symbols if it doesn't show correctly '?' is 'and')

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required