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?

\$\endgroup\$
  • \$\begingroup\$ What is NES/SNES? \$\endgroup\$ – jippie May 26 '13 at 20:52
  • 1
    \$\begingroup\$ @jippie Really? Nintendo Entertainment System / Super Nintendo Entertainment System. \$\endgroup\$ – Adam Lawrence May 26 '13 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\$ – Dave Tweed May 26 '13 at 21:10
  • \$\begingroup\$ @Madmanguruman Really ... \$\endgroup\$ – jippie May 26 '13 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\$ – jippie May 26 '13 at 21:26
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...)

\$\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).

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.