Sunday, 11 May 2014

Sainsonic Arduino Mega 2560 SD Card Shield SDFat Config

If you've tried to get your sainsonic SD shield to work with sdfat you would have probably read about people modifying there board to match the pins of software.


DON'T BE SO SILLY!
EVERY PIN CAN BE CONFIGURED!

1. Got to your arduino libraries folder and go to your SDFAT Folder

2. Open File SdFatConfig.h

3. Got the last few lines and change you're to match this -

#define USE_SOFTWARE_SPI 0
// define software SPI pins so Mega can use unmodified 168/328 shields
/** Default Software SPI chip select pin */
uint8_t const SOFT_SPI_CS_PIN = 53;  
/** Software SPI Master Out Slave In pin */
uint8_t const SOFT_SPI_MOSI_PIN = 52;
/** Software SPI Master In Slave Out pin */
uint8_t const SOFT_SPI_MISO_PIN = 50;
/** Software SPI Clock pin */
uint8_t const SOFT_SPI_SCK_PIN = 51;
#endif  // SdFatConfig_h


4.  Now edit any SDFAT demo file to initialize on pin 53 -
      sd.begin(53, SPI_HALF_SPEED)


No comments:

Post a Comment