Interpreting ps2 lights

I’m made myself a homemade wiring harness for the ps2 remote, I’ve got a madcatz lynx controller that I’m using, unfortunately no ps2 to test it on. I wired it up to spec, and added a 1k pullup resistor from the brown wire to the yellow (data to 5v dc) and checked that the voltage from the green (Vs) to ground is 6.8 (should be ideally 7.2 volts…this close enough?)

When I turn it all on, the red light on the receiver flashes quickly, a few times a second. When I hit the start select and analog/digital button on the controller, the analog digital button flashes, but slowly, probably a second or more between blinks. I got a bit of rumble in the controller once for a split second, but otherwise so far nothing. The program in it I stole from this website and just controls the rumble packs. I’m 99% sure though I’m not actually getting any connection between the two. Can anyone give me a hint as to what each light means, and if my voltage is close enough to work? Should I try a pull up on the clock as well? I can’t find any manuals for the controller on the mad catz website, but it seems like some people here have played around with em. Any input would be greatly appreciated!

There is no standard for wiring harness color code. The colors we illustrate are from the cables we have manufactured. Are you sure the pin out is correct? It might help if you post the code you are using and tell what processor / carrier board as well.

When the receiver is powered on and waiting for a connection and initialization, one (left) LED should be on, the other one blinking slowly.

When the initialization (that we do) is complete, and a connection is established, then the right LED will be solid on as well.

Do you need the vibrate? Some units apparently need power on that wire anyway. If it only drives the vibrate motors, then I suspect your voltage will probably work.

Do you initialize it?

Alan KM6VV

here’s the code I used:

[code]DAT con P12
CMD con P13
SEL con P14
CLK con P15

index var byte
temp var byte(19)
mode var byte
Small_Motor var byte
Large_Motor var byte

;PS2Init
high CLK

again

low SEL
shiftout CMD,CLK,FASTLSBPRE,$1\8,$43\8,$0\8,$1\8,$0\8] ;CONFIG_MODE_ENTER
high SEL
pause 1

low SEL
shiftout CMD,CLK,FASTLSBPRE,$01\8,$44\8,$00\8,$01\8,$03\8,$00\8,$00\8,$00\8,$00\8] ;SET_MODE_AND_LOCK
high SEL
pause 100

low SEL
shiftout CMD,CLK,FASTLSBPRE,$01\8,$4F\8,$00\8,$FF\8,$FF\8,$03\8,$00\8,$00\8,$00\8] ;SET_DS2_NATIVE_MODE
high SEL
pause 1

low SEL
shiftout CMD,CLK,FASTLSBPRE,$01\8,$4D\8,$00\8,$00\8,$01\8,$FF\8,$FF\8,$FF\8,$FF\8] ;VIBRATION_ENABLE
high SEL
pause 1

low SEL
shiftout CMD,CLK,FASTLSBPRE,$01\8,$43\8,$00\8,$00\8,$5A\8,$5A\8,$5A\8,$5A\8,$5A\8] ;CONFIG_MODE_EXIT_DS2_NATIVE
high SEL
pause 1

low SEL
shiftout CMD,CLK,FASTLSBPRE,$01\8,$43\8,$00\8,$00\8,$00\8,$00\8,$00\8,$00\8,$00\8] ;CONFIG_MODE_EXIT
high SEL
pause 1

main
;-----------PS2 Mode----------
low SEL
; asking “mode” to PS2 controller
shiftout CMD,CLK,FASTLSBPRE,$1\8]
; reading “mode” from PS2 controller
; 73(hex) is dualshock1 (digital buttons)
; 79(hex) is dualshock2 (analog buttons)
shiftin DAT,CLK,FASTLSBPOST,[mode\8]
high SEL

if (mode <> $73) and (mode <> $79) then again

;-----------------------------

pause 1

;-----------PS2 Data----------
low SEL
; asking data to PS2 controller
shiftout CMD,CLK,FASTLSBPRE,$1\8,$42\8]
; reading data from controller
; (don’t use a “for-next” loop, it’s too slow to read PS2 data)
shiftin DAT,CLK,FASTLSBPOST,[temp(0)\8,temp(1)\8,temp(2)\8,temp(3)\8,temp(4)\8,temp(5)\8,temp(6)\8,temp(7)\8,temp(8)\8, |
temp(9)\8,temp(10)\8,temp(11)\8,temp(12)\8,temp(13)\8,temp(14)\8,temp(15)\8,temp(16)\8,temp(17)\8,temp(18)\8]
high SEL
;-----------------------------

pause 1

;-----------PS2 Vibration motors----------
Small_Motor = 1 - Temp(1).bit5 ; Numeric right arrow button (Small Motor on/off)
Large_Motor = Temp(8) ; Analog left arrow button (Large Motor speed)

