Here is my first problem that I had with the joysticks :
A simple
short between
L/R and
GND on both joystick FFC connector !
Some
measurements on the test pads allowed me to find quickly enough, always add
test pads on your PCBs !
Thank you very much
@Gman for your help in guiding me in the right direction.
The second problem is that I
reversed the
start and
select button, so I just
reverse the pin in the PS2 plus
code :
And my biggest problem now is that the
joysticks don't want to be configured correctly when I run the configuration function of the PS2 plus code (L1, L2, Select).
Gman advised me to
measure the voltage values returned by the joysticks, and these values are good, which exclude out the idea of defective joysticks.
Here is my values :
After that I had the idea to put the voltage values that I found in min and max directly in the code (by putting in the form 0-255, 255 is the max voltage is 3.3V here).
Like that when I press L2, R2, Start and Select it puts this values in the EEProm.
After test, it seems to work, but another problem is the stick are inverted, and there is only one direction that works (up and left, right and down don't work).
As we can't just put a - since the joystick values are in a 0- 3.3V range, I added this in the code : inMin+(inMax-x)
which allows to
reverse the direction :
And after
testing that
reverses the directions well, but I still have my problem,
the joysticks only go in one direction per axis (only up even when I put the joystick down, the same when I put the stick to the left, it goes left but when I put it on the right it also goes left).
This drawing better explains my problem :
If anyone have idea