Homepage Forums RetroPie Project GPIO Adapter, ControlBlock etc. Using original NES controller with bi-directional logic level shifter

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #88534
    ste2425
    Participant

    Hi guys

    Im using the following logic level shifter:

    level shifter

    This is because my NES controller requires 5v to function correctly so this allows me to run the controller on 5v without frying the RPI.

    I am however experiencing some strange behaviour. Firstly everything is connected up at the moment by jumper wires but before i solder it all up i wanted to ask can anyone predict problems with using a level shifter?

    My issue is jstest reports only the A button being pressed whilst all others are not pressed.
    Im using the snesdev driver enabled to check pads and button presses.
    Its wired up as follows:
    Data: 5
    Clock: 19
    Latch: 23

    Snesdev is not maintained by the retropie people is it? Would my guestion be better directed at them?

    Thanks all

    #88568
    petrockblog
    Keymaster

    Actually, I am the author of SNESDev.

    My experience is that you can poll NES controllers also with 3.3V so that you do not need level-shifters at all ad things get less complex! The RetroPie GPIO Adapter also uses the 3.3 V supply voltage.

    #88585
    ste2425
    Participant

    Ahh awesome, thanks for creating it!

    Yea i tried without the shifter running on 3v and nothing, jstest reported no response. I then briefly ran it on 5v and jstest showed life. Admittedly i cant remember which buttons i pressed, probably only A. I then quickly turned it all off for fear of damaging the Rpi. It was from this i concluded a shifter would be required.

    Ive read that there are three types of controllers, ones that are 3v compliant, ones that require 5v power but can run on 3v logic and ones (like mine) that require 5v across the board.

    Ive since soldered up the shifter and im getting better results, however still only the A button respond, however this time its a solid yes no when i press the button. Previously it would flicker one way or the other, so soldering it up helped with that.

    I remember reading on here about people where only the A button would respond but can’t find the threads now.

    Thanks Stephen

    #88597
    ste2425
    Participant

    Another update. It works with data on pin 7, however on pin 5 only the A button reports any response. So Emulation station sets up the controller correctly when using pin7 however this reports as player two. What is the difference if any between the gpio pins? Could it be a damaged pin on the rpi?

    Is it possible to tell snes dev to use different gpio pins for player one and two?

    Could it be because of this?

    “Pins 3 and 5 are also used for I2C which requires a pull-up in this case to 3V3, so it is already on the board as many I2C devices can be connected but only one pullup is required on each pin.”

    From: source

    EDIT:

    Fixed it, changed the data1 pin to 7 and data2 to 10. Then rebuilt it from source and all working grand.

    If you open for pull requests ill add changes to make the data, latch and clock pins optional overrides according to the config, shouldn’t be hard at all looking at it.

    #88923
    petrockblog
    Keymaster

    Sure, just post a pull request!

Viewing 5 posts - 1 through 5 (of 5 total)
  • The forum ‘GPIO Adapter, ControlBlock etc.’ is closed to new topics and replies.