DFRobot W5200 V1.1 and Arduino Ethernet 2.0 Lib

Having searched the forums, Googled for a full day, I am at my wits end. I really want to use the standard Arduino Ethernet 2.0 Library as I have some other code (ICMPPing) that uses that specific library. I am not swift enough to modify libraries!

Everything I have read states that the Arduino supported Ethernet 2.0 library supports the W5100, W5200 and W5500 chipset. The shield I am trying to us is a W5200 chipset. BTW, my code works very well using a SunFounder W5100 Shield.

Assuming that the Ethernet library supports the 5200 chips, I should be able to put the shield on my UNO and it should work. It simply does not. I cannot set an IP and as a matter of fact;

Ethernet.hardwareStatus() = EthernetNoHardware.

My 5100 shows correctly; Ethernet5100

How on Earth do I get my DFRobot W5200 shield to work? In my research, all I have found is to use a different W5200 Ethernet library! Can't do it! Need the one I am using!!

If you guys need any code, I am simply using the Webserver example and have added and deleted other code to try and find out what's happening.

Any help would be appreciated!!

John

I have finally found my answer! It was a shot in the dark, as far as I was concerned, as the Ethernet library being used was one specifically written for the W5200 controller. I figured, what the heck. Even the wiki pages for the DFRobot product mentioned their library and had similar info which I also tried with the official Arduino Ethernet lib.

We need to define the pins that this board uses as obviously they are different from the standard W5100 shields. (I cleaned up the code I found).

// Some defines for the DFRobot W5200 EThernet Board
#define SS 10          // Chip Select Pin
#define nRST 8         // Reset Pin
#define nPWDN 9        // Power Down (Enable) Pin
#define nINT 3         //  Interupt Input

// Comment out #define W5200 if that Ethernet controller is NOT used
#define W5200

In setup() we need to add;

// Code to setup the DFRobot W5200. Comment out correct #define above
 #ifdef W5200
   pinMode(SS,OUTPUT);
   pinMode(nRST,OUTPUT);
   pinMode(nPWDN,OUTPUT);
   pinMode(nINT,INPUT); 
   digitalWrite(nPWDN,LOW); //Enable DC power i.e. Disable PowerDown
   digitalWrite(nRST,LOW); // Do a reset after power on
   delay(50);
   digitalWrite(nRST,HIGH);
   delay(100); // wait for W5200 to reset
 #endif
// End of Special W5200 Code

In another post I learned that some W5200 boards had a problem after power on so a reset was performed to fix that issue AND the DFRobot board does in fact have that issue. The only parameter that truly needed to be defined to use this board and the official Arduino ethernet library is nRST, the reset pin. The others I have commented out in my project.

So after power on, just do a reset by setting the reset pin low for a moment then back high to enable. That's all I needed. Sure wish this could have been easier to find but I learned a bunch!

I truly hope this helps some other Arduino ethernet newbie!

John