Go Down

Topic: N64 Controller: Done reasearch, need a pros help (Read 11522 times) previous topic - next topic


Okay so how i understand it from this page:

The n64 controller is 3 cables, 1  grnd, one input (i dont know what for) and a "1 wire interface" that handles almost all of the I/O mentioned in the analysis.

Sending 00000001 (ie 0x01) to this data port returns the overall button status in a 32 bit string, the first 16 are for each of the 14 button positions (ie 0 for off 1 for on) and 2 empty spaces, and the last 16 are for controller position, 8 for L/R and 8 for U/D.

My general question is can i plug this data port into any of the digital ports on my arduino board and write 0x01 to serial and then listen for the button stats? because if so that would make this whole thing extremely easy.

OR do i need to get a little more nitty gritty? it talks at the beginning of the article about how you need to make sure the computer doesnt "up" the signal or you can blow out hardware since the controller has a signal "pullup" installed in it already, is that something i need to be weary of?


I believe you can... but im still learning and dont take my word on it. BUMPY :)


yeah it seems that you are able to read and write serial data quite easily except for im not quite sure how the difference between the 1wire system of the nintendo controller (1grnd, 1pwr, 1 data) translates to the tx/rx system of normal serial communication.


Should be able to just wire tx/rx respectively and serial.print the data from the pin to see what you're getting... correct? least how my gps shield works from serial data...


yes except for that i believe the n64 might not exactly follow normal serial baud rates, it sends about 31250 bytes per second (4us per bit, 3us down 1 up for 0, 3us up 1 down for 1), which is not consistant with any type of baud rate, also i tried a some simple code after plugging the controller in and plugging both tx/rx both into the single data wire, i set the baud rate to 38400 since that was the closest rate to the controller but it doesnt seem to work.

Code: [Select]

int incomingByte=0;
void setup(){
void loop(){
if (Serial.available() > 0) {
   incomingByte = Serial.read();

but i get

Code: [Select]

avrdude: stk500_getsync(): not in sync: resp=0x00
avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x51


Dec 28, 2009, 07:43 pm Last Edit: Dec 28, 2009, 07:53 pm by dashdanw Reason: 1
is there a way to manually read serial high and low signals? if each signal comes at 1us intervals i should be able to send 0x01 as a raw signal with
Code: [Select]

void loop(){
//then a for loop to send 7 sequential zeros
digitalWrite(TX,LOW);  //then write the 1
digitalWrite(TX,LOW);  //then wait for response for 32us

and then plug an LED in to see if there is any kind of response, then i could work with creating a way to recieve the raw bits.


Dec 28, 2009, 10:34 pm Last Edit: Dec 28, 2009, 10:39 pm by frostin Reason: 1
what are you making with this btw?
have you tried different baud rates and testing besides 38400?


yes, i figured since its 4us per bit, that makes 32us per byte, and 1s/32us=31250 then baud rate might be 31250, also tried the standard 4 settings but i think this is going to take a little bit more in-depth bit banging.

I was reading on another page where someone managed to interface it with ps/2 and they did this by sending 7 zeros and 2 ones, im assuming that the first zero needs to be proceeded by a one since it mentions on the same page that the zeros are initiated by a falling edge.

the thing that is peculiar (ie that i dont understand) is that he did this by setting setting it to input for 1 and output for 0 instead of high and low and he uses the 5v ps/2 connection wheras ive been using the 3.3v (which the controller should respond to based on the other article), why is that?


here is a detailed page on the gamecube controller, which is nearly the same, just add another analog stick


might provide some clarification


Also, just curious.. I know it's overlooked quite often, but did you connect the Ground from the controller to the ground of the Arduino?



:D you never know!

I'm kinda lost on this, lol haven't worked with a 1-wire interface of any kind yet. But one thing you could also try, instead of using the regular delay, try using delayMicroseconds.

I'm not sure if it will work.. but it does compile, you might be able to use Serial.begin(31250);

The only 1-wire interface I'm aware of is:
Not sure if that will be any help.. I went looking for my old n64 stuff but turns out my brother took it, lol. :/


ill try it out, also i need to work out the wiring of the whole thing because iwas thinking of maybe using a tx and rx and using diodes to seperate the two data lines and then use diodes to descriminate the connection. would that work?




This is probably the key to your solution:


Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131