PS2 controller not working

My Lynxmotion wireless ps2 seems to have stopped working; The code i am using hasnt changed at all but the wireless module no longer blinks a light when waiting for the ps2 controller to connect. Instead i only get a single led on. Might i have a bad module? It used to work until i connect a 7 volt battery to the bot board. Just in case it is my code the following is the code I am running:

;-----------Bot Board Selection----------

;PS2 Controller / BotBoard II
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

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
;-----------------------------

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

;-----------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 IDE <= 02.2.1.1
;serout S_OUT,I8N1_57600,[13, hex2 mode\2] ; Basic Micro IDE <= 05.3.0.0
serout S_OUT,i57600,[13, hex2 mode\2] ; Basic Micro Pro IDE <= 08.0.1.7

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 IDE <= 02.2.1.1
;serout S_OUT,I8N1_57600," ", dec3 temp(index)\3] ; Basic Micro IDE <= 05.3.0.0
serout S_OUT,i57600," ", dec3 temp(index)\3] ; Basic Micro Pro IDE <= 08.0.1.7
next
;-----------------------------

goto main

Did you perhaps have the PS2 receiver connected to VS by mistake? It would explain the stopping working after 7vdc was applied… The receiver and transmitter will connect with only power (5vdc) applied. So code would be the last place I would look. Remove the 4 wire cable but leave the 2 wire (power) cable attached to remove the microcontroller influence completely.

Okay, so I treid connecting just the two wire power to the bot board and still I get a single LED on for wireless module. I looked over what i did earlier and am fairly certian I didnt send 7 volts to the data lines, only the power lines.

Can you be more specific. Define Power Lines.

So the two pin connector is with the black ( ground) and yellow/red (5volts) is the power line for the wireless module when using your ps2 connector cable, correct?

Yes, that’s correct. So you put 7 volts on those lines?

Yep, and either that caused the module to stop working or I sent some kind of accidental command that locked the PS2 controller in an inactive mode. The later seems unlikely since it ought to be cleared by a power cycle.

I am sorry to have to be the bearer of bad news but the receiver is designed for 5vdc. When you connected it to 7vdc you most likely killed it. :frowning: All of the tutorials we provide illustrate using 5vdc to power the PS2 receiver. Sorry dude…

Thanks; its good to know at least that the source of the problem has been identified :slight_smile: I guess its time to order a new controller and be more careful with it next time.