Pages: [1]   Go Down
Author Topic: continuity in SD cover and ICSP pin?  (Read 583 times)
0 Members and 1 Guest are viewing this topic.
Santiago
Offline Offline
Newbie
*
Karma: 0
Posts: 8
Hello Arduino World!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello friends!

I'm working in a proyect with LCD + Ethernet w/SD, but i had a little problem smiley-sad

Everything is worrking, but i cant save/read date in my SD card. I know, my shield is from China and nobody likes it
anyway, i realized that one of the ICSP pin is connect with the SD cover...

is it connect or is it a manufactured failure?!

Please help, i need to know this to my thesis!

Thanks for you help!!!
« Last Edit: December 04, 2012, 09:37:50 am by nokasho » Logged

Me

\{end}

Miramar Beach, Florida
Offline Offline
Faraday Member
**
Karma: 147
Posts: 6040
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I'm working in a proyect with LCD + Ethernet w/SD, but i had a little problem
It is helpful if you post links to the exact equipment you are using, then describe how they are connected to the Arduino.
Logged

Santiago
Offline Offline
Newbie
*
Karma: 0
Posts: 8
Hello Arduino World!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm using this:

LCD: http://dx.com/p/lcd-keypad-shield-for-arduino-duemilanove-lcd-1602-118059

Eth: http://dx.com/p/ethernet-shield-with-wiznet-w5100-ethernet-chip-tf-slot-118061

i've tried all example code from SD and SDFAT libraries.

Thanks
Logged

Me

\{end}

Miramar Beach, Florida
Offline Offline
Faraday Member
**
Karma: 147
Posts: 6040
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

OK, simple test sketch that show how to initialize both the w5100 and sd so they work together.
Code:
#include <SPI.h>
#include <Ethernet.h>
#include <SD.h>

byte mac[] = {  0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };

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

  // disable w5100 while starting SD
  pinMode(10,OUTPUT);
  digitalWrite(10,HIGH);

  Serial.print("Starting SD...");
  if(!SD.begin(4)) Serial.println("Failed");
  else Serial.println("ok");

  Serial.println("Starting w5100...")
  if(!Ethernet.begin(mac)) Serial.println("failed");
  else Serial.println("ok");
  // correct Ethernet.begin() SPI SS bug
  digitalWrite(10,HIGH);

  Serial.println("Setup complete");
}

void loop() {
}
Do both start ok?

I recommend compiling and uploading the sketch, then power down the Arduino for a few seconds to get rid of any bad settings from previous tries, and power it up and open the serial monitor. I usually do this after trying someone else's sketch that doesn't follow this procedure to get mine working again.

edit: If the ethernet shield is working ok, then the pin touching the SD slot should not affect the SD. They both use the SPI pins on that connector. One of those ICSP pins is ground, and so is the SD case.
« Last Edit: December 04, 2012, 09:47:16 am by SurferTim » Logged

Santiago
Offline Offline
Newbie
*
Karma: 0
Posts: 8
Hello Arduino World!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Code:
Starting SD...Failed
Starting w5100...
ok
Setup complete

I've tried SD and SDHC, FAT and FAT32, and nothing's working smiley-sad
Logged

Me

\{end}

Miramar Beach, Florida
Offline Offline
Faraday Member
**
Karma: 147
Posts: 6040
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

If the w5100 is returning "ok", then the SPI bus is working. That would eliminate the SD fail due to the touching pin. If that pin touching failed the SPI bus, the w5100 would have also failed.

In this case, you may want to post a question in the storage section of the forum. fat16lib is the guy to get you going with the SD stuff.
Logged

Pages: [1]   Go Up
Jump to: