gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

DS homebrew announcements > ds2arduino (connect NDSL with ARDUINO)

#172396 - hounjini - Thu Feb 04, 2010 3:02 pm

http://www.instructables.com/id/Connect-NDSL-with-ARDUINO/
this is my instructable see to more information.

What you can do with it :
transmit data between arduino and ndsl.
so, you can use your ndsl to arduino's wireless lan or arduino to your ndsl's digital IO port!

What you need:
Hardware :
NDSL GBA cart cover
nintendo Y driver (eventhough you don`t have, no problem!)
some wires (3 wires, enough! 4 wires GREAT)
cutter knife,
soldering iron,
solder,
ARDUINO
NDSL

Software:
devkitpro
libnds (for nintendo development)
arduino

How it works:
NDSL has GBA bus. It has /WR pin and External interrupt pin.
If you access gba bus, /WR will toggled, so I can use /WR to send data.
However, it lasts just 350us. It mean you cannot use this pin to digital I/O pin directly.
So I mimic NEC REMOTE CONTROLLER protocol(TV, VIDEO etc...)
External interrupt pin is used to receive data, /WR pin is used to send data.
ARDUINO works exactly same way.

What's new? What's GOOD:
You can use your slot1 device already you have.
In addition to, If you have ARDUINO already, making your own gba connector is cheaper than buy another transmittable slot1 or slot2 device.


these are my youtube video
http://www.youtube.com/watch?v=CnBe5NonHLA
http://www.youtube.com/watch?v=B3aEGCiGEaA
http://www.youtube.com/watch?v=BddcjIB_sPQ

this is 3rd movies source code for arduino.
ndsl's code is attached in library archive.

Code:

NDSL sends counter data starts from 0.
Everytime clicking + PAD, counter is incresed.
If data is even number, LED is off.
If data is odd number, LED is on.   


#include <ds2arduino.h>
uint32_t temp = 0;
void setup()
{
  ndslArduino.initialize(5, 2);
  pinMode(13, OUTPUT);
}

void loop()
{
  temp = ndslArduino.getData();
  if(temp & 1) {
    digitalWrite(13, HIGH);
  } else {
    digitalWrite(13, LOW);
  }
}





this is my source code(library + example)
http://code.google.com/p/ds2arduino/


I tested it only with my NDSL and ARDUINO, so it could have some errors.
If you have any question or find problem, send me mail
hounjini at gmail.com

Thank you for reading.


Last edited by hounjini on Sat Feb 06, 2010 3:18 am; edited 6 times in total

#172400 - gauauu - Thu Feb 04, 2010 3:48 pm

Neat, thanks for posting this.

#172474 - tondopie - Tue Feb 09, 2010 5:22 am

I'm assuming this works for the original DS as well? I may try this, if I decided to spring for an ARDUINO. Torn between that and an ARM Samsung S3C2440 development kit...

#172479 - Diddl - Tue Feb 09, 2010 11:32 am

It is much better to use GeekPort for this.


Geekport is a Slot-2 card with a Atmega-8 on it. NDS can send and receive Data to Geekport. The ATmega within the GeekPort can communicate with the world over SPI, I2C, RS232, digital and analog IO.

#172485 - bear - Tue Feb 09, 2010 6:01 pm

Even if it is a bit limited in IO it's nice that it uses the slot-2 cover.

I just got myself a http://dsbrut.sukzessiv.net/ for a ds/arduino/hardware project. It doesn't have as many IO:s as the GeekPort but fits me much better since I have an old slot-2 homebrew/storage solution.

#172592 - Diddl - Wed Feb 17, 2010 7:21 pm

This DS-Brut looks very interesting.

But how to start NDS programs without a Passkey? I think a flashMe firmware is nessecary?