1
\$\begingroup\$

I'm relatively new to electronics - most of my experience is just tinkering with Arduino projects in a more limited sense. I've been working on a project for a week now and have a bit of a (probably basic) quandry.. So I'm trying to convert an SNES controller to be wireless. I've got the SNES Controller side finished - its an ATMega328 + nRF24L01; I'm using the SNESPad library to get input from the controller - I put the state into an int and send it off to the receiver - another ATMega328 and nRF24L01; from there I can bitshift to get the state of each button. That all works perfectly.

What I'm struggling with his how to take the current state and output that back to the SNES. I've looked at the NES/SNES serial protocol, and understand what I need to be doing there, but the only part I can't figure out is how to wire the sucker. The SNES has its 5v vcc line and its ground. I would imagine I would tie its ground to the ATMega's (it's powered by its own source), and not take the 5v. At that point, I should be able to read high/low off of the Clck, latch, and data lines coming from the snes? Or is that not the case?

To sum up the root of the question, I have a powered circuit that I want to interface with another circuit - is sharing ground all I need?

Adam Lawrence
33.6k3 gold badges60 silver badges110 bronze badges
asked May 26, 2013 at 20:16
\$\endgroup\$
8
  • \$\begingroup\$ What is NES/SNES? \$\endgroup\$ Commented May 26, 2013 at 20:52
  • 1
    \$\begingroup\$ @jippie Really? Nintendo Entertainment System / Super Nintendo Entertainment System. \$\endgroup\$ Commented May 26, 2013 at 21:08
  • 1
    \$\begingroup\$ From the context, I'm guessing that it would be the Super Nintendo Entertainment System, a 20+ year old gaming console. \$\endgroup\$ Commented May 26, 2013 at 21:10
  • \$\begingroup\$ @Madmanguruman Really ... \$\endgroup\$ Commented May 26, 2013 at 21:17
  • 1
    \$\begingroup\$ @Madmanguruman at 6 billion people that is a probability of \$\frac{61+49}{6000}\approx1.83\%\$ that I owned one, doesn't sound too strange to me ;o) \$\endgroup\$ Commented May 26, 2013 at 21:26

2 Answers 2

1
\$\begingroup\$

If your ATMega is running off its own 5V rail, connecting the grounds should be all you need to do. If the ATMega is running off a different supply voltage (e.g. 3.3V) you would need some level shifting circuitry to avoid damaging the ATMega with the higher level signals presented by the SNES hardware.

(I wonder why the 5V from the SNES wouldn't be good enough to power your ATMega. I can't imagine it drawing tons of current...)

answered May 26, 2013 at 21:12
\$\endgroup\$
1
\$\begingroup\$

From my understanding, you're trying to send serial data to the SNES from the ATMega. I have also attempted at getting this to jive well with the NES (both use the same kind of controller interfacing, to my understanding).

Unfortunately, I never was able to get this to work well. I don't have an oscilloscope so I had to go off inferences as to whether or not I was doing exactly what I wanted to be doing. I did the wiring the same as you in reference to the grounds.

However, I did find a way around this problem. All you need is another shift register to act like a controller. Connect the latch, clock, and data pins the same way a SNES controller would be connected, but control the parallel data going into the shift register from your ATMega. The processor should work fast enough that the lag between your button presses and when the ATMega responds shouldn't matter when the SNES is reading from the shift register. While this solution is a bit less elegant than directly reading from the ATMega through the serial pin, it's simple to program and implement - it just costs you a bit extra space and time wiring it up.

I actually have a complete blog entry about how to make a wireless NES controller. I recently finished it up after leaving it alone for a few years (oops).

CL.
20.6k5 gold badges43 silver badges69 bronze badges
answered Feb 17, 2016 at 17:56
\$\endgroup\$

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.