sd card non funziona

Salve,

Ho una ethenret shield con arduino mega, vorrei utilizzare la SD card ma caricando il codice non mi permette ne di scrivere ne di leggere la SD.
Quale può essere il problema ?

quale è il codice?

Il codice è quello degli esempi nel programma di arduino ESEMPI>SD> cardinfo ma anche se provo gli altri non funziona ugualmente.

cardinfo non fa nessuna lettura/scrittura, elenca semplicemente le caratteristiche della SD.
comunque, se speri in un aiuto dovresti fornire più indicazioni. per come hai spiegato il problema solo un veggente ti può rispondere.

board?
shield?
SD?
formattata come?
hai altro collegato alla scheda?
l'ide che errore da?
nel monitor seriale cosa appare?

...cose così :wink:

Ho un arduino mega 2560 a cui è collegata una ethernet shield e proprio nella ethernet shield c'è il lettore micro SD.

La SD l'ho acquistato sul web sicuramente non è di ottima qualità ma provandola normalmente funziona.
Ho formattato la micro SD con FAT 32

nel monitor seriale appare :

Initializing SD card .... initalization failed. Things to check...................................

In pratica mi dice che c'è un errore.

la shield è quella ufficiale?
prova a formattare la SD in FAT 16.
quando inserisci la sd tieni il reset premuto.

Sia la Mega che la scheda Ethernet devono essere della versione R3 o ci sono problemi con la piedinatura.

Poi ... hai letto in QUESTA pagina l'uso corretto dei pin ?

Arduino communicates with both the W5100 and SD card using the SPI bus (through the ICSP header). This is on digital pins 11, 12, and 13 on the Duemilanove and pins 50, 51, and 52 on the Mega. On both boards, pin 10 is used to select the W5100 and pin 4 for the SD card. These pins cannot be used for general i/o. On the Mega, the hardware SS pin, 53, is not used to select either the W5100 or the SD card, but it must be kept as an output or the SPI interface won't work.

Note that because the W5100 and SD card share the SPI bus, only one can be active at a time. If you are using both peripherals in your program, this should be taken care of by the corresponding libraries. If you're not using one of the peripherals in your program, however, you'll need to explicitly deselect it. To do this with the SD card, set pin 4 as an output and write a high to it. For the W5100, set digital pin 10 as a high output.

Guglielmo

Diciamo che pin non ne collego affatto visto che sovrappongo le due schede e tra l'altro mi sono già connesso ad internet e funziona tutto perfettamente.