W5200 Power down pin

Hi, Does anyone have any experience in using the power down function on the W5200? When I power it down how do I wake it up and tell it to get a new DHCP lease etc?

Thanks

W5200

I guess you're writing about the WizNet5200. Next time, please supply a link to the datasheet or product description so we don't have to guess.

When I power it down how do I wake it up

Pull PWDN pin to LOW.

tell it to get a new DHCP lease

That's done in software to my knowledge. So just reinitialize the object and you'll get a new lease.

Sorry about that
http://www.wiznet.co.kr/Sub_Modules/en/product/Product_Detail.asp?cate1=&cate2=&cate3=&pid=1161

The problem is I can’t call Ethernet.begin again unless I am missing something

The problem is I can't call Ethernet.begin again unless I am missing something

Why can't you call Ethernet.begin() again? If you just wanna get a new lease (without initializing the chip again), call Ethernet.maintain() but after powering down and up again I would assure that the registers are set correctly.

You might be able to tinker with the below test code putting the ethernet begin down in the get function. In the get function you might enable the ethernet shield, add a delay for it to come up to speed, then do the ethernet begin, and at the end of the function shut down the ethernet shield. you may need to comment out the getting of the local IP address as it required a line or two added to the ethernet library.

//zoomkat 2-13-12
//DNS and DHCP-based web client test code
//for use with IDE 1.0
//open serial monitor and send an e to test
//and to see test result
//for use with W5100 based ethernet shields
//browser equivelant URL: 
// http://web.comporium.net/~shb/arduino.txt
//note that the below bug fix may be required
// http://code.google.com/p/arduino/issues/detail?id=605 

#include <SPI.h>
#include <Ethernet.h>
byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED }; //physical mac address
char serverName[] = "web.comporium.net"; // zoomkat's test web page server
EthernetClient client;

//////////////////////

void setup(){
  Serial.begin(9600); 
  Serial.println("DNS and DHCP-based web client test 2/13/12"); // so I can keep track of what is loaded
  Serial.println("Send an e in serial monitor to test"); // what to do to test
  // start the Ethernet connection:
  if (Ethernet.begin(mac) == 0) {
    Serial.println("Failed to configure Ethernet using DHCP");
    // no point in carrying on, so do nothing forevermore:
    while(true);
  }
  // print your local IP address:
  Serial.print("Arduino IP address: ");
  for (byte thisByte = 0; thisByte < 4; thisByte++) {
    // print the value of each byte of the IP address:
    Serial.print(Ethernet.localIP()[thisByte], DEC);
    Serial.print("."); 
  }
  Serial.println();
  Serial.println();
}

void loop(){
  // check for serial input
  if (Serial.available() > 0) //if something in serial buffer
  {
    byte inChar; // sets inChar as a byte
    inChar = Serial.read(); //gets byte from buffer
    if(inChar == 'e') // checks to see byte is an e
    {
      sendGET(); // call sendGET function below when byte is an e
    }
  }  
} 

//////////////////////////

void sendGET() //client function to send/receive GET request data.
{
  if (client.connect(serverName, 80)) {  //starts client connection, checks for connection
    Serial.println("connected");
    client.println("GET /~shb/arduino.txt HTTP/1.0"); //download text
    client.println(); //end of get request
  } 
  else {
    Serial.println("connection failed"); //error message if no client connect
    Serial.println();
  }

  while(client.connected() && !client.available()) delay(1); //waits for data
  while (client.connected() || client.available()) { //connected or data available
    char c = client.read(); //gets byte from ethernet buffer
    Serial.print(c); //prints byte to serial monitor 
  }

  Serial.println();
  Serial.println("disconnecting.");
  Serial.println("==================");
  Serial.println();
  client.stop(); //stop client

}

I have ethernet.maintain and it doesn't seem to help. it just hangs on the second loop, as it can't resolve DNS or anything. that it needs to in order to perform other functions All I am doing is pulling the power down pin high, then waiting while it is not used, then pulling it low and performing an ethernet maintain. doesn't work

You cannot use Ethernet.maintain() after you powered the device down. Use Ethernet.begin() to initialise the device again (setting all the registers to the needed values).