Go Down

Topic: Changing pins on SD card library? (Read 5279 times) previous topic - next topic

leventerol

I am trying to build an ethernet connected Arduino board with an SD card for a project.
The ethernet card I am using is an ENC28J60 based card, I configured it similar to the tutorial here. The sd breakout board I am using is this one.
The problem is that the libraries used for interfacing both use the same pins(11,12,13). How can I change the pins the SD card library uses so I can have both devices running at the same time?
Any help appreciated!

Update: (I'm using an UNO R3 board)

fat16lib

The LC studio card is not recommended for use with Uno.  This SD module has no 5V -> 3.3V level shifters.  It works with some SD cards but stresses these cards and the Uno by attempting to apply 5V to SD pins.  This causes the SD card to draw high currents through over-voltage protection circuits in the SD.

You can share the SPI bus with multiple devices so it's not clear you need to use other pins. 

The Uno has only one SPI controller but it is possible to use software SPI on other pins with either SdFat https://github.com/greiman/SdFat or the Adafruit SD.h library.  SdFat is faster since software SPI pins must be defined as constants.  The Adafruit SD.h library allows the pin to be defined at run time but is slower.

leventerol


Go Up