Go Down

Topic: Decoding playstation controller question (Read 628 times) previous topic - next topic

wilykat

I wanted to mod an old game system, and I'd like to use the earlier digital-only PSX controller. I'd like to know what is needed to make Arduino read PSX controller data and output 9 different digital uttons in the form of up, down, left, right, 4 main buttons, and start button.  L and R button is not needed.  Analog controls will also be ignored since it's not supported on my console.

I'm planning to add PSX controller port on my Atari Lynx, wire the output directly to the Lynx' direction, A, B, option 1, 2, and pause. The button are floating high when not pressed, and 0v when pressed so the output from Arduino would need to be coded to have digital output go low when PSX controller's button or direction is pressed, otherwise hold high.

I'm doing this mod in conjunction to Lynx to TV mod that someone posted on Atariage forum, being able to play Lynx games on big screen and using lighter, more comfortable controller would help me a lot.


wilykat

I've decided to go with SNES controller.  I could use level shifter to deal with voltage difference but that's extra circuit to tuck inside a small hand held system. If I ignore and use straight 5v, the controller may eventually burn out.  SNES doesn't need any change in voltage so I'm going with it.

wizdum

You could try this:
http://www.billporter.info/2010/06/05/playstation-2-controller-arduino-library-v1-0/
"Anyone who isn't confused really doesn't understand the situation."

Electronic props for Airsoft, paintball, and laser tag -> www.nightscapetech.com

wilykat

I checked those, the libraries, and all and I think I may have a small problem. I need a total of 13 digital I/O, 4 to communicate with PSX controller, and 9 output. Typical Arduino has 14 digital pins, 2 are used for USB connection. That leaves only 12 digital I/O left for me, one short.

Can arduino be set to treat analog pin as digital only? And how would I do that? I'd prefer to leave pin 0 and 1 alone for the default USB communication.

wilykat

nm, analog can be used like digital output
Code: [Select]
pinMode(A0, OUTPUT);
digitalWrite(A0, HIGH);

Go Up