SD card.init failing - HX8357D with 2560Mega R3

EL Wire/Tape/Panels, LEDs, pixels and strips, LCDs and TFTs, etc products from Adafruit

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
digitalgriffin
 
Posts: 3
Joined: Fri Jun 08, 2018 10:29 am

SD card.init failing - HX8357D with 2560Mega R3

Post by digitalgriffin »

I'm having a problem getting the HX8357D SD card reader to work properly on the arduino mega.

Every other test works with the display, and I have CCS hooked to digital 4 (per demo code and instructions)

I have GND, VIN, CLK, MISO, MOSI, CS, D/C RST, Y+, X+, Y- and X-, and even GND hooked up in addition to CCS.

I have checked that the card is firmly seated. I have pulled the card and rechecked it on the computer. I tried both FAT and FAT32 on the 4GB SD card. The jumpers.bmp is indeed in the root.

And yes I went back and RTFM :) (First rule for engineers)

Code: Select all

#include <Adafruit_GFX.h>    // Core graphics library
#include "Adafruit_HX8357.h"
#include <SPI.h>
#include <SD.h>

// TFT display and SD card will share the hardware SPI interface.
// Hardware SPI pins are specific to the Arduino board type and
// cannot be remapped to alternate pins.  For Arduino Uno,
// Duemilanove, etc., pin 11 = MOSI, pin 12 = MISO, pin 13 = SCK.

#define TFT_DC 9
#define TFT_CS 10
// Use hardware SPI (on Uno, #13, #12, #11) and the above for CS/DC
Adafruit_HX8357 tft = Adafruit_HX8357(TFT_CS, TFT_DC);

#define SD_CS 4

void setup(void) {
  Serial.begin(9600);

  tft.begin(HX8357D);
  tft.fillScreen(HX8357_BLUE);
  
  Serial.print("Initializing SD card...");
  if (!SD.begin(SD_CS)) {
    Serial.println("failed!");
  }
  Serial.println("OK!");

  bmpDraw("/jumpers.bmp", 0, 0);
}
Any tips? I purchased this card via adafruit store on amazon.

User avatar
digitalgriffin
 
Posts: 3
Joined: Fri Jun 08, 2018 10:29 am

Re: SD card.init failing - HX8357D with 2560Mega R3

Post by digitalgriffin »

Well I did a pullup on The CD (Card detect) and it always reads that the card is present whether in or out.

I think the SD Card reader is dead

Code: Select all

void setup(void) {
  Serial.begin(9600);


  tft.begin(HX8357D);
  tft.fillScreen(HX8357_BLUE);
  
  Serial.print("Initializing SD card...");
  if (!SD.begin(SD_CS)) {
    pinMode(5,  INPUT_PULLUP);
    Serial.println("failed!");
    int cardfound = digitalRead(5);
    if (cardfound == 0)
    {
      Serial.println("Card Not Found");
    }
    else
    {
      Serial.print("Card Found");
      Serial.println( cardfound );
    }
  }
  Serial.println("OK!");

  bmpDraw("jumpers.bmp", 0, 0);
}

User avatar
digitalgriffin
 
Posts: 3
Joined: Fri Jun 08, 2018 10:29 am

Re: SD card.init failing - HX8357D with 2560Mega R3

Post by digitalgriffin »

I went into the SD card code and started breaking out the pieces. It fails on the first initialization lines. Coupled with the failed CD detect tells me the SD reader is dead. I even held a pin straight to the breakout board in hopes of a bad solder job. No dice.

May I get some technical support or start the RMA process please? Or should I send it back to amazon? I'm well within my 30 days.

I can furnish the receipt that shows I bought it from the adafruit store on amazon.

Locked
Please be positive and constructive with your questions and comments.

Return to “Glowy things (LCD, LED, TFT, EL) purchased at Adafruit”