Uno Rev 3 Ethernet Shield Issue

Hello all,

I have been troubleshooting all night trying to figure out what I am doing wrong and have hit a roadblock. Hoping somebody can look at this code and serial output and tell me if this is something fixable or if my board is DOA.

To date I have tried:

Removing SD Card
Preventing Ethernet from grounding to USB
Setting Pin 4 to High
Power Cycling

Here is my test code:

#include <SPI.h>
#include <Ethernet.h>

// Enter a MAC address for your controller below.
// Newer Ethernet shields have a MAC address printed on a sticker on the shield
byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
// Set the static IP address to use if the DHCP fails to assign
IPAddress ip(192, 168, 0, 50);

// Initialize the Ethernet client library
// with the IP address and port of the server
// that you want to connect to (port 80 is default for HTTP):
EthernetClient client;

void setup() {
  // Open serial communications and wait for port to open:
  Serial.begin(9600);
  int SDcard_SSpin= 4;  // for Uno anyway
  pinMode(SDcard_SSpin, OUTPUT);
  digitalWrite(SDcard_SSpin, HIGH);
  Ethernet.begin(mac, ip);

}

void loop()
{
  Serial.println(Ethernet.localIP());
  delay(1000);
}

HERE IS THE RESULT from serial:

140.79.175.131
190.27.0.4
147.139.222.219
255.0.0.0
0.0.7.0
3.0.0.0
0.0.0.0
0.0.0.0
0.0.0.0
0.0.0.0
0.0.0.0
0.0.0.0
0.0.0.0
0.0.0.0
0.0.0.0
0.0.0.0

I'm new to programming, but is this some sort of Memory leak or something?

To clarify the serial output is the result of this code:

void loop()
{
Serial.println(Ethernet.localIP());
delay(1000);
}

Do you have an original Arduino Ethernet Shield? Did you check the connection on the ICSP header (that's where the SPI lines are interconnected).

Are both the Uno and ethernet shield R3 models?

In addition to pylon's suggestion, check for solder bridges on the w5100.
http://s681.photobucket.com/user/grue2/media/Computers/pict10852.jpg.html

Some are not as obvious as that pic. Here is a link to a post that has solder bridges that are not quite so easy to spot.
http://forum.arduino.cc/index.php?topic=268122.msg1890500#msg1890500

Thank you for the replies. I had an epiphany when I woke up this morning and resolved the issue before work! Turns out it was stupid oversight on my part. I had downloaded the custom ETHERNETV_2.h from seeedstudio but imported the default ETHERNET.h library into my sketch instead :roll_eyes: :blush: Changed the #include and now everything is awesome.

Thanks for the prompt responses though, community here is great!