brownan / Gamecube-N64-Controller

Connect a Gamecube controller to a Nintendo 64 using only an Arduino and a single resistor
125 stars 25 forks source link

To use another Arduino Board #3

Open jesuspk157 opened 8 years ago

jesuspk157 commented 8 years ago

Hi, this project is awesome. I have tried this with the Arduino Uno and it run perfectly, but what about to use a powerfull board? For example the Arduino Mega.

You about this topic said: "I used the Duemilanove with an AtMega328 running at 16MHz. A different chip may have different timings, and a different speed will most certainly require modifications to the timing code."

Differences between Uno and Mega: Uno: ATmega328 - 16MHz - 32Kb Mega: ATmega2560 - 16MHz - 256Kb

What I should investigate or read and modify to run your project in a Arduino Mega? My project it is about create a wearable or a gun controller for N64 using Arduino, Maybe I wont use a Wii controller for that reason I need a many digital entries for the different buttons.

Thank you.

NicoHood commented 8 years ago

Just follow the readme and click this link: https://github.com/brownan/Gamecube-N64-Controller#see-also

brownan commented 8 years ago

If the other chip is 16MHz as well, then the cycle budgets in the assembly critical sections should stay the same. You just have to make sure each instruction takes the same number of cycles. Most instructions take the same number of cycles regardless of chip according to the AVR Instruction Set Manual, but a few instructions have notes next to them.

If they're both 16MHz I'd suggest trying it and seeing what happens. It may work just fine. I just didn't want to make a blanket statement about which chips it works with and which it doesn't. I've only tested it on the one chip.

If you get it to work, let us know. I'll leave this issue open as a discussion on getting the code to work on ATmega2560 chips.