Generic controller not working
eduardri opened this issue · 3 comments
I have 2 different kind generic controllers (made in china), one of them work perfect, but the other kind don't work with PSXNwelib.
I try withe library PS2X_lib and the control work, switch to PsxNewLib and stop to work, the leds on the receiver blink and looks like no binding with the controller
DUMP_COMMS:
<-- 01 42 00
--> FF FF FF
<-- 01 42 00
--> FF FF FF
<-- 01 42 00
--> FF FF FF
<-- 01 42 00
--> FF FF FF
<-- 01 42 00
--> FF FF FF
<-- 01 42 00
--> FF FF FF
could you help with this issue?
Hard to say without more info: What are you using to do the level shifting? What pullups are you using? How are you generating the 3.3V?
I'm using arduino nano, to supply the 3.3v direct form the borad,
arduino is connected to usb, no resistor connected to the receiver, i read about using 10k resistors but not difference.
if i Connect "brand a" is working, switch to "brand b" not working
both brands work if i change to old PS2X_lib.
what test do i need to do?
This makes me realize I need to improve the wiring instructions.
-
You MUST do some kind of level-shifting if you are using an Arduino working at 5V, as the controller works at 3.3V. There are various techniques for this, I usually use the bidirectional shifters based on the BSS138 MOSFET, they work well in this case.
-
You MUST add pull-up resistors on the DAT, CMD and CLK lines. In the future one on ACK will be required too. The level-shifting technique I suggested above already includes them, but if you are using a different technique, or if you are using an Arduino board that works at 3.3V, you will need to add these pull-ups externally. They MUST be 1k.
-
All of the above is implemented on my PsxControllerShield.
I'm sorry but I really cannot support users of this library that do not connect controllers the right way to begin with.