low SEL
; asking data to PS2 controller (again)
; sending at the same time the vibration motors speed to perform
; (using the previously read analog buttons position ( <- : large motor, -> : small motor )
; the more you press on these buttons, the more the corresponding motor vibrates fast
; some wireless PS2 controllers react only to the large motor command and some have no motor at all.
shiftout CMD,CLK,FASTLSBPRE,$1\8,$42\8,$0\8,Small_Motor\8,Large_Motor\8]
; we don’t care about reading the data from the controller here.
; so, why not use this to read PS2 data the first time? because it’s not working:
; as the PS2 controller is starting to send data just after receiving the
; “shiftout CMD,CLK,FASTLSBPRE,$1\8,$42\8…”<------here
; and as we are sending after that some data for motors “… ,$0\8,temp(7)\8,temp(8)\8]”
; it’s now too late to read all the data from the PS2 controller
; because there’s already some bytes sent by it and lost (no buffer here).
high SEL
;-----------------------------

;-----------Basic Micro IDE terminal----------
; sending carriage return (CR = 13) and the PS2 mode(hex) to the PC
serout S_OUT,i57600,[13, hex2 mode\2] ; Basic Micro Pro IDE

for index = 1 to 18 ; temp(0) contains a dummy variable so we don’t send it to the PC
; sending all the data to the PC
serout S_OUT,i57600," ", dec3 temp(index)\3] ; Basic Micro Pro IDE
next
;-----------------------------

goto main

[/code]
I found it in a post on the forum. I’m adding the controller to the autonomous rover, so I’m using an atom pro 28 pin on a bb2. And by the wire colours, i mean the wires as shown in the build guide, as in my wiring harness (that’s giving in a lot of credit actually, just a solderless breadboard for testing purposes.

here’s a pic, not that it shows a lot, i used paint to make it clearer :slight_smile:

i669.photobucket.com/albums/vv57 … IM1064.jpg

the coloured wires are into the receiver as to the build guide, so I didn’t bother with that pic. Here’s the youtube video of the flashing lights

youtube.com/watch?v=p3ffDs3DZhM

it’s dark and you can’t see a green LED beside the red one, but it is there. Interesting note, when i pushed button A and C the flashing changed and the green light came on, but button B did nothing. Any other information that might help? Note i added another 1k resistor for the clock line that wasn’t there before, but nothing changed.[code]

[/code]

Yeah, the pix and the video don’t do much.

Have you looked up the guides for a PS2 and a BB2?

lynxmotion.com/images/html/build035.htm

They typically show the PS2 connector, and where to connect the pins to the BB2.

Your code looks like it’s probably got what’s needed. just make sure you’ve got it wired per the build/tutorial.

for $20 you can get an LM wireless PS2, and we know that works. After playing with that, then you might be able to get something else working. Probably not exactly what you wanted to hear.

Do you get the LED activity I described?

Do you get to the output of the PS2 mode to the PC?

Alan KM6VV

Maybe interesting, but not advisable. If you look at the schematic of the bot board you will see pressing the buttons shorts the I/O pin to ground. You should remove the LED / Pushbutton enable jumpers or just not press the buttons…

Shenzhen does a good job of making these controllers as inexpensively as possible. The problem is the DOA rate is high. I have personally bought at least a dozen of them from WalMart under various names and found three that were dead on arrival. It is possible that the thing is just dead.

My controllers will sync up with only power applied to the receiver and batteries installed in the transmitter. With no microcontroller connected.

Really? The right-hand LED will turn from blinking to steady? I don’t think I’m seeing that. In fact, when debug was turned on and as I found out the timing was too slow to properly send the new mode commands, the PS2 did not sync up. I’ll experiment a little more, but that’s what I’ve been observing.

“Sync” also being indicated by the few flashes on the remote joystick ceasing?

Good to know.

Alan KM6VV

Yep, just tried it again just to make sure I remembered it correctly. Power up receiver only, no microcontroller connected, left LED solid, right LED blinks, turn on transmitter, both transmitter LED’s blink twice and go out, then receiver right LED goes solid. 8)

I wish I had known about this a long time ago. It would have made a lot of troubleshooting a lot easier! :open_mouth:

With the receiver connected to a micro that is stepping through commands it could do weird things. No microcontroller and one that is slowed down to a crawl is different.

Also unfortunately I do not know if the other brands work this way. Hope this helps.

Thanks for the verification!

That’s really a surprise to me. I think I’ll use one of the on-board BB2 LEDs to indicate successful command reads, much like the SSC-32 flashes when it gets data.

As soon as I ran debug, it was no surprise that it would mess up the PS2 communications. Could probably step over it or something. I wasn’t really wanting to use debug immediately; just see what it offered.

Good information,

Thanks!

Alan KM6VV