WIZ810MJ module with Ethernet library

I'm trying to connect the WizNet WIZ810MJ module directly to my ATMEGA328 chip (basically building a Duemilanove on a breadboard), but I can't seem to get any network traffic. Here are my connections:

JP 2:24 (3.3v Vcc) -> my own 3.3v regulator on breadboard
JP 2:14 (GND) -> GND
JP 1:7 (SCLK) -> "Arduino digital pin 13"
JP 1:10 (SCS) -> "Arduino digital pin 10"
JP 1:9 (MOSI) -> "Arduino digital pin 11"
JP 1:12 (MISO) -> "Arduino digital pin 12"
JP 2:2 (/RESET) -> "Arduino digital pin 9" - doing a hardware reset from within setup()
JP 2:9 (SPI_EN) -> 3.3v via 10K pull-up

I am not trying to use the SPI bus for anything else, so that's why I just tied the SPI_EN pin to 3.3v. Is this OK?

Arduino digital pin 9 is providing the WIZ810MJ with a 100ms LOW pulse on startup, before any of the Ethernet library functions are used.

I'm currently working with the WebServer example sketch. All of the code appears to be running (I have confirmed that the ATMEGA chip is running the loop() code without any hang-ups). The WIZ810MJ is showing that it has a link to my Ethernet router, and the yellow light blinks when I try to ping it, but I get no ping response and no webpage in a browser at its IP address. The IP is being assigned statically, but it is within the proper range (Arduino at 192.168.3.77 and laptop at 192.168.3.139, subnet 255.255.255.0).

I am running Arduino 1.0.5 on Linux, uploading via parallel port programmer (all this seems to be working just fine).

Any ideas what I'm missing? From what I've found on the forum so far, the WIZ810MJ module should work with the Ethernet library, but I'm running out of ideas.

It is a w5100. It should work. Maybe I can help. Are you using more than just startup code? If so, cut back to just that until you get the w5100 started every time.

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

// this must be unique
byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xEC };

IPAddress ip( 192,168,3,139 );
// don't know if this is your gateway, but this is normal
IPAddress gateway( 192,168,3,1 );
IPAddress subnet( 255,255,255,0 );

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

  Serial.print(F("Starting w5100..."));
  Ethernet.begin(mac, ip, gateway, gateway, subnet);
  Serial.println(Ethernet.localIP());

  Serial.println(F("Ready"));
}

void loop() {
}

Does it display the ip you assigned it? Can you ping that ip?

edit: Forgot the F() in "Ready" print. My bad. Fixed now.
And this is presuming you have a Serial port set up to debug. It would be tough without it.

Hi SurferTim! I made two slight modifications to your code. I changed the IP address as .139 is my programming laptop. I also added the code for resetting the WIZ810MJ module via digpin9.

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

// this must be unique
byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xEC };

IPAddress ip( 192,168,3,77 );
// don't know if this is your gateway, but this is normal
IPAddress gateway( 192,168,3,1 );
IPAddress subnet( 255,255,255,0 );

void setup()
{
  pinMode(9,OUTPUT);
  digitalWrite(9,LOW);  // reset WIZ810MJ module
  delay(100);
  digitalWrite(9,HIGH);


  Serial.begin(9600);

  Serial.print(F("Starting w5100..."));
  Ethernet.begin(mac, ip, gateway, gateway, subnet);
  Serial.println(Ethernet.localIP());

  Serial.println(F("Ready"));
}

void loop() {
}

The WIZ810MJ lights up (both green and yellow LEDs solid, yellow flickers with network activity), but no ping response. I wasn't sure if just the module and library were smart enough to respond to pings.

Unfortunately, I don't have a serial monitor without a true Arduino board. Let me see if I can rig something up -- reading those debug messages would probably be very helpful.

The serial port is almost a must to do any troubleshooting.
I don't know why you are resetting it, but if you do, you probably should add a delay after the reset pin goes HIGH also to give it time to get started again. I haven't looked at the datasheet to see how long it takes to boot.

  pinMode(9,OUTPUT);
  digitalWrite(9,LOW);  // reset WIZ810MJ module
  delay(100);
  digitalWrite(9,HIGH);
  delay(100);

I saw the restart idea in another post, and my module seemed to sometimes come up in a confused state on power-up, so resetting it this way has at least made it consistently link to my router.

I was able to get a serial monitor working! It reported:

Starting w5100...255.255.255.255
Ready

So it looks like the IP address is not being set correctly? Is this an issue with the Arduino not communicating with the WIZ810MJ?

Thanks for your help!

I tried disconnecting my programmer (since I'm using the ICSP method) and now I get this:

Starting w5100...0.0.0.0
Ready

So still not communicating properly, but at least the programmer isn't interfering anymore. I've double-checked my connections to the WIZ810MJ module -- all seems to be in order.

Normally that means the SPI bus is not correct. Check the connections to the module carefully.

It works! Looks like that 10K resistor on the SPI_EN line was the culprit, so the SPI bus on the WIZ810MJ wasn't being enabled properly. I should have gone straight to the 3.3v supply.

To recap here are my connections:

JP 2:24 (3.3v Vcc) -> my own 3.3v regulator on breadboard
JP 2:14 (GND) -> GND
JP 1:7 (SCLK) -> "Arduino digital pin 13"
JP 1:10 (SCS) -> "Arduino digital pin 10"
JP 1:9 (MOSI) -> "Arduino digital pin 11"
JP 1:12 (MISO) -> "Arduino digital pin 12"
JP 2:2 (/RESET) -> "Arduino digital pin 9" - doing a hardware reset from within setup()
JP 2:9 (SPI_EN) -> 3.3v

and the working test code:

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

// this must be unique
byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xEC };

IPAddress ip( 192,168,3,77 );
// don't know if this is your gateway, but this is normal
IPAddress gateway( 192,168,3,1 );
IPAddress subnet( 255,255,255,0 );

void setup()
{
  pinMode(9,OUTPUT);
  digitalWrite(9,LOW);  // reset WIZ810MJ module
  delay(100);
  digitalWrite(9,HIGH);
  delay(100);


  Serial.begin(9600);

  Serial.print(F("Starting w5100..."));
  Ethernet.begin(mac, ip, gateway, gateway, subnet);
  Serial.println(Ethernet.localIP());

  Serial.println(F("Ready"));
}

void loop() {
}

The module now responds to pings at the designated IP address. I may play around and see if I can get away without using that software reset trick on digpin9, but for now I'm happy.

Thank you so much for your help!