Wiznet820io and Arduino Micro (Leonardo)

I’m attempting to run some of the standard Arduino Demos using the 820io Module and an Arduino Micro. The Micro is a little different than the Uno or Mega, and is essentially the same as the Arduino Leonardo, just for reference. I’m using the ICSP header on top to get my MISO/MOSI/SCK connections.

My main struggle right now is attempting to simply get the DhcpPrintAddress demo to work. I have checked and re-checked my wiring, and rung out all my connections with a multimeter to be sure that the connections are there. Here is what I see:

-When I plug the ethernet cable into the 820io, I get a solid orange light and a blinking green light on the MagJack.
-The Serial feedback from the Arduino is supposed to tell me either 1) it couldn’t resolve an IP or 2) it has an IP of x.x.x.x. Here is where things get strange: I generally don’t get any message at all. Sometimes, during my troubleshooting, I will look up to see a the “No IP” message in my terminal. I haven’t been able to figure out what happens that it suddenly appears. It may be a function of time, but that seems unlikely to me. DHCP should happen fairly fast.

I have attempted to do the library updates outlined on GitHub (github.com/Wiznet/W5200_Arduino_Ethernet_Lib) before I started any of this.

I have also tried using this library which seems like it would work as well: seeedstudio.com/wiki/File:W5 … ibrary.zip

Neither appears to make a difference. I have two 820io modules, and both have the same result in code, though one of them blinks both magjack LEDs when I plug in the ethernet cable. I suspect this module has an issue entirely different, though.

Tomorrow, I am going to bring in an Uno to the office which I have at home, and test with that, since most tutorials use it. Is there any other thing I could try to test the device or troubleshoot it?

Update: I have had no trouble running the demo on the Arduino Uno using the pins directly or the ICSP header. I will test further and try to determine what the issue is.

Other Testing:
I have also tried using this sketch:

[code]#include <SPI.h>
#include <Ethernet.h>

// network configuration. dns server, gateway and subnet are optional.

// the media access control (ethernet hardware) address for the shield:
byte mac = {
0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };

// the dns server ip
IPAddress dnServer(192, 168, 1, 11);
// the router’s gateway address:
IPAddress gateway(192, 168, 1, 36);
// the subnet:
IPAddress subnet(255, 255, 255, 0);

//the IP address is dependent on your network
IPAddress ip(192, 168, 1, 64);

void setup() {
SPI.setBitOrder(MSBFIRST);
SPI.setDataMode(0);
Serial.begin(9600);
while(!Serial){
;
}

// initialize the ethernet device
Ethernet.begin(mac, ip, dnServer, gateway, subnet);
//print out the IP address
Serial.print("IP = ");
Serial.println(Ethernet.localIP());
}

void loop() {
}
[/code]

Which should set up a static IP address. Again, this works fine on an Arduino Uno, and it reports the address correctly. The Arduino Micro states that it’s address is 0.0.0.0.

I have also figured out part of my issue with testing - I had forgotten about how the Micro must re-establish serial connection before the example sketches run. I now blink an LED until the serial port is active, and then stop that loop once it achieves connection. I have observed that it actually DOES eventually respond that it could not get an address through DHCP, but it may take anywhere from 5-10 minutes.

A quick note on my progress:

I’ve found that directing pin 10 to be LOW started getting some results. Similarly, I get these same results if I tie the SS pin from the 820io to GND.

Here is where things get bizarre: the sketch I posted above to determine a static IP is supposed to always set the IP to 192.168.1.64. I have found the resetting the Micro, sometimes it will think it’s IP is 0.0.0.0. Other times, it will have a completely different IP than I instructed it. It seems to like to be at 254.213.243.95, though I’ve seen it at other IPs occasionally as well.

Here is a general pattern I have observed when testing the static IP sketch:
-I unplug the USB (removing all power) then plug it back in
—Opening the serial terminal, I am told the IP is 0.0.0.0
-I tap the reset button on the arduino micro
—Opening the serial terminal, I am told the IP is 0.0.0.0
-I press & hold the reset button on the arduino micro, or tap it multiple times
—Opening the serial terminal, I am told the IP is 192.168.1.64

The press & Hold seems key for me getting the correct result. If I simply tap it, I usually get the all zero IP, but not always. Unplugging/Replugging the USB always brings back an IP of all zeroes.

After further research, I have found the following links of use:
freetronics.com.au/pages/usb … N1xN7DF_89
marco.guardigli.it/2010/11/ardui … roper.html
(You will notice in the comments on this particular

Now, both of these solutions are specifically for the Early versions of the Arduino Ethernet shield, using the W5100, but the symptoms I experience are the same. I have attempted the capacitor/pullup resistor method, and it does not solve my problem. However, I have found that if I connect a pin to the ethernet reset (in this case 13) and execute this:

pinMode(13, OUTPUT); digitalWrite(13, HIGH); delay(100); digitalWrite(13, LOW); delay(100); digitalWrite(13, HIGH); delay(100);
Just before I initialize my Ethernet session, it works 100% of the time. This is somewhat OK, since at least it works, but it results in me losing 2 pins to try and use this chip, since I have to have a dedicated Reset Pin as well as a Slave Select pin. Are there any hardware solutions for this? A different capacitor/resistor setup perhaps?