My question is has anyone been able to successfully initialize and read/write to a SD card with the Pro Micro series (32U4) of devices AND Arduino 1.0 using the included SD library? If so, any tips or suggestions would be appreciated.
Where electronics enthusiasts find answers.
#if defined(__AVR_ATmega32U4__) Serial.begin(9600); Serial.print("test"); #endif
#elif defined(__AVR_ATmega32U4__) // Teensy 2.0 // Two Wire (aka I2C) ports uint8_t const SDA_PIN = 6; uint8_t const SCL_PIN = 5; // SPI port uint8_t const SS_PIN = 0; uint8_t const MOSI_PIN = 2; uint8_t const MISO_PIN = 3; uint8_t const SCK_PIN = 1;
#elif defined(__AVR_ATmega32U4__) // Teensy 2.0 // Two Wire (aka I2C) ports uint8_t const SDA_PIN = 6; uint8_t const SCL_PIN = 5; // SPI port uint8_t const SS_PIN = 10; uint8_t const MOSI_PIN = 16; uint8_t const MISO_PIN = 14; uint8_t const SCK_PIN = 15; /* // Original definitions uint8_t const SS_PIN = 0; uint8_t const MOSI_PIN = 2; uint8_t const MISO_PIN = 3; uint8_t const SCK_PIN = 1; */
const int chipSelect = 4;
const int chipSelect = 10;
jpsdr wrote:Just an update. I *FINALLY* got it to work. It turns out there is a bug in the SD library in the Arduino 1.0 release. I downloaded the beta version of the most recent SDfat from http://code.google.com/p/beta-lib/downloads/list . There is a release http://code.google.com/p/beta-lib/downl ... p&can=2&q= (version 20120327...beta), that has revised handling of the SPI pins. Though, it is listed as beta, it worked just fine!Can you elaborate on how you got it work with the SDFat library? It is not working for me. I can however get the regular SD library to work using s4i1mow6's solution. I would like to use the SDfat library for performance gains though. Thanks in advance for the help!
We have created lots of YouTube videos just so you can achieve [...]
The best flat phpBB theme around. Period. Fine craftmanship and [...]
All you need is right here. Content tag, SEO, listing, Pizza and spaghetti [...]
this should be fantastic. but what about links,images, bbcodes etc etc? [...]