PS2 Controller-wireless again!
bulkhead
Posts: 405
Ok, I got a wireless ps2 controller (pelican brand, $10 at circuirt city this week) and it's quiet nice. The problem is that it seems to use a different way of communication. The ID that is returned is not $41 or $73. I also believe it uses a different "start byte" than regular sony brand controllers. I'm wondering if it's possible that I hook my stamp up to read the clock, data, command, and attention lines WHILE the wireless controller is communicating with a playstation. If it could somehow keep up with the clock cycle of the playstation, I could then display in the debug window the individual bytes sent, and therefore figure out the correct bytes to send the wireless controller. Any ideas on whether this will work?
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
/Bamse
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Wow, it must be hard to work with playstation controllers without the console! Why don't you just get a cheap playstation off ebay? You can get them for like $18 including shipping. This auction just ended at that...
http://cgi.ebay.com/SONY-PLAYSTATION-CONSOLE-CONTROLLER-AND-GAME_W0QQitemZ8255510714QQcategoryZ62053QQrdZ1QQcmdZViewItem
I use an old playstation (not psOne, the original) to test my controllers when I believe that they are broken (but they always work). It's strange, even the new wireless controllers for PS2 work fine with the original playstation, even though the controllers were probably designed 10 years after the console was.
I just thought of something- playstation memory cards hook up with the same pin layout as their controllers, so they MIGHT also use serial communication to send and recieve data. What if you could use playstation memory cards to store and retrieve data?
Post Edited (bulkhead) : 2/4/2006 8:13:22 PM GMT
Even though i realize this would cost you $$$$ but why don't you just RENT a ps2 from blockbuster. I think i cost like $20 to rent(w/ a $300 security deposit which u get back)
I know this is all fun stuff, but there are times when we just have to knuckle down and work.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
A logic analyzer is a digital recorder that can record many signals at one time.· You could, in fact, use a Parallax USB Scope as a two channel logic analyzer using the external trigger as the trigger input.· With that you could watch the Clock and Cmd lines and sus out the information being sent by the console.
I have another USB scope that allows me to monitor up to eight channels.· With this, I could trigger on the Attn line and monitor, Clock, Cmd, and Data .... if I had a console which I've made quite clear is not going to happen.· I really don't need to, because others have -- and just a bit of Googling·will turn up those sites.
Why the SX, and not a BASIC Stamp or Javelin Stamp?· Speed.· The clock rate from the PSX console is faster than the BASIC Stamp (even a BS2px) can keep up with.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
http://www.bitscope.net/store/?p=view&i=product+BS50U
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
PSP rox
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Rien n'est plus proche du vrai que le faux
Albert Einstein
Progress in Translation Of Robotics With The Boe-Bot v2.2: Page 15 Of 364
' {$STAMP BS2}
' {$PBASIC 2.5}
psxThumbL VAR Byte ' left thumb buttons
psxThumbR VAR Byte ' right thumb buttons
psxJoyRX VAR Byte ' r joystick - X axis
psxJoyRY VAR Byte ' r joystick - Y axis
psxJoyLX VAR Byte ' l joystick - X axis
psxJoyLY VAR Byte ' l joystick - Y axis
idx VAR Nib
tmpout VAR Byte
PsxAtt PIN 9 ' PSX joystick interface
PsxClk PIN 8
PsxCmd PIN 10
PsxDat PIN 11
MAIN:
DO
GOSUB Get_PSX_Buttons
DEBUG HOME, BIN8 psxThumbL," ",BIN8 psxThumbR," ",CR'HEX2 psxID," ",HEX2 psxSta,CR
DEBUG "psxJoyRX = ",DEC3 psxJoyRX ,CR
DEBUG "psxJoyRY = ",DEC3 psxJoyRY ,CR
DEBUG "psxJoyLX = ",DEC3 psxJoyLX ,CR
DEBUG "psxJoyLY = ",DEC3 psxJoyLY ,CR
LOOP
'
[noparse][[/noparse] Subroutines ]
Get_PSX_Buttons:' This routine REQUIRES inverted clock signal from
DIR10=1
DIR11=0
LOW PsxClk
LOW PsxAtt
'GOTO test
'request data
tmpout=$01
FOR idx=0 TO 7
PsxCmd=tmpout.LOWBIT(idx)
PULSOUT PsxClk,2
NEXT
PAUSE 1
tmpout=$42
FOR idx=0 TO 7
PsxCmd=tmpout.LOWBIT(idx)
PULSOUT PsxClk,2
NEXT
PAUSE 1
tmpout=$00
FOR idx=0 TO 7
PsxCmd=tmpout.LOWBIT(idx)
PULSOUT PsxClk,2
NEXT
PAUSE 1
FOR idx=0 TO 7
psxThumbL.LOWBIT(idx)=PsxDat
PULSOUT PsxClk,1
NEXT
FOR idx=0 TO 7
psxThumbR.LOWBIT(idx)=PsxDat
PULSOUT PsxClk,1
NEXT
FOR idx=0 TO 7
psxJoyRX.LOWBIT(idx)=PsxDat
PULSOUT PsxClk,1
NEXT
FOR idx=0 TO 7
psxJoyRY.LOWBIT(idx)=PsxDat
PULSOUT PsxClk,1
NEXT
FOR idx=0 TO 7
psxJoyLX.LOWBIT(idx)=PsxDat
PULSOUT PsxClk,1
NEXT
FOR idx=0 TO 7
psxJoyLY.LOWBIT(idx)=PsxDat
PULSOUT PsxClk,1
NEXT
HIGH PsxAtt
RETURN
END