Announcement

Collapse
No announcement yet.

Unable to access SD card

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Unable to access SD card

    What special steps are there to access a SD card that is plugged into the PHoC Shield?

    I have tried numerous things, all I get is:


    Initializing SD card...initialization failed. Things to check:
    * is a card inserted?
    * is your wiring correct?
    * did you change the chipSelect pin to match your shield or module?

    Set for pin 4

    Mega 2560 R3
    P4S-347 shield

    Thank you

  • #2
    Same here, bro. Sometimes I got this error too .
    For me, no special step is needed. It works after I reset Arduino.

    P/S: I take a look at https://www.arduino.cc/en/Reference/SD

    " The communication between the microcontroller and the SD card uses SPI, which takes place on digital pins 11, 12, and 13 (on most Arduino boards) or 50, 51, and 52 (Arduino Mega). Additionally, another pin must be used to select the SD card. This can be the hardware SS pin - pin 10 (on most Arduino boards) or pin 53 (on the Mega) - or another pin specified in the call to SD.begin(). Note that even if you don't use the hardware SS pin, it must be left as an output or the SD library won't work. "

    So, you may also try to put this line
    Code:
    pinMode(53, OUTPUT);
    into setup() function.

    Hope that helps.

    Comment


    • Brian Roberts
      Brian Roberts commented
      Editing a comment
      I had noticed that same article and tried 53 as well. I do not believe I added OUTPUT to it though. I just tried it again with OUTPUT listed and same error.

      I just got another Mega 2560. I am working on a project where they need what I have setup already. I have already ordered another P4S-347 shield and expect it in the next couple days. I am hoping to get a different result but.......

    • Homer
      Homer commented
      Editing a comment
      Well, in that case it is worth to try to set the pin to HIGH also.

      And according to this link, you may also try to check and format the card before using.
      https://www.arduino.cc/en/Reference/SDCardNotes

      Let's see if it works or not

  • #3
    You can take a look at this project https://www.hackster.io/khanhhs/ardu...-player-9bc616 , which read file from SD card inserted PHPoC Shield using Arduino Uno

    Comment


    • Brian Roberts
      Brian Roberts commented
      Editing a comment
      I will try that when the new PHPoC comes in
Working...
X