Step 3: Wiring the schematic

Picture of Wiring the schematic
Wire the schematic as shown. I recommend doing this on a breadboard. And remember this schematic is based on the Arduino Duemilanove when looking at the pin numbers on the left.

For the SD card, I used a microSD card with a converter that made it into a full sized SD card. I soldered pins onto the converter making it possible to plug it into a breadboard. However you do it, make sure you take note of the pin numbers on the card and wire them correctly.

The pushbutton and switch are not required. If you don't have any handy just use hook up wires that you connect to ground when you want to "push" them, and unplug them when you're done. We will be using the pullups built into the arduino, so none are needed externally.

Note that the grounds from both the arduino and the NES are tied together. Also that  the 4021 IC gets power from the NES, not the arduino.

If you are modifying this to work on another device, the NES LATCH signal MUST go into an interrupt input. Also the SD card must be connected connected to the SPI interface. For more information that, read here, namely the "Physical Connections" section, and substitute your correct pin numbers. Also note that I left pins 0 and 1 on the arduino disconnected. These are for TX/RD to the computer, and will need to be disconnected every time when programming the device, so I worked around them completely. 
techboy4112 years ago
why is the converter is solderder
Kingpin3k3 years ago
Why does the 7421 not work and is it possible to drop the ShiftRegister if you are using the shiftout function of the arduino?
pjgat09 (author)  Kingpin3k3 years ago
The 7421 is a dual 4-input AND gate, so I'm not sure how that would be useful. The closest 7400 series chip I found was the 74165. I actually started by using that chip, but if I recall correctly the clock input is inverted compared to the 4021. I tried using a NOT gate to fix that, but it was too slow and I lost sync very easily.

I switched to using the 4021 after my order for them came in since it is the chip the controller actually uses. I don't think using the shiftout will work on the arduino due to the speed required. The latch pulse arrives every so often, slow enough for the arduino to handle, but after it arrives the 4021 is clocked 7-8 times extremely quickly, faster than the arduino can likely handle.