Monday, April 19, 2010

Writing to the NES

Today we successfully used the computer keyboard via serial terminal to control the NES.  We tested everything using Super Mario Bros. 3.

We ran into some trouble in trying to use the Firefly to mimic the 4021 parallel/serial shift register IC that's in the NES controller.  Apparently the Atmega chip that the Firefly uses is just too fast to achieve the correct division you would need to send data out to the NES at the correct frequency (83.33 KHz).

Using a USB TV Tuner to view the NES game on a laptop

We then attempted to use SPI (Serial Peripheral Interface) with the Firefly as a slave to the NES.  That way the NES could provide the correct clock frequency and latch signal and the Firefly could output data accordingly.  However, to accomplish this on the Firefly you must de-solder a resistor and switch one of the reset lines.  Long story short, we were asked to find another solution.

Stripping the wires of an NES controller

So we decided to simply stop trying to reinvent the wheel.  We de-soldered the 4021 chip from the NES controller and connected 8 GPIO pins from the Firefly to the 8 parallel input pins of the chip.  Finally, after more than a week of head-scratching, we were able to control the NES using the PC keyboard.  Check the video below to see our setup in action.  


This week's goal will be to figure out wireless transmission so we can efficiently transmit the ADC information from the Firefly node in the gun to the receiver Firefly node connected to the NES. We'll also post pictures of what the inside of the toy gun looks like.

1 comment:

  1. If you have to improve your understanding simply keep passing by this site and be overhauled with the most recent news update posted here.
    Learn Read Hebrew