SD Card on Arduino Nano

Hey all,

Has anyone got an SD card working on the Nano?

I'm trying to use the SD.h library but it doesnt offer much information as you cannot set it to particular pins which is frustrating. I believe it attaches itself to the Serial.h library, however this is attached to pins D0 and D1, which is the USB line.

Ideally, i'd like to have the SD card on pins D10-13, so I can still use the USB port, however since there is no option to choose what the SD.h latches onto I cant put it on a software serial port (that I know of.

Any ideas?

Cheers,

Simon

I believe it attaches itself to the Serial.h library, however this is attached to pins D0 and D1, which is the USB line.

Why do believe this? It's wrong.

Ideally, i'd like to have the SD card on pins D10-13

Good thing that's what you'd like. Because that's where it needs to be connected.

Any ideas?

About what? Where to go on vacation? Got them.

Glad youre set for holidays!

It is attached to the serial library, as I am using FastSerial.h
http://code.google.com/p/arducam-osd/source/browse/trunk/Library/FastSerial/?r=245
which overwrites the normal serial library. With this included I get linker errors. Without it works fine.

Is there a way of having 2 SD cards then, or assigning 1 SD card to different pins...not D10-13??

Ive got it working, but its very slow. I guess thats because its FAT32?

It is attached to the serial library

You can't attach hardware to software.

You should post some code, a link the SD card reader/writer you are using, and a schematic showing how it is connected.

Ive got it working, but its very slow. I guess thats because its FAT32?

Or any of a number of other factors. Without seeing any code, or having any idea what you are talking to, or how, we can't offer any more help.

I am using the standard example from the SD.h reference, and the SD card is directly hardwired to the Arduino, so seeing my code is meaningless. The question I asked was can you attach the SD card to any pins I decide upon?

And there is a software serial library so yes you can attach hardware to software as I have done with a Xbee to two random pins operating software serial.

Where on the NewSoftSerial.h file did you plug in the XBee? Don't be silly. You can't connect hardware to software.

If you don't want to describe what SD card you are using, and how it is connected, that's fine. Good luck.

It is quite clear that you can assign any receive and transmit pins for software serial. I have done it, tested it, and have it working fine as per the example in the reference. Xbee, hardware, connected to a software serial port. Done.

As per this example, I have an SD card connected to pins 11-13, chip select is on pin10, which you are free to choose any pin you like. This workd fine. Done.

My question: has anyone successfully connected an SD card to any other pins, not just the standard 11-13.

Xbee, hardware, connected to a software serial port. Done.

The "software" serial port is HARDWARE.

My question: has anyone successfully connected an SD card to any other pins, not just the standard 11-13.

The SD card is an SPI device. It can only be connected to the SPI pins.