I’m running the following code to just test a PS2 controller. But, I all get in my debug FF,FF,FF,FF. so, I’m not sure that the DAT (P0) line is working properly. Any ideas?
one1 var byte(18)
high p3
PS2:
pause 10
low p2
shiftout 1,3,6,$01\8,$42\8,$00\8,$FF\8,$FF\8]
shiftin 0,3,7,[one1(1)\8,one1(2)\8,one1(3)\8,one1(4)\8]
high p2
pause 10
debug [dec one1(1)," “, dec one1(2),” “,dec one1(3),” ", dec one1(4),13]
goto PS2
we need more info from you before we can try and figure out the issues you are having?
what electronics are you using?
In particular are you using the Mini Botboard, or botboardII
There are some differences in the pins used in the two boards…
Mini Botboard
DAT con P12
CMD con P13
SEL con P14
CLK con P15
botboardII
DAT con P0
CMD con P1
SEL con P2
CLK con P3
Also in addition to this are what microcontroller do you have, Atom28, Atom pro28, BS2, Other?
Actually the BB2 is setup to use pins 12-15, where the old ABB board used 4-7…
The issue is that that by default there is no Pull up(PU) resistor on pin 0, which is required for the PS2. The processor does have a very weak one that you can enabled. I mentioned it in the thread: viewtopic.php?f=22&t=5958
However this PU is on some Bap28s with some PS2 receivers not strong enough. (works on some, not on others and that is with the same brand PS2s…). In that case you need to add an external PU… Or simply move the PS2 to IO pins 12-15, where we have one built into the board.
I switched the PS2 to pin 12-15 such as:
DAT P12
CMD P13
ATT P14
CLK P15
and added the PS2 command for analog mode (shiftout CMD,CLK,FASTLSBPRE $01\8,$44\8,$00\8,$01\8,$03\8])
and the analog light on the PS2 is illuminated. But the now the debug data is 0,0,0,0. Also would you like to see a pic of the BB2 and PS2 connection ?